Open anawas opened 1 year ago
Seems to be a problem with interval boundary, because the start minute is set to 15. If I set the start time to 2022/08/03 10:14, everything works. Not sure if it is an issue. You can work around it by adjusting the time accordingly before calling in_interval().
Seems to be a problem with interval boundary, because the start minute is set to 15. If I set the start time to 2022/08/03 10:14, everything works. Not sure if it is an issue. You can work around it by adjusting the time accordingly before calling in_interval().
HI @anawas. We check it already and seems like it works
Can you provide us more info if you get the same error trying to read the file as I show you in the image below?
Executing your code lines works perfectly. But I see that my description of the problem was inaccurate - sorry about that. The exception occurs if I execute the following lines:
start = datetime.datetime(2022, 8, 3, 10, 15)
end = datetime.datetime(2022, 8, 3, 10, 19)
spec = CallistoSpectrogram.from_range("GLASGOW", start, end)
cutout = spec.in_interval("10:15", "10:19")
This is a common use case when I extract the bursts from the spectrogram. The lower and upper time boundaries are calculated by a script. It reads the event time from the original burst list and adds +/- 2 minutes. When I use start = datetime.datetime(2022, 8, 3, 10, 14)
instead anything works fine.
Suggested workaround Check if time boundaries are time.minutes % 15 == 0. If so, adjust boundaries by -1 minutes.
When processing instrument GLASGOW for event from 2022/08/03 10:15 to 2022/08/03 10:19 I get the following exception: