def run(self): from yt.analysis_modules.halo_analysis.api import HaloCatalog from yt.analysis_modules.halo_mass_function.api import HaloMassFcn hc = HaloCatalog(data_ds=self.ds, finder_method=self.finder) hc.create() hmf = HaloMassFcn(halos_ds=hc.halos_ds) result = np.empty((2, hmf.masses_sim.size)) result[0] = hmf.masses_sim.d result[1] = hmf.n_cumulative_sim.d return result
def analytic_halo_mass_function(ds, fit): hmf = HaloMassFcn(simulation_ds=ds, fitting_function=fit) result = np.empty((2, hmf.masses_analytic.size)) result[0] = hmf.masses_analytic.d result[1] = hmf.n_cumulative_analytic.d return result