Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aghaeifar committed Jun 24, 2024
1 parent f34aac2 commit a9e83d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/file_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ bool file_utils::read_config(std::string config_filename, simulation_parameters
filenames[boost::algorithm::to_lower_copy(str)] = file_paths;
}
param->n_fieldmaps = filenames["phantom"].size();
if(isParentConfig == false && param->n_fieldmaps == 0)
{
BOOST_LOG_TRIVIAL(error) << cf_name << ") " << "No fieldmap is provided. Aborting...!";
return false;
}

// output directory
output_dir = std::filesystem::path(pt.get<std::string>("FILES.OUTPUT_DIR", output_dir.string()));
Expand Down
2 changes: 1 addition & 1 deletion src/shapes/shape_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool shape::save()
HighFive::DataSet dataset_mask = file.createDataSet<uint8_t>("mask", HighFive::DataSpace(dims));
dataset_mask.write_raw((int8_t *)m_mask.data());
// save fov
float fov[3] = {m_fov, m_fov, m_fov};
float fov[3] = {m_fov*1e-6f, m_fov*1e-6f, m_fov*1e-6f}; // convert um to m
std::vector<size_t> dims_fov(1, 3);
HighFive::DataSet dataset_fov = file.createDataSet<float>("fov", HighFive::DataSpace(dims_fov));
dataset_fov.write_raw(fov);
Expand Down
2 changes: 1 addition & 1 deletion src/spinwalk.cu
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ bool run(simulation_parameters param, std::map<std::string, std::vector<std::str
thrust::copy(d_T.begin(), d_T.end(), T.begin() + shift);
#endif
}
// bar.progress(sl, param.n_sample_length_scales);
bar.progress(sl, param.n_sample_length_scales);
}
bar.finish();

Expand Down

0 comments on commit a9e83d7

Please sign in to comment.