[PIPE2D-1326] reduceExposures.py can fail with "RuntimeError: Insufficient good lines: 1 vs 8" Created: 04/Nov/23  Updated: 06/Nov/23  Resolved: 06/Nov/23

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

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


 Description   

Kiyoto Yabe reports the error:

FATAL 2023-11-03T13:40:33.853-1000 reduceExposure ({'visit': 96925, 'dateObs': '2023-07-20', 'site': 'S', 'category': 'A', 'arm': 'b', 'spectrograph': 1, 'field': 'GE_EN1_P1_PA_90', 'ccd': 0, 'filter': 'b', 'expTime': 60.0, 'dataType': 'COMPARISON', 'taiObs': '2023-07-20T07:42:23.032', 'pfsDesignId': 1562097688427952981, 'slitOffset': 0.0})(cmdLineTask.py:446)- Failed on dataId={'visit': 96925, 'dateObs': '2023-07-20', 'site': 'S', 'category': 'A', 'arm': 'b', 'spectrograph': 1, 'field': 'GE_EN1_P1_PA_90', 'ccd': 0, 'filter': 'b', 'expTime': 60.0, 'dataType': 'COMPARISON', 'taiObs': '2023-07-20T07:42:23.032', 'pfsDesignId': 1562097688427952981, 'slitOffset': 0.0}: RuntimeError: Insufficient good lines: 1 vs 8
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 "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_stella/edr2-20231103/python/pfs/drp/stella/reduceExposure.py", line 264, in runDataRef
    calibs = self.getSpectralCalibs(sensorRef, exposure, pfsConfig)
  File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_stella/edr2-20231103/python/pfs/drp/stella/reduceExposure.py", line 540, in getSpectralCalibs
    detectorMap = self.adjustDetectorMap.run(
  File "/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/drp_stella/edr2-20231103/python/pfs/drp/stella/adjustDetectorMap.py", line 79, in run
    raise RuntimeError(f"Insufficient good lines: {numGoodLines} vs {needNumLines}")
RuntimeError: Insufficient good lines: 1 vs 8

The how-to-repeat is:

$ setup drp_stella edr2-20231103
$ reduceExposure.py /work/drp --calib=/work/drp/CALIB --rerun=XXX --id visit=96925 arm=b spectrograph=1 --config isr.doFlat=False doAdjustDetectorMap=True adjustDetectorMap.doSlitOffsets=True useCalexp=True


 Comments   
Comment by rhl [ 06/Nov/23 ]

Just a catch-and-warn, so merged and pushed to master.

N.b. there was already a catch block for another exception, so this seems pretty safe

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