-
Type:
Task
-
Status: Open (View Workflow)
-
Priority:
Normal
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:2
As expected following PIPE2D-819, when reading in an example SuNSS fiberProfileSet instance, the number of fibers returned is expected to be 254, so the number of good fibers (251) plus the 3 known bad fibers.
However only 251 fibers are returned in this particular case:
In [1]: import lsst.daf.persistence as dafPersist ...: dataDir='/projects/HSC/PFS/Subaru' ...: calibRoot='/projects/HSC/PFS/Subaru/CALIB-SuNSS-2021-06-16' ...: butler = dafPersist.Butler(dataDir, calibRoot=calibRoot) ...: dataId = dict(visit=46229, arm="r", spectrograph=1) ...: fiberProfiles = butler.get("fiberProfiles", dataId) ...: len(fiberProfiles.fiberId) CameraMapper INFO: Loading exposure registry from /projects/HSC/PFS/Subaru/registry.sqlite3 CameraMapper INFO: Loading calib registry from /projects/HSC/PFS/Subaru/CALIB-SuNSS-2021-06-16/calibRegistry.sqlite3 Out[1]: 251
Moreover, the indexing is such that one has to specify the fiberId, not the element position:
In [6]: fiberProfiles[0]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-6-53f0baa2a284> in <module>
----> 1 fiberProfiles[0]
/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2021.34/python/pfs/drp/stella/fiberProfileSet.py in __getitem__(self, fiberId)
79
80 def __getitem__(self, fiberId):
---> 81 return self.fiberProfiles[fiberId]
82
83 def __setitem__(self, fiberId, fiberProfile):
KeyError: 0
In [7]: fiberProfiles[3]
Out[7]: <pfs.drp.stella.fiberProfile.FiberProfile at 0x2b8346e68fd0>
It would be useful, and consistent, to have the NumPy-style indexing on a boolean condition (as implemented for pfsConfig in PIPE2D-770), such that:
fiberProfiles[fiberProfiles.fiberId==3]
returns the FiberProfile corresponding to fiberId 3.
- relates to
-
PIPE2D-770 Support sub-selection of pfsConfig
-
- Done
-
-
PIPE2D-819 fiberProfiles should contain an entry for every fibre in pfsConfig for that spectrograph
-
- Done
-