astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
701 stars 396 forks source link

eso.query_instrument; limit output to specific columns #2847

Open richardgmcmahon opened 1 year ago

richardgmcmahon commented 1 year ago

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?

keflavich commented 1 year ago

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

bsipocz commented 12 months ago

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.

richardgmcmahon commented 12 months ago

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.