sot / mica

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

Add CDA web services API and expand functionality of Ocat target target query #267

Closed taldcroft closed 2 years ago

taldcroft commented 2 years ago

Description

Expanding on #264, this makes a somewhat unified interface for directly querying the CDA web services and querying from a local HDF5 table. I noticed the CDA web interface is reasonably good and thought it would be worth a Python interface so people don't necessarily have to sync the mica target table archive file. This is also the result of too much management and wanting to do a fun hack.

Features:

ToDo:

Testing

Functional testing

Installed locally (python setup.py install --user) and confirmed proper creation of the local HDF5 with:

~/.local/bin/mica_update_ocat_target_table --datafile=ocat.h5

Also modified the code to have a short timeout (1 sec) and confirmed that it tries 3 times and then gives up. QUESTION: maybe it should "succeed" but print an error message to console to prevent stopping other jobs?

Built the docs locally with no warnings and they seem OK.