hmpdf
One- and two-point PDFs within the halo model.
HMPDF Class Reference

Python wrapper around hmpdf.h. More...

Inherits object.

Public Member Functions

None __init__ (self)
 calls hmpdf_new().
 
None __del__ (self)
 calls hmpdf_delete()
 
'HMPDF__enter__ (self)
 returns object
 
None __exit__ (self, exc_type, exc_value, exc_traceback)
 calls hmpdf_delete()
 
None init (self, str class_ini, str stype, Optional[float] zsource=None, **kwargs)
 Initializes the object [calls hmpdf_init()]. More...
 
np.ndarray get_op (self, Union[Sequence[float], np.ndarray] binedges, bool incl_2h=True, bool noisy=False)
 Get the one-point PDF [calls hmpdf_get_op()]. More...
 
np.ndarray get_tp (self, float phi, Union[Sequence[float], np.ndarray] binedges, bool noisy=False)
 Get the two-point PDF [calls hmpdf_get_tp()]. More...
 
np.ndarray get_cov (self, Union[Sequence[float], np.ndarray] binedges, bool noisy=False)
 Get the covariance matrix of the one-point PDF [calls hmpdf_get_cov()]. More...
 
np.ndarray get_Cell (self, Union[Sequence[float], np.ndarray] ell, str mode='total')
 Get the angular power spectrum [calls hmpdf_get_Cell()]. More...
 
np.ndarray get_Cphi (self, Union[Sequence[float], np.ndarray] phi, str mode='total')
 Get the angular correlation function [calls hmpdf_get_Cphi()]. More...
 
Tuple[np.ndarray, np.ndarray, np.ndarray] get_cov_diagnostics (self)
 Get the covariance diagnostics [calls hmpdf_get_cov_diagnostics()]. More...
 
np.ndarray get_map_op (self, Union[Sequence[float], np.ndarray] binedges, bool new_map=True)
 Get the histogram of pixel values in a simplified simulation [calls hmpdf_get_map_op()]. More...
 
np.ndarray get_map (self, bool new_map=True)
 Get a map from the simplified simulation [calls hmpdf_get_map()]. More...
 

Detailed Description

Python wrapper around hmpdf.h.

The general interface is very similar to the C one, so please read the documentation for this. The differences are:

Best used in a context manager.

Member Function Documentation

◆ init()

None init (   self,
str  class_ini,
str  stype,
Optional[float]  zsource = None,
**  kwargs 
)

Initializes the object [calls hmpdf_init()].

Parameters
class_iniCLASS .ini file
stypesignal type (either "kappa" or "tsz")
zsourcesource redshift. Use only if stype="kappa"
**kwargsoptional settings, see the documentation of hmpdf_configs_e.

◆ get_op()

np.ndarray get_op (   self,
Union[Sequence[float], np.ndarray]  binedges,
bool  incl_2h = True,
bool  noisy = False 
)

Get the one-point PDF [calls hmpdf_get_op()].

Parameters
binedges1d, defines how the PDF is binned
incl_2hwhether to include the two-halo term
noisywhether to include pixel-wise Gaussian noise
Returns
the binned PDF (1d)

◆ get_tp()

np.ndarray get_tp (   self,
float  phi,
Union[Sequence[float], np.ndarray]  binedges,
bool  noisy = False 
)

Get the two-point PDF [calls hmpdf_get_tp()].

Parameters
phiangular separation of the two sky locations (in arcmin)
binedges1d, defines how the PDF is binned
noisywhether to include pixel-wise Gaussian noise
Returns
the binned PDF (2d)

◆ get_cov()

np.ndarray get_cov (   self,
Union[Sequence[float], np.ndarray]  binedges,
bool  noisy = False 
)

Get the covariance matrix of the one-point PDF [calls hmpdf_get_cov()].

Parameters
binedges1d, defines how the covariance matrix is binned
noisywhether to include pixel-wise Gaussian noise
Returns
the binned covariance matrix (2d)

◆ get_Cell()

np.ndarray get_Cell (   self,
Union[Sequence[float], np.ndarray]  ell,
str  mode = 'total' 
)

Get the angular power spectrum [calls hmpdf_get_Cell()].

Parameters
ell1d, the angular wavenumbers
modeone of "onehalo", "twohalo", "total"
Returns
the power spectrum at ell (1d)

◆ get_Cphi()

np.ndarray get_Cphi (   self,
Union[Sequence[float], np.ndarray]  phi,
str  mode = 'total' 
)

Get the angular correlation function [calls hmpdf_get_Cphi()].

Parameters
phi1d, the angular separations (in arcmin)
modeone of "onehalo", "twohalo", "total"
Returns
the correlation function at phi (1d)

◆ get_cov_diagnostics()

Tuple[np.ndarray, np.ndarray, np.ndarray] get_cov_diagnostics (   self)

Get the covariance diagnostics [calls hmpdf_get_cov_diagnostics()].

Returns
(phi, phiweights, corr_diagn)

◆ get_map_op()

np.ndarray get_map_op (   self,
Union[Sequence[float], np.ndarray]  binedges,
bool  new_map = True 
)

Get the histogram of pixel values in a simplified simulation [calls hmpdf_get_map_op()].

Parameters
binedges1d, defines how the histogram is binned
new_mapwhether to rerun the simulation (even if a map has already been computed)
Returns
the histogram (normalized, 1d)

◆ get_map()

np.ndarray get_map (   self,
bool  new_map = True 
)

Get a map from the simplified simulation [calls hmpdf_get_map()].

Parameters
new_mapwhether to rerun the simulation (even if a map has already been computed)
Returns
the map (2d)

The documentation for this class was generated from the following file: