Class

NumCosmoMathDataPoisson

Description [src]

abstract class NumCosmoMath.DataPoisson : NumCosmoMath.Data
{
  /* No available fields */
}

Abstract class for binned Poisson data.

The data are the counts $N_i$ in NcmDataPoisson:n-bins bins, with edges NcmDataPoisson:bin-edges, each drawn from a Poisson distribution of mean $\lambda_i$. Subclasses implement the mean_func virtual method, which returns $\lambda_i$ for bin $i$ given the models in a NcmMSet; ncm_data_poisson_get_bin_range() gives the edges of the bin.

$-2\ln L$ is the Poisson deviance, relative to the saturated model $\lambda_i = N_i$: $$-2\ln L = -2\sum_i \left[N_i \ln(\lambda_i/N_i) - \lambda_i + N_i\right],$$ with the term $2\lambda_i$ for an empty bin. The least-squares vector holds the square roots of the terms, and the Fisher matrix uses the variance $\lambda_i$.

Ancestors

Instance methods

ncm_data_poisson_get_bin_edges

Gets the n-bins + 1 bin edges.

ncm_data_poisson_get_bin_range

Gets the edges of bin i, for use in mean_func.

ncm_data_poisson_get_hist_means

Computes the mean $\lambda_i$ of each bin given the models in mset.

ncm_data_poisson_get_hist_vals

Gets the counts $N_i$ in each bin.

ncm_data_poisson_get_size

Gets the data size.

ncm_data_poisson_get_sum

Gets the sum of all bins.

ncm_data_poisson_init_from_binning

Sets the bins to those with edges nodes, counts the values in x that fall in each bin (values outside the edges are ignored) and marks the data initialized.

ncm_data_poisson_init_from_vector

Sets the bins to those with edges nodes and the counts to N, which must have one component less than nodes, and marks the data initialized.

ncm_data_poisson_init_zero

Sets the bins to those with edges nodes, with zero counts, and marks the data initialized.

ncm_data_poisson_set_size

Sets the number of bins to nbins.

Methods inherited from NcmData (29)

Please see NcmData for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.DataPoisson:bin-edges

The $n + 1$ bin edges, in increasing order.

NumCosmoMath.DataPoisson:mean

The counts $N_i$ in each bin.

NumCosmoMath.DataPoisson:n-bins

The number of bins; changing it reallocates the data, sets the edges to $0, 1, \dots, n$ and marks the data not initialized.

Properties inherited from NcmData (5)
NumCosmoMath.Data:bootstrap

The NcmData bootstrap object if any.

NumCosmoMath.Data:desc

Description of the data object.

NumCosmoMath.Data:init

Whether the NcmData is initialized, i.e., holds data.

NumCosmoMath.Data:long-desc

Detailed description of the data object.

NumCosmoMath.Data:name

Name of the data object.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct NumCosmoMathDataPoissonClass {
  gdouble (* mean_func) (
    NcmDataPoisson* poisson,
    NcmMSet* mset,
    guint n
  );
  void (* set_size) (
    NcmDataPoisson* poisson,
    guint nbins
  );
  guint (* get_size) (
    NcmDataPoisson* poisson
  );
  
}

No description available.

Class members
mean_func: gdouble (* mean_func) ( NcmDataPoisson* poisson, NcmMSet* mset, guint n )

No description available.

set_size: void (* set_size) ( NcmDataPoisson* poisson, guint nbins )

No description available.

get_size: guint (* get_size) ( NcmDataPoisson* poisson )

No description available.

Virtual methods

NumCosmoMath.DataPoissonClass.mean_func
No description available.

NumCosmoMath.DataPoissonClass.set_size

Sets the number of bins to nbins.