[INSTRM-1771] Function FiberIds.xyForCobras() assumes 0-indexed fiberIds Created: 28/Oct/22  Updated: 28/Oct/22

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

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

Story Points: 1

 Description   

From the docString, the pfs_utils function FiberIds.xyForCobras assumes some 0-indexed cobra identifier, but the code actually assumes fiberId (but 0-indexed, not 1-indexed as the actual fiberId identifier is):

https://github.com/Subaru-PFS/pfs_utils/blob/1edf4cb1ac8d5552daed299acc12200c75add4e8/python/pfs/utils/fiberids.py#L229-L242

Accessing the x, y coordinates for a given cobra by fiberId is IMO useful. So I propose to keep the function, but change the docString to assume a 1-indexed fiberId, and correct the implementation such that it works with a 1-indexed fiberId.


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