gaia

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 19 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func Load(path string) ([]*http.Cookie, error)

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.

func Save

func Save(cookies []*http.Cookie, path string) error

Save writes a session's cookies to path, readable by its owner alone, over a session saved there before. Whoever holds them is the user who signed in, until they expire. It refuses cookies with no session, and a file anyone else can read.

func SignIn

func SignIn(get web.Web, user, password string) error

SignIn signs a user in to the archive through get, which keeps the session the archive sets. The password goes in the form and nowhere else.

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

func Called(name, columns, where string) (*Archive, error)

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

func From(name, from, columns, where string) (*Archive, error)

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

func New(columns, where string) (*Archive, error)

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

func (*Archive) ByNameOnly() bool

ByNameOnly says the archive is asked only when it is named: its job runs under someone's name, and can run for hours.

func (*Archive) Find

func (archive *Archive) Find(near *celestialdata.Near) (
	[]*celestialdata.Product, error)

Find is one file: the rows within the circle, asked as a job when the file is fetched. A circle as wide as the sky asks for every row, with no circle in its query.

func (*Archive) Name

func (archive *Archive) Name() string

Name is the adapter's name as the command line takes it.

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

func OpenCatalogue(file io.ReaderAt) (*Catalogue, error)

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.

func (*Catalogue) Rows added in v0.0.2

func (catalogue *Catalogue) Rows() int64

Rows is how many sources the catalogue holds.

func (*Catalogue) Source added in v0.0.2

func (catalogue *Catalogue) Source(index int64) (*Source, error)

Source is the source in a row, counted from none. It refuses a row the catalogue does not have, one the file cannot give, and one whose place is not on the sky. A value the archive left empty is not a number.

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.

func (Correlations) Between added in v0.0.2

func (corr Correlations) Between(one, other Parameter) (float64, error)

Between is the correlation between two parameters. It refuses a parameter that is not one of the five, with not a number beside the error.

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.

const (
	RA Parameter = iota
	Dec
	Parallax
	PMRA
	PMDec
)

The five astrometric parameters, in the archive's order.

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) Colour added in v0.0.2

func (source Source) Colour() float64

Colour is the source's BP minus RP colour, in magnitudes.

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

func (source Source) EclipticLatitude() measure.Angle

EclipticLatitude is the source's latitude on the ecliptic.

func (Source) EffectiveWavenumber added in v0.0.2

func (source Source) EffectiveWavenumber() float64

EffectiveWavenumber is the one the source's astrometry used, in inverse micrometres.

func (Source) Epoch added in v0.0.2

func (source Source) Epoch() float64

Epoch is the Julian year the source's place is given at.

func (Source) ID added in v0.0.2

func (source Source) ID() int64

ID is the source's identifier in the archive, its source_id.

func (Source) Magnitude added in v0.0.2

func (source Source) Magnitude() float64

Magnitude is the source's mean G magnitude.

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

func (source Source) MotionError() (ascension, declination float64)

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

func (source Source) Parallax() measure.Angle

Parallax is the source's parallax, which may be negative as the archive measures it.

func (Source) ParallaxError added in v0.0.2

func (source Source) ParallaxError() measure.Angle

ParallaxError is the error of the parallax.

func (Source) ParametersSolved added in v0.0.2

func (source Source) ParametersSolved() int

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

func (source Source) PlaceError() (ascension, declination measure.Angle)

PlaceError is the error of the place, along ascension and along declination.

func (Source) Pseudocolour added in v0.0.2

func (source Source) Pseudocolour() float64

Pseudocolour is the source's astrometrically fitted pseudocolour, in inverse micrometres.

func (Source) RUWE added in v0.0.2

func (source Source) RUWE() float64

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

func (source Source) RadialVelocity() float64

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

func (source Source) RadialVelocityError() float64

RadialVelocityError is the error of the radial velocity in kilometres per second.

func (Source) Spread added in v0.0.2

func (source Source) Spread() (*Spread, error)

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.

func (Source) State added in v0.0.2

func (source Source) State(frame galactocentric.Frame) (*orbit.State,
	error)

State is the source's place and motion about the galactic centre, in the frame given, as celestial's orbit solver runs it; or the frame's refusal, a parallax that gives no distance or a motion past light, with nil beside it.

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

func (spread Spread) Drawn(normal Normal) (*Source, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL