Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-1771

Function FiberIds.xyForCobras() assumes 0-indexed fiberIds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Normal
    • Resolution: Unresolved
    • Component/s: pfs_utils
    • Labels:
      None
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              hassan hassan
              Reporter:
              hassan hassan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: