Virtual Method

NumCosmoGalaxyShapePopeval_p_rho2

Declaration [src]

gdouble
eval_p_rho2 (
  NcGalaxyShapePop* gsp,
  NcGalaxyShapePopData* data,
  const gdouble rho2
)

Description [src]

Evaluates the same density as nc_galaxy_shape_pop_eval_p(), but parameterized directly by $\rho^2$ instead of $x$. The default implementation just substitutes $x=\rho^2/(1+\rho^2)$ into eval_p(); a subclass overrides it only when its density has a genuinely more direct or better-conditioned form in $\rho^2$ (see NcGalaxyShapePopBeta, whose density is a rational power of $\rho^2$ with no need to ever form $1-x$ by subtraction). Intended for calculators that already work in $(u,v)$ via a disc-compactifying substitution (e.g. NcGalaxyShapeFactorQuad), where $\rho^2$ is the natural coordinate.

Parameters

data

Type: NcGalaxyShapePopData

A resolved NcGalaxyShapePopData.

The data is owned by the caller of the method.
rho2

Type: const gdouble

$\rho^2 = u^2+v^2 \geq 0$, related to $x=|\chi_I|^2$ by $x = \rho^2/(1+\rho^2)$.

Return value

Type: gdouble

The density $P(x)$.