[INSTRM-1249] calling "cobraIdForModulePlusCobra" method fails Created: 21/Apr/21  Updated: 29/Apr/21

Status: Open
Project: Instrument control development
Component/s: pfs_utils
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: yuki.moritani Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1258 Update the fiberids.py accessor for t... Done

 Description   

When I updated grandfibermap for INSRTM-1195, "cobraIdForModulePlusCobra" couldn't be called.

For example this is a report from Hassan:

>>> from pfs.utils.fiberids import FiberIds
>>> fdb = FiberIds()
>>> fdb.cobraIdForModulePlusCobra(2, 2)
/tigress/hassans/software/pfs_utils/python/pfs/utils/fiberids.py:170: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  w = (self.boardId == boardName) & (self.cobraInModuleId == cobraInModule)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tigress/hassans/software/pfs_utils/python/pfs/utils/fiberids.py", line 171, in cobraIdForModulePlusCobra
    return self.cobraId[w][0]
IndexError: index 0 is out of bounds for axis 0 with size 0

Generated at Sat Feb 10 16:33:25 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.