size_function.h#
#include <sif/structures/size_function.h>
-
SIF_STRUCTURES_SIZE_FUNCTION_H#
The void size function: number density of voids per radius bin.
One container serves both a measured size function, binned from a catalogue, and a modelled one evaluated pointwise. That is what lets the two be compared, plotted and combined without converting between representations – at the cost of a few fields being meaningful in only one of the two cases, noted individually below.
-
struct sif_size_function_t#
A void size function, measured or modelled.
Produced either by binning a catalogue (sif_size_function_catalog()) or by a model; released with sif_size_function_free().
-
sif_option options#
Options the size function was produced with. Records in particular whether #vsf is per unit ln R (SIF_VSF_BIN_LN) or per unit R (SIF_VSF_BIN_LINEAR), which nothing else in the struct reveals.
-
uint64_t *counts#
Raw void count per bin. Zero for a model, which is evaluated pointwise and never counts anything.
-
sif_option options#
-
struct sif_interval_t#
A closed interval of radius.
-
void sif_size_function_free(sif_size_function_t *vsf)#
Release a size function.
- Parameters:
vsf – Size function to free. NULL is accepted and ignored.
-
static inline sif_real sif_size_function_get(const sif_size_function_t *vsf, uint32_t bin_idx)#
The normalized number density in one bin.
- Parameters:
vsf – The size function.
bin_idx – Bin to read; must be below sif_size_function_t::n_bins.
- Returns:
The value of #vsf in that bin.
Warning
The index is not checked. Reading past the last bin is undefined.