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

Correct sky_pos and local_wcs in photon op tests #484

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

welucas2
Copy link
Collaborator

Some of the photon op tests appear not to be self-consistent: the sky_pos and local_wcs are set independently though both should actually be derived from the image's WCS and the object position within it. This wouldn't be an issue except that the incoming PR #424 implements a new XyToV which is self-consistent through use of the img_wcs alone and so breaks the regression tests here. This PR updates the tests to calculate the the sky_pos and local_wcs together from the image_pos and img_wcs.

Note this isn't an issue in the photon ops themselves, just in the test method. This also changes the expected photon position centre in the regression tests from (-564.5, -1431.4) to (-960.28, -308.09). This is borne out in the tests in PR #424 using the new XyToV implementation which preserves these results.

…cs and image_pos. This changes expected values in the regression tests.
Copy link
Contributor

@rmjarvis rmjarvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks William. This all looks right to me. Just one small suggestion.

Comment on lines 649 to 655
},
]
},
"sky_pos": create_test_img_wcs(
boresight=galsim.CelestialCoord(1.1047934165124105 * galsim.radians, -0.5261230452954583 * galsim.radians),
rottelpos=np.pi / 3 * galsim.radians
).toWorld(image_pos),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly cleaner here would be to define boresight once outside the config, and then use both "boresight": boresight above in photon_ops and use that same value here for the boresight parameter. Otherwise there are two places where a bunch of random numbers need to be visually confirmed to match up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mike, nice spot! I've made that change now.

@welucas2
Copy link
Collaborator Author

Merging as agreed at yesterday's meeting.

@welucas2 welucas2 merged commit a96345c into LSSTDESC:main Jan 17, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants