Skip to content

Commit c29328b

Browse files
authored
Merge pull request #2183 from jaymedina/catalogs-dl-hscSpectra-typo
fixing string formatting typos in download_hsc_spectra()
2 parents 7de9084 + 03c8f72 commit c29328b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

astroquery/mast/collections.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ def query_region_async(self, coordinates, radius=0.2*u.deg, catalog="Hsc",
8585
E.g. when using a slow internet connection.
8686
page : int, optional
8787
Default None.
88-
Can be used to override the default behavior of all results being returned to
89-
obtain a specific page of results.
88+
Can be used to override the default behavior of all results being returned to obtain a specific page of results.
9089
**kwargs
9190
Other catalog-specific keyword args.
9291
These can be found in the (service documentation)[https://mast.stsci.edu/api/v0/_services.html]
@@ -466,9 +465,9 @@ def download_hsc_spectra(self, spectra, download_dir=None, cache=True, curl_flag
466465
if spec['SpectrumType'] < 2:
467466
data_url = f'https://hla.stsci.edu/cgi-bin/getdata.cgi?config=ops&dataset={spec["DatasetName"]}'
468467
else:
469-
data_url = f'https://hla.stsci.edu/cgi-bin/ecfproxy?file_id=spec["DatasetName"].fits'
468+
data_url = f'https://hla.stsci.edu/cgi-bin/ecfproxy?file_id={spec["DatasetName"]}.fits'
470469

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

473472
status = "COMPLETE"
474473
msg = None

0 commit comments

Comments
 (0)