github ↗
docs menu

Module Ymir

Astronomy over Nx tensors.

Ymir gives astronomical meaning to tensors: the units astronomy measures in, and the models built on them. Every function is a formula of nx operations, Healpix's Legendre sums one Rune.scan, so it runs batched, compiled and differentiated under rune's transformations with no rule of its own.

open Ymir brings the unit algebra of ymir.units (Unit, Quantity, Constant, Codata, Vocabulary) and astronomy's units (Units) into scope. Time holds instants on astronomical time scales, and Earth the Earth's orientation and motion at them. Frame names the celestial frames and Direction holds directions in them. Healpix divides a frame's sphere into equal-area pixels and transforms maps on them to spherical harmonics. Transform maps pixels to the sky, Grid is a shape of cells seen through a transform, Region is a shape placed on a grid's world, and Observation holds data on a grid and integrates them over a region. Cosmology is the background of a homogeneous expanding universe: its expansion rate, distances, volumes and times. Wcs reads and writes a FITS header's world coordinates.

Device sets. A type that holds tensors names their device set, 'd. A function's results, and the constants it makes, lie where its operands lie, as Nx.beside places them, and a cut operand gives a result cut alike. What a function makes from nothing lies on the host: FITS reads, the cosmology presets, Time.of_date, Constant.quantity, Frame.matrix and Healpix.area; their walks move them (Nx.Ptree.place). Wcs.read and Grid.pixels take the placement of what they make, since a Transform cannot move between sets.

Units

#module Unit = Ymir_units.Unit

Units as exact values.

#module Quantity = Ymir_units.Quantity

Values in a unit.

#module Constant = Ymir_units.Constant

Measured constants.

#module Codata = Ymir_units.Codata

CODATA releases of the measured constants.

#module Vocabulary = Ymir_units.Vocabulary

Names for units.

#module Units : sig ... end

Astronomy's units.

Time scales

#module Time : sig ... end

Instants on astronomical time scales.

The Earth

#module Earth : sig ... end

The Earth's orientation and motion.

Frames and directions

#module Frame : sig ... end

Celestial frames.

#module Direction : sig ... end

Directions in a frame.

HEALPix

#module Healpix : sig ... end

HEALPix pixels and spherical harmonics.

Transforms, grids and observations

#module Transform : sig ... end

Maps between planes and the sky.

#module Grid : sig ... end

Cells seen through a transform.

#module Region : sig ... end

Planar shapes placed on a grid's world.

#module Observation : sig ... end

Measured samples on a grid.

Cosmology

#module Cosmology : sig ... end

The background of a homogeneous expanding universe.

FITS world coordinates

#module Wcs : sig ... end

FITS world coordinates.