-
Type:
Task
-
Status: Done (View Workflow)
-
Priority:
Normal
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Yamashita-san reported this error:
File "/data22b/work/takuji/new_pfs_pipeline/drp_stella/python/pfs/drp/stella/fitFluxCal.py", line 98, in runDataRef ss.fluxTable = self.fluxTable.run([ref.dataId for ref in armRefList], File "/data22b/work/takuji/new_pfs_pipeline/drp_stella/python/pfs/drp/stella/FluxTableTask.py", line 39, in run return makeFluxTable(identities, spectra, flags, self.config.ignoreFlags, File "/data22b/work/takuji/new_pfs_pipeline/drp_stella/python/pfs/drp/stella/makeFluxTable.py", line 151, in makeFluxTable raise RuntimeError("Length mismatch: %d vs %d" % (len(identities), len(spectra))) RuntimeError: Length mismatch: 4 vs 2
fitFluxCal.py:98 is among the lines copied from fluxCalibrate.py:
for ff in pfsMerged.fiberId: extracted = pfsMerged.extractFiber(PfsSingle, pfsConfig, ff) extracted.fluxTable = self.fluxTable.run( [ss.identity.getDict() for ss in calibrated], # (A) [pfsArmList[ii].extractFiber(PfsSingle, pfsConfig, ff) for ii in fiberToArm[ff]], # (B) MaskHelper.fromMerge([pfsArm.flags for pfsArm in pfsArmList]), ) extracted.metadata = getPfsVersions()
FluxTableTask.run() expects that (A) has the same length as (B), but apparently it doesn't. This and the corresponding segment in fitFluxCal.py should be modified like this:
for ff in pfsMerged.fiberId: extracted = pfsMerged.extractFiber(PfsSingle, pfsConfig, ff) extracted.fluxTable = self.fluxTable.run( - [ss.identity.getDict() for ss in calibrated], + [calibrated[ii].identity.getDict() for ii in fiberToArm[ff]], [pfsArmList[ii].extractFiber(PfsSingle, pfsConfig, ff) for ii in fiberToArm[ff]], MaskHelper.fromMerge([pfsArm.flags for pfsArm in pfsArmList]), ) extracted.metadata = getPfsVersions()