spacetelescope / jwst_mast_query

Command line tool for querying MAST and downloading JWST data products
BSD 3-Clause "New" or "Revised" License
18 stars 11 forks source link

Search only returns results for NIRCam #50

Open jotaylor opened 1 year ago

jotaylor commented 1 year ago

I have cloned and installed the latest version of the repo, but when I supply a cfg file (attached) that specifies instrument: niriss, the code tries to retrieve nircam data. The output I get is below. I even tried a different cfg file that I know has worked in the past.

> jwst_download.py --config jwst_query.cfg
Loading config file jwst_query.cfg
INSTRUMENT:  nircam
obsmode:  [None]
propID:  01085
obsnums:  [12]
INFO: MAST API token accepted, welcome Jo Taylor [astroquery.mast.auth]
MJD range: 59573.0 60059.976084486516
No obsmode given. Querying for all files for nircam.
WARNING: NoResultsWarning: Query returned no results. [astroquery.mast.discovery_portal]
WARNING!! No observations found!!

################################
NO OBSERVATIONS FOUND! exiting....
################################
############## Nothing selected!!!! exiting...

jwst_query.txt

bhilbert4 commented 1 year ago

Thanks @jotaylor. I think I see what's going on here. Bad logic for managing parameter values between defaults, command line inputs, and config file inputs. It looks like the instrument name is set to niriss from the config file, but is being set back to the default value of nircam later. I'll work on straightening it all out.

jotaylor commented 1 year ago

This fixed the issue, thanks Bryan!

jotaylor commented 1 year ago

I noticed it's now printing many lines that look like: Warning: could not determine obsnum for observation 126845264 Is that a feature or a bug? It doesn't affect anything, I just don't remember seeing that before.

bhilbert4 commented 1 year ago

Interesting. I didn't see that in any of my tests. I'll try with your query above on Monday and see if I can find a way to suppress those messages.