apogee

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: 8 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 apogee is the adapter for APOGEE DR17's allStar, from the Sloan Digital Sky Survey: one row a star its spectrographs observed in the near infrared, with the parameters and abundances its pipeline, ASPCAP, fit to the star's combined spectrum.

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: each value's unit here is the one SDSS's data model gives, and the bits of each flag are the survey's bitmask page's, both read 2026-11-06 (sources.yaml).

Index

Constants

View Source
const (
	MetalsWarn      = 3  // defined: M_H_WARN
	StarWarn        = 7  // defined: STAR_WARN, set with any warning
	MetalsBad       = 19 // defined: M_H_BAD
	StarBad         = 23 // defined: STAR_BAD, set with any bad, a grid edge's among them
	MultipleSuspect = 41 // defined: MULTIPLE_SUSPECT, likely a composite spectrum
)

The bits of ASPCAPFLAG a star's fit is judged by.

View Source
const (
	GridEdgeBad     = 0 // defined: GRIDEDGE_BAD, within an eighth of a grid step of its edge
	CalibrationBad  = 1 // defined: CALRANGE_BAD, outside the calibrated range
	GridEdgeWarn    = 8 // defined: GRIDEDGE_WARN, within a grid step of its edge
	CalibrationWarn = 9 // defined: CALRANGE_WARN, where the calibration may not hold
)

The bits of an element's flag, ELEMFLAG's.

View Source
const Duplicate = 4

Duplicate is the bit of EXTRATARG set on a row that is not its star's best: another row has a higher signal to noise. It's defined.

Variables

This section is empty.

Functions

func Elements

func Elements() []string

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

func New

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

New is the archive of DR17'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 ASPCAP fit it, in dex, with its uncertainty and its flag.

func (Abundance) Flags

func (abundance Abundance) Flags() Flags

Flags is the bits ASPCAP set on the abundance, its ELEMFLAG.

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, a star's duplicates among them. It reads every row's source, a pass over the whole file.

func (*Catalogue) Rows

func (catalogue *Catalogue) Rows() int64

Rows is how many rows the file holds: a row a star, but for the stars observed from both of the survey's telescopes, or in more than one field, which have a row each.

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, and one whose place is not on the sky, but for a row whose place the survey left empty, which has none. A value the survey 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 on the survey's bitmask page. A bit past the mask's 64 is never set.

type Star

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

Star is one row of the allStar file: a star as APOGEE observed it, with what ASPCAP fit to its combined spectrum.

func (Star) ASPCAP

func (star Star) ASPCAP() Flags

ASPCAP is the star's ASPCAPFLAG: the bits ASPCAP set on its fit.

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.

func (Star) Alpha

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

Alpha is the star's alpha elements against its metals, alpha/M in dex, and its uncertainty.

func (Star) Conditions

func (star Star) Conditions() Flags

Conditions is the star's STARFLAG: the bits its visits set on their spectra.

func (Star) Field

func (star Star) Field() string

Field is the survey's field the row's spectra came from.

func (Star) GaiaID

func (star Star) GaiaID() int64

GaiaID is the star's source in Gaia, its GAIAEDR3_SOURCE_ID: EDR3's source ids are DR3's.

func (Star) Gravity

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

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

func (Star) ID

func (star Star) ID() string

ID is the star's id in the survey, its APOGEE_ID.

func (Star) Iron

func (star Star) Iron() Abundance

Iron is the star's iron, Fe/H in dex, with its uncertainty and flag.

func (Star) Metals

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

Metals is the star's metallicity, M/H in dex, and its uncertainty.

func (Star) Place

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

Place is where the star is on the sky, or nil for a row the survey gave no place, as its first row, VESTA.

func (Star) RadialError

func (star Star) RadialError() float64

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

func (Star) RadialScatter

func (star Star) RadialScatter() float64

RadialScatter is the scatter of the visits' radial velocities about their average in km/s, VSCATTER: a binary's orbit shows here.

func (Star) RadialVelocity

func (star Star) RadialVelocity() float64

RadialVelocity is the star's barycentric radial velocity in km/s, its VHELIO_AVG: the visits' average, weighted by their signal to noise.

func (Star) SNR

func (star Star) SNR() float64

SNR is the combined spectrum's signal to noise.

func (Star) Targeting

func (star Star) Targeting() Flags

Targeting is the star's EXTRATARG: why it was observed, and whether the row is a duplicate.

func (Star) Telescope

func (star Star) Telescope() string

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

func (Star) Temperature

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

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

Jump to

Keyboard shortcuts

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