Skip to content

Commit 95c016d

Browse files
committed
handle 5 digits in format string
1 parent f7b78f2 commit 95c016d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

astroquery/sdss/core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class SDSSClass(BaseQuery):
3939
'frame-{band}-{run:06d}-{camcol}-'
4040
'{field:04d}.fits.bz2')
4141
SPECTRA_URL_SUFFIX = ('{base}/dr{dr}/sdss/spectro/redux/'
42-
'{run2d}/spectra/{plate:04d}/'
43-
'spec-{plate:04d}-{mjd}-{fiber:04d}.fits')
42+
'{run2d}/spectra/{plate:0>4d}/'
43+
'spec-{plate:0>4d}-{mjd}-{fiber:04d}.fits')
4444

4545
TEMPLATES_URL = 'http://classic.sdss.org/dr7/algorithms/spectemplates/spDR2'
4646
# Cross-correlation templates from DR-7 - no clear way to look this up via
@@ -587,8 +587,6 @@ def get_spectra_async(self, coordinates=None, radius=2. * u.arcsec,
587587
run2d = row['run2d']
588588
if data_release > 15:
589589
linkstr.replace('/spectra/', '/spectra/full/')
590-
if data_release > 13 and row['plate'] > 9999:
591-
linkstr.replace('{plate:04d}', '{plate:5d}')
592590
link = linkstr.format(
593591
base=conf.sas_baseurl, dr=data_release,
594592
run2d=run2d, plate=row['plate'],

0 commit comments

Comments
 (0)