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 file loading and lightcurve/spectrogram plotting #97

Closed natsat0919 closed 1 year ago

natsat0919 commented 1 year ago

Describe the bug

The STIX spectral and srm file loading functions don't support the updated version of STIX files, these are mainly formatting issues (e.g. change of keyword in fits file from DATE-BEG to DATE_BEG), but also other changes such as change of time units from seconds to deci-second.

These issues (even when fixed for loading in new files) then result in plotting errors. The highlighted background and event time regions in STIX light curves and spectrograms are shifted, therefore the plots are showing incorrect regions than what the user selected.

To Reproduce

No response

Screenshots

In this example I was loading in STIX observation and was selecting:

Background region: from "2020-06-07T21:30:00.000" to "2020-06-07T21:40:00.000"

Event region: from "2020-06-07T21:40:00" to "2020-06-07T21:43:45")

You can see that in the light curve example, the highlighted time regions are all shifted. In the spectrogram example, the highlighted regions are overlapping.

lc ping from about 21:39 to 21:41. sg

System Details

No response

Installation method

No response