Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-25156

Gen 2->3 conversion of DECam repositories can give duplicate defects

    XMLWordPrintable

    Details

    • Story Points:
      2
    • Team:
      Architecture
    • Urgent?:
      No

      Description

      If I convert a DECam Gen 2 repository containing defects, the conversion succeeds, but running ProcessCcd on the result gives an error:

      lsst.pipe.base.connections.ScalarError: Found multiple datasets {instrument: DECam, calibration_label: defects/2015-01-05T01:15:00/60, detector: 60}, {instrument: DECam, calibration_label: gen2/defects_2015-01-05T01:15:00_060, detector: 60} for scalar connection defects (defects).
      

      The immediate cause is that one copy of the defects is from the Gen 2 repository, the other copy was ingested during the conversion.

      Discussion on #dm-middleware suggests that this is due to conflicting responsibilities:

      The above behavior implies that DECam repositories with defects cannot be converted using the default configs, which goes against our general aim to provide working defaults for all Tasks.

      Possible solutions:

      • Do away with ConvertRepoConfig.curatedCalibrations, as proposed by Tim Jenness. However, this does raise the question of how to handle observatory-specific curated calibrations.
      • Have DECam explicitly register defects in curatedCalibrations, as HSC does. May be hard to scale to other instruments.
      • Duplicate the dataset types hardcoded into Instrument in the default ConvertRepoConfig.curatedCalibrations. Won't benefit configs that overwrite this field instead of appending to it.

        Attachments

          Activity

          Hide
          tjenness Tim Jenness added a comment -

          Krzysztof Findeisen this should be a small review. No rush for it. I've removed the config item completely and now the converter asks Instrument for the calibrations that should be skipped.

          Show
          tjenness Tim Jenness added a comment - Krzysztof Findeisen this should be a small review. No rush for it. I've removed the config item completely and now the converter asks Instrument for the calibrations that should be skipped.
          Hide
          tjenness Tim Jenness added a comment -

          I mean that the list of curatedCalibrations in a config would no longer be needed.

          I think it makes sense for the code that uses datasetIgnorePatterns to ignore the curatedCalibrations known to the instrument automatically.

          Show
          tjenness Tim Jenness added a comment - I mean that the list of curatedCalibrations in a config would no longer be needed. I think it makes sense for the code that uses datasetIgnorePatterns to ignore the curatedCalibrations known to the instrument automatically.
          Hide
          krzys Krzysztof Findeisen added a comment -

          By "the config item", do you mean ConvertRepoConfig.curatedCalibrations, ConvertRepoConfig.datasetIgnorePatterns, or both? Removing both would cause trouble for converting some Gen 2 repositories.

          Show
          krzys Krzysztof Findeisen added a comment - By "the config item", do you mean ConvertRepoConfig.curatedCalibrations , ConvertRepoConfig.datasetIgnorePatterns , or both? Removing both would cause trouble for converting some Gen 2 repositories.
          Hide
          tjenness Tim Jenness added a comment -

          Does anyone want to object to my plan of removing the config item completely and having the Instrument class report the list of curated calibrations that it is going to write itself?

          Show
          tjenness Tim Jenness added a comment - Does anyone want to object to my plan of removing the config item completely and having the Instrument class report the list of curated calibrations that it is going to write itself?
          Hide
          tjenness Tim Jenness added a comment -

          If conversion calls writeCuratedCalibrations at all then we know exactly what datasets will be written for a given instrument. At the moment you can't tell writeCuratedCalibrations to skip certain items or restrict itself to specific calibrations. If you could do that then the config option would make more sense.

          Show
          tjenness Tim Jenness added a comment - If conversion calls writeCuratedCalibrations at all then we know exactly what datasets will be written for a given instrument. At the moment you can't tell writeCuratedCalibrations to skip certain items or restrict itself to specific calibrations. If you could do that then the config option would make more sense.

            People

            Assignee:
            tjenness Tim Jenness
            Reporter:
            krzys Krzysztof Findeisen
            Reviewers:
            Krzysztof Findeisen
            Watchers:
            Jim Bosch, John Parejko, Krzysztof Findeisen, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                CI Builds

                No builds found.