Documentation ¶
Index ¶
- func FilterPoints(rs []RingBuffer, levels int, hFactor float64) (pxs, pys [][]float64, ok bool)
- func GaussianKDE(xs []float64, h, low, high float64, n int) *intr.Spline
- func NaNSplit(vals []float64, opts ...NaNSplitOption) (valSets [][]float64, auxSets [][][]float64)
- func PennaCoeffs(xs, ys, zs []float64, I, J, K int) []float64
- func Smooth(xs, ys []float64, window int, opts ...SmoothOption) (vals, derivs []float64, ok bool)
- func SplashbackRadius(rs, rhos, derivs []float64, opts ...SplashbackRadiusOption) (r float64, ok bool)
- type KDETree
- func (kt *KDETree) FilterNearby(rs, ths []float64, level int, dr float64) (fRs, fThs []float64, idxs []int)
- func (kt *KDETree) GetConnMaxes(level int) (rs, ths []float64)
- func (kt *KDETree) GetRFunc(level int, rt RFuncType) func(float64) float64
- func (kt *KDETree) H() float64
- func (kt *KDETree) PlotLevel(level int, opts ...interface{})
- type NaNSplitOption
- type ProjectedShell
- type RFuncType
- type RingBuffer
- func (r *RingBuffer) Clear()
- func (r *RingBuffer) Init(n, bins int)
- func (r *RingBuffer) OkPlaneCoords(xs, ys []float64) (okXs, okYs []float64)
- func (r *RingBuffer) OkPolarCoords(rs, phis []float64) (okRs, okPhis []float64)
- func (r *RingBuffer) Splashback(h los.Halo, ring int, window int, dLim float64)
- type Shell
- func (s Shell) CartesianSampledVolume(samples int, rMax float64) float64
- func (s Shell) Contains(x, y, z float64) bool
- func (s1 Shell) DiffVolume(s2 Shell, samples int) float64
- func (s1 Shell) MaxDiff(s2 Shell, samples int) float64
- func (s Shell) MeanRadius(samples int) float64
- func (s Shell) MedianRadius(samples int) float64
- func (s Shell) Moments(samples int) (Ix, Iy, Iz float64)
- func (s Shell) RadialRange(samples int) (low, high float64)
- func (s Shell) SurfaceArea(samples int) float64
- func (s Shell) Volume(samples int) float64
- type SmoothOption
- type SplashbackRadiusOption
- type Tracers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPoints ¶
func FilterPoints( rs []RingBuffer, levels int, hFactor float64, ) (pxs, pys [][]float64, ok bool)
func NaNSplit ¶
func NaNSplit( vals []float64, opts ...NaNSplitOption, ) (valSets [][]float64, auxSets [][][]float64)
NaNSplit splits a slice into all non-empty sub-slices which are separated by NaNs. Additional arrays may be passed to NaNSplit, which will be split at the same locations.
func PennaCoeffs ¶
func Smooth ¶
func Smooth( xs, ys []float64, window int, opts ...SmoothOption, ) (vals, derivs []float64, ok bool)
Smooth returns a smoothed 1D series as well as the derivative of that series using a Savitzky-Golay filter of the given size. It also takes optional arguments which allow the smoothing to be done in-place.
func SplashbackRadius ¶
func SplashbackRadius( rs, rhos, derivs []float64, opts ...SplashbackRadiusOption, ) (r float64, ok bool)
Types ¶
type KDETree ¶
type KDETree struct {
// contains filtered or unexported fields
}
func NewKDETree ¶
func (*KDETree) FilterNearby ¶
func (*KDETree) GetConnMaxes ¶
type NaNSplitOption ¶
type NaNSplitOption internalNaNSplitOption
NaNSplitOption is an abstract data type which allows for the customization of calls to NaNSplit without cluttering the call signature in the common case. This works similarly to kwargs in other languages.
func Aux ¶
func Aux(aux ...[]float64) NaNSplitOption
Aux gives additional slices to NaNSplit which will be split at the same locations as the main input array.
func AuxSets ¶
func AuxSets(auxSets [][][]float64) NaNSplitOption
AuxSets supplies NaNSplit with a pre-allocated valSets array.
func ValSets ¶
func ValSets(valSets [][]float64) NaNSplitOption
ValSets supplies NaNSplit with a pre-allocated valSets array.
type ProjectedShell ¶
type ProjectedShell func(h *los.HaloProfiles, ring int, phi float64) float64
func PennaPlaneFit ¶
func PennaPlaneFit( xs, ys [][]float64, hRef *los.HaloProfiles, I, J int, ) (cs []float64, shell ProjectedShell)
type RingBuffer ¶
type RingBuffer struct {
PlaneXs, PlaneYs, Xs, Ys, Zs, Rs, Phis []float64
Oks []bool
N, Bins int
// contains filtered or unexported fields
}
func (*RingBuffer) Clear ¶
func (r *RingBuffer) Clear()
func (*RingBuffer) Init ¶
func (r *RingBuffer) Init(n, bins int)
func (*RingBuffer) OkPlaneCoords ¶
func (r *RingBuffer) OkPlaneCoords(xs, ys []float64) (okXs, okYs []float64)
func (*RingBuffer) OkPolarCoords ¶
func (r *RingBuffer) OkPolarCoords(rs, phis []float64) (okRs, okPhis []float64)
func (*RingBuffer) Splashback ¶
type Shell ¶
func CumulativeShells ¶
func PennaVolumeFit ¶
func (Shell) CartesianSampledVolume ¶
func (Shell) MeanRadius ¶
func (Shell) MedianRadius ¶
func (Shell) RadialRange ¶
func (Shell) SurfaceArea ¶
type SmoothOption ¶
type SmoothOption internalSmoothOption
SmoothOption is an abstract data type which allows for the customization of calls to Smooth without cluttering the call signature in the common case. This works similarly to kwargs in other languages.
func Derivs ¶
func Derivs(derivs []float64) SmoothOption
Derivs supplies Smooth with a slice which smoothed derivatives can be written to.
func Vals ¶
func Vals(vals []float64) SmoothOption
Vals supplies Smooth with a slice which smoothed values can be written to.
type SplashbackRadiusOption ¶
type SplashbackRadiusOption internalSplashbackRadiusOption
func DLim ¶
func DLim(dLim float64) SplashbackRadiusOption
DLim sets limit for d ln(rho) / d ln(r) above which point cannot be the splashback radius. The default value is -5.