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.UnitUnits as exact values.
module Quantity = Ymir_units.QuantityValues in a unit.
module Constant = Ymir_units.ConstantMeasured constants.
module Codata = Ymir_units.CodataCODATA releases of the measured constants.
module Vocabulary = Ymir_units.VocabularyNames for units.
Time scales
The Earth
Frames and directions
HEALPix
Transforms, grids and observations
module Observation : sig ... endMeasured samples on a grid.