MH02 1-4 counters

This commit is contained in:
Erik Fröjdh
2024-11-06 21:32:03 +01:00
parent cbfd1f0b6c
commit b2e5c71f9c
12 changed files with 195 additions and 24 deletions

View File

@@ -109,6 +109,10 @@ std::optional<size_t> RawMasterFile::digital_samples() const {
return m_digital_samples;
}
std::optional<size_t> RawMasterFile::transceiver_samples() const {
return m_transceiver_samples;
}
void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
std::ifstream ifs(fpath);
json j;
@@ -190,6 +194,15 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
// keep the optional empty
}
try{
m_transceiver_flag = j.at("Transceiver Flag");
if(m_transceiver_flag){
m_transceiver_samples = j.at("Transceiver Samples");
}
}catch (const json::out_of_range &e) {
// keep the optional empty
}
// Update detector type for Moench
// TODO! How does this work with old .raw master files?
#ifdef AARE_VERBOSE