Skip to content

Commit

Permalink
Small change to prevent false peaks being found in unit test when Q i…
Browse files Browse the repository at this point in the history
…s low or loosely defined.
  • Loading branch information
pslocum committed Mar 5, 2023
1 parent 888b95d commit a21191f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Utilities/LMCCavityUtility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,13 @@ namespace locust
if (convolutionMag*convolutionMag > maxGain)
{
maxGain = convolutionMag*convolutionMag;
qInferred = 0.;
}
else if ((convolutionMag*convolutionMag < 0.5*maxGain) && (qInferred == 0.))
{
qInferred = dhoCavityFrequency / (2.* rfStepSize * (rfStep-1));
}
LPROG( testlog, "Cavity GF gain at frequency " << fRF_frequency << " is " << convolutionMag );
LPROG( testlog, "Cavity GF gain at frequency " << fRF_frequency << " is " << convolutionMag );
} // rfStep

delete aSignal;
Expand Down

0 comments on commit a21191f

Please sign in to comment.