sunpy / sunkit-spex

:construction: Under Development :construction: A package for solar X-ray spectroscopy
BSD 3-Clause "New" or "Revised" License
22 stars 26 forks source link

STIX spectrogram loader #160

Open natsat0919 opened 1 month ago

natsat0919 commented 1 month ago

Code for STIX spectrogram data loading (addressing issue https://github.com/sunpy/sunkit-spex/issues/104 .). Currently this loader only supports processed STIX spectrogram files outputted by the stx_convert_spectrogram IDL function. A lot of the loader functions in StixLoader inherit from the old RhessiLoader class that was previously in the instruments.py file. I have added this loader to the legacy fitting folder instead of the extern folder as there will likely be changes to the instrument loaders in general. Once we decide on the format of the loader, we can move it to extern.

Changes implemented: Updated the STIX file loading functions Added StixLoader (supports spectrogram data loading, choosing event and background times for spectral fitting, lightcurve and spectrogram plotting)

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@3a9a4a4). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #160 +/- ## ======================================= Coverage ? 50.22% ======================================= Files ? 24 Lines ? 3367 Branches ? 0 ======================================= Hits ? 1691 Misses ? 1676 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

KriSun95 commented 1 month ago

I think this looks good! Would it be worth while to move the code to the extern module, like where the RHESSI code is now?

natsat0919 commented 1 month ago

I think this looks good! Would it be worth while to move the code to the extern module, like where the RHESSI code is now?

Yeah sure, I will move it there. I just thought that if we plan on doing some refactoring, then it would be better to have it in the legacy folder.

natsat0919 commented 1 month ago

@KriSun95 The STIX loader is now moved to extern!