Skip to content

A rotated NaN is still a NaN#2901

Merged
maxinelasp merged 2 commits intoIMAP-Science-Operations-Center:devfrom
alastairtree:fix/rotating-fill_vals-is-always-a-fill_val
Apr 1, 2026
Merged

A rotated NaN is still a NaN#2901
maxinelasp merged 2 commits intoIMAP-Science-Operations-Center:devfrom
alastairtree:fix/rotating-fill_vals-is-always-a-fill_val

Conversation

@alastairtree
Copy link
Copy Markdown
Contributor

Fix rotations outside of spice so they maintain FILL_VAL during rotation.
Before this we were introducing nearly but not quite NaN/FILL_VAL meaning very bad field data.

After this is merged and released please can the SDC regenerate new versions of all MAG L2 BURST science (not normal - as it has no NaNs).

Testing

Added failing unit test to repro the issue. We see this when publishing L2 science data.

Fix rotations outside of spice so they maintan FILL_VAL during rotation
Before this we were introducing nearly but not quite NaN/FILL_VAL meaning very bad field data.
@alastairtree
Copy link
Copy Markdown
Contributor Author

@maxinelasp please can you also review and release this ASAP please? And then regen all L2 BM. This issue means all our L2 BM science has very dodgy values like -0.999999999999e30 and not the proper FILL_VAL. I am away for a few days so please push this forward in my absence if possible. Thank you.

Copy link
Copy Markdown
Contributor

@maxinelasp maxinelasp left a comment

Choose a reason for hiding this comment

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

Great catch! I'll get this released ASAP and re-process.

@maxinelasp maxinelasp merged commit cdfd0ae into IMAP-Science-Operations-Center:dev Apr 1, 2026
14 checks passed
constants.FILLVAL,
result,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, no! This is MAG specific code in the common geometry function. If the input is a NaN, this function already behaves as expected. If the input is a MAG specific FILLVAL, then that case should be handled explicitly in the MAG code, not the general geometry module. @maxinelasp please revert this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shoot, good catch Tim! I assumed this was in the rotate frames function in the mag code and totally missed the file. Sorry! I will revert and put up a proper fix.

maxinelasp added a commit to maxinelasp/imap_processing that referenced this pull request Apr 1, 2026
maxinelasp added a commit that referenced this pull request Apr 1, 2026
maxinelasp added a commit that referenced this pull request Apr 2, 2026
* Revert "A rotated NaN is still a NaN (#2901)"

This reverts commit cdfd0ae.

* Apply fix to propogate FILLVALs out from SPICE rotations
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.

3 participants