cositools / cosipy

The COSI high-level data analysis tools
Apache License 2.0
3 stars 16 forks source link

An error when start is the same as the initial value of the registered time array, running SpacecraftFile/source_interval #87

Closed hiyoneda closed 2 months ago

hiyoneda commented 9 months ago

When running ori_filetered = ori.source_interval(ori.get_time()[0], ori.get_time()[5000]), I got an error ValueError: array of sample points is empty It seems because start_idx = self._load_time.searchsorted(start.value) - 1 gives -1 in such a case.

israelmcmc commented 2 months ago

@hiyoneda @saurabhmittal23 @Yong2Sheng What's the status on this one?

Yong2Sheng commented 2 months ago

Hi @israelmcmc, I tested ori_filetered = ori.source_interval(ori.get_time()[0], ori.get_time()[5000]) using the 3-month orientation file of DC2, and there is no error now. So it has been fixed.

israelmcmc commented 2 months ago

Thanks! I'm closing it then