[PIPE2D-434] ingestPfsImages.py fails when no pfsConfig is available Created: 11/Jun/19  Updated: 11/Jun/19  Resolved: 11/Jun/19

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

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

Issue Links:
Relates
relates to DAMD-49 Clarify use of expId Done
Story Points: 1
Sprint: 2DDRP-2019 E

 Description   

As reported by sogo.mineo in the #drp-2d slack channel: the above script should accept either a pfsConfig or a pfsDesign as input. In the case of the latter, it creates a new pfsConfig that is used subsequently.

However, following changes in DAMD-49, whenever a pfsDesign is used (and there is no pfsConfig present in the input data directory), the ingestPfsImages.py script fails with an error related a non-existent 'visit' dict keyword:

$(which ingestPfsImages.py) run-002/INTEGRATION/ --mode=link run-002/drp_stella_data/raw/PFFA00000011.fits -c clobber=True register.ignore=True --pfsConfigDir=run-002/designDir/
CameraMapper INFO: Loading exposure registry from /Users/hassans/temp/IngestPfsImages-IntTest/run-002/INTEGRATION/registry.sqlite3
ingestPfs INFO: run-002/drp_stella_data/raw/PFFA00000011.fits --<link>--> /Users/hassans/temp/IngestPfsImages-IntTest/run-002/INTEGRATION/2019-03-22/PFFA000000b1.fits
Traceback (most recent call last):
  File "/Users/hassans/PFS/visualStudioCode/obs_pfs/python/lsst/obs/pfs/ingest.py", line 293, in runFile
    self.ingestPfsConfig(pfsConfigDir, hduInfoList[0], args)
  File "/Users/hassans/PFS/visualStudioCode/obs_pfs/python/lsst/obs/pfs/ingest.py", line 267, in ingestPfsConfig
    PfsConfig(**kwargs).write(dirName)
TypeError: __init__() got an unexpected keyword argument 'visit'
ingestPfs WARN: Failed to ingest file run-002/drp_stella_data/raw/PFFA00000011.fits: __init__() got an unexpected keyword argument 'visit'

In the above example, the directory run-002/designDir contains a pfsDesign file, but not a pfsConfig file.

Following DAMD-49, the PfsConfig class now requires a 'visit0' keyword argument to be passed, not 'visit'. Please fix.



 Comments   
Comment by hassan [ 11/Jun/19 ]

Fixed in 3cf07e8 (release 5.0.4)

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