Python wrapper around hmpdf.h.
More...
Inherits object.
|
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...
|
|
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.
◆ init()
None init |
( |
|
self, |
|
|
str |
class_ini, |
|
|
str |
stype, |
|
|
Optional[float] |
zsource = None , |
|
|
** |
kwargs |
|
) |
| |
Initializes the object [calls hmpdf_init()].
- Parameters
-
class_ini | CLASS .ini file |
stype | signal type (either "kappa" or "tsz") |
zsource | source redshift. Use only if stype="kappa" |
**kwargs | optional 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
-
binedges | 1d, defines how the PDF is binned |
incl_2h | whether to include the two-halo term |
noisy | whether 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
-
phi | angular separation of the two sky locations (in arcmin) |
binedges | 1d, defines how the PDF is binned |
noisy | whether 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
-
binedges | 1d, defines how the covariance matrix is binned |
noisy | whether 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
-
ell | 1d, the angular wavenumbers |
mode | one 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
-
phi | 1d, the angular separations (in arcmin) |
mode | one 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_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
-
binedges | 1d, defines how the histogram is binned |
new_map | whether 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_map | whether 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: