Skip to content

Commit

Permalink
Check if fid is in fiberNorms, not the array of values
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertLuptonTheGood committed Jun 18, 2024
1 parent 7cc4efc commit aff6df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/pfs/drp/stella/extractSpectraTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/pfs/drp/stella/photometerLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit aff6df1

Please sign in to comment.