Skip to content

SWE L1B implementation and updates to L1A#253

Merged
tech3371 merged 21 commits into
IMAP-Science-Operations-Center:devfrom
tech3371:swe_l1b
Nov 17, 2023
Merged

SWE L1B implementation and updates to L1A#253
tech3371 merged 21 commits into
IMAP-Science-Operations-Center:devfrom
tech3371:swe_l1b

Conversation

@tech3371
Copy link
Copy Markdown
Contributor

@tech3371 tech3371 commented Oct 11, 2023

Change Summary

Implements SWE L1B algorithm and updates L1A

Overview

These are the changes in this PR
- added logics to populate data based on ESA lookup table number
- refactored code to store l1a data as 180x7 instead of 15x12x7 array.
- added new event test data and moved tests data into folders.
- updated l1a code to be ISTP compliant and to be able to create cdf file
- added new test data and update test as needed
- implemented SWE l1b algorithm for both science and other data types
- creates cdf file for SWE l1b data product
- added deadtime correction and place holder for in-flight calibration. converted counts to rates
- added rest of l1b algorithm to convert raw data to engineering unit.

New Files

  • imap_processing/swe/l1b/
    • Added code files to process data to l1b
  • imap_processing/swe/tests/
    • Added new tests for l1b and new l1a test data

Deleted Files

  • deleted file 1
    • explanation for why file was deleted

Updated Files

  • imap_processing/swe/l1a/
    • updated l1a code to be able to create CDF file

Testing

  • imap_processing/swe/tests/
    • Added new tests for l1b and new l1a and l1b test data

@tech3371 tech3371 requested review from a team, GFMoraga, bourque, bryan-harter, greglucas, laspsandoval, maxinelasp and sdhoyt and removed request for a team October 11, 2023 00:01
@tech3371 tech3371 added this to the L1B Complete milestone Oct 11, 2023
Comment thread imap_processing/swe/l1a/swe_l1a.py Outdated
Comment thread imap_processing/swe/l1a/swe_l1a.py
Comment thread imap_processing/swe/l1a/swe_l1a.py Outdated
Comment thread imap_processing/swe/l1a/swe_l1a.py Outdated
Comment thread imap_processing/swe/l1a/swe_science.py
Comment thread imap_processing/swe/tests/test_swe_l1a.py Outdated
Comment thread imap_processing/swe/tests/test_swe_l1a_event_msg.py
Comment thread imap_processing/swe/tests/test_swe_l1a_science.py
Comment thread imap_processing/swe/tests/test_swe_l1b.py
Comment thread imap_processing/swe/tests/test_swe_l1b_science.py Outdated
@tech3371
Copy link
Copy Markdown
Contributor Author

tech3371 commented Nov 2, 2023

pre-commit.ci autofix

@tech3371 tech3371 changed the title [DRAFT ] Swe l1b SWE L1B implementation and updates to L1A Nov 2, 2023
@tech3371 tech3371 marked this pull request as ready for review November 2, 2023 20:08
@tech3371 tech3371 requested review from a team, bourque, bryan-harter and sdhoyt and removed request for a team November 2, 2023 20:11
Copy link
Copy Markdown
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.

Don't be afraid of Path objects :) There is a lot of f"{imap_processing}/path/to/file" that could be imap_processing / "path/to/file" so you stay in the pathlib classes.

The dataset copy / indexing is something worth looking into IMO. I think we should try to return a new view into the subset dataset instead of overwriting the current one if possible.

Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/l1b/swe_l1b_science.py Outdated
Comment thread imap_processing/swe/tests/l1a_test_data/imap_swe_l1a_20230927_lveng_hk_v01.cdf Outdated
Comment thread imap_processing/swe/tests/test_swe_l1a.py
Comment thread imap_processing/swe/tests/test_swe_l1a.py Outdated
Comment thread imap_processing/utils.py Outdated
tech3371 and others added 19 commits November 17, 2023 10:31
…it hooks. Will remove it once I refactor in upcoming PRs.
- added logics to populate data based on ESA lookup table number
- refactored code to store l1a data as 180x7 instead of 15x12x7 array.
- added new event test data and moved tests data into folders.
- updated l1a code to be ISTP compliant and to be able to create cdf file
- added new test data and update test as needed
- implemented SWE l1b algorithm for both science and other data types
- creates cdf file for SWE l1b data product
- added deadtime correction and place holder for in-flight calibration. converted counts to rates
- added rest of l1b algorithm to convert raw data to engineering unit.
… to import that and other updates as needed. WIP: need to fix more error from this change. Will get back to it
- renamed to decompressed. fixed comments
- convert everything to Path where possible
- update rates functions
- refactor code to use tmp_path to store test data
Copy link
Copy Markdown
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.

Because you added and removed files, please squash-merge when merging this in.

@tech3371 tech3371 merged commit fea70ab into IMAP-Science-Operations-Center:dev Nov 17, 2023
@tech3371 tech3371 linked an issue Dec 7, 2023 that may be closed by this pull request
5 tasks
laspsandoval pushed a commit to laspsandoval/imap_processing that referenced this pull request Apr 2, 2024
…nter#253)

SWE L1B implementation and updates to L1A:
- Added project wide utils function and swe specific utils
- added logics to populate data based on ESA lookup table number
- refactored code to store l1a data as 180x7 instead of 15x12x7 array.
- added new event test data and moved tests data into folders.
- updated l1a code to be ISTP compliant and to be able to create cdf file
- added new test and update test as needed
- implemented SWE l1b algorithm for both science and other data types
- creates cdf file for SWE l1b data product
- added deadtime correction and place holder for in-flight calibration. converted counts to rates
- added rest of l1b algorithm to convert raw data to engineering unit.
- updated function that write data to cdf to be more generic
- changed cdf attrs to use new CDF dataclasses
- change energy unit to be unitless for now.
@tech3371 tech3371 deleted the swe_l1b branch July 25, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[L5] Produce L1B CDF formatted data product for SWE Create L1A CDF file for SWE [L5] Produce L1A CDF formatted data product for SWE

5 participants