-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor hit_l1a.py to use packet_file_to_datasets function (#828)
* WIP - updating file to use packet_to_datasets function in utils * Add main for quick testing to view input data * Replace packet definition files with updated file covering all HIT apids * Finalize housekeeping l1a updates and set up start for science data -Add function to handle concatenating leak_i variables. -Drop variables from housekeeping dataset that aren't needed for the CDF product. -Update dimensions and add attributes to the housekeeping Dataset. -Delete create_datasets function since packet_file_to_datasets. creates xarray datasets and those just need to be updated. This will happen in housekeeping and science data processing functions. -Add function to process science data (WIP). -Clean up code and add/update docstrings and comments. * Minor updates to docstring and comment * Update unit tests for refactored hit_l1a.py. hit_l1a.py was refactored to use the packet_file_to_datasets function. The unit tests were updated to reflect changes. -Added new fixtures for attributes manager, datasets dict, and housekeeping dataset. -Added new tests for new functions (concatenating leak_i data and processing housekeeping). -Added additional assertions for housekeeping dataset. * Remove main from hit_l1a.py * Delete test for housekeeping data class. Need to delete the data classes, but only after hit_l1b is refactored not to use it * Address PR comments/suggestions * Assign attrs and dims directly to data arrays rather than re-create the data arrays * Add adc_channels as a parameter to the function that concatenates the leak_i variables to assign as a dimension. Also change dims to a dict from a list since assign_coords takes in a dictionary * Update test for concatenating leak_i variables to take in new parameter. Also add assertion to check values are correct * Add attributes to epoch variable in dataset. Update test data file name
- Loading branch information
1 parent
6750acf
commit ba5ad0b
Showing
6 changed files
with
362 additions
and
668 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.