Documentation
¶
Overview ¶
Package gaia is the adapter for ESA's Gaia archive: rows of Gaia DR3's gaia_source, as FITS, asked as a job of the archive's TAP service. A job runs under the session SignIn starts, so the archive knows whose it is.
It reads what a job answered, too: a Catalogue is the product on disk, and a Source one of its rows as celestial's types, for celestial's galactocentric frame and orbit's solver to take.
The archive's account of its service, read 2026-11-05: https://www.cosmos.esa.int/web/gaia-users/archive/programmatic-access
Index ¶
- Constants
- func Load(path string) ([]*http.Cookie, error)
- func Save(cookies []*http.Cookie, path string) error
- func SignIn(get web.Web, user, password string) error
- type Archive
- type Catalogue
- type Correlations
- type Normal
- type Parameter
- type Source
- func (source Source) As(sighting galactocentric.Sighting) Source
- func (source Source) Colour() float64
- func (source Source) Correlations() Correlations
- func (source Source) EclipticLatitude() measure.Angle
- func (source Source) EffectiveWavenumber() float64
- func (source Source) Epoch() float64
- func (source Source) ID() int64
- func (source Source) Magnitude() float64
- func (source Source) Motion() galactocentric.ProperMotion
- func (source Source) MotionError() (ascension, declination float64)
- func (source Source) Parallax() measure.Angle
- func (source Source) ParallaxError() measure.Angle
- func (source Source) ParametersSolved() int
- func (source Source) Place() sky.Equatorial
- func (source Source) PlaceError() (ascension, declination measure.Angle)
- func (source Source) Pseudocolour() float64
- func (source Source) RUWE() float64
- func (source Source) RadialVelocity() float64
- func (source Source) RadialVelocityError() float64
- func (source Source) Spread() (*Spread, error)
- func (source Source) State(frame galactocentric.Frame) (*orbit.State, error)
- type Spread
Constants ¶
const Service = "https://gea.esac.esa.int/tap-server"
Service is the archive's TAP service. Its session is kept for it.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load reads the cookies Save wrote to path. It refuses a file anyone but its owner can read, and one with no session in it.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive is gaia_source, or a table joined to it, asked for some columns of the rows that meet a condition. Its files are named for what it asks: gaia_source's for gaia_source.
func Called ¶ added in v0.0.3
Called is the archive as New makes it, known by another name: one command can then ask gaia_source more than one question, each by its own name. It refuses a name that is not one word, and no columns.
func From ¶ added in v0.0.3
From is the archive asked of another table than gaia_source: a join of gaia_source to a table that has no places of its own, as the distances of Bailer-Jones et al. (2021) are, so a circle can still find their rows.
A file holds every star the circle finds, its neighbours too, in no order the archive promises, and a star the joined table has no value for is still a row, its value empty or NaN.
A reader takes the star it wants by its source_id, never by its row's place, and says what it does with a missing value; sorting does not make a place an identity.
Its files are named for the name it is called by. It refuses a name that is not one word, no table and no columns.
func New ¶
New is the archive, asked for columns of the rows that meet where, or of every row when where is none. It refuses no columns.
func (*Archive) ByNameOnly ¶
ByNameOnly says the archive is asked only when it is named: its job runs under someone's name, and can run for hours.
type Catalogue ¶ added in v0.0.2
type Catalogue struct {
// contains filtered or unexported fields
}
Catalogue is what the archive's job answered, on disk: gaia_source rows in a FITS binary table, read as they are asked for.
Its columns are the query's, found by name; each is held to the archive's kind and unit, since a column of another kind or in another unit would be another query, or another archive's writing of this one.
func OpenCatalogue ¶ added in v0.0.2
OpenCatalogue is the catalogue in a product file. It refuses a file with no binary table, one that lacks a column of the query, and a column of another kind or in another unit than the archive writes.
type Correlations ¶ added in v0.0.2
type Correlations struct {
// contains filtered or unexported fields
}
Correlations is the correlation between each pair of the five astrometric parameters, as the archive gives them: one for a parameter with itself.
type Normal ¶ added in v0.0.2
type Normal interface {
NormFloat64() float64
}
Normal is a source of draws of a standard normal, as math/rand's Rand is. It is the caller's, so a source's draws repeat when the caller's do.
type Parameter ¶ added in v0.0.2
type Parameter int
Parameter is one of the five astrometric parameters the archive solves together.
type Source ¶ added in v0.0.2
type Source struct {
// contains filtered or unexported fields
}
Source is one star as gaia_source has it: where it is on the sky at the catalogue's epoch, how far it is by its parallax, how it moves across the sky and along the line of sight, each with its error, and the correlations between its five astrometric parameters.
With them its RUWE, its G magnitude and BP minus RP colour, the effective wavenumber its astrometry used and its pseudocolour, its ecliptic latitude, and which parameters were solved.
The id and the parameters solved are whole numbers read whole; the archive writes no TNULL on them, so neither is ever null, and a null written one day would read as the number it is.
func (Source) As ¶ added in v0.0.2
func (source Source) As(sighting galactocentric.Sighting) Source
As is what the archive would hold for another star, measured as well as this one: the sighting's place, parallax, proper motion and radial velocity, with this source's id, errors, correlations and the rest.
A star made in the frame borrows a real star's errors so, to be drawn as Gaia would have measured it.
func (Source) Correlations ¶ added in v0.0.2
func (source Source) Correlations() Correlations
Correlations are the correlations between the source's five astrometric parameters.
func (Source) EclipticLatitude ¶ added in v0.0.2
EclipticLatitude is the source's latitude on the ecliptic.
func (Source) EffectiveWavenumber ¶ added in v0.0.2
EffectiveWavenumber is the one the source's astrometry used, in inverse micrometres.
func (Source) Motion ¶ added in v0.0.2
func (source Source) Motion() galactocentric.ProperMotion
Motion is the source's proper motion.
func (Source) MotionError ¶ added in v0.0.2
MotionError is the error of the proper motion along ascension and along declination, in milliarcseconds a year.
func (Source) Parallax ¶ added in v0.0.2
Parallax is the source's parallax, which may be negative as the archive measures it.
func (Source) ParallaxError ¶ added in v0.0.2
ParallaxError is the error of the parallax.
func (Source) ParametersSolved ¶ added in v0.0.2
ParametersSolved is which astrometric parameters the archive solved for the source, as its astrometric_params_solved has it: 3 for a place alone, 31 for all five, 95 with the pseudocolour.
func (Source) Place ¶ added in v0.0.2
func (source Source) Place() sky.Equatorial
Place is where the source is on the sky at the epoch.
func (Source) PlaceError ¶ added in v0.0.2
PlaceError is the error of the place, along ascension and along declination.
func (Source) Pseudocolour ¶ added in v0.0.2
Pseudocolour is the source's astrometrically fitted pseudocolour, in inverse micrometres.
func (Source) RUWE ¶ added in v0.0.2
RUWE is the source's renormalised unit weight error, the archive's measure of how well one star's motion fits its observations.
func (Source) RadialVelocity ¶ added in v0.0.2
RadialVelocity is the source's speed along the line of sight in kilometres per second, away from the Sun.
func (Source) RadialVelocityError ¶ added in v0.0.2
RadialVelocityError is the error of the radial velocity in kilometres per second.
func (Source) Spread ¶ added in v0.0.2
Spread is the source's errors ready to draw from, the covariance of its five parameters built from their errors and correlations: the ascension's error is along the sky, times the cosine of the declination, as the archive gives it.
It refuses a covariance that is not positive definite, which no draw can come from, with nil beside the error. An error the archive left empty is one of those, since it is not a number.
type Spread ¶ added in v0.0.2
type Spread struct {
// contains filtered or unexported fields
}
Spread is a source's errors made ready to draw from: the lower triangle whose product with its transpose is the covariance of the five astrometric parameters, beside the source itself.
func (Spread) Drawn ¶ added in v0.0.2
Drawn is the source moved by its errors, with six draws of the normal: one for each of the five parameters in the archive's order, through the covariance's triangle so they move together as their correlations have them, then one for the radial velocity.
The drawn source keeps the source's errors and correlations.
The drawn ascension is within one turn, as the archive's are. It refuses a draw that moves the source past a pole, with nil beside the error.