Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

populate_mosaic_basic overwritten in step #1598

Open
braingram opened this issue Feb 4, 2025 · 3 comments
Open

populate_mosaic_basic overwritten in step #1598

braingram opened this issue Feb 4, 2025 · 3 comments

Comments

@braingram
Copy link
Collaborator

braingram commented Feb 4, 2025

The metadata blending performed by populate_mosaic_basic:

def populate_mosaic_basic(

is later overwritten by:

The test PR #1597 adds a test that runs the resample step on 2 inputs with different metadata:

                {
                    "meta.observation.visit": 1,
                    "meta.observation.pass": 1,
                    "meta.observation.segment": 1,
                    "meta.observation.program": 1,
                    "meta.instrument.optical_element": "F158",
                    "meta.instrument.name": "WFI",
                },
                {
                    "meta.observation.visit": 2,
                    "meta.observation.pass": 2,
                    "meta.observation.segment": 2,
                    "meta.observation.program": 2,
                    "meta.instrument.optical_element": "F062",
                    "meta.instrument.name": "WFI",
                },
            ),

The mosaic model contains:

            {
                "visit": 1,
                "pass": 1,
                "segment": 1,
                "optical_element": "F158",
                "instrument": "WFI",
            },

This shows that the metadata assigned by populate_mosaic_basic is being overwritten since it would set:

  • visit: -1
  • pass: -1
  • segment: -1
@schlafly
Copy link
Collaborator

schlafly commented Feb 7, 2025

Thanks. Looking at the code here---the update_exposure_times bit is redundant but at least the calculations look the same. Meanwhile l2_into_l3_meta "contributes" only coordinates and so should probably get deleted with the "coordinates" contribution folded into populate_mosaic_basic; the other bits it does are inferior to what's happening in populate_mosaic_basic.

Anyway, I agree that overwriting without the blending is wrong and the redundant calculations are problematic---just making sure we agree on the scope of the bug here. Thanks!

@nden
Copy link
Collaborator

nden commented Feb 9, 2025

@stscijgbot-rstdms

@stscijgbot-rstdms
Copy link
Collaborator

This issue is tracked on JIRA as RCAL-1006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants