[PIPE2D-855] cannot construct fiberProfile from the recent dcb-21-fibers data Created: 18/Jun/21  Updated: 18/Jun/21  Resolved: 18/Jun/21

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

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

Attachments: PNG File image-2.png    
Sprint: 2DDRP-2021 A 6
Reviewers: hassan

 Description   

got this error constructing fiberProfile from the recent dcb data :

CameraMapper INFO: Loading calib registry from /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/calibRegistry.sqlite3                                               [8/1852]
fiberProfiles INFO: Scatter combination                                                                                                                               
fiberProfiles INFO: Combining 1 inputs {'arm': 'r', 'spectrograph': 1, 'ccd': 1, 'filter': None, 'calibTime': '2021-06-04T13:41:15.315000320', 'visit0': 59870, 'calib
Date': '2021-06-04'} on tiger2-sumire.princeton.edu:245429       
IndexError on tiger2-sumire.princeton.edu:245429 in reduce: map::at                                                                                                   
Traceback (most recent call last):                                                 
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/ctrl_pool/18.1.0/python/lsst/ctrl/pool/pool.py", line 113, in wrapper
    return func(*args, **kwargs)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/ctrl_pool/18.1.0/python/lsst/ctrl/pool/pool.py", line 240, in wrapper
    return func(*args, **kwargs)                                                   
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/ctrl_pool/18.1.0/python/lsst/ctrl/pool/pool.py", line 716, in reduce
    *args, **kwargs)
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/ctrl_pool/18.1.0/python/lsst/ctrl/pool/pool.py", line 573, in _reduceQueue
    resultList = [func(self._getCache(context, i), data, *args, **kwargs) for i, data in queue]
  File "/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/ctrl_pool/18.1.0/python/lsst/ctrl/pool/pool.py", line 573, in <listcomp>
    resultList = [func(self._getCache(context, i), data, *args, **kwargs) for i, data in queue]
  File "/home/afur/drp_stella/python/pfs/drp/stella/constructFiberProfilesTask.py", line 147, in combine
    traces = self.centroidTraces.run(exposure, detMap, pfsConfig)
  File "/home/afur/drp_stella/python/pfs/drp/stella/centroidTraces.py", line 59, in run
    traces = self.findTracePeaks(convolved, detectorMap, pfsConfig)
  File "/home/afur/drp_stella/python/pfs/drp/stella/centroidTraces.py", line 113, in findTracePeaks
    badBitMask, fiberId)
IndexError: map::at
fiberProfiles FATAL: Failed: map::at

I'm using drp_stella master on top of w.2021.24.
Here is the command history :

constructPfsBias.py /tigress/HSC/PFS/Subaru --calib /tigress/HSC/PFS/Subaru/CALIB-alefur/ --rerun alefur/pipe2d-794 --id visit=55386..55400 --batch-type=none --clobber-versions

mkdir CALIB-alefur-dcb21

ingestPfsCalibs.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --validity 1000 --mode=copy rerun/alefur/pipe2d-794/BIAS/pfsBias-2021-05-24-055386-* 

constructPfsDark.py /tigress/HSC/PFS/Subaru --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --rerun alefur/pipe2d-794-dcb21 --id visit=55401..55415 --batch-type=none

ingestPfsCalibs.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --validity 1000 --mode=copy rerun/alefur/pipe2d-794-dcb21/DARK/pfsDark-2021-05-24-055401-* 

ingestPfsCalibs.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --validity 1000 --mode=copy $DRP_PFS_DATA_DIR/detectorMap/detectorMap-sim-*.fits 

bootstrapDetectorMap.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --rerun alefur/pipe2d-794-dcb21/ --flatId visit=59870 arm=r --arcId visit=59871 arm=r 

ingestPfsCalibs.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --validity 1000 --mode=copy rerun/alefur/pipe2d-794-dcb21/DETECTORMAP/pfsDetectorMap-059871-r1.fits 

ingestPfsCalibs.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --validity 1000 --mode=copy rerun/alefur/pipe2d-794/FLAT/pfsFlat-2020-09-11-025395-r1.fits 

constructFiberProfiles.py /tigress/HSC/PFS/Subaru/ --calib /tigress/HSC/PFS/Subaru/CALIB-alefur-dcb21/ --rerun alefur/pipe2d-794-dcb21/ --id visit=59870 arm=r --batch-type=none


 Comments   
Comment by price [ 18/Jun/21 ]

This was another fiber selection problem.

After fixing that, there is another error because the flat was made with a different set of fibers, so most of the lit fibers in the image under consideration are masked. Turning off the flat-fielding allows the command to succeed. However, the pfsConfig claims there are 21 fibers but I can only see 20. Drawing the fiber traces on the image with displayDetectorMap.py shows two fibers that aren’t in the pfsConfig, and one that is but shouldn’t be.

Comment by hassan [ 18/Jun/21 ]

Changes in the pull request (which involve using the detectorMap to decide which fibers should be selected) look fine to me.

Comment by price [ 18/Jun/21 ]

Merged.

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