Fix glows l1b and l2 spin axis variables#3207
Merged
Conversation
… longitude range in [0, 360) Fix glows L2 to use circmean and circstd when computing statistics on longitude so that wrapping is handled correctly
tech3371
approved these changes
May 15, 2026
Contributor
tech3371
left a comment
There was a problem hiding this comment.
one minor question. otherwise, code changes looks good to me! Thank you for helping with this one!
| lon_mean = circmean(spin_axis_all_times[..., 1], low=-np.pi, high=np.pi) | ||
| lon_std = circstd(spin_axis_all_times[..., 1], low=-np.pi, high=np.pi) | ||
| # Convert to radians for use with circular statistics methods | ||
| spin_axis_all_times = np.radians(spin_axis_all_times) |
Contributor
There was a problem hiding this comment.
is converting to radian ok for other two variables that haven't changed in this work? Eg. lat_mean and lat_std
Contributor
Author
There was a problem hiding this comment.
Yes. Just below on lines 972-973, both latitude and longitude get converted back to degrees. The scipy.circmean and scipy.circstd functions require that the inputs be in radians.
3a7f318
into
IMAP-Science-Operations-Center:dev
14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two issues identified by GLOWS:
Closes: #3204