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

Simplify Transform to contain a Mapping instead of a FrameSet

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw

      Description

      At present afw::geom::Transform<FromEndpoint, ToEndpoint> contains an ast::FrameSet, although all it does is transform points, which is what ast::Mapping is for. As DM-13847 demonstrated, using a FrameSet slows down Transform. The workaround in that ticket was to hold onto both a FrameSet and a Mapping. This ticket is to intended implement a more logical but slightly more invasive solution.

      I will file an RFC with more explanation.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            A Jenkins run failed on the demo with tiny changes in computed results of lsst_dm_stack_demo. The difference is caused by simplifying the cached mapping (as I demonstrated by disabling the simplification for a test run). Since the difference is so small and simplification should speed up the code I am opting to simplify the mapping and thus change the expected values in lsst_dm_stack_demo.

            Processing completed successfully. The results are in detected-sources_small.txt.
            Columns in benchmark datafile:
            1:id 2:coord_ra 3:coord_dec 4:flags_negative 5:base_SdssCentroid_flag 6:base_PixelFlags_flag_edge 7:base_PixelFlags_flag_interpolated 8:base_PixelFlags_flag_interpolatedCenter 9:base_PixelFlags_flag_saturated 10:base_PixelFlags_flag_saturatedCenter 11:base_SdssCentroid_x 12:base_SdssCentroid_y 13:base_SdssCentroid_xSigma 14:base_SdssCentroid_ySigma 15:base_SdssShape_xx 16:base_SdssShape_xy 17:base_SdssShape_yy 18:base_SdssShape_xxSigma 19:base_SdssShape_xySigma 20:base_SdssShape_yySigma 21:base_SdssShape_flag 22:base_GaussianFlux_flux 23:base_GaussianFlux_fluxSigma 24:base_PsfFlux_flux 25:base_PsfFlux_fluxSigma 26:base_CircularApertureFlux_6_0_flux 27:base_CircularApertureFlux_6_0_fluxSigma 28:base_ClassificationExtendedness_value 
            ./bin/compare detected-sources_small.txt
            Failed (absolute difference 1.99998e-16, relative difference 7.57917e-12 over tolerance 0) in column coord_dec.
            Failed (absolute difference 1.00007e-14, relative difference 1.31233e-12 over tolerance 0) in column coord_dec.
            Failed (absolute difference 2.00005e-14, relative difference 2.87352e-12 over tolerance 0) in column coord_dec.
            Failed (absolute difference 1.00001e-15, relative difference 2.604e-12 over tolerance 0) in column coord_dec.
            Failed (absolute difference 1.00003e-13, relative difference 2.50185e-12 over tolerance 0) in column coord_dec.
            

            Show
            rowen Russell Owen added a comment - - edited A Jenkins run failed on the demo with tiny changes in computed results of lsst_dm_stack_demo . The difference is caused by simplifying the cached mapping (as I demonstrated by disabling the simplification for a test run). Since the difference is so small and simplification should speed up the code I am opting to simplify the mapping and thus change the expected values in lsst_dm_stack_demo . Processing completed successfully. The results are in detected-sources_small.txt. Columns in benchmark datafile: 1:id 2:coord_ra 3:coord_dec 4:flags_negative 5:base_SdssCentroid_flag 6:base_PixelFlags_flag_edge 7:base_PixelFlags_flag_interpolated 8:base_PixelFlags_flag_interpolatedCenter 9:base_PixelFlags_flag_saturated 10:base_PixelFlags_flag_saturatedCenter 11:base_SdssCentroid_x 12:base_SdssCentroid_y 13:base_SdssCentroid_xSigma 14:base_SdssCentroid_ySigma 15:base_SdssShape_xx 16:base_SdssShape_xy 17:base_SdssShape_yy 18:base_SdssShape_xxSigma 19:base_SdssShape_xySigma 20:base_SdssShape_yySigma 21:base_SdssShape_flag 22:base_GaussianFlux_flux 23:base_GaussianFlux_fluxSigma 24:base_PsfFlux_flux 25:base_PsfFlux_fluxSigma 26:base_CircularApertureFlux_6_0_flux 27:base_CircularApertureFlux_6_0_fluxSigma 28:base_ClassificationExtendedness_value ./bin/compare detected-sources_small.txt Failed (absolute difference 1.99998e-16, relative difference 7.57917e-12 over tolerance 0) in column coord_dec. Failed (absolute difference 1.00007e-14, relative difference 1.31233e-12 over tolerance 0) in column coord_dec. Failed (absolute difference 2.00005e-14, relative difference 2.87352e-12 over tolerance 0) in column coord_dec. Failed (absolute difference 1.00001e-15, relative difference 2.604e-12 over tolerance 0) in column coord_dec. Failed (absolute difference 1.00003e-13, relative difference 2.50185e-12 over tolerance 0) in column coord_dec.
            Hide
            rowen Russell Owen added a comment - - edited

            The afw changes are straightforward:

            • Change Transform to only hold an afw::Mapping
            • Add a new cached afw::FrameDict to SkyWcs

            The only other package that needed any changes (aside from lsst_dm_stack_demo) was jointcal, which was calling Transform.getFrameSet in one place. I could have modified the code to call Transform.getMapping but decided to use a slightly different (and equally simple) approach that does not rely on knowing anything about the internals of Transform.

            Show
            rowen Russell Owen added a comment - - edited The afw changes are straightforward: Change Transform to only hold an afw::Mapping Add a new cached afw::FrameDict to SkyWcs The only other package that needed any changes (aside from lsst_dm_stack_demo ) was jointcal, which was calling Transform.getFrameSet in one place. I could have modified the code to call Transform.getMapping but decided to use a slightly different (and equally simple) approach that does not rely on knowing anything about the internals of Transform .
            Hide
            Parejkoj John Parejko added a comment -

            See comments on PR. afw changes are straightforward, there's one question about they "why" of the change to jointcal, and the stack demo commits should say why the values changed.

            Show
            Parejkoj John Parejko added a comment - See comments on PR. afw changes are straightforward, there's one question about they "why" of the change to jointcal, and the stack demo commits should say why the values changed.
            Hide
            rowen Russell Owen added a comment -

            I made the requested changes and am waiting for Jenkins to pass before merging.

            Show
            rowen Russell Owen added a comment - I made the requested changes and am waiting for Jenkins to pass before merging.

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              John Parejko
              Watchers:
              John Parejko, Paul Price, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.