-
Type: Bug
-
Status: Open (View Workflow)
-
Priority: Normal
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
After
from pfs.drp.stella.subtractSky1d import subtractSky1d fiberId = 1443 dataId=dict(visit=110478, spectrograph=3, arm='r') pfsConfig = butler.get("pfsConfig", dataId) pfsArm = butler.get("pfsArm", dataId) sky1d = butler.get("sky1d", dataId) pfsConfig = pfsConfig.select(fiberId=fiberId)
a subtractSky1d(pfsArm, pfsConfig, sky1d) call does the wrong thing. Looking at the code, the first line is
sky = sky1d(spectra.wavelength, pfsConfig.select(fiberId=spectra.fiberId))
which returns a (600, 4176) array with only the first row set so the fiberId in the pfsConfig is not (in general) sky-subtracted.
The correct behaviour isn't obvious, an exception on the mismatch would be reasonable, or only sky subtract the fibres in the pfsConfig.