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

CoDICE: Calculate epoch values from acq_start_seconds instead of shcoarse #1262

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

bourque
Copy link
Collaborator

@bourque bourque commented Jan 14, 2025

Change Summary

Overview

This PR adds a function to calculate epoch values from acq_start_seconds field instead of the default shcoarse field, as per request from CoDICE instrument team. The function may also be expanded in the future to support other time keys if needed.

Updated Files

  • imap_processing/codice/codice_l1a.py

@bourque bourque added Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing labels Jan 14, 2025
@bourque bourque added this to the Jan 2025 milestone Jan 14, 2025
@bourque bourque self-assigned this Jan 14, 2025
Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

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

I just have the one double check comment. Otherwise this is good to go!

epoch : NDArray[int]
List of epoch values.
"""
epoch = met_to_j2000ns(self.dataset.acq_start_seconds)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to double check... acq_start_seconds records the spacecraft clock coarse ticks (seconds) at acquisition start time and there is no sub-seconds field? If both of those things are true, this looks like the correct implementation to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After discussing with Joey, there is indeed a sub-seconds field that I will have to implement, so I will update that. acq_start_seconds does indeed record the S/C clock coarse ticks at acquisition time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@subagonsouth Could you give this another look any make sure I am thinking about this correctly? It is a bit tricky since acq_start_seconds is in units of seconds and acq_start_subseconds is in units of microseconds, so I think I need to do a small conversion before calculating epoch.

@bourque bourque requested a review from subagonsouth January 15, 2025 22:02
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: No status
Development

Successfully merging this pull request may close these issues.

2 participants