Add preliminary power spectrum integration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# coding: utf-8
|
||||
import pandas as pd
|
||||
import pspec_new
|
||||
from baseprocessor import *
|
||||
|
||||
mass_func = lambda dset: dset["rho"] * dset["dx"] ** 3 # Mass function
|
||||
@@ -584,6 +585,11 @@ class PostProcessor(HDF5Container):
|
||||
|
||||
return sinks_dict
|
||||
|
||||
def _pspec(self):
|
||||
outfile = self.path_out + "/pspec.h5"
|
||||
pspec_new.pspec(repo=self.path, iouts=[self.num], outfile=outfile)
|
||||
return outfile
|
||||
|
||||
def def_rules(self):
|
||||
|
||||
self.rules = {
|
||||
@@ -674,6 +680,7 @@ class PostProcessor(HDF5Container):
|
||||
"Teff": cst.K,
|
||||
},
|
||||
),
|
||||
"pspec": Rule(self, self._pspec, "Power spectrum", "/hdf5"),
|
||||
# Helpers
|
||||
"radial_bins": Rule(self, self._radial_bins, "Radial bins", "/radial"),
|
||||
"rr": Rule(self, self._rr, "Coordinate map", "/maps"),
|
||||
|
||||
Reference in New Issue
Block a user