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

Support per-mapper default filter name

    Details

    • Type: Story
    • Status: Invalid
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0.25
    • Sprint:
      Science Pipelines DM-W16-6, DRP W16-7
    • Team:
      Data Release Production

      Description

      A CameraMapper subclass should be able to specify a default filter name to be used when the filter is not found in self.filters. This will allow processing images with filter names that have not been previously anticipated, as might be desired for onsite analysis.

      This is a port of work performed on HSC-987.

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            The patch from HSC is simple and applies directly.

            However... I end up confused by the intention of the whole "filter translation table" concept. Since the filters already have aliases, I am not sure why we pass the filter names through the self.filters dictionary in the CameraMapper to transform the names rather than simply relying on the aliases.

            For example, one could imagine replacing the business logic in CameraMapper._setFilter() with something like:

            filterName = mapping.need(['filter'], dataId)['filter']
            try:
                filter = afwImage.Filter(filterName)
            except pexExcept.NotFoundError:
                filter = afwImage.Filter(self.defaultFilterName)
            item.setFilter(filter)
            

            Paul Price – it looks as though the translation table was added by you back in 2011, but I'm not entirely sure I understand the logic (despite reading your commit message). Does this effectively boil down to specifying a per-camera subset of applicable filters, rather than assuming that all of those known to afw would be applicable?

            Show
            swinbank John Swinbank added a comment - The patch from HSC is simple and applies directly. However... I end up confused by the intention of the whole "filter translation table" concept. Since the filters already have aliases, I am not sure why we pass the filter names through the self.filters dictionary in the CameraMapper to transform the names rather than simply relying on the aliases. For example, one could imagine replacing the business logic in CameraMapper._setFilter() with something like: filterName = mapping.need([ 'filter' ], dataId)[ 'filter' ] try : filter = afwImage. Filter (filterName) except pexExcept.NotFoundError: filter = afwImage. Filter ( self .defaultFilterName) item.setFilter( filter ) Paul Price – it looks as though the translation table was added by you back in 2011, but I'm not entirely sure I understand the logic (despite reading your commit message). Does this effectively boil down to specifying a per-camera subset of applicable filters, rather than assuming that all of those known to afw would be applicable?
            Hide
            price Paul Price added a comment -

            Probably. I think including the filters in the mappers predates me.

            Show
            price Paul Price added a comment - Probably. I think including the filters in the mappers predates me.
            Hide
            price Paul Price added a comment -

            I think this is included in DM-5283 and DM-5289.

            Show
            price Paul Price added a comment - I think this is included in DM-5283 and DM-5289 .
            Hide
            price Paul Price added a comment -

            Closing as duplicate.

            Show
            price Paul Price added a comment - Closing as duplicate.

              People

              • Assignee:
                swinbank John Swinbank
                Reporter:
                swinbank John Swinbank
                Watchers:
                John Swinbank, Paul Price
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel