sot / mica

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

Added vectorized versions of some archive.dark_cal functions #273

Closed javierggt closed 2 years ago

javierggt commented 2 years ago

Description

This PR adds vectorized versions of get_dark_cal_id, date_to_dark_id and dark_id_to_date. It also replaces the uses of DateTime by CxoTime inside mica.archive.aca_dark.dark_cal (all other uses of DateTime were left there).

Interface impacts

Everything should be backward compatible. This only enhances the interface, so something like this is possible:

get_dark_cal_id(['2022:100', '2022:105', '2022:127'], 'before')

Testing

Unit tests

I added a test for these vectorized functions.

Independent check of unit tests by @jeanconn

Functional tests

No functional testing.

javierggt commented 2 years ago

@jeanconn, sorry for committing stuff after you approved the PR, but I made two more:

jeanconn commented 2 years ago

LGTM. I reran the unit tests and re-approved.