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:
Puts things in a new cda subpackage (along with aca0_list.py)
It turns out the in-kernel HDF5 is quite fast, so this takes advantage of that to the extent possible.
Converts a result from a single obsid from a 1-row table to a dict (slightly awkward in the docs, but this is probably what the user wants in most cases).
Unified target_name search with option for resolving the name into coordinates
Unified search by coordinate
Applies units
Includes the available CDA search parameters in the docs.
ToDo:
[x] Docs
[x] Testing
[x] Cache full local HDF5 table with a timeout (e.g. an hour)
Testing
[x] Passes unit tests on MacOS, linux, Windows (at least one required)
[x] Functional testing
Functional testing
Installed locally (python setup.py install --user) and confirmed proper creation of the local HDF5 with:
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.
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:
cda
subpackage (along withaca0_list.py
)ToDo:
Testing
Functional testing
Installed locally (
python setup.py install --user
) and confirmed proper creation of the local HDF5 with: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.