Documentation ¶
Index ¶
- func ReadBinaryRockstarVals(file string, cosmo *io.CosmologyHeader, valFlags ...Val) (ids []int, vals [][]float64, err error)
- func ReadRockstar(file string, rType Radius, cosmo *io.CosmologyHeader) (rids []int, xs, ys, zs, ms, rs []float64, err error)
- func ReadRockstarVals(file string, cosmo *io.CosmologyHeader, valFlags ...Val) (ids []int, vals [][]float64, err error)
- func RockstarConvert(inFile, outFile string) error
- func RockstarConvertTopN(inFile, outFile string, n int) error
- type Bounds
- type Grid
- type Radius
- type SubhaloFinder
- func (sf *SubhaloFinder) FindSubhalos(xs, ys, zs, rs []float64, mult float64)
- func (sf *SubhaloFinder) HostCount(ih int) int
- func (sf *SubhaloFinder) Hosts(ih int) []int
- func (sf *SubhaloFinder) IntersectCount(ih int) int
- func (sf *SubhaloFinder) Intersects(ih int) []int
- func (sf *SubhaloFinder) StartEnd(ih int) (start, end int)
- func (sf *SubhaloFinder) SubhaloCount(ih int) int
- func (sf *SubhaloFinder) Subhalos(ih int) []int
- type Val
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadBinaryRockstarVals ¶
func ReadRockstar ¶
func ReadRockstar( file string, rType Radius, cosmo *io.CosmologyHeader, ) (rids []int, xs, ys, zs, ms, rs []float64, err error)
ReadRockstar reads halo information from the given Rockstar catalog, sorted from largest to smallest.
func ReadRockstarVals ¶
func RockstarConvert ¶
func RockstarConvertTopN ¶
Types ¶
type Bounds ¶
type Bounds struct {
Origin, Span [3]int
}
Bounds is a cell-aligned bounding box.
func (*Bounds) ConvertIndices ¶
ConvertIndices converts non-periodic indices to periodic indices.
func (*Bounds) Inside ¶
Inside returns true if the given value is within the bounding box along the given dimension. The periodic box width is given by width.
func (*Bounds) SphereBounds ¶
SphereBounds creates a cell-aligned bounding box around a non-aligned sphere within a box with periodic boundary conditions.
type Grid ¶
type Grid struct { Cells int Width float64 // Grid-sized Heads []int // Data-sized Next []int // contains filtered or unexported fields }
func (*Grid) AverageLength ¶
func (*Grid) TotalCells ¶
type Radius ¶
type Radius int
func RadiusFromString ¶
func (Radius) RockstarColumn ¶
func (Radius) RockstarMass ¶
type SubhaloFinder ¶
type SubhaloFinder struct {
// contains filtered or unexported fields
}
SubhaloFinder computes which halos in a collection are subhalos of other halos in that collection based purely off of position information.
func NewSubhaloFinder ¶
func NewSubhaloFinder(g *Grid) *SubhaloFinder
NewSubhaloFinder creates a new subhalo finder corresponding to the given Grid.
func (*SubhaloFinder) FindSubhalos ¶
func (sf *SubhaloFinder) FindSubhalos( xs, ys, zs, rs []float64, mult float64, )
FindSubhalos computes.
func (*SubhaloFinder) HostCount ¶
func (sf *SubhaloFinder) HostCount(ih int) int
func (*SubhaloFinder) Hosts ¶
func (sf *SubhaloFinder) Hosts(ih int) []int
func (*SubhaloFinder) IntersectCount ¶
func (sf *SubhaloFinder) IntersectCount(ih int) int
func (*SubhaloFinder) Intersects ¶
func (sf *SubhaloFinder) Intersects(ih int) []int
func (*SubhaloFinder) StartEnd ¶
func (sf *SubhaloFinder) StartEnd(ih int) (start, end int)
func (*SubhaloFinder) SubhaloCount ¶
func (sf *SubhaloFinder) SubhaloCount(ih int) int
func (*SubhaloFinder) Subhalos ¶
func (sf *SubhaloFinder) Subhalos(ih int) []int
type Val ¶
type Val int
const ( Scale Val = iota ID DescScale DescID NumProg PID UPID DescPID Phantom SAMMVir MVir RVir Rs Vrms MMP ScaleOfLastMMP VMax X Y Z Vx Vy Vz Jx Jy Jz Spin BreadthFirstID DepthFirstID TreeRootID OrigHaloID SnapNum NextCoprogenitorDepthFirstID LastProgenitorDepthFirstID RsKylpin MVirAll M200b M200c M500c M2500c XOff Voff SpinBullock BToA CToA Ax Ay Az BToA500c CToA500c Ax500c Ay500c Az500c TU MAcc MPeak VAcc VPeak HalfmassScale AccRateInst AccRate100Myr AccRateTdyn RadVir Rad200b Rad200c Rad500c Rad2500c )