Uploaded image for project: 'DRP 2-D Pipeline'
  1. DRP 2-D Pipeline
  2. PIPE2D-1078

Improve error message from PfsDesign.selectFIber

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done (View Workflow)
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Please improve the error message when a request fiberId is not present

      File ~/PFS/datamodel/python/pfs/datamodel/pfsConfig.py:820, in PfsDesign.selectFiber(self, fiberId)
          803 """Select fiber(s) by fiber identifier
          804 
          805 Returns the indices for the provided fiber identifiers.
         (...)
          817     Indices for fibers.
          818 """
          819 result = np.nonzero(np.isin(self.fiberId, fiberId))[0]
      --> 820 return result.item() if np.isscalar(fiberId) else result
      
      ValueError: can only convert an array of size 1 to a Python scalar 

        Attachments

          Activity

            People

            • Assignee:
              price price
              Reporter:
              rhl rhl
              Reviewers:
              hassan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: