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

SpectrumSet.makeImage assumes that SpectrumSet and FiberTraceSet are aligned

    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
    • Story Points:
      1
    • Sprint:
      2DDRP-2021 A 4

      Description

      There's a bug in the book-keeping in SpectrumSet.makeImage:

      assert len(self) == len(self), "Number of spectra and fiberTraces don't match" 

      (self appears twice) which means that the code accepts being passed a set of fiberTraces that doesn't match the spectra; this happens when there are broken fibres (think SuNSS); (PIPE2D-819).

      Furthermore, the code assumes that the order of fibres in SpectrumSet and FiberTraceSet are the same; is that guaranteed? It might be safer to switch to

      fiberIds = list(self.getAllFiberIds())
      for ft in fiberTraces:
          spec = self[fiberIds.index(ft.fiberId)]
          fiberImage = ft.constructImage(spec)
          image[fiberImage.getBBox(), afwImage.PARENT] += fiberImage
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: