delta_distribution.h#
#include <sif/measure/delta_distribution.h>
-
SIF_MEASURE_DELTA_DISTRIBUTION_H#
Measuring the one-point PDF of the smoothed density contrast.
Smooths the gridded field at each radius in Fourier space and histograms the cell values. Pair it with a phase-randomized surrogate – same seed, same spectrum, randomized phases – and the difference between the two PDFs is the non-Gaussian information the field carries.
-
sif_delta_distribution_t *sif_delta_distribution_grid(const sif_grid_t *grid, const sif_real *radii, uint32_t n_radii, uint32_t n_bins, const sif_real delta_bounds[2], uint64_t seed, sif_option opt)#
Measure the PDF of the smoothed density contrast on a grid.
- Parameters:
grid – Density contrast field, from sif_grid_to_density_contrast(). Read only.
radii – Smoothing radii, each at least two cell lengths and at most half the box. Radii below that resolve grid artefacts rather than field, so they are rejected instead of returning a plausible-looking answer.
n_radii – Number of radii.
n_bins – Histogram bins per radius.
delta_bounds – Histogram range, {min, max}, strictly increasing. Samples outside it are counted in the total but not binned, so a row integrates to the fraction that fell in range.
seed – Seed for the phase shuffle; unused when not shuffling. The same seed and grid size give the same surrogate here and in sif_delta_moments_grid(), which is what lets the two describe one field.
opt – SIF_DELTA_SHUFFLE_*, SIF_DELTA_FILTER_*, SIF_DELTA_KEEP_CIC_WINDOW.
- Returns:
Newly allocated distribution, released with sif_delta_distribution_free(), or NULL on invalid input or failure.