Skip to content

Commit

Permalink
trying to do bitweights
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsh-um committed Mar 6, 2024
1 parent f88462d commit ccb4b97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions py/LSS/cosmodesi_io_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ def get_clustering_positions_weights(catalog, distance, zlim=(0., np.inf),maglim
weights /= catalog['WEIGHT_COMP'][mask]
print('dividing weights by WEIGHT_COMP')
weights = _format_bitweights(catalog['BITWEIGHTS'][mask]) + [weights]
# wlist = _format_bitweights(catalog['BITWEIGHTS'][mask])
# wlistT = [list(row) for row in zip(*wlist)]
# weights = wlistT + [weights]

if name == 'randoms':
#if 'default' in weight_type:
Expand Down Expand Up @@ -290,7 +293,7 @@ def read_positions_weights(name):
for reg in region:
cat_fns = catalog_fn(ctype='clustering', name=name, region=reg, **kwargs)
if name=='data':
cat_full = catalog_fn(ctype='full_HPmapcut', name=name, **kwargs)
cat_full = catalog_fn(ctype='full', name=name, **kwargs)
# cat_full = catalog_fn(ctype='full', name=name, **kwargs)
logger.info('Loading {}.'.format(cat_fns))
isscalar = not isinstance(cat_fns, (tuple, list))
Expand Down Expand Up @@ -382,7 +385,7 @@ def read_full_positions_weights(name='data', weight_type='default', fibered=Fals
def read_positions_weights(name):
positions, weights = [], []
for reg in region:
cat_fn = catalog_fn(ctype='full_HPmapcut', name=name, **kwargs)
cat_fn = catalog_fn(ctype='full', name=name, **kwargs)
#cat_fn = catalog_fn(ctype='full', name=name, **kwargs)
logger.info('Loading {}.'.format(cat_fn))
if isinstance(cat_fn, (tuple, list)):
Expand Down

0 comments on commit ccb4b97

Please sign in to comment.