Documentation
¶
Overview ¶
Package gw is gravitational waves as the LIGO, Virgo and Kagra detectors publish them through the gravitational wave open science centre, called the centre here: the events of its catalogues, each with its estimates and their credible intervals, read into si units.
gw knows the centre's format, not its parameters' meanings: an event holds every estimate the centre gives under the centre's own name for it, and a caller asks for one by that name. A value the centre leaves blank is absent, never nought, and a bound it leaves blank is unknown.
Units arrive as strings, M_sun or Mpc; each is turned into si as it is read, by a table of the strings the centre writes, and a string not in the table is refused. Time is the event's gps time, as a sky.Instant.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Estimate ¶
type Estimate struct {
// contains filtered or unexported fields
}
Estimate is a value the centre publishes for an event, in si units, and its credible interval, as the centre states it: how far below and above the value the interval runs. the centre gives ninety per cent intervals. A bound it leaves blank is unknown.
func (*Estimate) Interval ¶
Interval is the lowest and highest the credible interval reaches, and whether the centre gave both its bounds. When it did not, the interval is not known and the two are the value.
func (*Estimate) String ¶
String is the estimate as the centre writes it: the value, the interval's reach below and above, and the unit.
type Estimator ¶
Estimator gives estimates by the centre's name for each parameter. Event is one. A caller that reads estimates takes an Estimator, so its tests can stand the generated mock in for an event.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is one merger in one of the centre's catalogues:
- its name and version
- the catalogue it is in
- its gps time
- every estimate the centre gives for it, each under the centre's own name for the parameter
func ReadEvents ¶
ReadEvents is every event in the centre's event json, as its event api serves it: an object of events, each keyed by name and version, read in the order of their keys. returns nil and error for:
- a file that is not that json, or holds no events
- an event without its name or gps time, or a gps time sky refuses
- a value without a unit, or in a unit gw has no conversion for
- a bound on the wrong side of its value
func (*Event) Catalog ¶
Catalog is the short name of the event's catalogue, as the centre writes it.
func (*Event) Estimate ¶
Estimate is the event's estimate of a parameter, by the centre's name for it. returns nil and error for a parameter the event has none of, whether the centre left it blank or never gave it.
func (*Event) Parameters ¶
Parameters is the name of every parameter the event has an estimate for, sorted.