mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-21 19:27:58 +02:00
added counter mask, fixed adc mask data type, removed redundant scan parameter parsing
This commit is contained in:
@ -85,7 +85,7 @@ class Hdf5MasterFile {
|
|||||||
std::optional<size_t> m_transceiver_samples;
|
std::optional<size_t> m_transceiver_samples;
|
||||||
// g1 roi
|
// g1 roi
|
||||||
std::optional<ROI> m_roi;
|
std::optional<ROI> m_roi;
|
||||||
// counter mask
|
std::optional<size_t> m_counter_mask;
|
||||||
// exptimearray
|
// exptimearray
|
||||||
// gatedelay array
|
// gatedelay array
|
||||||
// gates
|
// gates
|
||||||
@ -143,7 +143,7 @@ class Hdf5MasterFile {
|
|||||||
std::optional<size_t> transceiver_samples() const;
|
std::optional<size_t> transceiver_samples() const;
|
||||||
// g1 roi
|
// g1 roi
|
||||||
std::optional<ROI> roi() const;
|
std::optional<ROI> roi() const;
|
||||||
// counter mask
|
std::optional<size_t> counter_mask() const;
|
||||||
// exptimearray
|
// exptimearray
|
||||||
// gatedelay array
|
// gatedelay array
|
||||||
// gates
|
// gates
|
||||||
|
@ -156,7 +156,7 @@ std::optional<size_t> Hdf5MasterFile::transceiver_samples() const {
|
|||||||
}
|
}
|
||||||
// g1 roi
|
// g1 roi
|
||||||
std::optional<ROI> Hdf5MasterFile::roi() const { return m_roi; }
|
std::optional<ROI> Hdf5MasterFile::roi() const { return m_roi; }
|
||||||
// counter mask
|
std::optional<size_t> Hdf5MasterFile::counter_mask() const { return m_counter_mask; }
|
||||||
// exptimearray
|
// exptimearray
|
||||||
// gatedelay array
|
// gatedelay array
|
||||||
// gates
|
// gates
|
||||||
@ -254,7 +254,7 @@ void Hdf5MasterFile::parse_acquisition_metadata(
|
|||||||
std::string(metadata_group_name + "Number of pixels in x axis"));
|
std::string(metadata_group_name + "Number of pixels in x axis"));
|
||||||
LOG(logDEBUG) << "Pixels in x: " << m_pixels_x;
|
LOG(logDEBUG) << "Pixels in x: " << m_pixels_x;
|
||||||
|
|
||||||
// Image Size in Bytes
|
// Max Frames Per File
|
||||||
m_max_frames_per_file = h5_get_scalar_dataset<int>(
|
m_max_frames_per_file = h5_get_scalar_dataset<int>(
|
||||||
file, std::string(metadata_group_name + "Maximum frames per file"));
|
file, std::string(metadata_group_name + "Maximum frames per file"));
|
||||||
LOG(logDEBUG) << "Max frames per File: " << m_max_frames_per_file;
|
LOG(logDEBUG) << "Max frames per File: " << m_max_frames_per_file;
|
||||||
@ -411,10 +411,10 @@ void Hdf5MasterFile::parse_acquisition_metadata(
|
|||||||
// ADC Mask
|
// ADC Mask
|
||||||
H5::Exception::dontPrint();
|
H5::Exception::dontPrint();
|
||||||
try {
|
try {
|
||||||
m_adc_mask = h5_get_scalar_dataset<int>(
|
m_adc_mask = h5_get_scalar_dataset<uint32_t>(
|
||||||
file, std::string(metadata_group_name + "ADC Mask"));
|
file, std::string(metadata_group_name + "ADC Mask"));
|
||||||
} catch (H5::FileIException &e) {
|
} catch (H5::FileIException &e) {
|
||||||
m_adc_mask = 0;
|
// keep the optional empty
|
||||||
}
|
}
|
||||||
LOG(logDEBUG) << "ADC Mask: " << m_adc_mask;
|
LOG(logDEBUG) << "ADC Mask: " << m_adc_mask;
|
||||||
H5Eset_auto(H5E_DEFAULT, reinterpret_cast<H5E_auto2_t>(H5Eprint2),
|
H5Eset_auto(H5E_DEFAULT, reinterpret_cast<H5E_auto2_t>(H5Eprint2),
|
||||||
@ -514,19 +514,7 @@ void Hdf5MasterFile::parse_acquisition_metadata(
|
|||||||
H5Eset_auto(H5E_DEFAULT, reinterpret_cast<H5E_auto2_t>(H5Eprint2),
|
H5Eset_auto(H5E_DEFAULT, reinterpret_cast<H5E_auto2_t>(H5Eprint2),
|
||||||
stderr);
|
stderr);
|
||||||
|
|
||||||
// ROI
|
// Rx ROI
|
||||||
try {
|
|
||||||
std::string scan_parameters = h5_get_scalar_dataset<std::string>(
|
|
||||||
file, std::string(metadata_group_name + "Scan Parameters"));
|
|
||||||
m_scan_parameters = ScanParameters(scan_parameters);
|
|
||||||
if (dVersion < 6.61){
|
|
||||||
m_scan_parameters.increment_stop(); //adjust for endpoint being included
|
|
||||||
}
|
|
||||||
} catch (H5::FileIException &e) {
|
|
||||||
// keep the optional empty
|
|
||||||
}
|
|
||||||
LOG(logDEBUG) << "Scan Parameters: " << ToString(m_scan_parameters);
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
ROI tmp_roi;
|
ROI tmp_roi;
|
||||||
tmp_roi.xmin = h5_get_scalar_dataset<int>(
|
tmp_roi.xmin = h5_get_scalar_dataset<int>(
|
||||||
@ -574,7 +562,18 @@ void Hdf5MasterFile::parse_acquisition_metadata(
|
|||||||
m_type = DetectorType::Moench03_old;
|
m_type = DetectorType::Moench03_old;
|
||||||
}
|
}
|
||||||
|
|
||||||
// counter mask
|
// Counter Mask
|
||||||
|
H5::Exception::dontPrint();
|
||||||
|
try {
|
||||||
|
m_counter_mask = h5_get_scalar_dataset<int>(
|
||||||
|
file, std::string(metadata_group_name + "Counter Mask"));
|
||||||
|
} catch (H5::FileIException &e) {
|
||||||
|
// keep the optional empty
|
||||||
|
}
|
||||||
|
LOG(logDEBUG) << "Counter Mask: " << m_counter_mask;
|
||||||
|
H5Eset_auto(H5E_DEFAULT, reinterpret_cast<H5E_auto2_t>(H5Eprint2),
|
||||||
|
stderr);
|
||||||
|
|
||||||
// exptimearray
|
// exptimearray
|
||||||
// gatedelay array
|
// gatedelay array
|
||||||
// gates
|
// gates
|
||||||
|
Reference in New Issue
Block a user