[PIPE2D-1174] DummySubtractSky2dTask is broken Created: 01/Mar/23 Updated: 04/Mar/23 Resolved: 04/Mar/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 | ||
| Attachments: |
|
| Description |
|
With the config overrides:
from pfs.drp.stella.subtractSky2d import DummySubtractSky2dTask
config.subtractSky2d.retarget(DummySubtractSky2dTask)
config.doSubtractSky2d = True
reduceExposure.py fails with:
File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/reduceExposure.py", line 289, in runDataRef
skyResults = self.subtractSky2d.run(exposureList, pfsConfig, psfList,
TypeError: run() takes 7 positional arguments but 8 were given
This is due to the missing apCorrList argument. Fixing this, however, results in:
reduceExposure FATAL: Failed on dataIds=[{'visit': 83244, 'arm': 'r', 'spectrograph': 1, 'dateObs': '2022-11-21', 'site': 'S', 'category': 'A', 'field': 'GE_RUN08_COS1', 'ccd': 1, 'filter': 'r', 'expTime': 900.002, 'dataType': 'OBJECT', 'taiObs': '2022-11-21T13:31:03.689', 'pfsDesignId': 6957882023119077138, 'slitOffset': 0.0}]: RuntimeError: Length mismatch between spectra (139) and pfsConfig (500)
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/reduceExposure.py", line 289, in runDataRef
skyResults = self.subtractSky2d.run(exposureList, pfsConfig, psfList,
File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/subtractSky2d.py", line 360, in run
imageList.append(self.runSingle(exp, pfsConfig, skyFibers, ft, detMap))
File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/subtractSky2d.py", line 395, in runSingle
sky1d = self.fitSkyModel.run(spectra.toPfsArm(dataId).select(pfsConfig, fiberId=skyFibers),
File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/fitFocalPlane.py", line 95, in run
func = self.Function.fit(spectra, pfsConfig, self.config.mask, rejected=rejected, robust=True,
File "/home/rhl/PFS/drp/stella/python/pfs/drp/stella/focalPlaneFunction.py", line 105, in fit
raise RuntimeError(
RuntimeError: Length mismatch between spectra (139) and pfsConfig (500)
|
| Comments |
| Comment by price [ 02/Mar/23 ] |
|
Fixed the bitrot, and this works again. |
| Comment by rhl [ 02/Mar/23 ] |
|
It runs! Thanks, but the results are not very nice. Is the normalisation correct: |
| Comment by price [ 04/Mar/23 ] |
|
I think the problems seen in that image reflect problems in the sky subtraction. I fixed the normalisation as part of this ticket (without the correct normalisation, no sky subtraction was evident in the image at all). Merged. |