kenfus / radiospectra

BSD 2-Clause "Simplified" License
0 stars 2 forks source link

Invalid time format in fits header leads to terminating the procedure of running the background subtraction (ValueError: '2019/10/15T24:07:59' is not a valid time string!) #9

Closed SyleKu closed 3 years ago

SyleKu commented 3 years ago

The fits file "_MRT3_20191015_23530002.fit.gz" has an invalid time end format, which doesn't fit the iso8601 standard format, which leads to not being able to parse the data to a corresponding date format in the callisto.py file.

This is the content of this fits header file:

grafik

The error occurs at line 292 in the callisto.py file:

grafik

This is the server side error log: grafik

I am not quite sure how to solve this problem, since the end time is 24:07:60, which is actually just the next day. Should we ajust the end date and also the end time, or should we somehow split this fits file into two files?

Normally we would just (as seen in line 283 - 286) modfiy the header file. For this case it only modifies the "60s" to "59s" but not the "24" to a "00" since it is in an "elif" case. We probably should also modify the end date of the header file.