Skip to content

Commit

Permalink
update pad_fieldid function
Browse files Browse the repository at this point in the history
Updates to pad_fieldid function to allow for wildcard and string fieldids
  • Loading branch information
Sean-Morrison committed Oct 18, 2023
1 parent 022e942 commit 44b3f5e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/sdss_access/path/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ def isplate(self, filetype, **kwargs):
Parameters
---------
filetype : str
File type paramter
File type parameter
run2d : str
BOSS idlspec2d run2d version
Expand All @@ -1430,7 +1430,7 @@ def pad_fieldid(self, filetype, **kwargs):
Parameters
---------
filetype : str
File type paramter
File type parameter
run2d : str
BOSS idlspec2d run2d version
fieldid : str or int
Expand All @@ -1449,7 +1449,10 @@ def pad_fieldid(self, filetype, **kwargs):
return ''
if run2d in ['v6_0_1','v6_0_2', 'v6_0_3', 'v6_0_4']:
return str(fieldid)
return str(fieldid).zfill(6)
if fieldid.isnumeric():
return str(fieldid).zfill(6)
else:
return fieldid


class AccessError(Exception):
Expand Down

0 comments on commit 44b3f5e

Please sign in to comment.