Description
The infrastructure to read sunrise_offset and sunset_offset from pipeline settings already exists in PipelineSettings dataclass, but these offsets are not being applied anywhere in the processing code. Need to implement the logic to shift is_night flag transitions according to these offsets during L2 processing.
Background
Per Marek (algorithm doc v4.4.7 Sec. 3.9.1, item 2):
- When is_night transitions from 0->1 (sunset): shift by
sunset_offset histograms
- When is_night transitions from 1->0 (sunrise): shift by
sunrise_offset histograms
- Offsets can be negative, zero, or positive values
Required Changes
- Identify where is_night flag transitions occur in L1B histogram sequences
- Apply
sunset_offset when detecting is_night 0->1 transition
- Apply
sunrise_offset when detecting is_night 1->0 transition
- Ensure offsets are applied during L2 processing when computing from L1B histograms
Note: offsets are already read from pipeline settings and available for use.
Reference
- Algorithm doc v4.4.7, Sec. 3.9.1, item 2
- Pipeline settings file:
imap_glows_lxx-pipeline-settings_20250923_v000.json
Related
Closes #1991
Laura Notes
Pointing maneuver - is night
Sunrise - histograms on either side
Sunset - histograms on either side
Epoch = sampling time in l1b_data
Use offset from is_night timestamp and flag using the same flag
Remove is_night from good times histograms
Double check flags in L2
Description
The infrastructure to read
sunrise_offsetandsunset_offsetfrom pipeline settings already exists inPipelineSettingsdataclass, but these offsets are not being applied anywhere in the processing code. Need to implement the logic to shift is_night flag transitions according to these offsets during L2 processing.Background
Per Marek (algorithm doc v4.4.7 Sec. 3.9.1, item 2):
sunset_offsethistogramssunrise_offsethistogramsRequired Changes
sunset_offsetwhen detecting is_night 0->1 transitionsunrise_offsetwhen detecting is_night 1->0 transitionNote: offsets are already read from pipeline settings and available for use.
Reference
imap_glows_lxx-pipeline-settings_20250923_v000.jsonRelated
Closes #1991
Laura Notes
Pointing maneuver - is night
Sunrise - histograms on either side
Sunset - histograms on either side
Epoch = sampling time in l1b_data
Use offset from is_night timestamp and flag using the same flag
Remove is_night from good times histograms
Double check flags in L2