Skip to content

Commit

Permalink
Filter out calibration and stabilization measurements in Verifinder N…
Browse files Browse the repository at this point in the history
…42 files, when the user "raw" or "derived" data.
  • Loading branch information
wcjohns committed Apr 6, 2024
1 parent 4a21994 commit 821d6ba
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/SpecMeasManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3406,6 +3406,28 @@ void SpecMeasManager::selectDerivedDataChoice( const SpecMeasManager::DerivedDat

meas->keep_derived_data_variant( keeptype );

if( (meas->detector_type() == SpecUtils::DetectorType::VerifinderNaI)
|| (meas->detector_type() == SpecUtils::DetectorType::VerifinderLaBr)
|| SpecUtils::icontains(meas->manufacturer(), "Symetrica") )
{
// Remove the calibration and stabilization measurements; user probably doesnt want these

vector<shared_ptr<const SpecUtils::Measurement>> meas_to_remove;
const vector<shared_ptr<const SpecUtils::Measurement>> orig_meas = meas->measurements();
for( const shared_ptr<const SpecUtils::Measurement> &m : orig_meas )
{
if( SpecUtils::icontains( m->title(), "StabMeas" )
|| SpecUtils::icontains( m->title(), "Gamma Cal" )
|| SpecUtils::icontains( m->title(), "CalMeasurement" ) )
{
meas_to_remove.push_back( m );
}
}//for( loop over remaining measurements )

if( !meas_to_remove.empty() )
meas->remove_measurements( meas_to_remove );
}//if( a Symetrica detector )

// Trigger a refresh of row info and selected rows in File Manager
m_fileModel->removeRows( index.row(), 1 );
header->setMeasurmentInfo( meas );
Expand Down

0 comments on commit 821d6ba

Please sign in to comment.