Skip to content

Commit

Permalink
Merge pull request #2183 from jaymedina/catalogs-dl-hscSpectra-typo
Browse files Browse the repository at this point in the history
fixing string formatting typos in download_hsc_spectra()
  • Loading branch information
bsipocz authored Oct 22, 2021
2 parents 7de9084 + 03c8f72 commit c29328b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions astroquery/mast/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def query_region_async(self, coordinates, radius=0.2*u.deg, catalog="Hsc",
E.g. when using a slow internet connection.
page : int, optional
Default None.
Can be used to override the default behavior of all results being returned to
obtain a specific page of results.
Can be used to override the default behavior of all results being returned to obtain a specific page of results.
**kwargs
Other catalog-specific keyword args.
These can be found in the (service documentation)[https://mast.stsci.edu/api/v0/_services.html]
Expand Down Expand Up @@ -466,9 +465,9 @@ def download_hsc_spectra(self, spectra, download_dir=None, cache=True, curl_flag
if spec['SpectrumType'] < 2:
data_url = f'https://hla.stsci.edu/cgi-bin/getdata.cgi?config=ops&dataset={spec["DatasetName"]}'
else:
data_url = f'https://hla.stsci.edu/cgi-bin/ecfproxy?file_id=spec["DatasetName"].fits'
data_url = f'https://hla.stsci.edu/cgi-bin/ecfproxy?file_id={spec["DatasetName"]}.fits'

local_path = os.path.join(base_dir, "{spec['DatasetName']}.fits")
local_path = os.path.join(base_dir, f'{spec["DatasetName"]}.fits')

status = "COMPLETE"
msg = None
Expand Down

0 comments on commit c29328b

Please sign in to comment.