galah

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: 9 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 galah is the adapter for GALAH DR4's allstar, from Data Central: one row a star the GALAH survey observed with HERMES on the Anglo-Australian Telescope, with the parameters and abundances its pipeline fit, lithium among them.

The archive is the one file. A Catalogue reads it on disk, and a Star is one of its rows. The file writes no units on the columns read: each value's unit here is the survey's, and the flags are its flags page's, both read 2026-11-06 (sources.yaml).

Index

Constants

View Source
const (
	EmissionLines = 0 // defined: value 1, emission lines
	// SingleLinedBinary is defined: value 4, a single-line spectroscopic
	// binary.
	SingleLinedBinary = 2
	// DoubleLinedBinary is defined: value 8, a double-line spectroscopic
	// binary.
	DoubleLinedBinary = 3
	TripleStar        = 7  // defined: value 128, a triple star warning
	IronWarn          = 10 // defined: value 1024, a warning on [Fe/H]
	LowSNR            = 11 // defined: value 2048, low S/N
	NotConverged      = 12 // defined: value 4096, the fit did not converge
	Extrapolated      = 13 // defined: value 8192, parameters outside
	// the MARCS grid.
	NoResults = 14 // defined: value 16384, no analysis results
)

The bits of flag_sp the search reads, by the flags page.

View Source
const (
	UpperLimit    = 0 // defined: value 1, the value is an upper limit
	NotDetectable = 1 // defined: value 2, the line is not detectable
	FitFailed     = 2 // defined: value 4, the fit did not converge
)

The bits of an element's flag, flag_X_fe, by the flags page. Lithium's flag, flag_a_li, sets UpperLimit as they do, as the file shows.

Variables

This section is empty.

Functions

func Elements

func Elements() []string

Elements are the symbols of the elements the file holds abundances of against iron, in its order, as Star.Abundance takes them.

func New

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

New is the archive of DR4's allstar, asked by name only. It holds the one file, whatever the circle.

Types

type Abundance

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

Abundance is an abundance as the pipeline fit it, in dex, with its uncertainty and its flag.

func (Abundance) Flags

func (abundance Abundance) Flags() Flags

Flags is the bits the pipeline set on the abundance, its flag_X_fe. The survey's cut for abundances is none set, with SNR over 30.

func (Abundance) Uncertainty

func (abundance Abundance) Uncertainty() float64

Uncertainty is the abundance's uncertainty in dex.

func (Abundance) Value

func (abundance Abundance) Value() float64

Value is the abundance in dex.

type Catalogue

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

Catalogue is the allstar file on disk, read as its rows are asked for.

func OpenCatalogue

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

OpenCatalogue is the catalogue in an allstar 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's source, a pass over the whole file; a row with no source is never one asked.

func (*Catalogue) Rows

func (catalogue *Catalogue) Rows() int64

Rows is how many rows the file holds, a row a star.

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, one whose survey id or flag was left empty, and one whose place is not on the sky.

A row whose place was left empty has none, and a number left empty is not a number.

type Flags

type Flags int64

Flags is one of the survey's bitmasks.

func (Flags) Has

func (flags Flags) Has(bit uint) bool

Has is whether a bit is set, by its number: the flags page gives each bit's value, two to the number. A bit past the mask's 64 is never set.

type Lithium

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

Lithium is A(Li) in dex, with its uncertainties below and above, or the upper limit the survey gives where it found none, and its flag.

func (Lithium) Flags

func (lithium Lithium) Flags() (Flags, bool)

Flags is flag_a_li and whether the survey gave one: it left 25,364 of the file's 917,588 rows' empty, counted 2026-11-06. The survey's catalogues page says to use a flag below 2: a value or an upper limit with no other bit set.

func (Lithium) Limit

func (lithium Lithium) Limit() float64

Limit is the upper limit of A(Li) in dex, a_li_upp_lim, where the flag says UpperLimit: not a number elsewhere. In the file every row whose flag has that bit has a limit and no value, and every other a value and no limit, counted 2026-11-06.

func (Lithium) Uncertainty

func (lithium Lithium) Uncertainty() (below, above float64)

Uncertainty is A(Li)'s uncertainty below and above its value, in dex.

func (Lithium) Value

func (lithium Lithium) Value() float64

Value is A(Li) in dex, a_li: not a number where the survey gives only an upper limit.

type Star

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

Star is one row of the allstar file: a star as GALAH observed it, with what its pipeline fit to the star's spectrum.

func (Star) Abundance

func (star Star) Abundance(symbol string) (*Abundance, error)

Abundance is an element's abundance against iron, X/Fe, by its symbol as Elements gives it. It refuses an element the file holds none of against iron.

func (Star) GaiaID

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

GaiaID is the star's source in Gaia DR3, gaiadr3_source_id, and whether the survey gave one.

func (Star) Gravity

func (star Star) Gravity() (value, uncertainty float64)

Gravity is the star's surface gravity as log g in cgs units, adjusted by its parallax, and its uncertainty.

func (Star) Iron

func (star Star) Iron() Abundance

Iron is the star's iron, Fe/H in dex, with its uncertainty and flag. The survey's flags page says flag_fe_h is diagnostic and not to be used as it stands.

func (Star) Lithium

func (star Star) Lithium() Lithium

Lithium is the star's lithium as an absolute abundance, A(Li).

func (Star) Place

func (star Star) Place() *sky.Equatorial

Place is where the star is on the sky, from Gaia DR3, or nil for a row the survey gave no place.

func (Star) RadialError

func (star Star) RadialError() float64

RadialError is the radial velocity's uncertainty in km/s.

func (Star) RadialVelocity

func (star Star) RadialVelocity() float64

RadialVelocity is the star's radial velocity in km/s, rv_comp_1: its primary's, where the pipeline found a companion too.

func (Star) Rotation

func (star Star) Rotation() (value, uncertainty float64)

Rotation is the star's broadening as v sin i in km/s, fit with no macroturbulence, and its uncertainty.

func (Star) SNR

func (star Star) SNR() float64

SNR is the signal to noise per pixel of the spectrum from the third of HERMES's cameras, snr_px_ccd3: the one the survey's abundance cut reads.

func (Star) SObjectID

func (star Star) SObjectID() int64

SObjectID is the star's id in the survey, its sobject_id.

func (Star) Spectroscopic

func (star Star) Spectroscopic() Flags

Spectroscopic is the star's flag_sp: the bits the pipeline set on its parameters. The survey's cut for parameters is none set.

func (Star) Temperature

func (star Star) Temperature() (value, uncertainty float64)

Temperature is the star's effective temperature in kelvin, and its uncertainty.

func (Star) TwoMASS

func (star Star) TwoMASS() string

TwoMASS is the star's 2MASS identifier, tmass_id.

Jump to

Keyboard shortcuts

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