Skip to content

Commit

Permalink
Merge pull request #22 from sdss/branch_healpix
Browse files Browse the repository at this point in the history
Added healpixgrp() to path.py
  • Loading branch information
havok2063 authored Oct 7, 2020
2 parents 664852d + 9ed3325 commit 157ab5b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions python/sdss_access/path/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,26 @@ def definitiondir(self, filetype, **kwargs):
subdir = "{:0>4d}".format(designid100) + "XX"
return subdir

def healpixgrp(self, filetype, **kwargs):
''' Returns HEALPIX group subdirectory
Parameters
----------
filetype : str
File type parameter.
healpix : int or str
HEALPix number. Will be converted to int internally.
Returns
-------
healpixgrp : str
HEALPix group directory, HEALPix//100.
'''

healpix = int(kwargs['healpix'])
subdir = "{:d}".format(healpix//100)
return subdir

class AccessError(Exception):
pass

0 comments on commit 157ab5b

Please sign in to comment.