def h_a_powers(vals, path, fname, hpath): return np.power( vals.h, hdf5_get(path, fname, hpath, attr='h-scale-exponent') ) * \ np.power( vals.a, hdf5_get(path, fname, hpath, attr='aexp-scale-exponent') )
def _read_subfindtables(self): _log('TreeTables: reading subfind tables:') _log(' nodeIndex') self.tf_tree_ids = hdf5_get(self.fpath, self.sfbase, '/Subhalo/nodeIndex', ncpu=self.ncpu) _log(' SubGroupNumber') self.tf_sgns = hdf5_get(self.fpath, self.sfbase, '/Subhalo/SubGroupNumber', ncpu=self.ncpu) _log(' MassType') self.tf_masstypes = hdf5_get(self.fpath, self.sfbase, '/Subhalo/MassType', ncpu=self.ncpu) * 1E10 / h * U.Msun return
def _read_treetables(self): _log('TreeTables: reading merger tree tables:') _log(' nodeIndex') self.tree_ids = hdf5_get(self.fpath, self.fbase, '/haloTrees/nodeIndex', ncpu=self.ncpu) _log(' snapshotNumber') self.sns = hdf5_get(self.fpath, self.fbase, '/haloTrees/snapshotNumber', ncpu=self.ncpu) _log(' fofIndex') self.gns = hdf5_get(self.fpath, self.fbase, '/haloTrees/fofIndex', ncpu=self.ncpu) if self.use_snapshots: _log(' positionInCatalogue') self.tree_tabposs = hdf5_get(self.fpath, self.fbase, '/haloTrees/positionInCatalogue', ncpu=self.ncpu) _log(' isInterpolated') self.in_tab = np.logical_not( hdf5_get(self.fpath, self.fbase, '/haloTrees/isInterpolated', ncpu=self.ncpu) ) _log(' descendantIndex') self.tree_descids = hdf5_get(self.fpath, self.fbase, '/haloTrees/descendantIndex', ncpu=self.ncpu) _log(' mbpsContributed') self.tree_mbpcs = hdf5_get(self.fpath, self.fbase, '/haloTrees/mbpsContributed', ncpu=self.ncpu) return
def to_cgs(path, fname, hpath): return hdf5_get(path, fname, hpath, attr='Conversion factor to physical CGS ' '(including cosmological corrections)')