-
-
Notifications
You must be signed in to change notification settings - Fork 424
Closed
Description
While writing my unit tests for Catalogs I found a bug in Catalogs.download_hsc_spectra that's due to a small typo on Line 471:
astroquery/astroquery/mast/collections.py
Line 471 in 7de9084
| local_path = os.path.join(base_dir, "{spec['DatasetName']}.fits") |
{spec['DatasetName']}.fits instead of with the observation's unique dataset name. See below:
In [46]: table[1]['DatasetName']
Out[46]: 'HAG_J072655.69+691648.9_J8HPAOZMQ_V01.SPEC1D'
In [47]: r = Catalogs.download_hsc_spectra(table[1])
Downloading URL https://hla.stsci.edu/cgi-bin/ecfproxy?file_id=spec["DatasetName"].fits to ./mastDownload/HSC/{spec['DatasetName']}.fits ...
|=======================================================================| 37 / 37 (100.00%) 0s
In [48]: ls ./mastDownload/HSC/
{spec['DatasetName']}.fits
The fix is quick. Just fixing a string formatting typo on what is currently Line 471. PR will be linked.