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
Using astroquery v0.4.7, the Gaia call is throwing a new error. Pasted below. I have not looked into it and don't know whether our code needs to change or if there is a bug in somewhere else in the chain.
KeyErrorTraceback (mostrecentcalllast)
CellIn[3], line41gaiastarttime=time.time()
3# get Gaia light curves---->4df_lc_gaia=gaia_get_lightcurves(sample_table, search_radius=1/3600, verbose=0)
6# add the resulting dataframe to all other archives7df_lc.append(df_lc_gaia)
File~/raen/fdn-tmp/light_curves/code_src/gaia_functions.py:45, ingaia_get_lightcurves(sample_table, search_radius, verbose)
40returnMultiIndexDFObject()
42# Extract Light curves ===============43# request the EPOCH_PHOTOMETRY from the Gaia DataLink Service--->45gaia_df=Gaia_retrieve_epoch_photometry(gaia_table)
47#if the epochal photometry is empty, return an empty dataframe48iflen(gaia_df) ==0:
File~/raen/fdn-tmp/light_curves/code_src/gaia_functions.py:138, inGaia_retrieve_epoch_photometry(gaia_table)
118""" 119 Function to retrieve EPOCH_PHOTOMETRY catalog product for Gaia 120 entries using the DataLink. Note that the IDs need to be DR3 source_id and needs to be a list. (...) 132 133 """135# gaia datalink server has a threshold of max 5000 requests,136# so we break the input datasets into chunks of size <=5000 sources137# and then send each chunk into the datalink server-->138ids=list(gaia_table["source_id"])
139dl_threshold=5000# Datalink server threshold140ids_chunks=list(Gaia_chunks(ids, dl_threshold))
File/opt/conda/envs/science_demo/lib/python3.11/site-packages/astropy/table/table.py:2061, inTable.__getitem__(self, item)
2059def__getitem__(self, item):
2060ifisinstance(item, str):
->2061returnself.columns[item]
2062elifisinstance(item, (int, np.integer)):
2063returnself.Row(self, item)
File/opt/conda/envs/science_demo/lib/python3.11/site-packages/astropy/table/table.py:264, inTableColumns.__getitem__(self, item)
253"""Get items from a TableColumns object. 254 255 :: (...) 261 tc[1:3] # <TableColumns names=('b', 'c')> 262 """263ifisinstance(item, str):
-->264returnOrderedDict.__getitem__(self, item)
265elifisinstance(item, (int, np.integer)):
266returnlist(self.values())[item]
KeyError: 'source_id'
There were some server side changes to the TAP tables at ESA that capitalized source_id (if you go into debug mode then you can see a SOURCE_ID column).
I merged a fix for this into astroquery, and pushed a dev release to pypi, so a pip install -U --pre astroquery should do the trick now. I wonder whether we need to update the requirements version to be 0.4.8 dev
Using astroquery v0.4.7, the Gaia call is throwing a new error. Pasted below. I have not looked into it and don't know whether our code needs to change or if there is a bug in somewhere else in the chain.
Originally posted by @troyraen in #207 (comment)
The text was updated successfully, but these errors were encountered: