You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently tests with versions 0.4.8 and 0.4.9 of astroquery fail, with the output logs shown below.
This is likely due to the major rewrite of astoquery.heasarc module: astropy/astroquery#2997
In short it would appear that the response table from the heasarc now has the column names in lowercase vs uppercase based on logs shown below.
self = Index(['name', 'ra', 'dec', 'time', 'obsid', 'exposure', 'processing_status',
'processing_date', 'public_date', 'obs_type', '__row'],
dtype='object')
key = 'OBSID'
def get_loc(self, key):
"""
Get integer location, slice or boolean mask for requested label.
Parameters
----------
key : label
Returns
-------
int if unique index, slice if monotonic index, else mask
Examples
--------
>>> unique_index = pd.Index(list('abc'))
>>> unique_index.get_loc('b')
1
>>> monotonic_index = pd.Index(list('abbc'))
>>> monotonic_index.get_loc('b')
slice(1, 3, None)
>>> non_monotonic_index = pd.Index(list('abcb'))
>>> non_monotonic_index.get_loc('b')
array([False, True, False, True])
"""
casted_key = self._maybe_cast_indexer(key)
try:
return self._engine.get_loc(casted_key)
except KeyError as err:
> raise KeyError(key) from err
E KeyError: 'OBSID'
FAILED tests/test_autonicer.py::test_call_nicer - KeyError: 'OBSID'
FAILED tests/test_autonicer.py::test_make_cycle - TypeError: 'int' object is not subscriptable
FAILED tests/test_autonicer.py::test_single_sel - AttributeError: 'int' object has no attribute 'loc'
FAILED tests/test_autonicer.py::test_short_entry - assert 0 == 1
FAILED tests/test_autonicer.py::test_wrong_obsid - AttributeError: 'int' object has no attribute 'loc'
FAILED tests/test_autonicer.py::test_cycle_sel - TypeError: 'int' object is not subscriptable
FAILED tests/test_autonicer.py::test_rm_single_sel - assert 0 == 58
FAILED tests/test_autonicer.py::test_back - IndexError: list index out of range
FAILED tests/test_autonicer.py::test_duplicate - TypeError: 'int' object is not subscriptable
FAILED tests/test_autonicer.py::test_pullreduce - AttributeError: 'int' object has no attribute 'loc'
FAILED tests/test_autonicer.py::test_nometa - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/xti/even...
FAILED tests/test_autonicer.py::test_no_primary_obsid - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/xti/even...
FAILED tests/test_autonicer.py::test_checkcal_reprocess - AssertionError: assert '---------- Passing Reprocess of 3013010102 ----------' in 'DATASETS NOT FOUND\nDATASETS NOT FOUND\nDATASETS NOT...
FAILED tests/test_autonicer.py::test_inlist_singledir - FileNotFoundError: [Errno 2] No such file or directory: 'test.csv'
ERROR tests/test_autonicer.py::test_get_clevts - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
ERROR tests/test_autonicer.py::test_getmeta - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
ERROR tests/test_autonicer.py::test_decompress - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
ERROR tests/test_autonicer.py::test_checkcal - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
ERROR tests/test_autonicer.py::test_no_caldb - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
ERROR tests/test_autonicer.py::test_reprocess - FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/Research/Pulsar_Timing/autoHeasoft/autoNICER/data/3013010102/'
The text was updated successfully, but these errors were encountered:
It would appear that the issue is larger than I previously thought. The following code sample just from some of my testing with astroquery >= 0.4.8 shows that the query_object() in the heasarc package is deprecated breaking most of this.
>>> from astroquery.heasarc import Heasarc
>>> heasarc = Heasarc()
>>> Heasarc.clear_cache()
>>> query = heasarc.query_object("crab", mission="nicermastr")
WARNING: AstropyDeprecationWarning: The query_object function is deprecated and may be removed in a future version.
Use query_region instead. [warnings]
I either need to decide if I want to try to un-deprecate (if that's a word) this on astroquery's end or figure out if its worth making a 3rd party querying package for the heasarc. For now the best temporary fix will be to require astroquery <= 0.4.7
Recently tests with versions 0.4.8 and 0.4.9 of astroquery fail, with the output logs shown below.
This is likely due to the major rewrite of astoquery.heasarc module: astropy/astroquery#2997
In short it would appear that the response table from the heasarc now has the column names in lowercase vs uppercase based on logs shown below.
The text was updated successfully, but these errors were encountered: