Skip to content

Add L0 Loader module#155

Open
morpinma-wing wants to merge 7 commits into
cositools:develop/emfrom
morpinma-wing:wing/L0-Loader
Open

Add L0 Loader module#155
morpinma-wing wants to merge 7 commits into
cositools:develop/emfrom
morpinma-wing:wing/L0-Loader

Conversation

@morpinma-wing

@morpinma-wing morpinma-wing commented May 26, 2026

Copy link
Copy Markdown

Adds L0 loader, and its GUI module.

  • MModuleLoaderMeasurementsL0 - parses the L0 file header, CCSDS primary/secondary headers, HIT_DATA. Auto-detects raw CCSDS vs. L0 with header.

@morpinma-wing morpinma-wing self-assigned this May 26, 2026
@morpinma-wing

Copy link
Copy Markdown
Author

In the new commit, I added a L1a mode in the FITS saver

@ckierans ckierans left a comment

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.

Looks good, Wing! I have a few comments about variable names, but the code looks good.

Comment thread src/MFITSWriterL1a.cxx Outdated
Comment thread src/MFITSWriterL1a.cxx Outdated
Comment thread src/MFITSWriterL1a.cxx
Comment thread src/MFITSWriterL1a.cxx
Comment thread src/MFITSWriterL1a.cxx Outdated
Comment thread include/MModuleLoaderMeasurementsL0.h Outdated
Comment thread include/MModuleLoaderMeasurementsL0.h Outdated
Comment thread src/MModuleLoaderMeasurementsL0.cxx Outdated
// build MTime from seconds and subseconds, and set that to RTS.
// Subseconds are 40 MHz DCB ticks → ns = ticks * 25
long int pktNanoseconds = (long int)pktSubseconds * 25;
Event->SetTimeRTS(MTime((long int)pktSeconds, pktNanoseconds));

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.

I'm not sure about this, but I think you need an offset to account for the reference time system being defined from Jan 1, 2025 00:00:00. So I would expect another conversion from the packet time in seconds+nano seconds to the RTS time system.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi Carolyn,
Thank you for catching that. You're right. It shouldn't be loaded as RTS directly. I was doing it that way because I wrote my L0 saver to save in RTS, so originally I read it back into RTS as well. But I looked at the docs, and I think in the real case the packets will come down in GPS time. So in the new commit, I rewrote the saver and loader to read and write the L0 packet time in GPS. I think that's the right approach, but I'd still like to confirm with you.
Thanks!

Comment thread src/MModuleLoaderMeasurementsL0.cxx Outdated
Comment thread include/MModuleSaverMeasurementsL0.h Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants