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

Initial delivery of NEMISIS level 1 processing software #26

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kbromund
Copy link

HERMES/NEMISIS Level 1 processing software and sample Level 0 data.
pytest will successfully process Level 0 to Level 1.
This branch was named ccsdspy to distinguish it from an earlier version that did not use ccsdspy.

kbromund added 5 commits June 7, 2024 15:53
* Raises a ValueError if a zero-length file is encountered, rather than an obsure CCSDSpy error about the 6 byte header length.
* Calculates checksums using ccsdspy.utils.split_packet_bytes to retrieve the packet bytes.
* Z-version of output file is taken from the version of the Level 0 input file.
* calculates the packet time for initial packets with special operations status: RELAY_STATE == 0  OR  START_FLAG == 1  OR  XSUM == 0.  If the file concludes with this type of packet, then it gets tossed.
* pre-allocates data arrays, rather than concatenating sample by sample…
* decodes the RT clock, including Binary Coded Decimal conversion, and converting a GPS time for storage.
* stores all packet status data (packet id, acqisition position number, etc.) in the CDF.
Created a ‘sampflags’ parameter to flag individual 10 sample/second samples, such as the first data point in a start-up packet, or all data points in the packet when the checksum is bad.
Added MET_SECONDS, SCTF_SECONDS and SCTF_SUBSECONDS quantities to the Level 1 output.
Corrected the data type for PKT_ID and ACQ_POS_NUM in the Level 1 CDF.
hermes_nemisis/calibration/calibration.py Show resolved Hide resolved
file_metadata["time"],
"l1",
f'1.0.{file_metadata["version"]}',
cdf_version = f'1.0.{int(file_metadata["version"])}'
Copy link
Member

Choose a reason for hiding this comment

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

I believe all the files should already contain an X.Y.Z version. I know the test file in this PR does not match this, but will the files we receive from the MOC have the same versioning scheme @dbarrous @ehsteve ?

)
log.info(f"Finished Creating HermesData structure")

cdf_file_path = nemisis_data.save(output_path=hermes_nemisis._data_directory, overwrite=True)
Copy link
Member

Choose a reason for hiding this comment

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

@dbarrous is this the correct directory to save to the S3 buckets?

hermes_nemisis/calibration/readbin_CCSDS.py Outdated Show resolved Hide resolved
hermes_nemisis/tests/test_calibration.py Outdated Show resolved Hide resolved
…re used to calculate and record the checksum. Added comments to describe the Z-version convention for the Level 1 output filename.

readbin_CCSDS.py: file deleted because it is obsolte.
test_calibration.py:
 * removed test code associated with the obsolete readbin_CCSDS.py.
 * added more comments regarding the useful, but large, test file that is not included in the repository
@kbromund
Copy link
Author

kbromund commented Sep 3, 2024 via email

@Alrobbertz
Copy link
Member

Hi @kbromund, thank you for addressing many of the comments here. It does not look like the changes you mentioned were successfully pushed to this branch. Could you try to make sure the changes are committed and pushed up? If you'd like help or a second set of eyes, please send me an email or a message on slack and I'd be happy to take a look.

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.

2 participants