File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ enum class MoreActionsIndex : int
146
146
NumMoreActionsIndex
147
147
};// enum MoreActionsIndex
148
148
149
- /* * A struct that indicates what SpecUtils::Measurement's to apply a coefficent change to.
150
- \TODO: if (or hopefully when) the InterSpec class allows selecting detectors seperately for
149
+ /* * A struct that indicates what SpecUtils::Measurement's to apply a coefficient change to.
150
+ \TODO: if (or hopefully when) the InterSpec class allows selecting detectors separately for
151
151
foreground/back/sec., we will need to consider upgrading how we indicate things \
152
152
because there is an edge-case where detectors wanted will differ by sample number
153
153
@@ -251,7 +251,7 @@ class EnergyCalTool : public Wt::WContainerWidget
251
251
std::string applyToSummaryTxt () const ;
252
252
253
253
/* * Returns which SpecUtils::Measurement need to be updated, based on what files are loaded and
254
- what options the user has choosen .
254
+ what options the user has chosen .
255
255
*/
256
256
std::vector<MeasToApplyCoefChangeTo> measurementsToApplyCoeffChangeTo ();
257
257
Original file line number Diff line number Diff line change @@ -2600,8 +2600,14 @@ void EnergyCalTool::applyCalChange( std::shared_ptr<const SpecUtils::EnergyCalib
2600
2600
for ( const set<int > &samples : samples_with_peaks )
2601
2601
{
2602
2602
bool all_samples = true ;
2603
- for ( const int sample : change.sample_numbers )
2604
- all_samples = (all_samples && samples.count (sample));
2603
+
2604
+ // Check if the peaks sample numbers are all getting re-calibrated
2605
+ for ( auto sample_num_iter = begin (samples);
2606
+ all_samples && (sample_num_iter != end (samples));
2607
+ ++sample_num_iter )
2608
+ {
2609
+ all_samples = (change.sample_numbers .count (*sample_num_iter) != 0u );
2610
+ }
2605
2611
2606
2612
if ( all_samples )
2607
2613
peaksamples.insert ( samples );
@@ -2610,8 +2616,14 @@ void EnergyCalTool::applyCalChange( std::shared_ptr<const SpecUtils::EnergyCalib
2610
2616
for ( const set<int > &samples : samples_with_hint_peaks )
2611
2617
{
2612
2618
bool all_samples = true ;
2613
- for ( const int sample : change.sample_numbers )
2614
- all_samples = (all_samples && samples.count (sample));
2619
+
2620
+ // Check if the peaks sample numbers are all getting re-calibrated
2621
+ for ( auto sample_num_iter = begin (samples);
2622
+ all_samples && (sample_num_iter != end (samples));
2623
+ ++sample_num_iter )
2624
+ {
2625
+ all_samples = (change.sample_numbers .count (*sample_num_iter) != 0u );
2626
+ }
2615
2627
2616
2628
if ( all_samples )
2617
2629
hintPeakSamples.insert ( samples );
You can’t perform that action at this time.
0 commit comments