[PIPE2D-1118] mergeArms fails to merge spectra from multiple spectrographs Created: 21/Nov/22  Updated: 29/Nov/22  Resolved: 29/Nov/22

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: price Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Reviewers: hassan

 Description   

rhl and Takuji Yamashita have reported a bug in mergeArms.py when multiple spectrographs are involved:

After reduceExposure.py /work/drp --calib /work/drp/CALIB --output /work/rhl/rerun/rhl/2022-11 -c doAdjustDetectorMap=True doMeasureLines=True extractSpectra.doCrosstalk=False isr.doFlat=False --id visit=83244 arm=b^r spectrograph=1^3 -j 15 I failed to merge:
mergeArms.py /work/drp --calib /work/drp/CALIB --output /work/rhl/rerun/rhl/2022-11 --id visit=83244 arm=b^r gave:

root INFO: Running: /home/rhl/PFS/drp/stella/bin/mergeArms.py /work/drp --calib /work/drp/CALIB --output /work/rhl/rerun/rhl/2022-11 --id visit=83244 arm=b^r --clobber-versions --clobber-config
mergeArms WARN: Set of fiberIds of LSFs != fiberIds for spectra:  Only in fiberId: {1, 3, 515, 137, 651, 273, 23, 417, 426, 45, 560, 184, 315, 316, 336, 84, 85, 86, 471, 601, 603, 92, 607, 229, 487, 367, 114, 382} (fixing)
mergeArms WARN: Set of fiberIds of LSFs != fiberIds for spectra:  Only in fiberId: {1, 3, 515, 137, 651, 273, 23, 417, 426, 45, 560, 184, 315, 316, 336, 84, 85, 86, 471, 601, 603, 92, 607, 229, 487, 367, 114, 382} (fixing)
mergeArms WARN: Set of fiberIds of LSFs != fiberIds for spectra:  Only in fiberId: {1924, 1669, 1684, 1303, 1817, 1945, 1439, 1953, 1575, 1588, 1728, 1347, 1862, 1486, 1618, 1638, 1773, 1394, 1909, 1531} (fixing)
mergeArms WARN: Set of fiberIds of LSFs != fiberIds for spectra:  Only in fiberId: {1924, 1669, 1684, 1303, 1817, 1945, 1439, 1953, 1575, 1588, 1728, 1347, 1862, 1486, 1618, 1638, 1773, 1394, 1909, 1531} (fixing)
Traceback (most recent call last):
  File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py", line 436, in __call__
    result = self.runTask(task, dataRef, kwargs)
  File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py", line 504, in runTask
    return task.runDataRef(dataRef, **kwargs)
  File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/mergeArms.py", line 293, in runDataRef
    results = self.run(spectra, pfsConfig, lsfList)
  File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/mergeArms.py", line 198, in run
    self.normalizeSpectra(allSpectra)
  File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/mergeArms.py", line 332, in normalizeSpectra
    assert all(np.all(ss.fiberId == fiberId) for ss in spectra)  # Consistent fibers
AssertionError


 Comments   
Comment by price [ 22/Nov/22 ]

Fixed the assertion failure.

Comment by hassan [ 24/Nov/22 ]

Looks good.

Comment by price [ 29/Nov/22 ]

Merged.

Generated at Sat Feb 10 16:03:00 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.