astronn

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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 astronn is the adapter for astroNN's catalogue of APOGEE DR17, from the Sloan Digital Sky Survey: a row for each of allStar's rows, in allStar's order, with what Leung and Bovy's networks read from each spectrum, among them an age, a distance, and an orbit about the Galaxy.

The archive is the one file. A Catalogue reads it, on disk or any io.ReaderAt, and a Star is one of its rows. The file writes no units: each unit here is the one SDSS's data model gives, read 2026-11-06.

The file names some columns as the data model does not: age, dist and the orbit's are lower-cased in it (AGE in the model, age in the file). The reader asks for each as the file names it (sources.yaml).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (*celestialdata.Fixed, error)

New is the archive of astroNN's DR17 catalogue, asked by name only. It holds the one file, whatever the circle.

Types

type Catalogue

type Catalogue struct {
	// contains filtered or unexported fields
}

Catalogue is the astroNN file, read as its rows are asked for.

func OpenCatalogue

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

OpenCatalogue is the catalogue in an astroNN file. It refuses a file with no binary table, one that lacks a column read, and a column of another kind, of many values a row, or with a unit.

func (*Catalogue) Find

func (catalogue *Catalogue) Find(sources ...int64) ([]*Star, error)

Find is every row whose star is one of the Gaia DR3 sources given, in the file's order. It reads every row, a pass over the whole file; a row with no source is never one asked. A caller who knows a star's row in allStar asks Star for that row instead.

func (*Catalogue) Rows

func (catalogue *Catalogue) Rows() int64

Rows is how many rows the file holds: one for each of allStar's, in allStar's order, so a star's row here is its row there.

func (*Catalogue) Star

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

Star is the star in a row, counted from none. It refuses a row the file does not have or cannot give, by its number. A number the networks left empty is not a number, and a source Gaia did not match is no source.

type Star

type Star struct {
	// contains filtered or unexported fields
}

Star is one row of the astroNN file: what the networks read from one of allStar's spectra. Units are the data model's.

func (Star) Age

func (star Star) Age() float64

Age is the star's age in Gyr as the catalogue recommends it, age_lowess_correct: the networks' age with their bias taken out by a LOWESS fit (Mackereth et al. 2019).

func (Star) AgeError

func (star Star) AgeError() float64

AgeError is the age's whole uncertainty in Gyr, age_total_error.

func (Star) AgeLinear

func (star Star) AgeLinear() float64

AgeLinear is the age in Gyr with a linear correction of its bias, age_linear_correct.

func (Star) AgeModelError

func (star Star) AgeModelError() float64

AgeModelError is the part of the age's uncertainty in Gyr that is the networks' own, age_model_error.

func (Star) AgeUncorrected

func (star Star) AgeUncorrected() float64

AgeUncorrected is the networks' age in Gyr before any correction, age.

func (Star) AngularMomentum

func (star Star) AngularMomentum() float64

AngularMomentum is the orbit's angular momentum about the Galaxy's axis in kpc km/s, Lz.

func (Star) Apocentre

func (star Star) Apocentre() float64

Apocentre is the orbit's farthest distance from the centre in kpc, rap.

func (Star) Distance

func (star Star) Distance() (float64, float64)

Distance is the star's distance in parsecs from its spectrum alone, dist, and its uncertainty.

func (Star) Eccentricity

func (star Star) Eccentricity() float64

Eccentricity is the eccentricity of the star's orbit about the Galaxy, e.

func (Star) Energy

func (star Star) Energy() float64

Energy is the orbit's energy in (km/s)^2, Energy.

func (Star) GaiaID

func (star Star) GaiaID() (int64, bool)

GaiaID is the star's Gaia source, its source_id, and whether Gaia matched one.

func (Star) HighestAbovePlane

func (star Star) HighestAbovePlane() float64

HighestAbovePlane is how far the orbit climbs from the Galaxy's plane in kpc, zmax.

func (Star) ID

func (star Star) ID() string

ID is the star's id in APOGEE, its APOGEE_ID, as allStar has it.

func (Star) Pericentre

func (star Star) Pericentre() float64

Pericentre is the orbit's nearest distance from the Galaxy's centre in kpc, rperi.

func (Star) Telescope

func (star Star) Telescope() string

Telescope is the telescope the row's spectra came from.

func (Star) WeightedDistance

func (star Star) WeightedDistance() (float64, float64)

WeightedDistance is the distance in parsecs the catalogue recommends, weighted_dist: the spectrum's distance weighed with Gaia's parallax, and its uncertainty.

Jump to

Keyboard shortcuts

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