-
Notifications
You must be signed in to change notification settings - Fork 22
Feat/update mag frame #2497
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
base: dev
Are you sure you want to change the base?
Feat/update mag frame #2497
Conversation
…adjust for MAGO and MAGI having the same spice frame
… and MAGI might share a spice frame
alastairtree
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very tidy to me!
| GSM = SpiceFrame.IMAP_GSM | ||
| RTN = SpiceFrame.IMAP_RTN | ||
| MAGO = ("MAGO", SpiceFrame.IMAP_MAG_BASE, "vector_attrs", "vectors") | ||
| MAGI = ("MAGi", SpiceFrame.IMAP_MAG_BASE, "vector_attrs", "vectors") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If both sensors are in the same spice frame IMAP_MAG_BASE what are the consequences? I had assumed we needed both to be different to be able to handle the the slightly different positions of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need to transform them differently - but we already do so by providing separate calibration matrices which are used for L2 and L1D. We create those calibration matrices by using the magnetic field data to work out how non-aligned with the spacecraft reference frame the sensors are. So either we use an idealised transform here, or we would have to create a calibration matrix to align it, and then un-twist it by this spice transform before we provide it as ancillary data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on our chat we have agreed
- Fix the lowercase MAGi=>MAGI
- Add comment explain why BASE frame is used for L2/L1D only
- Add frames for the unused, but still valid, SPICE magi/o frames and call them "ground calibration"
maxinelasp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nice improvement. I think we should hold back on merging this until I'm able to investigate L3 MAG usage, but I can deploy this to dev now for further testing. I poked around more and it doesn't look like anywhere in the MAG codebase assumes that the main variable is named "vectors".
| time_data["secondary_epoch"], | ||
| magi_out, | ||
| SpiceFrame.IMAP_MAG_I, | ||
| SpiceFrame.IMAP_MAG_BASE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to point this to ValidFrames.IMAP_MAGI so it can benefit from that abstraction layer if ValidFrames gets updated again.
| DSRF = ("DSRF", SpiceFrame.IMAP_DPS, "vector_attrs_dsrf", "b_dsrf") | ||
| SRF = ("SRF", SpiceFrame.IMAP_SPACECRAFT, "vector_attrs_srf", "b_srf") | ||
| GSE = ("GSE", SpiceFrame.IMAP_GSE, "vector_attrs_gse", "b_gse") | ||
| GSM = ("GSM", SpiceFrame.IMAP_GSM, "vector_attrs_gsm", "b_gsm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few people who are using MAG data as inputs - we will need to reach out to them if we change variable names here to make sure they can access the correct variable. (Or open a PR against L3 code, I can take a look at this.)
The current users of MAG are:
CoDICE L3b
HIT L3
SWE L3
That's not too many, so I think it's fine to change the names - just something we should consider and check.
Change Summary
Overview
Updated Files
Testing
spice_frame