[PIPE2D-993] reduceExposure fails when using PFI calib and 2d sky subtraction Created: 01/Mar/22 Updated: 15/Mar/22 Resolved: 15/Mar/22 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Normal |
| Reporter: | hassan | Assignee: | hassan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 1 |
| Sprint: | 2DDRP-2022 B |
| Reviewers: | price |
| Description |
|
Running reduceExposure.py with 2D sky subtraction enabled using the calib CALIB-PFI-20211220 fails in the aperture correction computation: $ reduceExposure.py /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-PFI-20211220 --rerun=hassans/sunss/v46588_calibpfi --doraise --id visit=46588 arm=b^r -c measurePsf.oversampleFactor=11 measurePsf.version=Aug0121_v1 measurePsf.targetSize=21 doWriteCalexp=True doSubtractSky2d=True doMeasurePsf=True isr.doFlat=False File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/reduceExposure.py", line 278, in runDataRef linesList, apCorrList) File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/subtractSky2d.py", line 164, in run image = self.subtractSky(exposure, psf, fiberTrace, detectorMap, pfsConfig, sky2d, apCorr) File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/subtractSky2d.py", line 295, in subtractSky image = self.makeSkyImage(exposure.getBBox(), psf, fiberTraces, pfsConfig, sky2d, apCorr) File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/subtractSky2d.py", line 259, in makeSkyImage model.flux[ii], invert=True) File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/apertureCorrections.py", line 316, in calculateApertureCorrection result = apCorr(wavelength, pfsConfig.select(fiberId=fiberId)) File "/tigress/hassans/software/drp_stella/python/pfs/drp/stella/focalPlaneFunction.py", line 156, in __call__ result.values = result.values[0] IndexError: index 0 is out of bounds for axis 0 with size 0 This is not the case when using the CALIB-SuNSS-2021-06-16 calib. Please investigate. |
| Comments |
| Comment by hassan [ 01/Mar/22 ] |
|
Problem occurs because the code currently expects all the fibers where information is available in the calib, to be present in the pfsConfig. For example, there is fiber trace information for fiberId=2, but the relevant pfsConfig does not list fiberId 2 at all, resulting in no data to extract from the pfsConfig for subsequent processing. These scenarios should be avoided. |
| Comment by hassan [ 08/Mar/22 ] |
|
Problem slightly more extended than the above comment. Basically a book-keeping problem: the list of fiberIds from pfsConfig, the aperture correction object ( apCorr ) and supplied fiberTraces should all be aligned. Added code to ensure that. |
| Comment by hassan [ 15/Mar/22 ] |
|
Merged to master. |