sunkit-spex
sunkit-spex copied to clipboard
STIX spectrogram loader
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 Report
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
main@c340a00). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage ? 61.90%
=======================================
Files ? 32
Lines ? 3520
Branches ? 0
=======================================
Hits ? 2179
Misses ? 1341
Partials ? 0
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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?
I think this looks good! Would it be worth while to move the code to the
externmodule, 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.
@KriSun95 The STIX loader is now moved to extern!
@samaloney thanks for the code review. I updated the code based on your comments. It should be ready to bed merged
I had to update the srm placeholder for the STIX loader, as custom placeholder names don't allow loading in of multiple files at the same time (since only pha_file, arf_file ... srm_file in the LoadSpec are actually allowed to be lists). Therefore, it was not possible to simultaneously load 2 STIX spectra at the same time for fitting