sot / mica

Microscope on Chandra aspect
https://sot.github.io/mica
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

dark cal methods don't handle bounds #268

Open jeanconn opened 2 years ago

jeanconn commented 2 years ago

If one asks for a dark cal before the earliest one in the archive, one just gets the latest one. An error would be more appropriate I think.

In [1]: from mica.archive import aca_dark                                                                                                              

In [2]: aca_dark.dark_cal.get_dark_cal_props(date='2000:326', select='before')['date']                                                                 
Out[2]: '2000:326'

In [3]: aca_dark.dark_cal.get_dark_cal_props(date='2000:325', select='before')['date']                                                                 
Out[3]: '2021:329:10:10:29.450'