Skip to content

Commit

Permalink
draft for fast loading galfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobic committed May 26, 2021
1 parent 2c7a88f commit 022c98f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redmapper/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def read_cat(path, fn, columns=None):


def trim_cat(cat, border, nside, _hpix, nside_cutref=512):

if len(_hpix) == 1 and nside > 0 and border > 0.0:
# Prepare border cuts if necessary
boundaries = hp.boundaries(nside, _hpix[0], step=nside_cutref // nside)
Expand Down Expand Up @@ -419,7 +420,7 @@ def from_galfile(cls, filename, zredfile=None, nside=0, hpix=[], border=0.0, tru
# New more memory efficient reading...
ngals = np.sum(tab.ngals[indices])

kw_border = dict(border=border, nside=nside, _hpix=hpix, nside_cutref=512)
kw_border = dict(border=border, nside=nside, _hpix=_hpix, nside_cutref=512)

# read the files
if len(_hpix) == 0 or nside == 0:
Expand Down

0 comments on commit 022c98f

Please sign in to comment.