Skip to content

Lo L1C - Automatic Goodtimes#2896

Open
sdhoyt wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
sdhoyt:lo-goodtimes
Open

Lo L1C - Automatic Goodtimes#2896
sdhoyt wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
sdhoyt:lo-goodtimes

Conversation

@sdhoyt
Copy link
Copy Markdown
Contributor

@sdhoyt sdhoyt commented Mar 31, 2026

Change Summary

Overview

This code integrates Lo's python code for automatic goodtimes into the processing code.

I'm running into a mypy issue because of the number of if statements in a function. I'd like to push fixing that to another ticket a little later down the road to prioritize the remaining work I have for the 3 month maps.

I compared goodtimes values to the results of Lo's script. There was divergence, up to a few hundred seconds. If this needs to be more accurate, I'd also propose pushing this to a later change.

Closes #2841

@sdhoyt sdhoyt added this to the April 2026 milestone Mar 31, 2026
@sdhoyt sdhoyt self-assigned this Mar 31, 2026
@sdhoyt sdhoyt added Ins: Lo Related to the IMAP-Lo instrument Level: L1 Level 1 processing labels Mar 31, 2026
@sdhoyt sdhoyt added this to IMAP Mar 31, 2026
epochs[row_count] = l1b_histrates["epoch"][index].values.item()
goodtimes[row_count, :] = [begin, end]
epochs[row_count] = l1b_histrates["epoch"][index - 1].values.item()
goodtimes[row_count, :] = [int(begin - 620), int(end + 320)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should look at the GoodTimes starts and ends to see if these (620, 320 sec) offsets are required by comparing them to the pointing start and stop times. I think these "fudge factors" were either there or as large as they are in the reference code because of lack of fidelity in their system for things like time conversion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Created a ticket for the time padding investigation: #2897

Copy link
Copy Markdown
Collaborator

@ahotasu ahotasu left a comment

Choose a reason for hiding this comment

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

Looks good to me--all of my comments are for long-term polish and aren't needed prior to merge.

epochs[row_count] = l1b_histrates["epoch"][max_row_count].values.item()
goodtimes[row_count, :] = [begin, end]
epochs[row_count] = l1b_histrates["epoch"][max_row_count - 1]
goodtimes[row_count, :] = [int(begin - 620), int(end + 320)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same comment as above.

@@ -2544,10 +2544,19 @@ def l1b_bgrates_and_goodtimes(
interval_nom = 420 * cycle_count # seconds
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we know where 420 comes from--I know it's in the reference code, but it would be good to document in the code why that number was selected (e.g. does 7 minutes provide for Lo stepping through all energy steps?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: Lo Related to the IMAP-Lo instrument Level: L1 Level 1 processing

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Lo L1C GoodTimes Processing

2 participants