Skip to content

Commit

Permalink
dont change default behavior of learnCalibrationPlanFromEnergiesAndPeaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ggggggggg committed Jun 12, 2024
1 parent 2cc92a8 commit bf5af74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mass/off/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def calibrateFollowingPlan(self, uncalibratedName, calibratedName="energy", curv
return results

@add_group_loop
def learnCalibrationPlanFromEnergiesAndPeaks(self, attr, states, ph_fwhm, line_names, maxacc, polynomial=True):
def learnCalibrationPlanFromEnergiesAndPeaks(self, attr, states, ph_fwhm, line_names, maxacc, polynomial=False):
peak_ph_vals, _peak_heights = mass.algorithms.find_local_maxima(self.getAttr(attr, indsOrStates=states), ph_fwhm)
if polynomial:
_name_e, _energies_out, opt_assignments = mass.algorithms.find_opt_assignment_polynomial(peak_ph_vals, line_names, maxacc=maxacc)
Expand Down
2 changes: 2 additions & 0 deletions tests/off/test_nsls2_2024.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def test_nsls2_2024():
states=["CAL0"],
ph_fwhm=50,
line_names=["CKAlpha","NKAlpha","OKAlpha", "FeLAlpha", "NiLAlpha", "CuLAlpha"],
polynomial=True,
maxacc=1e4
)
data.learnPhaseCorrection(uncorrectedName="filtValueDC",
Expand All @@ -112,6 +113,7 @@ def test_nsls2_2024():
states=["CAL0"],
ph_fwhm=50,
line_names=["CKAlpha","NKAlpha","OKAlpha", "FeLAlpha", "NiLAlpha", "CuLAlpha"],
polynomial=True,
maxacc=1e4
)
data.calibrateFollowingPlan("filtValue5LagDCPC", overwriteRecipe=True,
Expand Down

0 comments on commit bf5af74

Please sign in to comment.