public class Edsd extends Object
Constructor and Description |
---|
Edsd(double plx,
double eplx,
double l)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
NumericFunction |
calculateCdf(double tol)
Integrates the PDF to provide a numerical approximation of the
cumulative density function.
|
double |
getBestEstimation()
Returns the position of the favoured mode of the PDF.
|
Function |
getPdf()
Returns the PDF corresponding to this prior.
|
NumericFunction |
getSampledPdf(NumericFunction cdf)
Returns a numerical reconstruction of the PDF based on the
samples used to perform the CDF integration.
|
double |
getUnnormalizedProbabilityAt(double r)
Returns the unnormalized PDF (posterior) for this prior
evaluated at a given distance.
|
public Edsd(double plx, double eplx, double l)
plx
- parallaxeplx
- error in parallaxl
- distance scalepublic double getBestEstimation()
public double getUnnormalizedProbabilityAt(double r)
Note this differs by a numerical factor (a function of plx, eplx and l) from the similarly named function in gaia.cu9.tools.parallax.PDF.ExpDecrVolumeDensityDEM. This nominally makes no difference, since the result of this function is declared unnormalised and will generally be scaled before further use. However, in practice this method will return a definite result for parameter ranges in which the CU9 code faces numerical overflow and returns Infinity.
r
- distance (in kpc or parsec)public Function getPdf()
public NumericFunction calculateCdf(double tol)
Careful when interpolating this. The spline interpolation for plx=40, eplx=0.75, l=1.35 gives some nasty results at high r. Linear and quadratic interpolations are OK.
tol
- calculation tolerancepublic NumericFunction getSampledPdf(NumericFunction cdf)
cdf
- calculated cumulative density function;
this is only used to supply the sample X valuesCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.