Skip to content

CoDICE: Initial L1b pipeline#1663

Merged
bourque merged 20 commits intoIMAP-Science-Operations-Center:devfrom
bourque:codice-initial-l1b-work
Apr 29, 2025
Merged

CoDICE: Initial L1b pipeline#1663
bourque merged 20 commits intoIMAP-Science-Operations-Center:devfrom
bourque:codice-initial-l1b-work

Conversation

@bourque
Copy link
Copy Markdown
Collaborator

@bourque bourque commented Apr 25, 2025

This PR sets up the initial infrastructure/framework for CoDICE L1b processing. Technically I already had an L1b pipeline in place to appease the SIT-3 test, but it didn't really do anything. These modifications get CoDICE in a better place to perform actual L1b processing.

CoDICE L1a -> L1b processing involves converting counts to rates in the various L1a data products. For now, I am simply dividing the counts by an integer to convert the data arrays to float values, but this will be expanded and implemented properly in a future PR.

Pertains to #405

@bourque bourque added Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing labels Apr 25, 2025
@bourque bourque added this to the April 2025 milestone Apr 25, 2025
@bourque bourque self-assigned this Apr 25, 2025
@bourque bourque added this to IMAP Apr 25, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR establishes the initial L1b processing pipeline for CoDICE by updating the framework to convert L1a counts to L1b float rates.

  • Updated test files to reflect new CDF file naming conventions and data paths.
  • Refactored the L1b processing function to accept file paths and derive logical source attributes.
  • Revised global CDF attribute configurations to adopt consistent naming patterns and to add the hi‑priority product.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
imap_processing/tests/codice/test_codice_l1b.py Renamed variables and test function to reflect logical source names.
imap_processing/tests/codice/conftest.py Updated data path variable names and file references.
imap_processing/codice/constants.py Added a mapping between descriptors and APID constants.
imap_processing/codice/codice_l1b.py Refactored processing logic to load CDF files and derive attributes.
imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml Modified attribute keys and descriptions to match new naming styles.
Comments suppressed due to low confidence (2)

imap_processing/codice/codice_l1b.py:9

  • Typo in the parameter name 'l1a_filenanme'; it should be corrected to 'l1a_filename' for clarity and consistency.
dataset = process_codice_l1b(l1a_filenanme)

imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml:158

  • The Data_type description for the 'imap_codice_l1b_lo-counters-singles' logical source appears inconsistent; consider updating it to 'L1B_lo-counters-singles' to accurately reflect the data product.
Data_type: L1B_lo-counters-aggregated->Level-1B Lo Single Instrument Rates Data

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

A lot of the changes in this file are just straight copy-paste updates that have been made to the L1a attributes file since I initially implemented the L1b file.

@bourque bourque moved this to PR Open in IMAP Apr 28, 2025
Copy link
Copy Markdown
Contributor

@tech3371 tech3371 left a comment

Choose a reason for hiding this comment

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

The code changes makes sense on high-level. Sorry for being behind on these.


# Use the logical source as a way to distinguish between data products and
# set some useful distinguishing variables
dataset_name = l1a_dataset.attrs["Logical_source"].replace("_l1a_", "_l1b_")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we rename this to be logical_source_name?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think I will leave it as dataset_name to be consistent with how I use this in the L1a pipeline

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.

Just some minor nits/suggestions, but looks good otherwise. Not ideal with the /100 so hopefully that can be fixed up soon.

Comment thread imap_processing/codice/codice_l1b.py Outdated
Comment thread imap_processing/codice/codice_l1b.py Outdated
@bourque bourque merged commit 5ac07b3 into IMAP-Science-Operations-Center:dev Apr 29, 2025
13 of 14 checks passed
@github-project-automation github-project-automation bot moved this from PR Open to Done in IMAP Apr 29, 2025
@bourque bourque deleted the codice-initial-l1b-work branch April 29, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants