Skip to content

Conversation

@G-Sommani
Copy link
Contributor

@G-Sommani G-Sommani commented Dec 4, 2025

The switch to a probability map is applied (with an eventual Gaussian smoothing) to the equatorial_map. This is subsequently applied to grid_value (the actual multiorder map) through an interpolation. Both the Gaussian smoothing and the interpolation can slightly change the position of the best-fit direction. Previously, the best-fit direction was taken from grid_value before the Gaussian smoothing and the interpolation. This created mismatches between the best-fit direction in the header and the actual best-fit direction in the multiorder map. The pull request aims to fix this by taking the best-fit direction after the application of smoothing and interpolation.

Sort grid values and corresponding arrays in descending order after application of Gaussian smoothing and interpolation from the equatorial map.
Change min function to nanmin to handle NaN values.
Copy link
Contributor

@azegarelli azegarelli left a comment

Choose a reason for hiding this comment

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

I have checked these changes on a few events that were presenting the problem before, and now there aren't mistmaches anymore between the pixel with the highest probability value and the best-fit directions returned by skyreader and then saved in the file's header.
I approve these changes

@G-Sommani G-Sommani changed the title Fix pixel ordering and selection of best-fit direction [minor] Fix pixel ordering and selection of best-fit direction Dec 4, 2025
Copy link
Member

@ric-evans ric-evans left a comment

Choose a reason for hiding this comment

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

This is outside my realm of expertise, but it looks like you already have two ✔️s, so it must be good 😄

@G-Sommani G-Sommani merged commit 1a620a2 into main Dec 5, 2025
16 checks passed
@G-Sommani G-Sommani deleted the fix-pixel-ordering branch December 5, 2025 08:12
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.

5 participants