[PIPE2D-587] Fix construction of NevenPsf in reduceExposure Created: 22/May/20  Updated: 05/Jan/21  Resolved: 29/May/20

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

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

Sprint: 2DDRP-2021 A
Reviewers: hassan

 Description   

ncaplar reports:

reduceExposure.py $TARGET --calib $TARGET/CALIB --rerun $RERUN --id visit=21400 arm=r -c doMeasurePsf=True doSubtractSky2d=True doWriteCalexp=True subtractSky2d.useAllFibers=True
+ reduceExposure.py /tigress/ncaplar/ReducedData/May20_2020_run1 --calib /tigress/ncaplar/ReducedData/May20_2020_run1/CALIB --rerun rerun_subtract --id visit=21400 arm=r -c doMeasurePsf=True doSubtractSky2d=True doWriteCalexp=True subtractSky2d.useAllFibers=True
root INFO: Loading config overrride file '/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/obs_pfs/w.2020.20/config/reduceExposure.py'
CameraMapper INFO: Loading exposure registry from /tigress/ncaplar/ReducedData/May20_2020_run1/registry.sqlite3
CameraMapper INFO: Loading calib registry from /tigress/ncaplar/ReducedData/May20_2020_run1/CALIB/calibRegistry.sqlite3
CameraMapper INFO: Loading calib registry from /tigress/ncaplar/ReducedData/May20_2020_run1/CALIB/calibRegistry.sqlite3
root INFO: Running: /tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/bin/reduceExposure.py /tigress/ncaplar/ReducedData/May20_2020_run1 --calib /tigress/ncaplar/ReducedData/May20_2020_run1/CALIB --rerun rerun_subtract --id visit=21400 arm=r -c doMeasurePsf=True doSubtractSky2d=True doWriteCalexp=True subtractSky2d.useAllFibers=True
reduceExposure INFO: Processing [{'visit': 21400, 'arm': 'r', 'dateObs': '2019-07-26', 'site': 'L', 'category': 'A', 'spectrograph': 1, 'field': 'ARC', 'ccd': 1, 'filter': 'r', 'expTime': 14.996, 'dataType': 'arc', 'taiObs': '2019-07-26', 'pfsDesignId': 1099528409104, 'slitOffset': 0.0}]
reduceExposure.isr INFO: Performing ISR on sensor {'visit': 21400, 'arm': 'r', 'dateObs': '2019-07-26', 'site': 'L', 'category': 'A', 'spectrograph': 1, 'field': 'ARC', 'ccd': 1, 'filter': 'r', 'expTime': 14.996, 'dataType': 'arc', 'taiObs': '2019-07-26', 'pfsDesignId': 1099528409104, 'slitOffset': 0.0}
reduceExposure.isr INFO: Converting exposure to floating point values
reduceExposure.isr INFO: Assembling CCD from amplifiers
reduceExposure.isr INFO: Applying bias correction.
reduceExposure.isr INFO: Masking defects.
reduceExposure.isr INFO: Masking NAN value pixels.
reduceExposure.isr INFO: Widening saturation trails.
reduceExposure.isr INFO: Applying dark correction.
reduceExposure.isr INFO: Applying flat correction.
reduceExposure.isr INFO: Interpolating masked pixels.
reduceExposure.isr WARN: No rough magnitude zero point set for filter r
reduceExposure.isr INFO: Setting rough magnitude zero point: 30.939939
reduceExposure.repair INFO: Identified 0 cosmic rays.
reduceExposure FATAL: Failed on dataIds=[{'visit': 21400, 'arm': 'r', 'dateObs': '2019-07-26', 'site': 'L', 'category': 'A', 'spectrograph': 1, 'field': 'ARC', 'ccd': 1, 'filter': 'r', 'expTime': 14.996, 'dataType': 'arc', 'taiObs': '2019-07-26', 'pfsDesignId': 1099528409104, 'slitOffset': 0.0}]: TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. lsst.geom.Extent2I(value: int=0)
    2. lsst.geom.Extent2I(arg0: lsst.geom.Point2I)
    3. lsst.geom.Extent2I(arg0: lsst.geom.Point2I)
    4. lsst.geom.Extent2I(arg0: lsst.geom.Extent2I)
    5. lsst.geom.Extent2I(arg0: lsst.geom.Extent2I)
    6. lsst.geom.Extent2I(arg0: numpy.ndarray[int32[2, 1]])
    7. lsst.geom.Extent2I(x: int, y: int)
    8. lsst.geom.Extent2I(x: float, y: float)
Invoked with: None, None
Traceback (most recent call last):
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py", line 388, in __call__
    result = self.runTask(task, dataRef, kwargs)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py", line 447, in runTask
    return task.runDataRef(dataRef, **kwargs)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/python/pfs/drp/stella/reduceExposure.py", line 203, in runDataRef
    psfList = self.measurePsf.run(sensorRefList, exposureList, detectorMapList)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/python/pfs/drp/stella/measurePsf.py", line 50, in run
    sensorRef, exposure, detectorMap in zip(sensorRefList, exposureList, detectorMapList)]
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/python/pfs/drp/stella/measurePsf.py", line 50, in <listcomp>
    sensorRef, exposure, detectorMap in zip(sensorRefList, exposureList, detectorMapList)]
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/python/pfs/drp/stella/measurePsf.py", line 74, in runSingle
    directory=self.config.directory)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2020.20/python/pfs/drp/stella/NevenPsfContinued.py", line 51, in build
    oversampleFactor, Extent2I(targetSize, targetSize), xMaxDistance)
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. lsst.geom.Extent2I(value: int=0)
    2. lsst.geom.Extent2I(arg0: lsst.geom.Point2I)
    3. lsst.geom.Extent2I(arg0: lsst.geom.Point2I)
    4. lsst.geom.Extent2I(arg0: lsst.geom.Extent2I)
    5. lsst.geom.Extent2I(arg0: lsst.geom.Extent2I)
    6. lsst.geom.Extent2I(arg0: numpy.ndarray[int32[2, 1]])
    7. lsst.geom.Extent2I(x: int, y: int)
    8. lsst.geom.Extent2I(x: float, y: float)
Invoked with: None, None


 Comments   
Comment by price [ 22/May/20 ]

The targetSize parameter is None because it's optional in MeasurePsfConfig, and that overrides the default in NevenPsf.build.

A workaround for this is to use -c measurePsf.targetSize=23.

Comment by price [ 22/May/20 ]

Simple fix.

Comment by price [ 29/May/20 ]

Merged to master.

Generated at Sat Feb 10 15:55:08 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.