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.

sif_real r_min#

Lower edge of the first bin.

sif_real r_max#

Upper edge of the last bin.

sif_real *r_edges#

n_bins + 1 bin edges.

sif_real *r_centers#

n_bins bin centres.

uint64_t *counts#

Raw void count per bin. Zero for a model, which is evaluated pointwise and never counts anything.

sif_real *vsf#

Normalized number density per bin: the size function itself.

sif_real *err#

Poisson error on #vsf, from #counts. Zero for a model.

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.