Documentation ¶
Overview ¶
Package dist provides spherical distribution types.
Index ¶
- type Normal
- func (n Normal) CDF(dist float64) float64
- func (n Normal) Lambda() float64
- func (n Normal) LogProb(dist float64) float64
- func (n Normal) LogProbRingDist(rDist int) float64
- func (n Normal) Pix() *earth.Pixelation
- func (n Normal) Prob(dist float64) float64
- func (n Normal) ProbRingDist(rDist int) float64
- func (n Normal) QuantileChord2(cd float64) float64
- func (n Normal) Rand(u earth.Pixel) earth.Pixel
- func (n Normal) Ring(dist float64) float64
- func (n Normal) ScaledProb(dist float64) float64
- func (n Normal) ScaledProbRingDist(rDist int) float64
- func (n Normal) Variance() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Normal ¶
type Normal struct {
// contains filtered or unexported fields
}
Normal is an isotropic univariate spherical normal distribution discretized over a pixelation.
It is based on equation (2) from Hauberg (2018) 2018 IEEE FUSION: 704 <doi:10.23919/ICIF.2018.8455242>:
SN(x|u,v) ∝ exp(-λ * gcd(x,u)^2/2)
where x and u are points on a sphere, u is the mean, λ is the concentration parameter (in 1/radians^2), and gcd is the great circle distance.
func NewNormal ¶
func NewNormal(lambda float64, pix *earth.Pixelation) Normal
NewNormal returns a discretized spherical normal, using lambda as the concentration parameter (in 1/radian^2 units) and using pix as the underlying pixelation.
func (Normal) CDF ¶
CDF returns the probability cumulative density function for a pixel at a distance dist (in radians).
func (Normal) Lambda ¶
Lambda returns the concentration parameter (in 1/radians^2) of a normal distribution.
func (Normal) LogProb ¶
LogProb returns the natural logarithm of the probability density function at a distance dist (in radians).
func (Normal) LogProbRingDist ¶
LogProbRingDist returns the natural logarithm of the probability density function at a given ring distance i.e. the ring of a pixel, if one of the pixels is rotated to the north pole.
func (Normal) Pix ¶
func (n Normal) Pix() *earth.Pixelation
Pix returns the underlying pixelation of a normal distribution.
func (Normal) Prob ¶
Prob returns the value of the probability density function for a pixel at a distance dist (in radians).
func (Normal) ProbRingDist ¶
ProbRingDist returns the the value of the probability density function at a given ring distance i.e. the ring of a pixel, if one of the pixels is rotated to the north pole.
func (Normal) QuantileChord2 ¶
QuantileChord2 returns the square of the Euclidean chord distance for the maximum distance that is inside the indicated cumulative density.
This is useful because sometimes we want to know if a given pixel is inside or outside a critical CDF value and then using the great circle distance.
func (Normal) Rand ¶
Rand returns a random pixel from the underlying pixelation draw from an spherical normal which mean is the pixel u.
func (Normal) Ring ¶
Ring returns the value of the probability density function for a ring at a distance dist (in radians).
func (Normal) ScaledProb ¶
ScaledProb returns the value of the probability density function for a pixel at a distance dist (in radians) scaled by the maximum probability (i.e. by 0 distance).
func (Normal) ScaledProbRingDist ¶
ScaledRingDist returns the value of the probability density function scaled by the maximum probability (i.e. by 0 distance). at a given ring distance i.e. the ring of a pixel, if one of the pixels is rotated to the north pole.