From aff6df146e792eeea3412a6467237e9401bc7327 Mon Sep 17 00:00:00 2001 From: Robert Lupton the Good Date: Mon, 17 Jun 2024 16:02:58 -1000 Subject: [PATCH] Check if fid is in fiberNorms, not the array of values --- python/pfs/drp/stella/extractSpectraTask.py | 2 +- python/pfs/drp/stella/photometerLines.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pfs/drp/stella/extractSpectraTask.py b/python/pfs/drp/stella/extractSpectraTask.py index 0c86f7424..7a886d20e 100644 --- a/python/pfs/drp/stella/extractSpectraTask.py +++ b/python/pfs/drp/stella/extractSpectraTask.py @@ -160,7 +160,7 @@ def extractAllSpectra( if fiberNorms is not None: for spectrum in spectra: - if spectrum.fiberId in fiberNorms.coeff: + if spectrum.fiberId in fiberNorms: spectrum.norm *= fiberNorms.calculate(spectrum.fiberId) return spectra diff --git a/python/pfs/drp/stella/photometerLines.py b/python/pfs/drp/stella/photometerLines.py index 9c1bd2b05..f02f59a26 100644 --- a/python/pfs/drp/stella/photometerLines.py +++ b/python/pfs/drp/stella/photometerLines.py @@ -233,7 +233,7 @@ def addFluxNormalizations(self, lines, tracesOrProfiles, fiberNorms): ] if fiberNorms is not None: for i, (ff, yy) in enumerate(zip(lines.fiberId, lines.y)): - if ff in fiberNorms.coeff: + if ff in fiberNorms: lines.fluxNorm[i] = fiberNorms.calculate(ff, yy) def subtractLines(self, exposure, lines, apCorr, pfsConfig):