diff --git a/python/sdss_access/path/path.py b/python/sdss_access/path/path.py index b94538e..314d091 100644 --- a/python/sdss_access/path/path.py +++ b/python/sdss_access/path/path.py @@ -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