Skip to content

Conversation

@greglucas
Copy link
Collaborator

  • Use universal spin table to get true onboard timing. The Lo spin packet is not accurate enough or has different time information in it, so we need to reference DE events to the onboard timekeeping (spin table), which the Lo instrument references to reset its counter.

  • Change formula for DE time tag counter. It is a fixed length pulse of 4.096ms, not varying with spin period. This means we need to multiply each DE tick by that length of time.

  • Change spin bins from (-180, 180) to (0, 360)

- use universal spin table to get true onboard timing
  The Lo spin packet is not accurate enough or has different
  time information in it, so we need to reference DE events to
  the onboard timekeeping (spin table), which the Lo instrument
  references to reset its counter.

- Change formula for DE time tag counter. It is a fixed length
  pulse of 4.096ms, not varying with spin period. This means we
  need to multiply each DE tick by that length of time.
@greglucas greglucas added this to the January 2026 milestone Jan 29, 2026
@greglucas greglucas self-assigned this Jan 29, 2026
@greglucas greglucas added Ins: Lo Related to the IMAP-Lo instrument Level: L1 Level 1 processing labels Jan 29, 2026
de_eu_time de_dn_time / 4096 * avg_spin_duration
where de_time is the direct event time Data Number (DN) and avg_spin_duration
is the average spin duration for the ASC that the event was measured in.
time_from_start_of_spin = de_time * DE_CLOCK_TICK_S
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we be adding a half-tick here?
(de_time + 0.5) * DE_CLOCK_TICK_S

Copy link
Contributor

Choose a reason for hiding this comment

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

For Hi, each DE is tagged with the exact clock time (not adding 1/2 of a tick). When computing spin-phase or geometry, the 1/2 tick is added.

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.

Looks good other than the recommendation to check the referenced spin function. I will approve and let you decide if you want to use that function or not.


# Find the index of the closest spin start for each direct event
# We want the closest prior spin (spin that has already started)
closest_spin_indices = (
Copy link
Contributor

Choose a reason for hiding this comment

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

This basically duplicates the code in the interpolate_spin_data function. I assume that you just didn't know about that function... or is there something there that is undesirable for use here?

https://github.com/IMAP-Science-Operations-Center/imap_processing/blob/dev/imap_processing/spice/spin.py#L150

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need the exact start of the spin, not an interpolation. Is there a way to get that?

de_eu_time de_dn_time / 4096 * avg_spin_duration
where de_time is the direct event time Data Number (DN) and avg_spin_duration
is the average spin duration for the ASC that the event was measured in.
time_from_start_of_spin = de_time * DE_CLOCK_TICK_S
Copy link
Contributor

Choose a reason for hiding this comment

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

For Hi, each DE is tagged with the exact clock time (not adding 1/2 of a tick). When computing spin-phase or geometry, the 1/2 tick is added.

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants