astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

eso.query_instrument; limit output to specific columns

Open richardgmcmahon opened this issue 1 year ago • 3 comments

Hello,

I am exploring the data in the ESO Archive for one instrument and want to limit the number of columns returned. I expected that if I specified columns that the ourput would be limited to the specific columns specfied. It looks like a default set of columns are also returned. e.g.

eso.ROW_LIMIT = 99 table = eso.query_instrument('vircam', columns=['prog_id']) print(table.columns) <TableColumns names=('Release Date','Extensions','Object','RA','DEC','Target Ra Dec','Target l b','Program ID','DP.ID','OB.ID','OBS.TARG.NAME','EXPTIME','DPR.CATG','DPR.TYPE','DPR.TECH','OBS.CONTAINER.ID','OBS.CONTAINER.TYPE','INS.FILT1.NAME','INS.FILT1.WLEN','DET.DIT','DET.NDIT','NJITTER','OFFSET_I','OFFSET_ID','OFFSET_X','OFFSET_Y:','DIMM Seeing-avg')>

This is list of columns is defined as the defaults here: eso.query_instrument('vircam', help=True)

https://astroquery.readthedocs.io/en/latest/api/astroquery.eso.EsoClass.html#astroquery.eso.EsoClass.query_instrument

has:

columns: list of strings Columns returned by the query.

Is there a way to limit the results to only the columns that I want?

richardgmcmahon avatar Oct 07 '23 10:10 richardgmcmahon

This is a bug: the columns keyword isn't use in _query

keflavich avatar Oct 07 '23 14:10 keflavich

The ESO module is going through a total revamp as the currently used API going away completely, so while these issues are relevant and are indeed bugs, it may not make sense to fix them momentarily.

I'll ping Alberto separately to see the timeline for the change.

That being said, I think we need to keep these issues open and make sure the new version will address them.

bsipocz avatar Oct 09 '23 18:10 bsipocz

Hi @bsipocz, thanks, I looked at the ESO astroquery API and it uses some good old-fashioned techniques which I am familiar with! I agree that fixes are not needed at the moment. I have managed to get what I currently need with some wrangling.

richardgmcmahon avatar Oct 10 '23 07:10 richardgmcmahon