Skip to content

Commit

Permalink
Added us_amps and ds_amps to specfit_results_quantified.csv. Tested l…
Browse files Browse the repository at this point in the history
…oading analyzed v9 scalers
  • Loading branch information
Arthur Glowacki committed Oct 11, 2022
1 parent c9f13e2 commit 6ea6dea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,9 @@ int run_h5_file_updates(Command_Line_Parser& clp)
{
data_struct::Analysis_Job<float> analysis_job;

if (set_general_options(clp, analysis_job) != -1)
set_detectors(clp, analysis_job);
set_whole_command(clp, analysis_job);
if (set_dir_and_files(clp, analysis_job) != -1)
{


Expand Down
4 changes: 2 additions & 2 deletions src/io/file/csv_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ namespace csv
file_stream << " I_[mA]:, " << itr.second.sr_current << "\n";
file_stream << " US_IC[cts/s]:, " << itr.second.US_IC << "\n";
file_stream << " DS_IC[cts/s]:, " << itr.second.DS_IC << "\n";
//file_stream << " US_AMPS[num,unit]:, " << itr.second.US_IC << "\n";
//file_stream << " DS_AMPS[num,unit]:, " << itr.second.DS_IC << "\n";
file_stream << " US_AMPS[num,unit]:, " << detector->fit_params_override_dict.us_amp_sens_num << ","<< detector->fit_params_override_dict.us_amp_sens_unit << "\n";
file_stream << " DS_AMPS[num,unit]:, " << detector->fit_params_override_dict.ds_amp_sens_num << "," << detector->fit_params_override_dict.ds_amp_sens_unit << "\n";
file_stream << "\n\n";
}
file_stream << "beryllium_window_thickness : " << detector->beryllium_window_thickness << "\n";
Expand Down
21 changes: 11 additions & 10 deletions src/io/file/hdf5_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ class DLL_EXPORT HDF5_IO
{
hid_t file_id = -1;
hid_t maps_grp_id = -1;
hid_t sub_grp_id, counts_dset_id, channels_dset_id, counts_dspace_id, channels_dspace_id, fit_int_spec_dset_id;
hid_t counts_dset_id, channels_dset_id, counts_dspace_id, channels_dspace_id, fit_int_spec_dset_id;
hid_t memoryspace_id, memoryspace_name_id, error;
hsize_t offset[3] = { 0,0,0 };
hsize_t count[3] = { 1,1,1 };
Expand All @@ -3440,22 +3440,23 @@ class DLL_EXPORT HDF5_IO
{
return false;
}

if (false == _open_h5_object(sub_grp_id, H5O_GROUP, close_map, "Scalers", maps_grp_id))
{
return false;
}

if (false == _open_h5_object(counts_dset_id, H5O_DATASET, close_map, "Values", sub_grp_id))
if (false == _open_h5_object(counts_dset_id, H5O_DATASET, close_map, "Scalers/Values", maps_grp_id, false, false))
{
return false;
if (false == _open_h5_object(counts_dset_id, H5O_DATASET, close_map, "scalers", maps_grp_id, false, false))
{
return false;
}
}
counts_dspace_id = H5Dget_space(counts_dset_id);
close_map.push({ counts_dspace_id, H5O_DATASPACE });

if (false == _open_h5_object(channels_dset_id, H5O_DATASET, close_map, "Names", sub_grp_id))
if (false == _open_h5_object(channels_dset_id, H5O_DATASET, close_map, "Scalers/Names", maps_grp_id, false, false))
{
return false;
if (false == _open_h5_object(channels_dset_id, H5O_DATASET, close_map, "scaler_names", maps_grp_id))
{
return false;
}
}

channels_dspace_id = H5Dget_space(channels_dset_id);
Expand Down

0 comments on commit 6ea6dea

Please sign in to comment.