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

I-ALiRT - Test decom for HIT CCSDS #757

Merged

Conversation

laspsandoval
Copy link
Contributor

@laspsandoval laspsandoval commented Aug 19, 2024

Change Summary

Overview

Test decom for HIT CCSDS

New Files

imap_processing/ialirt/packet_definitions/ialirt_hit.xml

  • packet definitions for hit packet that is generated onboard the spacecraft

imap_processing/ialirt/l0/decom_ialirt.py

  • name change for time_keys based on new packet definitions

imap_processing/ialirt/packet_definitions/ialirt.xml

  • update to packet definitions

Testing

imap_processing/tests/ialirt/unit/test_decom_ialirt_hit.py

  • Verification that test data was properly parsed.

Test data:
hit_ialirt_sample.ccsds
hit_ialirt_sample.csv
hit_ialirt_sample_header.csv

@laspsandoval laspsandoval self-assigned this Aug 19, 2024
@laspsandoval laspsandoval linked an issue Aug 19, 2024 that may be closed by this pull request
@laspsandoval laspsandoval changed the title Test decom for HIT CCSDS I-ALiRT - Test decom for HIT CCSDS Aug 19, 2024
@laspsandoval
Copy link
Contributor Author

laspsandoval commented Aug 19, 2024

I think that the next step for this is to populate HIT test data into the I-ALiRT SC packet. That way I can use it for testing architecture. Please comment on this idea.

Copy link
Collaborator

@greglucas greglucas 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 an interesting case because we won't ever get these packets, these are only for the spacecraft.

You currently have all of your decoding logic in the tests, you should move the calculations into the actual code and then only call the functions within the test.

Can you switch over to using the packet_file_to_datasets() helper function here as well?

@greglucas
Copy link
Collaborator

I think that the next step for this is to populate HIT test data into the I-ALiRT SC packet. That way I can use it for testing architecture. Please comment on this idea.

This seems like it is a good idea, but could also be complicated because you're having to inject specific bytes into another specific bytes object. If it is easy, it is likely worth doing, but I wouldn't spend too much time on it either.

More important in my opinion is writing a generic function that can grab the proper HIT values you need.

def process_hit(xarray_dataset):
    # do something with ds["HIT_EVENT_DATA_00"], ...
    # This should be agnostic of whether you are passing in only the HIT CCSDS decoded dataset or the I-ALiRT decoded dataset.

imap_processing/ialirt/l0/decom_ialirt.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/decom_ialirt.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/ialirt/l0/process_hit.py Outdated Show resolved Hide resolved
imap_processing/tests/ialirt/unit/test_process_hit.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vmartinez-cu vmartinez-cu left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@laspsandoval laspsandoval merged commit 9b259db into IMAP-Science-Operations-Center:dev Sep 12, 2024
17 checks passed
@laspsandoval laspsandoval deleted the hit_ccsds branch September 12, 2024 17:55
@bourque bourque added this to the Sept 2024 milestone Sep 16, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

I-ALiRT: HIT CCSDS Packet Generation
5 participants