Astrologos Help
Complete human-readable help information generated from the Astrologos runtime help registry. The lossless JSON source remains available at /help/json, and chunked ingestion records are available at /help/chunks.
Schema: astrologos-help/v1
Source: compiled-runtime
Entries: 1324
Contents
Documentation
Astrologos
root Astrologos calculator documentation root
Astrologos Calculator
A small programmable calculator for astronomy-oriented values.
Hello World
print "hello world";
Useful Commands
help or help() returns the root documentation object.
help("time") looks up named documentation topics.
help("examples") or help.examples() shows common astronomy examples.
help().search("azimuth") or help.search("azimuth") searches all documentation.
value.help() returns documentation for a computed value.
about, licence, or disclaimer prints project caveats and licence text.
resource_sources() lists upstream data sources for registered resources.
h.doc(), h.compact(), h.syntax, and h.children inspect help values.
help results are list-like: h[0] selects one result and h.name projects names.
Syntax Shorthand
let name = <expression>;
name = <expression>;
print value, other;
print; prints a blank line.
[a, b, c] creates an array; values[0] indexes one element.
{name: value, other: 2} creates an object; object.name reads a field.
Object fields can be assigned with object.name = value when the object is mutable.
value.help() returns contextual documentation.
help().search("text") performs case-insensitive recursive search.
for i=0,10 { statements } or for i=0,10,2 { statements }
while condition { statements }
if condition statement; or if condition { statements }
if condition { statements } else if other { statements } else { statements }
break; exits the nearest loop.
Common Data Pages
pages(location(60,10)).sky() returns local sky data.
pages(time()).chart() returns apparent geocentric chart positions.
pages(location(60,10), moon).summary() returns compact local Moon data.
pages(location(60,10)).almanac(time()) returns a one-day local almanac.
pages(location(60,10)).table(days: 30) returns daily rise/set/transit rows.
pages(time()).state() returns solar-system state vectors.
Functions
time - creates UTC time, or local civil time when given a timezone, location, or place
weekday - creates a weekday value
location - creates a location system value
observer - creates a body-fixed 3D observer
body - creates a body system value
elements - creates osculating orbital elements
orbit - creates a two-body orbit from elements
system - creates an immutable system of integrated states, body-backed orbits, and ephemeris bodies
observation - creates an orbit-determination observation
orbit_determination - determines an orbit from three or more observations
heading - creates a compass heading
direction - creates a frame-tagged unit-sphere direction
polygon - creates a spherical polygon with great-circle edges
vector - creates a vector system value
spherical - creates a vector from spherical coordinates
matrix - creates a matrix system value
unit - creates a unit system value
state - creates an orbital state from ephemeris data or explicit initial conditions
places (aliases: placedb) - opens the GeoNames places resource
place - creates a custom Earth place from a location and timezone
country - resolves a country from a name, ISO code, Place, or Country
admin1 - resolves a first-level administrative region
admin2 - resolves a second-level administrative region
timezones (aliases: timezonedb, tzdb) - opens the IANA timezone boundary resource
timezone (aliases: tz) - creates an IANA timezone from an id or Earth location
stars (aliases: stardb) - opens the Yale Bright Star Catalogue resource
constellations - opens the IAU constellation boundary resource
graphics (aliases: plot) - creates a deferred SVG graphics object
target - creates a value/direction target for search(...), or passes through minimum/maximum
range - creates a numeric or time range for search(...)
search - searches for function crossings or local minimum/maximum points
forecast - opens a published GFS forecast cycle from the retained stack
netcdf - opens a NetCDF dataset and returns its dimensions and variables
field - creates a global scalar field from a NetCDF variable
topography - creates an approved global topography field for a body
magnetic - creates a magnetic field model handle
pages - creates a data-page builder with optional default body, time, and observer
help - returns the Astrologos calculator manual or one function's syntax
about (aliases: disclaimer, licence, license) - returns the project disclaimer, licence, and about text
resources - lists known runtime resources and whether they are loaded
resource_sources - lists upstream data sources for known runtime resources
exit - stops execution after the current statement, optionally returning a message
run - deprecated alias for exit()
functions - lists function metadata, optionally filtered by function name
fields - lists type field metadata, optionally filtered by field name
types - lists registered astro/system types, constructors, fields, and members
elapsed - returns elapsed execution time in seconds
sleep - pauses execution for a number of milliseconds
array - creates an array from positional values
hash - creates an ordered hash/object from named values
args - captures positional and named values as an argument-list value
keys - returns ordered keys for an array, object, or argument-list value
values - returns ordered values from an array, object, or argument-list value
items - returns ordered key/value objects from an array, object, or argument-list value
pretty - formats a value as indented JSON text
format - formats values as text with small printf-style placeholders
typeof - returns the type or function name of a value
altitude - returns corrected topographic altitude/elevation in degrees
azimuth - returns corrected topographic azimuth in degrees
distance - returns corrected geocentric distance in kilometers
right_ascension (aliases: ra) - returns corrected geocentric true-of-date right ascension in degrees
declination (aliases: dec) - returns corrected geocentric true-of-date declination in degrees
ecliptic_longitude - returns corrected apparent geocentric ecliptic longitude in degrees
heliocentric_ecliptic_longitude - returns corrected heliocentric ecliptic longitude in degrees
elongation - returns signed geocentric elongation from the Sun in degrees
moon_phase - returns Moon phase angle percentage in the range 0..100
moon_illumination - returns illuminated percentage of the Moon as seen from Earth
magnitude - returns approximate apparent visual magnitude
apparent_solar_time - returns apparent solar time in local hours
lunar_time - returns local lunar hour angle as hours
rotational_axis - returns a body's rotational north-pole RA, declination, and ICRF unit vector
rotational_axis_ra - returns a body's rotational north-pole right ascension in degrees
rotational_axis_dec - returns a body's rotational north-pole declination in degrees
dms - converts decimal degrees to degree-minute-second components
dd - converts degree-minute-second components to signed decimal degrees
solar_eclipse_magnitude - returns local solar eclipse magnitude at a time and location
solar_eclipse_obscuration - returns percent of the solar disc occulted locally
solar_eclipse_clearance - returns signed local Sun-Moon limb clearance in degrees
lunar_eclipse_magnitude - returns signed umbral lunar eclipse magnitude
lunar_penumbra_magnitude - returns signed penumbral lunar eclipse magnitude
lunar_eclipse_clearance - returns signed Moon-surface clearance from Earth's penumbra in kilometers
shadow_distance - returns signed surface clearance for the active Sun-Earth-Moon shadow geometry
moon_shadow_earth_distance - returns signed Earth-surface clearance from the Moon shadow cone in kilometers
moon_penumbra_distance - returns signed Moon-surface clearance from Earth's penumbra in kilometers
moon_umbra_distance - returns signed Moon-surface clearance from Earth's umbra in kilometers
moon_umbra_occultation - returns percent overlap of the Moon and Earth's umbra
location_shadow_distance - returns signed local observer clearance from the Moon shadow cone in kilometers
planet_shadow_earth_distance - returns signed Earth-surface clearance from a planet shadow cone in kilometers
events - finds astronomical events from event type constants and time ranges
sky - summarizes the local sky and upcoming local events
almanac - builds a range almanac from astronomical event searches
integrate - integrates a callable over named ranges or advances named derivatives
sample - samples a field at a latitude/longitude location
abs - returns the absolute value
sign - returns -1, 0, or 1 according to the sign
floor - rounds down to an integer value
ceil - rounds up to an integer value
round - rounds to the nearest integer value
trunc - truncates toward zero
fract - returns the fractional part
sqrt - returns the square root
cbrt - returns the cube root
exp - returns e raised to x
exp2 - returns 2 raised to x
ln - returns the natural logarithm
log - returns logarithm of x in the given base
log2 - returns the base-2 logarithm
log10 - returns the base-10 logarithm
pow - returns x raised to y
sin - returns sine of x radians
cos - returns cosine of x radians
tan - returns tangent of x radians
asin - returns arcsine in radians
acos - returns arccosine in radians
atan - returns arctangent in radians
atan2 - returns atan2(y, x) in radians
sinh - returns hyperbolic sine
cosh - returns hyperbolic cosine
tanh - returns hyperbolic tangent
asinh - returns inverse hyperbolic sine
acosh - returns inverse hyperbolic cosine
atanh - returns inverse hyperbolic tangent
hypot - returns sqrt(x*x + y*y) without undue overflow
min - returns the smallest numeric argument
max - returns the largest numeric argument
clamp - clips x to the inclusive range lower..upper
angle_in_degrees (aliases: angle_degrees) - returns the angle between two vectors in degrees
to_radians - converts degrees to radians
to_degrees - converts radians to degrees
is_finite - returns true when x is finite
is_nan - returns true when x is NaN
is_infinite - returns true when x is infinite
navigate - estimates an Earth location from target elevation observations
minimize - minimizes a numeric callable over named variables with optional bounds and constraints
Resources
constellations - IAU constellation boundaries from Bill Gray constbnd (source: IAU constellation boundaries / Bill Gray constbnd)
ephemeris - orbital ephemeris files used for state/orbit calculations (source: NASA/JPL Development Ephemeris DE441)
gfs_forecast - published GFS forecast cycle stack under gfs/ (source: NOAA/NCEP Global Forecast System)
iers - IERS Earth orientation and leap-second data used for UTC/TT/UT1/TDB conversions (source: IERS EOP C04)
magnetic_model - NOAA WMMHR magnetic coefficient model under magnetic/ (source: NOAA/NCEI World Magnetic Model High Resolution)
atmosphere - not implemented; reserved for atmospheric refraction and climatology inputs (source: not implemented)
earth_tides - not implemented; reserved for solid Earth tide displacement corrections (source: not implemented)
earth_topography - global Earth topography/bathymetry scalar field (source: NOAA/NCEI ETOPO1 bedrock global relief)
ocean_tides - not implemented; reserved for ocean tide and ocean-loading corrections (source: not implemented)
moon_topography - global Moon altitude topography scalar field (source: installed lunar altitude topography)
places - GeoNames place lookup database (source: GeoNames geographical database)
planetary_satellites - planetary-satellite ephemeris store derived from satellite SPK kernels (source: NAIF generic satellite SPK kernels)
small_bodies - massive small-body ephemeris store for asteroid/KBO perturbation models (source: Astrologos small-body ephemeris store)
solar_activity - not implemented; reserved for solar and geomagnetic activity indices (source: not implemented)
stars - Yale Bright Star Catalogue with common-name notes (source: Yale Bright Star Catalogue, 5th Revised Edition)
timezones - IANA timezone and location-boundary lookup database (source: IANA Time Zone Database and Timezone Boundary Builder)
Types
Time - UTC date/time value with resolved TT, UT1, and TDB scales
LocalTime - timezone-adjusted civil time derived from a UTC Time
Weekday - ISO weekday value
Location - body-aware latitude/longitude surface location
LocationSolution - navigation solution with location, residuals, and fit quality
Observer - body-fixed 3D observer with position, zenith, and derived surface location
Body - solar-system body with physical parameters from the reference C model
Bodies - registry of known solar-system bodies and massive small-body perturbers
Elements - osculating orbital elements using periapsis distance as the primary distance
Orbit - two-body orbit backed by osculating elements or a relative state vector
System - immutable orbit propagation system with shared snapshot cache
Observation - measured sky direction or target elevation observation
OrbitSolution - orbit determination result with orbit, residuals, and fit quality
Shadow - instantaneous sunlight shadow geometry for one body on another
Heading - compass heading measured clockwise from north
Direction - unit-sphere direction tagged with a coordinate frame
Polygon - right-handed spherical polygon with great-circle edges
Vector - 3D vector with cached cartesian and spherical representations
Matrix - 3x3 matrix compatible with reference vector transforms
Unit - named unit used when requesting or displaying numeric values
State - orbital state backed by ephemeris data with lazy derived fields
Places - GeoNames place lookup database handle
Place - GeoNames place record with location and feature metadata
Country - ISO country used to inspect and filter places
Admin1 - first-level GeoNames administrative region used to filter places
Admin2 - second-level GeoNames administrative region used to filter places
Timezones - IANA timezone lookup database handle
Timezone - IANA timezone with optional boundary and representative-location metadata
Stars - Yale Bright Star Catalogue database handle
Star - catalog star with identifiers, astrometry, and sky methods
ConstellationDb - IAU constellation boundary database handle
Constellation - IAU constellation boundary record
Event - astronomical event result
Graphics - deferred SVG graphics drawing context
Target - search target value and crossing direction
Range - numeric or time scan range
Search - configured scalar search value
Forecast - published GFS forecast cycle from the retained stack
ForecastProduct - forecast product selector bound to a forecast
ScalarField - forecast scalar field selected from a product
VectorField - forecast vector field selected from a product
FieldSource - approved external field dataset source
NetCDF - opened NetCDF dataset metadata
Field - sampleable global scalar field
Magnetic - body-scoped magnetic field model
Pages - curated data-page builder with optional default body, time, and observer
Objects
Object - ordered mutable field collection
literal: {name: value, count: 2}
access: object.name or object["name"]
helpers: keys(object), values(object), items(object), object.available(), object.help()
Astrologos.syntax
topic general Astrologos language syntax for scripts, expressions, blocks, and definitions
Aliases: language, grammar, programming
Topic: Astrologos.syntax - general Astrologos language syntax for scripts, expressions, blocks, and definitions
Syntax:
help("syntax")
help("loops")
help("blocks")
help("custom functions")
help("overloads")
help("namespaces")
Aliases: language, grammar, programming
Children: syntax basics, loops, blocks, custom functions, function overloads, namespaces
Examples
# Minimal local sky script
let loc = location(60.0, 10.0);
let obs = loc.observer(0.002);
let t = time(2026,6,21,12,0,0);
print altitude(sun, t, obs), azimuth(sun, t, obs);
# Define a reusable local altitude helper
let local_altitude = (body, t): {
let loc = location(latitude: 60, longitude: 10);
let obs = loc.observer(0.002);
let value = altitude(body, t, obs);
};
let f = (body, t): local_altitude(body, t).value;
let t = time(2026,1,1,21,0,0);
let a = local_altitude(moon, t);
print f(moon, t), a.value, a.loc, a.obs;
Astrologos.syntax.basics
topic core expression, statement, value, comment, array, object, field, and call syntax
Aliases: basics, statements, expressions, comments, objects, arrays
Topic: Astrologos.syntax.basics - core expression, statement, value, comment, array, object, field, and call syntax
Syntax:
let name = expression;
name = expression;
print value, other;
# comment
// comment
[a, b, c]
{name: value, other: 2}
object.name
object["name"]
call(argument, named: value)
Aliases: basics, statements, expressions, comments, objects, arrays
Examples
# Store one local sky sample as an object row
let t = time(2026,1,1,21,0,0); # UTC
let loc = location(60.0, 10.0);
let row = {body: moon.name, when: t.utc(), altitude: altitude(moon, t, loc.observer())};
print row.body, row.when, row.altitude;
# Use named arguments for an observing site
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let obs = loc.observer(height: 0.002);
print obs.latitude(), obs.longitude(), altitude(sun, time(2026,6,21,12,0,0), obs);
Astrologos.syntax.loops
topic for loops, while loops, break, and numeric iteration syntax
Aliases: for, while, break, iteration, loop
Topic: Astrologos.syntax.loops - for loops, while loops, break, and numeric iteration syntax
Syntax:
for i=start,stop { statements }
for i=start,stop,step { statements }
while condition { statements }
break;
Aliases: for, while, break, iteration, loop
Examples
# Loop over every third hour of a day
let loc = location(60.0, 10.0);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
for h=0,24,3 {
let t = t0.add_hours(h);
print t.utc(), altitude(sun, t, obs);
}
# Stop a while loop when the Sun reaches a useful altitude
let loc = location(60.0, 10.0);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
let h = 0;
while h < 24 {
if altitude(sun, t0.add_hours(h), obs) > 20 break;
h = h + 1;
}
print t0.add_hours(h).utc(), altitude(sun, t0.add_hours(h), obs);
Astrologos.syntax.blocks
topic braced statement blocks, scope expressions, if/else branches, and the implemented For(...) block expression
Aliases: block expressions, scope, For block, if else
Topic: Astrologos.syntax.blocks - braced statement blocks, scope expressions, if/else branches, and the implemented For(...) block expression
Syntax:
{ statements }
if condition statement;
if condition { statements } else if other { statements } else { statements }
For(i, start, stop, step) { statements }
Aliases: block expressions, scope, For block, if else
Examples
# if, else if, and else blocks
let altitude_now = altitude(sun, time(), location(60,10).observer());
if altitude_now > 0 {
print "sun is above the horizon";
} else if altitude_now > -6 {
print "civil twilight";
} else {
print "night";
}
# For(...) block expression can keep the last daylight sample
let loc = location(60,10);
let obs = loc.observer();
let t0 = time(2026,6,21,0,0,0);
let result = For(h, 0, 24, 6) {
let time_utc = t0.add_hours(h).utc();
let sun_altitude = altitude(sun, t0.add_hours(h), obs);
};
print result.time_utc, result.sun_altitude;
Astrologos.syntax.functions
topic plain definitions, typed definitions, and closure values for reusable calculations
Aliases: definitions, user functions, closures, lambda, callable
Topic: Astrologos.syntax.functions - plain definitions, typed definitions, and closure values for reusable calculations
Syntax:
name(parameter, other) { statements }
type Name(parameter) { statements }
(parameter, other): expression
Aliases: definitions, user functions, closures, lambda, callable
Examples
# Custom function returning exported fields
sun_sample(t, loc) {
let obs = loc.observer(0.002);
let altitude_deg = altitude(sun, t, obs);
let azimuth_deg = azimuth(sun, t, obs);
}
let sample = sun_sample(time(2026,6,21,12,0,0), location(60,10));
print sample.altitude_deg, sample.azimuth_deg;
# Closure used as a search function
let root = search((x): cos(x) - 0.5, range(0, 4, 0.25), target(0, decreasing)).next();
print root;
# User-defined type with a closure-valued field
type obs(t) {
let year_plus = (d): t.year() + d;
}
let x = obs(time(2026,4,27,8,26,0));
print x.year_plus(1);
Astrologos.syntax.overloads
topic multiple callable signatures, overload-specific argument order, and query-dependent return shapes
Aliases: overloads, signatures, return shape, return types, return-shape-dependent behaviour, return-shape-dependent behavior
Topic: Astrologos.syntax.overloads - multiple callable signatures, overload-specific argument order, and query-dependent return shapes
Syntax:
help("function_name").syntax
help("events").syntax
events(event_type, bounded_range) -> List
events(event_type, open_range) -> Event|Nil
collection.first()
Aliases: overloads, signatures, return shape, return types, return-shape-dependent behaviour, return-shape-dependent behavior
Examples
# Inspect overloads before choosing argument order
print help("events").syntax;
# Bounded event searches return a list, so collection methods apply
let oslo = location(latitude: 59.9139, longitude: 10.7522);
let day = range(time(2026,7,11,0,0,0), time(2026,7,12,0,0,0));
let sunset = events(sunset, day, oslo).first();
print sunset.time.utc();
# Open-ended event searches return one Event or Nil, not a list
let oslo = location(latitude: 59.9139, longitude: 10.7522);
let after = range(time(2026,7,11,0,0,0), infinity, 1);
let sunset = events(sunset, after, oslo);
if sunset != nil { print sunset.time.utc(); }
# Return shape may vary by query: guard Nil and Unavailable values
let empty = places().search("Oslo", country: "ZZ").first();
let missing = places().find("definitely-not-a-real-place-name");
print empty == nil, empty.available();
print missing.available(), missing.reason;
if empty.available() { print empty.name; } else { print "empty search"; }
if missing.available() { print missing.name; } else { print "missing lookup"; }
Astrologos.syntax.namespaces
topic using objects, user-defined types, and returned definition objects as field namespaces
Aliases: objects as namespaces, fields, methods, module objects, type fields
Topic: Astrologos.syntax.namespaces - using objects, user-defined types, and returned definition objects as field namespaces
Syntax:
{name: value}.name
object["name"]
object[key] = value
type Name(...) { let field = value; }
definition(...).field
hash(name: value)
call(**arguments)
Aliases: objects as namespaces, fields, methods, module objects, type fields
Examples
# Object fields as a small namespace
let sky = {place: location(60,10), at: time(2026,1,1,21,0,0)};
print sky.place.latitude, sky.at.utc();
# Nested namespace object
let observatory = {site: {name: "Stavanger", loc: location(58.9666667, 5.7333333)}, instruments: {main: "sky", backup: "chart"}};
print observatory.site.name, observatory.site.loc.latitude, observatory.instruments.main;
# Dynamic field access with brackets
let row = {body: sun.name, value: sun.radius};
let key = "body";
print row[key], row["value"];
# Mutable object fields
let row = {body: sun.name, count: 1};
row.count = row.count + 1;
row["note"] = "updated";
print row.count, row.note;
# Hash as named arguments
let opts = hash(latitude: 60.0, longitude: 10.0);
let loc = location(**opts);
print loc.latitude, loc.longitude;
# Arguments object with updates
let base = args(latitude: 60.0, longitude: 10.0);
let moved = base.with(longitude: 12.0);
print location(**base).longitude, location(**moved).longitude;
# Array spread for positional arguments
let values = array(58.9666667, 5.7333333);
let loc = location(**values);
print loc.latitude, loc.longitude;
# Scope expression exports public let values
let opts = { let latitude = 60.0; let longitude = 10.0; let _internal = 99; };
let loc = location(**opts);
print loc.latitude, loc.longitude;
# Definition result as a namespace of related values
solar_day(loc, t) {
let span = range(t, t.add_days(1));
let sunrise_time = events(sunrise, span, loc).first().time.utc();
let sunset_time = events(sunset, span, loc).first().time.utc();
}
let d = solar_day(location(latitude: 58.9666667, longitude: 5.7333333), time(2024,4,17,0,0,0));
print d.sunrise_time, d.sunset_time;
# Typed namespace with closure-valued members
type SolarSite(loc) {
let sunrise_time = (t): events(sunrise, range(t, t.add_days(1)), loc).first().time.utc();
let sunset_time = (t): events(sunset, range(t, t.add_days(1)), loc).first().time.utc();
}
let site = SolarSite(location(latitude: 58.9666667, longitude: 5.7333333));
print site.sunrise_time(time(2024,4,17,0,0,0)), site.sunset_time(time(2024,4,17,0,0,0));
Astrologos.examples
topic common astronomy calculator examples
Aliases: common_examples, cookbook, recipes
Topic: Astrologos.examples - common astronomy calculator examples
Syntax:
help("examples")
help.examples()
help().help("examples")
Aliases: common_examples, cookbook, recipes
Children: getting started, syntax examples, time and calendars, locations and timezones, sunrise examples, sunrise day, sunrise month, moonrise and lunar visibility, moon phase, stars(), constellations(), moon and stars, sky charts fixed stars and close approaches, planet events, eclipses and shadows, almanac pages, pages(), coordinates and directions, vectors matrices orbits, orbit propagation, polygons, places and timezones, weather and fields, topography(), magnetic field, weather and fields, charts and graphics, resources and diagnostics, runtime automation, math recipes, search and optimization
Examples
# Local sky sampler for Oslo-style coordinates
let loc = location(60.0, 10.0);
let s = pages(loc).sky(time(2026,1,1,21,0,0));
print s.sun.altitude, s.moon.altitude, s.moon.phase;
# Compact chart sampler with two body longitudes
let t = time(2026,1,1,0,0,0);
let c = pages(t).chart();
print c.bodies.sun.chart.sign, c.bodies.mars.geocentric.longitude;
# Compact local Moon page
let loc = location(60.0, 10.0);
let m = pages(loc, moon).summary(time());
print m.position.topocentric.altitude, m.phase, m.illumination;
# Month-style rise/set table
let loc = location(60.0, 10.0);
let rows = pages(loc, time(2026,6,1,0,0,0)).table(days: 30);
print rows[0].sunrise.time, rows[0].sunset.time;
# Solar-system state sampler for Mars and Earth
let st = pages(time(2026,1,1,0,0,0)).state();
print st.bodies.mars.position_bc_icrf.x, st.bodies.earth.velocity_bc_icrf.y;
# Orbit propagation diagnostics for an explicit comet state
let t0 = time(2026,4,27,8,26,0);
let comet0 = state(body: body("comet"), time: t0, position: vector(100000000,0,0), velocity: vector(0,10,0));
let later = system(t0, comet0, sun).at(t0.add_days(10));
print later.diagnostics.accepted_steps, later.ephemeris_residuals.sun;
# Full local day page
let d = pages(location(60.0, 10.0), time(2026,1,1,0,0,0)).small();
print d.short.sun.rise.time, d.chart.bodies.moon.geocentric.longitude;
# Sunrise in Stavanger on a civil date
let loc = location(58.9666667, 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print events(sunrise, day, loc).first().time.utc();
# Days between two dates
print time(2026,3,1)-time(2025,1,2);
# Sunrise and sunset together
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print events(sunrise, day, loc).first();
print events(sunset, day, loc).first();
# Moonrise for the next few days
let loc = location(60.0, 10.0);
let start = time(2026,5,20,0,0,0);
print events(moonrise, range(start, start.add_days(5), 0.5), loc);
# Northern solstice in a year
let year = range(time(2024,1,1,0,0,0), time(2025,1,1,0,0,0), 30);
print events(northern_solstice, year).first().time.utc();
# Season sampler from an annual almanac
let a = almanac(time(2024,1,1,0,0,0), time(2025,1,1,0,0,0));
print a.seasons.ascending_equinox.time.utc, a.seasons.northern_solstice.time.utc;
# Earth orbital-distance sampler around perihelion
let peri = events(perihelion, range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1), earth).first();
print peri.time.utc(), peri.value;
# Body method form for perihelion
print earth.perihelion(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1).first();
# Lunar perigee and apogee in a month
let month = range(time(2024,4,1,0,0,0), time(2024,5,1,0,0,0), 1);
print events(perigee, month, moon);
print events(apogee, month, moon);
# Moon boundary lookup sampler
let t = time(2024,4,17,0,0,0);
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
print moon_dir.ra, moon_dir.dec, constellations().inside(moon_dir);
# Sirius sampler with altitude at a site
let sirius = stars().find("Sirius");
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let t = time(2026,1,1,21,0,0);
print sirius.name, sirius.constellation(), sirius.altaz(t, obs).altitude;
# Star transit and set for Sirius
let sirius = stars().find("Sirius");
let obs = location(60.0, 10.0).observer(0.002);
let night = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0), 0.25);
print sirius.transit(night, obs).first();
print sirius.set(night, obs).first();
# Constellation sampler for a named star direction
let sirius = stars().find("Sirius");
print sirius.name, constellations().inside(sirius.direction());
# Planet event sampler for Jupiter opposition
let year = range(time(2024,1,1,0,0,0), time(2025,1,1,0,0,0), 2);
print events(opposition, year, jupiter).first().time.utc();
# Local almanac for one month
let loc = location(58.9666667, 5.7333333);
let start = time(2024,4,1,0,0,0);
let a = almanac(start, start.add_months(1), loc);
print a.local.sun.rise;
print a.moon.full;
# Solar eclipse magnitude sampler near Dallas
let dallas = location(latitude: 32.7767, longitude: -96.7970);
let t = time(2024,4,8,18,20,0);
print solar_eclipse_magnitude(t, dallas), solar_eclipse_obscuration(t, dallas);
# Numeric search sampler for a sine crossing
let root = search((x): sin(x), range(2, 4, 0.1), target(0, decreasing)).next();
print root;
# Sun altitude curve samples around a day
let loc = location(60.0, 10.0);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
for h=0,24,2 {
let t = t0.add_hours(h);
print t.utc(), altitude(sun, t, obs);
}
# Quick SVG sky sampler with planets only
graphics(time(2026,1,1,21,0,0), location(latitude: 60, longitude: 10)).dark().sky_view(center_az: 180, center_alt: 45, fov: 120).sky_grid().sky_planets().write_svg("sky-planets.svg");
print "wrote sky-planets.svg";
Astrologos.themes
topic recommended thematic help areas for the RAG help search cookbook
Aliases: theme list, cookbook index, example themes, recipes index
Topic: Astrologos.themes - recommended thematic help areas for the RAG help search cookbook
Syntax:
help("sunrise examples")
help("moon sirius")
help("weather examples")
help.search("visible stars")
Aliases: theme list, cookbook index, example themes, recipes index
Children: getting started, syntax examples, time and calendars, locations and timezones, sunrise examples, sunrise day, sunrise month, moonrise and lunar visibility, moon phase, stars(), constellations(), moon and stars, sky charts fixed stars and close approaches, planet events, eclipses and shadows, almanac pages, pages(), coordinates and directions, vectors matrices orbits, polygons, places and timezones, weather and fields, topography(), magnetic field, weather and fields, charts and graphics, resources and diagnostics, runtime automation, math recipes, search and optimization
Examples
# Theme list
print help("sunrise examples").compact();
print help("moon and stars").compact();
print help("charts and graphics").compact();
Astrologos.examples.getting_started
topic starter examples for printing, JSON output, help discovery, values, and runtime control
Aliases: hello world, print, json output, introspection, first program
Topic: Astrologos.examples.getting_started - starter examples for printing, JSON output, help discovery, values, and runtime control
Syntax:
print value, other;
json value;
help("topic")
functions()
typeof(value)
Aliases: hello world, print, json output, introspection, first program
Examples
# Hello world and plain output
print "hello world";
print time(2026,1,1,0,0,0).utc();
# JSON output for a local sky sample
let loc = location(60.0, 10.0);
let t = time(2026,1,1,12,0,0);
json {time: t.utc(), sun_altitude: altitude(sun, t, loc.observer()), moon_phase: moon_phase(t)};
# Pretty-print a compact chart row
let t = time(2026,1,1,0,0,0);
pretty {sun_longitude: ecliptic_longitude(sun, t), moon_longitude: ecliptic_longitude(moon, t), phase: moon_phase(t)};
# First useful almanac query: sunrise and sunset
let loc = location(58.9666667, 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print events(sunrise, day, loc).first().time.utc(), events(sunset, day, loc).first().time.utc();
# Build a body scale table for a report
let rows = [{name: sun.name, radius_ratio: sun.radius / earth.radius}, {name: moon.name, radius_ratio: moon.radius / earth.radius}, {name: mars.name, radius_ratio: mars.radius / earth.radius}];
print rows.name, rows.radius_ratio;
# Reuse named arguments for nearby observing sites
let stavanger = args(latitude: 58.9666667, longitude: 5.7333333);
let oslo = stavanger.with(latitude: 59.9139, longitude: 10.7522);
print altitude(sun, time(2026,6,21,12,0,0), location(**stavanger).observer()), altitude(sun, time(2026,6,21,12,0,0), location(**oslo).observer());
# Time a useful sunrise search
let start = elapsed();
let loc = location(58.9666667, 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
let rise = events(sunrise, day, loc).first().time.utc();
print rise, elapsed() - start;
Astrologos.examples.syntax
topic task-shaped examples for Astrologos language syntax and reusable helper definitions
Aliases: language examples, programming examples, closures examples, definitions examples
Topic: Astrologos.examples.syntax - task-shaped examples for Astrologos language syntax and reusable helper definitions
Syntax:
let name = expression;
for i=start,stop,step { statements }
name(parameter) { statements }
(x): expression
{name: value}
Aliases: language examples, programming examples, closures examples, definitions examples
Children: syntax, loops, blocks, custom functions, namespaces
Examples
# Loop and conditional syntax together
let total = 0;
for i=0,10,2 {
if i > 6 break;
total = total + i;
}
print total;
# Custom helper returning a namespace object
sun_angles(t, loc) {
let obs = loc.observer(0.002);
let altitude_deg = altitude(sun, t, obs);
let azimuth_deg = azimuth(sun, t, obs);
}
let a = sun_angles(time(2026,6,21,12,0,0), location(latitude: 60, longitude: 10));
print a.altitude_deg, a.azimuth_deg;
# Object literal as a reusable observation row
let row = {body: sun.name, time: time(2026,6,21,12,0,0), loc: location(60,10)};
print row.body, row.time.utc(), altitude(sun, row.time, row.loc.observer());
# Hash for named options
let opts = hash(latitude: 58.9666667, longitude: 5.7333333);
print location(**opts);
# Arguments object for reusable call settings
let stavanger = args(latitude: 58.9666667, longitude: 5.7333333);
let oslo = stavanger.with(latitude: 59.9139, longitude: 10.7522);
print location(**stavanger), location(**oslo);
# Project fields from an observation object
let sample = {body: moon.name, phase: moon_phase(time(2026,1,1,0,0,0)), illumination: moon_illumination(time(2026,1,1,0,0,0))};
print sample.body, sample.phase, sample.illumination;
# Bracket access chooses a field at runtime
let field_name = "longitude";
let loc = {latitude: 60, longitude: 10};
print loc[field_name];
# Namespaces can hold local sky report functions
let loc = location(60,10).observer(0.002);
let tools = {sun_alt: (t): altitude(sun, t, loc), moon_alt: (t): altitude(moon, t, loc)};
let t = time(2026,6,21,22,0,0);
print tools.sun_alt(t), tools.moon_alt(t);
# Closure as a reusable altitude formula
let loc = location(60,10).observer(0.002);
let sun_alt = (t): altitude(sun, t, loc);
print sun_alt(time(2026,6,21,12,0,0));
# Scope expression as a computed namespace
let report = {
let loc = location(60,10);
let t = time(2026,6,21,12,0,0);
let sun_altitude = altitude(sun, t, loc.observer());
};
print report.loc.latitude, report.sun_altitude;
# Spread an array into positional arguments
let pair = [60.0, 10.0];
print location(**pair);
# Type definition with a captured value
type Report(t) {
let year = (): t.year;
}
let r = Report(time(2026,1,1,0,0,0));
print r.year();
# Type definition as a domain-specific namespace
type AlmanacFor(loc) {
let daylight = (t): events(sunset, range(t, t.add_days(1)), loc).first().time - events(sunrise, range(t, t.add_days(1)), loc).first().time;
}
let a = AlmanacFor(location(58.9666667, 5.7333333));
print a.daylight(time(2024,4,17,0,0,0));
# Derive a one-argument function from a two-argument closure
let f = (x, y): x * y;
let g = (x): f(x, 2);
print g(5);
# Derive several closures from one base formula
let f = (x, y): x * y + y;
let double_plus_two = (x): f(x, 2);
let triple_plus_three = (x): f(x, 3);
print double_plus_two(5), triple_plus_three(5);
# Store related derived functions in a namespace
let f = (x, y): x * y;
let tools = {double: (x): f(x, 2), triple: (x): f(x, 3)};
print tools.double(7), tools.triple(7);
# Function result can expose derived closures
make_scale(k) {
let apply = (x): x * k;
let describe = (x): "scaled";
}
let scale = make_scale(4);
print scale.apply(6), scale.describe(6);
# Function result can expose raw values and helper functions
bundle(x) {
let value = x;
let square = (n): n * n;
let cube = (n): n * n * n;
}
let b = bundle(5);
print b.value, b.square(b.value), b.cube(b.value);
# Build a calculation pipeline for daylight quality scoring
let clear_hours = (daylight_hours): daylight_hours * 0.65;
let score = (daylight_hours): clear_hours(daylight_hours) / 12;
print score(18.4);
# Closure captures a constant from the surrounding scope
let offset = 7;
let shifted = (x): x + offset;
print shifted(5);
# Closure captures a location for repeated solar altitude samples
let loc = location(60, 10);
let obs = loc.observer(0.002);
let sun_alt = (t): altitude(sun, t, obs);
print sun_alt(time(2026,6,21,12,0,0));
# Build a reusable time-shift closure
let t0 = time(2026,1,1,0,0,0);
let after_hours = (h): t0.add_hours(h).utc();
print after_hours(6), after_hours(12);
# Use a closure as an object field selected by name
let ops = {add: (x, y): x + y, multiply: (x, y): x * y};
let name = "multiply";
print ops[name](6, 7);
# Dispatch between report formulas with bracket syntax
let loc = location(60,10).observer(0.002);
let formulas = {sun: (t): altitude(sun, t, loc), moon: (t): altitude(moon, t, loc)};
let chosen = "moon";
let t = time(2026,6,21,22,0,0);
print formulas[chosen](t), formulas["sun"](t);
# Update a namespace with a derived function
let tools = {base: (x): x + 1};
tools["twice"] = (x): tools.base(x) * 2;
print tools.twice(9);
# Update an array and then use it as function input
let values = [1, 2, 3];
values[1] = 8;
let sum3 = (items): items[0] + items[1] + items[2];
print sum3(values);
# Build an object row with dynamic keys
let row = {};
let key = "altitude";
row[key] = 42.5;
row["body"] = sun.name;
print row.body, row.altitude;
# Function composition with named intermediate closures
let double = (x): x * 2;
let add_one = (x): x + 1;
let composed = (x): add_one(double(x));
print composed(10);
# Compose a sky calculation from small helpers
let loc = location(60, 10);
let obs = loc.observer();
let at = (h): time(2026,6,21,h,0,0);
let sun_height = (h): altitude(sun, at(h), obs);
print sun_height(6), sun_height(12), sun_height(18);
# Reuse one body-position helper for several bodies
let t = time(2026,1,1,0,0,0);
let longitude_of = (body): ecliptic_longitude(body, t);
print longitude_of(sun), longitude_of(moon), longitude_of(mars);
# Build a report namespace from helper closures
report(body, t) {
let name = body.name;
let longitude = ecliptic_longitude(body, t);
let declination_deg = declination(body, t);
}
let r = report(moon, time(2026,1,1,0,0,0));
print r.name, r.longitude, r.declination_deg;
# Make a chart helper that shares one time
chart_at(t) {
let lon = (body): ecliptic_longitude(body, t);
let sun_lon = lon(sun);
let moon_lon = lon(moon);
let mars_lon = lon(mars);
}
let c = chart_at(time(2026,1,1,0,0,0));
print c.sun_lon, c.moon_lon, c.mars_lon;
# Make a local sky helper that shares one observer
local_sky(loc) {
let obs = loc.observer();
let alt = (body, t): altitude(body, t, obs);
let sun_at = (t): alt(sun, t);
let moon_at = (t): alt(moon, t);
}
let sky = local_sky(location(latitude: 60, longitude: 10));
let t = time(2026,6,21,12,0,0);
print sky.sun_at(t), sky.moon_at(t);
# Return a namespace with both data and formulas
measurement(x) {
let value = x;
let doubled = (y): y * 2;
let shifted = (y): y + x;
}
let m = measurement(10);
print m.value, m.doubled(m.value), m.shifted(5);
# Use a closure to choose an object field
let pick = (row, key): row[key];
let row = {body: sun.name, radius: sun.radius};
print pick(row, "body"), pick(row, "radius");
# Loop over names and accumulate a numeric result
let total = 0;
for i=1,5,1 {
total = total + i * i;
}
print total;
# Use a while loop to search a small integer condition
let n = 1;
while n * n < 50 {
n = n + 1;
}
print n, n * n;
# Use break to stop at the first useful value
let found = 0;
for i=1,20,1 {
if i * i > 70 {
found = i;
break;
}
}
print found;
# Project a field from every object in an array
let rows = [{x: 1, name: "sun"}, {x: 3, name: "moon"}];
print rows.x, rows.name;
# Transform object fields with a closure
let row = {a: 2, b: 3};
let scale_fields = (r, k): {a: r.a * k, b: r.b * k};
let scaled = scale_fields(row, 10);
print scaled.a, scaled.b;
# Use a hash to pass options into a helper
make_loc(opts) {
let value = location(**opts);
}
let opts = hash(latitude: 60.0, longitude: 10.0);
print make_loc(opts).value;
# Extend an arguments object before calling a constructor
let base = args(latitude: 60.0);
let full = base.with(longitude: 10.0);
print location(**full);
# Build positional arguments with an array
let pair = [60.0, 10.0];
let make = (values): location(**values);
print make(pair);
# Use a scope expression as a compact calculation report
let r = {
let x = 3;
let y = 4;
let hyp = hypot(x, y);
};
print r.x, r.y, r.hyp;
# Use For as an expression-like calculation block
let result = For(i, 1, 4, 1) {
let square = i * i;
};
print result.i, result.square;
# Keep helper constants private with an underscore name
let report = {
let _scale = 1000;
let km = 2;
let meters = km * _scale;
};
print report.km, report.meters;
# Define a reusable multiplier calculator
type Multiplier(k) {
let apply = (x): x * k;
let plus = (x, y): apply(x) + y;
}
let m = Multiplier(6);
print m.apply(7), m.plus(7, 3);
# Define chart helpers that share one time
type ChartTools(t) {
let lon = (body): ecliptic_longitude(body, t);
let pair = (a, b): lon(a) - lon(b);
}
let tools = ChartTools(time(2026,1,1,0,0,0));
print tools.lon(sun), tools.pair(moon, sun);
# Define local altitude helpers for one observing site
type LocalTools(loc) {
let obs = loc.observer();
let alt = (body, t): altitude(body, t, obs);
}
let tools = LocalTools(location(60,10));
print tools.alt(sun, time(2026,6,21,12,0,0));
# Build a small reusable closeness score
let distance_from = (target): (x): abs(x - target);
let score_to_ten = distance_from(10);
print score_to_ten(7), score_to_ten(13);
# Use a derived closure inside numeric search
let f = (x, y): x * y - 10;
let g = (x): f(x, 2);
print search(g, range(0, 10, 0.5), target(0)).next();
# Package a search result with the formula used
solve_linear(a, b) {
let f = (x): a * x + b;
let root = search(f, range(-10, 10, 0.5), target(0)).next();
let formula = "a*x+b";
}
let solved = solve_linear(2, -6);
print solved.formula, solved.root;
Astrologos.examples.time_calendar
topic examples for UTC time construction, date arithmetic, local civil time, and weekday handling
Aliases: time examples, calendar, weekday, local time, date arithmetic
Topic: Astrologos.examples.time_calendar - examples for UTC time construction, date arithmetic, local civil time, and weekday handling
Syntax:
time(year, month, day, hour, minute, second)
time.add_days(days)
time.local(timezone)
weekday(value)
Aliases: time examples, calendar, weekday, local time, date arithmetic
Resources: timezones, iers
Examples
# Construct UTC times and add intervals
let t = time(2026,3,20,12,0,0);
print t.utc(), t.add_hours(6).utc(), t.add_days(7).utc();
# Days between two dates
print time(2026,3,1,0,0,0) - time(2025,1,2,0,0,0);
# Local time at a location
let loc = location(58.9666667, 5.7333333);
let tz = timezones().at(loc);
let local = time(2026,6,1,12,0,0).local(tz);
print local.iso, local.weekday.short();
# Weekday lookup and formatting
let w = weekday("Wednesday");
print w.name(), w.short(), w.index();
# Month-style civil dates from a page table
let rows = pages(location(60,10), time(2026,6,1,0,0,0)).table(days: 3);
print rows[0].date, rows[1].date, rows[2].date;
Astrologos.examples.locations_timezones
topic examples for locations, observers, place lookup, administrative fields, and timezone conversion
Aliases: location examples, place search, timezone examples, city lookup, observer examples
Topic: Astrologos.examples.locations_timezones - examples for locations, observers, place lookup, administrative fields, and timezone conversion
Syntax:
location(latitude, longitude)
location(...).observer(height)
places().search("name")
timezones().at(location)
Aliases: location examples, place search, timezone examples, city lookup, observer examples
Resources: places, timezones
Children: places and timezones
Examples
# Prepare a location and observer for local sky calculations
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let obs = loc.observer(height: 0.002);
print loc.latitude, loc.longitude, obs.height();
# Format latitude and longitude
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
print dms(loc.latitude, "latitude"), dms(loc.longitude, "longitude");
print dd(58, 58, 0, "N"), dd(5, 44, 0, "E");
# Find a place and administrative names
let p = places().search("Stavanger").first();
print p.name, p.country().name, p.admin1().name, p.admin2().name;
# Timezone from a location and local time conversion
let loc = location(58.9666667, 5.7333333);
let tz = timezone(loc);
print tz.id, time(2026,6,1,12,0,0).local(tz).iso;
# Register an observatory-style place with a timezone
let here = place("Observatory", location(60,10), "Europe/Oslo");
print here.name, here.timezone().id;
Astrologos.examples.sunrise
topic thematic index for sunrise, sunset, rise/set/transit, and local horizon workflows
Aliases: sunrise, sunset, rise set, civil day, how to get sunrise for a location, sunrise in a month, monthly sunrise
Topic: Astrologos.examples.sunrise - thematic index for sunrise, sunset, rise/set/transit, and local horizon workflows
Syntax:
events(sunrise, range(start, stop), location).first()
events(sunset, range(start, stop), location).first()
body.rise(range, observer).first()
pages(location, start).table(days: count)
Aliases: sunrise, sunset, rise set, civil day, how to get sunrise for a location, sunrise in a month, monthly sunrise
Resources: ephemeris, iers
Children: sunrise day, sunrise month
Examples
# Find the focused sunrise topics
print help("sunrise day").compact();
print help("sunrise month").compact();
# Quick sunrise and sunset for one day
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print events(sunrise, day, loc).first().time.utc();
print events(sunset, day, loc).first().time.utc();
# Month-style rise/set table
let loc = location(58.9666667, 5.7333333);
let rows = pages(loc, time(2024,4,1,0,0,0)).table(days: 30);
print rows[0].sunrise.time, rows[0].sunset.time;
Astrologos.examples.sunrise.day
topic different ways to calculate sunrise, sunset, and daylight for one location and one civil date
Aliases: single day sunrise, daily sunrise, sunrise methods, different ways to calculate sunrise, same sunrise different ways
Topic: Astrologos.examples.sunrise.day - different ways to calculate sunrise, sunset, and daylight for one location and one civil date
Syntax:
events(sunrise, day, location).first()
sun.rise(day, observer).first()
pages(location, time).small().short.sun.rise.time
pages(location, time).almanac().local.sun.rise
Aliases: single day sunrise, daily sunrise, sunrise methods, different ways to calculate sunrise, same sunrise different ways
Resources: ephemeris, iers
Examples
# Method 1: direct sunrise event for a location
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
let sunrise_event = events(sunrise, day, loc).first();
print sunrise_event.time.utc();
# Method 2: body method form with an observer
let loc = location(58.9666667, 5.7333333);
let obs = loc.observer(0.002);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print sun.rise(day, obs).first().time.utc();
# Method 3: one-day pages summary
let loc = location(58.9666667, 5.7333333);
let page = pages(loc, time(2024,4,17,0,0,0)).small();
print page.short.sun.rise.time, page.short.sun.set.time;
# Method 4: one-day almanac page
let loc = location(58.9666667, 5.7333333);
let local_day = pages(loc, time(2024,4,17,0,0,0)).almanac();
print local_day.local.sun.rise, local_day.local.sun.set;
# Day length from sunrise and sunset event times
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
let sunrise_time = events(sunrise, day, loc).first().time;
let sunset_time = events(sunset, day, loc).first().time;
print sunset_time - sunrise_time;
Astrologos.examples.sunrise.month
topic ways to calculate sunrise and sunset tables across many days
Aliases: monthly sunrise, sunrises in a month, sunrise table, rise set table, calculate sunrises in a month
Topic: Astrologos.examples.sunrise.month - ways to calculate sunrise and sunset tables across many days
Syntax:
pages(location, start).table(days: count)
almanac(start, stop, location).local.sun.rise
for d=0,count-1 { events(sunrise, range(day_start, day_stop), location) }
Aliases: monthly sunrise, sunrises in a month, sunrise table, rise set table, calculate sunrises in a month
Resources: ephemeris, iers
Examples
# Method 1: pages table for a month of sunrise and sunset rows
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let start = time(2024,4,1,0,0,0);
let rows = pages(loc, start).table(days: 30);
print rows[0].date, rows[0].sunrise.time, rows[0].sunset.time;
print rows[29].date, rows[29].sunrise.time, rows[29].sunset.time;
# Method 2: month almanac object
let loc = location(58.9666667, 5.7333333);
let start = time(2024,4,1,0,0,0);
let month = almanac(start, start.add_months(1), loc);
print month.local.sun.rise;
print month.local.sun.set;
# Method 3: explicit loop over days
let loc = location(58.9666667, 5.7333333);
let start = time(2024,4,1,0,0,0);
for d=0,29 {
let day_start = start.add_days(d);
let day = range(day_start, day_start.add_days(1));
print day_start.utc(), events(sunrise, day, loc).first().time.utc();
}
# Method 4: compare sunrise drift through a month
let loc = location(58.9666667, 5.7333333);
let rows = pages(loc, time(2024,4,1,0,0,0)).table(days: 30);
print rows[0].sunrise.time, rows[14].sunrise.time, rows[29].sunrise.time;
Astrologos.examples.moonrise
topic examples for moonrise, moonset, Moon altitude, and multi-day lunar visibility
Aliases: moonrise, moonset, moon visibility, lunar visibility, moon altitude
Topic: Astrologos.examples.moonrise - examples for moonrise, moonset, Moon altitude, and multi-day lunar visibility
Syntax:
events(moonrise, range(start, stop), location)
moon.rise(range, observer)
altitude(moon, time, observer)
pages(location, moon).summary(time)
Aliases: moonrise, moonset, moon visibility, lunar visibility, moon altitude
Resources: ephemeris, iers
Examples
# Moonrise and moonset for one night
let loc = location(60.0, 10.0);
let night = range(time(2026,5,20,0,0,0), time(2026,5,21,0,0,0));
print events(moonrise, night, loc).first();
print events(moonset, night, loc).first();
# Moonrise for the next five days
let loc = location(60.0, 10.0);
let start = time(2026,5,20,0,0,0);
print events(moonrise, range(start, start.add_days(5), 0.5), loc);
# Moon altitude through a night
let obs = location(60.0, 10.0).observer(0.002);
let t0 = time(2026,5,20,18,0,0);
for h=0,12,3 {
let t = t0.add_hours(h);
print t.utc(), altitude(moon, t, obs), azimuth(moon, t, obs);
}
# Compact local Moon summary
let m = pages(location(60,10), moon).summary(time(2026,5,20,21,0,0));
print m.position.topocentric.altitude, m.phase, m.illumination;
Astrologos.examples.moon_phase
topic examples inspired by lunar phase and orbit catalogs: phase, illumination, perigee, apogee, and shadows
Aliases: lunar phase, full moon, new moon, perigee, apogee, moon illumination
Topic: Astrologos.examples.moon_phase - examples inspired by lunar phase and orbit catalogs: phase, illumination, perigee, apogee, and shadows
Syntax:
moon_phase(time)
moon_illumination(time)
events(full_moon, range)
events(perigee, range, moon)
Aliases: lunar phase, full moon, new moon, perigee, apogee, moon illumination
Resources: ephemeris
Children: eclipses and shadows
Examples
# Moon phase and illumination at a time
let t = time(2026,1,15,0,0,0);
print moon_phase(t), moon_illumination(t), magnitude(moon, t);
# Full moon and new moon in a month
let month = range(time(2026,1,1,0,0,0), time(2026,2,1,0,0,0), 1);
print events(full_moon, month).first().time.utc();
print events(new_moon, month).first().time.utc();
# Lunar perigee and apogee in a month
let month = range(time(2024,4,1,0,0,0), time(2024,5,1,0,0,0), 1);
print events(perigee, month, moon).first();
print events(apogee, month, moon).first();
# Moon distance, speed, and phase-like context
let t = time(2026,1,15,0,0,0);
let st = state(moon, t, geocentric, icrf, all_corrections);
print st.position().length(), st.velocity().length(), moon_illumination(t);
# Lunar eclipse magnitude helpers near a known date
let t = time(2025,3,14,6,0,0);
print lunar_eclipse_magnitude(t), lunar_penumbra_magnitude(t), lunar_eclipse_clearance(t);
Astrologos.examples.stars
topic examples for star catalog lookup, visible stars, star rise/transit/set, and angular distance
Aliases: star catalog, visible stars, Sirius, star rise, bright stars
Topic: Astrologos.examples.stars - examples for star catalog lookup, visible stars, star rise/transit/set, and angular distance
Syntax:
stars().find("Sirius")
stars().visible(time, observer)
star.rise(range, observer)
star.direction()
Aliases: star catalog, visible stars, Sirius, star rise, bright stars
Resources: stars, ephemeris, iers
Children: moon and stars, constellations()
Examples
# Find Sirius and inspect it
let sirius = stars().find("Sirius");
print sirius.name, sirius.magnitude, sirius.constellation();
# Sirius rise, transit, and set
let sirius = stars().find("Sirius");
let obs = location(60.0, 10.0).observer(0.002);
let night = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0), 0.25);
print sirius.rise(night, obs).first();
print sirius.transit(night, obs).first();
print sirius.set(night, obs).first();
# Bright visible stars above a local horizon
let obs = location(60,10).observer(0.002);
print stars().visible(time(2026,1,1,21,0,0), obs, magnitude: 2.0);
# Angular distance between Sirius and the Moon
let t = time(2026,1,1,21,0,0);
let sirius = stars().find("Sirius").direction();
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
print moon_dir.angular_distance(sirius, t);
Astrologos.examples.constellations
topic examples for constellation lookup by direction, Moon, planets, and stars
Aliases: constellation lookup, which constellation, sky region, iau constellation
Topic: Astrologos.examples.constellations - examples for constellation lookup by direction, Moon, planets, and stars
Syntax:
constellations().inside(direction)
star.constellation()
direction(ra: value, dec: value)
Aliases: constellation lookup, which constellation, sky region, iau constellation
Resources: constellations, stars, ephemeris
Children: stars()
Examples
# Find which constellation contains a direction
let d = direction(ra: 88.8, dec: 7.4);
print constellations().inside(d);
# Moon and Sirius separation with constellation context
let t = time(2024,4,17,0,0,0);
let sirius = stars().find("Sirius");
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
print constellations().inside(moon_dir), moon_dir.angular_distance(sirius.direction());
# Planet constellation at a time
let t = time(2026,1,1,0,0,0);
let mars_dir = direction(ra(mars, t, all_corrections), dec(mars, t, all_corrections));
print constellations().inside(mars_dir);
# Star constellation shortcut
print stars().find("Sirius").constellation();
Astrologos.examples.moon_stars
topic examples for stars, Sirius, Moon constellations, visible stars, and angular-distance searches
Aliases: moon sirius, sirius, stars, constellations, moon close to sirius, angular separation
Topic: Astrologos.examples.moon_stars - examples for stars, Sirius, Moon constellations, visible stars, and angular-distance searches
Syntax:
stars().find("Sirius")
direction(ra(body, time, correction), dec(body, time, correction))
direction.angular_distance(other, time)
Aliases: moon sirius, sirius, stars, constellations, moon close to sirius, angular separation
Resources: ephemeris, stars, constellations, iers
Examples
# Sirius: lookup, constellation, and next rise
let sirius = stars().find("Sirius");
let obs = location(60.0, 10.0).observer(0.002);
let night = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0), 0.25);
print sirius.constellation();
print sirius.rise(night, obs).first().time.utc();
# Moon constellation at a time
let t = time(2024,4,17,0,0,0);
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
print constellations().inside(moon_dir);
# How to search for times when the Moon is close to Sirius
let sirius = stars().find("Sirius").direction();
let closeness = (t): direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections)).angular_distance(sirius, t) - 5.0;
let span = range(time(2026,1,1,0,0,0), time(2026,2,1,0,0,0), 0.25);
print search(closeness, span, target(0)).next();
# Visible star names for a local evening shortlist
let obs = location(60,10).observer(0.002);
let visible = stars().visible(time(2026,1,1,21,0,0), obs, magnitude: 2.0);
print visible.name, visible.constellation;
Astrologos.examples.sky_charts
topic examples for chart-style sky questions using astronomical constellations, named stars, separations, and time searches
Aliases: sky chart, chart positions, fixed stars, close approaches, planet in constellation, planet enters constellation, planet close to star, moon close to star, constellation change, appulse
Topic: Astrologos.examples.sky_charts - examples for chart-style sky questions using astronomical constellations, named stars, separations, and time searches
Syntax:
constellations().inside(direction(ra(body, t, all_corrections), dec(body, t, all_corrections)))
search((t): separation(t), range(start, stop, step), minimum).next()
search((t): separation(t) - threshold, range(start, stop, step), target(0))
ecliptic_longitude(time)
Aliases: sky chart, chart positions, fixed stars, close approaches, planet in constellation, planet enters constellation, planet close to star, moon close to star, constellation change, appulse
Resources: ephemeris, stars, constellations, iers
Children: constellations(), moon and stars, planet events, search and optimization
Examples
# Which IAU constellation contains a planet now
let t = time(2026,1,1,0,0,0);
let d = direction(ra(mars, t, all_corrections), dec(mars, t, all_corrections));
print mars.name, constellations().inside(d);
# Scan a month for planet constellation changes
let body = mars;
let start = time(2026,1,1,0,0,0);
let previous = "";
for day=0,31 {
let t = start.add_days(day);
let d = direction(ra(body, t, all_corrections), dec(body, t, all_corrections));
let c = constellations().inside(d);
if c.name != previous {
print t.utc(), body.name, c.name;
previous = c.name;
}
}
# Compare several planets by constellation
let t = time(2026,1,1,0,0,0);
let bodies = [mercury, venus, mars, jupiter, saturn];
for i=0,4 {
let body = bodies[i];
let d = direction(ra(body, t, all_corrections), dec(body, t, all_corrections));
print body.name, constellations().inside(d).name;
}
# Closest approach of Venus to Regulus in a time window
let star = stars().find("Regulus").direction();
let sep = (t): direction(ra(venus, t, all_corrections), dec(venus, t, all_corrections)).angular_distance(star, t);
let span = range(time(2026,7,1,0,0,0), time(2026,9,1,0,0,0), 0.25);
let closest = search(sep, span, minimum).next();
print closest.utc(), sep(closest);
# Times when the Moon is within five degrees of Aldebaran
let star = stars().find("Aldebaran").direction();
let sep = (t): direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections)).angular_distance(star, t) - 5.0;
let span = range(time(2026,1,1,0,0,0), time(2026,2,1,0,0,0), 0.25);
print search(sep, span, target(0)).all();
# Thirty-degree solar longitude sector
let sectors = ["sector 0", "sector 1", "sector 2", "sector 3", "sector 4", "sector 5", "sector 6", "sector 7", "sector 8", "sector 9", "sector 10", "sector 11"];
let t = time(2026,3,20,12,0,0);
let lon = ecliptic_longitude(t);
print sectors[floor(lon / 30.0)], lon;
# Nearest bright star to the Moon
let t = time(2026,1,1,21,0,0);
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
let nearest = stars().nearest(moon_dir, magnitude: 2.0);
print nearest.name, nearest.separation, nearest.constellation();
Astrologos.examples.planets
topic examples for planetary events such as opposition, conjunction, elongation, perihelion, and aphelion
Aliases: opposition, conjunction, elongation, perihelion, aphelion, planet examples
Topic: Astrologos.examples.planets - examples for planetary events such as opposition, conjunction, elongation, perihelion, and aphelion
Syntax:
events(opposition, range, body).first()
events(greatest_elongation, range, body).first()
body.perihelion(start, stop, step).first()
Aliases: opposition, conjunction, elongation, perihelion, aphelion, planet examples
Resources: ephemeris
Examples
# Planet opposition and Mercury elongation
let year = range(time(2024,1,1,0,0,0), time(2025,1,1,0,0,0), 2);
print events(opposition, year, jupiter).first();
print events(greatest_elongation, year, mercury).first();
# Sun orbital events relative to the solar-system barycenter
print sun.periapsis();
print sun.apoapsis();
print sun.greatest_western_elongation();
print sun.greatest_eastern_elongation();
print sun.opposition();
print sun.conjunction();
# Earth's perihelion and aphelion
let peri = events(perihelion, range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1), earth).first();
let aph = events(aphelion, range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1), earth).first();
print peri.time.utc(), peri.value;
print aph.time.utc(), aph.value;
# Planet position table at one time
let t = time(2026,1,1,0,0,0);
for i=0,4 {
let p = [mercury, venus, mars, jupiter, saturn][i];
print p.name, ra(p, t, all_corrections), dec(p, t, all_corrections), magnitude(p, t);
}
# Close approach style angular separation
let t = time(2026,1,1,0,0,0);
let venus_dir = direction(ra(venus, t, all_corrections), dec(venus, t, all_corrections));
let mars_dir = direction(ra(mars, t, all_corrections), dec(mars, t, all_corrections));
print venus_dir.angular_distance(mars_dir, t), distance(venus, t), distance(mars, t);
# Bright planet context inspired by magnitude catalogs
let t = time(2026,1,1,0,0,0);
print venus.name, magnitude(venus, t), elongation(venus, t), heliocentric_ecliptic_longitude(venus, t);
# Rotational axis helpers
let t = time(2026,1,1,0,0,0);
print rotational_axis_ra(mars, t), rotational_axis_dec(mars, t), rotational_axis(mars, t);
Astrologos.examples.eclipses
topic examples for eclipse events and shadow-distance helper functions
Aliases: solar eclipse, lunar eclipse, shadow, umbra, penumbra, obscuration
Topic: Astrologos.examples.eclipses - examples for eclipse events and shadow-distance helper functions
Syntax:
events(solar_eclipse, range, location).first()
solar_eclipse_magnitude(time, location)
lunar_eclipse_magnitude(time)
shadow_distance(body, time)
Aliases: solar eclipse, lunar eclipse, shadow, umbra, penumbra, obscuration
Resources: ephemeris, iers
Children: moon phase
Examples
# Solar eclipse event near Dallas, 2024-04-08
let dallas = location(latitude: 32.7767, longitude: -96.7970);
let span = range(time(2024,4,8,12,0,0), time(2024,4,9,0,0,0), 0.25);
print events(solar_eclipse, span, dallas).first();
# Solar eclipse helper values at a location
let dallas = location(32.7767, -96.7970);
let t = time(2024,4,8,18,20,0);
print solar_eclipse_magnitude(t, dallas), solar_eclipse_obscuration(t, dallas), solar_eclipse_clearance(t, dallas);
# Lunar eclipse helper values
let t = time(2025,3,14,6,0,0);
print lunar_eclipse_magnitude(t), lunar_penumbra_magnitude(t), lunar_eclipse_clearance(t);
# Moon umbra and penumbra distance helpers
let t = time(2024,4,8,18,20,0);
print moon_umbra_distance(t), moon_penumbra_distance(t), moon_shadow_earth_distance(t);
# Moon umbra occultation helper
let t = time(2024,4,8,18,20,0);
print moon_umbra_occultation(t);
# Location and planet shadow distances
let loc = location(latitude: 32.7767, longitude: -96.7970);
let t = time(2024,4,8,18,20,0);
print location_shadow_distance(t, loc), planet_shadow_earth_distance(mercury, t), shadow_distance(t);
Astrologos.examples.almanac
topic examples for pages(), almanac(), charts, local sky summaries, phases, and seasonal events
Aliases: almanac, pages, local sky, chart, moon phase, seasons
Topic: Astrologos.examples.almanac - examples for pages(), almanac(), charts, local sky summaries, phases, and seasonal events
Syntax:
pages(location).sky(time)
pages(time).chart()
almanac(start, stop, location)
Aliases: almanac, pages, local sky, chart, moon phase, seasons
Resources: ephemeris, iers
Examples
# Local sky page now
let loc = location(60.0, 10.0);
let s = pages(loc).sky();
print s.sun.altitude, s.moon.phase;
# Page chart with sign labels for several bodies
let c = pages(time(2026,1,1,0,0,0)).chart();
print c.bodies.sun.chart.sign, c.bodies.moon.chart.sign, c.bodies.mars.chart.sign;
# Equinoxes and solstices in one almanac
let a = almanac(time(2024,1,1,0,0,0), time(2025,1,1,0,0,0));
print a.seasons.ascending_equinox, a.seasons.northern_solstice;
print a.seasons.descending_equinox, a.seasons.southern_solstice;
Astrologos.examples.pages
topic examples for compact page-style data products over sky, chart, almanac, table, and state views
Aliases: data pages, sky page, chart page, state page, report pages
Topic: Astrologos.examples.pages - examples for compact page-style data products over sky, chart, almanac, table, and state views
Syntax:
pages(location).sky(time)
pages(time).chart()
pages(location, body).summary(time)
pages(time).state()
Aliases: data pages, sky page, chart page, state page, report pages
Resources: ephemeris, iers
Children: almanac pages, sunrise examples
Examples
# Local sky page now
let s = pages(location(60.0, 10.0)).sky();
print s.sun.altitude, s.moon.phase;
# Chart positions page
let c = pages(time(2026,1,1,0,0,0)).chart();
print c.bodies.sun.geocentric.longitude, c.bodies.moon.chart.sign;
# Compact Moon summary page
let m = pages(location(60.0, 10.0), moon).summary(time());
print m.position.topocentric.altitude, m.phase, m.illumination;
# One-day full local page
let d = pages(location(60.0, 10.0), time(2026,1,1,0,0,0)).small();
print d.short.sun.rise.time, d.chart.bodies.moon.geocentric.longitude;
# Solar-system state vectors page
let st = pages(time(2026,1,1,0,0,0)).state();
print st.bodies.earth.position_bc_icrf().length();
Astrologos.examples.coordinates
topic examples for right ascension, declination, altitude, azimuth, headings, frames, and units
Aliases: ra dec, altitude azimuth, heading, frames, angle units
Topic: Astrologos.examples.coordinates - examples for right ascension, declination, altitude, azimuth, headings, frames, and units
Syntax:
direction(ra: value, dec: value)
direction(topographic, azimuth: value, altitude: value)
heading(value)
to_radians(degrees)
vector.angle(other, deg)
angle_in_degrees(vector_a, vector_b)
Aliases: ra dec, altitude azimuth, heading, frames, angle units
Resources: ephemeris, iers
Children: vectors matrices orbits
Examples
# RA/Dec direction from body coordinates
let t = time(2026,1,1,0,0,0);
let mars_dir = direction(ra: ra(mars, t, all_corrections), dec: dec(mars, t, all_corrections));
print mars_dir.ra, mars_dir.dec;
# Long-form right ascension and ecliptic longitude
let t = time(2026,3,20,12,0,0);
print right_ascension(sun, t, all_corrections), declination(sun, t, all_corrections), ecliptic_longitude(t);
# Local altitude and azimuth for a body
let obs = location(60,10).observer(0.002);
let t = time(2026,1,1,21,0,0);
print altitude(jupiter, t, obs), azimuth(jupiter, t, obs);
# Topographic direction from azimuth and altitude
let d = direction(topographic, azimuth: 180.0, altitude: 25.0);
print d.frame, d.ra, d.dec;
# Apparent geocentric Sun-Moon separation in degrees
let t = time();
let sun_vector = state(body: sun, time: t).pos_gc_icrf;
let moon_vector = state(body: moon, time: t).pos_gc_icrf;
print sun_vector.angle(moon_vector, deg), angle_in_degrees(sun_vector, moon_vector);
# Headings and angle units
print heading("southwest"), heading(270.0), to_radians(180.0), to_degrees(pi);
# Apparent solar and lunar time
let loc = location(60,10);
let t = time(2026,6,21,12,0,0);
print apparent_solar_time(t, loc), lunar_time(t, loc);
Astrologos.examples.vectors_matrices
topic examples for vectors, matrices, state vectors, orbital elements, orbits, units, and spherical coordinates
Aliases: vector, matrix, orbit, elements, state vectors, geometry
Topic: Astrologos.examples.vectors_matrices - examples for vectors, matrices, state vectors, orbital elements, orbits, units, and spherical coordinates
Syntax:
vector(x, y, z)
spherical(radius, theta, phi)
vector.angle(other[, unit])
matrix(from, to, time)
elements(q, e, i, node, argument, anomaly, unit)
orbit(elements, central, time, axis)
Aliases: vector, matrix, orbit, elements, state vectors, geometry
Resources: ephemeris
Children: coordinates and directions
Examples
# Vector construction and distance
let a = vector(1, 0, 0);
let b = vector(0, 1, 0);
print a.length(), a.distance(b), a.cross(b);
# Vector angle in degrees
let a = vector(1, 0, 0);
let b = vector(0, 1, 0);
print a.angle(b, deg), angle_in_degrees(a, b);
# Spherical vector and unit conversion
let v = spherical(1.0, 45.0, 30.0, deg);
print v.length(), to_radians(45.0), to_degrees(pi);
# Matrix rotation between frames
let t = time(2026,1,1,0,0,0);
let m = matrix(icrf, ecliptic, t);
print m.determinant(), m.inverse().determinant();
# Body state position and velocity
let st = state(mars, time(2026,1,1,0,0,0), heliocentric, icrf, all_corrections);
print st.position().length(), st.velocity().length();
# Orbital elements and orbit value
let el = elements(q: 0.9, e: 0.1, i: 5.0, node: 80.0, argument: 45.0, anomaly: 0.0, unit: deg);
let o = orbit(el, sun, time(2026,1,1,0,0,0), icrf);
print o.elements().e, o.central.name;
Astrologos.examples.orbit_propagation
topic examples for immutable propagation systems, integrated states, diagnostics, and ephemeris residual checks
Aliases: orbit propagator, system propagation, n body, integrator, ias15, rk4, dp5, ephemeris residuals
Topic: Astrologos.examples.orbit_propagation - examples for immutable propagation systems, integrated states, diagnostics, and ephemeris residual checks
Syntax:
system(time, state(...), body, ...)
system(...).at(time)
system(...).diagnostics
system(...).ephemeris_residuals
bodies.find(name)
bodies.smallBodyStates(time)
bodies.smallBodyStates(time, min_mass)
Aliases: orbit propagator, system propagation, n body, integrator, ias15, rk4, dp5, ephemeris residuals
Resources: ephemeris, iers
Children: vectors matrices orbits, planet events
Examples
# Propagate an explicit comet state with the Sun from the ephemeris
let t0 = time(2026,4,27,8,26,0);
let comet0 = state(body: body("comet"), time: t0, position: vector(100000000,0,0), velocity: vector(0,10,0));
let later = system(t0, comet0, sun).at(t0.add_days(10));
print later.comet.position(), later.sun.position();
# Include massive small-body perturbers through the registry
let t0 = time(2026,1,1);
let ceres = bodies.find("ceres");
let sys = system(t0, bodies.longSolarSystem());
print ceres.name, sys.state("vesta").body.name, sys.states.length();
# Limit small-body perturbers by mass in kg
let t0 = time(2026,1,1);
let threshold = bodies.find("vesta").mass;
let sys = system(t0, bodies.smallBodyStates(t0, threshold));
print sys.states.length();
# Extract small-body states when they should be numerical initial conditions
let t0 = time(2026,1,1);
let small = bodies.smallBodyStates(t0);
let sys = system(t0, small, state(moon, t0));
print sys.sources.ceres, sys.sources.moon, sys.states.length();
# Compare integrated Solar-System states against ephemeris after one year
let t0 = time(2026,1,1);
let t1 = t0.add_days(365.25);
let sys = system(t0, state(sun,t0), state(earth,t0), state(moon,t0), state(mars,t0));
let later = sys.at(t1);
print later.ephemeris_residuals.earth, later.ephemeris_residuals.moon, later.diagnostics.accepted_steps;
# Use the shared cache during a short search-style sequence
let t0 = time(2026,1,1);
let comet0 = state(body: body("comet"), time: t0, position: vector(100000000,0,0), velocity: vector(0,10,0));
let sys = system(t0, comet0, sun);
let a = sys.at(t0.add_days(1));
let b = a.at(t0.add_days(1.25));
print b.cache_size, b.diagnostics.derivative_evaluations;
# Select an expert integrator; dp5 is a slow reference/debug method
let t0 = time(2026,1,1);
let comet0 = state(body: body("comet"), time: t0, position: vector(100000000,0,0), velocity: vector(0,10,0));
print system(t0, comet0, sun).integrator;
print system(t0, comet0, sun, method: "rk4").integrator;
print system(t0, comet0, sun, integrator: "dp5").integrator;
Astrologos.examples.polygons
topic examples for polygon geometry in sky or lon/lat style coordinate work
Aliases: polygon, sky polygon, area, inside, winding
Topic: Astrologos.examples.polygons - examples for polygon geometry in sky or lon/lat style coordinate work
Syntax:
polygon(frame, time, vertices)
polygon.inside(direction)
polygon.area()
Aliases: polygon, sky polygon, area, inside, winding
Children: coordinates and directions
Examples
# Polygon around a small sky region
let vertices = [direction(ra: 40, dec: 10), direction(ra: 50, dec: 10), direction(ra: 50, dec: 20), direction(ra: 40, dec: 20)];
let p = polygon(icrf, time(2026,1,1,0,0,0), vertices);
print p.count, p.area(), p.inside(direction(ra: 45, dec: 15));
# Polygon winding and inverted containment
let vertices = [direction(ra: 0, dec: 0), direction(ra: 10, dec: 0), direction(ra: 10, dec: 10)];
let p = polygon(icrf, time(), vertices);
let point = direction(ra: 180, dec: 0);
print p.winding(point), p.invert().inside(point);
# Convert polygon vertices to lon/lat diagnostics
let t = time(2026,1,1,0,0,0);
let p = polygon(icrf, t, [direction(ra: 0, dec: 0), direction(ra: 10, dec: 0), direction(ra: 10, dec: 10)]);
print p.lonlat(t), p.lonlat_diagnostic(t);
Astrologos.examples.places_timezones
topic examples for place search, nearby places, timezone lookup, and local civil time
Aliases: places, timezones, local time, city search, location database
Topic: Astrologos.examples.places_timezones - examples for place search, nearby places, timezone lookup, and local civil time
Syntax:
places().search("name")
timezones().at(location)
time.utc().local(timezone)
Aliases: places, timezones, local time, city search, location database
Resources: places, timezones
Examples
# Find a place and its timezone
let p = places().search("Stavanger").first();
let tz = p.timezone();
print p.name, p.location().latitude, tz.id;
# Convert UTC to local civil time at a location
let loc = location(58.9666667, 5.7333333);
let tz = timezones().at(loc);
print time(2026,6,1,12,0,0).local(tz).iso;
Astrologos.examples.weather_fields
topic examples for forecast products, field sources, NetCDF variables, scalar/vector fields, and sampling
Aliases: weather fields, forecast fields, scalar field, vector field, netcdf fields
Topic: Astrologos.examples.weather_fields - examples for forecast products, field sources, NetCDF variables, scalar/vector fields, and sampling
Syntax:
forecast().sample(location, field)
field(source, variable)
netcdf(source)
sample(field, location)
Aliases: weather fields, forecast fields, scalar field, vector field, netcdf fields
Resources: gfs
Children: topography(), magnetic field
Examples
# Sample current forecast fields at a location
let loc = location(60.0, 10.0);
let rows = forecast().sample(loc, temperature, humidity, wind);
print rows[0].temperature, rows[0].wind.u, rows[0].wind.v;
# Forecast metadata and availability
let fc = forecast();
print fc.available(), fc.count(), fc.cycle(), fc.max_time();
# Inspect forecast products
let fc = forecast();
print fc.toc();
print fc.messages().length();
# NetCDF field source and variable inspection
let nc = netcdf(earth_topography);
print nc.path, nc.variables.length(), nc.variable("z");
# Scalar field sample through compatibility helper
let loc = location(latitude: 60.0, longitude: 10.0);
let terrain = topography(earth);
print sample(terrain, loc);
Astrologos.examples.topography
topic examples for topographic field sampling and observer height workflows
Aliases: earth topography, height, elevation, terrain, sample topography
Topic: Astrologos.examples.topography - examples for topographic field sampling and observer height workflows
Syntax:
topography(body)
sample(topography(earth), location)
location.observer(height)
Aliases: earth topography, height, elevation, terrain, sample topography
Resources: earth_topography
Children: weather and fields
Examples
# Sample Earth topography
let loc = location(latitude: 60.0, longitude: 10.0);
print sample(topography(earth), loc);
# Sample an explicitly selected topography field
let topo = topography(earth);
print sample(topo, location(latitude: 60.0, longitude: 10.0));
# Use sampled height as an observer height
let loc = location(latitude: 60.0, longitude: 10.0);
let height_km = sample(topography(earth), loc) / 1000.0;
let obs = loc.observer(height_km);
print obs.height();
# Compare topography at two locations
let a = location(latitude: 60.0, longitude: 10.0);
let b = location(latitude: 27.9881, longitude: 86.9250);
print sample(topography(earth), a), sample(topography(earth), b);
Astrologos.examples.magnetic
topic examples for magnetic model handles and field sampling at observers
Aliases: magnetic, magnetic model, field model, geomagnetic
Topic: Astrologos.examples.magnetic - examples for magnetic model handles and field sampling at observers
Syntax:
magnetic(body, time, observer)
magnetic(...).field()
Aliases: magnetic, magnetic model, field model, geomagnetic
Resources: magnetic
Children: weather and fields
Examples
# Magnetic field at an observer
let obs = location(60.0, 10.0).observer(0.002);
let model = magnetic(earth, time(2026,1,1,0,0,0), obs);
print model.field();
# Magnetic model metadata
let obs = location(60.0, 10.0).observer();
let model = magnetic(earth, time(2026,1,1,0,0,0), obs);
print model.body.name, model.time.utc(), model.observer.latitude();
# Compare magnetic field at two places
let t = time(2026,1,1,0,0,0);
let north = magnetic(earth, t, location(70,20).observer()).field();
let south = magnetic(earth, t, location(-30,20).observer()).field();
print north, south;
Astrologos.examples.weather
topic examples for forecast fields, scalar/vector field sampling, topography, and magnetic models
Aliases: weather, forecast, gfs, topography, magnetic, field sampling
Topic: Astrologos.examples.weather - examples for forecast fields, scalar/vector field sampling, topography, and magnetic models
Syntax:
forecast().sample(location, field)
sample(field, location)
magnetic(body, time, observer).field()
Aliases: weather, forecast, gfs, topography, magnetic, field sampling
Resources: gfs, earth_topography, magnetic
Examples
# Build a compact weather-and-terrain row
let loc = location(latitude: 60.0, longitude: 10.0);
let rows = forecast().sample(loc, temperature, wind);
print rows[0].temperature, rows[0].wind.u, sample(topography(earth), loc);
# Compare forecast wind with magnetic field context
let loc = location(60.0, 10.0);
let obs = loc.observer(0.002);
let rows = forecast().sample(loc, wind);
print rows[0].wind.u, rows[0].wind.v, magnetic(earth, time(2026,1,1,0,0,0), obs).field();
# Magnetic field at an observer
let obs = location(60.0, 10.0).observer(0.002);
print magnetic(earth, time(2026,1,1,0,0,0), obs).field();
Astrologos.examples.graphics
topic examples for generating SVG plots and sky views
Aliases: graphics, svg, sky map, plot, chart drawing
Topic: Astrologos.examples.graphics - examples for generating SVG plots and sky views
Syntax:
graphics().line(...).write_svg("file.svg")
graphics(time, location).sky_view(center_az: 180, center_alt: 45, fov: 120).sky_grid().sky_planets().write_svg("sky.svg")
Aliases: graphics, svg, sky map, plot, chart drawing
Resources: ephemeris, stars, constellations
Examples
# Build a client-ready sky SVG with planets and bright stars
graphics(time(2026,1,1,21,0,0), location(latitude: 60, longitude: 10)).dark().sky_view(center_az: 180, center_alt: 45, fov: 120).sky_grid().sky_planets().sky_stars(magnitude: 4).write_svg("sky.svg");
print "wrote sky.svg";
# Plot Sun altitude samples into an SVG
let loc = location(60,10);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
graphics().function((h): altitude(sun, t0.add_hours(h), obs), range(0,24,1)).title("Sun altitude").write_svg("sun-altitude.svg");
print "wrote sun-altitude.svg";
# Draw a labelled line SVG plot with explicit axes
graphics().line([0, 1, 2, 3, 4], [1, 3, 2, 5, 4]).points([0, 1, 2, 3, 4], [1, 3, 2, 5, 4]).text([1, 3], [3, 5], ["local peak", "maximum"]).title("Example line chart").xlabel("sample number").ylabel("measured value").xrange(0, 4).yrange(0, 6).xticks([0, 1, 2, 3, 4]).yticks([0, 2, 4, 6]).write_svg("line-plot.svg");
print "wrote line-plot.svg";
# Draw a labelled point SVG plot with explicit axes
graphics().points([0, 1, 2, 3, 4], [2, 1, 4, 3, 5]).text([0, 2, 4], [2, 4, 5], ["A", "B", "C"]).title("Example point chart").xlabel("sample number").ylabel("score").xrange(-0.5, 4.5).yrange(0, 6).xticks([0, 1, 2, 3, 4]).yticks([0, 2, 4, 6]).write_svg("points-plot.svg");
print "wrote points-plot.svg";
# Return several SVG graphics from one program
let t = time(2026,1,1,21,0,0);
let loc = location(latitude: 60, longitude: 10);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
graphics(t, loc).dark().sky_view(center_az: 180, center_alt: 45, fov: 120).sky_grid().sky_stars(magnitude: 4).sky_planets().write_svg("gallery-sky.svg");
graphics().function((h): altitude(sun, t0.add_hours(h), obs), range(0,24,1)).title("Sun altitude").write_svg("gallery-sun-altitude.svg");
graphics().polygon([0, 1, 2, 3, 4], [0, 3, 4, 2, 0]).line([0, 1, 2, 3, 4], [0, 3, 4, 2, 0]).points([0, 1, 2, 3, 4], [0, 3, 4, 2, 0]).text([0, 2, 4], [0, 4, 0], ["start", "peak", "end"]).title("Polygon, points and labels").write_svg("gallery-shape.svg");
print "wrote three SVG graphics";
# Plot daylight duration across three planning dates
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let d0 = time(2026,4,1,0,0,0);
let d1 = time(2026,5,1,0,0,0);
let d2 = time(2026,6,1,0,0,0);
daylight(d) {
let span = range(d, d.add_days(1));
let rise = events(sunrise, span, loc).first().time;
let set = events(sunset, span, loc).first().time;
let value = (set - rise) * 24;
}
graphics().line([0, 1, 2], [daylight(d0).value, daylight(d1).value, daylight(d2).value]).points([0, 1, 2], [daylight(d0).value, daylight(d1).value, daylight(d2).value]).xlabel("month").ylabel("daylight hours").write_svg("daylight.svg");
print "wrote daylight.svg";
# Sky map centered on the south horizon
graphics(time(2026,1,1,21,0,0), location(60,10), center_az: 180, center_alt: 25, fov: 100).dark().sky_grid().sky_constellations().sky_planets().write_svg("south-sky.svg");
print "wrote south-sky.svg";
# Add custom text to a graphic
graphics().title("Example plot").text(1, 1, "note").write_svg("text.svg");
print "wrote text.svg";
Astrologos.examples.resources
topic examples for resource discovery, upstream source metadata, and availability checks
Aliases: resources, resource availability, data sources, diagnostics, available
Topic: Astrologos.examples.resources - examples for resource discovery, upstream source metadata, and availability checks
Syntax:
resources()
resource_sources()
value.available()
help("topic").resources
Aliases: resources, resource availability, data sources, diagnostics, available
Children: weather and fields, topography(), magnetic field
Examples
# Verify terrain data before sampling a location
let loc = location(60.0, 10.0);
let terrain = topography(earth);
print terrain.available(), sample(terrain, loc);
# Verify forecast data before sampling weather fields
let fc = forecast();
let loc = location(60.0, 10.0);
let rows = fc.sample(loc, temperature, wind);
print fc.available(), rows[0].temperature, rows[0].wind.u, rows[0].wind.v;
# Inspect the NetCDF file behind Earth topography
let nc = netcdf(earth_topography);
print nc.path, nc.variables.length();
# Export the upstream source table for an operator report
let sources = resource_sources();
print sources;
Astrologos.examples.runtime
topic examples for runtime automation, timing, early exit, and development checks
Aliases: automation, run file, elapsed, sleep, exit, help json
Topic: Astrologos.examples.runtime - examples for runtime automation, timing, early exit, and development checks
Syntax:
run("file.astrologos")
elapsed()
sleep(milliseconds)
exit()
astrologos-cli check-help-examples
Aliases: automation, run file, elapsed, sleep, exit, help json
Children: resources and diagnostics
Examples
# Time a sunrise search for an operator log
let start = elapsed();
let loc = location(58.9666667, 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
let rise = events(sunrise, day, loc).first().time.utc();
print rise, elapsed() - start;
# Pause between two status samples
let before = elapsed();
sleep(10);
print elapsed() - before;
# Stop a script early with the deprecated run() alias
print "before run";
run();
print "after run";
# Stop after a guard condition has printed the reason
let fc = forecast();
if fc.available() == false {
print "forecast unavailable";
exit();
}
print fc.count();
# Record the command that validates the shipped help examples
print "astrologos-cli check-help-examples";
Astrologos.examples.math
topic examples for numeric functions, trigonometry, rounding, logs, integration, and optimization
Aliases: math, numeric recipes, trigonometry, logs, rounding
Topic: Astrologos.examples.math - examples for numeric functions, trigonometry, rounding, logs, integration, and optimization
Syntax:
sin(x)
pow(x, y)
clamp(value, min, max)
angle_in_degrees(vector_a, vector_b)
integrate((x): expression, {x: range(a, b)})
minimize((x): expression, {x: start}, options)
Aliases: math, numeric recipes, trigonometry, logs, rounding
Children: search and optimization
Examples
# Trigonometry and unit conversion
let angle = to_radians(45);
print sin(angle), cos(angle), tan(angle), to_degrees(angle);
# Vector angle in degrees
let a = vector(1,0,0);
let b = vector(0,1,0);
print a.angle(b, deg), angle_in_degrees(a, b);
# Rounding, clamping, powers, and roots
let x = -2.75;
print abs(x), floor(x), ceil(x), round(x), trunc(x), clamp(x, -1, 1), pow(2, 8), sqrt(81), cbrt(27);
# Fractions, hypot, and signs
let x = -2.75;
print fract(x), hypot(3, 4), sign(x), min(x, 0), max(x, 0);
# Logs, exponentials, and finite checks
let value = exp(ln(10));
print value, exp2(3), log(100, 10), log10(1000), log2(8), is_finite(value), is_nan(0/0), is_infinite(1/0);
# Hyperbolic and inverse functions
print sinh(1), cosh(1), tanh(1), asinh(1), acosh(2), atanh(0.5), asin(0.5), acos(0.5), atan(1), atan2(1, 1);
# Integrate a daylight exposure proxy over a day
let exposure = integrate((h): max(0, sin(pi * h / 24)), {h: range(0, 24, 0.1)});
print exposure;
# Minimize distance from a desired Sun altitude
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = time(2026,6,21,0,0,0);
let objective = (h): pow(altitude(sun, day.add_hours(h), loc) - 20, 2);
print minimize(objective, {h: 6}, {bounds: {h: range(0, 24)}});
Astrologos.examples.search
topic examples for searching ranges, finding target crossings, and using closure-valued scalar functions
Aliases: search, target, root finding, minimize, custom scalar crossing
Topic: Astrologos.examples.search - examples for searching ranges, finding target crossings, and using closure-valued scalar functions
Syntax:
search((x): expression, range(start, stop, step), target(value)).next()
target(value, increasing)
target(value, decreasing)
Aliases: search, target, root finding, minimize, custom scalar crossing
Resources: ephemeris, iers
Examples
# Search for a custom scalar crossing
let root = search((x): cos(x) - 0.5, range(0, 4, 0.25), target(0, decreasing)).next();
print root;
# Find when the Sun crosses a chosen altitude
let loc = location(60,10);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
let f = (h): altitude(sun, t0.add_hours(h), obs) - 10.0;
print search(f, range(0, 24, 0.25), target(0)).next();
# Search for the Moon near Sirius
let sirius = stars().find("Sirius").direction();
let f = (t): direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections)).angular_distance(sirius, t) - 5.0;
print search(f, range(time(2026,1,1,0,0,0), time(2026,2,1,0,0,0), 0.25), target(0)).next();
# Closest approach style minimization over a numeric domain
let f = (x): pow(x - 2.5, 2) + 1;
print minimize(f, {x: 0}, {bounds: {x: range(0, 5)}});
# Use target direction to pick a crossing side
let root = search((x): sin(x), range(0, 7, 0.1), target(0, increasing)).next();
print root;
time
function creates UTC time, or local civil time when given a timezone, location, or place
Function: time - creates UTC time, or local civil time when given a timezone, location, or place
Syntax:
time() -> Time
time(julian_date: Number) -> Time
time(year: Integer, month: Integer, day: Integer, hour: Integer, minute: Integer, second: Integer) -> Time
time(timezone: Timezone|Text|Location|Place) -> LocalTime
time(year: Integer, month: Integer, day: Integer, hour: Integer, minute: Integer, second: Integer, timezone: Timezone|Text|Location|Place) -> LocalTime
Arguments:
julian_date: Number [optional] - UTC Julian date
year: Integer [optional] - full UTC year
month: Integer [optional] - month from 1 to 12
day: Integer [optional] - day from 1 to 31
hour: Integer [optional] - hour from 0 to 23
minute: Integer [optional] - minute from 0 to 59
second: Integer [optional] - second from 0 to 59
timezone: Timezone|Text|Location|Place [optional] - timezone id, Timezone, Location, or Place for local civil time
Resources: iers
Children: Time, year, month, day, hour, minute, second, weekday, year(), utc(), tt(), ut1(), tdb(), dt(), local(), add_months(), add_days(), add_hours(), add_minutes(), add_seconds(), children(), fields(), functions(), help(), available()
Examples
# Build a UTC timestamp for later calculations
print time();
weekday
function creates a weekday value
Function: weekday - creates a weekday value
Syntax:
weekday(value: Integer|Text) -> Weekday
Arguments:
value: Integer|Text - ISO index from 1 to 7, full name, or short name
Children: Weekday, name(), short(), letter(), index(), children(), fields(), functions(), help(), available()
Examples
# Convert a date or name to a weekday value
print wednesday;
location
function creates a location system value
Function: location - creates a location system value
Syntax:
location(body: Body, latitude: Number, longitude: Number) -> Location
Arguments:
body: Body [optional] - central body; defaults to earth
latitude: Number - latitude in degrees
longitude: Number - longitude in degrees
Children: Location, body, latitude, longitude, observer(), direction(), children(), fields(), functions(), help(), available()
Examples
# Prepare a latitude and longitude for local sky calculations
print location(latitude: 60.0, longitude: 270.0);
observer
function creates a body-fixed 3D observer
Function: observer - creates a body-fixed 3D observer
Syntax:
observer(location_or_body: Location|Body, height_or_position: Number|Field|Vector, height_or_zenith: Number|Vector) -> Observer
Arguments:
location_or_body: Location|Body - surface location or body for body-fixed vectors
height_or_position: Number|Field|Vector [optional] - height in kilometers, topography field for a location, or observer position vector
height_or_zenith: Number|Vector [optional] - height above topography for a location, or body-fixed zenith/up vector
Children: Observer, body, position, zenith, location, height_km, position(), location(), latitude(), longitude(), height(), zenith(), north(), west(), limb(), direction(), orbit(), children(), fields(), functions(), help(), available()
Examples
# Prepare an observing site with height
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
body
function creates a body system value
Function: body - creates a body system value
Syntax:
body(name: Text) -> Body
Arguments:
name: Text - solar-system body name
Children: Body, name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), inferior_conjunction(), superior_conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), greatest_eastern_elongation(), greatest_western_elongation(), greatest_elongation(), periapsis(), apoapsis(), transit(), children(), fields(), functions(), help(), available()
Examples
# Look up a solar-system body by name
print sun;
elements
function creates osculating orbital elements
Function: elements - creates osculating orbital elements
Syntax:
elements(q: Number, e: Number, i: Number, node: Number, argument: Number, anomaly: Number, unit: Unit) -> Elements
Arguments:
q: Number - periapsis distance in kilometers
e: Number - eccentricity
i: Number - inclination in degrees by default
node: Number - longitude of ascending node in degrees by default
argument: Number - argument of periapsis in degrees by default
anomaly: Number - true anomaly in degrees by default
unit: Unit [optional] - optional angle unit, such as rad
Children: Elements, q, e, i, node, argument, anomaly, semimajor_axis, semi_latus_rectum, children(), fields(), functions(), help(), available()
Examples
# Define elliptic orbital elements and inspect eccentricity and inclination
let el = elements(q: 7000, e: 0.1, i: 30, node: 40, argument: 50, anomaly: 0, unit: deg);
print el.q, el.e, el.i;
orbit
function creates a two-body orbit from elements
Function: orbit - creates a two-body orbit from elements
Syntax:
orbit(elements: Elements, central: Body, time: Time, axis: Axis) -> Orbit
Arguments:
elements: Elements - osculating elements at the epoch
central: Body - central gravitating body
time: Time - epoch time
axis: Axis [optional] - non-rotating element axis, icrf by default; tod is also accepted
Children: Orbit, body, central, time, epoch, axis, elements, position, velocity, conic, position(), velocity(), at(), elements(), predict(), children(), fields(), functions(), help(), available()
Examples
# Propagate an elliptic orbit six hours forward
let epoch = time(2026,1,1,0,0,0);
let el = elements(q: 7000, e: 0.1, i: 30, node: 40, argument: 50, anomaly: 0, unit: deg);
let orb = orbit(el, earth, epoch);
print orb.position().length(), orb.position(epoch.add_hours(6)).length();
system
function creates an immutable system of integrated states, body-backed orbits, and ephemeris bodies
Function: system - creates an immutable system of integrated states, body-backed orbits, and ephemeris bodies
Syntax:
system(epoch: Time, bodies: Body|State|Orbit|Text|List, integrator: Text) -> System
Arguments:
epoch: Time - system epoch
bodies: Body|State|Orbit|Text|List - system entries: explicit states, body-backed orbits, or ephemeris bodies
integrator: Text [optional] - optional integrator: "ias15", "dp5", or "rk4"; "dp5" is slow and mainly for debugging/reference comparisons
Resources: ephemeris, iers, small_bodies
Children: System, time, bodies, states, sources, source_counts, integrator, method, ephemeris_coverage, diagnostics, ephemeris_residuals, positions, velocities, integrated, ephemeris, cache_size, at(), cache(), clear_cache(), state(), position(), velocity(), distance(), children(), fields(), functions(), help(), available()
Examples
# Run the example and print a useful result
let t0 = time(2026, 7, 4); system(t0, earth, moon, sun)
# Run the example and print a useful result
let t0 = time(2026, 7, 4); let comet = state(body: body("comet"), time: t0, position: vector(100000000,0,0), velocity: vector(0,10,0)); system(t0, comet, sun)
# Run the example and print a useful result
let t0 = time(2026, 7, 4); let orbit0 = state(earth, t0).orbit_around(state(sun, t0)); system(t0, orbit0, moon)
# Run the example and print a useful result
let t0 = time(2026, 7, 4); system(t0, earth, moon, sun, integrator: "dp5")
observation
function creates an orbit-determination observation
Function: observation - creates an orbit-determination observation
Syntax:
observation(observer: Observer, time: Time, direction: Direction|State, frame: Frame) -> Observation
observation(target: Body|Star, time: Time, elevation: Number) -> Observation
Arguments:
observer: Observer [optional] - observing site
time: Time - observation time
direction: Direction|State [optional] - measured line of sight, or a state whose position gives the line of sight
frame: Frame [optional] - coordinate frame for RA/Dec shorthand or state conversion; defaults to icrf
target: Body|Star [optional] - observed planet, Moon, Sun, or star
elevation: Number [optional] - measured elevation above the horizon in degrees
Children: Observation, observer, time, direction, target, elevation, uncertainty, weight, label, icrf(), topographic(), with_uncertainty(), with_weight(), children(), fields(), functions(), help(), available()
Examples
# Run the example and print a useful result
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
# Synthesize a planet elevation observation for navigation
let loc = location(latitude: 59.91, longitude: 10.75);
let t = time(2026, 1, 12, 22, 10, 0);
let o = observation(jupiter, t, elevation: altitude(jupiter, t, loc));
print o.target.name, o.elevation;
# Synthesize a star elevation observation for navigation
let loc = location(latitude: 59.91, longitude: 10.75);
let site = loc.observer(height: 0);
let t = time(2026, 1, 12, 22, 0, 0);
let sirius = stars().find("sirius");
let o = observation(sirius, t, elevation: sirius.altaz(t, site).altitude);
print o.target.name, o.elevation;
# Build an observation from RA/Dec in an explicit frame
let obs = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let t = time(2026, 7, 3, 0, 0, 0);
print observation(obs, t, ra: 120.1, dec: 22.4, frame: icrf);
# Build an observation from a topocentric planet state
let loc = location(latitude: 59.91, longitude: 10.75);
let obs = loc.observer(height: 0);
let t = time(2026, 7, 3, 0, 0, 0);
let seen = state(mars, t, loc, topocentric, icrf, no_correction);
print observation(obs, t, seen);
orbit_determination
function determines an orbit from three or more observations
Function: orbit_determination - determines an orbit from three or more observations
Syntax:
orbit_determination(observations: List<Observation>) -> OrbitSolution
Arguments:
observations: List<Observation> - three or more observations
Resources: ephemeris, iers
Children: OrbitSolution, orbit, elements, observations, residuals, rms, max_residual, method, status, iterations, predict(), residuals(), children(), fields(), functions(), help(), available()
Examples
# Determine an elliptic orbit from five observations
let site = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let o1 = observation(site, time(2028, 7, 3, 0, 0, 0), ra: 131.0857742519269, dec: 18.803678151005595);
let o2 = observation(site, time(2028, 7, 23, 0, 0, 0), ra: 135.0300892722528, dec: 18.040162341691612);
let o3 = observation(site, time(2028, 8, 12, 0, 0, 0), ra: 139.04202357010908, dec: 17.175191580463146);
let o4 = observation(site, time(2028, 9, 1, 0, 0, 0), ra: 142.9726130958044, dec: 16.26645304942825);
let o5 = observation(site, time(2028, 9, 21, 0, 0, 0), ra: 146.67383907727944, dec: 15.384398529605518);
let od = orbit_determination([o1, o2, o3, o4, o5], central: sun);
print od.status, od.rms, od.orbit.conic;
print od.elements;
# Determine a parabolic orbit from five observations
let site = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let o1 = observation(site, time(2028, 7, 3, 0, 0, 0), ra: 131.17579335594158, dec: 18.78269573364523);
let o2 = observation(site, time(2028, 7, 23, 0, 0, 0), ra: 135.28728784032972, dec: 18.019922410032073);
let o3 = observation(site, time(2028, 8, 12, 0, 0, 0), ra: 139.4336093408432, dec: 17.155215233522643);
let o4 = observation(site, time(2028, 9, 1, 0, 0, 0), ra: 143.47212659888854, dec: 16.247957989051894);
let o5 = observation(site, time(2028, 9, 21, 0, 0, 0), ra: 147.26211907839155, dec: 15.369205484638817);
let od = orbit_determination([o1, o2, o3, o4, o5], central: sun);
print od.status, od.rms, od.orbit.conic;
print od.elements;
# Determine a hyperbolic orbit from five observations
let site = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let o1 = observation(site, time(2028, 7, 3, 0, 0, 0), ra: 131.18472418056754, dec: 18.780611424357605);
let o2 = observation(site, time(2028, 7, 23, 0, 0, 0), ra: 135.32226127731965, dec: 18.017374322931712);
let o3 = observation(site, time(2028, 8, 12, 0, 0, 0), ra: 139.49019892428979, dec: 17.151931814342543);
let o4 = observation(site, time(2028, 9, 1, 0, 0, 0), ra: 143.54674567209997, dec: 16.24393067242571);
let o5 = observation(site, time(2028, 9, 21, 0, 0, 0), ra: 147.35214877838115, dec: 15.364550692814579);
let od = orbit_determination([o1, o2, o3, o4, o5], central: sun);
print od.status, od.rms, od.orbit.conic;
print od.elements;
# Generate an observation from a planet state
let loc = location(latitude: 59.91, longitude: 10.75);
let obs = loc.observer(height: 0);
let t = time(2026, 7, 3, 0, 0, 0);
let seen = state(mars, t, loc, topocentric, icrf, no_correction);
print observation(obs, t, seen);
# Generate an observation from orbital elements
let obs = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let epoch = time(2028, 7, 3, 0, 0, 0);
let target = orbit(
elements(q: 900000000, e: 1.1, i: 18.0, node: 35.0, argument: 75.0, anomaly: 25.0),
sun,
epoch,
icrf
);
print observation(obs, epoch, target.predict(epoch, obs));
heading
function creates a compass heading
Function: heading - creates a compass heading
Syntax:
heading(azimuth: Number|Text, unit: Unit) -> Heading
Arguments:
azimuth: Number|Text - degrees clockwise from north, or a compass name such as "nw"
unit: Unit [optional] - optional angle unit for numeric headings; degrees are default
Children: Heading, azimuth_degrees, long_name, short_name, azimuth(), long(), short(), vector(), children(), fields(), functions(), help(), available()
Examples
# Prepare a compass heading for horizon calculations
print heading(135.0);
direction
function creates a frame-tagged unit-sphere direction
Function: direction - creates a frame-tagged unit-sphere direction
Syntax:
direction(frame: Frame, ra: Number, dec: Number, azimuth: Number, altitude: Number, zenith: Number, unit: Unit) -> Direction
Arguments:
frame: Frame [optional] - coordinate frame, defaulting to icrf
ra: Number [optional] - right ascension / longitude in degrees by default
dec: Number [optional] - declination / latitude in degrees by default
azimuth: Number [optional] - topographic azimuth clockwise from north; degrees are default
altitude: Number [optional] - topographic altitude/elevation above the horizon; degrees are default
zenith: Number [optional] - topographic angle down from local zenith; degrees are default
unit: Unit [optional] - optional angle unit such as rad
Children: Direction, frame, vector, ra, dec, to_frame(), altaz(), angular_distance(), rise(), set(), transit(), children(), fields(), functions(), help(), available()
Examples
# Compare two sky directions by angular distance
let a = direction(ra: 42.0, dec: 18.0);
let b = direction(ra: 45.0, dec: 20.0);
print a.angular_distance(b);
polygon
function creates a spherical polygon with great-circle edges
Function: polygon - creates a spherical polygon with great-circle edges
Syntax:
polygon(frame: Frame, vertices: List, time: Time) -> Polygon
Arguments:
frame: Frame [optional] - coordinate frame for the polygon vertices
vertices: List - right-handed vertex list with great-circle edges
time: Time [optional] - time used when converting vertices between frames
Children: Polygon, frame, count, vertices, invert(), to_frame(), inside(), area(), signed_area(), winding(), lonlat(), lonlat_unwrapped(), lonlat_diagnostic(), children(), fields(), functions(), help(), available()
Examples
# Test a sky direction against a polygon
print polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
vector
function creates a vector system value
Function: vector - creates a vector system value
Syntax:
vector(x: Number, y: Number, z: Number) -> Vector
vector(from: Origin, to: Origin, time: Time) -> Vector
Arguments:
x: Number [optional] - cartesian x component in km
y: Number [optional] - cartesian y component in km, defaulting to zero
z: Number [optional] - cartesian z component in km, defaulting to zero
from: Origin [optional] - source origin such as barycentric or geocentric
to: Origin [optional] - target origin such as barycentric or geocentric
time: Time [optional] - time for the origin transform
Children: Vector, kind, orientation, transposed, x(), y(), z(), range(), theta(), phi(), length(), lenxy(), lenxz(), lenyz(), dot(), cross(), angle(), distance(), online(), turn(), normalise(), transpose(), translate_origin(), children(), fields(), functions(), help(), available()
Examples
# Compute distance between two position vectors
let a = vector(7000, 0, 0);
let b = vector(0, 7000, 0);
print a.length(), b.length(), a.distance(b);
spherical
function creates a vector from spherical coordinates
Function: spherical - creates a vector from spherical coordinates
Syntax:
spherical(radius: Number, theta: Number, phi: Number, unit: Unit) -> Vector
Arguments:
radius: Number - spherical range/radius in km
theta: Number - azimuth angle in radians by default
phi: Number - elevation angle in radians by default
unit: Unit [optional] - optional angle unit for theta and phi, such as deg
Children: help(), available()
Examples
# Convert spherical coordinates into a vector-like value
print vector(1.0, 2.0, 3.0);
matrix
function creates a matrix system value
Function: matrix - creates a matrix system value
Syntax:
matrix(x0: Number, y0: Number, z0: Number) -> Matrix
matrix(from: Axis, to: Axis, time: Time) -> Matrix
matrix(m00: Number, m10: Number, m20: Number, m01: Number, m11: Number, m21: Number, m02: Number, m12: Number, m22: Number) -> Matrix
Arguments:
x0: Number [optional] - first diagonal value, or first column x for a 9-value matrix
y0: Number [optional] - second diagonal value, or first column y for a 9-value matrix
z0: Number [optional] - third diagonal value, or first column z for a 9-value matrix
from: Axis [optional] - source axis such as icrf, tod, ef, or topographic
to: Axis [optional] - target axis such as icrf, tod, ef, or topographic
time: Time [optional] - time for the axis transform
m00: Number [optional] - row 0 column 0
m10: Number [optional] - row 1 column 0
m20: Number [optional] - row 2 column 0
m01: Number [optional] - row 0 column 1
m11: Number [optional] - row 1 column 1
m21: Number [optional] - row 2 column 1
m02: Number [optional] - row 0 column 2
m12: Number [optional] - row 1 column 2
m22: Number [optional] - row 2 column 2
Resources: iers
Children: Matrix, m00, m10, m20, m01, m11, m21, m02, m12, m22, kind, transpose(), inverse(), determinant(), normalise(), multiply_transpose(), rotate_axis(), children(), fields(), functions(), help(), available()
Examples
# Rotate a vector from ICRF into Earth-fixed coordinates
let t = time(2026,1,1,0,0,0);
let v = matrix(icrf, earthfixed, t) * vector(1, 0, 0);
print v.x(), v.y(), v.z();
unit
function creates a unit system value
Function: unit - creates a unit system value
Syntax:
unit(name: Text) -> Unit
Arguments:
name: Text - unit name such as km, au, deg, or rad
Children: Unit, name, dimension, factor_to_base, children(), fields(), functions(), help(), available()
Examples
# Prepare a unit for quantity conversion
print deg;
state
function creates an orbital state from ephemeris data or explicit initial conditions
Function: state - creates an orbital state from ephemeris data or explicit initial conditions
Syntax:
state(body: Body, time: Time, location: Location, origin: Origin, axis: Axis, correction: Correction, orbit: Orbit, position: Vector, velocity: Vector, mass: Number, xmu: Number) -> State
state(template: State, body: Body) -> State
Arguments:
body: Body [optional] - solar-system body
time: Time [optional] - time for the state; defaults to current UTC time
location: Location [optional] - optional observer location
origin: Origin [optional] - default origin such as barycentric or geocentric
axis: Axis [optional] - default axis such as icrf, tod, ef, or topographic
correction: Correction [optional] - default correction model
orbit: Orbit [optional] - explicit two-body orbit to resolve into a barycentric ICRF state
position: Vector [optional] - explicit barycentric ICRF position in kilometers
velocity: Vector [optional] - explicit barycentric ICRF velocity in kilometers per day
mass: Number [optional] - override body mass in kg for integrated systems
xmu: Number [optional] - override gravitational parameter in km^3/s^2 for integrated systems
template: State [optional] - existing state whose time/location/defaults are reused
Resources: ephemeris, iers
Children: State, body, time, location, origin, axis, correction, ephemeris, pos_bc_icrf, vel_bc_icrf, pos_gc_icrf, vel_gc_icrf, pos_gc_tod, vel_gc_tod, pos_gc_ef, vel_gc_ef, position(), velocity(), ra(), dec(), geocentric(), topographic(), observer(), orbit_around(), shadow(), limb(), profile(), horizon(), children(), fields(), functions(), help(), available()
Examples
# Convert ephemeris position and velocity into orbital elements
let t = time(2026,1,1,0,0,0);
let earth_state = state(earth, t, barycentric, icrf, no_correction);
let sun_state = state(sun, t, barycentric, icrf, no_correction);
let orbit = earth_state.orbit_around(sun_state);
let el = orbit.elements();
print earth_state.position().length(), earth_state.velocity().length(), el.e;
places
function opens the GeoNames places resource
Aliases: placedb
Function: places - opens the GeoNames places resource
Syntax:
places(name: Text|Number, id: Number, country: Text|Country|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, limit: Number) -> Places
Aliases: placedb
Arguments:
name: Text|Number [optional] - place name or search text used to narrow this places view
id: Number [optional] - GeoNames id used to narrow this places view
country: Text|Country|Place [optional] - country filter for this places view
admin1: Text|Admin1|Admin2|Place [optional] - admin1 filter for this places view
admin2: Text|Admin2|Place [optional] - admin2 filter for this places view
limit: Number [optional] - maximum number of name matches retained by this places view
Resources: places
Children: Places, count, type_count, first(), all(), find(), search(), nearest(), nearby(), index(), types(), children(), fields(), functions(), help(), available()
Examples
# Open the place database for lookup
print places().find("Oslo");
# Open the place database for lookup
print places(name:"Oslo", country:"Norway").first();
# Open the place database for lookup
print places(id:3143244).first();
# Open the place database for lookup
print places().nearest(location(60, 10));
place
function creates a custom Earth place from a location and timezone
Function: place - creates a custom Earth place from a location and timezone
Syntax:
place(id: Number) -> Place|Unavailable
place(name: Text, location: Location, timezone: Timezone|Text) -> Place
Arguments:
id: Number [optional] - GeoNames place id
name: Text [optional] - custom place name
location: Location [optional] - Earth location
timezone: Timezone|Text [optional] - timezone; inferred from location when omitted
Children: Place, id, name, ascii_name, names, latitude, longitude, feature_class, feature_code, place_type, country_code, admin1_code, admin2_code, population, elevation_m, dem_m, timezone_id, modified, importance, distance_km, location(), timezone(), country(), admin1(), admin2(), children(), fields(), functions(), help(), available()
Examples
# Look up or define a named place
print places().find("Oslo");
# Look up or define a named place
print place("Cabin", location(60, 10));
country
function resolves a country from a name, ISO code, Place, or Country
Function: country - resolves a country from a name, ISO code, Place, or Country
Syntax:
country(country: Text|Place|Country) -> Country
Arguments:
country: Text|Place|Country - country name, ISO alpha-2 code, Place, or Country
Resources: places
Children: Country, code, name, place_id, children(), fields(), functions(), help(), available()
Examples
# Look up country metadata for a place
print country("Norway");
# Look up country metadata for a place
print places().find("Jar", country("NO"));
admin1
function resolves a first-level administrative region
Function: admin1 - resolves a first-level administrative region
Syntax:
admin1(admin1: Text|Number|Admin1, country: Text|Country|Place) -> Admin1
Arguments:
admin1: Text|Number|Admin1 - admin1 name or GeoNames admin1 code
country: Text|Country|Place - country containing the admin1 region
Resources: places
Children: Admin1, country_code, code, name, place_id, children(), fields(), functions(), help(), available()
Examples
# Look up first-level administrative metadata
print admin1("Akershus", country("NO"));
# Look up first-level administrative metadata
print places().find("Jar", admin1("01", norway));
admin2
function resolves a second-level administrative region
Function: admin2 - resolves a second-level administrative region
Syntax:
admin2(admin2: Text|Number|Admin2, admin1: Admin1|Place) -> Admin2
Arguments:
admin2: Text|Number|Admin2 - admin2 name or GeoNames admin2 code
admin1: Admin1|Place - admin1 region containing the admin2 region
Resources: places
Children: Admin2, country_code, admin1_code, code, name, place_id, children(), fields(), functions(), help(), available()
Examples
# Look up second-level administrative metadata
print admin2("3201", admin1("01", norway));
# Look up second-level administrative metadata
print places().find("Jar", admin2("3201", admin1("01", norway)));
timezones
function opens the IANA timezone boundary resource
Aliases: timezonedb, tzdb
Function: timezones - opens the IANA timezone boundary resource
Syntax:
timezones() -> Timezones
Aliases: timezonedb, tzdb
Resources: timezones
Children: Timezones, count, release, find(), at(), ids(), validate_places(), children(), fields(), functions(), help(), available()
Examples
# Open the timezone database for lookup
print timezones().find("Europe/Oslo");
# Open the timezone database for lookup
print timezones().at(location(60, 10));
timezone
function creates an IANA timezone from an id or Earth location
Aliases: tz
Function: timezone - creates an IANA timezone from an id or Earth location
Syntax:
timezone(timezone: Text|Location|Timezone) -> Timezone
Aliases: tz
Arguments:
timezone: Text|Location|Timezone - IANA timezone id, Location, or existing Timezone
Resources: timezones
Children: Timezone, id, aliases, countries, comment, latitude, longitude, release, local(), offset(), location(), children(), fields(), functions(), help(), available()
Examples
# Resolve an IANA timezone id
let zone = timezone("Europe/Oslo");
print zone.id, zone.location();
# Find the timezone for a latitude-longitude location
let loc = location(60, 10);
print timezone(loc).id;
# Format a UTC time in a resolved timezone
let zone = timezone("Europe/Oslo");
print time(2026,6,7,12,0,0).local(zone).iso;
stars
function opens the Yale Bright Star Catalogue resource
Aliases: stardb
Function: stars - opens the Yale Bright Star Catalogue resource
Syntax:
stars() -> Stars
Aliases: stardb
Resources: iers, ephemeris, stars, constellations
Children: Stars, count, find(), glob(), nearest(), all(), visible(), children(), fields(), functions(), help(), available()
Examples
# Look up Sirius in the star catalog and print its constellation
let sirius = stars().find("Sirius");
print sirius.name, sirius.constellation();
# Round-trip through the primary star id
let sirius = stars().find("sirius");
print sirius.id, stars().find(sirius.id).name;
# Explore uncertain spellings with a glob pattern
let matches = stars().glob("sir*");
print matches.length(), matches[0].name;
constellations
function opens the IAU constellation boundary resource
Function: constellations - opens the IAU constellation boundary resource
Syntax:
constellations() -> ConstellationDb
Resources: constellations
Children: ConstellationDb, count, find(), inside(), children(), fields(), functions(), help(), available()
Examples
# Find the constellation containing a sky direction
let d = direction(ra: 88.8, dec: 7.4);
print constellations().inside(d);
graphics
function creates a deferred SVG graphics object
Aliases: plot
Function: graphics - creates a deferred SVG graphics object
Syntax:
graphics(time: Time, location: Location|Observer, center: Direction, theme: Text, center_az: Number, center_alt: Number, fov: Number) -> Graphics
Aliases: plot
Arguments:
time: Time [optional] - default sky-view time
location: Location|Observer [optional] - default sky-view observer
center: Direction [optional] - default sky-view center direction
theme: Text [optional] - graphics theme, either dark or light
center_az: Number [optional] - default sky-view center azimuth in degrees
center_alt: Number [optional] - default sky-view center altitude in degrees
fov: Number [optional] - default sky-view field of view in degrees
Children: Graphics, line(), points(), polygon(), text(), function(), title(), xlabel(), ylabel(), xrange(), yrange(), xticks(), yticks(), dark(), light(), sky_view(), sky_grid(), sky_stars(), sky_constellations(), sky_planets(), sky_horizon(), svg(), write_svg(), children(), fields(), functions(), help(), available()
Examples
# Plot a local Sun-altitude curve and report the output file
let loc = location(60,10);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
let g = graphics().function((h): altitude(sun, t0.add_hours(h), obs), range(0,24,1)).title("Sun altitude");
g.write_svg("sun-altitude.svg");
print "wrote sun-altitude.svg";
target
function creates a value/direction target for search(...), or passes through minimum/maximum
Function: target - creates a value/direction target for search(...), or passes through minimum/maximum
Syntax:
target(value: Number|SearchGoal, direction: SearchDirection) -> Target|SearchGoal
Arguments:
value: Number|SearchGoal - numeric crossing value, minimum, or maximum
direction: SearchDirection [optional] - any, increasing, or decreasing
Children: Target, value, direction, children(), fields(), functions(), help(), available()
Examples
# Build a target crossing goal for morning Sun altitude
let loc = location(58.9666667, 5.7333333);
let day = time(2026,6,21,0,0,0);
let f = (h): altitude(sun, day.add_hours(h), loc);
print search(f, range(0, 24, 0.25), target(10, increasing)).next();
range
function creates a numeric or time range for search(...)
Function: range - creates a numeric or time range for search(...)
Syntax:
range(start: Number|Time, stop: Number, step: Number) -> Range
range(start: Number|Time, stop: Number|Time, step: Number) -> Range
Arguments:
start: Number|Time - start of the range
stop: Number - infinity or -infinity
step: Number [optional] - signed sampling step; time ranges use UTC days
Children: Range, kind, bounded, start, stop, step, children(), fields(), functions(), help(), available()
Examples
# Build a one-day hour range for a local altitude scan
let hours = range(0, 24, 2);
let t0 = time(2026,6,21,0,0,0);
for h=hours.start,hours.stop,hours.step {
print t0.add_hours(h).utc();
}
search
function searches for function crossings or local minimum/maximum points
Function: search - searches for function crossings or local minimum/maximum points
Syntax:
search(function: Callable, range: Range, goal: Target|SearchGoal) -> Search
Arguments:
function: Callable - function of one Number or Time argument returning a Number
range: Range - range(start, stop), range(start, stop, step), or range(start, infinity, step)
goal: Target|SearchGoal [optional] - target value and direction, minimum, or maximum; defaults to target(0, any)
Resources: iers
Children: Search, range, target, direction, next(), all(), children(), fields(), functions(), help(), available()
Examples
# Search for the morning hour when the Sun reaches ten degrees
let loc = location(58.9666667, 5.7333333);
let day = time(2026,6,21,0,0,0);
let f = (h): altitude(sun, day.add_hours(h), loc);
print search(f, range(0, 24, 0.25), target(10, increasing)).next();
forecast
function opens a published GFS forecast cycle from the retained stack
Function: forecast - opens a published GFS forecast cycle from the retained stack
Syntax:
forecast(index: Number, format: Text) -> Forecast
Arguments:
index: Number [optional] - forecast cycle stack index; 0 is the latest cycle
format: Text [optional] - optional storage format: "netcdf" (default when available), "grib", or "auto"
Resources: gfs_forecast
Children: Forecast, source, format, path, reason, index, hour, run, run_name, reference_time, valid_time, message_count, available(), count(), cycle(), cycle_step(), max_time(), spans(), times(), sample(), toc(), messages(), children(), fields(), functions(), help(), available()
Examples
# Open the latest forecast product and print availability metadata
let fc = forecast();
print fc.available(), fc.count();
netcdf
function opens a NetCDF dataset and returns its dimensions and variables
Function: netcdf - opens a NetCDF dataset and returns its dimensions and variables
Syntax:
netcdf(source: FieldSource) -> NetCDF
Arguments:
source: FieldSource - approved field source constant such as earth_topography or moon_topography
Children: NetCDF, source, path, dimensions, variables, variable(), children(), fields(), functions(), help(), available()
Examples
# Open a NetCDF-backed topography source and inspect its path
let nc = netcdf(earth_topography);
print nc.path, nc.variables.length();
field
function creates a global scalar field from a NetCDF variable
Function: field - creates a global scalar field from a NetCDF variable
Syntax:
field(source: FieldSource|NetCDF, variable: Text, body: Text|Body, lat: Text, lon: Text, indices: Object) -> Field
Arguments:
source: FieldSource|NetCDF - approved field source constant or opened NetCDF dataset
variable: Text [optional] - variable containing the scalar field; defaults from the source constant
body: Text|Body [optional] - body this field is attached to
lat: Text [optional] - latitude coordinate variable name
lon: Text [optional] - longitude coordinate variable name
indices: Object [optional] - fixed indices for non-lat/lon dimensions
Children: Field, source, path, variable, body, lat, lon, dimensions, indices, sample(), children(), fields(), functions(), help(), available()
Examples
# Sample a topography field at a location
let loc = location(60.0, 10.0);
let terrain = topography(earth);
print sample(terrain, loc);
topography
function creates an approved global topography field for a body
Function: topography - creates an approved global topography field for a body
Syntax:
topography(body: Body|Text|FieldSource) -> Field
Arguments:
body: Body|Text|FieldSource - body with an approved topography dataset, currently earth or moon
Children: help(), available()
Examples
# Sample Earth terrain height at a location
let loc = location(60.0, 10.0);
let topo = topography(earth);
print sample(topo, loc);
magnetic
function creates a magnetic field model handle
Function: magnetic - creates a magnetic field model handle
Syntax:
magnetic(body: Body, time: Time, observer: Observer) -> Magnetic
Arguments:
body: Body [optional] - body to model; Earth uses WMMHR, other bodies use crude dipoles
time: Time [optional] - default sample time
observer: Observer [optional] - default observer location
Children: Magnetic, body, time, observer, field(), children(), fields(), functions(), help(), available()
Examples
# Compute the magnetic field at an observer
print magnetic(earth).field(time(2025,1,1,0,0,0), location(latitude: 80, longitude: 0).observer());
# Compute the magnetic field at an observer
print magnetic(jupiter, time(2026,1,1,0,0,0), location(jupiter, latitude: 0, longitude: 0).observer()).field();
pages
function creates a data-page builder with optional default body, time, and observer
Function: pages - creates a data-page builder with optional default body, time, and observer
Syntax:
pages(body: Body, time: Time, observer: Location|Observer) -> Pages
Arguments:
body: Body [optional] - default body for body-oriented pages
time: Time [optional] - default time for page methods
observer: Location|Observer [optional] - default observer or surface location for local pages
Children: Pages, body, time, observer, sky(), chart(), summary(), sun(), moon(), almanac(), short(), small(), state(), states(), table(), children(), fields(), functions(), help(), available()
Examples
# Build a local Moon summary page
let page = pages(location(60.0, 10.0), moon).summary(time(2026,1,1,0,0,0));
print page.phase, page.illumination;
# Build a chart page for a fixed time
let chart = pages(time(2026,1,1,0,0,0)).chart();
print chart.bodies.sun.geocentric.longitude, chart.bodies.moon.chart.sign;
help
function returns the Astrologos calculator manual or one function's syntax
Function: help - returns the Astrologos calculator manual or one function's syntax
Syntax:
help() -> Help
help(name: Text|Any) -> Help|HelpResult|Nil
help(value: Any, name: Text) -> Help|HelpResult|Nil
Arguments:
name: Text|Any [optional] - registered help topic name or value to inspect
value: Any [optional] - value whose documentation should be searched
Children: help(), available(), doc(), compact(), search(), examples()
Examples
# Look up documentation from inside Astrologos
print help();
# Look up documentation from inside Astrologos
print help.search("azimuth");
about
function returns the project disclaimer, licence, and about text
Aliases: disclaimer, licence, license
Function: about - returns the project disclaimer, licence, and about text
Syntax:
about() -> Text
Aliases: disclaimer, licence, license
Children: help(), available()
Examples
# Review runtime version and caveat information
print about;
# Review runtime version and caveat information
print about();
resources
function lists known runtime resources and whether they are loaded
Function: resources - lists known runtime resources and whether they are loaded
Syntax:
resources() -> List
Children: help(), available()
Examples
# Lists known runtime resources and whether they are loaded
print resources();
resource_sources
function lists upstream data sources for known runtime resources
Function: resource_sources - lists upstream data sources for known runtime resources
Syntax:
resource_sources() -> List
Children: help(), available()
Examples
# List upstream data sources used by the runtime
print resource_sources();
exit
function stops execution after the current statement, optionally returning a message
Function: exit - stops execution after the current statement, optionally returning a message
Syntax:
exit() -> Nil
exit(messages: Any...) -> Text
Arguments:
messages: Any... [optional] - optional values printed on the warning channel before exit
Children: help(), available()
Examples
# Stops execution after the current statement, optionally returning a message
print exit();
run
function deprecated alias for exit()
Function: run - deprecated alias for exit()
Syntax:
run() -> Nil
Children: help(), available()
Examples
# Deprecated alias for exit()
print run();
functions
function lists function metadata, optionally filtered by function name
Function: functions - lists function metadata, optionally filtered by function name
Syntax:
functions() -> List
functions(name: Text) -> List
Arguments:
name: Text [optional] - exact function or method name to list
Children: help(), available()
Examples
# Find callable helpers related to lunar phase
let hits = functions("moon_phase");
print hits.length(), hits[0].name, hits[0].path;
fields
function lists type field metadata, optionally filtered by field name
Function: fields - lists type field metadata, optionally filtered by field name
Syntax:
fields() -> List
fields(name: Text) -> List
Arguments:
name: Text [optional] - exact field name to list
Children: help(), available()
Examples
# Lists type field metadata, optionally filtered by field name
print fields();
types
function lists registered astro/system types, constructors, fields, and members
Function: types - lists registered astro/system types, constructors, fields, and members
Syntax:
types() -> List
Children: help(), available()
Examples
# Inspect a small slice of registered runtime types
let all = types();
print all.length(), all[0].name;
elapsed
function returns elapsed execution time in seconds
Function: elapsed - returns elapsed execution time in seconds
Syntax:
elapsed() -> Number
Children: help(), available()
Examples
# Returns elapsed execution time in seconds
print elapsed();
sleep
function pauses execution for a number of milliseconds
Function: sleep - pauses execution for a number of milliseconds
Syntax:
sleep(milliseconds: Number) -> Nil
Arguments:
milliseconds: Number - Duration to pause execution, in milliseconds.
Children: help(), available()
Examples
# Pauses execution for a number of milliseconds
print sleep(42.0);
array
function creates an array from positional values
Function: array - creates an array from positional values
Syntax:
array() -> Array
Children: help(), available()
Examples
# Creates an array from positional values
print array();
hash
function creates an ordered hash/object from named values
Function: hash - creates an ordered hash/object from named values
Syntax:
hash() -> Object
Children: help(), available()
Examples
# Creates an ordered hash/object from named values
print hash();
args
function captures positional and named values as an argument-list value
Function: args - captures positional and named values as an argument-list value
Syntax:
args() -> Arguments
Children: help(), available()
Examples
# Captures positional and named values as an argument-list value
print args();
keys
function returns ordered keys for an array, object, or argument-list value
Function: keys - returns ordered keys for an array, object, or argument-list value
Syntax:
keys(value: Any) -> List
Arguments:
value: Any - array, object, or argument-list value to inspect
Children: help(), available()
Examples
# Audit the columns in a Moon visibility report row
let row = {body: moon.name, phase: moon_phase(time(2026,1,1,0,0,0)), illumination: moon_illumination(time(2026,1,1,0,0,0))};
print keys(row);
values
function returns ordered values from an array, object, or argument-list value
Function: values - returns ordered values from an array, object, or argument-list value
Syntax:
values(value: Any) -> List
Arguments:
value: Any - array, object, or argument-list value to inspect
Children: help(), available()
Examples
# Export the values from a Moon visibility report row
let row = {body: moon.name, phase: moon_phase(time(2026,1,1,0,0,0)), illumination: moon_illumination(time(2026,1,1,0,0,0))};
print values(row);
items
function returns ordered key/value objects from an array, object, or argument-list value
Function: items - returns ordered key/value objects from an array, object, or argument-list value
Syntax:
items(value: Any) -> List
Arguments:
value: Any - array, object, or argument-list value to inspect
Children: help(), available()
Examples
# Convert a Moon visibility row to key-value audit items
let row = {body: moon.name, phase: moon_phase(time(2026,1,1,0,0,0)), illumination: moon_illumination(time(2026,1,1,0,0,0))};
print items(row);
pretty
function formats a value as indented JSON text
Function: pretty - formats a value as indented JSON text
Syntax:
pretty(value: Any) -> Text
Arguments:
value: Any - array, object, or argument-list value to inspect
Children: help(), available()
Examples
# Pretty-print a structured value
print pretty({name:"sun", positions:[1, 2, 3]});
format
function formats values as text with small printf-style placeholders
Function: format - formats values as text with small printf-style placeholders
Syntax:
format(pattern: Text, value: Any) -> Text
Arguments:
pattern: Text - format pattern containing %f, %.Nf, %s, {}, or %% placeholders
value: Any - value consumed by the next placeholder
Children: help(), available()
Examples
# Format chart numbers to fixed decimal places
let t = time(2026,1,1,0,0,0);
let moon_chart = pages(t).chart().bodies.moon;
print moon_chart.chart.sign, format("%.6f", moon_chart.chart.degree_in_sign), format("%.6f", moon_chart.geocentric.longitude);
# Combine text, numeric precision, literal percent, and value rendering
print format("%s %.2f %% {}", "moon", 12.345, {sign:"virgo"});
typeof
function returns the type or function name of a value
Function: typeof - returns the type or function name of a value
Syntax:
typeof(value: Any) -> Text
Arguments:
value: Any - array, object, or argument-list value to inspect
Children: help(), available()
Examples
# Validate the shape of a generated result
print typeof(location(latitude: 60.0, longitude: 270.0));
altitude
function returns corrected topographic altitude/elevation in degrees
Function: altitude - returns corrected topographic altitude/elevation in degrees
Syntax:
altitude(body: Body, time: Time, observer: Location|Observer, correction: Correction) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
observer: Location|Observer - observer location or elevated/body-fixed observer
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected topographic altitude/elevation in degrees
print altitude(sun, time(), location(latitude: 60.0, longitude: 270.0));
azimuth
function returns corrected topographic azimuth in degrees
Function: azimuth - returns corrected topographic azimuth in degrees
Syntax:
azimuth(body: Body, time: Time, observer: Location|Observer, correction: Correction) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
observer: Location|Observer - observer location or elevated/body-fixed observer
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected topographic azimuth in degrees
print azimuth(sun, time(), location(latitude: 60.0, longitude: 270.0));
distance
function returns corrected geocentric distance in kilometers
Function: distance - returns corrected geocentric distance in kilometers
Syntax:
distance(body: Body, time: Time, correction: Correction) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected geocentric distance in kilometers
print distance(sun, time());
right_ascension
function returns corrected geocentric true-of-date right ascension in degrees
Aliases: ra
Function: right_ascension - returns corrected geocentric true-of-date right ascension in degrees
Syntax:
right_ascension(body: Body, time: Time, correction: Correction) -> Number
Aliases: ra
Arguments:
body: Body - solar-system body
time: Time - observation time
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected geocentric true-of-date right ascension in degrees
print right_ascension(sun, time());
declination
function returns corrected geocentric true-of-date declination in degrees
Aliases: dec
Function: declination - returns corrected geocentric true-of-date declination in degrees
Syntax:
declination(body: Body, time: Time, correction: Correction) -> Number
Aliases: dec
Arguments:
body: Body - solar-system body
time: Time - observation time
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected geocentric true-of-date declination in degrees
print declination(sun, time());
ecliptic_longitude
function returns corrected apparent geocentric ecliptic longitude in degrees
Function: ecliptic_longitude - returns corrected apparent geocentric ecliptic longitude in degrees
Syntax:
ecliptic_longitude(time: Time, correction: Correction) -> Number
ecliptic_longitude(body: Body, time: Time, correction: Correction) -> Number
Arguments:
time: Time - observation time; returns the Sun's apparent geocentric ecliptic longitude
correction: Correction [optional] - optional correction model; defaults to all_corrections
body: Body [optional] - solar-system body
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected apparent geocentric ecliptic longitude in degrees
print ecliptic_longitude(time());
heliocentric_ecliptic_longitude
function returns corrected heliocentric ecliptic longitude in degrees
Function: heliocentric_ecliptic_longitude - returns corrected heliocentric ecliptic longitude in degrees
Syntax:
heliocentric_ecliptic_longitude(body: Body, time: Time, correction: Correction) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
correction: Correction [optional] - optional correction model; defaults to all_corrections
Resources: ephemeris
Children: help(), available()
Examples
# Returns corrected heliocentric ecliptic longitude in degrees
print heliocentric_ecliptic_longitude(sun, time());
elongation
function returns signed geocentric elongation from the Sun in degrees
Function: elongation - returns signed geocentric elongation from the Sun in degrees
Syntax:
elongation(body: Body, time: Time) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed geocentric elongation from the Sun in degrees
print elongation(sun, time());
moon_phase
function returns Moon phase angle percentage in the range 0..100
Function: moon_phase - returns Moon phase angle percentage in the range 0..100
Syntax:
moon_phase(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns Moon phase angle percentage in the range 0..100
print moon_phase(time());
moon_illumination
function returns illuminated percentage of the Moon as seen from Earth
Function: moon_illumination - returns illuminated percentage of the Moon as seen from Earth
Syntax:
moon_illumination(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns illuminated percentage of the Moon as seen from Earth
print moon_illumination(time());
magnitude
function returns approximate apparent visual magnitude
Function: magnitude - returns approximate apparent visual magnitude
Syntax:
magnitude(body: Body, time: Time) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns approximate apparent visual magnitude
print magnitude(sun, time());
apparent_solar_time
function returns apparent solar time in local hours
Function: apparent_solar_time - returns apparent solar time in local hours
Syntax:
apparent_solar_time(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Returns apparent solar time in local hours
print apparent_solar_time(time(), location(latitude: 60.0, longitude: 270.0));
lunar_time
function returns local lunar hour angle as hours
Function: lunar_time - returns local lunar hour angle as hours
Syntax:
lunar_time(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Returns local lunar hour angle as hours
print lunar_time(time(), location(latitude: 60.0, longitude: 270.0));
rotational_axis
function returns a body's rotational north-pole RA, declination, and ICRF unit vector
Function: rotational_axis - returns a body's rotational north-pole RA, declination, and ICRF unit vector
Syntax:
rotational_axis(body: Body, time: Time) -> Object
Arguments:
body: Body - solar-system body
time: Time - observation time
Children: help(), available()
Examples
# Returns a body's rotational north-pole RA, declination, and ICRF unit vector
print rotational_axis(sun, time());
rotational_axis_ra
function returns a body's rotational north-pole right ascension in degrees
Function: rotational_axis_ra - returns a body's rotational north-pole right ascension in degrees
Syntax:
rotational_axis_ra(body: Body, time: Time) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
Children: help(), available()
Examples
# Returns a body's rotational north-pole right ascension in degrees
print rotational_axis_ra(sun, time());
rotational_axis_dec
function returns a body's rotational north-pole declination in degrees
Function: rotational_axis_dec - returns a body's rotational north-pole declination in degrees
Syntax:
rotational_axis_dec(body: Body, time: Time) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
Children: help(), available()
Examples
# Returns a body's rotational north-pole declination in degrees
print rotational_axis_dec(sun, time());
dms
function converts decimal degrees to degree-minute-second components
Function: dms - converts decimal degrees to degree-minute-second components
Syntax:
dms(value: Number) -> Object
dms(value: Number, axis: Text) -> Object
Arguments:
value: Number - signed decimal degrees
axis: Text [optional] - latitude or longitude for hemisphere labels
Children: help(), available()
Examples
# Converts decimal degrees to degree-minute-second components
print dms(42.0);
dd
function converts degree-minute-second components to signed decimal degrees
Function: dd - converts degree-minute-second components to signed decimal degrees
Syntax:
dd(degrees: Number, minutes: Number, seconds: Number, hemisphere: Text) -> Number
Arguments:
degrees: Number - degrees component
minutes: Number [optional] - minutes component
seconds: Number [optional] - seconds component
hemisphere: Text [optional] - N, S, E, or W
Children: help(), available()
Examples
# Converts degree-minute-second components to signed decimal degrees
print dd(42.0);
solar_eclipse_magnitude
function returns local solar eclipse magnitude at a time and location
Function: solar_eclipse_magnitude - returns local solar eclipse magnitude at a time and location
Syntax:
solar_eclipse_magnitude(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Returns local solar eclipse magnitude at a time and location
print solar_eclipse_magnitude(time(), location(latitude: 60.0, longitude: 270.0));
solar_eclipse_obscuration
function returns percent of the solar disc occulted locally
Function: solar_eclipse_obscuration - returns percent of the solar disc occulted locally
Syntax:
solar_eclipse_obscuration(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Returns percent of the solar disc occulted locally
print solar_eclipse_obscuration(time(), location(latitude: 60.0, longitude: 270.0));
solar_eclipse_clearance
function returns signed local Sun-Moon limb clearance in degrees
Function: solar_eclipse_clearance - returns signed local Sun-Moon limb clearance in degrees
Syntax:
solar_eclipse_clearance(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed local Sun-Moon limb clearance in degrees
print solar_eclipse_clearance(time(), location(latitude: 60.0, longitude: 270.0));
lunar_eclipse_magnitude
function returns signed umbral lunar eclipse magnitude
Function: lunar_eclipse_magnitude - returns signed umbral lunar eclipse magnitude
Syntax:
lunar_eclipse_magnitude(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed umbral lunar eclipse magnitude
print lunar_eclipse_magnitude(time());
lunar_penumbra_magnitude
function returns signed penumbral lunar eclipse magnitude
Function: lunar_penumbra_magnitude - returns signed penumbral lunar eclipse magnitude
Syntax:
lunar_penumbra_magnitude(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed penumbral lunar eclipse magnitude
print lunar_penumbra_magnitude(time());
lunar_eclipse_clearance
function returns signed Moon-surface clearance from Earth's penumbra in kilometers
Function: lunar_eclipse_clearance - returns signed Moon-surface clearance from Earth's penumbra in kilometers
Syntax:
lunar_eclipse_clearance(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed Moon-surface clearance from Earth's penumbra in kilometers
print lunar_eclipse_clearance(time());
shadow_distance
function returns signed surface clearance for the active Sun-Earth-Moon shadow geometry
Function: shadow_distance - returns signed surface clearance for the active Sun-Earth-Moon shadow geometry
Syntax:
shadow_distance(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed surface clearance for the active Sun-Earth-Moon shadow geometry
print shadow_distance(time());
moon_shadow_earth_distance
function returns signed Earth-surface clearance from the Moon shadow cone in kilometers
Function: moon_shadow_earth_distance - returns signed Earth-surface clearance from the Moon shadow cone in kilometers
Syntax:
moon_shadow_earth_distance(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed Earth-surface clearance from the Moon shadow cone in kilometers
print moon_shadow_earth_distance(time());
moon_penumbra_distance
function returns signed Moon-surface clearance from Earth's penumbra in kilometers
Function: moon_penumbra_distance - returns signed Moon-surface clearance from Earth's penumbra in kilometers
Syntax:
moon_penumbra_distance(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed Moon-surface clearance from Earth's penumbra in kilometers
print moon_penumbra_distance(time());
moon_umbra_distance
function returns signed Moon-surface clearance from Earth's umbra in kilometers
Function: moon_umbra_distance - returns signed Moon-surface clearance from Earth's umbra in kilometers
Syntax:
moon_umbra_distance(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns signed Moon-surface clearance from Earth's umbra in kilometers
print moon_umbra_distance(time());
moon_umbra_occultation
function returns percent overlap of the Moon and Earth's umbra
Function: moon_umbra_occultation - returns percent overlap of the Moon and Earth's umbra
Syntax:
moon_umbra_occultation(time: Time) -> Number
Arguments:
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Returns percent overlap of the Moon and Earth's umbra
print moon_umbra_occultation(time());
location_shadow_distance
function returns signed local observer clearance from the Moon shadow cone in kilometers
Function: location_shadow_distance - returns signed local observer clearance from the Moon shadow cone in kilometers
Syntax:
location_shadow_distance(time: Time, location: Location) -> Number
Arguments:
time: Time - observation time
location: Location - observer location
Resources: ephemeris
Children: help(), available()
Examples
# Compute local eclipse shadow clearance for a location and time
let loc = location(latitude: 32.7767, longitude: -96.7970);
let t = time(2024,4,8,18,40,0);
print location_shadow_distance(t, loc);
planet_shadow_earth_distance
function returns signed Earth-surface clearance from a planet shadow cone in kilometers
Function: planet_shadow_earth_distance - returns signed Earth-surface clearance from a planet shadow cone in kilometers
Syntax:
planet_shadow_earth_distance(body: Body, time: Time) -> Number
Arguments:
body: Body - solar-system body
time: Time - observation time
Resources: ephemeris
Children: help(), available()
Examples
# Measure Mercury shadow-cone clearance during a transit
let t = time(2019,11,11,15,0,0);
print planet_shadow_earth_distance(mercury, t);
events
function finds astronomical events from event type constants and time ranges
Function: events - finds astronomical events from event type constants and time ranges
Syntax:
events(event_type: EventType, bounded_range: Range) -> List
events(event_type: EventType, open_range: Range) -> Event|Nil
events(event_type: EventType, bounded_range: Range, observer_or_body: Location|Observer|Body) -> List
events(event_type: EventType, open_range: Range, observer_or_body: Location|Observer|Body) -> Event|Nil
events(event_type: EventType, bounded_range: Range, body: Body, observer: Location|Observer) -> List
events(event_type: EventType, open_range: Range, body: Body, observer: Location|Observer) -> Event|Nil
events(event_type: EventType, range: Range, observer: Location|Observer|Body, secondary: Location|Observer) -> List|Event|Nil
Arguments:
event_type: EventType - event constant such as sunrise, full_moon, conjunction, or northern_solstice
bounded_range: Range [optional] - time range with a finite stop, such as range(start, stop)
open_range: Range [optional] - open-ended time range, such as range(start, infinity, step)
observer_or_body: Location|Observer|Body [optional] - observer for local events, body for planetary events, or eclipsed body for eclipse
body: Body [optional] - eclipsed body, such as sun or moon
observer: Location|Observer [optional] - optional observer for local generic solar eclipse events
range: Range [optional] - bounded or open-ended time range
secondary: Location|Observer [optional] - optional observer for generic solar eclipse events
Resources: iers, ephemeris
Children: help(), available()
Examples
# Find sunrise events for a bounded day and explicit location
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let day = range(time(2024,4,17,0,0,0), time(2024,4,18,0,0,0));
print events(sunrise, day, loc).first().time.utc();
sky
function summarizes the local sky and upcoming local events
Function: sky - summarizes the local sky and upcoming local events
Syntax:
sky(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time - time at which to describe the local sky
observer: Location|Observer - Earth location or observer
Resources: iers, ephemeris
Children: help(), available()
Examples
# Summarizes the local sky and upcoming local events
print sky(time(), location(latitude: 60.0, longitude: 270.0));
almanac
function builds a range almanac from astronomical event searches
Function: almanac - builds a range almanac from astronomical event searches
Syntax:
almanac(range: Range|Time, stop: Time, observer: Location|Observer) -> Object
Arguments:
range: Range|Time - bounded time range, or start time when using start/stop arguments
stop: Time - stop time
observer: Location|Observer [optional] - optional Earth location or observer for local horizon events
Resources: iers, ephemeris
Children: help(), available()
Examples
# Build an almanac over a non-empty time range
let start = time(2024,1,1,0,0,0);
let stop = time(2025,1,1,0,0,0);
print almanac(start, stop).seasons.northern_solstice.time.utc;
integrate
function integrates a callable over named ranges or advances named derivatives
Function: integrate - integrates a callable over named ranges or advances named derivatives
Syntax:
integrate(function: Function, domain: Object) -> Number
integrate(initial: Object, derivatives: Object, domain: Object) -> Array
Arguments:
function: Function [optional] - numeric function to integrate
domain: Object - object of named ranges; omit step for adaptive integration
initial: Object [optional] - numeric initial state fields
derivatives: Object [optional] - callable derivatives keyed by state field
Children: help(), available()
Examples
# Integrate a simple scalar function over a bounded range
print integrate((x): x*x, {x: range(0, 1, 0.001)});
sample
function samples a field at a latitude/longitude location
Function: sample - samples a field at a latitude/longitude location
Syntax:
sample(field: Field, location: Location) -> Number|Nil
Arguments:
field: Field - global scalar field
location: Location - location to sample
Children: help(), available()
Examples
# Samples a field at a latitude/longitude location
print sample(topography(earth), location(latitude: 60.0, longitude: 270.0));
abs
function returns the absolute value
Function: abs - returns the absolute value
Syntax:
abs(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the absolute value
print abs(42.0);
sign
function returns -1, 0, or 1 according to the sign
Function: sign - returns -1, 0, or 1 according to the sign
Syntax:
sign(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns -1, 0, or 1 according to the sign
print sign(42.0);
floor
function rounds down to an integer value
Function: floor - rounds down to an integer value
Syntax:
floor(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Rounds down to an integer value
print floor(42.0);
ceil
function rounds up to an integer value
Function: ceil - rounds up to an integer value
Syntax:
ceil(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Rounds up to an integer value
print ceil(42.0);
round
function rounds to the nearest integer value
Function: round - rounds to the nearest integer value
Syntax:
round(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Rounds to the nearest integer value
print round(42.0);
trunc
function truncates toward zero
Function: trunc - truncates toward zero
Syntax:
trunc(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Truncates toward zero
print trunc(42.0);
fract
function returns the fractional part
Function: fract - returns the fractional part
Syntax:
fract(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the fractional part
print fract(42.0);
sqrt
function returns the square root
Function: sqrt - returns the square root
Syntax:
sqrt(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the square root
print sqrt(42.0);
cbrt
function returns the cube root
Function: cbrt - returns the cube root
Syntax:
cbrt(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the cube root
print cbrt(42.0);
exp
function returns e raised to x
Function: exp - returns e raised to x
Syntax:
exp(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns e raised to x
print exp(42.0);
exp2
function returns 2 raised to x
Function: exp2 - returns 2 raised to x
Syntax:
exp2(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns 2 raised to x
print exp2(42.0);
ln
function returns the natural logarithm
Function: ln - returns the natural logarithm
Syntax:
ln(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the natural logarithm
print ln(42.0);
log
function returns logarithm of x in the given base
Function: log - returns logarithm of x in the given base
Syntax:
log(x: Number, y: Number) -> Number
Arguments:
x: Number - first numeric input
y: Number - second numeric input
Children: help(), available()
Examples
# Returns logarithm of x in the given base
print log(42.0, 42.0);
log2
function returns the base-2 logarithm
Function: log2 - returns the base-2 logarithm
Syntax:
log2(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the base-2 logarithm
print log2(42.0);
log10
function returns the base-10 logarithm
Function: log10 - returns the base-10 logarithm
Syntax:
log10(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns the base-10 logarithm
print log10(42.0);
pow
function returns x raised to y
Function: pow - returns x raised to y
Syntax:
pow(x: Number, y: Number) -> Number
Arguments:
x: Number - first numeric input
y: Number - second numeric input
Children: help(), available()
Examples
# Returns x raised to y
print pow(42.0, 42.0);
sin
function returns sine of x radians
Function: sin - returns sine of x radians
Syntax:
sin(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns sine of x radians
print sin(42.0);
cos
function returns cosine of x radians
Function: cos - returns cosine of x radians
Syntax:
cos(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns cosine of x radians
print cos(42.0);
tan
function returns tangent of x radians
Function: tan - returns tangent of x radians
Syntax:
tan(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns tangent of x radians
print tan(42.0);
asin
function returns arcsine in radians
Function: asin - returns arcsine in radians
Syntax:
asin(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns arcsine in radians
print asin(42.0);
acos
function returns arccosine in radians
Function: acos - returns arccosine in radians
Syntax:
acos(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns arccosine in radians
print acos(42.0);
atan
function returns arctangent in radians
Function: atan - returns arctangent in radians
Syntax:
atan(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns arctangent in radians
print atan(42.0);
atan2
function returns atan2(y, x) in radians
Function: atan2 - returns atan2(y, x) in radians
Syntax:
atan2(x: Number, y: Number) -> Number
Arguments:
x: Number - first numeric input
y: Number - second numeric input
Children: help(), available()
Examples
# Returns atan2(y, x) in radians
print atan2(42.0, 42.0);
sinh
function returns hyperbolic sine
Function: sinh - returns hyperbolic sine
Syntax:
sinh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns hyperbolic sine
print sinh(42.0);
cosh
function returns hyperbolic cosine
Function: cosh - returns hyperbolic cosine
Syntax:
cosh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns hyperbolic cosine
print cosh(42.0);
tanh
function returns hyperbolic tangent
Function: tanh - returns hyperbolic tangent
Syntax:
tanh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns hyperbolic tangent
print tanh(42.0);
asinh
function returns inverse hyperbolic sine
Function: asinh - returns inverse hyperbolic sine
Syntax:
asinh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns inverse hyperbolic sine
print asinh(42.0);
acosh
function returns inverse hyperbolic cosine
Function: acosh - returns inverse hyperbolic cosine
Syntax:
acosh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns inverse hyperbolic cosine
print acosh(42.0);
atanh
function returns inverse hyperbolic tangent
Function: atanh - returns inverse hyperbolic tangent
Syntax:
atanh(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns inverse hyperbolic tangent
print atanh(42.0);
hypot
function returns sqrt(x*x + y*y) without undue overflow
Function: hypot - returns sqrt(x*x + y*y) without undue overflow
Syntax:
hypot(x: Number, y: Number) -> Number
Arguments:
x: Number - first numeric input
y: Number - second numeric input
Children: help(), available()
Examples
# Returns sqrt(x*x + y*y) without undue overflow
print hypot(42.0, 42.0);
min
function returns the smallest numeric argument
Function: min - returns the smallest numeric argument
Syntax:
min() -> Number
Children: help(), available()
Examples
# Find the lower endpoint altitude in a daylight window
let loc = location(60,10);
let obs = loc.observer();
let morning = altitude(sun, time(2026,6,21,6,0,0), obs);
let evening = altitude(sun, time(2026,6,21,18,0,0), obs);
print min(morning, evening);
max
function returns the largest numeric argument
Function: max - returns the largest numeric argument
Syntax:
max() -> Number
Children: help(), available()
Examples
# Find the higher endpoint altitude in a daylight window
let loc = location(60,10);
let obs = loc.observer();
let morning = altitude(sun, time(2026,6,21,6,0,0), obs);
let evening = altitude(sun, time(2026,6,21,18,0,0), obs);
print max(morning, evening);
clamp
function clips x to the inclusive range lower..upper
Function: clamp - clips x to the inclusive range lower..upper
Syntax:
clamp(x: Number, lower: Number, upper: Number) -> Number
Arguments:
x: Number - value to clip
lower: Number - inclusive lower bound
upper: Number - inclusive upper bound
Children: help(), available()
Examples
# Clips x to the inclusive range lower..upper
print clamp(42.0, 42.0, 42.0);
angle_in_degrees
function returns the angle between two vectors in degrees
Aliases: angle_degrees
Function: angle_in_degrees - returns the angle between two vectors in degrees
Syntax:
angle_in_degrees(a: Vector, b: Vector) -> Number
Aliases: angle_degrees
Arguments:
a: Vector - first vector
b: Vector - second vector
Children: help(), available()
Examples
# Returns the angle between two vectors in degrees
print angle_in_degrees(vector(1.0, 2.0, 3.0), vector(1.0, 2.0, 3.0));
to_radians
function converts degrees to radians
Function: to_radians - converts degrees to radians
Syntax:
to_radians(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Converts degrees to radians
print to_radians(42.0);
to_degrees
function converts radians to degrees
Function: to_degrees - converts radians to degrees
Syntax:
to_degrees(x: Number) -> Number
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Converts radians to degrees
print to_degrees(42.0);
is_finite
function returns true when x is finite
Function: is_finite - returns true when x is finite
Syntax:
is_finite(x: Number) -> Bool
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns true when x is finite
print is_finite(42.0);
is_nan
function returns true when x is NaN
Function: is_nan - returns true when x is NaN
Syntax:
is_nan(x: Number) -> Bool
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns true when x is NaN
print is_nan(42.0);
is_infinite
function returns true when x is infinite
Function: is_infinite - returns true when x is infinite
Syntax:
is_infinite(x: Number) -> Bool
Arguments:
x: Number - numeric input
Children: help(), available()
Examples
# Returns true when x is infinite
print is_infinite(42.0);
navigate
function estimates an Earth location from target elevation observations
Function: navigate - estimates an Earth location from target elevation observations
Syntax:
navigate(observations: Observation|[Observation]) -> LocationSolution
Arguments:
observations: Observation|[Observation] - three or more target elevation observations
Resources: ephemeris, iers
Children: help(), available()
Examples
# Estimate a location from seven pasted elevation observations
let sirius = stars().find("sirius");
let betelgeuse = stars().find("betelgeuse");
let procyon = stars().find("procyon");
let aldebaran = stars().find("aldebaran");
let rigel = stars().find("rigel");
let o1 = observation(sirius, time(2026, 1, 12, 22, 0, 0), elevation: 13.032698485299838);
let o2 = observation(jupiter, time(2026, 1, 12, 22, 10, 0), elevation: 50.72978965272842);
let o3 = observation(uranus, time(2026, 1, 12, 22, 20, 0), elevation: 39.45114824559175);
let o4 = observation(betelgeuse, time(2026, 1, 12, 22, 30, 0), elevation: 36.78064241831301);
let o5 = observation(procyon, time(2026, 1, 12, 22, 40, 0), elevation: 34.48682253366456);
let o6 = observation(aldebaran, time(2026, 1, 12, 22, 50, 0), elevation: 39.32907688782253);
let o7 = observation(rigel, time(2026, 1, 12, 23, 0, 0), elevation: 18.06018919597869);
let sol = navigate(o1, o2, o3, o4, o5, o6, o7);
print sol.location.latitude, sol.location.longitude, sol.rms;
minimize
function minimizes a numeric callable over named variables with optional bounds and constraints
Function: minimize - minimizes a numeric callable over named variables with optional bounds and constraints
Syntax:
minimize(objective: Function, initial: Object, options: Object) -> Object
Arguments:
objective: Function - numeric objective function
initial: Object - named numeric initial variables
options: Object [optional] - bounds, constraints, tolerance, and iteration options
Children: help(), available()
Examples
# Minimize a numeric objective over a bounded variable
let result = minimize((x): (x - 2) * (x - 2), {x: 0}, {bounds: {x: range(-5, 5)}});
print result.solution.x, result.value;
Time
type UTC date/time value with resolved TT, UT1, and TDB scales
Type: Time - UTC date/time value with resolved TT, UT1, and TDB scales
Syntax:
time() -> Time
time(julian_date: Number) -> Time
time(year: Integer, month: Integer, day: Integer, hour: Integer, minute: Integer, second: Integer) -> Time
time(timezone: Timezone|Text|Location|Place) -> LocalTime
time(year: Integer, month: Integer, day: Integer, hour: Integer, minute: Integer, second: Integer, timezone: Timezone|Text|Location|Place) -> LocalTime
Arguments:
julian_date: Number [optional] - UTC Julian date
year: Integer [optional] - full UTC year
month: Integer [optional] - month from 1 to 12
day: Integer [optional] - day from 1 to 31
hour: Integer [optional] - hour from 0 to 23
minute: Integer [optional] - minute from 0 to 59
second: Integer [optional] - second from 0 to 59
timezone: Timezone|Text|Location|Place [optional] - timezone id, Timezone, Location, or Place for local civil time
Children: year, month, day, hour, minute, second, weekday, year(), utc(), tt(), ut1(), tdb(), dt(), local(), add_months(), add_days(), add_hours(), add_minutes(), add_seconds(), children(), fields(), functions()
Examples
# Convert a UTC time to local civil time
let t = time(2026,6,1,12,0,0);
print t.utc(), t.local("Europe/Oslo").iso;
Time.year
field full UTC year
Field: Time.year - full UTC year
Syntax:
<Time>.year -> Integer
Examples
# Read the year field from a Time value
print time().year;
Time.month
field month from 1 to 12
Field: Time.month - month from 1 to 12
Syntax:
<Time>.month -> Integer
Examples
# Read the month field from a Time value
print time().month;
Time.day
field day from 1 to 31
Field: Time.day - day from 1 to 31
Syntax:
<Time>.day -> Integer
Examples
# Read the day field from a Time value
print time().day;
Time.hour
field hour from 0 to 23
Field: Time.hour - hour from 0 to 23
Syntax:
<Time>.hour -> Integer
Examples
# Read the hour field from a Time value
print time().hour;
Time.minute
field minute from 0 to 59
Field: Time.minute - minute from 0 to 59
Syntax:
<Time>.minute -> Integer
Examples
# Read the minute field from a Time value
print time().minute;
Time.second
field second from 0 to 59
Field: Time.second - second from 0 to 59
Syntax:
<Time>.second -> Integer
Examples
# Read the second field from a Time value
print time().second;
Time.weekday
field UTC weekday
Field: Time.weekday - UTC weekday
Syntax:
<Time>.weekday -> Weekday
Examples
# Read the weekday field from a Time value
print time().weekday;
Time.year
method returns the year component of a Time
Method: Time.year - returns the year component of a Time
Syntax:
<Time>.year() -> Number
Examples
# Use Time.year on a Time value
let value = time();
print value.year();
Time.utc
method returns the UTC Julian date
Method: Time.utc - returns the UTC Julian date
Syntax:
<Time>.utc() -> Number
Examples
# Use Time.utc on a Time value
let value = time();
print value.utc();
Time.tt
method returns the TT Julian date
Method: Time.tt - returns the TT Julian date
Syntax:
<Time>.tt() -> Number
Examples
# Use Time.tt on a Time value
let value = time();
print value.tt();
Time.ut1
method returns the UT1 Julian date
Method: Time.ut1 - returns the UT1 Julian date
Syntax:
<Time>.ut1() -> Number
Examples
# Use Time.ut1 on a Time value
let value = time();
print value.ut1();
Time.tdb
method returns the TDB Julian date
Method: Time.tdb - returns the TDB Julian date
Syntax:
<Time>.tdb() -> Number
Examples
# Use Time.tdb on a Time value
let value = time();
print value.tdb();
Time.dt
method returns Delta-T (TT-UT1) in seconds
Method: Time.dt - returns Delta-T (TT-UT1) in seconds
Syntax:
<Time>.dt() -> Number
Examples
# Use Time.dt on a Time value
let value = time();
print value.dt();
Time.local
method converts a UTC Time into local civil time for a timezone
Method: Time.local - converts a UTC Time into local civil time for a timezone
Syntax:
<Time>.local(timezone: Timezone|Text|Location|Place) -> LocalTime
Arguments:
timezone: Timezone|Text|Location|Place - timezone id, Timezone, Location, or Place
Examples
# Use Time.local on a Time value
let value = time();
print value.local(location(latitude: 60.0, longitude: 270.0));
Time.add_months
method adds calendar months to a Time
Method: Time.add_months - adds calendar months to a Time
Syntax:
<Time>.add_months(months: Integer) -> Time
Arguments:
months: Integer - number of calendar months to add
Examples
# Use Time.add_months on a Time value
let value = time();
print value.add_months(42);
Time.add_days
method adds UTC days to a Time
Method: Time.add_days - adds UTC days to a Time
Syntax:
<Time>.add_days(days: Number) -> Time
Arguments:
days: Number - number of UTC days to add
Examples
# Use Time.add_days on a Time value
let value = time();
print value.add_days(42.0);
Time.add_hours
method adds UTC hours to a Time
Method: Time.add_hours - adds UTC hours to a Time
Syntax:
<Time>.add_hours(hours: Number) -> Time
Arguments:
hours: Number - number of UTC hours to add
Examples
# Use Time.add_hours on a Time value
let value = time();
print value.add_hours(42.0);
Time.add_minutes
method adds UTC minutes to a Time
Method: Time.add_minutes - adds UTC minutes to a Time
Syntax:
<Time>.add_minutes(minutes: Number) -> Time
Arguments:
minutes: Number - number of UTC minutes to add
Examples
# Use Time.add_minutes on a Time value
let value = time();
print value.add_minutes(42.0);
Time.add_seconds
method adds UTC seconds to a Time
Method: Time.add_seconds - adds UTC seconds to a Time
Syntax:
<Time>.add_seconds(seconds: Number) -> Time
Arguments:
seconds: Number - number of UTC seconds to add
Examples
# Use Time.add_seconds on a Time value
let value = time();
print value.add_seconds(42.0);
Time.children
method lists child fields and callable members available on this value
Method: Time.children - lists child fields and callable members available on this value
Syntax:
<Time>.children() -> List
Examples
# Use Time.children on a Time value
let value = time();
print value.children();
Time.fields
method returns an object containing the value's plain fields
Method: Time.fields - returns an object containing the value's plain fields
Syntax:
<Time>.fields() -> Object
Examples
# Use Time.fields on a Time value
let value = time();
print value.fields();
Time.functions
method lists callable members available on this value
Method: Time.functions - lists callable members available on this value
Syntax:
<Time>.functions() -> List
Examples
# Use Time.functions on a Time value
let value = time();
print value.functions();
LocalTime
type timezone-adjusted civil time derived from a UTC Time
Type: LocalTime - timezone-adjusted civil time derived from a UTC Time
Children: timezone, year, month, day, hour, minute, second, weekday, offset_seconds, offset_hours, offset, abbreviation, is_dst, iso, utc(), local(), children(), fields(), functions()
Examples
# Show a UTC timestamp as local civil time
let local = time(2026,6,21,12,0,0).local("Europe/Oslo");
print local.iso, local.timezone;
LocalTime.timezone
field IANA timezone id
Field: LocalTime.timezone - IANA timezone id
Syntax:
<LocalTime>.timezone -> Text
Examples
# Read the timezone field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").timezone;
LocalTime.year
field local civil year
Field: LocalTime.year - local civil year
Syntax:
<LocalTime>.year -> Number
Examples
# Read the year field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").year;
LocalTime.month
field local civil month
Field: LocalTime.month - local civil month
Syntax:
<LocalTime>.month -> Number
Examples
# Read the month field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").month;
LocalTime.day
field local civil day
Field: LocalTime.day - local civil day
Syntax:
<LocalTime>.day -> Number
Examples
# Read the day field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").day;
LocalTime.hour
field local civil hour
Field: LocalTime.hour - local civil hour
Syntax:
<LocalTime>.hour -> Number
Examples
# Read the hour field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").hour;
LocalTime.minute
field local civil minute
Field: LocalTime.minute - local civil minute
Syntax:
<LocalTime>.minute -> Number
Examples
# Read the minute field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").minute;
LocalTime.second
field local civil second
Field: LocalTime.second - local civil second
Syntax:
<LocalTime>.second -> Number
Examples
# Read the second field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").second;
LocalTime.weekday
field local ISO weekday
Field: LocalTime.weekday - local ISO weekday
Syntax:
<LocalTime>.weekday -> Weekday
Examples
# Read the weekday field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").weekday;
LocalTime.offset_seconds
field UTC offset in seconds
Field: LocalTime.offset_seconds - UTC offset in seconds
Syntax:
<LocalTime>.offset_seconds -> Number
Examples
# Read the offset_seconds field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").offset_seconds;
LocalTime.offset_hours
field UTC offset in hours
Field: LocalTime.offset_hours - UTC offset in hours
Syntax:
<LocalTime>.offset_hours -> Number
Examples
# Read the offset_hours field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").offset_hours;
LocalTime.offset
field formatted UTC offset
Field: LocalTime.offset - formatted UTC offset
Syntax:
<LocalTime>.offset -> Text
Examples
# Read the offset field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").offset;
LocalTime.abbreviation
field timezone abbreviation at this instant
Field: LocalTime.abbreviation - timezone abbreviation at this instant
Syntax:
<LocalTime>.abbreviation -> Text
Examples
# Read the abbreviation field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").abbreviation;
LocalTime.is_dst
field true when the selected offset is daylight-saving time
Field: LocalTime.is_dst - true when the selected offset is daylight-saving time
Syntax:
<LocalTime>.is_dst -> Bool
Examples
# Read the is_dst field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").is_dst;
LocalTime.iso
field ISO-like local timestamp with UTC offset
Field: LocalTime.iso - ISO-like local timestamp with UTC offset
Syntax:
<LocalTime>.iso -> Text
Examples
# Read the iso field from a LocalTime value
print time(2026,6,7,12,0,0).local("Europe/Oslo").iso;
LocalTime.utc
method returns the original UTC Time
Method: LocalTime.utc - returns the original UTC Time
Syntax:
<LocalTime>.utc() -> Time
Examples
# Use LocalTime.utc on a LocalTime value
let value = time(2026,6,7,12,0,0).local("Europe/Oslo");
print value.utc();
LocalTime.local
method converts this local time's UTC instant into another local civil time
Method: LocalTime.local - converts this local time's UTC instant into another local civil time
Syntax:
<LocalTime>.local(timezone: Timezone|Text|Location|Place) -> LocalTime
Arguments:
timezone: Timezone|Text|Location|Place - timezone id, Timezone, Location, or Place
Examples
# Use LocalTime.local on a LocalTime value
let value = time(2026,6,7,12,0,0).local("Europe/Oslo");
print value.local(location(latitude: 60.0, longitude: 270.0));
LocalTime.children
method lists child fields and callable members available on this value
Method: LocalTime.children - lists child fields and callable members available on this value
Syntax:
<LocalTime>.children() -> List
Examples
# Use LocalTime.children on a LocalTime value
let value = time(2026,6,7,12,0,0).local("Europe/Oslo");
print value.children();
LocalTime.fields
method returns an object containing the value's plain fields
Method: LocalTime.fields - returns an object containing the value's plain fields
Syntax:
<LocalTime>.fields() -> Object
Examples
# Use LocalTime.fields on a LocalTime value
let value = time(2026,6,7,12,0,0).local("Europe/Oslo");
print value.fields();
LocalTime.functions
method lists callable members available on this value
Method: LocalTime.functions - lists callable members available on this value
Syntax:
<LocalTime>.functions() -> List
Examples
# Use LocalTime.functions on a LocalTime value
let value = time(2026,6,7,12,0,0).local("Europe/Oslo");
print value.functions();
Weekday
type ISO weekday value
Type: Weekday - ISO weekday value
Syntax:
weekday(value: Integer|Text) -> Weekday
Arguments:
value: Integer|Text - ISO index from 1 to 7, full name, or short name
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Check the weekday for a planned observation date
let t = time(2026,6,21,12,0,0);
print t.utc(), t.weekday;
Weekday.name
method returns the full weekday name
Method: Weekday.name - returns the full weekday name
Syntax:
<Weekday>.name() -> Text
Examples
# Use Weekday.name on a Weekday value
let value = wednesday;
print value.name();
Weekday.short
method returns the short weekday name
Method: Weekday.short - returns the short weekday name
Syntax:
<Weekday>.short() -> Text
Examples
# Use Weekday.short on a Weekday value
let value = wednesday;
print value.short();
Weekday.letter
method returns the one-letter weekday label
Method: Weekday.letter - returns the one-letter weekday label
Syntax:
<Weekday>.letter() -> Text
Examples
# Use Weekday.letter on a Weekday value
let value = wednesday;
print value.letter();
Weekday.index
method returns the ISO weekday index
Method: Weekday.index - returns the ISO weekday index
Syntax:
<Weekday>.index() -> Integer
Examples
# Use Weekday.index on a Weekday value
let value = wednesday;
print value.index();
Weekday.children
method lists child fields and callable members available on this value
Method: Weekday.children - lists child fields and callable members available on this value
Syntax:
<Weekday>.children() -> List
Examples
# Use Weekday.children on a Weekday value
let value = wednesday;
print value.children();
Weekday.fields
method returns an object containing the value's plain fields
Method: Weekday.fields - returns an object containing the value's plain fields
Syntax:
<Weekday>.fields() -> Object
Examples
# Use Weekday.fields on a Weekday value
let value = wednesday;
print value.fields();
Weekday.functions
method lists callable members available on this value
Method: Weekday.functions - lists callable members available on this value
Syntax:
<Weekday>.functions() -> List
Examples
# Use Weekday.functions on a Weekday value
let value = wednesday;
print value.functions();
Location
type body-aware latitude/longitude surface location
Type: Location - body-aware latitude/longitude surface location
Syntax:
location(body: Body, latitude: Number, longitude: Number) -> Location
Arguments:
body: Body [optional] - central body; defaults to earth
latitude: Number - latitude in degrees
longitude: Number - longitude in degrees
Children: body, latitude, longitude, observer(), direction(), children(), fields(), functions()
Examples
# Format a location as latitude and longitude text
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
print dms(loc.latitude, "latitude"), dms(loc.longitude, "longitude");
Location.body
field central body; defaults to earth
Field: Location.body - central body; defaults to earth
Syntax:
<Location>.body -> Body
Examples
# Read the body field from a Location value
print location(latitude: 60.0, longitude: 270.0).body;
Location.latitude
field latitude in degrees
Field: Location.latitude - latitude in degrees
Syntax:
<Location>.latitude -> Number
Examples
# Read the latitude field from a Location value
print location(latitude: 60.0, longitude: 270.0).latitude;
Location.longitude
field longitude in degrees
Field: Location.longitude - longitude in degrees
Syntax:
<Location>.longitude -> Number
Examples
# Read the longitude field from a Location value
print location(latitude: 60.0, longitude: 270.0).longitude;
Location.observer
method promotes this location to a 3D observer
Method: Location.observer - promotes this location to a 3D observer
Syntax:
<Location>.observer(topography: Field, height: Number) -> Observer
Arguments:
topography: Field [optional] - optional body-matching topography field; use `topography(earth)` or `topography(moon)`
height: Number [optional] - height in kilometers above the datum or supplied topography; defaults to zero
Examples
# Use Location.observer on a Location value
let value = location(latitude: 60.0, longitude: 270.0);
print value.observer();
Location.direction
method returns a local topographic direction
Method: Location.direction - returns a local topographic direction
Syntax:
<Location>.direction(azimuth: Number, elevation: Number, zenith: Number, unit: Unit) -> Direction
Arguments:
azimuth: Number - local azimuth clockwise from north; degrees are default
elevation: Number [optional] - angle above the local horizon; degrees are default
zenith: Number [optional] - angle down from local zenith; degrees are default
unit: Unit [optional] - optional angle unit for azimuth and elevation/zenith
Examples
# Build a local topographic direction from a location
let loc = location(latitude: 60.0, longitude: 10.0);
print loc.direction(azimuth: 180, elevation: 25);
Location.children
method lists child fields and callable members available on this value
Method: Location.children - lists child fields and callable members available on this value
Syntax:
<Location>.children() -> List
Examples
# Use Location.children on a Location value
let value = location(latitude: 60.0, longitude: 270.0);
print value.children();
Location.fields
method returns an object containing the value's plain fields
Method: Location.fields - returns an object containing the value's plain fields
Syntax:
<Location>.fields() -> Object
Examples
# Use Location.fields on a Location value
let value = location(latitude: 60.0, longitude: 270.0);
print value.fields();
Location.functions
method lists callable members available on this value
Method: Location.functions - lists callable members available on this value
Syntax:
<Location>.functions() -> List
Examples
# Use Location.functions on a Location value
let value = location(latitude: 60.0, longitude: 270.0);
print value.functions();
LocationSolution
type navigation solution with location, residuals, and fit quality
Type: LocationSolution - navigation solution with location, residuals, and fit quality
Children: location, observations, residuals, rms, lat_rms, lon_rms, status, method, iterations, children(), fields(), functions()
LocationSolution.location
field best-fit Earth location
Field: LocationSolution.location - best-fit Earth location
Syntax:
<LocationSolution>.location -> Location
LocationSolution.observations
field elevation observations used for the navigation solution
Field: LocationSolution.observations - elevation observations used for the navigation solution
Syntax:
<LocationSolution>.observations -> List<Observation>
LocationSolution.residuals
field per-observation elevation residuals in degrees
Field: LocationSolution.residuals - per-observation elevation residuals in degrees
Syntax:
<LocationSolution>.residuals -> List<Object>
LocationSolution.rms
field RMS elevation residual in degrees
Field: LocationSolution.rms - RMS elevation residual in degrees
Syntax:
<LocationSolution>.rms -> Number?
LocationSolution.lat_rms
field latitude uncertainty estimate in degrees, or nil when unavailable
Field: LocationSolution.lat_rms - latitude uncertainty estimate in degrees, or nil when unavailable
Syntax:
<LocationSolution>.lat_rms -> Number?
LocationSolution.lon_rms
field longitude uncertainty estimate in degrees, or nil when unavailable
Field: LocationSolution.lon_rms - longitude uncertainty estimate in degrees, or nil when unavailable
Syntax:
<LocationSolution>.lon_rms -> Number?
LocationSolution.status
field solution status
Field: LocationSolution.status - solution status
Syntax:
<LocationSolution>.status -> Text?
LocationSolution.method
field navigation solution method
Field: LocationSolution.method - navigation solution method
Syntax:
<LocationSolution>.method -> Text?
LocationSolution.iterations
field number of refinement iterations, or nil when unavailable
Field: LocationSolution.iterations - number of refinement iterations, or nil when unavailable
Syntax:
<LocationSolution>.iterations -> Number?
LocationSolution.children
method lists child fields and callable members available on this value
Method: LocationSolution.children - lists child fields and callable members available on this value
Syntax:
<LocationSolution>.children() -> List
LocationSolution.fields
method returns an object containing the value's plain fields
Method: LocationSolution.fields - returns an object containing the value's plain fields
Syntax:
<LocationSolution>.fields() -> Object
LocationSolution.functions
method lists callable members available on this value
Method: LocationSolution.functions - lists callable members available on this value
Syntax:
<LocationSolution>.functions() -> List
Observer
type body-fixed 3D observer with position, zenith, and derived surface location
Type: Observer - body-fixed 3D observer with position, zenith, and derived surface location
Syntax:
observer(location_or_body: Location|Body, height_or_position: Number|Field|Vector, height_or_zenith: Number|Vector) -> Observer
Arguments:
location_or_body: Location|Body - surface location or body for body-fixed vectors
height_or_position: Number|Field|Vector [optional] - height in kilometers, topography field for a location, or observer position vector
height_or_zenith: Number|Vector [optional] - height above topography for a location, or body-fixed zenith/up vector
Children: body, position, zenith, location, height_km, position(), location(), latitude(), longitude(), height(), zenith(), north(), west(), limb(), direction(), orbit(), children(), fields(), functions()
Examples
# Sample the Sun altitude from an elevated observer
let obs = location(58.9666667, 5.7333333).observer(height: 0.002);
print obs.height(), altitude(sun, time(2026,6,21,12,0,0), obs);
Observer.body
field body whose fixed frame contains the observer
Field: Observer.body - body whose fixed frame contains the observer
Syntax:
<Observer>.body -> Body
Examples
# Read the body field from a Observer value
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5).body;
Observer.position
field body-fixed observer position in kilometers
Field: Observer.position - body-fixed observer position in kilometers
Syntax:
<Observer>.position -> Vector
Examples
# Read the position field from a Observer value
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5).position;
Observer.zenith
field body-fixed local zenith direction
Field: Observer.zenith - body-fixed local zenith direction
Syntax:
<Observer>.zenith -> Vector
Examples
# Read the zenith field from a Observer value
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5).zenith;
Observer.location
field derived body-aware surface location
Field: Observer.location - derived body-aware surface location
Syntax:
<Observer>.location -> Location
Examples
# Read the location field from a Observer value
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5).location;
Observer.height_km
field derived height above the body shape in kilometers
Field: Observer.height_km - derived height above the body shape in kilometers
Syntax:
<Observer>.height_km -> Number
Examples
# Read the height_km field from a Observer value
print location(latitude: 60.0, longitude: 270.0).observer(height: 1.5).height_km;
Observer.position
method returns the observer position vector in a requested origin and frame
Method: Observer.position - returns the observer position vector in a requested origin and frame
Syntax:
<Observer>.position() -> Vector
<Observer>.position(time: Time, origin: Body, axis: Axis) -> Vector
Arguments:
time: Time [optional] - time at which to resolve the observer position
origin: Body [optional] - origin body center such as earth, mars, or jupiter
axis: Axis [optional] - target frame such as icrf, earthfixed, marsfixed, or jupiterfixed
Examples
# Use Observer.position on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.position();
Observer.location
method returns the datum-derived location
Method: Observer.location - returns the datum-derived location
Syntax:
<Observer>.location() -> Location
Examples
# Use Observer.location on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.location();
Observer.latitude
method returns the datum-derived latitude in degrees
Method: Observer.latitude - returns the datum-derived latitude in degrees
Syntax:
<Observer>.latitude() -> Number
Examples
# Use Observer.latitude on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.latitude();
Observer.longitude
method returns the datum-derived longitude in degrees
Method: Observer.longitude - returns the datum-derived longitude in degrees
Syntax:
<Observer>.longitude() -> Number
Examples
# Use Observer.longitude on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.longitude();
Observer.height
method returns height above the body datum in kilometers
Method: Observer.height - returns height above the body datum in kilometers
Syntax:
<Observer>.height() -> Number
Examples
# Use Observer.height on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.height();
Observer.zenith
method returns the body-fixed local zenith unit vector
Method: Observer.zenith - returns the body-fixed local zenith unit vector
Syntax:
<Observer>.zenith() -> Vector
Examples
# Use Observer.zenith on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.zenith();
Observer.north
method returns the body-fixed local north unit vector
Method: Observer.north - returns the body-fixed local north unit vector
Syntax:
<Observer>.north() -> Vector
Examples
# Use Observer.north on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.north();
Observer.west
method returns the body-fixed local west unit vector
Method: Observer.west - returns the body-fixed local west unit vector
Syntax:
<Observer>.west() -> Vector
Examples
# Use Observer.west on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.west();
Observer.limb
method computes the apparent limb profile of a target state from this observer
Method: Observer.limb - computes the apparent limb profile of a target state from this observer
Syntax:
<Observer>.limb(state: State, north: Vector, samples: Number) -> Array
Arguments:
state: State - target body state whose limb should be sampled
north: Vector [optional] - direction projected as clock-angle zero; defaults to body north
samples: Number [optional] - number of limb samples; defaults to 360
Examples
# Compute a target limb profile from an observer
let obs = location(latitude: 0, longitude: 0).observer(0.052);
let target = state(moon, time(2026,4,27,8,26,0));
print obs.limb(target, 4).length();
Observer.direction
method returns a local topographic direction
Method: Observer.direction - returns a local topographic direction
Syntax:
<Observer>.direction(azimuth: Number, elevation: Number, zenith: Number, unit: Unit) -> Direction
Arguments:
azimuth: Number - local azimuth clockwise from north; degrees are default
elevation: Number [optional] - angle above the local horizon; degrees are default
zenith: Number [optional] - angle down from local zenith; degrees are default
unit: Unit [optional] - optional angle unit for azimuth and elevation/zenith
Examples
# Build a local topographic direction from an observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
print obs.direction(azimuth: 180, elevation: 25);
Observer.orbit
method determines an orbit from observations made by this observer
Method: Observer.orbit - determines an orbit from observations made by this observer
Syntax:
<Observer>.orbit(observations: Observation...) -> OrbitSolution
Arguments:
observations: Observation... - three or more observations, or one list of observations
Examples
# Prepare observations that can be passed to observer.orbit(...)
let obs = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let first = observation(obs, time(2028,7,3), ra: 131.0857742519269, dec: 18.803678151005595);
let second = observation(obs, time(2028,7,23), ra: 135.0300892722528, dec: 18.040162341691612);
let third = observation(obs, time(2028,8,12), ra: 139.04202357010908, dec: 17.175191580463146);
print first.time.utc(), second.time.utc(), third.time.utc();
Observer.children
method lists child fields and callable members available on this value
Method: Observer.children - lists child fields and callable members available on this value
Syntax:
<Observer>.children() -> List
Examples
# Use Observer.children on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.children();
Observer.fields
method returns an object containing the value's plain fields
Method: Observer.fields - returns an object containing the value's plain fields
Syntax:
<Observer>.fields() -> Object
Examples
# Use Observer.fields on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.fields();
Observer.functions
method lists callable members available on this value
Method: Observer.functions - lists callable members available on this value
Syntax:
<Observer>.functions() -> List
Examples
# Use Observer.functions on a Observer value
let value = location(latitude: 60.0, longitude: 270.0).observer(height: 1.5);
print value.functions();
Body
type solar-system body with physical parameters from the reference C model
Type: Body - solar-system body with physical parameters from the reference C model
Syntax:
body(name: Text) -> Body
Arguments:
name: Text - solar-system body name
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), inferior_conjunction(), superior_conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), greatest_eastern_elongation(), greatest_western_elongation(), greatest_elongation(), periapsis(), apoapsis(), transit(), children(), fields(), functions()
Examples
# Compare physical reference values for two bodies
print earth.radius, moon.radius, moon.mass / earth.mass;
Body.name
field canonical body name
Field: Body.name - canonical body name
Syntax:
<Body>.name -> Text
Examples
# Read the name field from a Body value
print sun.name;
Body.kind
field reference body kind
Field: Body.kind - reference body kind
Syntax:
<Body>.kind -> Text
Examples
# Read the kind field from a Body value
print sun.kind;
Body.xmu
field gravitational parameter in km^3/s^2
Field: Body.xmu - gravitational parameter in km^3/s^2
Syntax:
<Body>.xmu -> Number
Examples
# Read the xmu field from a Body value
print sun.xmu;
Body.radius
field body radius in km
Field: Body.radius - body radius in km
Syntax:
<Body>.radius -> Number
Examples
# Read the radius field from a Body value
print sun.radius;
Body.mass
field body mass in kg
Field: Body.mass - body mass in kg
Syntax:
<Body>.mass -> Number
Examples
# Read the mass field from a Body value
print sun.mass;
Body.H
field reference absolute magnitude parameter
Field: Body.H - reference absolute magnitude parameter
Syntax:
<Body>.H -> Number
Examples
# Read the H field from a Body value
print sun.H;
Body.n
field reference illumination exponent
Field: Body.n - reference illumination exponent
Syntax:
<Body>.n -> Number
Examples
# Read the n field from a Body value
print sun.n;
Body.k
field reference G Muller constant
Field: Body.k - reference G Muller constant
Syntax:
<Body>.k -> Number
Examples
# Read the k field from a Body value
print sun.k;
Body.known
field whether the body name matched the built-in table
Field: Body.known - whether the body name matched the built-in table
Syntax:
<Body>.known -> Bool
Examples
# Read the known field from a Body value
print sun.known;
Body.rotational_axis
method returns this body's rotational north pole at a time
Method: Body.rotational_axis - returns this body's rotational north pole at a time
Syntax:
<Body>.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use Body.rotational_axis on a Body value
let value = sun;
print value.rotational_axis(time());
Body.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: Body.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
<Body>.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use Body.rotational_axis_ra on a Body value
let value = sun;
print value.rotational_axis_ra(time());
Body.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: Body.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
<Body>.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use Body.rotational_axis_dec on a Body value
let value = sun;
print value.rotational_axis_dec(time());
Body.state
method returns the orbital state for this body at a time
Method: Body.state - returns the orbital state for this body at a time
Syntax:
<Body>.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use Body.state on a Body value
let value = sun;
print value.state(time());
Body.rise
method returns sunrise or moonrise events for an observer
Method: Body.rise - returns sunrise or moonrise events for an observer
Syntax:
<Body>.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find rise events for a body from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print sun.rise(obs, span).first();
Body.set
method returns sunset or moonset events for an observer
Method: Body.set - returns sunset or moonset events for an observer
Syntax:
<Body>.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find set events for a body from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print sun.set(obs, span).first();
Body.conjunction
method returns conjunction events for this body
Method: Body.conjunction - returns conjunction events for this body
Syntax:
<Body>.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find conjunction events for an explicit body and time range
let span = range(time(2026,1,1,0,0,0), time(2026,3,1,0,0,0), 1);
print moon.conjunction(span).first();
Body.inferior_conjunction
method returns inferior conjunction events for this body
Method: Body.inferior_conjunction - returns inferior conjunction events for this body
Syntax:
<Body>.inferior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find inferior conjunction events for an inner planet
let span = range(time(2024,1,1,0,0,0), time(2026,1,1,0,0,0), 5);
print mercury.inferior_conjunction(span).first();
Body.superior_conjunction
method returns superior conjunction events for this body
Method: Body.superior_conjunction - returns superior conjunction events for this body
Syntax:
<Body>.superior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find superior conjunction events for an inner planet
let span = range(time(2024,1,1,0,0,0), time(2026,1,1,0,0,0), 5);
print mercury.superior_conjunction(span).first();
Body.opposition
method returns opposition events for this body
Method: Body.opposition - returns opposition events for this body
Syntax:
<Body>.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find opposition events for an explicit body and time range
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print mars.opposition(span).first();
Body.eastern_quadrature
method returns eastern quadrature events for this body
Method: Body.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
<Body>.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find eastern quadrature events for an outer planet
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print mars.eastern_quadrature(span).first();
Body.western_quadrature
method returns western quadrature events for this body
Method: Body.western_quadrature - returns western quadrature events for this body
Syntax:
<Body>.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find western quadrature events for an outer planet
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print mars.western_quadrature(span).first();
Body.quadrature
method returns eastern and western quadrature events for this body
Method: Body.quadrature - returns eastern and western quadrature events for this body
Syntax:
<Body>.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find quadrature events for an explicit body and time range
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print mars.quadrature(span).first();
Body.greatest_eastern_elongation
method returns greatest eastern elongation events for this body
Method: Body.greatest_eastern_elongation - returns greatest eastern elongation events for this body
Syntax:
<Body>.greatest_eastern_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find greatest eastern elongation events for an inner planet
let span = range(time(2024,1,1,0,0,0), time(2026,1,1,0,0,0), 5);
print venus.greatest_eastern_elongation(span).first();
Body.greatest_western_elongation
method returns greatest western elongation events for this body
Method: Body.greatest_western_elongation - returns greatest western elongation events for this body
Syntax:
<Body>.greatest_western_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find greatest western elongation events for an inner planet
let span = range(time(2024,1,1,0,0,0), time(2026,1,1,0,0,0), 5);
print venus.greatest_western_elongation(span).first();
Body.greatest_elongation
method returns greatest eastern and western elongation events for this body
Method: Body.greatest_elongation - returns greatest eastern and western elongation events for this body
Syntax:
<Body>.greatest_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find greatest elongation events for an inner planet
let span = range(time(2024,1,1,0,0,0), time(2026,1,1,0,0,0), 5);
print venus.greatest_elongation(span).first();
Body.periapsis
method returns periapsis events for this body
Method: Body.periapsis - returns periapsis events for this body
Syntax:
<Body>.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for an explicit body and time range
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print earth.periapsis(span).first();
Body.apoapsis
method returns apoapsis events for this body
Method: Body.apoapsis - returns apoapsis events for this body
Syntax:
<Body>.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for an explicit body and time range
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print earth.apoapsis(span).first();
Body.transit
method returns solar transit events for Mercury or Venus
Method: Body.transit - returns solar transit events for Mercury or Venus
Syntax:
<Body>.transit(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find solar transit events for Mercury or Venus
let span = range(time(2032,11,1,0,0,0), time(2032,11,20,0,0,0), 1);
print mercury.transit(span).first();
Body.children
method lists child fields and callable members available on this value
Method: Body.children - lists child fields and callable members available on this value
Syntax:
<Body>.children() -> List
Examples
# Use Body.children on a Body value
let value = sun;
print value.children();
Body.fields
method returns an object containing the value's plain fields
Method: Body.fields - returns an object containing the value's plain fields
Syntax:
<Body>.fields() -> Object
Examples
# Use Body.fields on a Body value
let value = sun;
print value.fields();
Body.functions
method lists callable members available on this value
Method: Body.functions - lists callable members available on this value
Syntax:
<Body>.functions() -> List
Examples
# Use Body.functions on a Body value
let value = sun;
print value.functions();
Bodies
type registry of known solar-system bodies and massive small-body perturbers
Type: Bodies - registry of known solar-system bodies and massive small-body perturbers
Children: count, small_count, find(), planets(), solarSystem(), smallBodies(), longSolarSystem(), all(), categories(), get(), names(), has(), search(), states(), smallBodyStates(), solarSystemStates(), children(), fields(), functions()
Examples
# Build a Bodies value and print the result
let value = bodies;
print value;
Bodies.count
field number of currently built-in registry body names
Field: Bodies.count - number of currently built-in registry body names
Syntax:
<Bodies>.count -> Number
Examples
# Read the count field from a Bodies value
print bodies.count;
Bodies.small_count
field number of currently built-in massive small-body perturbers
Field: Bodies.small_count - number of currently built-in massive small-body perturbers
Syntax:
<Bodies>.small_count -> Number
Examples
# Read the small_count field from a Bodies value
print bodies.small_count;
Bodies.find
method finds a body by name, designation, alias, or SPK-style id
Method: Bodies.find - finds a body by name, designation, alias, or SPK-style id
Syntax:
<Bodies>.find(name: Text) -> Body|Unavailable
Arguments:
name: Text - body name, designation, alias, or SPK-style id
Examples
# Use Bodies.find on a Bodies value
let value = bodies;
print value.find("value");
Bodies.planets
method returns Mercury through Neptune
Method: Bodies.planets - returns Mercury through Neptune
Syntax:
<Bodies>.planets() -> [Body]
Examples
# Use Bodies.planets on a Bodies value
let value = bodies;
print value.planets();
Bodies.solarSystem
method returns Sun, planets, Moon, and Pluto
Method: Bodies.solarSystem - returns Sun, planets, Moon, and Pluto
Syntax:
<Bodies>.solarSystem() -> [Body]
Examples
# Use Bodies.solarSystem on a Bodies value
let value = bodies;
print value.solarSystem();
Bodies.smallBodies
method returns configured massive small-body perturbers, optionally filtered by minimum mass
Method: Bodies.smallBodies - returns configured massive small-body perturbers, optionally filtered by minimum mass
Syntax:
<Bodies>.smallBodies() -> [Body]
<Bodies>.smallBodies(min_mass: Number) -> [Body]
Arguments:
min_mass: Number [optional] - minimum small-body mass in kg
Examples
# Use Bodies.smallBodies on a Bodies value
let value = bodies;
print value.smallBodies();
Bodies.longSolarSystem
method returns Sun, planets, Moon, Pluto, and massive small-body perturbers, optionally filtered by minimum mass
Method: Bodies.longSolarSystem - returns Sun, planets, Moon, Pluto, and massive small-body perturbers, optionally filtered by minimum mass
Syntax:
<Bodies>.longSolarSystem() -> [Body]
<Bodies>.longSolarSystem(min_mass: Number) -> [Body]
Arguments:
min_mass: Number [optional] - minimum small-body mass in kg
Examples
# Use Bodies.longSolarSystem on a Bodies value
let value = bodies;
print value.longSolarSystem();
Bodies.all
method returns all registry bodies currently available through built-ins and loaded body stores
Method: Bodies.all - returns all registry bodies currently available through built-ins and loaded body stores
Syntax:
<Bodies>.all() -> [Body]
Examples
# Use Bodies.all on a Bodies value
let value = bodies;
print value.all();
Bodies.categories
method lists available body categories
Method: Bodies.categories - lists available body categories
Syntax:
<Bodies>.categories() -> [Text]
Examples
# Use Bodies.categories on a Bodies value
let value = bodies;
print value.categories();
Bodies.get
method returns bodies in a named category
Method: Bodies.get - returns bodies in a named category
Syntax:
<Bodies>.get(category: Text) -> [Body]
Arguments:
category: Text - category name such as planets, asteroids, moons, kbos, or comets
Examples
# Use Bodies.get on a Bodies value
let value = bodies;
print value.get("value");
Bodies.names
method lists known registry names
Method: Bodies.names - lists known registry names
Syntax:
<Bodies>.names() -> [Text]
Examples
# Use Bodies.names on a Bodies value
let value = bodies;
print value.names();
Bodies.has
method reports whether the body registry can resolve a name
Method: Bodies.has - reports whether the body registry can resolve a name
Syntax:
<Bodies>.has(name: Text) -> Bool
Arguments:
name: Text - body name, designation, alias, or SPK-style id
Examples
# Use Bodies.has on a Bodies value
let value = bodies;
print value.has("value");
Bodies.search
method searches known registry body names
Method: Bodies.search - searches known registry body names
Syntax:
<Bodies>.search(query: Text) -> [Body]
Arguments:
query: Text - case-insensitive body-name fragment
Examples
# Use Bodies.search on a Bodies value
let value = bodies;
print value.search("value");
Bodies.states
method returns states for the long Solar System body collection at a time, optionally filtering small bodies by minimum mass
Method: Bodies.states - returns states for the long Solar System body collection at a time, optionally filtering small bodies by minimum mass
Syntax:
<Bodies>.states(time: Time) -> [State]
<Bodies>.states(time: Time, min_mass: Number) -> [State]
Arguments:
time: Time - epoch at which to extract each body state
min_mass: Number [optional] - minimum small-body mass in kg
Examples
# Use Bodies.states on a Bodies value
let value = bodies;
print value.states(time());
Bodies.smallBodyStates
method returns states for configured massive small-body perturbers at a time, optionally filtered by minimum mass
Method: Bodies.smallBodyStates - returns states for configured massive small-body perturbers at a time, optionally filtered by minimum mass
Syntax:
<Bodies>.smallBodyStates(time: Time) -> [State]
<Bodies>.smallBodyStates(time: Time, min_mass: Number) -> [State]
Arguments:
time: Time - epoch at which to extract each body state
min_mass: Number [optional] - minimum small-body mass in kg
Examples
# Use Bodies.smallBodyStates on a Bodies value
let value = bodies;
print value.smallBodyStates(time());
Bodies.solarSystemStates
method returns states for Sun, planets, Moon, and Pluto at a time
Method: Bodies.solarSystemStates - returns states for Sun, planets, Moon, and Pluto at a time
Syntax:
<Bodies>.solarSystemStates(time: Time) -> [State]
Arguments:
time: Time - epoch at which to extract each body state
Examples
# Use Bodies.solarSystemStates on a Bodies value
let value = bodies;
print value.solarSystemStates(time());
Bodies.children
method lists child fields and callable members available on this value
Method: Bodies.children - lists child fields and callable members available on this value
Syntax:
<Bodies>.children() -> List
Examples
# Use Bodies.children on a Bodies value
let value = bodies;
print value.children();
Bodies.fields
method returns an object containing the value's plain fields
Method: Bodies.fields - returns an object containing the value's plain fields
Syntax:
<Bodies>.fields() -> Object
Examples
# Use Bodies.fields on a Bodies value
let value = bodies;
print value.fields();
Bodies.functions
method lists callable members available on this value
Method: Bodies.functions - lists callable members available on this value
Syntax:
<Bodies>.functions() -> List
Examples
# Use Bodies.functions on a Bodies value
let value = bodies;
print value.functions();
Elements
type osculating orbital elements using periapsis distance as the primary distance
Type: Elements - osculating orbital elements using periapsis distance as the primary distance
Syntax:
elements(q: Number, e: Number, i: Number, node: Number, argument: Number, anomaly: Number, unit: Unit) -> Elements
Arguments:
q: Number - periapsis distance in kilometers
e: Number - eccentricity
i: Number - inclination in degrees by default
node: Number - longitude of ascending node in degrees by default
argument: Number - argument of periapsis in degrees by default
anomaly: Number - true anomaly in degrees by default
unit: Unit [optional] - optional angle unit, such as rad
Children: q, e, i, node, argument, anomaly, semimajor_axis, semi_latus_rectum, children(), fields(), functions()
Examples
# Derive osculating elements from an Earth state around the Sun
let t = time(2026,1,1,0,0,0);
let earth_state = state(earth, t, barycentric, icrf, no_correction);
let sun_state = state(sun, t, barycentric, icrf, no_correction);
let orbit = earth_state.orbit_around(sun_state);
let el = orbit.elements();
print el.q, el.e, el.i;
Elements.q
field periapsis distance in kilometers
Field: Elements.q - periapsis distance in kilometers
Syntax:
<Elements>.q -> Number
Examples
# Read the q field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).q;
Elements.e
field eccentricity
Field: Elements.e - eccentricity
Syntax:
<Elements>.e -> Number
Examples
# Read the e field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).e;
Elements.i
field inclination in degrees
Field: Elements.i - inclination in degrees
Syntax:
<Elements>.i -> Number
Examples
# Read the i field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).i;
Elements.node
field longitude of ascending node in degrees
Field: Elements.node - longitude of ascending node in degrees
Syntax:
<Elements>.node -> Number
Examples
# Read the node field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).node;
Elements.argument
field argument of periapsis in degrees
Field: Elements.argument - argument of periapsis in degrees
Syntax:
<Elements>.argument -> Number
Examples
# Read the argument field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).argument;
Elements.anomaly
field true anomaly in degrees
Field: Elements.anomaly - true anomaly in degrees
Syntax:
<Elements>.anomaly -> Number
Examples
# Read the anomaly field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).anomaly;
Elements.semimajor_axis
field derived semimajor axis in kilometers when available
Field: Elements.semimajor_axis - derived semimajor axis in kilometers when available
Syntax:
<Elements>.semimajor_axis -> Number
Examples
# Read the semimajor_axis field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).semimajor_axis;
Elements.semi_latus_rectum
field derived semi-latus rectum in kilometers when available
Field: Elements.semi_latus_rectum - derived semi-latus rectum in kilometers when available
Syntax:
<Elements>.semi_latus_rectum -> Number
Examples
# Read the semi_latus_rectum field from a Elements value
print elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0).semi_latus_rectum;
Elements.children
method lists child fields and callable members available on this value
Method: Elements.children - lists child fields and callable members available on this value
Syntax:
<Elements>.children() -> List
Examples
# Use Elements.children on a Elements value
let value = elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0);
print value.children();
Elements.fields
method returns an object containing the value's plain fields
Method: Elements.fields - returns an object containing the value's plain fields
Syntax:
<Elements>.fields() -> Object
Examples
# Use Elements.fields on a Elements value
let value = elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0);
print value.fields();
Elements.functions
method lists callable members available on this value
Method: Elements.functions - lists callable members available on this value
Syntax:
<Elements>.functions() -> List
Examples
# Use Elements.functions on a Elements value
let value = elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0);
print value.functions();
Orbit
type two-body orbit backed by osculating elements or a relative state vector
Type: Orbit - two-body orbit backed by osculating elements or a relative state vector
Syntax:
orbit(elements: Elements, central: Body, time: Time, axis: Axis) -> Orbit
Arguments:
elements: Elements - osculating elements at the epoch
central: Body - central gravitating body
time: Time - epoch time
axis: Axis [optional] - non-rotating element axis, icrf by default; tod is also accepted
Children: body, central, time, epoch, axis, elements, position, velocity, conic, position(), velocity(), at(), elements(), predict(), children(), fields(), functions()
Examples
# Propagate an elliptic orbit forward and print the new radius
let epoch = time(2026,1,1,0,0,0);
let el = elements(q: 7000, e: 0.1, i: 30, node: 40, argument: 50, anomaly: 0, unit: deg);
let orbit0 = orbit(el, earth, epoch);
let orbit1 = orbit0.at(epoch.add_hours(6));
print orbit0.position().length(), orbit1.position().length();
Orbit.body
field orbiting body when the orbit came from ephemeris states
Field: Orbit.body - orbiting body when the orbit came from ephemeris states
Syntax:
<Orbit>.body -> Body
Examples
# Read the body field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).body;
Orbit.central
field central gravitating body
Field: Orbit.central - central gravitating body
Syntax:
<Orbit>.central -> Body
Examples
# Read the central field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).central;
Orbit.time
field epoch time
Field: Orbit.time - epoch time
Syntax:
<Orbit>.time -> Time
Examples
# Read the time field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).time;
Orbit.epoch
field epoch time
Field: Orbit.epoch - epoch time
Syntax:
<Orbit>.epoch -> Time
Examples
# Read the epoch field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).epoch;
Orbit.axis
field axis used for the osculating elements and relative state vectors
Field: Orbit.axis - axis used for the osculating elements and relative state vectors
Syntax:
<Orbit>.axis -> Axis
Examples
# Read the axis field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).axis;
Orbit.elements
field osculating elements at the orbit epoch
Field: Orbit.elements - osculating elements at the orbit epoch
Syntax:
<Orbit>.elements -> Elements
Examples
# Read the elements field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).elements;
Orbit.position
field relative position vector at the orbit epoch
Field: Orbit.position - relative position vector at the orbit epoch
Syntax:
<Orbit>.position -> Vector
Examples
# Read the position field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).position;
Orbit.velocity
field relative velocity vector at the orbit epoch
Field: Orbit.velocity - relative velocity vector at the orbit epoch
Syntax:
<Orbit>.velocity -> Vector
Examples
# Read the velocity field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).velocity;
Orbit.conic
field elliptic, parabolic, or hyperbolic conic class
Field: Orbit.conic - elliptic, parabolic, or hyperbolic conic class
Syntax:
<Orbit>.conic -> Text
Examples
# Read the conic field from a Orbit value
print orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time()).conic;
Orbit.position
method returns orbit-relative position
Method: Orbit.position - returns orbit-relative position
Syntax:
<Orbit>.position(time: Time) -> Vector
Arguments:
time: Time [optional] - time to propagate to; defaults to the orbit epoch
Examples
# Use Orbit.position on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.position();
Orbit.velocity
method returns orbit-relative velocity
Method: Orbit.velocity - returns orbit-relative velocity
Syntax:
<Orbit>.velocity(time: Time) -> Vector
Arguments:
time: Time [optional] - time to propagate to; defaults to the orbit epoch
Examples
# Use Orbit.velocity on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.velocity();
Orbit.at
method propagates the orbit to a new time
Method: Orbit.at - propagates the orbit to a new time
Syntax:
<Orbit>.at(time: Time) -> Orbit
Arguments:
time: Time - time to propagate to
Examples
# Use Orbit.at on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.at(time());
Orbit.elements
method returns osculating elements
Method: Orbit.elements - returns osculating elements
Syntax:
<Orbit>.elements() -> Elements
Examples
# Use Orbit.elements on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.elements();
Orbit.predict
method predicts a sky direction from this orbit
Method: Orbit.predict - predicts a sky direction from this orbit
Syntax:
<Orbit>.predict(time: Time, observer: Observer) -> Direction
Arguments:
time: Time - prediction time
observer: Observer - observing site
Examples
# Use Orbit.predict on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.predict(time(), location(latitude: 60.0, longitude: 270.0).observer(height: 1.5));
Orbit.children
method lists child fields and callable members available on this value
Method: Orbit.children - lists child fields and callable members available on this value
Syntax:
<Orbit>.children() -> List
Examples
# Use Orbit.children on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.children();
Orbit.fields
method returns an object containing the value's plain fields
Method: Orbit.fields - returns an object containing the value's plain fields
Syntax:
<Orbit>.fields() -> Object
Examples
# Use Orbit.fields on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.fields();
Orbit.functions
method lists callable members available on this value
Method: Orbit.functions - lists callable members available on this value
Syntax:
<Orbit>.functions() -> List
Examples
# Use Orbit.functions on a Orbit value
let value = orbit(elements(7000.0, 0.01, 5.0, 40.0, 80.0, 120.0), earth, time());
print value.functions();
System
type immutable orbit propagation system with shared snapshot cache
Type: System - immutable orbit propagation system with shared snapshot cache
Syntax:
system(epoch: Time, bodies: Body|State|Orbit|Text|List, integrator: Text) -> System
Arguments:
epoch: Time - system epoch
bodies: Body|State|Orbit|Text|List - system entries: explicit states, body-backed orbits, or ephemeris bodies
integrator: Text [optional] - optional integrator: "ias15", "dp5", or "rk4"; "dp5" is slow and mainly for debugging/reference comparisons
Children: time, bodies, states, sources, source_counts, integrator, method, ephemeris_coverage, diagnostics, ephemeris_residuals, positions, velocities, integrated, ephemeris, cache_size, at(), cache(), clear_cache(), state(), position(), velocity(), distance(), children(), fields(), functions()
Examples
# Build a System value and print the result
let value = system(time(2026, 7, 4), earth, moon, sun);
print value;
System.time
field snapshot time
Field: System.time - snapshot time
Syntax:
<System>.time -> Time
Examples
# Read the time field from a System value
print system(time(2026, 7, 4), earth, moon, sun).time;
System.bodies
field bodies in the system
Field: System.bodies - bodies in the system
Syntax:
<System>.bodies -> List
Examples
# Read the bodies field from a System value
print system(time(2026, 7, 4), earth, moon, sun).bodies;
System.states
field states at the snapshot time
Field: System.states - states at the snapshot time
Syntax:
<System>.states -> List
Examples
# Read the states field from a System value
print system(time(2026, 7, 4), earth, moon, sun).states;
System.sources
field per-body source names
Field: System.sources - per-body source names
Syntax:
<System>.sources -> Object
Examples
# Read the sources field from a System value
print system(time(2026, 7, 4), earth, moon, sun).sources;
System.source_counts
field counts of integrated and ephemeris-derived bodies
Field: System.source_counts - counts of integrated and ephemeris-derived bodies
Syntax:
<System>.source_counts -> Object
Examples
# Read the source_counts field from a System value
print system(time(2026, 7, 4), earth, moon, sun).source_counts;
System.integrator
field numerical integrator name; dp5 is a slow reference/debug method
Field: System.integrator - numerical integrator name; dp5 is a slow reference/debug method
Syntax:
<System>.integrator -> Text
Examples
# Read the integrator field from a System value
print system(time(2026, 7, 4), earth, moon, sun).integrator;
System.method
field alias for integrator
Field: System.method - alias for integrator
Syntax:
<System>.method -> Text
Examples
# Read the method field from a System value
print system(time(2026, 7, 4), earth, moon, sun).method;
System.ephemeris_coverage
field whether this snapshot time is covered by the loaded ephemeris
Field: System.ephemeris_coverage - whether this snapshot time is covered by the loaded ephemeris
Syntax:
<System>.ephemeris_coverage -> Text
Examples
# Read the ephemeris_coverage field from a System value
print system(time(2026, 7, 4), earth, moon, sun).ephemeris_coverage;
System.diagnostics
field last propagation diagnostics: steps, rejections, and derivative evaluations
Field: System.diagnostics - last propagation diagnostics: steps, rejections, and derivative evaluations
Syntax:
<System>.diagnostics -> Object
Examples
# Read the diagnostics field from a System value
print system(time(2026, 7, 4), earth, moon, sun).diagnostics;
System.ephemeris_residuals
field per-body position residuals in kilometers against ephemeris at covered times
Field: System.ephemeris_residuals - per-body position residuals in kilometers against ephemeris at covered times
Syntax:
<System>.ephemeris_residuals -> Object
Examples
# Read the ephemeris_residuals field from a System value
print system(time(2026, 7, 4), earth, moon, sun).ephemeris_residuals;
System.positions
field per-body barycentric ICRF positions
Field: System.positions - per-body barycentric ICRF positions
Syntax:
<System>.positions -> Object
Examples
# Read the positions field from a System value
print system(time(2026, 7, 4), earth, moon, sun).positions;
System.velocities
field per-body barycentric ICRF velocities
Field: System.velocities - per-body barycentric ICRF velocities
Syntax:
<System>.velocities -> Object
Examples
# Read the velocities field from a System value
print system(time(2026, 7, 4), earth, moon, sun).velocities;
System.integrated
field names of currently integrated system bodies
Field: System.integrated - names of currently integrated system bodies
Syntax:
<System>.integrated -> List
Examples
# Read the integrated field from a System value
print system(time(2026, 7, 4), earth, moon, sun).integrated;
System.ephemeris
field names of ephemeris-derived system bodies
Field: System.ephemeris - names of ephemeris-derived system bodies
Syntax:
<System>.ephemeris -> List
Examples
# Read the ephemeris field from a System value
print system(time(2026, 7, 4), earth, moon, sun).ephemeris;
System.cache_size
field number of cached snapshot checkpoints
Field: System.cache_size - number of cached snapshot checkpoints
Syntax:
<System>.cache_size -> Number
Examples
# Read the cache_size field from a System value
print system(time(2026, 7, 4), earth, moon, sun).cache_size;
System.at
method returns a system snapshot at a time
Method: System.at - returns a system snapshot at a time
Syntax:
<System>.at(time: Time) -> System
Arguments:
time: Time - snapshot time
Examples
# Use System.at on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.at(time());
System.cache
method returns a system snapshot and marks it as a cache checkpoint
Method: System.cache - returns a system snapshot and marks it as a cache checkpoint
Syntax:
<System>.cache(time: Time) -> System
Arguments:
time: Time - checkpoint time
Examples
# Use System.cache on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.cache(time());
System.clear_cache
method clears cached system checkpoints without changing the system definition
Method: System.clear_cache - clears cached system checkpoints without changing the system definition
Syntax:
<System>.clear_cache() -> System
Examples
# Use System.clear_cache on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.clear_cache();
System.state
method returns states from this system snapshot
Method: System.state - returns states from this system snapshot
Syntax:
<System>.state() -> List
<System>.state(body: Body|Text) -> State
Arguments:
body: Body|Text [optional] - body or system object name
Examples
# Use System.state on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.state();
System.position
method returns a named body's snapshot position
Method: System.position - returns a named body's snapshot position
Syntax:
<System>.position(body: Body|Text) -> Vector
Arguments:
body: Body|Text - body or system object name
Examples
# Use System.position on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.position(sun);
System.velocity
method returns a named body's snapshot velocity
Method: System.velocity - returns a named body's snapshot velocity
Syntax:
<System>.velocity(body: Body|Text) -> Vector
Arguments:
body: Body|Text - body or system object name
Examples
# Use System.velocity on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.velocity(sun);
System.distance
method returns the distance between two system bodies
Method: System.distance - returns the distance between two system bodies
Syntax:
<System>.distance(a: Body|Text, b: Body|Text) -> Number
Arguments:
a: Body|Text - first body or system object name
b: Body|Text - second body or system object name
Examples
# Use System.distance on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.distance(sun, sun);
System.children
method lists child fields and callable members available on this value
Method: System.children - lists child fields and callable members available on this value
Syntax:
<System>.children() -> List
Examples
# Use System.children on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.children();
System.fields
method returns an object containing the value's plain fields
Method: System.fields - returns an object containing the value's plain fields
Syntax:
<System>.fields() -> Object
Examples
# Use System.fields on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.fields();
System.functions
method lists callable members available on this value
Method: System.functions - lists callable members available on this value
Syntax:
<System>.functions() -> List
Examples
# Use System.functions on a System value
let value = system(time(2026, 7, 4), earth, moon, sun);
print value.functions();
Observation
type measured sky direction or target elevation observation
Type: Observation - measured sky direction or target elevation observation
Syntax:
observation(observer: Observer, time: Time, direction: Direction|State, frame: Frame) -> Observation
observation(target: Body|Star, time: Time, elevation: Number) -> Observation
Arguments:
observer: Observer [optional] - observing site
time: Time - observation time
direction: Direction|State [optional] - measured line of sight, or a state whose position gives the line of sight
frame: Frame [optional] - coordinate frame for RA/Dec shorthand or state conversion; defaults to icrf
target: Body|Star [optional] - observed planet, Moon, Sun, or star
elevation: Number [optional] - measured elevation above the horizon in degrees
Children: observer, time, direction, target, elevation, uncertainty, weight, label, icrf(), topographic(), with_uncertainty(), with_weight(), children(), fields(), functions()
Examples
# Build a Observation value and print the result
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value;
Observation.observer
field observing site, when this is a direction observation
Field: Observation.observer - observing site, when this is a direction observation
Syntax:
<Observation>.observer -> Observer?
Examples
# Read the observer field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).observer;
Observation.time
field observation time
Field: Observation.time - observation time
Syntax:
<Observation>.time -> Time
Examples
# Read the time field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).time;
Observation.direction
field measured direction, when this is a direction observation
Field: Observation.direction - measured direction, when this is a direction observation
Syntax:
<Observation>.direction -> Direction?
Examples
# Read the direction field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).direction;
Observation.target
field observed body or star, when this is an elevation observation
Field: Observation.target - observed body or star, when this is an elevation observation
Syntax:
<Observation>.target -> Body|Star?
Examples
# Read the target field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).target;
Observation.elevation
field measured target elevation in degrees, when this is an elevation observation
Field: Observation.elevation - measured target elevation in degrees, when this is an elevation observation
Syntax:
<Observation>.elevation -> Number?
Examples
# Read the elevation field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).elevation;
Observation.uncertainty
field direction uncertainty in arcseconds
Field: Observation.uncertainty - direction uncertainty in arcseconds
Syntax:
<Observation>.uncertainty -> Number?
Examples
# Read the uncertainty field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).uncertainty;
Observation.weight
field least-squares weight
Field: Observation.weight - least-squares weight
Syntax:
<Observation>.weight -> Number?
Examples
# Read the weight field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).weight;
Observation.label
field optional observation label
Field: Observation.label - optional observation label
Syntax:
<Observation>.label -> Text?
Examples
# Read the label field from a Observation value
print observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4)).label;
Observation.icrf
method converts the observation direction to ICRF
Method: Observation.icrf - converts the observation direction to ICRF
Syntax:
<Observation>.icrf() -> Direction
Examples
# Use Observation.icrf on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.icrf();
Observation.topographic
method converts the observation direction to topographic axes
Method: Observation.topographic - converts the observation direction to topographic axes
Syntax:
<Observation>.topographic() -> Direction
Examples
# Read an observation line of sight in local topographic axes
let obs = location(latitude: 59.91, longitude: 10.75).observer(height: 0);
let dir = direction(topographic, azimuth: 120.0, altitude: 25.0);
let value = observation(obs, time(2026,7,3), dir);
print value.topographic();
Observation.with_uncertainty
method sets observation uncertainty
Method: Observation.with_uncertainty - sets observation uncertainty
Syntax:
<Observation>.with_uncertainty(arcsec: Number) -> Observation
Arguments:
arcsec: Number - one-sigma uncertainty in arcseconds
Examples
# Use Observation.with_uncertainty on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.with_uncertainty(42.0);
Observation.with_weight
method sets observation weight
Method: Observation.with_weight - sets observation weight
Syntax:
<Observation>.with_weight(weight: Number) -> Observation
Arguments:
weight: Number - relative observation weight
Examples
# Use Observation.with_weight on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.with_weight(42.0);
Observation.children
method lists child fields and callable members available on this value
Method: Observation.children - lists child fields and callable members available on this value
Syntax:
<Observation>.children() -> List
Examples
# Use Observation.children on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.children();
Observation.fields
method returns an object containing the value's plain fields
Method: Observation.fields - returns an object containing the value's plain fields
Syntax:
<Observation>.fields() -> Object
Examples
# Use Observation.fields on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.fields();
Observation.functions
method lists callable members available on this value
Method: Observation.functions - lists callable members available on this value
Syntax:
<Observation>.functions() -> List
Examples
# Use Observation.functions on a Observation value
let value = observation(observer(location(59.91,10.75)), time(2026,7,3), direction(ra:120.1, dec:22.4));
print value.functions();
OrbitSolution
type orbit determination result with orbit, residuals, and fit quality
Type: OrbitSolution - orbit determination result with orbit, residuals, and fit quality
Syntax:
orbit_determination(observations: List<Observation>) -> OrbitSolution
Arguments:
observations: List<Observation> - three or more observations
Children: orbit, elements, observations, residuals, rms, max_residual, method, status, iterations, predict(), residuals(), children(), fields(), functions()
Examples
# Build a OrbitSolution value and print the result
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value;
OrbitSolution.orbit
field determined two-body orbit
Field: OrbitSolution.orbit - determined two-body orbit
Syntax:
<OrbitSolution>.orbit -> Orbit
Examples
# Read the orbit field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).orbit;
OrbitSolution.elements
field osculating elements for the determined orbit
Field: OrbitSolution.elements - osculating elements for the determined orbit
Syntax:
<OrbitSolution>.elements -> Elements
Examples
# Read the elements field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).elements;
OrbitSolution.observations
field observations used for the determination
Field: OrbitSolution.observations - observations used for the determination
Syntax:
<OrbitSolution>.observations -> List<Observation>
Examples
# Read the observations field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).observations;
OrbitSolution.residuals
field per-observation residual objects
Field: OrbitSolution.residuals - per-observation residual objects
Syntax:
<OrbitSolution>.residuals -> List<Object>
Examples
# Read the residuals field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).residuals;
OrbitSolution.rms
field RMS angular residual in arcseconds
Field: OrbitSolution.rms - RMS angular residual in arcseconds
Syntax:
<OrbitSolution>.rms -> Number
Examples
# Read the rms field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).rms;
OrbitSolution.max_residual
field largest angular residual in arcseconds
Field: OrbitSolution.max_residual - largest angular residual in arcseconds
Syntax:
<OrbitSolution>.max_residual -> Number
Examples
# Read the max_residual field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).max_residual;
OrbitSolution.method
field solver method used
Field: OrbitSolution.method - solver method used
Syntax:
<OrbitSolution>.method -> Text
Examples
# Read the method field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).method;
OrbitSolution.status
field solver status
Field: OrbitSolution.status - solver status
Syntax:
<OrbitSolution>.status -> Text
Examples
# Read the status field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).status;
OrbitSolution.iterations
field differential-correction iterations performed
Field: OrbitSolution.iterations - differential-correction iterations performed
Syntax:
<OrbitSolution>.iterations -> Number
Examples
# Read the iterations field from a OrbitSolution value
print orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun).iterations;
OrbitSolution.predict
method predicts a direction from the determined orbit
Method: OrbitSolution.predict - predicts a direction from the determined orbit
Syntax:
<OrbitSolution>.predict(time: Time, observer: Observer) -> Direction
Arguments:
time: Time - prediction time
observer: Observer - observing site
Examples
# Use OrbitSolution.predict on a OrbitSolution value
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value.predict(time(), location(latitude: 60.0, longitude: 270.0).observer(height: 1.5));
OrbitSolution.residuals
method returns per-observation residuals
Method: OrbitSolution.residuals - returns per-observation residuals
Syntax:
<OrbitSolution>.residuals() -> List<Object>
Examples
# Use OrbitSolution.residuals on a OrbitSolution value
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value.residuals();
OrbitSolution.children
method lists child fields and callable members available on this value
Method: OrbitSolution.children - lists child fields and callable members available on this value
Syntax:
<OrbitSolution>.children() -> List
Examples
# Use OrbitSolution.children on a OrbitSolution value
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value.children();
OrbitSolution.fields
method returns an object containing the value's plain fields
Method: OrbitSolution.fields - returns an object containing the value's plain fields
Syntax:
<OrbitSolution>.fields() -> Object
Examples
# Use OrbitSolution.fields on a OrbitSolution value
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value.fields();
OrbitSolution.functions
method lists callable members available on this value
Method: OrbitSolution.functions - lists callable members available on this value
Syntax:
<OrbitSolution>.functions() -> List
Examples
# Use OrbitSolution.functions on a OrbitSolution value
let value = orbit_determination([observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,3),ra:131.0857742519269,dec:18.803678151005595),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,7,23),ra:135.0300892722528,dec:18.040162341691612),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,8,12),ra:139.04202357010908,dec:17.175191580463146),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,1),ra:142.9726130958044,dec:16.26645304942825),observation(location(latitude:59.91,longitude:10.75).observer(height:0),time(2028,9,21),ra:146.67383907727944,dec:15.384398529605518)],central:sun);
print value.functions();
Shadow
type instantaneous sunlight shadow geometry for one body on another
Type: Shadow - instantaneous sunlight shadow geometry for one body on another
Syntax:
shadow() -> Shadow
Children: surface, blocker, source, time, sample(), occultation(), distance(), polygon(), limb(), children(), fields(), functions()
Examples
# Compute a Moon shadow state on Earth
let t = time(2024,4,8,18,40,0);
let sh = state(earth, t).shadow(moon);
print sh.surface.name, sh.blocker.name, sh.distance();
Shadow.surface
field body receiving the shadow
Field: Shadow.surface - body receiving the shadow
Syntax:
<Shadow>.surface -> Body
Examples
# Read the surface field from a Shadow value
print state(earth, time(2024,4,8,18,40,0)).shadow(moon).surface;
Shadow.blocker
field body casting the shadow
Field: Shadow.blocker - body casting the shadow
Syntax:
<Shadow>.blocker -> Body
Examples
# Read the blocker field from a Shadow value
print state(earth, time(2024,4,8,18,40,0)).shadow(moon).blocker;
Shadow.source
field light source; currently the Sun
Field: Shadow.source - light source; currently the Sun
Syntax:
<Shadow>.source -> Body
Examples
# Read the source field from a Shadow value
print state(earth, time(2024,4,8,18,40,0)).shadow(moon).source;
Shadow.time
field time of the shadow geometry
Field: Shadow.time - time of the shadow geometry
Syntax:
<Shadow>.time -> Time
Examples
# Read the time field from a Shadow value
print state(earth, time(2024,4,8,18,40,0)).shadow(moon).time;
Shadow.sample
method samples this shadow at a location or observer
Method: Shadow.sample - samples this shadow at a location or observer
Syntax:
<Shadow>.sample(location: Location|Observer) -> Object
Arguments:
location: Location|Observer - surface location or observer to sample
Examples
# Sample this shadow at an explicit observer
let t = time(2024,4,8,18,40,0);
let obs = location(latitude: 32.7767, longitude: -96.7970).observer();
let sh = state(earth, t).shadow(moon);
print sh.sample(obs);
Shadow.occultation
method returns a low-level local solar-disc occultation scalar
Method: Shadow.occultation - returns a low-level local solar-disc occultation scalar
Syntax:
<Shadow>.occultation(location: Location|Observer, lunar_limb: List) -> Number
Arguments:
location: Location|Observer - surface location or observer to evaluate
lunar_limb: List [optional] - optional precomputed lunar limb profile from `state(moon,time).limb(...)`
Examples
# Use Shadow.occultation on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.occultation(location(latitude: 60.0, longitude: 270.0));
Shadow.distance
method returns signed global shadow clearance
Method: Shadow.distance - returns signed global shadow clearance
Syntax:
<Shadow>.distance() -> Number
Examples
# Use Shadow.distance on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.distance();
Shadow.polygon
method binary-searches a daylight-clipped shadow border polygon around the eclipse center
Method: Shadow.polygon - binary-searches a daylight-clipped shadow border polygon around the eclipse center
Syntax:
<Shadow>.polygon(samples: Number, spacing_km: Number, spacing_degrees: Number, deviation: Number, magnitude: Number, kind: Text, lunar_limb: List, topography: Field, height: Number) -> Polygon|Unavailable
Arguments:
samples: Number [optional] - optional fixed number of border rays; omitted uses adaptive sampling
spacing_km: Number [optional] - adaptive target great-circle spacing between polygon vertices, in km
spacing_degrees: Number [optional] - adaptive target great-circle spacing between polygon vertices, in degrees
deviation: Number [optional] - adaptive maximum midpoint deviation from the segment, in degrees; `error` is an alias
magnitude: Number [optional] - optional eclipse magnitude threshold between 0 and 1; can also be positional
kind: Text [optional] - optional contour kind: `total` or `annular`; can also be positional
lunar_limb: List [optional] - precomputed lunar limb profile from `state(moon,time).limb(...)`; only valid for totality contours
topography: Field [optional] - optional body-matching topography field, for example `topography(earth)`
height: Number [optional] - observer height in km above the datum or supplied topography; `observer_height` is an alias
Examples
# Use Shadow.polygon on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.polygon();
Shadow.limb
method projects a precomputed lunar limb profile onto the Earth shadow map
Method: Shadow.limb - projects a precomputed lunar limb profile onto the Earth shadow map
Syntax:
<Shadow>.limb(lunar_limb: List, scale: Number) -> Polygon|Unavailable
Arguments:
lunar_limb: List - precomputed lunar limb profile from `state(moon,time).limb(...)`
scale: Number [optional] - non-negative exaggeration factor for lunar-radius deviations from the mean limb
Examples
# Project a precomputed lunar limb profile onto an eclipse shadow
let t = time(2024,4,8,18,40,0);
let loc = location(latitude: 32.7767, longitude: -96.7970);
let limb = state(moon, t).limb(loc, 8);
let sh = state(earth, t).shadow(moon);
print sh.limb(limb, scale: 1).available();
Shadow.children
method lists child fields and callable members available on this value
Method: Shadow.children - lists child fields and callable members available on this value
Syntax:
<Shadow>.children() -> List
Examples
# Use Shadow.children on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.children();
Shadow.fields
method returns an object containing the value's plain fields
Method: Shadow.fields - returns an object containing the value's plain fields
Syntax:
<Shadow>.fields() -> Object
Examples
# Use Shadow.fields on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.fields();
Shadow.functions
method lists callable members available on this value
Method: Shadow.functions - lists callable members available on this value
Syntax:
<Shadow>.functions() -> List
Examples
# Use Shadow.functions on a Shadow value
let value = state(earth, time(2024,4,8,18,40,0)).shadow(moon);
print value.functions();
Heading
type compass heading measured clockwise from north
Type: Heading - compass heading measured clockwise from north
Syntax:
heading(azimuth: Number|Text, unit: Unit) -> Heading
Arguments:
azimuth: Number|Text - degrees clockwise from north, or a compass name such as "nw"
unit: Unit [optional] - optional angle unit for numeric headings; degrees are default
Children: azimuth_degrees, long_name, short_name, azimuth(), long(), short(), vector(), children(), fields(), functions()
Examples
# Convert a compass heading into degrees
let h = heading("southeast");
print h.azimuth(deg);
Heading.azimuth_degrees
field compass azimuth in degrees clockwise from north
Field: Heading.azimuth_degrees - compass azimuth in degrees clockwise from north
Syntax:
<Heading>.azimuth_degrees -> Number
Examples
# Read the azimuth_degrees field from a Heading value
print heading(135.0).azimuth_degrees;
Heading.long_name
field long 16-wind compass name
Field: Heading.long_name - long 16-wind compass name
Syntax:
<Heading>.long_name -> Text
Examples
# Read the long_name field from a Heading value
print heading(135.0).long_name;
Heading.short_name
field short lowercase 16-wind compass name
Field: Heading.short_name - short lowercase 16-wind compass name
Syntax:
<Heading>.short_name -> Text
Examples
# Read the short_name field from a Heading value
print heading(135.0).short_name;
Heading.azimuth
method returns azimuth clockwise from north
Method: Heading.azimuth - returns azimuth clockwise from north
Syntax:
<Heading>.azimuth(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional angle unit; degrees are default
Examples
# Use Heading.azimuth on a Heading value
let value = heading(135.0);
print value.azimuth();
Heading.long
method returns the long 16-wind compass name
Method: Heading.long - returns the long 16-wind compass name
Syntax:
<Heading>.long() -> Text
Examples
# Use Heading.long on a Heading value
let value = heading(135.0);
print value.long();
Heading.short
method returns the short 16-wind compass name
Method: Heading.short - returns the short 16-wind compass name
Syntax:
<Heading>.short() -> Text
Examples
# Use Heading.short on a Heading value
let value = heading(135.0);
print value.short();
Heading.vector
method returns a local topographic direction vector
Method: Heading.vector - returns a local topographic direction vector
Syntax:
<Heading>.vector(altitude: Number, zenith: Number, length: Number, radius: Number, unit: Unit) -> Vector
Arguments:
altitude: Number [optional] - angle above the local horizon; degrees are default
zenith: Number [optional] - angle down from local zenith; degrees are default
length: Number [optional] - vector length; defaults to one
radius: Number [optional] - alias for length
unit: Unit [optional] - optional angle unit for altitude or zenith
Examples
# Use Heading.vector on a Heading value
let value = heading(135.0);
print value.vector();
Heading.children
method lists child fields and callable members available on this value
Method: Heading.children - lists child fields and callable members available on this value
Syntax:
<Heading>.children() -> List
Examples
# Use Heading.children on a Heading value
let value = heading(135.0);
print value.children();
Heading.fields
method returns an object containing the value's plain fields
Method: Heading.fields - returns an object containing the value's plain fields
Syntax:
<Heading>.fields() -> Object
Examples
# Use Heading.fields on a Heading value
let value = heading(135.0);
print value.fields();
Heading.functions
method lists callable members available on this value
Method: Heading.functions - lists callable members available on this value
Syntax:
<Heading>.functions() -> List
Examples
# Use Heading.functions on a Heading value
let value = heading(135.0);
print value.functions();
Direction
type unit-sphere direction tagged with a coordinate frame
Type: Direction - unit-sphere direction tagged with a coordinate frame
Syntax:
direction(frame: Frame, ra: Number, dec: Number, azimuth: Number, altitude: Number, zenith: Number, unit: Unit) -> Direction
Arguments:
frame: Frame [optional] - coordinate frame, defaulting to icrf
ra: Number [optional] - right ascension / longitude in degrees by default
dec: Number [optional] - declination / latitude in degrees by default
azimuth: Number [optional] - topographic azimuth clockwise from north; degrees are default
altitude: Number [optional] - topographic altitude/elevation above the horizon; degrees are default
zenith: Number [optional] - topographic angle down from local zenith; degrees are default
unit: Unit [optional] - optional angle unit such as rad
Children: frame, vector, ra, dec, to_frame(), altaz(), angular_distance(), rise(), set(), transit(), children(), fields(), functions()
Examples
# Measure angular distance between two sky directions
let a = direction(ra: 40, dec: 10);
let b = direction(ra: 42, dec: 11);
print a.angular_distance(b);
Direction.frame
field coordinate frame for this direction
Field: Direction.frame - coordinate frame for this direction
Syntax:
<Direction>.frame -> Frame
Examples
# Read the frame field from a Direction value
print direction(ra: 42.0, dec: 18.0).frame;
Direction.vector
field unit vector in the direction frame
Field: Direction.vector - unit vector in the direction frame
Syntax:
<Direction>.vector -> Vector
Examples
# Read the vector field from a Direction value
print direction(ra: 42.0, dec: 18.0).vector;
Direction.ra
field right ascension / longitude in degrees
Field: Direction.ra - right ascension / longitude in degrees
Syntax:
<Direction>.ra -> Number
Examples
# Read the ra field from a Direction value
print direction(ra: 42.0, dec: 18.0).ra;
Direction.dec
field declination / latitude in degrees
Field: Direction.dec - declination / latitude in degrees
Syntax:
<Direction>.dec -> Number
Examples
# Read the dec field from a Direction value
print direction(ra: 42.0, dec: 18.0).dec;
Direction.to_frame
method converts this direction to another frame
Method: Direction.to_frame - converts this direction to another frame
Syntax:
<Direction>.to_frame(frame: Frame, time: Time) -> Direction
Arguments:
frame: Frame - target frame
time: Time [optional] - time for time-dependent frame conversion
Examples
# Use Direction.to_frame on a Direction value
let value = direction(ra: 42.0, dec: 18.0);
print value.to_frame(icrf);
Direction.altaz
method returns local altitude and azimuth for this direction
Method: Direction.altaz - returns local altitude and azimuth for this direction
Syntax:
<Direction>.altaz(observer: Location | Observer, time: Time) -> Object
Arguments:
observer: Location | Observer - local observer; a location means zero height
time: Time [optional] - time for time-dependent frame conversion
Examples
# Convert an ICRF direction to local altitude and azimuth
let t = time(2026,1,1,0,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let value = direction(ra: 42.0, dec: 18.0);
print value.altaz(t, loc);
Direction.angular_distance
method returns angular separation from another point
Method: Direction.angular_distance - returns angular separation from another point
Syntax:
<Direction>.angular_distance(point: Direction | Location | Vector, time: Time, unit: Unit) -> Number
Arguments:
point: Direction | Location | Vector - other point on the sphere
time: Time [optional] - time for time-dependent frame conversion
unit: Unit [optional] - angle unit; degrees are used by default
Examples
# Measure angular separation between two sky directions
let a = direction(ra: 42.0, dec: 18.0);
let b = direction(ra: 45.0, dec: 20.0);
print a.angular_distance(b);
Direction.rise
method returns when this direction rises for the observer
Method: Direction.rise - returns when this direction rises for the observer
Syntax:
<Direction>.rise(range: Range, observer: Location | Observer) -> List|Event|Nil
Arguments:
range: Range - time range to search; bounded ranges return all events, open ranges return the next event
observer: Location | Observer - local observer; a location means zero height
Examples
# Find when a sky direction rises for an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
let d = direction(ra: 42.0, dec: 18.0);
print d.rise(span, obs).first();
Direction.set
method returns when this direction sets for the observer
Method: Direction.set - returns when this direction sets for the observer
Syntax:
<Direction>.set(range: Range, observer: Location | Observer) -> List|Event|Nil
Arguments:
range: Range - time range to search; bounded ranges return all events, open ranges return the next event
observer: Location | Observer - local observer; a location means zero height
Examples
# Find when a sky direction sets for an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
let d = direction(ra: 42.0, dec: 18.0);
print d.set(span, obs).first();
Direction.transit
method returns upper culmination events for this direction
Method: Direction.transit - returns upper culmination events for this direction
Syntax:
<Direction>.transit(range: Range, observer: Location | Observer) -> List|Event|Nil
Arguments:
range: Range - time range to search; bounded ranges return all events, open ranges return the next event
observer: Location | Observer - local observer; a location means zero height
Examples
# Use Direction.transit on a Direction value
let value = direction(ra: 42.0, dec: 18.0);
print value.transit(range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0));
Direction.children
method lists child fields and callable members available on this value
Method: Direction.children - lists child fields and callable members available on this value
Syntax:
<Direction>.children() -> List
Examples
# Use Direction.children on a Direction value
let value = direction(ra: 42.0, dec: 18.0);
print value.children();
Direction.fields
method returns an object containing the value's plain fields
Method: Direction.fields - returns an object containing the value's plain fields
Syntax:
<Direction>.fields() -> Object
Examples
# Use Direction.fields on a Direction value
let value = direction(ra: 42.0, dec: 18.0);
print value.fields();
Direction.functions
method lists callable members available on this value
Method: Direction.functions - lists callable members available on this value
Syntax:
<Direction>.functions() -> List
Examples
# Use Direction.functions on a Direction value
let value = direction(ra: 42.0, dec: 18.0);
print value.functions();
Polygon
type right-handed spherical polygon with great-circle edges
Type: Polygon - right-handed spherical polygon with great-circle edges
Syntax:
polygon(frame: Frame, vertices: List, time: Time) -> Polygon
Arguments:
frame: Frame [optional] - coordinate frame for the polygon vertices
vertices: List - right-handed vertex list with great-circle edges
time: Time [optional] - time used when converting vertices between frames
Children: frame, count, vertices, invert(), to_frame(), inside(), area(), signed_area(), winding(), lonlat(), lonlat_unwrapped(), lonlat_diagnostic(), children(), fields(), functions()
Examples
# Test whether a sky direction falls inside a polygon
let vertices = [direction(ra: 40, dec: 10), direction(ra: 50, dec: 10), direction(ra: 50, dec: 20), direction(ra: 40, dec: 20)];
let area = polygon(icrf, time(2026,1,1,0,0,0), vertices);
print area.inside(direction(ra: 45, dec: 15)), area.area();
Polygon.frame
field coordinate frame for polygon vertices
Field: Polygon.frame - coordinate frame for polygon vertices
Syntax:
<Polygon>.frame -> Frame
Examples
# Read the frame field from a Polygon value
print polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]).frame;
Polygon.count
field number of vertices
Field: Polygon.count - number of vertices
Syntax:
<Polygon>.count -> Number
Examples
# Read the count field from a Polygon value
print polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]).count;
Polygon.vertices
field vertices as Direction values in the polygon frame
Field: Polygon.vertices - vertices as Direction values in the polygon frame
Syntax:
<Polygon>.vertices -> List
Examples
# Read the vertices field from a Polygon value
print polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]).vertices;
Polygon.invert
method reverses the polygon orientation
Method: Polygon.invert - reverses the polygon orientation
Syntax:
<Polygon>.invert() -> Polygon
Examples
# Use Polygon.invert on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.invert();
Polygon.to_frame
method converts all polygon vertices to another frame
Method: Polygon.to_frame - converts all polygon vertices to another frame
Syntax:
<Polygon>.to_frame(frame: Frame, time: Time) -> Polygon
Arguments:
frame: Frame - target frame
time: Time [optional] - time for time-dependent frame conversion
Examples
# Use Polygon.to_frame on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.to_frame(icrf);
Polygon.inside
method tests whether a point lies inside the right-handed polygon
Method: Polygon.inside - tests whether a point lies inside the right-handed polygon
Syntax:
<Polygon>.inside(point: Direction | Location | Vector, time: Time) -> Bool
Arguments:
point: Direction | Location | Vector - point to test or measure
time: Time [optional] - time for time-dependent frame conversion
Examples
# Test whether a sky direction falls inside a polygon
let t = time(2026,1,1,0,0,0);
let vertices = [direction(ra: 40, dec: 10), direction(ra: 50, dec: 10), direction(ra: 50, dec: 20), direction(ra: 40, dec: 20)];
let p = polygon(icrf, t, vertices);
print p.inside(direction(ra: 45, dec: 15));
Polygon.area
method returns spherical polygon area in steradians
Method: Polygon.area - returns spherical polygon area in steradians
Syntax:
<Polygon>.area() -> Number
Examples
# Use Polygon.area on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.area();
Polygon.signed_area
method returns oriented spherical polygon area in steradians
Method: Polygon.signed_area - returns oriented spherical polygon area in steradians
Syntax:
<Polygon>.signed_area() -> Number
Examples
# Use Polygon.signed_area on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.signed_area();
Polygon.winding
method returns the spherical winding number around a point
Method: Polygon.winding - returns the spherical winding number around a point
Syntax:
<Polygon>.winding(point: Direction | Location | Vector, time: Time) -> Number
Arguments:
point: Direction | Location | Vector - point to test or measure
time: Time [optional] - time for time-dependent frame conversion
Examples
# Compute polygon winding for a sky direction
let t = time(2026,1,1,0,0,0);
let vertices = [direction(ra: 40, dec: 10), direction(ra: 50, dec: 10), direction(ra: 50, dec: 20), direction(ra: 40, dec: 20)];
let p = polygon(icrf, t, vertices);
print p.winding(direction(ra: 45, dec: 15));
Polygon.lonlat
method formats polygon vertices as longitude,latitude lines
Method: Polygon.lonlat - formats polygon vertices as longitude,latitude lines
Syntax:
<Polygon>.lonlat(time: Time) -> Text
Arguments:
time: Time [optional] - time used when converting non-Earth-fixed polygons to Earth-fixed coordinates
Examples
# Convert polygon vertices to longitude-latitude rows at a time
let t = time(2026,1,1,0,0,0);
let p = polygon(icrf, t, [direction(ra: 0, dec: 0), direction(ra: 10, dec: 0), direction(ra: 10, dec: 10)]);
print p.lonlat(t);
Polygon.lonlat_unwrapped
method formats polygon vertices as one continuous longitude,latitude ring without anti-meridian splits
Method: Polygon.lonlat_unwrapped - formats polygon vertices as one continuous longitude,latitude ring without anti-meridian splits
Syntax:
<Polygon>.lonlat_unwrapped(time: Time) -> Text
Arguments:
time: Time [optional] - time used when converting non-Earth-fixed polygons to Earth-fixed coordinates
Examples
# Convert polygon vertices to unwrapped longitude-latitude rows
let t = time(2026,1,1,0,0,0);
let p = polygon(icrf, t, [direction(ra: 350, dec: 0), direction(ra: 10, dec: 0), direction(ra: 10, dec: 10)]);
print p.lonlat_unwrapped(t);
Polygon.lonlat_diagnostic
method diagnoses anti-meridian splitting and longitude jumps
Method: Polygon.lonlat_diagnostic - diagnoses anti-meridian splitting and longitude jumps
Syntax:
<Polygon>.lonlat_diagnostic(time: Time) -> Object
Arguments:
time: Time [optional] - time used when converting non-Earth-fixed polygons to Earth-fixed coordinates
Examples
# Inspect polygon longitude-latitude conversion diagnostics
let t = time(2026,1,1,0,0,0);
let p = polygon(icrf, t, [direction(ra: 0, dec: 0), direction(ra: 10, dec: 0), direction(ra: 10, dec: 10)]);
print p.lonlat_diagnostic(t);
Polygon.children
method lists child fields and callable members available on this value
Method: Polygon.children - lists child fields and callable members available on this value
Syntax:
<Polygon>.children() -> List
Examples
# Use Polygon.children on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.children();
Polygon.fields
method returns an object containing the value's plain fields
Method: Polygon.fields - returns an object containing the value's plain fields
Syntax:
<Polygon>.fields() -> Object
Examples
# Use Polygon.fields on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.fields();
Polygon.functions
method lists callable members available on this value
Method: Polygon.functions - lists callable members available on this value
Syntax:
<Polygon>.functions() -> List
Examples
# Use Polygon.functions on a Polygon value
let value = polygon(vertices: [direction(ra: 42.0, dec: 18.0), direction(ra: 90.0, dec: 20.0), direction(ra: 150.0, dec: 55.0)]);
print value.functions();
Vector
type 3D vector with cached cartesian and spherical representations
Type: Vector - 3D vector with cached cartesian and spherical representations
Syntax:
vector(x: Number, y: Number, z: Number) -> Vector
vector(from: Origin, to: Origin, time: Time) -> Vector
Arguments:
x: Number [optional] - cartesian x component in km
y: Number [optional] - cartesian y component in km, defaulting to zero
z: Number [optional] - cartesian z component in km, defaulting to zero
from: Origin [optional] - source origin such as barycentric or geocentric
to: Origin [optional] - target origin such as barycentric or geocentric
time: Time [optional] - time for the origin transform
Children: kind, orientation, transposed, x(), y(), z(), range(), theta(), phi(), length(), lenxy(), lenxz(), lenyz(), dot(), cross(), angle(), distance(), online(), turn(), normalise(), transpose(), translate_origin(), children(), fields(), functions()
Examples
# Combine position-like vectors and measure their separation
let a = vector(7000, 0, 0);
let b = vector(0, 7000, 0);
print a.length(), b.length(), a.distance(b), a.angle(b, deg);
Vector.kind
field cached vector representation: cartesian, spherical, both, or undefined
Field: Vector.kind - cached vector representation: cartesian, spherical, both, or undefined
Syntax:
<Vector>.kind -> Text
Examples
# Read the kind field from a Vector value
print vector(1.0, 2.0, 3.0).kind;
Vector.orientation
field algebraic orientation: column or row
Field: Vector.orientation - algebraic orientation: column or row
Syntax:
<Vector>.orientation -> Text
Examples
# Read the orientation field from a Vector value
print vector(1.0, 2.0, 3.0).orientation;
Vector.transposed
field true when the vector is a row-vector transpose
Field: Vector.transposed - true when the vector is a row-vector transpose
Syntax:
<Vector>.transposed -> Bool
Examples
# Read the transposed field from a Vector value
print vector(1.0, 2.0, 3.0).transposed;
Vector.x
method returns the cartesian x component
Method: Vector.x - returns the cartesian x component
Syntax:
<Vector>.x(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.x on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.x();
Vector.y
method returns the cartesian y component
Method: Vector.y - returns the cartesian y component
Syntax:
<Vector>.y(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.y on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.y();
Vector.z
method returns the cartesian z component
Method: Vector.z - returns the cartesian z component
Syntax:
<Vector>.z(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.z on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.z();
Vector.range
method returns the spherical range
Method: Vector.range - returns the spherical range
Syntax:
<Vector>.range(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.range on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.range();
Vector.theta
method returns the spherical theta angle
Method: Vector.theta - returns the spherical theta angle
Syntax:
<Vector>.theta(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.theta on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.theta();
Vector.phi
method returns the spherical phi angle
Method: Vector.phi - returns the spherical phi angle
Syntax:
<Vector>.phi(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.phi on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.phi();
Vector.length
method returns the vector length
Method: Vector.length - returns the vector length
Syntax:
<Vector>.length(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.length on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.length();
Vector.lenxy
method returns the length projected into the xy plane
Method: Vector.lenxy - returns the length projected into the xy plane
Syntax:
<Vector>.lenxy(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.lenxy on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.lenxy();
Vector.lenxz
method returns the length projected into the xz plane
Method: Vector.lenxz - returns the length projected into the xz plane
Syntax:
<Vector>.lenxz(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.lenxz on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.lenxz();
Vector.lenyz
method returns the length projected into the yz plane
Method: Vector.lenyz - returns the length projected into the yz plane
Syntax:
<Vector>.lenyz(unit: Unit) -> Number
Arguments:
unit: Unit [optional] - optional output unit
Examples
# Use Vector.lenyz on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.lenyz();
Vector.dot
method returns the dot product with another vector
Method: Vector.dot - returns the dot product with another vector
Syntax:
<Vector>.dot(other: Vector) -> Number
Arguments:
other: Vector - other vector
Examples
# Use Vector.dot on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.dot(vector(1.0, 2.0, 3.0));
Vector.cross
method returns the cross product with another vector
Method: Vector.cross - returns the cross product with another vector
Syntax:
<Vector>.cross(other: Vector) -> Vector
Arguments:
other: Vector - other vector
Examples
# Use Vector.cross on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.cross(vector(1.0, 2.0, 3.0));
Vector.angle
method returns the angle to another vector in radians by default; pass `deg` for degrees
Method: Vector.angle - returns the angle to another vector in radians by default; pass `deg` for degrees
Syntax:
<Vector>.angle(other: Vector, unit: Unit) -> Number
Arguments:
other: Vector - other vector
unit: Unit [optional] - optional angle unit
Examples
# Measure the angle between vectors in degrees
let a = vector(1, 0, 0);
let b = vector(0, 1, 0);
print a.angle(b, deg);
Vector.distance
method returns the distance to another vector
Method: Vector.distance - returns the distance to another vector
Syntax:
<Vector>.distance(other: Vector, unit: Unit) -> Number
Arguments:
other: Vector - other vector
unit: Unit [optional] - optional length unit
Examples
# Use Vector.distance on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.distance(vector(1.0, 2.0, 3.0));
Vector.online
method returns the reference online distance measure
Method: Vector.online - returns the reference online distance measure
Syntax:
<Vector>.online(b: Vector, c: Vector, unit: Unit) -> Number
Arguments:
b: Vector - second point on the line
c: Vector - point used to define the normal direction
unit: Unit [optional] - optional length unit
Examples
# Use Vector.online on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.online(vector(1.0, 2.0, 3.0), vector(1.0, 2.0, 3.0));
Vector.turn
method returns this vector rotated around an axis
Method: Vector.turn - returns this vector rotated around an axis
Syntax:
<Vector>.turn(axis: Vector, angle: Number, unit: Unit) -> Vector
Arguments:
axis: Vector - axis to rotate around
angle: Number - angle in radians by default
unit: Unit [optional] - optional angle unit for the angle argument
Examples
# Use Vector.turn on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.turn(vector(1.0, 2.0, 3.0), 42.0);
Vector.normalise
method returns a normalised copy of this vector
Method: Vector.normalise - returns a normalised copy of this vector
Syntax:
<Vector>.normalise() -> Vector
Examples
# Use Vector.normalise on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.normalise();
Vector.transpose
method returns this vector with column/row orientation toggled
Method: Vector.transpose - returns this vector with column/row orientation toggled
Syntax:
<Vector>.transpose() -> Vector
Examples
# Use Vector.transpose on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.transpose();
Vector.translate_origin
method translates this vector between origin conventions
Method: Vector.translate_origin - translates this vector between origin conventions
Syntax:
<Vector>.translate_origin(from: Origin, to: Origin, offset: Vector) -> Vector
Arguments:
from: Origin - source origin such as barycentric or geocentric
to: Origin - target origin such as barycentric or geocentric
offset: Vector - target origin position measured from the source origin
Examples
# Use Vector.translate_origin on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.translate_origin(barycentric, barycentric, vector(1.0, 2.0, 3.0));
Vector.children
method lists child fields and callable members available on this value
Method: Vector.children - lists child fields and callable members available on this value
Syntax:
<Vector>.children() -> List
Examples
# Use Vector.children on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.children();
Vector.fields
method returns an object containing the value's plain fields
Method: Vector.fields - returns an object containing the value's plain fields
Syntax:
<Vector>.fields() -> Object
Examples
# Use Vector.fields on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.fields();
Vector.functions
method lists callable members available on this value
Method: Vector.functions - lists callable members available on this value
Syntax:
<Vector>.functions() -> List
Examples
# Use Vector.functions on a Vector value
let value = vector(1.0, 2.0, 3.0);
print value.functions();
Matrix
type 3x3 matrix compatible with reference vector transforms
Type: Matrix - 3x3 matrix compatible with reference vector transforms
Syntax:
matrix(x0: Number, y0: Number, z0: Number) -> Matrix
matrix(from: Axis, to: Axis, time: Time) -> Matrix
matrix(m00: Number, m10: Number, m20: Number, m01: Number, m11: Number, m21: Number, m02: Number, m12: Number, m22: Number) -> Matrix
Arguments:
x0: Number [optional] - first diagonal value, or first column x for a 9-value matrix
y0: Number [optional] - second diagonal value, or first column y for a 9-value matrix
z0: Number [optional] - third diagonal value, or first column z for a 9-value matrix
from: Axis [optional] - source axis such as icrf, tod, ef, or topographic
to: Axis [optional] - target axis such as icrf, tod, ef, or topographic
time: Time [optional] - time for the axis transform
m00: Number [optional] - row 0 column 0
m10: Number [optional] - row 1 column 0
m20: Number [optional] - row 2 column 0
m01: Number [optional] - row 0 column 1
m11: Number [optional] - row 1 column 1
m21: Number [optional] - row 2 column 1
m02: Number [optional] - row 0 column 2
m12: Number [optional] - row 1 column 2
m22: Number [optional] - row 2 column 2
Children: m00, m10, m20, m01, m11, m21, m02, m12, m22, kind, transpose(), inverse(), determinant(), normalise(), multiply_transpose(), rotate_axis(), children(), fields(), functions()
Examples
# Rotate an ICRF vector into Earth-fixed coordinates at a time
let t = time(2026,1,1,0,0,0);
let m = matrix(icrf, earthfixed, t);
let v = m * vector(1, 0, 0);
print v.x(), v.y(), v.z();
Matrix.m00
field row 0 column 0
Field: Matrix.m00 - row 0 column 0
Syntax:
<Matrix>.m00 -> Number
Examples
# Read the m00 field from a Matrix value
print matrix(1.0).m00;
Matrix.m10
field row 1 column 0
Field: Matrix.m10 - row 1 column 0
Syntax:
<Matrix>.m10 -> Number
Examples
# Read the m10 field from a Matrix value
print matrix(1.0).m10;
Matrix.m20
field row 2 column 0
Field: Matrix.m20 - row 2 column 0
Syntax:
<Matrix>.m20 -> Number
Examples
# Read the m20 field from a Matrix value
print matrix(1.0).m20;
Matrix.m01
field row 0 column 1
Field: Matrix.m01 - row 0 column 1
Syntax:
<Matrix>.m01 -> Number
Examples
# Read the m01 field from a Matrix value
print matrix(1.0).m01;
Matrix.m11
field row 1 column 1
Field: Matrix.m11 - row 1 column 1
Syntax:
<Matrix>.m11 -> Number
Examples
# Read the m11 field from a Matrix value
print matrix(1.0).m11;
Matrix.m21
field row 2 column 1
Field: Matrix.m21 - row 2 column 1
Syntax:
<Matrix>.m21 -> Number
Examples
# Read the m21 field from a Matrix value
print matrix(1.0).m21;
Matrix.m02
field row 0 column 2
Field: Matrix.m02 - row 0 column 2
Syntax:
<Matrix>.m02 -> Number
Examples
# Read the m02 field from a Matrix value
print matrix(1.0).m02;
Matrix.m12
field row 1 column 2
Field: Matrix.m12 - row 1 column 2
Syntax:
<Matrix>.m12 -> Number
Examples
# Read the m12 field from a Matrix value
print matrix(1.0).m12;
Matrix.m22
field row 2 column 2
Field: Matrix.m22 - row 2 column 2
Syntax:
<Matrix>.m22 -> Number
Examples
# Read the m22 field from a Matrix value
print matrix(1.0).m22;
Matrix.kind
field matrix representation
Field: Matrix.kind - matrix representation
Syntax:
<Matrix>.kind -> Text
Examples
# Read the kind field from a Matrix value
print matrix(1.0).kind;
Matrix.transpose
method returns the transposed matrix
Method: Matrix.transpose - returns the transposed matrix
Syntax:
<Matrix>.transpose() -> Matrix
Examples
# Use Matrix.transpose on a Matrix value
let value = matrix(1.0);
print value.transpose();
Matrix.inverse
method returns the inverse matrix
Method: Matrix.inverse - returns the inverse matrix
Syntax:
<Matrix>.inverse() -> Matrix
Examples
# Use Matrix.inverse on a Matrix value
let value = matrix(1.0);
print value.inverse();
Matrix.determinant
method returns the matrix determinant
Method: Matrix.determinant - returns the matrix determinant
Syntax:
<Matrix>.determinant() -> Number
Examples
# Use Matrix.determinant on a Matrix value
let value = matrix(1.0);
print value.determinant();
Matrix.normalise
method returns the reference determinant-normalised matrix
Method: Matrix.normalise - returns the reference determinant-normalised matrix
Syntax:
<Matrix>.normalise() -> Matrix
Examples
# Use Matrix.normalise on a Matrix value
let value = matrix(1.0);
print value.normalise();
Matrix.multiply_transpose
method returns transpose(matrix) * vector
Method: Matrix.multiply_transpose - returns transpose(matrix) * vector
Syntax:
<Matrix>.multiply_transpose(vector: Vector) -> Vector
Arguments:
vector: Vector - vector to multiply with this matrix transpose
Examples
# Use Matrix.multiply_transpose on a Matrix value
let value = matrix(1.0);
print value.multiply_transpose(vector(1.0, 2.0, 3.0));
Matrix.rotate_axis
method rotates this matrix from one axis convention to another
Method: Matrix.rotate_axis - rotates this matrix from one axis convention to another
Syntax:
<Matrix>.rotate_axis(from: Axis, to: Axis) -> Matrix
Arguments:
from: Axis - source axis such as icrf, tod, ef, or topographic
to: Axis - target axis such as icrf, tod, ef, or topographic
Examples
# Use Matrix.rotate_axis on a Matrix value
let value = matrix(1.0);
print value.rotate_axis(icrf, icrf);
Matrix.children
method lists child fields and callable members available on this value
Method: Matrix.children - lists child fields and callable members available on this value
Syntax:
<Matrix>.children() -> List
Examples
# Use Matrix.children on a Matrix value
let value = matrix(1.0);
print value.children();
Matrix.fields
method returns an object containing the value's plain fields
Method: Matrix.fields - returns an object containing the value's plain fields
Syntax:
<Matrix>.fields() -> Object
Examples
# Use Matrix.fields on a Matrix value
let value = matrix(1.0);
print value.fields();
Matrix.functions
method lists callable members available on this value
Method: Matrix.functions - lists callable members available on this value
Syntax:
<Matrix>.functions() -> List
Examples
# Use Matrix.functions on a Matrix value
let value = matrix(1.0);
print value.functions();
Unit
type named unit used when requesting or displaying numeric values
Type: Unit - named unit used when requesting or displaying numeric values
Syntax:
unit(name: Text) -> Unit
Arguments:
name: Text - unit name such as km, au, deg, or rad
Children: name, dimension, factor_to_base, children(), fields(), functions()
Examples
# Inspect named unit descriptors used by numeric functions
let angle_unit = unit("deg");
let length_unit = unit("km");
print angle_unit.name, angle_unit.dimension, length_unit.factor_to_base;
Unit.name
field canonical unit name
Field: Unit.name - canonical unit name
Syntax:
<Unit>.name -> Text
Examples
# Read the name field from a Unit value
print deg.name;
Unit.dimension
field unit dimension
Field: Unit.dimension - unit dimension
Syntax:
<Unit>.dimension -> Text
Examples
# Read the dimension field from a Unit value
print deg.dimension;
Unit.factor_to_base
field factor to km, rad, or seconds depending on dimension
Field: Unit.factor_to_base - factor to km, rad, or seconds depending on dimension
Syntax:
<Unit>.factor_to_base -> Number
Examples
# Read the factor_to_base field from a Unit value
print deg.factor_to_base;
Unit.children
method lists child fields and callable members available on this value
Method: Unit.children - lists child fields and callable members available on this value
Syntax:
<Unit>.children() -> List
Examples
# Use Unit.children on a Unit value
let value = deg;
print value.children();
Unit.fields
method returns an object containing the value's plain fields
Method: Unit.fields - returns an object containing the value's plain fields
Syntax:
<Unit>.fields() -> Object
Examples
# Use Unit.fields on a Unit value
let value = deg;
print value.fields();
Unit.functions
method lists callable members available on this value
Method: Unit.functions - lists callable members available on this value
Syntax:
<Unit>.functions() -> List
Examples
# Use Unit.functions on a Unit value
let value = deg;
print value.functions();
State
type orbital state backed by ephemeris data with lazy derived fields
Type: State - orbital state backed by ephemeris data with lazy derived fields
Syntax:
state(body: Body, time: Time, location: Location, origin: Origin, axis: Axis, correction: Correction, orbit: Orbit, position: Vector, velocity: Vector, mass: Number, xmu: Number) -> State
state(template: State, body: Body) -> State
Arguments:
body: Body [optional] - solar-system body
time: Time [optional] - time for the state; defaults to current UTC time
location: Location [optional] - optional observer location
origin: Origin [optional] - default origin such as barycentric or geocentric
axis: Axis [optional] - default axis such as icrf, tod, ef, or topographic
correction: Correction [optional] - default correction model
orbit: Orbit [optional] - explicit two-body orbit to resolve into a barycentric ICRF state
position: Vector [optional] - explicit barycentric ICRF position in kilometers
velocity: Vector [optional] - explicit barycentric ICRF velocity in kilometers per day
mass: Number [optional] - override body mass in kg for integrated systems
xmu: Number [optional] - override gravitational parameter in km^3/s^2 for integrated systems
template: State [optional] - existing state whose time/location/defaults are reused
Children: body, time, location, origin, axis, correction, ephemeris, pos_bc_icrf, vel_bc_icrf, pos_gc_icrf, vel_gc_icrf, pos_gc_tod, vel_gc_tod, pos_gc_ef, vel_gc_ef, position(), velocity(), ra(), dec(), geocentric(), topographic(), observer(), orbit_around(), shadow(), limb(), profile(), horizon(), children(), fields(), functions()
Examples
# Read a body state vector and use position and velocity lengths
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, icrf, no_correction);
print st.position().length(), st.velocity().length();
State.body
field solar-system body
Field: State.body - solar-system body
Syntax:
<State>.body -> Body
Examples
# Read the body field from a State value
print state(sun, time()).body;
State.time
field time for the state
Field: State.time - time for the state
Syntax:
<State>.time -> Time
Examples
# Read the time field from a State value
print state(sun, time()).time;
State.location
field optional observer location
Field: State.location - optional observer location
Syntax:
<State>.location -> Location
Examples
# Read the optional location attached to a topographic state
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(sun, time(2026,1,1,0,0,0)).topographic(loc);
print st.location;
State.origin
field default origin used by retrieval methods
Field: State.origin - default origin used by retrieval methods
Syntax:
<State>.origin -> Origin
Examples
# Read the origin field from a State value
print state(sun, time()).origin;
State.axis
field default axis used by retrieval methods
Field: State.axis - default axis used by retrieval methods
Syntax:
<State>.axis -> Axis
Examples
# Read the axis field from a State value
print state(sun, time()).axis;
State.correction
field default correction model used by retrieval methods
Field: State.correction - default correction model used by retrieval methods
Syntax:
<State>.correction -> Correction
Examples
# Read the correction field from a State value
print state(sun, time()).correction;
State.ephemeris
field ephemeris resource path used to create the state
Field: State.ephemeris - ephemeris resource path used to create the state
Syntax:
<State>.ephemeris -> Text
Examples
# Read the ephemeris field from a State value
print state(sun, time()).ephemeris;
State.pos_bc_icrf
field barycentric ICRF position vector
Field: State.pos_bc_icrf - barycentric ICRF position vector
Syntax:
<State>.pos_bc_icrf -> Vector
Examples
# Read the pos_bc_icrf field from a State value
print state(sun, time()).pos_bc_icrf;
State.vel_bc_icrf
field barycentric ICRF velocity vector
Field: State.vel_bc_icrf - barycentric ICRF velocity vector
Syntax:
<State>.vel_bc_icrf -> Vector
Examples
# Read the vel_bc_icrf field from a State value
print state(sun, time()).vel_bc_icrf;
State.pos_gc_icrf
field geocentric ICRF position vector
Field: State.pos_gc_icrf - geocentric ICRF position vector
Syntax:
<State>.pos_gc_icrf -> Vector
Examples
# Read the pos_gc_icrf field from a State value
print state(sun, time()).pos_gc_icrf;
State.vel_gc_icrf
field geocentric ICRF velocity vector
Field: State.vel_gc_icrf - geocentric ICRF velocity vector
Syntax:
<State>.vel_gc_icrf -> Vector
Examples
# Read the vel_gc_icrf field from a State value
print state(sun, time()).vel_gc_icrf;
State.pos_gc_tod
field geocentric true-of-date position vector
Field: State.pos_gc_tod - geocentric true-of-date position vector
Syntax:
<State>.pos_gc_tod -> Vector
Examples
# Read the pos_gc_tod field from a State value
print state(sun, time()).pos_gc_tod;
State.vel_gc_tod
field geocentric true-of-date velocity vector
Field: State.vel_gc_tod - geocentric true-of-date velocity vector
Syntax:
<State>.vel_gc_tod -> Vector
Examples
# Read the vel_gc_tod field from a State value
print state(sun, time()).vel_gc_tod;
State.pos_gc_ef
field geocentric earth-fixed position vector
Field: State.pos_gc_ef - geocentric earth-fixed position vector
Syntax:
<State>.pos_gc_ef -> Vector
Examples
# Read the pos_gc_ef field from a State value
print state(sun, time()).pos_gc_ef;
State.vel_gc_ef
field geocentric earth-fixed velocity vector
Field: State.vel_gc_ef - geocentric earth-fixed velocity vector
Syntax:
<State>.vel_gc_ef -> Vector
Examples
# Read the vel_gc_ef field from a State value
print state(sun, time()).vel_gc_ef;
State.position
method returns the position for this state
Method: State.position - returns the position for this state
Syntax:
<State>.position(location: Location, origin: Origin, axis: Axis, correction: Correction) -> Vector
Arguments:
location: Location [optional] - optional observer location for topocentric/topographic requests
origin: Origin [optional] - optional target origin such as barycentric or geocentric
axis: Axis [optional] - optional target axis such as icrf or earthfixed
correction: Correction [optional] - optional correction override such as no_correction or all_corrections
Examples
# Use State.position on a State value
let value = state(sun, time());
print value.position();
State.velocity
method returns the velocity for this state
Method: State.velocity - returns the velocity for this state
Syntax:
<State>.velocity(location: Location, origin: Origin, axis: Axis, correction: Correction) -> Vector
Arguments:
location: Location [optional] - optional observer location for topocentric/topographic requests
origin: Origin [optional] - optional target origin such as barycentric or geocentric
axis: Axis [optional] - optional target axis such as icrf or earthfixed
correction: Correction [optional] - optional correction override such as no_correction or all_corrections
Examples
# Use State.velocity on a State value
let value = state(sun, time());
print value.velocity();
State.ra
method returns right ascension for this state position; right_ascension is an alias
Method: State.ra - returns right ascension for this state position; right_ascension is an alias
Syntax:
<State>.ra(location: Location, origin: Origin, axis: Axis, correction: Correction, unit: Unit) -> Number
Arguments:
location: Location [optional] - optional observer location for topocentric/topographic requests
origin: Origin [optional] - optional target origin such as barycentric or geocentric
axis: Axis [optional] - optional target axis such as icrf or true-of-date
correction: Correction [optional] - optional correction override such as no_correction or all_corrections
unit: Unit [optional] - optional angle unit; degrees by default
Examples
# Use State.ra on a State value
let value = state(sun, time());
print value.ra();
State.dec
method returns declination for this state position; declination is an alias
Method: State.dec - returns declination for this state position; declination is an alias
Syntax:
<State>.dec(location: Location, origin: Origin, axis: Axis, correction: Correction, unit: Unit) -> Number
Arguments:
location: Location [optional] - optional observer location for topocentric/topographic requests
origin: Origin [optional] - optional target origin such as barycentric or geocentric
axis: Axis [optional] - optional target axis such as icrf or true-of-date
correction: Correction [optional] - optional correction override such as no_correction or all_corrections
unit: Unit [optional] - optional angle unit; degrees by default
Examples
# Use State.dec on a State value
let value = state(sun, time());
print value.dec();
State.geocentric
method converts this state to a geocentric frame
Method: State.geocentric - converts this state to a geocentric frame
Syntax:
<State>.geocentric() -> State
Examples
# Use State.geocentric on a State value
let value = state(sun, time());
print value.geocentric();
State.topographic
method converts this state to an observer-relative topographic frame
Method: State.topographic - converts this state to an observer-relative topographic frame
Syntax:
<State>.topographic(location: Location) -> State
Arguments:
location: Location - observer location
Examples
# Convert a state vector to an explicit location-relative frame
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(sun, time(2026,1,1,0,0,0));
print st.topographic(loc);
State.observer
method creates a body-fixed 3D observer for this state body
Method: State.observer - creates a body-fixed 3D observer for this state body
Syntax:
<State>.observer(position_or_location: Vector|Location, zenith_or_height: Vector|Number) -> Observer
Arguments:
position_or_location: Vector|Location - body-fixed observer position vector, or matching body location
zenith_or_height: Vector|Number [optional] - zenith vector for a position, or height in kilometers for a location
Examples
# Build an observer on the same body as a state
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(earth, time(2026,1,1,0,0,0));
print st.observer(loc).height();
State.orbit_around
method creates an osculating orbit around a central state
Method: State.orbit_around - creates an osculating orbit around a central state
Syntax:
<State>.orbit_around(central: State, axis: Axis) -> Orbit
Arguments:
central: State - central body state at the same epoch
axis: Axis [optional] - non-rotating element axis, icrf by default; tod is also accepted
Examples
# Derive an orbit for one state around another
let t = time(2026,1,1,0,0,0);
let earth_state = state(earth, t, barycentric, icrf, no_correction);
let sun_state = state(sun, t, barycentric, icrf, no_correction);
print earth_state.orbit_around(sun_state).elements().e;
State.shadow
method creates an instantaneous shadow geometry value
Method: State.shadow - creates an instantaneous shadow geometry value
Syntax:
<State>.shadow(blocker: Body) -> Shadow
Arguments:
blocker: Body - body casting the sunlight shadow
Examples
# Compute the Moon shadow on Earth from an Earth state
let earth_state = state(earth, time(2024,4,8,18,40,0));
print earth_state.shadow(moon).available();
State.limb
method computes the apparent limb profile from a body-fixed observer vector
Method: State.limb - computes the apparent limb profile from a body-fixed observer vector
Syntax:
<State>.limb(observer: Vector, north: Vector, samples: Number) -> Array
Arguments:
observer: Vector - body-fixed center-to-observer vector in kilometers
north: Vector [optional] - direction projected as clock-angle zero; defaults to body north
samples: Number [optional] - number of limb samples; defaults to 360
Examples
# Compute a sampled apparent limb profile from an outside observer
let obs = location(latitude: 0, longitude: 0).observer(0.052);
let st = state(moon, time(2026,4,27,8,26,0));
print st.limb(obs, 8).length();
State.profile
method alias for limb()
Method: State.profile - alias for limb()
Syntax:
<State>.profile(observer: Vector, north: Vector, samples: Number) -> Array
Arguments:
observer: Vector - body-fixed center-to-observer vector in kilometers
north: Vector [optional] - direction projected as clock-angle zero; defaults to body north
samples: Number [optional] - number of limb samples; defaults to 360
Examples
# Compute a compact apparent profile from an outside observer
let obs = location(latitude: 0, longitude: 0).observer(0.052);
let st = state(moon, time(2026,4,27,8,26,0));
print st.profile(obs, 8).length();
State.horizon
method returns local topographic horizon altitude for one heading or all azimuths
Method: State.horizon - returns local topographic horizon altitude for one heading or all azimuths
Syntax:
<State>.horizon(observer: Observer|Location, heading: Heading|Vector, samples: Number) -> Object|Array
Arguments:
observer: Observer|Location - Earth observer, or Earth location promoted to zero-height observer
heading: Heading|Vector [optional] - optional compass heading or local topographic vector; omit for a full profile
samples: Number [optional] - number of horizon profile samples; defaults to 360 when heading is omitted
Examples
# Build a small Earth horizon profile for an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(1.5);
let st = state(earth, time(2026,1,1,0,0,0));
print st.horizon(obs, 8).available();
State.children
method lists child fields and callable members available on this value
Method: State.children - lists child fields and callable members available on this value
Syntax:
<State>.children() -> List
Examples
# Use State.children on a State value
let value = state(sun, time());
print value.children();
State.fields
method returns an object containing the value's plain fields
Method: State.fields - returns an object containing the value's plain fields
Syntax:
<State>.fields() -> Object
Examples
# Use State.fields on a State value
let value = state(sun, time());
print value.fields();
State.functions
method lists callable members available on this value
Method: State.functions - lists callable members available on this value
Syntax:
<State>.functions() -> List
Examples
# Use State.functions on a State value
let value = state(sun, time());
print value.functions();
Places
type GeoNames place lookup database handle
Type: Places - GeoNames place lookup database handle
Syntax:
places(name: Text|Number, id: Number, country: Text|Country|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, limit: Number) -> Places
Arguments:
name: Text|Number [optional] - place name or search text used to narrow this places view
id: Number [optional] - GeoNames id used to narrow this places view
country: Text|Country|Place [optional] - country filter for this places view
admin1: Text|Admin1|Admin2|Place [optional] - admin1 filter for this places view
admin2: Text|Admin2|Place [optional] - admin2 filter for this places view
limit: Number [optional] - maximum number of name matches retained by this places view
Children: count, type_count, first(), all(), find(), search(), nearest(), nearby(), index(), types(), children(), fields(), functions()
Examples
# Search the place database and project names and coordinates
let hit = places().find("Stavanger");
print hit.name, hit.latitude, hit.longitude;
Places.count
field number of retained GeoNames place records
Field: Places.count - number of retained GeoNames place records
Syntax:
<Places>.count -> Number
Examples
# Count records in the configured place database
let db = places();
print db.count;
Places.type_count
field number of retained GeoNames feature-code place types
Field: Places.type_count - number of retained GeoNames feature-code place types
Syntax:
<Places>.type_count -> Number
Examples
# Read the type_count field from a Places value
print places().type_count;
Places.first
method returns the first place in this places view
Method: Places.first - returns the first place in this places view
Syntax:
<Places>.first() -> Place|Unavailable
Examples
# Use Places.first on a Places value
let value = places();
print value.first();
Places.all
method lists places from this places view
Method: Places.all - lists places from this places view
Syntax:
<Places>.all(limit: Number) -> List
Arguments:
limit: Number [optional] - maximum number of places to return; defaults to 10
Examples
# Use Places.all on a Places value
let value = places();
print value.all();
Places.find
method finds the most important exact place-name match
Method: Places.find - finds the most important exact place-name match
Syntax:
<Places>.find(name: Text|Number, country: Text|Country|Admin1|Admin2|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, kind: Text, population: Number, importance: Number) -> Place|Unavailable
Arguments:
name: Text|Number - place name or GeoNames id
country: Text|Country|Admin1|Admin2|Place [optional] - ISO-3166 alpha-2 code or country name used to narrow matches
admin1: Text|Admin1|Admin2|Place [optional] - first-level GeoNames admin code used to narrow matches
admin2: Text|Admin2|Place [optional] - second-level GeoNames admin code used to narrow matches
kind: Text [optional] - place kind such as city, town, village, country, or a GeoNames feature code
population: Number [optional] - minimum population used to narrow matches
importance: Number [optional] - minimum place importance used to narrow matches
Examples
# Use Places.find on a Places value
let value = places();
print value.find("value");
Places.search
method lists exact and prefix place-name matches by importance
Method: Places.search - lists exact and prefix place-name matches by importance
Syntax:
<Places>.search(name: Text|Number, country: Text|Country|Admin1|Admin2|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, kind: Text, population: Number, importance: Number, limit: Number) -> List
Arguments:
name: Text|Number - place name or GeoNames id
country: Text|Country|Admin1|Admin2|Place [optional] - ISO-3166 alpha-2 code or country name used to narrow matches
admin1: Text|Admin1|Admin2|Place [optional] - first-level GeoNames admin code used to narrow matches
admin2: Text|Admin2|Place [optional] - second-level GeoNames admin code used to narrow matches
kind: Text [optional] - place kind such as city, town, village, country, or a GeoNames feature code
population: Number [optional] - minimum population used to narrow matches
importance: Number [optional] - minimum place importance used to narrow matches
limit: Number [optional] - maximum number of places to return
Examples
# Use Places.search on a Places value
let value = places();
print value.search("value");
Places.nearest
method finds the closest important place to an Earth location
Method: Places.nearest - finds the closest important place to an Earth location
Syntax:
<Places>.nearest(location: Location, country: Text|Country|Admin1|Admin2|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, kind: Text, population: Number, importance: Number) -> Place|Unavailable
Arguments:
location: Location - Earth location to search around
country: Text|Country|Admin1|Admin2|Place [optional] - ISO-3166 alpha-2 code or country name used to narrow matches
admin1: Text|Admin1|Admin2|Place [optional] - first-level GeoNames admin code used to narrow matches
admin2: Text|Admin2|Place [optional] - second-level GeoNames admin code used to narrow matches
kind: Text [optional] - place kind such as city, town, village, country, or a GeoNames feature code
population: Number [optional] - minimum population used to narrow matches
importance: Number [optional] - minimum place importance used to narrow matches
Examples
# Use Places.nearest on a Places value
let value = places();
print value.nearest(location(latitude: 60.0, longitude: 270.0));
Places.nearby
method lists nearby places ranked by distance and importance
Method: Places.nearby - lists nearby places ranked by distance and importance
Syntax:
<Places>.nearby(location: Location, country: Text|Country|Admin1|Admin2|Place, admin1: Text|Admin1|Admin2|Place, admin2: Text|Admin2|Place, kind: Text, population: Number, importance: Number, limit: Number) -> List
Arguments:
location: Location - Earth location to search around
country: Text|Country|Admin1|Admin2|Place [optional] - ISO-3166 alpha-2 code or country name used to narrow matches
admin1: Text|Admin1|Admin2|Place [optional] - first-level GeoNames admin code used to narrow matches
admin2: Text|Admin2|Place [optional] - second-level GeoNames admin code used to narrow matches
kind: Text [optional] - place kind such as city, town, village, country, or a GeoNames feature code
population: Number [optional] - minimum population used to narrow matches
importance: Number [optional] - minimum place importance used to narrow matches
limit: Number [optional] - maximum number of places to return
Examples
# Use Places.nearby on a Places value
let value = places();
print value.nearby(location(latitude: 60.0, longitude: 270.0));
Places.index
method returns the nth place in this places view by importance
Method: Places.index - returns the nth place in this places view by importance
Syntax:
<Places>.index(index: Number) -> Place|Unavailable
Arguments:
index: Number - 1-based place index in this places view
Examples
# Use Places.index on a Places value
let value = places();
print value.index(42.0);
Places.types
method lists GeoNames feature-code place types
Method: Places.types - lists GeoNames feature-code place types
Syntax:
<Places>.types() -> List
Examples
# Use Places.types on a Places value
let value = places();
print value.types();
Places.children
method lists child fields and callable members available on this value
Method: Places.children - lists child fields and callable members available on this value
Syntax:
<Places>.children() -> List
Examples
# Use Places.children on a Places value
let value = places();
print value.children();
Places.fields
method returns an object containing the value's plain fields
Method: Places.fields - returns an object containing the value's plain fields
Syntax:
<Places>.fields() -> Object
Examples
# Use Places.fields on a Places value
let value = places();
print value.fields();
Places.functions
method lists callable members available on this value
Method: Places.functions - lists callable members available on this value
Syntax:
<Places>.functions() -> List
Examples
# Use Places.functions on a Places value
let value = places();
print value.functions();
Place
type GeoNames place record with location and feature metadata
Type: Place - GeoNames place record with location and feature metadata
Syntax:
place(id: Number) -> Place|Unavailable
place(name: Text, location: Location, timezone: Timezone|Text) -> Place
Arguments:
id: Number [optional] - GeoNames place id
name: Text [optional] - custom place name
location: Location [optional] - Earth location
timezone: Timezone|Text [optional] - timezone; inferred from location when omitted
Children: id, name, ascii_name, names, latitude, longitude, feature_class, feature_code, place_type, country_code, admin1_code, admin2_code, population, elevation_m, dem_m, timezone_id, modified, importance, distance_km, location(), timezone(), country(), admin1(), admin2(), children(), fields(), functions()
Examples
# Resolve a place name and use its location for local noon altitude
let place = places().find("Stavanger");
print place.name, altitude(sun, time(2026,6,21,12,0,0), place.location());
Place.id
field GeoNames integer id
Field: Place.id - GeoNames integer id
Syntax:
<Place>.id -> Number
Examples
# Read the id field from a Place value
print places().find("Oslo").id;
Place.name
field primary GeoNames place name
Field: Place.name - primary GeoNames place name
Syntax:
<Place>.name -> Text
Examples
# Read the name field from a Place value
print places().find("Oslo").name;
Place.ascii_name
field plain-ASCII GeoNames name
Field: Place.ascii_name - plain-ASCII GeoNames name
Syntax:
<Place>.ascii_name -> Text|Nil
Examples
# Read the ascii_name field from a Place value
print places().find("Oslo").ascii_name;
Place.names
field primary, ASCII, and alternate place names
Field: Place.names - primary, ASCII, and alternate place names
Syntax:
<Place>.names -> List
Examples
# Read the names field from a Place value
print places().find("Oslo").names;
Place.latitude
field WGS84 latitude in degrees
Field: Place.latitude - WGS84 latitude in degrees
Syntax:
<Place>.latitude -> Number
Examples
# Read the latitude field from a Place value
print places().find("Oslo").latitude;
Place.longitude
field WGS84 longitude in degrees
Field: Place.longitude - WGS84 longitude in degrees
Syntax:
<Place>.longitude -> Number
Examples
# Read the longitude field from a Place value
print places().find("Oslo").longitude;
Place.feature_class
field GeoNames feature class
Field: Place.feature_class - GeoNames feature class
Syntax:
<Place>.feature_class -> Text
Examples
# Read the feature_class field from a Place value
print places().find("Oslo").feature_class;
Place.feature_code
field GeoNames feature code
Field: Place.feature_code - GeoNames feature code
Syntax:
<Place>.feature_code -> Text
Examples
# Read the feature_code field from a Place value
print places().find("Oslo").feature_code;
Place.place_type
field GeoNames feature-code type metadata
Field: Place.place_type - GeoNames feature-code type metadata
Syntax:
<Place>.place_type -> Object|Nil
Examples
# Read the place_type field from a Place value
print places().find("Oslo").place_type;
Place.country_code
field ISO-3166 alpha-2 country code
Field: Place.country_code - ISO-3166 alpha-2 country code
Syntax:
<Place>.country_code -> Text|Nil
Examples
# Read the country_code field from a Place value
print places().find("Oslo").country_code;
Place.admin1_code
field GeoNames first administrative division code
Field: Place.admin1_code - GeoNames first administrative division code
Syntax:
<Place>.admin1_code -> Text|Nil
Examples
# Read the admin1_code field from a Place value
print places().find("Oslo").admin1_code;
Place.admin2_code
field GeoNames second administrative division code
Field: Place.admin2_code - GeoNames second administrative division code
Syntax:
<Place>.admin2_code -> Text|Nil
Examples
# Read the admin2_code field from a Place value
print places().find("Oslo").admin2_code;
Place.population
field GeoNames population value, or zero when unavailable
Field: Place.population - GeoNames population value, or zero when unavailable
Syntax:
<Place>.population -> Number
Examples
# Read the population field from a Place value
print places().find("Oslo").population;
Place.elevation_m
field GeoNames elevation in meters
Field: Place.elevation_m - GeoNames elevation in meters
Syntax:
<Place>.elevation_m -> Number|Nil
Examples
# Read the elevation_m field from a Place value
print places().find("Oslo").elevation_m;
Place.dem_m
field GeoNames DEM average elevation in meters
Field: Place.dem_m - GeoNames DEM average elevation in meters
Syntax:
<Place>.dem_m -> Number|Nil
Examples
# Read the dem_m field from a Place value
print places().find("Oslo").dem_m;
Place.timezone_id
field IANA timezone id from GeoNames
Field: Place.timezone_id - IANA timezone id from GeoNames
Syntax:
<Place>.timezone_id -> Text|Nil
Examples
# Read the timezone_id field from a Place value
print places().find("Oslo").timezone_id;
Place.modified
field GeoNames modification date
Field: Place.modified - GeoNames modification date
Syntax:
<Place>.modified -> Text|Nil
Examples
# Read the modified field from a Place value
print places().find("Oslo").modified;
Place.importance
field Astrologos-computed importance score from feature type and population
Field: Place.importance - Astrologos-computed importance score from feature type and population
Syntax:
<Place>.importance -> Number
Examples
# Read the importance field from a Place value
print places().find("Oslo").importance;
Place.distance_km
field distance from the query location in kilometers
Field: Place.distance_km - distance from the query location in kilometers
Syntax:
<Place>.distance_km -> Number|Nil
Examples
# Read the distance_km field from a Place value
print places().find("Oslo").distance_km;
Place.location
method returns this place as an Earth latitude/longitude location
Method: Place.location - returns this place as an Earth latitude/longitude location
Syntax:
<Place>.location() -> Location
Examples
# Use Place.location on a Place value
let value = places().find("Oslo");
print value.location();
Place.timezone
method returns this place's IANA timezone as a Timezone object
Method: Place.timezone - returns this place's IANA timezone as a Timezone object
Syntax:
<Place>.timezone() -> Timezone|Nil
Examples
# Use Place.timezone on a Place value
let value = places().find("Oslo");
print value.timezone();
Place.country
method returns this place's country as a Country object
Method: Place.country - returns this place's country as a Country object
Syntax:
<Place>.country() -> Country|Nil
Examples
# Use Place.country on a Place value
let value = places().find("Oslo");
print value.country();
Place.admin1
method returns this place's first-level admin region as an Admin1 object
Method: Place.admin1 - returns this place's first-level admin region as an Admin1 object
Syntax:
<Place>.admin1() -> Admin1|Nil
Examples
# Use Place.admin1 on a Place value
let value = places().find("Oslo");
print value.admin1();
Place.admin2
method returns this place's second-level admin region as an Admin2 object
Method: Place.admin2 - returns this place's second-level admin region as an Admin2 object
Syntax:
<Place>.admin2() -> Admin2|Nil
Examples
# Use Place.admin2 on a Place value
let value = places().find("Oslo");
print value.admin2();
Place.children
method lists child fields and callable members available on this value
Method: Place.children - lists child fields and callable members available on this value
Syntax:
<Place>.children() -> List
Examples
# Use Place.children on a Place value
let value = places().find("Oslo");
print value.children();
Place.fields
method returns an object containing the value's plain fields
Method: Place.fields - returns an object containing the value's plain fields
Syntax:
<Place>.fields() -> Object
Examples
# Use Place.fields on a Place value
let value = places().find("Oslo");
print value.fields();
Place.functions
method lists callable members available on this value
Method: Place.functions - lists callable members available on this value
Syntax:
<Place>.functions() -> List
Examples
# Use Place.functions on a Place value
let value = places().find("Oslo");
print value.functions();
Country
type ISO country used to inspect and filter places
Type: Country - ISO country used to inspect and filter places
Syntax:
country(country: Text|Place|Country) -> Country
Arguments:
country: Text|Place|Country - country name, ISO alpha-2 code, Place, or Country
Children: code, name, place_id, children(), fields(), functions()
Examples
# Resolve a country code before narrowing a place search
let no = country("NO");
let hits = places(no).find("Oslo");
print no.name, hits.name;
Country.code
field ISO-3166 alpha-2 country code
Field: Country.code - ISO-3166 alpha-2 country code
Syntax:
<Country>.code -> Text
Examples
# Read the code field from a Country value
print country("Norway").code;
Country.name
field resolved country name when available from the places store
Field: Country.name - resolved country name when available from the places store
Syntax:
<Country>.name -> Text|Nil
Examples
# Read the name field from a Country value
print country("Norway").name;
Country.place_id
field GeoNames id of the country record when available
Field: Country.place_id - GeoNames id of the country record when available
Syntax:
<Country>.place_id -> Number|Nil
Examples
# Read the place_id field from a Country value
print country("Norway").place_id;
Country.children
method lists child fields and callable members available on this value
Method: Country.children - lists child fields and callable members available on this value
Syntax:
<Country>.children() -> List
Examples
# Use Country.children on a Country value
let value = country("Norway");
print value.children();
Country.fields
method returns an object containing the value's plain fields
Method: Country.fields - returns an object containing the value's plain fields
Syntax:
<Country>.fields() -> Object
Examples
# Use Country.fields on a Country value
let value = country("Norway");
print value.fields();
Country.functions
method lists callable members available on this value
Method: Country.functions - lists callable members available on this value
Syntax:
<Country>.functions() -> List
Examples
# Use Country.functions on a Country value
let value = country("Norway");
print value.functions();
Admin1
type first-level GeoNames administrative region used to filter places
Type: Admin1 - first-level GeoNames administrative region used to filter places
Syntax:
admin1(admin1: Text|Number|Admin1, country: Text|Country|Place) -> Admin1
Arguments:
admin1: Text|Number|Admin1 - admin1 name or GeoNames admin1 code
country: Text|Country|Place - country containing the admin1 region
Children: country_code, code, name, place_id, children(), fields(), functions()
Examples
# Filter Norwegian places by first-level administrative region
let region = admin1("Rogaland", country("NO"));
let hits = places(region).find("Stavanger");
print region.name, hits.name;
Admin1.country_code
field ISO-3166 alpha-2 country code
Field: Admin1.country_code - ISO-3166 alpha-2 country code
Syntax:
<Admin1>.country_code -> Text
Examples
# Read the country_code field from a Admin1 value
print admin1("Akershus", country("NO")).country_code;
Admin1.code
field GeoNames admin1 code
Field: Admin1.code - GeoNames admin1 code
Syntax:
<Admin1>.code -> Text
Examples
# Read the code field from a Admin1 value
print admin1("Akershus", country("NO")).code;
Admin1.name
field resolved admin1 name
Field: Admin1.name - resolved admin1 name
Syntax:
<Admin1>.name -> Text|Nil
Examples
# Read the name field from a Admin1 value
print admin1("Akershus", country("NO")).name;
Admin1.place_id
field GeoNames id of the admin1 record
Field: Admin1.place_id - GeoNames id of the admin1 record
Syntax:
<Admin1>.place_id -> Number|Nil
Examples
# Read the place_id field from a Admin1 value
print admin1("Akershus", country("NO")).place_id;
Admin1.children
method lists child fields and callable members available on this value
Method: Admin1.children - lists child fields and callable members available on this value
Syntax:
<Admin1>.children() -> List
Examples
# Use Admin1.children on a Admin1 value
let value = admin1("Akershus", country("NO"));
print value.children();
Admin1.fields
method returns an object containing the value's plain fields
Method: Admin1.fields - returns an object containing the value's plain fields
Syntax:
<Admin1>.fields() -> Object
Examples
# Use Admin1.fields on a Admin1 value
let value = admin1("Akershus", country("NO"));
print value.fields();
Admin1.functions
method lists callable members available on this value
Method: Admin1.functions - lists callable members available on this value
Syntax:
<Admin1>.functions() -> List
Examples
# Use Admin1.functions on a Admin1 value
let value = admin1("Akershus", country("NO"));
print value.functions();
Admin2
type second-level GeoNames administrative region used to filter places
Type: Admin2 - second-level GeoNames administrative region used to filter places
Syntax:
admin2(admin2: Text|Number|Admin2, admin1: Admin1|Place) -> Admin2
Arguments:
admin2: Text|Number|Admin2 - admin2 name or GeoNames admin2 code
admin1: Admin1|Place - admin1 region containing the admin2 region
Children: country_code, admin1_code, code, name, place_id, children(), fields(), functions()
Examples
# Filter places through a second-level administrative area
let county = admin1("Rogaland", country("NO"));
let area = admin2("Stavanger", county);
let hits = places(area).find("Stavanger");
print area.name, hits.name;
Admin2.country_code
field ISO-3166 alpha-2 country code
Field: Admin2.country_code - ISO-3166 alpha-2 country code
Syntax:
<Admin2>.country_code -> Text
Examples
# Read the country_code field from a Admin2 value
print admin2("3201", admin1("01", norway)).country_code;
Admin2.admin1_code
field GeoNames admin1 code
Field: Admin2.admin1_code - GeoNames admin1 code
Syntax:
<Admin2>.admin1_code -> Text
Examples
# Read the admin1_code field from a Admin2 value
print admin2("3201", admin1("01", norway)).admin1_code;
Admin2.code
field GeoNames admin2 code
Field: Admin2.code - GeoNames admin2 code
Syntax:
<Admin2>.code -> Text
Examples
# Read the code field from a Admin2 value
print admin2("3201", admin1("01", norway)).code;
Admin2.name
field resolved admin2 name
Field: Admin2.name - resolved admin2 name
Syntax:
<Admin2>.name -> Text|Nil
Examples
# Read the name field from a Admin2 value
print admin2("3201", admin1("01", norway)).name;
Admin2.place_id
field GeoNames id of the admin2 record
Field: Admin2.place_id - GeoNames id of the admin2 record
Syntax:
<Admin2>.place_id -> Number|Nil
Examples
# Read the place_id field from a Admin2 value
print admin2("3201", admin1("01", norway)).place_id;
Admin2.children
method lists child fields and callable members available on this value
Method: Admin2.children - lists child fields and callable members available on this value
Syntax:
<Admin2>.children() -> List
Examples
# Use Admin2.children on a Admin2 value
let value = admin2("3201", admin1("01", norway));
print value.children();
Admin2.fields
method returns an object containing the value's plain fields
Method: Admin2.fields - returns an object containing the value's plain fields
Syntax:
<Admin2>.fields() -> Object
Examples
# Use Admin2.fields on a Admin2 value
let value = admin2("3201", admin1("01", norway));
print value.fields();
Admin2.functions
method lists callable members available on this value
Method: Admin2.functions - lists callable members available on this value
Syntax:
<Admin2>.functions() -> List
Examples
# Use Admin2.functions on a Admin2 value
let value = admin2("3201", admin1("01", norway));
print value.functions();
Timezones
type IANA timezone lookup database handle
Type: Timezones - IANA timezone lookup database handle
Syntax:
timezones() -> Timezones
Children: count, release, find(), at(), ids(), validate_places(), children(), fields(), functions()
Examples
# Search timezone names and print the matched zone
let zone = timezones().find("Europe/Oslo");
print zone.name;
Timezones.count
field number of timezone records
Field: Timezones.count - number of timezone records
Syntax:
<Timezones>.count -> Number
Examples
# Count records in the timezone database
let db = timezones();
print db.count;
Timezones.release
field IANA/timezone-boundary release identifier
Field: Timezones.release - IANA/timezone-boundary release identifier
Syntax:
<Timezones>.release -> Text|Nil
Examples
# Read the release field from a Timezones value
print timezones().release;
Timezones.find
method finds a timezone by IANA id
Method: Timezones.find - finds a timezone by IANA id
Syntax:
<Timezones>.find(name: Text) -> Timezone|Unavailable
Arguments:
name: Text - IANA timezone id
Examples
# Use Timezones.find on a Timezones value
let value = timezones();
print value.find("value");
Timezones.at
method finds the timezone containing an Earth location
Method: Timezones.at - finds the timezone containing an Earth location
Syntax:
<Timezones>.at(location: Location) -> Timezone|Unavailable
Arguments:
location: Location - Earth location to look up
Examples
# Use Timezones.at on a Timezones value
let value = timezones();
print value.at(location(latitude: 60.0, longitude: 270.0));
Timezones.ids
method lists timezone ids in the database
Method: Timezones.ids - lists timezone ids in the database
Syntax:
<Timezones>.ids() -> List
Examples
# Use Timezones.ids on a Timezones value
let value = timezones();
print value.ids();
Timezones.validate_places
method checks that place timezone ids resolve in this timezone database
Method: Timezones.validate_places - checks that place timezone ids resolve in this timezone database
Syntax:
<Timezones>.validate_places(places: Places) -> Object
Arguments:
places: Places - places database to validate
Examples
# Prepare timezone and place databases for validation
let zones = timezones();
let subset = places(country("VA"));
print zones.find("Europe/Oslo").id, subset.count;
Timezones.children
method lists child fields and callable members available on this value
Method: Timezones.children - lists child fields and callable members available on this value
Syntax:
<Timezones>.children() -> List
Examples
# Use Timezones.children on a Timezones value
let value = timezones();
print value.children();
Timezones.fields
method returns an object containing the value's plain fields
Method: Timezones.fields - returns an object containing the value's plain fields
Syntax:
<Timezones>.fields() -> Object
Examples
# Use Timezones.fields on a Timezones value
let value = timezones();
print value.fields();
Timezones.functions
method lists callable members available on this value
Method: Timezones.functions - lists callable members available on this value
Syntax:
<Timezones>.functions() -> List
Examples
# Use Timezones.functions on a Timezones value
let value = timezones();
print value.functions();
Timezone
type IANA timezone with optional boundary and representative-location metadata
Type: Timezone - IANA timezone with optional boundary and representative-location metadata
Syntax:
timezone(timezone: Text|Location|Timezone) -> Timezone
Arguments:
timezone: Text|Location|Timezone - IANA timezone id, Location, or existing Timezone
Children: id, aliases, countries, comment, latitude, longitude, release, local(), offset(), location(), children(), fields(), functions()
Examples
# Resolve the timezone for a location and format a local time
let zone = timezone(location(58.9666667, 5.7333333));
let local = time(2026,6,21,12,0,0).local(zone);
print zone.name, local.iso;
Timezone.id
field IANA timezone identifier
Field: Timezone.id - IANA timezone identifier
Syntax:
<Timezone>.id -> Text
Examples
# Read the id field from a Timezone value
print timezone("Europe/Oslo").id;
Timezone.aliases
field IANA Link names that resolve to this timezone
Field: Timezone.aliases - IANA Link names that resolve to this timezone
Syntax:
<Timezone>.aliases -> List
Examples
# Read the aliases field from a Timezone value
print timezone("Europe/Oslo").aliases;
Timezone.countries
field ISO country codes listed for this timezone
Field: Timezone.countries - ISO country codes listed for this timezone
Syntax:
<Timezone>.countries -> List
Examples
# Read the countries field from a Timezone value
print timezone("Europe/Oslo").countries;
Timezone.latitude
field representative latitude from IANA zone table
Field: Timezone.latitude - representative latitude from IANA zone table
Syntax:
<Timezone>.latitude -> Number|Nil
Examples
# Check whether a timezone record has representative latitude metadata
let zone = timezone("Europe/Oslo");
print zone.id, zone.latitude.available();
Timezone.longitude
field representative longitude from IANA zone table
Field: Timezone.longitude - representative longitude from IANA zone table
Syntax:
<Timezone>.longitude -> Number|Nil
Examples
# Check whether a timezone record has representative longitude metadata
let zone = timezone("Europe/Oslo");
print zone.id, zone.longitude.available();
Timezone.release
field IANA/timezone-boundary release identifier
Field: Timezone.release - IANA/timezone-boundary release identifier
Syntax:
<Timezone>.release -> Text|Nil
Examples
# Read the release field from a Timezone value
print timezone("Europe/Oslo").release;
Timezone.local
method converts a UTC Time into this timezone
Method: Timezone.local - converts a UTC Time into this timezone
Syntax:
<Timezone>.local(time: Time) -> LocalTime
Arguments:
time: Time - UTC time to convert
Examples
# Use Timezone.local on a Timezone value
let value = timezone("Europe/Oslo");
print value.local(time());
Timezone.offset
method returns this timezone's UTC offset at a Time
Method: Timezone.offset - returns this timezone's UTC offset at a Time
Syntax:
<Timezone>.offset(time: Time) -> Object
Arguments:
time: Time - UTC time to convert
Examples
# Use Timezone.offset on a Timezone value
let value = timezone("Europe/Oslo");
print value.offset(time());
Timezone.location
method returns the representative IANA location for this timezone
Method: Timezone.location - returns the representative IANA location for this timezone
Syntax:
<Timezone>.location() -> Location|Nil
Examples
# Check whether a timezone record has a representative location
let zone = timezone("Europe/Oslo");
print zone.id, zone.location().available();
Timezone.children
method lists child fields and callable members available on this value
Method: Timezone.children - lists child fields and callable members available on this value
Syntax:
<Timezone>.children() -> List
Examples
# Use Timezone.children on a Timezone value
let value = timezone("Europe/Oslo");
print value.children();
Timezone.fields
method returns an object containing the value's plain fields
Method: Timezone.fields - returns an object containing the value's plain fields
Syntax:
<Timezone>.fields() -> Object
Examples
# Use Timezone.fields on a Timezone value
let value = timezone("Europe/Oslo");
print value.fields();
Timezone.functions
method lists callable members available on this value
Method: Timezone.functions - lists callable members available on this value
Syntax:
<Timezone>.functions() -> List
Examples
# Use Timezone.functions on a Timezone value
let value = timezone("Europe/Oslo");
print value.functions();
Stars
type Yale Bright Star Catalogue database handle
Type: Stars - Yale Bright Star Catalogue database handle
Syntax:
stars() -> Stars
Children: count, find(), glob(), nearest(), all(), visible(), children(), fields(), functions()
Examples
# Search a star catalog and print bright-star directions
let hits = stars().find("sirius");
print hits.name, hits.ra, hits.dec;
Stars.count
field number of catalog stars
Field: Stars.count - number of catalog stars
Syntax:
<Stars>.count -> Number
Examples
# Read the count field from a Stars value
print stars().count;
Stars.find
method finds a star by common name, catalog id, or designation
Method: Stars.find - finds a star by common name, catalog id, or designation
Syntax:
<Stars>.find() -> Star
Examples
# Find a named bright star
let star = stars().find("Sirius");
print star.name, star.ra, star.dec;
Stars.glob
method lists stars whose names or catalogue identifiers match a glob pattern
Method: Stars.glob - lists stars whose names or catalogue identifiers match a glob pattern
Syntax:
<Stars>.glob() -> List
Examples
# Find stars by a name pattern
let hits = stars().glob("Sir*");
print hits.length(), hits[0].name;
Stars.nearest
method finds the nearest catalog star to a direction or vector
Method: Stars.nearest - finds the nearest catalog star to a direction or vector
Syntax:
<Stars>.nearest() -> Star|Unavailable
Examples
# Find the catalog star nearest to a sky direction
let d = direction(ra: 88.8, dec: 7.4);
let nearest = stars().nearest(d, magnitude: 2.0);
print nearest.name, nearest.separation;
Stars.all
method lists catalog stars with optional filters and sorting
Method: Stars.all - lists catalog stars with optional filters and sorting
Syntax:
<Stars>.all() -> List
Examples
# Use Stars.all on a Stars value
let value = stars();
print value.all();
Stars.visible
method lists stars visible from an observer at a time
Method: Stars.visible - lists stars visible from an observer at a time
Syntax:
<Stars>.visible() -> List
Examples
# List bright stars visible from an explicit observer at a time
let obs = location(60,10).observer(0.002);
let t = time(2026,1,1,21,0,0);
print stars().visible(t, obs, magnitude: 2.0);
Stars.children
method lists child fields and callable members available on this value
Method: Stars.children - lists child fields and callable members available on this value
Syntax:
<Stars>.children() -> List
Examples
# Use Stars.children on a Stars value
let value = stars();
print value.children();
Stars.fields
method returns an object containing the value's plain fields
Method: Stars.fields - returns an object containing the value's plain fields
Syntax:
<Stars>.fields() -> Object
Examples
# Use Stars.fields on a Stars value
let value = stars();
print value.fields();
Stars.functions
method lists callable members available on this value
Method: Stars.functions - lists callable members available on this value
Syntax:
<Stars>.functions() -> List
Examples
# Use Stars.functions on a Stars value
let value = stars();
print value.functions();
Star
type catalog star with identifiers, astrometry, and sky methods
Type: Star - catalog star with identifiers, astrometry, and sky methods
Children: hr, name, designation, names, dm, hd, sao, fk5, var_id, ra, dec, glon, glat, magnitude, spectral_type, pm_ra, pm_dec, parallax, radial_velocity, separation, direction(), altaz(), angular_distance(), rise(), set(), transit(), constellation(), children(), fields(), functions()
Examples
# Find Sirius and measure its separation from the Moon
let sirius = stars().find("sirius");
let t = time(2026,1,1,0,0,0);
let moon_dir = direction(ra(moon, t, all_corrections), dec(moon, t, all_corrections));
print sirius.name, moon_dir.angular_distance(sirius.direction());
Star.hr
field Harvard Revised catalog number
Field: Star.hr - Harvard Revised catalog number
Syntax:
<Star>.hr -> Number
Examples
# Read the hr field from a Star value
print stars().find("sirius").hr;
Star.name
field display name
Field: Star.name - display name
Syntax:
<Star>.name -> Text
Examples
# Read the name field from a Star value
print stars().find("sirius").name;
Star.designation
field Bayer/Flamsteed designation when available
Field: Star.designation - Bayer/Flamsteed designation when available
Syntax:
<Star>.designation -> Text|Nil
Examples
# Read the designation field from a Star value
print stars().find("sirius").designation;
Star.names
field catalog aliases and common names
Field: Star.names - catalog aliases and common names
Syntax:
<Star>.names -> List
Examples
# Read the names field from a Star value
print stars().find("sirius").names;
Star.dm
field Durchmusterung identifier when available
Field: Star.dm - Durchmusterung identifier when available
Syntax:
<Star>.dm -> Text|Nil
Examples
# Read the dm field from a Star value
print stars().find("sirius").dm;
Star.hd
field Henry Draper catalog number when available
Field: Star.hd - Henry Draper catalog number when available
Syntax:
<Star>.hd -> Number|Nil
Examples
# Read the hd field from a Star value
print stars().find("sirius").hd;
Star.sao
field SAO catalog number when available
Field: Star.sao - SAO catalog number when available
Syntax:
<Star>.sao -> Number|Nil
Examples
# Read the sao field from a Star value
print stars().find("sirius").sao;
Star.fk5
field FK5 catalog number when available
Field: Star.fk5 - FK5 catalog number when available
Syntax:
<Star>.fk5 -> Number|Nil
Examples
# Read the fk5 field from a Star value
print stars().find("sirius").fk5;
Star.var_id
field variable star identifier when available
Field: Star.var_id - variable star identifier when available
Syntax:
<Star>.var_id -> Text|Nil
Examples
# Read the var_id field from a Star value
print stars().find("sirius").var_id;
Star.ra
field right ascension in degrees
Field: Star.ra - right ascension in degrees
Syntax:
<Star>.ra -> Number
Examples
# Read the ra field from a Star value
print stars().find("sirius").ra;
Star.dec
field declination in degrees
Field: Star.dec - declination in degrees
Syntax:
<Star>.dec -> Number
Examples
# Read the dec field from a Star value
print stars().find("sirius").dec;
Star.glon
field galactic longitude in degrees when available
Field: Star.glon - galactic longitude in degrees when available
Syntax:
<Star>.glon -> Number|Nil
Examples
# Read the glon field from a Star value
print stars().find("sirius").glon;
Star.glat
field galactic latitude in degrees when available
Field: Star.glat - galactic latitude in degrees when available
Syntax:
<Star>.glat -> Number|Nil
Examples
# Read the glat field from a Star value
print stars().find("sirius").glat;
Star.magnitude
field visual magnitude when available
Field: Star.magnitude - visual magnitude when available
Syntax:
<Star>.magnitude -> Number|Nil
Examples
# Read the magnitude field from a Star value
print stars().find("sirius").magnitude;
Star.spectral_type
field spectral type when available
Field: Star.spectral_type - spectral type when available
Syntax:
<Star>.spectral_type -> Text|Nil
Examples
# Read the spectral_type field from a Star value
print stars().find("sirius").spectral_type;
Star.pm_ra
field right ascension proper motion in arcseconds per year
Field: Star.pm_ra - right ascension proper motion in arcseconds per year
Syntax:
<Star>.pm_ra -> Number|Nil
Examples
# Read the pm_ra field from a Star value
print stars().find("sirius").pm_ra;
Star.pm_dec
field declination proper motion in arcseconds per year
Field: Star.pm_dec - declination proper motion in arcseconds per year
Syntax:
<Star>.pm_dec -> Number|Nil
Examples
# Read the pm_dec field from a Star value
print stars().find("sirius").pm_dec;
Star.parallax
field parallax in arcseconds when available
Field: Star.parallax - parallax in arcseconds when available
Syntax:
<Star>.parallax -> Number|Nil
Examples
# Read the parallax field from a Star value
print stars().find("sirius").parallax;
Star.radial_velocity
field radial velocity in kilometers per second when available
Field: Star.radial_velocity - radial velocity in kilometers per second when available
Syntax:
<Star>.radial_velocity -> Number|Nil
Examples
# Read the radial_velocity field from a Star value
print stars().find("sirius").radial_velocity;
Star.separation
field angular separation in degrees from the latest nearest-star query
Field: Star.separation - angular separation in degrees from the latest nearest-star query
Syntax:
<Star>.separation -> Number|Nil
Examples
# Read the separation field from a Star value
print stars().find("sirius").separation;
Star.direction
method returns the ICRF direction to this star
Method: Star.direction - returns the ICRF direction to this star
Syntax:
<Star>.direction() -> Direction
Examples
# Use Star.direction on a Star value
let value = stars().find("sirius");
print value.direction();
Star.altaz
method returns topographic altitude and azimuth for this star
Method: Star.altaz - returns topographic altitude and azimuth for this star
Syntax:
<Star>.altaz() -> Object
Examples
# Convert a star position to local altitude and azimuth
let value = stars().find("Sirius");
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
print value.altaz(time(2026,1,1,21,0,0), obs);
Star.angular_distance
method returns angular distance from this star to another target
Method: Star.angular_distance - returns angular distance from this star to another target
Syntax:
<Star>.angular_distance() -> Number
Examples
# Measure angular separation between two named stars
let sirius = stars().find("Sirius");
let rigel = stars().find("Rigel");
print sirius.angular_distance(rigel);
Star.rise
method finds rise events for this star
Method: Star.rise - finds rise events for this star
Syntax:
<Star>.rise() -> Event|List|Unavailable
Examples
# Find when a star rises for an observer
let value = stars().find("Sirius");
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print value.rise(span, obs).first();
Star.set
method finds set events for this star
Method: Star.set - finds set events for this star
Syntax:
<Star>.set() -> Event|List|Unavailable
Examples
# Find when a star sets for an observer
let value = stars().find("Sirius");
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print value.set(span, obs).first();
Star.transit
method finds meridian transit events for this star
Method: Star.transit - finds meridian transit events for this star
Syntax:
<Star>.transit() -> Event|List|Unavailable
Examples
# Find when a star transits for an observer
let value = stars().find("Sirius");
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print value.transit(span, obs).first();
Star.constellation
method returns the constellation containing this star
Method: Star.constellation - returns the constellation containing this star
Syntax:
<Star>.constellation() -> Constellation|Unavailable
Examples
# Use Star.constellation on a Star value
let value = stars().find("sirius");
print value.constellation();
Star.children
method lists child fields and callable members available on this value
Method: Star.children - lists child fields and callable members available on this value
Syntax:
<Star>.children() -> List
Examples
# Use Star.children on a Star value
let value = stars().find("sirius");
print value.children();
Star.fields
method returns an object containing the value's plain fields
Method: Star.fields - returns an object containing the value's plain fields
Syntax:
<Star>.fields() -> Object
Examples
# Use Star.fields on a Star value
let value = stars().find("sirius");
print value.fields();
Star.functions
method lists callable members available on this value
Method: Star.functions - lists callable members available on this value
Syntax:
<Star>.functions() -> List
Examples
# Use Star.functions on a Star value
let value = stars().find("sirius");
print value.functions();
ConstellationDb
type IAU constellation boundary database handle
Type: ConstellationDb - IAU constellation boundary database handle
Syntax:
constellations() -> ConstellationDb
Children: count, find(), inside(), children(), fields(), functions()
Examples
# Load constellation boundaries and classify a sky direction
let db = constellations();
let dir = direction(ra: 84.0, dec: -1.0);
print db.inside(dir).name;
ConstellationDb.count
field number of boundary records
Field: ConstellationDb.count - number of boundary records
Syntax:
<ConstellationDb>.count -> Number
Examples
# Read the count field from a ConstellationDb value
print constellations().count;
ConstellationDb.find
method finds a constellation by name or abbreviation
Method: ConstellationDb.find - finds a constellation by name or abbreviation
Syntax:
<ConstellationDb>.find() -> Constellation|Unavailable
Examples
# Find a constellation by name
let hit = constellations().find("Orion");
print hit.name, hit.abbreviation;
ConstellationDb.inside
method finds the constellation containing a direction
Method: ConstellationDb.inside - finds the constellation containing a direction
Syntax:
<ConstellationDb>.inside() -> Constellation|Unavailable
Examples
# Classify a sky direction by IAU constellation
let dir = direction(ra: 84.0, dec: -1.0);
print constellations().inside(dir).name;
ConstellationDb.children
method lists child fields and callable members available on this value
Method: ConstellationDb.children - lists child fields and callable members available on this value
Syntax:
<ConstellationDb>.children() -> List
Examples
# Use ConstellationDb.children on a ConstellationDb value
let value = constellations();
print value.children();
ConstellationDb.fields
method returns an object containing the value's plain fields
Method: ConstellationDb.fields - returns an object containing the value's plain fields
Syntax:
<ConstellationDb>.fields() -> Object
Examples
# Use ConstellationDb.fields on a ConstellationDb value
let value = constellations();
print value.fields();
ConstellationDb.functions
method lists callable members available on this value
Method: ConstellationDb.functions - lists callable members available on this value
Syntax:
<ConstellationDb>.functions() -> List
Examples
# Use ConstellationDb.functions on a ConstellationDb value
let value = constellations();
print value.functions();
Constellation
type IAU constellation boundary record
Type: Constellation - IAU constellation boundary record
Children: id, abbreviation, name, direction(), children(), fields(), functions()
Examples
# Find a named constellation and print its area summary
let c = constellations().find("orion");
print c.name, c.abbreviation;
Constellation.id
field constellation identifier
Field: Constellation.id - constellation identifier
Syntax:
<Constellation>.id -> Text
Examples
# Read the id field from a Constellation value
print constellations().find("orion").id;
Constellation.abbreviation
field IAU abbreviation
Field: Constellation.abbreviation - IAU abbreviation
Syntax:
<Constellation>.abbreviation -> Text
Examples
# Read the abbreviation field from a Constellation value
print constellations().find("orion").abbreviation;
Constellation.name
field constellation name
Field: Constellation.name - constellation name
Syntax:
<Constellation>.name -> Text
Examples
# Read the name field from a Constellation value
print constellations().find("orion").name;
Constellation.direction
method returns the center direction of this constellation
Method: Constellation.direction - returns the center direction of this constellation
Syntax:
<Constellation>.direction() -> Direction
Examples
# Use Constellation.direction on a Constellation value
let value = constellations().find("orion");
print value.direction();
Constellation.children
method lists child fields and callable members available on this value
Method: Constellation.children - lists child fields and callable members available on this value
Syntax:
<Constellation>.children() -> List
Examples
# Use Constellation.children on a Constellation value
let value = constellations().find("orion");
print value.children();
Constellation.fields
method returns an object containing the value's plain fields
Method: Constellation.fields - returns an object containing the value's plain fields
Syntax:
<Constellation>.fields() -> Object
Examples
# Use Constellation.fields on a Constellation value
let value = constellations().find("orion");
print value.fields();
Constellation.functions
method lists callable members available on this value
Method: Constellation.functions - lists callable members available on this value
Syntax:
<Constellation>.functions() -> List
Examples
# Use Constellation.functions on a Constellation value
let value = constellations().find("orion");
print value.functions();
Event
type astronomical event result
Type: Event - astronomical event result
Children: type, time, value, body, location, observer, start, end, maximum, magnitude, obscuration, kind, shadow(), children(), fields(), functions()
Examples
# Find a sunrise event and print its local time
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let start = time(2026,6,21,0,0,0);
let event = events(sunrise, range(start, start.add_days(1)), loc).first();
print event.time.local("Europe/Oslo").iso, event.type;
Event.type
field event type constant
Field: Event.type - event type constant
Syntax:
<Event>.type -> EventType
Examples
# Read the type field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().type;
Event.time
field event search time
Field: Event.time - event search time
Syntax:
<Event>.time -> Time
Examples
# Read the time field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().time;
Event.value
field event scalar value
Field: Event.value - event scalar value
Syntax:
<Event>.value -> Number
Examples
# Read the value field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().value;
Event.body
field associated body when available
Field: Event.body - associated body when available
Syntax:
<Event>.body -> Body|Nil
Examples
# Read the body field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().body;
Event.location
field associated location when available
Field: Event.location - associated location when available
Syntax:
<Event>.location -> Location|Nil
Examples
# Read the location field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().location;
Event.observer
field associated observer when available
Field: Event.observer - associated observer when available
Syntax:
<Event>.observer -> Observer|Nil
Examples
# Read the observer returned with a sunrise event
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
let event = events(sunrise, span, obs).first();
print event.observer;
Event.start
field event start time when available
Field: Event.start - event start time when available
Syntax:
<Event>.start -> Time|Nil
Examples
# Read the start field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().start;
Event.end
field event end time when available
Field: Event.end - event end time when available
Syntax:
<Event>.end -> Time|Nil
Examples
# Read the end field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().end;
Event.maximum
field event maximum time when available, otherwise event time
Field: Event.maximum - event maximum time when available, otherwise event time
Syntax:
<Event>.maximum -> Time
Examples
# Read the maximum field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().maximum;
Event.magnitude
field event magnitude when available
Field: Event.magnitude - event magnitude when available
Syntax:
<Event>.magnitude -> Number|Nil
Examples
# Read the magnitude field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().magnitude;
Event.obscuration
field event obscuration when available
Field: Event.obscuration - event obscuration when available
Syntax:
<Event>.obscuration -> Number|Nil
Examples
# Read the obscuration field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().obscuration;
Event.kind
field event subtype label
Field: Event.kind - event subtype label
Syntax:
<Event>.kind -> Text
Examples
# Read the kind field from a Event value
print events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first().kind;
Event.shadow
method returns the solar-eclipse shadow geometry for this event
Method: Event.shadow - returns the solar-eclipse shadow geometry for this event
Syntax:
<Event>.shadow(time: Time) -> Shadow
Arguments:
time: Time [optional] - optional sampling time; defaults to event maximum or event time
Examples
# Compute the shadow associated with a solar-eclipse event
let span = range(time(2024,4,8,12,0,0), time(2024,4,9,0,0,0), 0.25);
let event = events(eclipse, span, sun).first();
print event.shadow().distance();
Event.children
method lists child fields and callable members available on this value
Method: Event.children - lists child fields and callable members available on this value
Syntax:
<Event>.children() -> List
Examples
# Use Event.children on a Event value
let value = events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first();
print value.children();
Event.fields
method returns an object containing the value's plain fields
Method: Event.fields - returns an object containing the value's plain fields
Syntax:
<Event>.fields() -> Object
Examples
# Use Event.fields on a Event value
let value = events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first();
print value.fields();
Event.functions
method lists callable members available on this value
Method: Event.functions - lists callable members available on this value
Syntax:
<Event>.functions() -> List
Examples
# Use Event.functions on a Event value
let value = events(sunrise, range(time(), time().add_days(1)), location(latitude: 60.0, longitude: 270.0)).first();
print value.functions();
Graphics
type deferred SVG graphics drawing context
Type: Graphics - deferred SVG graphics drawing context
Syntax:
graphics(time: Time, location: Location|Observer, center: Direction, theme: Text, center_az: Number, center_alt: Number, fov: Number) -> Graphics
Arguments:
time: Time [optional] - default sky-view time
location: Location|Observer [optional] - default sky-view observer
center: Direction [optional] - default sky-view center direction
theme: Text [optional] - graphics theme, either dark or light
center_az: Number [optional] - default sky-view center azimuth in degrees
center_alt: Number [optional] - default sky-view center altitude in degrees
fov: Number [optional] - default sky-view field of view in degrees
Children: line(), points(), polygon(), text(), function(), title(), xlabel(), ylabel(), xrange(), yrange(), xticks(), yticks(), dark(), light(), sky_view(), sky_grid(), sky_stars(), sky_constellations(), sky_planets(), sky_horizon(), svg(), write_svg(), children(), fields(), functions()
Examples
# Write a Sun-altitude SVG chart and report the output path
let loc = location(60,10);
let obs = loc.observer(0.002);
let t0 = time(2026,6,21,0,0,0);
let g = graphics().function((h): altitude(sun, t0.add_hours(h), obs), range(0,24,1)).title("Sun altitude");
g.write_svg("sun-altitude.svg");
print "wrote sun-altitude.svg";
Graphics.line
method adds a line layer
Method: Graphics.line - adds a line layer
Syntax:
<Graphics>.line() -> Graphics
Examples
# Draw a simple line chart
let g = graphics().line([0, 1, 2], [1, 3, 2]);
g.write_svg("line.svg");
print "wrote line.svg";
Graphics.points
method adds a point layer
Method: Graphics.points - adds a point layer
Syntax:
<Graphics>.points() -> Graphics
Examples
# Draw point markers on a simple chart
let g = graphics().points([0, 1, 2], [1, 3, 2]);
g.write_svg("points.svg");
print "wrote points.svg";
Graphics.polygon
method adds a polygon layer
Method: Graphics.polygon - adds a polygon layer
Syntax:
<Graphics>.polygon() -> Graphics
Examples
# Draw a filled polygon on a chart
let g = graphics().polygon([0, 1, 2], [0, 2, 0]);
g.write_svg("polygon.svg");
print "wrote polygon.svg";
Graphics.text
method adds a text label layer
Method: Graphics.text - adds a text label layer
Syntax:
<Graphics>.text() -> Graphics
Examples
# Add a text label to a chart
let g = graphics().line([0, 1], [0, 1]).text(0.5, 0.5, "mid");
g.write_svg("text.svg");
print "wrote text.svg";
Graphics.function
method samples a numeric function as a line layer
Method: Graphics.function - samples a numeric function as a line layer
Syntax:
<Graphics>.function() -> Graphics
Examples
# Sample a Sun-altitude function as a chart line
let loc = location(60,10).observer(0.002);
let t0 = time(2026,6,21,0,0,0);
let g = graphics().function((h): altitude(sun, t0.add_hours(h), loc), range(0,24,1));
g.write_svg("sun-altitude.svg");
print "wrote sun-altitude.svg";
Graphics.title
method sets the plot title
Method: Graphics.title - sets the plot title
Syntax:
<Graphics>.title() -> Graphics
Examples
# Add a title to a chart
let g = graphics().line([0, 1], [0, 1]).title("Trend");
g.write_svg("title.svg");
print "wrote title.svg";
Graphics.xlabel
method sets the x-axis label
Method: Graphics.xlabel - sets the x-axis label
Syntax:
<Graphics>.xlabel() -> Graphics
Examples
# Add an x-axis label to a chart
let g = graphics().line([0, 1], [0, 1]).xlabel("x");
g.write_svg("xlabel.svg");
print "wrote xlabel.svg";
Graphics.ylabel
method sets the y-axis label
Method: Graphics.ylabel - sets the y-axis label
Syntax:
<Graphics>.ylabel() -> Graphics
Examples
# Add a y-axis label to a chart
let g = graphics().line([0, 1], [0, 1]).ylabel("y");
g.write_svg("ylabel.svg");
print "wrote ylabel.svg";
Graphics.xrange
method gets or sets the x-axis range
Method: Graphics.xrange - gets or sets the x-axis range
Syntax:
<Graphics>.xrange() -> Object|Graphics
Examples
# Read the x range after adding data
let g = graphics().line([0, 1, 2], [1, 3, 2]);
print g.xrange();
Graphics.yrange
method gets or sets the y-axis range
Method: Graphics.yrange - gets or sets the y-axis range
Syntax:
<Graphics>.yrange() -> Object|Graphics
Examples
# Read the y range after adding data
let g = graphics().line([0, 1, 2], [1, 3, 2]);
print g.yrange();
Graphics.xticks
method sets explicit x-axis ticks
Method: Graphics.xticks - sets explicit x-axis ticks
Syntax:
<Graphics>.xticks() -> Graphics
Examples
# Set explicit x-axis ticks
let g = graphics().line([0, 1, 2], [1, 3, 2]).xticks([0, 1, 2]);
g.write_svg("xticks.svg");
print "wrote xticks.svg";
Graphics.yticks
method sets explicit y-axis ticks
Method: Graphics.yticks - sets explicit y-axis ticks
Syntax:
<Graphics>.yticks() -> Graphics
Examples
# Set explicit y-axis ticks
let g = graphics().line([0, 1, 2], [1, 3, 2]).yticks([1, 2, 3]);
g.write_svg("yticks.svg");
print "wrote yticks.svg";
Graphics.dark
method switches to the dark graphics theme
Method: Graphics.dark - switches to the dark graphics theme
Syntax:
<Graphics>.dark() -> Graphics
Examples
# Use Graphics.dark on a Graphics value
let value = graphics();
print value.dark();
Graphics.light
method switches to the light graphics theme
Method: Graphics.light - switches to the light graphics theme
Syntax:
<Graphics>.light() -> Graphics
Examples
# Use Graphics.light on a Graphics value
let value = graphics();
print value.light();
Graphics.sky_view
method sets the sky projection view
Method: Graphics.sky_view - sets the sky projection view
Syntax:
<Graphics>.sky_view() -> Graphics
Examples
# Use Graphics.sky_view on a Graphics value
let value = graphics();
print value.sky_view();
Graphics.sky_grid
method adds sky grid lines
Method: Graphics.sky_grid - adds sky grid lines
Syntax:
<Graphics>.sky_grid() -> Graphics
Examples
# Use Graphics.sky_grid on a Graphics value
let value = graphics();
print value.sky_grid();
Graphics.sky_stars
method adds visible star symbols
Method: Graphics.sky_stars - adds visible star symbols
Syntax:
<Graphics>.sky_stars() -> Graphics
Examples
# Add star symbols to a sky chart for a specified time and location
let t = time(2026,1,1,21,0,0);
let loc = location(60,10);
let g = graphics(t, loc).dark().sky_grid().sky_stars(magnitude: 4);
g.write_svg("stars.svg");
print "wrote stars.svg";
Graphics.sky_constellations
method adds constellation lines and labels
Method: Graphics.sky_constellations - adds constellation lines and labels
Syntax:
<Graphics>.sky_constellations() -> Graphics
Examples
# Add constellation lines to a local sky chart
let t = time(2026,1,1,21,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let g = graphics(t, loc).dark().sky_constellations(t);
g.write_svg("sky-constellations.svg");
print "wrote sky-constellations.svg";
Graphics.sky_planets
method adds planet and Moon symbols
Method: Graphics.sky_planets - adds planet and Moon symbols
Syntax:
<Graphics>.sky_planets() -> Graphics
Examples
# Add planets to a local sky chart
let t = time(2026,1,1,21,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let g = graphics(t, loc).dark().sky_planets(t);
g.write_svg("sky-planets.svg");
print "wrote sky-planets.svg";
Graphics.sky_horizon
method adds a local horizon line
Method: Graphics.sky_horizon - adds a local horizon line
Syntax:
<Graphics>.sky_horizon() -> Graphics
Examples
# Add a horizon line to a local sky chart
let loc = location(latitude: 60.0, longitude: 10.0);
let g = graphics(time(2026,1,1,21,0,0), loc).sky_horizon(loc);
g.write_svg("sky-horizon.svg");
print "wrote sky-horizon.svg";
Graphics.svg
method renders the graphics as SVG text
Method: Graphics.svg - renders the graphics as SVG text
Syntax:
<Graphics>.svg() -> Text
Examples
# Use Graphics.svg on a Graphics value
let value = graphics();
print value.svg();
Graphics.write_svg
method writes the graphics as an SVG file
Method: Graphics.write_svg - writes the graphics as an SVG file
Syntax:
<Graphics>.write_svg() -> Text
Examples
# Write a chart to an SVG file
let g = graphics().line([0, 1], [0, 1]);
g.write_svg("chart.svg");
print "wrote chart.svg";
Graphics.children
method lists child fields and callable members available on this value
Method: Graphics.children - lists child fields and callable members available on this value
Syntax:
<Graphics>.children() -> List
Examples
# Use Graphics.children on a Graphics value
let value = graphics();
print value.children();
Graphics.fields
method returns an object containing the value's plain fields
Method: Graphics.fields - returns an object containing the value's plain fields
Syntax:
<Graphics>.fields() -> Object
Examples
# Use Graphics.fields on a Graphics value
let value = graphics();
print value.fields();
Graphics.functions
method lists callable members available on this value
Method: Graphics.functions - lists callable members available on this value
Syntax:
<Graphics>.functions() -> List
Examples
# Use Graphics.functions on a Graphics value
let value = graphics();
print value.functions();
Target
type search target value and crossing direction
Type: Target - search target value and crossing direction
Syntax:
target(value: Number|SearchGoal, direction: SearchDirection) -> Target|SearchGoal
Arguments:
value: Number|SearchGoal - numeric crossing value, minimum, or maximum
direction: SearchDirection [optional] - any, increasing, or decreasing
Children: value, direction, children(), fields(), functions()
Examples
# Build a target goal for an increasing daylight crossing
let loc = location(58.9666667, 5.7333333);
let day = time(2026,6,21,0,0,0);
let sun_height = (h): altitude(sun, day.add_hours(h), loc);
let goal = target(10, increasing);
print search(sun_height, range(0, 24, 0.25), goal).next();
Target.value
field numeric target value
Field: Target.value - numeric target value
Syntax:
<Target>.value -> Number
Examples
# Read the value field from a Target value
print target(2.0).value;
Target.direction
field crossing direction to accept
Field: Target.direction - crossing direction to accept
Syntax:
<Target>.direction -> SearchDirection
Examples
# Read the direction field from a Target value
print target(2.0).direction;
Target.children
method lists child fields and callable members available on this value
Method: Target.children - lists child fields and callable members available on this value
Syntax:
<Target>.children() -> List
Examples
# Use Target.children on a Target value
let value = target(2.0);
print value.children();
Target.fields
method returns an object containing the value's plain fields
Method: Target.fields - returns an object containing the value's plain fields
Syntax:
<Target>.fields() -> Object
Examples
# Use Target.fields on a Target value
let value = target(2.0);
print value.fields();
Target.functions
method lists callable members available on this value
Method: Target.functions - lists callable members available on this value
Syntax:
<Target>.functions() -> List
Examples
# Use Target.functions on a Target value
let value = target(2.0);
print value.functions();
Range
type numeric or time scan range
Type: Range - numeric or time scan range
Syntax:
range(start: Number|Time, stop: Number, step: Number) -> Range
range(start: Number|Time, stop: Number|Time, step: Number) -> Range
Arguments:
start: Number|Time - start of the range
stop: Number - infinity or -infinity
step: Number [optional] - signed sampling step; time ranges use UTC days
Children: kind, bounded, start, stop, step, children(), fields(), functions()
Examples
# Use a range to sample every six hours in a day
let start = time(2026,6,21,0,0,0);
let hours = range(0, 24, 6);
for h=hours.start,hours.stop,hours.step {
print start.add_hours(h).utc();
}
Range.kind
field range domain kind
Field: Range.kind - range domain kind
Syntax:
<Range>.kind -> Text
Examples
# Read the kind field from a Range value
print range(1.0, 3.0).kind;
Range.bounded
field whether this range has a finite stop
Field: Range.bounded - whether this range has a finite stop
Syntax:
<Range>.bounded -> Bool
Examples
# Read the bounded field from a Range value
print range(1.0, 3.0).bounded;
Range.start
field numeric start or UTC Julian date for time ranges
Field: Range.start - numeric start or UTC Julian date for time ranges
Syntax:
<Range>.start -> Number
Examples
# Read the start field from a Range value
print range(1.0, 3.0).start;
Range.stop
field numeric stop or UTC Julian date for bounded time ranges
Field: Range.stop - numeric stop or UTC Julian date for bounded time ranges
Syntax:
<Range>.stop -> Number|Nil
Examples
# Read the stop field from a Range value
print range(1.0, 3.0).stop;
Range.step
field explicit scan step when supplied
Field: Range.step - explicit scan step when supplied
Syntax:
<Range>.step -> Number|Nil
Examples
# Read the step field from a Range value
print range(1.0, 3.0).step;
Range.children
method lists child fields and callable members available on this value
Method: Range.children - lists child fields and callable members available on this value
Syntax:
<Range>.children() -> List
Examples
# Use Range.children on a Range value
let value = range(1.0, 3.0);
print value.children();
Range.fields
method returns an object containing the value's plain fields
Method: Range.fields - returns an object containing the value's plain fields
Syntax:
<Range>.fields() -> Object
Examples
# Use Range.fields on a Range value
let value = range(1.0, 3.0);
print value.fields();
Range.functions
method lists callable members available on this value
Method: Range.functions - lists callable members available on this value
Syntax:
<Range>.functions() -> List
Examples
# Use Range.functions on a Range value
let value = range(1.0, 3.0);
print value.functions();
Search
type configured scalar search value
Type: Search - configured scalar search value
Syntax:
search(function: Callable, range: Range, goal: Target|SearchGoal) -> Search
Arguments:
function: Callable - function of one Number or Time argument returning a Number
range: Range - range(start, stop), range(start, stop, step), or range(start, infinity, step)
goal: Target|SearchGoal [optional] - target value and direction, minimum, or maximum; defaults to target(0, any)
Children: range, target, direction, next(), all(), children(), fields(), functions()
Examples
# Search a numeric curve and inspect the first crossing
let curve = (x): x * x - 9;
let result = search(curve, range(0, 6, 0.25), target(0, increasing));
print result.next();
Search.range
field range scanned by this search
Field: Search.range - range scanned by this search
Syntax:
<Search>.range -> Range
Examples
# Read the range field from a Search value
print search((x): x, range(1.0, 3.0), target(2.0)).range;
Search.target
field target value or extreme goal
Field: Search.target - target value or extreme goal
Syntax:
<Search>.target -> Target|SearchGoal
Examples
# Read the target field from a Search value
print search((x): x, range(1.0, 3.0), target(2.0)).target;
Search.direction
field target crossing direction when this search has a numeric target
Field: Search.direction - target crossing direction when this search has a numeric target
Syntax:
<Search>.direction -> SearchDirection|Nil
Examples
# Read the direction field from a Search value
print search((x): x, range(1.0, 3.0), target(2.0)).direction;
Search.next
method returns the next search solution, or the next count solutions
Method: Search.next - returns the next search solution, or the next count solutions
Syntax:
<Search>.next() -> Any|Nil
<Search>.next(count: Number) -> List
Arguments:
count: Number [optional] - number of solutions to return
Examples
# Use Search.next on a Search value
let value = search((x): x, range(1.0, 3.0), target(2.0));
print value.next();
Search.all
method returns all search solutions in a bounded range
Method: Search.all - returns all search solutions in a bounded range
Syntax:
<Search>.all() -> List
Examples
# Use Search.all on a Search value
let value = search((x): x, range(1.0, 3.0), target(2.0));
print value.all();
Search.children
method lists child fields and callable members available on this value
Method: Search.children - lists child fields and callable members available on this value
Syntax:
<Search>.children() -> List
Examples
# Use Search.children on a Search value
let value = search((x): x, range(1.0, 3.0), target(2.0));
print value.children();
Search.fields
method returns an object containing the value's plain fields
Method: Search.fields - returns an object containing the value's plain fields
Syntax:
<Search>.fields() -> Object
Examples
# Use Search.fields on a Search value
let value = search((x): x, range(1.0, 3.0), target(2.0));
print value.fields();
Search.functions
method lists callable members available on this value
Method: Search.functions - lists callable members available on this value
Syntax:
<Search>.functions() -> List
Examples
# Use Search.functions on a Search value
let value = search((x): x, range(1.0, 3.0), target(2.0));
print value.functions();
Forecast
type published GFS forecast cycle from the retained stack
Type: Forecast - published GFS forecast cycle from the retained stack
Syntax:
forecast(index: Number, format: Text) -> Forecast
Arguments:
index: Number [optional] - forecast cycle stack index; 0 is the latest cycle
format: Text [optional] - optional storage format: "netcdf" (default when available), "grib", or "auto"
Children: source, format, path, reason, index, hour, run, run_name, reference_time, valid_time, message_count, available(), count(), cycle(), cycle_step(), max_time(), spans(), times(), sample(), toc(), messages(), children(), fields(), functions()
Examples
# Open the forecast index and print available product names
let fc = forecast();
print fc.available(), keys(fc.toc());
Forecast.source
field forecast source provider
Field: Forecast.source - forecast source provider
Syntax:
<Forecast>.source -> Text
Examples
# Read the source field from a Forecast value
print forecast().source;
Forecast.format
field storage format used by this forecast
Field: Forecast.format - storage format used by this forecast
Syntax:
<Forecast>.format -> Text
Examples
# Read the format field from a Forecast value
print forecast().format;
Forecast.path
field forecast data path
Field: Forecast.path - forecast data path
Syntax:
<Forecast>.path -> Text
Examples
# Read the path field from a Forecast value
print forecast().path;
Forecast.reason
field unavailable reason when the cycle could not be opened
Field: Forecast.reason - unavailable reason when the cycle could not be opened
Syntax:
<Forecast>.reason -> Text|Nil
Examples
# Read the reason field from a Forecast value
print forecast().reason;
Forecast.index
field forecast cycle stack index
Field: Forecast.index - forecast cycle stack index
Syntax:
<Forecast>.index -> Number
Examples
# Read the index field from a Forecast value
print forecast().index;
Forecast.hour
field forecast lead hour for this opened cycle
Field: Forecast.hour - forecast lead hour for this opened cycle
Syntax:
<Forecast>.hour -> Number
Examples
# Read the hour field from a Forecast value
print forecast().hour;
Forecast.run
field run metadata object
Field: Forecast.run - run metadata object
Syntax:
<Forecast>.run -> Object
Examples
# Read the run field from a Forecast value
print forecast().run;
Forecast.run_name
field human-readable run label
Field: Forecast.run_name - human-readable run label
Syntax:
<Forecast>.run_name -> Text
Examples
# Read the run_name field from a Forecast value
print forecast().run_name;
Forecast.reference_time
field forecast reference time label
Field: Forecast.reference_time - forecast reference time label
Syntax:
<Forecast>.reference_time -> Text
Examples
# Read the reference_time field from a Forecast value
print forecast().reference_time;
Forecast.valid_time
field valid time label for this opened forecast
Field: Forecast.valid_time - valid time label for this opened forecast
Syntax:
<Forecast>.valid_time -> Text
Examples
# Read the valid_time field from a Forecast value
print forecast().valid_time;
Forecast.message_count
field number of forecast messages
Field: Forecast.message_count - number of forecast messages
Syntax:
<Forecast>.message_count -> Number
Examples
# Read the message_count field from a Forecast value
print forecast().message_count;
Forecast.available
method reports whether this forecast cycle is available
Method: Forecast.available - reports whether this forecast cycle is available
Syntax:
<Forecast>.available() -> Bool
Examples
# Use Forecast.available on a Forecast value
let value = forecast();
print value.available();
Forecast.count
method returns the retained forecast cycle count
Method: Forecast.count - returns the retained forecast cycle count
Syntax:
<Forecast>.count() -> Number
Examples
# Use Forecast.count on a Forecast value
let value = forecast();
print value.count();
Forecast.cycle
method returns the forecast cycle reference time
Method: Forecast.cycle - returns the forecast cycle reference time
Syntax:
<Forecast>.cycle() -> Time|Nil
Examples
# Use Forecast.cycle on a Forecast value
let value = forecast();
print value.cycle();
Forecast.cycle_step
method returns the retained cycle spacing in hours
Method: Forecast.cycle_step - returns the retained cycle spacing in hours
Syntax:
<Forecast>.cycle_step() -> Number
Examples
# Use Forecast.cycle_step on a Forecast value
let value = forecast();
print value.cycle_step();
Forecast.max_time
method returns the latest valid forecast time
Method: Forecast.max_time - returns the latest valid forecast time
Syntax:
<Forecast>.max_time() -> Time|Nil
Examples
# Use Forecast.max_time on a Forecast value
let value = forecast();
print value.max_time();
Forecast.spans
method reports whether this forecast spans a time
Method: Forecast.spans - reports whether this forecast spans a time
Syntax:
<Forecast>.spans(time: Time) -> Bool
Arguments:
time: Time - time to test against the forecast span
Examples
# Use Forecast.spans on a Forecast value
let value = forecast();
print value.spans(time());
Forecast.times
method returns all forecast valid times
Method: Forecast.times - returns all forecast valid times
Syntax:
<Forecast>.times() -> List
Examples
# Use Forecast.times on a Forecast value
let value = forecast();
print value.times();
Forecast.sample
method samples forecast products at an Earth location
Method: Forecast.sample - samples forecast products at an Earth location
Syntax:
<Forecast>.sample(location: Location, time: Time, product: Text|Reference|List) -> List
Arguments:
location: Location - Earth location to sample
time: Time [optional] - optional valid time; omitted samples all forecast times
product: Text|Reference|List [optional] - optional forecast product selector or selectors
Examples
# Use Forecast.sample on a Forecast value
let value = forecast();
print value.sample(location(latitude: 60.0, longitude: 270.0));
Forecast.toc
method returns available products, levels, and times
Method: Forecast.toc - returns available products, levels, and times
Syntax:
<Forecast>.toc() -> Object
Examples
# Use Forecast.toc on a Forecast value
let value = forecast();
print value.toc();
Forecast.messages
method returns raw forecast message metadata
Method: Forecast.messages - returns raw forecast message metadata
Syntax:
<Forecast>.messages() -> List
Examples
# Use Forecast.messages on a Forecast value
let value = forecast();
print value.messages();
Forecast.children
method lists child fields and callable members available on this value
Method: Forecast.children - lists child fields and callable members available on this value
Syntax:
<Forecast>.children() -> List
Examples
# Use Forecast.children on a Forecast value
let value = forecast();
print value.children();
Forecast.fields
method returns an object containing the value's plain fields
Method: Forecast.fields - returns an object containing the value's plain fields
Syntax:
<Forecast>.fields() -> Object
Examples
# Use Forecast.fields on a Forecast value
let value = forecast();
print value.fields();
Forecast.functions
method lists callable members available on this value
Method: Forecast.functions - lists callable members available on this value
Syntax:
<Forecast>.functions() -> List
Examples
# Use Forecast.functions on a Forecast value
let value = forecast();
print value.functions();
ForecastProduct
type forecast product selector bound to a forecast
Type: ForecastProduct - forecast product selector bound to a forecast
Children: product, name, select(), children(), fields(), functions()
Examples
# Select a forecast temperature field through the product selector
let temp = forecast().temperature();
print temp.product, temp.name;
ForecastProduct.product
field canonical forecast product name
Field: ForecastProduct.product - canonical forecast product name
Syntax:
<ForecastProduct>.product -> Text
Examples
# Read the product field from a ForecastProduct value
print forecast().temperature().product;
ForecastProduct.name
field alias for product
Field: ForecastProduct.name - alias for product
Syntax:
<ForecastProduct>.name -> Text
Examples
# Read the name field from a ForecastProduct value
print forecast().temperature().name;
ForecastProduct.select
method selects a scalar or vector field for this product
Method: ForecastProduct.select - selects a scalar or vector field for this product
Syntax:
<ForecastProduct>.select(level: Text) -> ScalarField|VectorField
Arguments:
level: Text [optional] - optional product level selector
Examples
# Select a forecast product through the forecast object
let temp = forecast().temperature();
print temp.product, temp.name, temp.available();
ForecastProduct.children
method lists child fields and callable members available on this value
Method: ForecastProduct.children - lists child fields and callable members available on this value
Syntax:
<ForecastProduct>.children() -> List
Examples
# List child help topics for a forecast product
let temp = forecast().temperature();
print temp.children();
ForecastProduct.fields
method returns an object containing the value's plain fields
Method: ForecastProduct.fields - returns an object containing the value's plain fields
Syntax:
<ForecastProduct>.fields() -> Object
Examples
# List fields exposed by a forecast product
let temp = forecast().temperature();
print temp.fields();
ForecastProduct.functions
method lists callable members available on this value
Method: ForecastProduct.functions - lists callable members available on this value
Syntax:
<ForecastProduct>.functions() -> List
Examples
# List functions exposed by a forecast product
let temp = forecast().temperature();
print temp.functions();
ScalarField
type forecast scalar field selected from a product
Type: ScalarField - forecast scalar field selected from a product
Children: product, name, level, path, sample(), children(), fields(), functions()
Examples
# Select a scalar forecast field and sample it at a location
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let temp = forecast().temperature();
print temp.sample(loc);
ScalarField.product
field forecast product name
Field: ScalarField.product - forecast product name
Syntax:
<ScalarField>.product -> Text
Examples
# Read the product field from a ScalarField value
print forecast().temperature().product;
ScalarField.name
field alias for product
Field: ScalarField.name - alias for product
Syntax:
<ScalarField>.name -> Text
Examples
# Read the name field from a ScalarField value
print forecast().temperature().name;
ScalarField.level
field selected vertical or surface level
Field: ScalarField.level - selected vertical or surface level
Syntax:
<ScalarField>.level -> Text|Nil
Examples
# Read the level field from a ScalarField value
print forecast().temperature().level;
ScalarField.path
field forecast data path
Field: ScalarField.path - forecast data path
Syntax:
<ScalarField>.path -> Text
Examples
# Read the path field from a ScalarField value
print forecast().temperature().path;
ScalarField.sample
method samples this scalar field at an Earth location
Method: ScalarField.sample - samples this scalar field at an Earth location
Syntax:
<ScalarField>.sample(location: Location) -> Number|Nil
Arguments:
location: Location - Earth location to sample
Examples
# Use ScalarField.sample on a ScalarField value
let value = forecast().temperature();
print value.sample(location(latitude: 60.0, longitude: 270.0));
ScalarField.children
method lists child fields and callable members available on this value
Method: ScalarField.children - lists child fields and callable members available on this value
Syntax:
<ScalarField>.children() -> List
Examples
# List child help topics for a selected scalar forecast field
let field = forecast().temperature();
print field.children();
ScalarField.fields
method returns an object containing the value's plain fields
Method: ScalarField.fields - returns an object containing the value's plain fields
Syntax:
<ScalarField>.fields() -> Object
Examples
# List fields exposed by a selected scalar forecast field
let field = forecast().temperature();
print field.fields();
ScalarField.functions
method lists callable members available on this value
Method: ScalarField.functions - lists callable members available on this value
Syntax:
<ScalarField>.functions() -> List
Examples
# List functions exposed by a selected scalar forecast field
let field = forecast().temperature();
print field.functions();
VectorField
type forecast vector field selected from a product
Type: VectorField - forecast vector field selected from a product
Children: product, name, level, path, components, sample(), children(), fields(), functions()
Examples
# Select a wind forecast field and sample speed at a location
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let wind_field = forecast().wind();
print wind_field.sample(loc).speed;
VectorField.product
field forecast product name
Field: VectorField.product - forecast product name
Syntax:
<VectorField>.product -> Text
Examples
# Read the product field from a VectorField value
print forecast().wind().product;
VectorField.name
field alias for product
Field: VectorField.name - alias for product
Syntax:
<VectorField>.name -> Text
Examples
# Read the name field from a VectorField value
print forecast().wind().name;
VectorField.level
field selected vertical or surface level
Field: VectorField.level - selected vertical or surface level
Syntax:
<VectorField>.level -> Text|Nil
Examples
# Read the level field from a VectorField value
print forecast().wind().level;
VectorField.path
field forecast data path
Field: VectorField.path - forecast data path
Syntax:
<VectorField>.path -> Text
Examples
# Read the path field from a VectorField value
print forecast().wind().path;
VectorField.components
field component names included in the vector field
Field: VectorField.components - component names included in the vector field
Syntax:
<VectorField>.components -> List
Examples
# Read the components field from a VectorField value
print forecast().wind().components;
VectorField.sample
method samples this vector field at an Earth location
Method: VectorField.sample - samples this vector field at an Earth location
Syntax:
<VectorField>.sample(location: Location) -> Object|Nil
Arguments:
location: Location - Earth location to sample
Examples
# Use VectorField.sample on a VectorField value
let value = forecast().wind();
print value.sample(location(latitude: 60.0, longitude: 270.0));
VectorField.children
method lists child fields and callable members available on this value
Method: VectorField.children - lists child fields and callable members available on this value
Syntax:
<VectorField>.children() -> List
Examples
# List child help topics for a selected vector forecast field
let field = forecast().wind();
print field.children();
VectorField.fields
method returns an object containing the value's plain fields
Method: VectorField.fields - returns an object containing the value's plain fields
Syntax:
<VectorField>.fields() -> Object
Examples
# List fields exposed by a selected vector forecast field
let field = forecast().wind();
print field.fields();
VectorField.functions
method lists callable members available on this value
Method: VectorField.functions - lists callable members available on this value
Syntax:
<VectorField>.functions() -> List
Examples
# List functions exposed by a selected vector forecast field
let field = forecast().wind();
print field.functions();
FieldSource
type approved external field dataset source
Type: FieldSource - approved external field dataset source
Children: name, filename, description, body, variable, lat, lon, children(), fields(), functions()
Examples
# Inspect the configured Earth topography source
let src = earth_topography;
print src.name, src.filename, src.variable;
FieldSource.name
field source name
Field: FieldSource.name - source name
Syntax:
<FieldSource>.name -> Text
Examples
# Read the name field from a FieldSource value
print earth_topography.name;
FieldSource.filename
field required data filename
Field: FieldSource.filename - required data filename
Syntax:
<FieldSource>.filename -> Text
Examples
# Read the filename field from a FieldSource value
print earth_topography.filename;
FieldSource.description
field source description
Field: FieldSource.description - source description
Syntax:
<FieldSource>.description -> Text
Examples
# Read the description field from a FieldSource value
print earth_topography.description;
FieldSource.body
field body this source describes
Field: FieldSource.body - body this source describes
Syntax:
<FieldSource>.body -> Text
Examples
# Read the body field from a FieldSource value
print earth_topography.body;
FieldSource.variable
field default NetCDF variable name
Field: FieldSource.variable - default NetCDF variable name
Syntax:
<FieldSource>.variable -> Text
Examples
# Read the variable field from a FieldSource value
print earth_topography.variable;
FieldSource.lat
field default latitude variable name
Field: FieldSource.lat - default latitude variable name
Syntax:
<FieldSource>.lat -> Text|Nil
Examples
# Read the lat field from a FieldSource value
print earth_topography.lat;
FieldSource.lon
field default longitude variable name
Field: FieldSource.lon - default longitude variable name
Syntax:
<FieldSource>.lon -> Text|Nil
Examples
# Read the lon field from a FieldSource value
print earth_topography.lon;
FieldSource.children
method lists child fields and callable members available on this value
Method: FieldSource.children - lists child fields and callable members available on this value
Syntax:
<FieldSource>.children() -> List
Examples
# Use FieldSource.children on a FieldSource value
let value = earth_topography;
print value.children();
FieldSource.fields
method returns an object containing the value's plain fields
Method: FieldSource.fields - returns an object containing the value's plain fields
Syntax:
<FieldSource>.fields() -> Object
Examples
# Use FieldSource.fields on a FieldSource value
let value = earth_topography;
print value.fields();
FieldSource.functions
method lists callable members available on this value
Method: FieldSource.functions - lists callable members available on this value
Syntax:
<FieldSource>.functions() -> List
Examples
# Use FieldSource.functions on a FieldSource value
let value = earth_topography;
print value.functions();
NetCDF
type opened NetCDF dataset metadata
Type: NetCDF - opened NetCDF dataset metadata
Syntax:
netcdf(source: FieldSource) -> NetCDF
Arguments:
source: FieldSource - approved field source constant such as earth_topography or moon_topography
Children: source, path, dimensions, variables, variable(), children(), fields(), functions()
Examples
# Inspect the NetCDF source behind Earth topography
let nc = netcdf(earth_topography);
print nc.path, nc.variables.length();
NetCDF.source
field field source used to open the dataset
Field: NetCDF.source - field source used to open the dataset
Syntax:
<NetCDF>.source -> FieldSource
Examples
# Read the source field from a NetCDF value
print netcdf(earth_topography).source;
NetCDF.path
field opened NetCDF file path
Field: NetCDF.path - opened NetCDF file path
Syntax:
<NetCDF>.path -> Text
Examples
# Read the path field from a NetCDF value
print netcdf(earth_topography).path;
NetCDF.dimensions
field NetCDF dimensions
Field: NetCDF.dimensions - NetCDF dimensions
Syntax:
<NetCDF>.dimensions -> List
Examples
# Read the dimensions field from a NetCDF value
print netcdf(earth_topography).dimensions;
NetCDF.variables
field NetCDF variables
Field: NetCDF.variables - NetCDF variables
Syntax:
<NetCDF>.variables -> List
Examples
# Read the variables field from a NetCDF value
print netcdf(earth_topography).variables;
NetCDF.variable
method returns metadata for one NetCDF variable
Method: NetCDF.variable - returns metadata for one NetCDF variable
Syntax:
<NetCDF>.variable() -> Object
Examples
# Inspect a named NetCDF variable
let nc = netcdf(earth_topography);
print nc.variable("z");
NetCDF.children
method lists child fields and callable members available on this value
Method: NetCDF.children - lists child fields and callable members available on this value
Syntax:
<NetCDF>.children() -> List
Examples
# Use NetCDF.children on a NetCDF value
let value = netcdf(earth_topography);
print value.children();
NetCDF.fields
method returns an object containing the value's plain fields
Method: NetCDF.fields - returns an object containing the value's plain fields
Syntax:
<NetCDF>.fields() -> Object
Examples
# Use NetCDF.fields on a NetCDF value
let value = netcdf(earth_topography);
print value.fields();
NetCDF.functions
method lists callable members available on this value
Method: NetCDF.functions - lists callable members available on this value
Syntax:
<NetCDF>.functions() -> List
Examples
# Use NetCDF.functions on a NetCDF value
let value = netcdf(earth_topography);
print value.functions();
Field
type sampleable global scalar field
Type: Field - sampleable global scalar field
Syntax:
field(source: FieldSource|NetCDF, variable: Text, body: Text|Body, lat: Text, lon: Text, indices: Object) -> Field
Arguments:
source: FieldSource|NetCDF - approved field source constant or opened NetCDF dataset
variable: Text [optional] - variable containing the scalar field; defaults from the source constant
body: Text|Body [optional] - body this field is attached to
lat: Text [optional] - latitude coordinate variable name
lon: Text [optional] - longitude coordinate variable name
indices: Object [optional] - fixed indices for non-lat/lon dimensions
Children: source, path, variable, body, lat, lon, dimensions, indices, sample(), children(), fields(), functions()
Examples
# Inspect a terrain field before sampling it
let terrain = topography(earth);
print terrain.source.name, terrain.variable, terrain.body;
Field.source
field field source used to open this field
Field: Field.source - field source used to open this field
Syntax:
<Field>.source -> FieldSource
Examples
# Read the source field from a Field value
print topography(earth).source;
Field.path
field NetCDF file path
Field: Field.path - NetCDF file path
Syntax:
<Field>.path -> Text
Examples
# Read the path field from a Field value
print topography(earth).path;
Field.variable
field sampled NetCDF variable name
Field: Field.variable - sampled NetCDF variable name
Syntax:
<Field>.variable -> Text
Examples
# Read the variable field from a Field value
print topography(earth).variable;
Field.body
field body this field is attached to
Field: Field.body - body this field is attached to
Syntax:
<Field>.body -> Text
Examples
# Read the body field from a Field value
print topography(earth).body;
Field.lat
field latitude coordinate variable name
Field: Field.lat - latitude coordinate variable name
Syntax:
<Field>.lat -> Text
Examples
# Read the lat field from a Field value
print topography(earth).lat;
Field.lon
field longitude coordinate variable name
Field: Field.lon - longitude coordinate variable name
Syntax:
<Field>.lon -> Text
Examples
# Read the lon field from a Field value
print topography(earth).lon;
Field.dimensions
field field dimensions and fixed indices
Field: Field.dimensions - field dimensions and fixed indices
Syntax:
<Field>.dimensions -> List
Examples
# Read the dimensions field from a Field value
print topography(earth).dimensions;
Field.indices
field fixed non-lat/lon dimension indices
Field: Field.indices - fixed non-lat/lon dimension indices
Syntax:
<Field>.indices -> Object
Examples
# Read the indices field from a Field value
print topography(earth).indices;
Field.sample
method samples this field at a latitude/longitude location
Method: Field.sample - samples this field at a latitude/longitude location
Syntax:
<Field>.sample(location: Location) -> Number|Nil
Arguments:
location: Location - latitude/longitude location to sample
Examples
# Use Field.sample on a Field value
let value = topography(earth);
print value.sample(location(latitude: 60.0, longitude: 270.0));
Field.children
method lists child fields and callable members available on this value
Method: Field.children - lists child fields and callable members available on this value
Syntax:
<Field>.children() -> List
Examples
# Use Field.children on a Field value
let value = topography(earth);
print value.children();
Field.fields
method returns an object containing the value's plain fields
Method: Field.fields - returns an object containing the value's plain fields
Syntax:
<Field>.fields() -> Object
Examples
# Use Field.fields on a Field value
let value = topography(earth);
print value.fields();
Field.functions
method lists callable members available on this value
Method: Field.functions - lists callable members available on this value
Syntax:
<Field>.functions() -> List
Examples
# Use Field.functions on a Field value
let value = topography(earth);
print value.functions();
Magnetic
type body-scoped magnetic field model
Type: Magnetic - body-scoped magnetic field model
Syntax:
magnetic(body: Body, time: Time, observer: Observer) -> Magnetic
Arguments:
body: Body [optional] - body to model; Earth uses WMMHR, other bodies use crude dipoles
time: Time [optional] - default sample time
observer: Observer [optional] - default observer location
Children: body, time, observer, field(), children(), fields(), functions()
Examples
# Sample the magnetic field vector at an observer
let obs = location(60.0, 10.0).observer(0.002);
let model = magnetic(earth, time(2026,1,1,0,0,0), obs);
print model.field();
Magnetic.body
field body whose magnetic model is selected
Field: Magnetic.body - body whose magnetic model is selected
Syntax:
<Magnetic>.body -> Body
Examples
# Read the body field from a Magnetic value
print magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002)).body;
Magnetic.time
field default sample time
Field: Magnetic.time - default sample time
Syntax:
<Magnetic>.time -> Time
Examples
# Read the time field from a Magnetic value
print magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002)).time;
Magnetic.observer
field default observer location
Field: Magnetic.observer - default observer location
Syntax:
<Magnetic>.observer -> Observer
Examples
# Read the observer field from a Magnetic value
print magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002)).observer;
Magnetic.field
method samples the magnetic field at an observer and time
Method: Magnetic.field - samples the magnetic field at an observer and time
Syntax:
<Magnetic>.field(time: Time, observer: Observer) -> Object
Arguments:
time: Time [optional] - sample time; defaults to the constructor time or current UTC
observer: Observer [optional] - observer location; defaults to the constructor observer
Examples
# Sample a magnetic field model at its configured observer
let model = magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002));
print model.field();
Magnetic.children
method lists child fields and callable members available on this value
Method: Magnetic.children - lists child fields and callable members available on this value
Syntax:
<Magnetic>.children() -> List
Examples
# List child help topics for a configured magnetic field model
let model = magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002));
print model.children();
Magnetic.fields
method returns an object containing the value's plain fields
Method: Magnetic.fields - returns an object containing the value's plain fields
Syntax:
<Magnetic>.fields() -> Object
Examples
# List fields exposed by a configured magnetic field model
let model = magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002));
print model.fields();
Magnetic.functions
method lists callable members available on this value
Method: Magnetic.functions - lists callable members available on this value
Syntax:
<Magnetic>.functions() -> List
Examples
# List functions exposed by a configured magnetic field model
let model = magnetic(earth, time(2026,1,1,0,0,0), location(latitude:60,longitude:10).observer(0.002));
print model.functions();
Pages
type curated data-page builder with optional default body, time, and observer
Type: Pages - curated data-page builder with optional default body, time, and observer
Syntax:
pages(body: Body, time: Time, observer: Location|Observer) -> Pages
Arguments:
body: Body [optional] - default body for body-oriented pages
time: Time [optional] - default time for page methods
observer: Location|Observer [optional] - default observer or surface location for local pages
Children: body, time, observer, sky(), chart(), summary(), sun(), moon(), almanac(), short(), small(), state(), states(), table(), children(), fields(), functions()
Examples
# Build a local sky page and print useful Sun and Moon values
let page = pages(location(60.0, 10.0), time(2026,1,1,0,0,0)).sky();
print page.sun.altitude, page.moon.phase;
Pages.body
field default body for body-oriented page methods
Field: Pages.body - default body for body-oriented page methods
Syntax:
<Pages>.body -> Body|Nil
Examples
# Read the body field from a Pages value
print pages(location(60.0, 10.0), moon).body;
Pages.time
field default time for page methods
Field: Pages.time - default time for page methods
Syntax:
<Pages>.time -> Time|Nil
Examples
# Read the time field from a Pages value
print pages(location(60.0, 10.0), moon).time;
Pages.observer
field default local observer for page methods
Field: Pages.observer - default local observer for page methods
Syntax:
<Pages>.observer -> Observer|Nil
Examples
# Read the observer stored in a local pages value
let obs = location(60.0, 10.0).observer(0.002);
let page = pages(obs, moon);
print page.observer;
Pages.sky
method returns local Sun, Moon, planet, twilight, and next-event sky data
Method: Pages.sky - returns local Sun, Moon, planet, twilight, and next-event sky data
Syntax:
<Pages>.sky(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.sky on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.sky();
Pages.chart
method returns apparent geocentric ecliptic body positions for a chart time
Method: Pages.chart - returns apparent geocentric ecliptic body positions for a chart time
Syntax:
<Pages>.chart(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Build apparent geocentric chart positions for an explicit time
let t = time(2026,1,1,0,0,0);
let chart = pages(t).chart();
print chart.bodies.sun.geocentric.longitude, chart.bodies.moon.chart.sign;
Pages.summary
method returns a compact useful data object for one body
Method: Pages.summary - returns a compact useful data object for one body
Syntax:
<Pages>.summary(body: Body, time: Time, observer: Location|Observer) -> Object
Arguments:
body: Body [optional] - body to summarize; defaults to pages(...) body
time: Time [optional] - summary time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - optional local observer; defaults to pages(...) observer
Examples
# Use Pages.summary on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.summary();
Pages.sun
method returns a compact Sun data object
Method: Pages.sun - returns a compact Sun data object
Syntax:
<Pages>.sun(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.sun on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.sun();
Pages.moon
method returns a compact Moon data object
Method: Pages.moon - returns a compact Moon data object
Syntax:
<Pages>.moon(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.moon on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.moon();
Pages.almanac
method returns almanac event data using Pages defaults
Method: Pages.almanac - returns almanac event data using Pages defaults
Syntax:
<Pages>.almanac(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.almanac on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.almanac();
Pages.short
method returns compact one-day local Sun and Moon data
Method: Pages.short - returns compact one-day local Sun and Moon data
Syntax:
<Pages>.short(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.short on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.short();
Pages.small
method returns fuller one-day local sky, chart, and almanac data
Method: Pages.small - returns fuller one-day local sky, chart, and almanac data
Syntax:
<Pages>.small(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.small on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.small();
Pages.state
method returns solar-system state vectors for one time
Method: Pages.state - returns solar-system state vectors for one time
Syntax:
<Pages>.state(time: Time, observer: Location|Observer) -> Object
Arguments:
time: Time [optional] - page time; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
Examples
# Use Pages.state on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.state();
Pages.states
method returns solar-system state vectors sampled over a period
Method: Pages.states - returns solar-system state vectors sampled over a period
Syntax:
<Pages>.states(time: Time|Range, observer: Location|Observer, days: Number, step: Number) -> List
Arguments:
time: Time|Range [optional] - start time or bounded time range; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
days: Number [optional] - number of days to include; defaults to 30
step: Number [optional] - sampling step in days for states; defaults to 1
Examples
# Sample solar-system state vectors over a time range
let start = time(2026,1,1,0,0,0);
let p = pages(start).states(range(start, start.add_days(1), 6));
print p.bodies.earth.position_bc_icrf.length();
Pages.table
method returns daily local Sun and Moon event rows over a period
Method: Pages.table - returns daily local Sun and Moon event rows over a period
Syntax:
<Pages>.table(time: Time|Range, observer: Location|Observer, days: Number, step: Number) -> List
Arguments:
time: Time|Range [optional] - start time or bounded time range; defaults to pages(...) time or current UTC
observer: Location|Observer [optional] - local observer; defaults to pages(...) observer when present
days: Number [optional] - number of days to include; defaults to 30
step: Number [optional] - sampling step in days for states; defaults to 1
Examples
# Use Pages.table on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.table();
Pages.children
method lists child fields and callable members available on this value
Method: Pages.children - lists child fields and callable members available on this value
Syntax:
<Pages>.children() -> List
Examples
# Use Pages.children on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.children();
Pages.fields
method returns an object containing the value's plain fields
Method: Pages.fields - returns an object containing the value's plain fields
Syntax:
<Pages>.fields() -> Object
Examples
# Use Pages.fields on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.fields();
Pages.functions
method lists callable members available on this value
Method: Pages.functions - lists callable members available on this value
Syntax:
<Pages>.functions() -> List
Examples
# Use Pages.functions on a Pages value
let value = pages(location(60.0, 10.0), moon);
print value.functions();
sun
constant built-in Body constant
Constant: sun - built-in Body constant
Syntax:
sun -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), greatest_eastern_elongation(), greatest_western_elongation(), greatest_elongation(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use sun as a body reference and print its physical row
print sun.name, sun.radius, sun.mass;
mercury
constant built-in Body constant
Constant: mercury - built-in Body constant
Syntax:
mercury -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), inferior_conjunction(), superior_conjunction(), greatest_eastern_elongation(), greatest_western_elongation(), greatest_elongation(), periapsis(), apoapsis(), transit(), children(), fields(), functions()
Examples
# Use mercury as a body reference and print its physical row
print mercury.name, mercury.radius, mercury.mass;
venus
constant built-in Body constant
Constant: venus - built-in Body constant
Syntax:
venus -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), inferior_conjunction(), superior_conjunction(), greatest_eastern_elongation(), greatest_western_elongation(), greatest_elongation(), periapsis(), apoapsis(), transit(), children(), fields(), functions()
Examples
# Use venus as a body reference and print its physical row
print venus.name, venus.radius, venus.mass;
moon
constant built-in Body constant
Constant: moon - built-in Body constant
Syntax:
moon -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use moon as a body reference and print its physical row
print moon.name, moon.radius, moon.mass;
earth
constant built-in Body constant
Constant: earth - built-in Body constant
Syntax:
earth -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use earth as a body reference and print its physical row
print earth.name, earth.radius, earth.mass;
mars
constant built-in Body constant
Constant: mars - built-in Body constant
Syntax:
mars -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use mars as a body reference and print its physical row
print mars.name, mars.radius, mars.mass;
jupiter
constant built-in Body constant
Constant: jupiter - built-in Body constant
Syntax:
jupiter -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use jupiter as a body reference and print its physical row
print jupiter.name, jupiter.radius, jupiter.mass;
saturn
constant built-in Body constant
Constant: saturn - built-in Body constant
Syntax:
saturn -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use saturn as a body reference and print its physical row
print saturn.name, saturn.radius, saturn.mass;
uranus
constant built-in Body constant
Constant: uranus - built-in Body constant
Syntax:
uranus -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use uranus as a body reference and print its physical row
print uranus.name, uranus.radius, uranus.mass;
neptune
constant built-in Body constant
Constant: neptune - built-in Body constant
Syntax:
neptune -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use neptune as a body reference and print its physical row
print neptune.name, neptune.radius, neptune.mass;
pluto
constant built-in Body constant
Constant: pluto - built-in Body constant
Syntax:
pluto -> Body
Children: name, kind, xmu, radius, mass, H, n, k, known, rotational_axis(), rotational_axis_ra(), rotational_axis_dec(), state(), rise(), set(), conjunction(), opposition(), eastern_quadrature(), western_quadrature(), quadrature(), periapsis(), apoapsis(), children(), fields(), functions()
Examples
# Use pluto as a body reference and print its physical row
print pluto.name, pluto.radius, pluto.mass;
sun.name
field canonical body name
Field: sun.name - canonical body name
Syntax:
sun.name -> Text
Examples
# Use sun.name as the label in a body catalog row
let row = {label: sun.name, radius: sun.radius};
print row.label, row.radius;
sun.kind
field reference body kind
Field: sun.kind - reference body kind
Syntax:
sun.kind -> Text
Examples
# Use sun.kind to group a body catalog row
let row = {name: sun.name, group: sun.kind};
print row.group, row.name;
sun.xmu
field gravitational parameter in km^3/s^2
Field: sun.xmu - gravitational parameter in km^3/s^2
Syntax:
sun.xmu -> Number
Examples
# Compare sun gravitational parameter with Earth
print sun.name, sun.xmu, sun.xmu / earth.xmu;
sun.radius
field body radius in km
Field: sun.radius - body radius in km
Syntax:
sun.radius -> Number
Examples
# Compare sun radius with Earth for scale estimates
print sun.name, sun.radius, sun.radius / earth.radius;
sun.mass
field body mass in kg
Field: sun.mass - body mass in kg
Syntax:
sun.mass -> Number
Examples
# Compare sun mass with Earth for scale estimates
print sun.name, sun.mass, sun.mass / earth.mass;
sun.H
field reference absolute magnitude parameter
Field: sun.H - reference absolute magnitude parameter
Syntax:
sun.H -> Number
Examples
# Use sun.H as the absolute magnitude term in a report
print sun.name, sun.H;
sun.n
field reference illumination exponent
Field: sun.n - reference illumination exponent
Syntax:
sun.n -> Number
Examples
# Use sun.n as the photometric phase slope term
print sun.name, sun.n, sun.H + sun.n;
sun.k
field reference G Muller constant
Field: sun.k - reference G Muller constant
Syntax:
sun.k -> Number
Examples
# Use sun.k as the photometric curvature term
print sun.name, sun.k, sun.H + sun.k;
sun.known
field whether the body name matched the built-in table
Field: sun.known - whether the body name matched the built-in table
Syntax:
sun.known -> Bool
Examples
# Verify whether sun has built-in physical metadata
print sun.name, sun.known;
sun.rotational_axis
method returns this body's rotational north pole at a time
Method: sun.rotational_axis - returns this body's rotational north pole at a time
Syntax:
sun.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the sun constant with its rotational_axis member
let value = sun;
print value.rotational_axis(time());
sun.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: sun.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
sun.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the sun constant with its rotational_axis_ra member
let value = sun;
print value.rotational_axis_ra(time());
sun.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: sun.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
sun.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the sun constant with its rotational_axis_dec member
let value = sun;
print value.rotational_axis_dec(time());
sun.state
method returns the orbital state for this body at a time
Method: sun.state - returns the orbital state for this body at a time
Syntax:
sun.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the sun constant with its state member
let value = sun;
print value.state(time());
sun.rise
method returns sunrise or moonrise events for an observer
Method: sun.rise - returns sunrise or moonrise events for an observer
Syntax:
sun.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find sun rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print sun.rise(obs, span).first();
sun.set
method returns sunset or moonset events for an observer
Method: sun.set - returns sunset or moonset events for an observer
Syntax:
sun.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find sun set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print sun.set(obs, span).first();
sun.conjunction
method returns events when the Sun and Earth are on the same side of the solar-system barycenter
Method: sun.conjunction - returns events when the Sun and Earth are on the same side of the solar-system barycenter
Syntax:
sun.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find when the Sun and Earth are on the same side of the solar-system barycenter
let span = range(time(2026,9,20,0,0,0), time(2027,9,20,0,0,0), 5);
print sun.conjunction(span).first();
sun.opposition
method returns events when the Sun and Earth are on opposite sides of the solar-system barycenter
Method: sun.opposition - returns events when the Sun and Earth are on opposite sides of the solar-system barycenter
Syntax:
sun.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find when the Sun and Earth are on opposite sides of the solar-system barycenter
let span = range(time(2026,9,20,0,0,0), time(2027,9,20,0,0,0), 5);
print sun.opposition(span).first();
sun.eastern_quadrature
method returns eastern quadrature events for this body
Method: sun.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
sun.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Demonstrate eastern_quadrature using an outer planet time range
let value = mars;
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print "sun help", value.eastern_quadrature(span).first();
sun.western_quadrature
method returns western quadrature events for this body
Method: sun.western_quadrature - returns western quadrature events for this body
Syntax:
sun.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Demonstrate western_quadrature using an outer planet time range
let value = mars;
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print "sun help", value.western_quadrature(span).first();
sun.quadrature
method returns eastern and western quadrature events for this body
Method: sun.quadrature - returns eastern and western quadrature events for this body
Syntax:
sun.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Demonstrate quadrature using an outer planet time range
let value = mars;
let span = range(time(2025,1,1,0,0,0), time(2026,1,1,0,0,0), 1);
print "sun help", value.quadrature(span).first();
sun.greatest_eastern_elongation
method returns Sun greatest eastern elongation events relative to the solar-system barycenter
Method: sun.greatest_eastern_elongation - returns Sun greatest eastern elongation events relative to the solar-system barycenter
Syntax:
sun.greatest_eastern_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find Sun greatest eastern elongation relative to the solar-system barycenter
let span = range(time(2027,1,1,0,0,0), time(2028,1,1,0,0,0), 5);
print sun.greatest_eastern_elongation(span).first();
sun.greatest_western_elongation
method returns Sun greatest western elongation events relative to the solar-system barycenter
Method: sun.greatest_western_elongation - returns Sun greatest western elongation events relative to the solar-system barycenter
Syntax:
sun.greatest_western_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find Sun greatest western elongation relative to the solar-system barycenter
let span = range(time(2027,1,1,0,0,0), time(2028,1,1,0,0,0), 5);
print sun.greatest_western_elongation(span).first();
sun.greatest_elongation
method returns Sun greatest eastern and western elongation events relative to the solar-system barycenter
Method: sun.greatest_elongation - returns Sun greatest eastern and western elongation events relative to the solar-system barycenter
Syntax:
sun.greatest_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find Sun greatest elongation events relative to the solar-system barycenter
let span = range(time(2027,1,1,0,0,0), time(2028,1,1,0,0,0), 5);
print sun.greatest_elongation(span);
sun.periapsis
method returns Sun periapsis events relative to the solar-system barycenter
Method: sun.periapsis - returns Sun periapsis events relative to the solar-system barycenter
Syntax:
sun.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find Sun periapsis events relative to the solar-system barycenter
let span = range(time(2020,1,1,0,0,0), time(2040,1,1,0,0,0), 5);
print sun.periapsis(span).first();
sun.apoapsis
method returns Sun apoapsis events relative to the solar-system barycenter
Method: sun.apoapsis - returns Sun apoapsis events relative to the solar-system barycenter
Syntax:
sun.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find Sun apoapsis events relative to the solar-system barycenter
let span = range(time(2020,1,1,0,0,0), time(2040,1,1,0,0,0), 5);
print sun.apoapsis(span).first();
sun.children
method lists child fields and callable members available on this value
Method: sun.children - lists child fields and callable members available on this value
Syntax:
sun.children() -> List
Examples
# Inspect child entries available from the sun constant
let value = sun;
print value.children();
sun.fields
method returns an object containing the value's plain fields
Method: sun.fields - returns an object containing the value's plain fields
Syntax:
sun.fields() -> Object
Examples
# Inspect plain fields on the sun constant
let value = sun;
print value.fields();
sun.functions
method lists callable members available on this value
Method: sun.functions - lists callable members available on this value
Syntax:
sun.functions() -> List
Examples
# Inspect callable members on the sun constant
let value = sun;
print value.functions();
mercury.name
field canonical body name
Field: mercury.name - canonical body name
Syntax:
mercury.name -> Text
Examples
# Use mercury.name as the label in a body catalog row
let row = {label: mercury.name, radius: mercury.radius};
print row.label, row.radius;
mercury.kind
field reference body kind
Field: mercury.kind - reference body kind
Syntax:
mercury.kind -> Text
Examples
# Use mercury.kind to group a body catalog row
let row = {name: mercury.name, group: mercury.kind};
print row.group, row.name;
mercury.xmu
field gravitational parameter in km^3/s^2
Field: mercury.xmu - gravitational parameter in km^3/s^2
Syntax:
mercury.xmu -> Number
Examples
# Compare mercury gravitational parameter with Earth
print mercury.name, mercury.xmu, mercury.xmu / earth.xmu;
mercury.radius
field body radius in km
Field: mercury.radius - body radius in km
Syntax:
mercury.radius -> Number
Examples
# Compare mercury radius with Earth for scale estimates
print mercury.name, mercury.radius, mercury.radius / earth.radius;
mercury.mass
field body mass in kg
Field: mercury.mass - body mass in kg
Syntax:
mercury.mass -> Number
Examples
# Compare mercury mass with Earth for scale estimates
print mercury.name, mercury.mass, mercury.mass / earth.mass;
mercury.H
field reference absolute magnitude parameter
Field: mercury.H - reference absolute magnitude parameter
Syntax:
mercury.H -> Number
Examples
# Use mercury.H as the absolute magnitude term in a report
print mercury.name, mercury.H;
mercury.n
field reference illumination exponent
Field: mercury.n - reference illumination exponent
Syntax:
mercury.n -> Number
Examples
# Use mercury.n as the photometric phase slope term
print mercury.name, mercury.n, mercury.H + mercury.n;
mercury.k
field reference G Muller constant
Field: mercury.k - reference G Muller constant
Syntax:
mercury.k -> Number
Examples
# Use mercury.k as the photometric curvature term
print mercury.name, mercury.k, mercury.H + mercury.k;
mercury.known
field whether the body name matched the built-in table
Field: mercury.known - whether the body name matched the built-in table
Syntax:
mercury.known -> Bool
Examples
# Verify whether mercury has built-in physical metadata
print mercury.name, mercury.known;
mercury.rotational_axis
method returns this body's rotational north pole at a time
Method: mercury.rotational_axis - returns this body's rotational north pole at a time
Syntax:
mercury.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mercury constant with its rotational_axis member
let value = mercury;
print value.rotational_axis(time());
mercury.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: mercury.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
mercury.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mercury constant with its rotational_axis_ra member
let value = mercury;
print value.rotational_axis_ra(time());
mercury.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: mercury.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
mercury.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mercury constant with its rotational_axis_dec member
let value = mercury;
print value.rotational_axis_dec(time());
mercury.state
method returns the orbital state for this body at a time
Method: mercury.state - returns the orbital state for this body at a time
Syntax:
mercury.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mercury constant with its state member
let value = mercury;
print value.state(time());
mercury.rise
method returns sunrise or moonrise events for an observer
Method: mercury.rise - returns sunrise or moonrise events for an observer
Syntax:
mercury.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find mercury rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print mercury.rise(obs, span).first();
mercury.set
method returns sunset or moonset events for an observer
Method: mercury.set - returns sunset or moonset events for an observer
Syntax:
mercury.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find mercury set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print mercury.set(obs, span).first();
mercury.conjunction
method returns conjunction events for this body
Method: mercury.conjunction - returns conjunction events for this body
Syntax:
mercury.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its conjunction member
let value = mercury;
print value.conjunction();
mercury.inferior_conjunction
method returns inferior conjunction events for this body
Method: mercury.inferior_conjunction - returns inferior conjunction events for this body
Syntax:
mercury.inferior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its inferior_conjunction member
let value = mercury;
print value.inferior_conjunction();
mercury.superior_conjunction
method returns superior conjunction events for this body
Method: mercury.superior_conjunction - returns superior conjunction events for this body
Syntax:
mercury.superior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its superior_conjunction member
let value = mercury;
print value.superior_conjunction();
mercury.greatest_eastern_elongation
method returns greatest eastern elongation events for this body
Method: mercury.greatest_eastern_elongation - returns greatest eastern elongation events for this body
Syntax:
mercury.greatest_eastern_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its greatest_eastern_elongation member
let value = mercury;
print value.greatest_eastern_elongation();
mercury.greatest_western_elongation
method returns greatest western elongation events for this body
Method: mercury.greatest_western_elongation - returns greatest western elongation events for this body
Syntax:
mercury.greatest_western_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its greatest_western_elongation member
let value = mercury;
print value.greatest_western_elongation();
mercury.greatest_elongation
method returns greatest eastern and western elongation events for this body
Method: mercury.greatest_elongation - returns greatest eastern and western elongation events for this body
Syntax:
mercury.greatest_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its greatest_elongation member
let value = mercury;
print value.greatest_elongation();
mercury.periapsis
method returns periapsis events for this body
Method: mercury.periapsis - returns periapsis events for this body
Syntax:
mercury.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the mercury help entry
let value = mercury;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "mercury", value.periapsis(span).first();
mercury.apoapsis
method returns apoapsis events for this body
Method: mercury.apoapsis - returns apoapsis events for this body
Syntax:
mercury.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the mercury help entry
let value = mercury;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "mercury", value.apoapsis(span).first();
mercury.transit
method returns solar transit events for Mercury or Venus
Method: mercury.transit - returns solar transit events for Mercury or Venus
Syntax:
mercury.transit(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mercury constant with its transit member
let value = mercury;
print value.transit();
mercury.children
method lists child fields and callable members available on this value
Method: mercury.children - lists child fields and callable members available on this value
Syntax:
mercury.children() -> List
Examples
# Inspect child entries available from the mercury constant
let value = mercury;
print value.children();
mercury.fields
method returns an object containing the value's plain fields
Method: mercury.fields - returns an object containing the value's plain fields
Syntax:
mercury.fields() -> Object
Examples
# Inspect plain fields on the mercury constant
let value = mercury;
print value.fields();
mercury.functions
method lists callable members available on this value
Method: mercury.functions - lists callable members available on this value
Syntax:
mercury.functions() -> List
Examples
# Inspect callable members on the mercury constant
let value = mercury;
print value.functions();
venus.name
field canonical body name
Field: venus.name - canonical body name
Syntax:
venus.name -> Text
Examples
# Use venus.name as the label in a body catalog row
let row = {label: venus.name, radius: venus.radius};
print row.label, row.radius;
venus.kind
field reference body kind
Field: venus.kind - reference body kind
Syntax:
venus.kind -> Text
Examples
# Use venus.kind to group a body catalog row
let row = {name: venus.name, group: venus.kind};
print row.group, row.name;
venus.xmu
field gravitational parameter in km^3/s^2
Field: venus.xmu - gravitational parameter in km^3/s^2
Syntax:
venus.xmu -> Number
Examples
# Compare venus gravitational parameter with Earth
print venus.name, venus.xmu, venus.xmu / earth.xmu;
venus.radius
field body radius in km
Field: venus.radius - body radius in km
Syntax:
venus.radius -> Number
Examples
# Compare venus radius with Earth for scale estimates
print venus.name, venus.radius, venus.radius / earth.radius;
venus.mass
field body mass in kg
Field: venus.mass - body mass in kg
Syntax:
venus.mass -> Number
Examples
# Compare venus mass with Earth for scale estimates
print venus.name, venus.mass, venus.mass / earth.mass;
venus.H
field reference absolute magnitude parameter
Field: venus.H - reference absolute magnitude parameter
Syntax:
venus.H -> Number
Examples
# Use venus.H as the absolute magnitude term in a report
print venus.name, venus.H;
venus.n
field reference illumination exponent
Field: venus.n - reference illumination exponent
Syntax:
venus.n -> Number
Examples
# Use venus.n as the photometric phase slope term
print venus.name, venus.n, venus.H + venus.n;
venus.k
field reference G Muller constant
Field: venus.k - reference G Muller constant
Syntax:
venus.k -> Number
Examples
# Use venus.k as the photometric curvature term
print venus.name, venus.k, venus.H + venus.k;
venus.known
field whether the body name matched the built-in table
Field: venus.known - whether the body name matched the built-in table
Syntax:
venus.known -> Bool
Examples
# Verify whether venus has built-in physical metadata
print venus.name, venus.known;
venus.rotational_axis
method returns this body's rotational north pole at a time
Method: venus.rotational_axis - returns this body's rotational north pole at a time
Syntax:
venus.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the venus constant with its rotational_axis member
let value = venus;
print value.rotational_axis(time());
venus.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: venus.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
venus.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the venus constant with its rotational_axis_ra member
let value = venus;
print value.rotational_axis_ra(time());
venus.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: venus.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
venus.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the venus constant with its rotational_axis_dec member
let value = venus;
print value.rotational_axis_dec(time());
venus.state
method returns the orbital state for this body at a time
Method: venus.state - returns the orbital state for this body at a time
Syntax:
venus.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the venus constant with its state member
let value = venus;
print value.state(time());
venus.rise
method returns sunrise or moonrise events for an observer
Method: venus.rise - returns sunrise or moonrise events for an observer
Syntax:
venus.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find venus rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print venus.rise(obs, span).first();
venus.set
method returns sunset or moonset events for an observer
Method: venus.set - returns sunset or moonset events for an observer
Syntax:
venus.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find venus set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print venus.set(obs, span).first();
venus.conjunction
method returns conjunction events for this body
Method: venus.conjunction - returns conjunction events for this body
Syntax:
venus.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its conjunction member
let value = venus;
print value.conjunction();
venus.inferior_conjunction
method returns inferior conjunction events for this body
Method: venus.inferior_conjunction - returns inferior conjunction events for this body
Syntax:
venus.inferior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its inferior_conjunction member
let value = venus;
print value.inferior_conjunction();
venus.superior_conjunction
method returns superior conjunction events for this body
Method: venus.superior_conjunction - returns superior conjunction events for this body
Syntax:
venus.superior_conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its superior_conjunction member
let value = venus;
print value.superior_conjunction();
venus.greatest_eastern_elongation
method returns greatest eastern elongation events for this body
Method: venus.greatest_eastern_elongation - returns greatest eastern elongation events for this body
Syntax:
venus.greatest_eastern_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its greatest_eastern_elongation member
let value = venus;
print value.greatest_eastern_elongation();
venus.greatest_western_elongation
method returns greatest western elongation events for this body
Method: venus.greatest_western_elongation - returns greatest western elongation events for this body
Syntax:
venus.greatest_western_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its greatest_western_elongation member
let value = venus;
print value.greatest_western_elongation();
venus.greatest_elongation
method returns greatest eastern and western elongation events for this body
Method: venus.greatest_elongation - returns greatest eastern and western elongation events for this body
Syntax:
venus.greatest_elongation(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its greatest_elongation member
let value = venus;
print value.greatest_elongation();
venus.periapsis
method returns periapsis events for this body
Method: venus.periapsis - returns periapsis events for this body
Syntax:
venus.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the venus help entry
let value = venus;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "venus", value.periapsis(span).first();
venus.apoapsis
method returns apoapsis events for this body
Method: venus.apoapsis - returns apoapsis events for this body
Syntax:
venus.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the venus help entry
let value = venus;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "venus", value.apoapsis(span).first();
venus.transit
method returns solar transit events for Mercury or Venus
Method: venus.transit - returns solar transit events for Mercury or Venus
Syntax:
venus.transit(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the venus constant with its transit member
let value = venus;
print value.transit();
venus.children
method lists child fields and callable members available on this value
Method: venus.children - lists child fields and callable members available on this value
Syntax:
venus.children() -> List
Examples
# Inspect child entries available from the venus constant
let value = venus;
print value.children();
venus.fields
method returns an object containing the value's plain fields
Method: venus.fields - returns an object containing the value's plain fields
Syntax:
venus.fields() -> Object
Examples
# Inspect plain fields on the venus constant
let value = venus;
print value.fields();
venus.functions
method lists callable members available on this value
Method: venus.functions - lists callable members available on this value
Syntax:
venus.functions() -> List
Examples
# Inspect callable members on the venus constant
let value = venus;
print value.functions();
moon.name
field canonical body name
Field: moon.name - canonical body name
Syntax:
moon.name -> Text
Examples
# Use moon.name as the label in a body catalog row
let row = {label: moon.name, radius: moon.radius};
print row.label, row.radius;
moon.kind
field reference body kind
Field: moon.kind - reference body kind
Syntax:
moon.kind -> Text
Examples
# Use moon.kind to group a body catalog row
let row = {name: moon.name, group: moon.kind};
print row.group, row.name;
moon.xmu
field gravitational parameter in km^3/s^2
Field: moon.xmu - gravitational parameter in km^3/s^2
Syntax:
moon.xmu -> Number
Examples
# Compare moon gravitational parameter with Earth
print moon.name, moon.xmu, moon.xmu / earth.xmu;
moon.radius
field body radius in km
Field: moon.radius - body radius in km
Syntax:
moon.radius -> Number
Examples
# Compare moon radius with Earth for scale estimates
print moon.name, moon.radius, moon.radius / earth.radius;
moon.mass
field body mass in kg
Field: moon.mass - body mass in kg
Syntax:
moon.mass -> Number
Examples
# Compare moon mass with Earth for scale estimates
print moon.name, moon.mass, moon.mass / earth.mass;
moon.H
field reference absolute magnitude parameter
Field: moon.H - reference absolute magnitude parameter
Syntax:
moon.H -> Number
Examples
# Use moon.H as the absolute magnitude term in a report
print moon.name, moon.H;
moon.n
field reference illumination exponent
Field: moon.n - reference illumination exponent
Syntax:
moon.n -> Number
Examples
# Use moon.n as the photometric phase slope term
print moon.name, moon.n, moon.H + moon.n;
moon.k
field reference G Muller constant
Field: moon.k - reference G Muller constant
Syntax:
moon.k -> Number
Examples
# Use moon.k as the photometric curvature term
print moon.name, moon.k, moon.H + moon.k;
moon.known
field whether the body name matched the built-in table
Field: moon.known - whether the body name matched the built-in table
Syntax:
moon.known -> Bool
Examples
# Verify whether moon has built-in physical metadata
print moon.name, moon.known;
moon.rotational_axis
method returns this body's rotational north pole at a time
Method: moon.rotational_axis - returns this body's rotational north pole at a time
Syntax:
moon.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the moon constant with its rotational_axis member
let value = moon;
print value.rotational_axis(time());
moon.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: moon.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
moon.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the moon constant with its rotational_axis_ra member
let value = moon;
print value.rotational_axis_ra(time());
moon.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: moon.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
moon.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the moon constant with its rotational_axis_dec member
let value = moon;
print value.rotational_axis_dec(time());
moon.state
method returns the orbital state for this body at a time
Method: moon.state - returns the orbital state for this body at a time
Syntax:
moon.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the moon constant with its state member
let value = moon;
print value.state(time());
moon.rise
method returns sunrise or moonrise events for an observer
Method: moon.rise - returns sunrise or moonrise events for an observer
Syntax:
moon.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find moon rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print moon.rise(obs, span).first();
moon.set
method returns sunset or moonset events for an observer
Method: moon.set - returns sunset or moonset events for an observer
Syntax:
moon.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find moon set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print moon.set(obs, span).first();
moon.conjunction
method returns conjunction events for this body
Method: moon.conjunction - returns conjunction events for this body
Syntax:
moon.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the moon constant with its conjunction member
let value = moon;
print value.conjunction();
moon.opposition
method returns opposition events for this body
Method: moon.opposition - returns opposition events for this body
Syntax:
moon.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the moon constant with its opposition member
let value = moon;
print value.opposition();
moon.eastern_quadrature
method returns eastern quadrature events for this body
Method: moon.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
moon.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the moon constant with its eastern_quadrature member
let value = moon;
print value.eastern_quadrature();
moon.western_quadrature
method returns western quadrature events for this body
Method: moon.western_quadrature - returns western quadrature events for this body
Syntax:
moon.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the moon constant with its western_quadrature member
let value = moon;
print value.western_quadrature();
moon.quadrature
method returns eastern and western quadrature events for this body
Method: moon.quadrature - returns eastern and western quadrature events for this body
Syntax:
moon.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the moon constant with its quadrature member
let value = moon;
print value.quadrature();
moon.periapsis
method returns periapsis events for this body
Method: moon.periapsis - returns periapsis events for this body
Syntax:
moon.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the moon help entry
let value = moon;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "moon", value.periapsis(span).first();
moon.apoapsis
method returns apoapsis events for this body
Method: moon.apoapsis - returns apoapsis events for this body
Syntax:
moon.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the moon help entry
let value = moon;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "moon", value.apoapsis(span).first();
moon.children
method lists child fields and callable members available on this value
Method: moon.children - lists child fields and callable members available on this value
Syntax:
moon.children() -> List
Examples
# Inspect child entries available from the moon constant
let value = moon;
print value.children();
moon.fields
method returns an object containing the value's plain fields
Method: moon.fields - returns an object containing the value's plain fields
Syntax:
moon.fields() -> Object
Examples
# Inspect plain fields on the moon constant
let value = moon;
print value.fields();
moon.functions
method lists callable members available on this value
Method: moon.functions - lists callable members available on this value
Syntax:
moon.functions() -> List
Examples
# Inspect callable members on the moon constant
let value = moon;
print value.functions();
earth.name
field canonical body name
Field: earth.name - canonical body name
Syntax:
earth.name -> Text
Examples
# Use earth.name as the label in a body catalog row
let row = {label: earth.name, radius: earth.radius};
print row.label, row.radius;
earth.kind
field reference body kind
Field: earth.kind - reference body kind
Syntax:
earth.kind -> Text
Examples
# Use earth.kind to group a body catalog row
let row = {name: earth.name, group: earth.kind};
print row.group, row.name;
earth.xmu
field gravitational parameter in km^3/s^2
Field: earth.xmu - gravitational parameter in km^3/s^2
Syntax:
earth.xmu -> Number
Examples
# Compare earth gravitational parameter with Earth
print earth.name, earth.xmu, earth.xmu / earth.xmu;
earth.radius
field body radius in km
Field: earth.radius - body radius in km
Syntax:
earth.radius -> Number
Examples
# Compare earth radius with Earth for scale estimates
print earth.name, earth.radius, earth.radius / earth.radius;
earth.mass
field body mass in kg
Field: earth.mass - body mass in kg
Syntax:
earth.mass -> Number
Examples
# Compare earth mass with Earth for scale estimates
print earth.name, earth.mass, earth.mass / earth.mass;
earth.H
field reference absolute magnitude parameter
Field: earth.H - reference absolute magnitude parameter
Syntax:
earth.H -> Number
Examples
# Use earth.H as the absolute magnitude term in a report
print earth.name, earth.H;
earth.n
field reference illumination exponent
Field: earth.n - reference illumination exponent
Syntax:
earth.n -> Number
Examples
# Use earth.n as the photometric phase slope term
print earth.name, earth.n, earth.H + earth.n;
earth.k
field reference G Muller constant
Field: earth.k - reference G Muller constant
Syntax:
earth.k -> Number
Examples
# Use earth.k as the photometric curvature term
print earth.name, earth.k, earth.H + earth.k;
earth.known
field whether the body name matched the built-in table
Field: earth.known - whether the body name matched the built-in table
Syntax:
earth.known -> Bool
Examples
# Verify whether earth has built-in physical metadata
print earth.name, earth.known;
earth.rotational_axis
method returns this body's rotational north pole at a time
Method: earth.rotational_axis - returns this body's rotational north pole at a time
Syntax:
earth.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the earth constant with its rotational_axis member
let value = earth;
print value.rotational_axis(time());
earth.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: earth.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
earth.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the earth constant with its rotational_axis_ra member
let value = earth;
print value.rotational_axis_ra(time());
earth.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: earth.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
earth.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the earth constant with its rotational_axis_dec member
let value = earth;
print value.rotational_axis_dec(time());
earth.state
method returns the orbital state for this body at a time
Method: earth.state - returns the orbital state for this body at a time
Syntax:
earth.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the earth constant with its state member
let value = earth;
print value.state(time());
earth.periapsis
method returns periapsis events for this body
Method: earth.periapsis - returns periapsis events for this body
Syntax:
earth.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the earth help entry
let value = earth;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "earth", value.periapsis(span).first();
earth.apoapsis
method returns apoapsis events for this body
Method: earth.apoapsis - returns apoapsis events for this body
Syntax:
earth.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the earth help entry
let value = earth;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "earth", value.apoapsis(span).first();
earth.children
method lists child fields and callable members available on this value
Method: earth.children - lists child fields and callable members available on this value
Syntax:
earth.children() -> List
Examples
# Inspect child entries available from the earth constant
let value = earth;
print value.children();
earth.fields
method returns an object containing the value's plain fields
Method: earth.fields - returns an object containing the value's plain fields
Syntax:
earth.fields() -> Object
Examples
# Inspect plain fields on the earth constant
let value = earth;
print value.fields();
earth.functions
method lists callable members available on this value
Method: earth.functions - lists callable members available on this value
Syntax:
earth.functions() -> List
Examples
# Inspect callable members on the earth constant
let value = earth;
print value.functions();
mars.name
field canonical body name
Field: mars.name - canonical body name
Syntax:
mars.name -> Text
Examples
# Use mars.name as the label in a body catalog row
let row = {label: mars.name, radius: mars.radius};
print row.label, row.radius;
mars.kind
field reference body kind
Field: mars.kind - reference body kind
Syntax:
mars.kind -> Text
Examples
# Use mars.kind to group a body catalog row
let row = {name: mars.name, group: mars.kind};
print row.group, row.name;
mars.xmu
field gravitational parameter in km^3/s^2
Field: mars.xmu - gravitational parameter in km^3/s^2
Syntax:
mars.xmu -> Number
Examples
# Compare mars gravitational parameter with Earth
print mars.name, mars.xmu, mars.xmu / earth.xmu;
mars.radius
field body radius in km
Field: mars.radius - body radius in km
Syntax:
mars.radius -> Number
Examples
# Compare mars radius with Earth for scale estimates
print mars.name, mars.radius, mars.radius / earth.radius;
mars.mass
field body mass in kg
Field: mars.mass - body mass in kg
Syntax:
mars.mass -> Number
Examples
# Compare mars mass with Earth for scale estimates
print mars.name, mars.mass, mars.mass / earth.mass;
mars.H
field reference absolute magnitude parameter
Field: mars.H - reference absolute magnitude parameter
Syntax:
mars.H -> Number
Examples
# Use mars.H as the absolute magnitude term in a report
print mars.name, mars.H;
mars.n
field reference illumination exponent
Field: mars.n - reference illumination exponent
Syntax:
mars.n -> Number
Examples
# Use mars.n as the photometric phase slope term
print mars.name, mars.n, mars.H + mars.n;
mars.k
field reference G Muller constant
Field: mars.k - reference G Muller constant
Syntax:
mars.k -> Number
Examples
# Use mars.k as the photometric curvature term
print mars.name, mars.k, mars.H + mars.k;
mars.known
field whether the body name matched the built-in table
Field: mars.known - whether the body name matched the built-in table
Syntax:
mars.known -> Bool
Examples
# Verify whether mars has built-in physical metadata
print mars.name, mars.known;
mars.rotational_axis
method returns this body's rotational north pole at a time
Method: mars.rotational_axis - returns this body's rotational north pole at a time
Syntax:
mars.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mars constant with its rotational_axis member
let value = mars;
print value.rotational_axis(time());
mars.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: mars.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
mars.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mars constant with its rotational_axis_ra member
let value = mars;
print value.rotational_axis_ra(time());
mars.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: mars.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
mars.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mars constant with its rotational_axis_dec member
let value = mars;
print value.rotational_axis_dec(time());
mars.state
method returns the orbital state for this body at a time
Method: mars.state - returns the orbital state for this body at a time
Syntax:
mars.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the mars constant with its state member
let value = mars;
print value.state(time());
mars.rise
method returns sunrise or moonrise events for an observer
Method: mars.rise - returns sunrise or moonrise events for an observer
Syntax:
mars.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find mars rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print mars.rise(obs, span).first();
mars.set
method returns sunset or moonset events for an observer
Method: mars.set - returns sunset or moonset events for an observer
Syntax:
mars.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find mars set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print mars.set(obs, span).first();
mars.conjunction
method returns conjunction events for this body
Method: mars.conjunction - returns conjunction events for this body
Syntax:
mars.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mars constant with its conjunction member
let value = mars;
print value.conjunction();
mars.opposition
method returns opposition events for this body
Method: mars.opposition - returns opposition events for this body
Syntax:
mars.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mars constant with its opposition member
let value = mars;
print value.opposition();
mars.eastern_quadrature
method returns eastern quadrature events for this body
Method: mars.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
mars.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mars constant with its eastern_quadrature member
let value = mars;
print value.eastern_quadrature();
mars.western_quadrature
method returns western quadrature events for this body
Method: mars.western_quadrature - returns western quadrature events for this body
Syntax:
mars.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mars constant with its western_quadrature member
let value = mars;
print value.western_quadrature();
mars.quadrature
method returns eastern and western quadrature events for this body
Method: mars.quadrature - returns eastern and western quadrature events for this body
Syntax:
mars.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the mars constant with its quadrature member
let value = mars;
print value.quadrature();
mars.periapsis
method returns periapsis events for this body
Method: mars.periapsis - returns periapsis events for this body
Syntax:
mars.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the mars help entry
let value = mars;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "mars", value.periapsis(span).first();
mars.apoapsis
method returns apoapsis events for this body
Method: mars.apoapsis - returns apoapsis events for this body
Syntax:
mars.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the mars help entry
let value = mars;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "mars", value.apoapsis(span).first();
mars.children
method lists child fields and callable members available on this value
Method: mars.children - lists child fields and callable members available on this value
Syntax:
mars.children() -> List
Examples
# Inspect child entries available from the mars constant
let value = mars;
print value.children();
mars.fields
method returns an object containing the value's plain fields
Method: mars.fields - returns an object containing the value's plain fields
Syntax:
mars.fields() -> Object
Examples
# Inspect plain fields on the mars constant
let value = mars;
print value.fields();
mars.functions
method lists callable members available on this value
Method: mars.functions - lists callable members available on this value
Syntax:
mars.functions() -> List
Examples
# Inspect callable members on the mars constant
let value = mars;
print value.functions();
jupiter.name
field canonical body name
Field: jupiter.name - canonical body name
Syntax:
jupiter.name -> Text
Examples
# Use jupiter.name as the label in a body catalog row
let row = {label: jupiter.name, radius: jupiter.radius};
print row.label, row.radius;
jupiter.kind
field reference body kind
Field: jupiter.kind - reference body kind
Syntax:
jupiter.kind -> Text
Examples
# Use jupiter.kind to group a body catalog row
let row = {name: jupiter.name, group: jupiter.kind};
print row.group, row.name;
jupiter.xmu
field gravitational parameter in km^3/s^2
Field: jupiter.xmu - gravitational parameter in km^3/s^2
Syntax:
jupiter.xmu -> Number
Examples
# Compare jupiter gravitational parameter with Earth
print jupiter.name, jupiter.xmu, jupiter.xmu / earth.xmu;
jupiter.radius
field body radius in km
Field: jupiter.radius - body radius in km
Syntax:
jupiter.radius -> Number
Examples
# Compare jupiter radius with Earth for scale estimates
print jupiter.name, jupiter.radius, jupiter.radius / earth.radius;
jupiter.mass
field body mass in kg
Field: jupiter.mass - body mass in kg
Syntax:
jupiter.mass -> Number
Examples
# Compare jupiter mass with Earth for scale estimates
print jupiter.name, jupiter.mass, jupiter.mass / earth.mass;
jupiter.H
field reference absolute magnitude parameter
Field: jupiter.H - reference absolute magnitude parameter
Syntax:
jupiter.H -> Number
Examples
# Use jupiter.H as the absolute magnitude term in a report
print jupiter.name, jupiter.H;
jupiter.n
field reference illumination exponent
Field: jupiter.n - reference illumination exponent
Syntax:
jupiter.n -> Number
Examples
# Use jupiter.n as the photometric phase slope term
print jupiter.name, jupiter.n, jupiter.H + jupiter.n;
jupiter.k
field reference G Muller constant
Field: jupiter.k - reference G Muller constant
Syntax:
jupiter.k -> Number
Examples
# Use jupiter.k as the photometric curvature term
print jupiter.name, jupiter.k, jupiter.H + jupiter.k;
jupiter.known
field whether the body name matched the built-in table
Field: jupiter.known - whether the body name matched the built-in table
Syntax:
jupiter.known -> Bool
Examples
# Verify whether jupiter has built-in physical metadata
print jupiter.name, jupiter.known;
jupiter.rotational_axis
method returns this body's rotational north pole at a time
Method: jupiter.rotational_axis - returns this body's rotational north pole at a time
Syntax:
jupiter.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the jupiter constant with its rotational_axis member
let value = jupiter;
print value.rotational_axis(time());
jupiter.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: jupiter.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
jupiter.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the jupiter constant with its rotational_axis_ra member
let value = jupiter;
print value.rotational_axis_ra(time());
jupiter.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: jupiter.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
jupiter.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the jupiter constant with its rotational_axis_dec member
let value = jupiter;
print value.rotational_axis_dec(time());
jupiter.state
method returns the orbital state for this body at a time
Method: jupiter.state - returns the orbital state for this body at a time
Syntax:
jupiter.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the jupiter constant with its state member
let value = jupiter;
print value.state(time());
jupiter.rise
method returns sunrise or moonrise events for an observer
Method: jupiter.rise - returns sunrise or moonrise events for an observer
Syntax:
jupiter.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find jupiter rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print jupiter.rise(obs, span).first();
jupiter.set
method returns sunset or moonset events for an observer
Method: jupiter.set - returns sunset or moonset events for an observer
Syntax:
jupiter.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find jupiter set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print jupiter.set(obs, span).first();
jupiter.conjunction
method returns conjunction events for this body
Method: jupiter.conjunction - returns conjunction events for this body
Syntax:
jupiter.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the jupiter constant with its conjunction member
let value = jupiter;
print value.conjunction();
jupiter.opposition
method returns opposition events for this body
Method: jupiter.opposition - returns opposition events for this body
Syntax:
jupiter.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the jupiter constant with its opposition member
let value = jupiter;
print value.opposition();
jupiter.eastern_quadrature
method returns eastern quadrature events for this body
Method: jupiter.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
jupiter.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the jupiter constant with its eastern_quadrature member
let value = jupiter;
print value.eastern_quadrature();
jupiter.western_quadrature
method returns western quadrature events for this body
Method: jupiter.western_quadrature - returns western quadrature events for this body
Syntax:
jupiter.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the jupiter constant with its western_quadrature member
let value = jupiter;
print value.western_quadrature();
jupiter.quadrature
method returns eastern and western quadrature events for this body
Method: jupiter.quadrature - returns eastern and western quadrature events for this body
Syntax:
jupiter.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the jupiter constant with its quadrature member
let value = jupiter;
print value.quadrature();
jupiter.periapsis
method returns periapsis events for this body
Method: jupiter.periapsis - returns periapsis events for this body
Syntax:
jupiter.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the jupiter help entry
let value = jupiter;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "jupiter", value.periapsis(span).first();
jupiter.apoapsis
method returns apoapsis events for this body
Method: jupiter.apoapsis - returns apoapsis events for this body
Syntax:
jupiter.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the jupiter help entry
let value = jupiter;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "jupiter", value.apoapsis(span).first();
jupiter.children
method lists child fields and callable members available on this value
Method: jupiter.children - lists child fields and callable members available on this value
Syntax:
jupiter.children() -> List
Examples
# Inspect child entries available from the jupiter constant
let value = jupiter;
print value.children();
jupiter.fields
method returns an object containing the value's plain fields
Method: jupiter.fields - returns an object containing the value's plain fields
Syntax:
jupiter.fields() -> Object
Examples
# Inspect plain fields on the jupiter constant
let value = jupiter;
print value.fields();
jupiter.functions
method lists callable members available on this value
Method: jupiter.functions - lists callable members available on this value
Syntax:
jupiter.functions() -> List
Examples
# Inspect callable members on the jupiter constant
let value = jupiter;
print value.functions();
saturn.name
field canonical body name
Field: saturn.name - canonical body name
Syntax:
saturn.name -> Text
Examples
# Use saturn.name as the label in a body catalog row
let row = {label: saturn.name, radius: saturn.radius};
print row.label, row.radius;
saturn.kind
field reference body kind
Field: saturn.kind - reference body kind
Syntax:
saturn.kind -> Text
Examples
# Use saturn.kind to group a body catalog row
let row = {name: saturn.name, group: saturn.kind};
print row.group, row.name;
saturn.xmu
field gravitational parameter in km^3/s^2
Field: saturn.xmu - gravitational parameter in km^3/s^2
Syntax:
saturn.xmu -> Number
Examples
# Compare saturn gravitational parameter with Earth
print saturn.name, saturn.xmu, saturn.xmu / earth.xmu;
saturn.radius
field body radius in km
Field: saturn.radius - body radius in km
Syntax:
saturn.radius -> Number
Examples
# Compare saturn radius with Earth for scale estimates
print saturn.name, saturn.radius, saturn.radius / earth.radius;
saturn.mass
field body mass in kg
Field: saturn.mass - body mass in kg
Syntax:
saturn.mass -> Number
Examples
# Compare saturn mass with Earth for scale estimates
print saturn.name, saturn.mass, saturn.mass / earth.mass;
saturn.H
field reference absolute magnitude parameter
Field: saturn.H - reference absolute magnitude parameter
Syntax:
saturn.H -> Number
Examples
# Use saturn.H as the absolute magnitude term in a report
print saturn.name, saturn.H;
saturn.n
field reference illumination exponent
Field: saturn.n - reference illumination exponent
Syntax:
saturn.n -> Number
Examples
# Use saturn.n as the photometric phase slope term
print saturn.name, saturn.n, saturn.H + saturn.n;
saturn.k
field reference G Muller constant
Field: saturn.k - reference G Muller constant
Syntax:
saturn.k -> Number
Examples
# Use saturn.k as the photometric curvature term
print saturn.name, saturn.k, saturn.H + saturn.k;
saturn.known
field whether the body name matched the built-in table
Field: saturn.known - whether the body name matched the built-in table
Syntax:
saturn.known -> Bool
Examples
# Verify whether saturn has built-in physical metadata
print saturn.name, saturn.known;
saturn.rotational_axis
method returns this body's rotational north pole at a time
Method: saturn.rotational_axis - returns this body's rotational north pole at a time
Syntax:
saturn.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the saturn constant with its rotational_axis member
let value = saturn;
print value.rotational_axis(time());
saturn.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: saturn.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
saturn.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the saturn constant with its rotational_axis_ra member
let value = saturn;
print value.rotational_axis_ra(time());
saturn.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: saturn.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
saturn.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the saturn constant with its rotational_axis_dec member
let value = saturn;
print value.rotational_axis_dec(time());
saturn.state
method returns the orbital state for this body at a time
Method: saturn.state - returns the orbital state for this body at a time
Syntax:
saturn.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the saturn constant with its state member
let value = saturn;
print value.state(time());
saturn.rise
method returns sunrise or moonrise events for an observer
Method: saturn.rise - returns sunrise or moonrise events for an observer
Syntax:
saturn.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find saturn rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print saturn.rise(obs, span).first();
saturn.set
method returns sunset or moonset events for an observer
Method: saturn.set - returns sunset or moonset events for an observer
Syntax:
saturn.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find saturn set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print saturn.set(obs, span).first();
saturn.conjunction
method returns conjunction events for this body
Method: saturn.conjunction - returns conjunction events for this body
Syntax:
saturn.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the saturn constant with its conjunction member
let value = saturn;
print value.conjunction();
saturn.opposition
method returns opposition events for this body
Method: saturn.opposition - returns opposition events for this body
Syntax:
saturn.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the saturn constant with its opposition member
let value = saturn;
print value.opposition();
saturn.eastern_quadrature
method returns eastern quadrature events for this body
Method: saturn.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
saturn.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the saturn constant with its eastern_quadrature member
let value = saturn;
print value.eastern_quadrature();
saturn.western_quadrature
method returns western quadrature events for this body
Method: saturn.western_quadrature - returns western quadrature events for this body
Syntax:
saturn.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the saturn constant with its western_quadrature member
let value = saturn;
print value.western_quadrature();
saturn.quadrature
method returns eastern and western quadrature events for this body
Method: saturn.quadrature - returns eastern and western quadrature events for this body
Syntax:
saturn.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the saturn constant with its quadrature member
let value = saturn;
print value.quadrature();
saturn.periapsis
method returns periapsis events for this body
Method: saturn.periapsis - returns periapsis events for this body
Syntax:
saturn.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the saturn help entry
let value = saturn;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "saturn", value.periapsis(span).first();
saturn.apoapsis
method returns apoapsis events for this body
Method: saturn.apoapsis - returns apoapsis events for this body
Syntax:
saturn.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the saturn help entry
let value = saturn;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "saturn", value.apoapsis(span).first();
saturn.children
method lists child fields and callable members available on this value
Method: saturn.children - lists child fields and callable members available on this value
Syntax:
saturn.children() -> List
Examples
# Inspect child entries available from the saturn constant
let value = saturn;
print value.children();
saturn.fields
method returns an object containing the value's plain fields
Method: saturn.fields - returns an object containing the value's plain fields
Syntax:
saturn.fields() -> Object
Examples
# Inspect plain fields on the saturn constant
let value = saturn;
print value.fields();
saturn.functions
method lists callable members available on this value
Method: saturn.functions - lists callable members available on this value
Syntax:
saturn.functions() -> List
Examples
# Inspect callable members on the saturn constant
let value = saturn;
print value.functions();
uranus.name
field canonical body name
Field: uranus.name - canonical body name
Syntax:
uranus.name -> Text
Examples
# Use uranus.name as the label in a body catalog row
let row = {label: uranus.name, radius: uranus.radius};
print row.label, row.radius;
uranus.kind
field reference body kind
Field: uranus.kind - reference body kind
Syntax:
uranus.kind -> Text
Examples
# Use uranus.kind to group a body catalog row
let row = {name: uranus.name, group: uranus.kind};
print row.group, row.name;
uranus.xmu
field gravitational parameter in km^3/s^2
Field: uranus.xmu - gravitational parameter in km^3/s^2
Syntax:
uranus.xmu -> Number
Examples
# Compare uranus gravitational parameter with Earth
print uranus.name, uranus.xmu, uranus.xmu / earth.xmu;
uranus.radius
field body radius in km
Field: uranus.radius - body radius in km
Syntax:
uranus.radius -> Number
Examples
# Compare uranus radius with Earth for scale estimates
print uranus.name, uranus.radius, uranus.radius / earth.radius;
uranus.mass
field body mass in kg
Field: uranus.mass - body mass in kg
Syntax:
uranus.mass -> Number
Examples
# Compare uranus mass with Earth for scale estimates
print uranus.name, uranus.mass, uranus.mass / earth.mass;
uranus.H
field reference absolute magnitude parameter
Field: uranus.H - reference absolute magnitude parameter
Syntax:
uranus.H -> Number
Examples
# Use uranus.H as the absolute magnitude term in a report
print uranus.name, uranus.H;
uranus.n
field reference illumination exponent
Field: uranus.n - reference illumination exponent
Syntax:
uranus.n -> Number
Examples
# Use uranus.n as the photometric phase slope term
print uranus.name, uranus.n, uranus.H + uranus.n;
uranus.k
field reference G Muller constant
Field: uranus.k - reference G Muller constant
Syntax:
uranus.k -> Number
Examples
# Use uranus.k as the photometric curvature term
print uranus.name, uranus.k, uranus.H + uranus.k;
uranus.known
field whether the body name matched the built-in table
Field: uranus.known - whether the body name matched the built-in table
Syntax:
uranus.known -> Bool
Examples
# Verify whether uranus has built-in physical metadata
print uranus.name, uranus.known;
uranus.rotational_axis
method returns this body's rotational north pole at a time
Method: uranus.rotational_axis - returns this body's rotational north pole at a time
Syntax:
uranus.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the uranus constant with its rotational_axis member
let value = uranus;
print value.rotational_axis(time());
uranus.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: uranus.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
uranus.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the uranus constant with its rotational_axis_ra member
let value = uranus;
print value.rotational_axis_ra(time());
uranus.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: uranus.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
uranus.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the uranus constant with its rotational_axis_dec member
let value = uranus;
print value.rotational_axis_dec(time());
uranus.state
method returns the orbital state for this body at a time
Method: uranus.state - returns the orbital state for this body at a time
Syntax:
uranus.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the uranus constant with its state member
let value = uranus;
print value.state(time());
uranus.rise
method returns sunrise or moonrise events for an observer
Method: uranus.rise - returns sunrise or moonrise events for an observer
Syntax:
uranus.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find uranus rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print uranus.rise(obs, span).first();
uranus.set
method returns sunset or moonset events for an observer
Method: uranus.set - returns sunset or moonset events for an observer
Syntax:
uranus.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find uranus set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print uranus.set(obs, span).first();
uranus.conjunction
method returns conjunction events for this body
Method: uranus.conjunction - returns conjunction events for this body
Syntax:
uranus.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the uranus constant with its conjunction member
let value = uranus;
print value.conjunction();
uranus.opposition
method returns opposition events for this body
Method: uranus.opposition - returns opposition events for this body
Syntax:
uranus.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the uranus constant with its opposition member
let value = uranus;
print value.opposition();
uranus.eastern_quadrature
method returns eastern quadrature events for this body
Method: uranus.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
uranus.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the uranus constant with its eastern_quadrature member
let value = uranus;
print value.eastern_quadrature();
uranus.western_quadrature
method returns western quadrature events for this body
Method: uranus.western_quadrature - returns western quadrature events for this body
Syntax:
uranus.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the uranus constant with its western_quadrature member
let value = uranus;
print value.western_quadrature();
uranus.quadrature
method returns eastern and western quadrature events for this body
Method: uranus.quadrature - returns eastern and western quadrature events for this body
Syntax:
uranus.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the uranus constant with its quadrature member
let value = uranus;
print value.quadrature();
uranus.periapsis
method returns periapsis events for this body
Method: uranus.periapsis - returns periapsis events for this body
Syntax:
uranus.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the uranus help entry
let value = uranus;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "uranus", value.periapsis(span).first();
uranus.apoapsis
method returns apoapsis events for this body
Method: uranus.apoapsis - returns apoapsis events for this body
Syntax:
uranus.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the uranus help entry
let value = uranus;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "uranus", value.apoapsis(span).first();
uranus.children
method lists child fields and callable members available on this value
Method: uranus.children - lists child fields and callable members available on this value
Syntax:
uranus.children() -> List
Examples
# Inspect child entries available from the uranus constant
let value = uranus;
print value.children();
uranus.fields
method returns an object containing the value's plain fields
Method: uranus.fields - returns an object containing the value's plain fields
Syntax:
uranus.fields() -> Object
Examples
# Inspect plain fields on the uranus constant
let value = uranus;
print value.fields();
uranus.functions
method lists callable members available on this value
Method: uranus.functions - lists callable members available on this value
Syntax:
uranus.functions() -> List
Examples
# Inspect callable members on the uranus constant
let value = uranus;
print value.functions();
neptune.name
field canonical body name
Field: neptune.name - canonical body name
Syntax:
neptune.name -> Text
Examples
# Use neptune.name as the label in a body catalog row
let row = {label: neptune.name, radius: neptune.radius};
print row.label, row.radius;
neptune.kind
field reference body kind
Field: neptune.kind - reference body kind
Syntax:
neptune.kind -> Text
Examples
# Use neptune.kind to group a body catalog row
let row = {name: neptune.name, group: neptune.kind};
print row.group, row.name;
neptune.xmu
field gravitational parameter in km^3/s^2
Field: neptune.xmu - gravitational parameter in km^3/s^2
Syntax:
neptune.xmu -> Number
Examples
# Compare neptune gravitational parameter with Earth
print neptune.name, neptune.xmu, neptune.xmu / earth.xmu;
neptune.radius
field body radius in km
Field: neptune.radius - body radius in km
Syntax:
neptune.radius -> Number
Examples
# Compare neptune radius with Earth for scale estimates
print neptune.name, neptune.radius, neptune.radius / earth.radius;
neptune.mass
field body mass in kg
Field: neptune.mass - body mass in kg
Syntax:
neptune.mass -> Number
Examples
# Compare neptune mass with Earth for scale estimates
print neptune.name, neptune.mass, neptune.mass / earth.mass;
neptune.H
field reference absolute magnitude parameter
Field: neptune.H - reference absolute magnitude parameter
Syntax:
neptune.H -> Number
Examples
# Use neptune.H as the absolute magnitude term in a report
print neptune.name, neptune.H;
neptune.n
field reference illumination exponent
Field: neptune.n - reference illumination exponent
Syntax:
neptune.n -> Number
Examples
# Use neptune.n as the photometric phase slope term
print neptune.name, neptune.n, neptune.H + neptune.n;
neptune.k
field reference G Muller constant
Field: neptune.k - reference G Muller constant
Syntax:
neptune.k -> Number
Examples
# Use neptune.k as the photometric curvature term
print neptune.name, neptune.k, neptune.H + neptune.k;
neptune.known
field whether the body name matched the built-in table
Field: neptune.known - whether the body name matched the built-in table
Syntax:
neptune.known -> Bool
Examples
# Verify whether neptune has built-in physical metadata
print neptune.name, neptune.known;
neptune.rotational_axis
method returns this body's rotational north pole at a time
Method: neptune.rotational_axis - returns this body's rotational north pole at a time
Syntax:
neptune.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the neptune constant with its rotational_axis member
let value = neptune;
print value.rotational_axis(time());
neptune.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: neptune.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
neptune.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the neptune constant with its rotational_axis_ra member
let value = neptune;
print value.rotational_axis_ra(time());
neptune.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: neptune.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
neptune.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the neptune constant with its rotational_axis_dec member
let value = neptune;
print value.rotational_axis_dec(time());
neptune.state
method returns the orbital state for this body at a time
Method: neptune.state - returns the orbital state for this body at a time
Syntax:
neptune.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the neptune constant with its state member
let value = neptune;
print value.state(time());
neptune.rise
method returns sunrise or moonrise events for an observer
Method: neptune.rise - returns sunrise or moonrise events for an observer
Syntax:
neptune.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find neptune rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print neptune.rise(obs, span).first();
neptune.set
method returns sunset or moonset events for an observer
Method: neptune.set - returns sunset or moonset events for an observer
Syntax:
neptune.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find neptune set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print neptune.set(obs, span).first();
neptune.conjunction
method returns conjunction events for this body
Method: neptune.conjunction - returns conjunction events for this body
Syntax:
neptune.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the neptune constant with its conjunction member
let value = neptune;
print value.conjunction();
neptune.opposition
method returns opposition events for this body
Method: neptune.opposition - returns opposition events for this body
Syntax:
neptune.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the neptune constant with its opposition member
let value = neptune;
print value.opposition();
neptune.eastern_quadrature
method returns eastern quadrature events for this body
Method: neptune.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
neptune.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the neptune constant with its eastern_quadrature member
let value = neptune;
print value.eastern_quadrature();
neptune.western_quadrature
method returns western quadrature events for this body
Method: neptune.western_quadrature - returns western quadrature events for this body
Syntax:
neptune.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the neptune constant with its western_quadrature member
let value = neptune;
print value.western_quadrature();
neptune.quadrature
method returns eastern and western quadrature events for this body
Method: neptune.quadrature - returns eastern and western quadrature events for this body
Syntax:
neptune.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the neptune constant with its quadrature member
let value = neptune;
print value.quadrature();
neptune.periapsis
method returns periapsis events for this body
Method: neptune.periapsis - returns periapsis events for this body
Syntax:
neptune.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the neptune help entry
let value = neptune;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "neptune", value.periapsis(span).first();
neptune.apoapsis
method returns apoapsis events for this body
Method: neptune.apoapsis - returns apoapsis events for this body
Syntax:
neptune.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the neptune help entry
let value = neptune;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "neptune", value.apoapsis(span).first();
neptune.children
method lists child fields and callable members available on this value
Method: neptune.children - lists child fields and callable members available on this value
Syntax:
neptune.children() -> List
Examples
# Inspect child entries available from the neptune constant
let value = neptune;
print value.children();
neptune.fields
method returns an object containing the value's plain fields
Method: neptune.fields - returns an object containing the value's plain fields
Syntax:
neptune.fields() -> Object
Examples
# Inspect plain fields on the neptune constant
let value = neptune;
print value.fields();
neptune.functions
method lists callable members available on this value
Method: neptune.functions - lists callable members available on this value
Syntax:
neptune.functions() -> List
Examples
# Inspect callable members on the neptune constant
let value = neptune;
print value.functions();
pluto.name
field canonical body name
Field: pluto.name - canonical body name
Syntax:
pluto.name -> Text
Examples
# Use pluto.name as the label in a body catalog row
let row = {label: pluto.name, radius: pluto.radius};
print row.label, row.radius;
pluto.kind
field reference body kind
Field: pluto.kind - reference body kind
Syntax:
pluto.kind -> Text
Examples
# Use pluto.kind to group a body catalog row
let row = {name: pluto.name, group: pluto.kind};
print row.group, row.name;
pluto.xmu
field gravitational parameter in km^3/s^2
Field: pluto.xmu - gravitational parameter in km^3/s^2
Syntax:
pluto.xmu -> Number
Examples
# Compare pluto gravitational parameter with Earth
print pluto.name, pluto.xmu, pluto.xmu / earth.xmu;
pluto.radius
field body radius in km
Field: pluto.radius - body radius in km
Syntax:
pluto.radius -> Number
Examples
# Compare pluto radius with Earth for scale estimates
print pluto.name, pluto.radius, pluto.radius / earth.radius;
pluto.mass
field body mass in kg
Field: pluto.mass - body mass in kg
Syntax:
pluto.mass -> Number
Examples
# Compare pluto mass with Earth for scale estimates
print pluto.name, pluto.mass, pluto.mass / earth.mass;
pluto.H
field reference absolute magnitude parameter
Field: pluto.H - reference absolute magnitude parameter
Syntax:
pluto.H -> Number
Examples
# Use pluto.H as the absolute magnitude term in a report
print pluto.name, pluto.H;
pluto.n
field reference illumination exponent
Field: pluto.n - reference illumination exponent
Syntax:
pluto.n -> Number
Examples
# Use pluto.n as the photometric phase slope term
print pluto.name, pluto.n, pluto.H + pluto.n;
pluto.k
field reference G Muller constant
Field: pluto.k - reference G Muller constant
Syntax:
pluto.k -> Number
Examples
# Use pluto.k as the photometric curvature term
print pluto.name, pluto.k, pluto.H + pluto.k;
pluto.known
field whether the body name matched the built-in table
Field: pluto.known - whether the body name matched the built-in table
Syntax:
pluto.known -> Bool
Examples
# Verify whether pluto has built-in physical metadata
print pluto.name, pluto.known;
pluto.rotational_axis
method returns this body's rotational north pole at a time
Method: pluto.rotational_axis - returns this body's rotational north pole at a time
Syntax:
pluto.rotational_axis(time: Time) -> Object
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the pluto constant with its rotational_axis member
let value = pluto;
print value.rotational_axis(time());
pluto.rotational_axis_ra
method returns the rotational north-pole right ascension in degrees
Method: pluto.rotational_axis_ra - returns the rotational north-pole right ascension in degrees
Syntax:
pluto.rotational_axis_ra(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the pluto constant with its rotational_axis_ra member
let value = pluto;
print value.rotational_axis_ra(time());
pluto.rotational_axis_dec
method returns the rotational north-pole declination in degrees
Method: pluto.rotational_axis_dec - returns the rotational north-pole declination in degrees
Syntax:
pluto.rotational_axis_dec(time: Time) -> Number
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the pluto constant with its rotational_axis_dec member
let value = pluto;
print value.rotational_axis_dec(time());
pluto.state
method returns the orbital state for this body at a time
Method: pluto.state - returns the orbital state for this body at a time
Syntax:
pluto.state(time: Time) -> State
Arguments:
time: Time - time at which to evaluate the rotational pole
Examples
# Use the pluto constant with its state member
let value = pluto;
print value.state(time());
pluto.rise
method returns sunrise or moonrise events for an observer
Method: pluto.rise - returns sunrise or moonrise events for an observer
Syntax:
pluto.rise(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find pluto rise events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print pluto.rise(obs, span).first();
pluto.set
method returns sunset or moonset events for an observer
Method: pluto.set - returns sunset or moonset events for an observer
Syntax:
pluto.set(observer: Location|Observer, range: Range) -> List|Event|Nil
Arguments:
observer: Location|Observer - Earth location or observer for the local horizon event
range: Range - time range to search; open ranges return the next event
Examples
# Find pluto set events from an explicit observer
let obs = location(latitude: 60.0, longitude: 10.0).observer(0.002);
let span = range(time(2026,1,1,0,0,0), time(2026,1,2,0,0,0));
print pluto.set(obs, span).first();
pluto.conjunction
method returns conjunction events for this body
Method: pluto.conjunction - returns conjunction events for this body
Syntax:
pluto.conjunction(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the pluto constant with its conjunction member
let value = pluto;
print value.conjunction();
pluto.opposition
method returns opposition events for this body
Method: pluto.opposition - returns opposition events for this body
Syntax:
pluto.opposition(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the pluto constant with its opposition member
let value = pluto;
print value.opposition();
pluto.eastern_quadrature
method returns eastern quadrature events for this body
Method: pluto.eastern_quadrature - returns eastern quadrature events for this body
Syntax:
pluto.eastern_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the pluto constant with its eastern_quadrature member
let value = pluto;
print value.eastern_quadrature();
pluto.western_quadrature
method returns western quadrature events for this body
Method: pluto.western_quadrature - returns western quadrature events for this body
Syntax:
pluto.western_quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the pluto constant with its western_quadrature member
let value = pluto;
print value.western_quadrature();
pluto.quadrature
method returns eastern and western quadrature events for this body
Method: pluto.quadrature - returns eastern and western quadrature events for this body
Syntax:
pluto.quadrature(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Use the pluto constant with its quadrature member
let value = pluto;
print value.quadrature();
pluto.periapsis
method returns periapsis events for this body
Method: pluto.periapsis - returns periapsis events for this body
Syntax:
pluto.periapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find periapsis events for the pluto help entry
let value = pluto;
let span = range(time(2024,1,1,0,0,0), time(2024,1,10,0,0,0), 1);
print "pluto", value.periapsis(span).first();
pluto.apoapsis
method returns apoapsis events for this body
Method: pluto.apoapsis - returns apoapsis events for this body
Syntax:
pluto.apoapsis(time: Time|Range, stop: Time, count: Number) -> List|Event|Nil
Arguments:
time: Time|Range [optional] - start time for the next event, start/stop times, or time range to search
stop: Time [optional] - optional stop time when passing start and stop times separately
count: Number [optional] - maximum number of events to return
Examples
# Find apoapsis events for the pluto help entry
let value = pluto;
let span = range(time(2024,7,1,0,0,0), time(2024,7,10,0,0,0), 1);
print "pluto", value.apoapsis(span).first();
pluto.children
method lists child fields and callable members available on this value
Method: pluto.children - lists child fields and callable members available on this value
Syntax:
pluto.children() -> List
Examples
# Inspect child entries available from the pluto constant
let value = pluto;
print value.children();
pluto.fields
method returns an object containing the value's plain fields
Method: pluto.fields - returns an object containing the value's plain fields
Syntax:
pluto.fields() -> Object
Examples
# Inspect plain fields on the pluto constant
let value = pluto;
print value.fields();
pluto.functions
method lists callable members available on this value
Method: pluto.functions - lists callable members available on this value
Syntax:
pluto.functions() -> List
Examples
# Inspect callable members on the pluto constant
let value = pluto;
print value.functions();
monday
constant ISO weekday Monday with Monday as 1 and Sunday as 7
Constant: monday - ISO weekday Monday with Monday as 1 and Sunday as 7
Syntax:
monday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use monday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), monday.name();
tuesday
constant ISO weekday Tuesday with Monday as 1 and Sunday as 7
Constant: tuesday - ISO weekday Tuesday with Monday as 1 and Sunday as 7
Syntax:
tuesday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use tuesday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), tuesday.name();
wednesday
constant ISO weekday Wednesday with Monday as 1 and Sunday as 7
Constant: wednesday - ISO weekday Wednesday with Monday as 1 and Sunday as 7
Syntax:
wednesday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use wednesday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), wednesday.name();
thursday
constant ISO weekday Thursday with Monday as 1 and Sunday as 7
Constant: thursday - ISO weekday Thursday with Monday as 1 and Sunday as 7
Syntax:
thursday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use thursday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), thursday.name();
friday
constant ISO weekday Friday with Monday as 1 and Sunday as 7
Constant: friday - ISO weekday Friday with Monday as 1 and Sunday as 7
Syntax:
friday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use friday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), friday.name();
saturday
constant ISO weekday Saturday with Monday as 1 and Sunday as 7
Constant: saturday - ISO weekday Saturday with Monday as 1 and Sunday as 7
Syntax:
saturday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use saturday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), saturday.name();
sunday
constant ISO weekday Sunday with Monday as 1 and Sunday as 7
Constant: sunday - ISO weekday Sunday with Monday as 1 and Sunday as 7
Syntax:
sunday -> Weekday
Children: name(), short(), letter(), index(), children(), fields(), functions()
Examples
# Use sunday in a weekday report
print time(2026,7,1,12,0,0).weekday.name(), sunday.name();
monday.name
method returns the full weekday name
Method: monday.name - returns the full weekday name
Syntax:
monday.name() -> Text
Examples
# Use monday.name as a report label
let value = monday;
print value.name();
monday.short
method returns the short weekday name
Method: monday.short - returns the short weekday name
Syntax:
monday.short() -> Text
Examples
# Use monday.short for a compact calendar label
let value = monday;
print value.short();
monday.letter
method returns the one-letter weekday label
Method: monday.letter - returns the one-letter weekday label
Syntax:
monday.letter() -> Text
Examples
# Use monday.letter in a narrow weekday table
let value = monday;
print value.letter();
monday.index
method returns the ISO weekday index
Method: monday.index - returns the ISO weekday index
Syntax:
monday.index() -> Integer
Examples
# Use monday.index for weekday sorting
let value = monday;
print value.index();
monday.children
method lists child fields and callable members available on this value
Method: monday.children - lists child fields and callable members available on this value
Syntax:
monday.children() -> List
Examples
# Inspect child entries available from the monday constant
let value = monday;
print value.children();
monday.fields
method returns an object containing the value's plain fields
Method: monday.fields - returns an object containing the value's plain fields
Syntax:
monday.fields() -> Object
Examples
# Inspect plain fields on the monday constant
let value = monday;
print value.fields();
monday.functions
method lists callable members available on this value
Method: monday.functions - lists callable members available on this value
Syntax:
monday.functions() -> List
Examples
# Inspect callable members on the monday constant
let value = monday;
print value.functions();
tuesday.name
method returns the full weekday name
Method: tuesday.name - returns the full weekday name
Syntax:
tuesday.name() -> Text
Examples
# Use tuesday.name as a report label
let value = tuesday;
print value.name();
tuesday.short
method returns the short weekday name
Method: tuesday.short - returns the short weekday name
Syntax:
tuesday.short() -> Text
Examples
# Use tuesday.short for a compact calendar label
let value = tuesday;
print value.short();
tuesday.letter
method returns the one-letter weekday label
Method: tuesday.letter - returns the one-letter weekday label
Syntax:
tuesday.letter() -> Text
Examples
# Use tuesday.letter in a narrow weekday table
let value = tuesday;
print value.letter();
tuesday.index
method returns the ISO weekday index
Method: tuesday.index - returns the ISO weekday index
Syntax:
tuesday.index() -> Integer
Examples
# Use tuesday.index for weekday sorting
let value = tuesday;
print value.index();
tuesday.children
method lists child fields and callable members available on this value
Method: tuesday.children - lists child fields and callable members available on this value
Syntax:
tuesday.children() -> List
Examples
# Inspect child entries available from the tuesday constant
let value = tuesday;
print value.children();
tuesday.fields
method returns an object containing the value's plain fields
Method: tuesday.fields - returns an object containing the value's plain fields
Syntax:
tuesday.fields() -> Object
Examples
# Inspect plain fields on the tuesday constant
let value = tuesday;
print value.fields();
tuesday.functions
method lists callable members available on this value
Method: tuesday.functions - lists callable members available on this value
Syntax:
tuesday.functions() -> List
Examples
# Inspect callable members on the tuesday constant
let value = tuesday;
print value.functions();
wednesday.name
method returns the full weekday name
Method: wednesday.name - returns the full weekday name
Syntax:
wednesday.name() -> Text
Examples
# Use wednesday.name as a report label
let value = wednesday;
print value.name();
wednesday.short
method returns the short weekday name
Method: wednesday.short - returns the short weekday name
Syntax:
wednesday.short() -> Text
Examples
# Use wednesday.short for a compact calendar label
let value = wednesday;
print value.short();
wednesday.letter
method returns the one-letter weekday label
Method: wednesday.letter - returns the one-letter weekday label
Syntax:
wednesday.letter() -> Text
Examples
# Use wednesday.letter in a narrow weekday table
let value = wednesday;
print value.letter();
wednesday.index
method returns the ISO weekday index
Method: wednesday.index - returns the ISO weekday index
Syntax:
wednesday.index() -> Integer
Examples
# Use wednesday.index for weekday sorting
let value = wednesday;
print value.index();
wednesday.children
method lists child fields and callable members available on this value
Method: wednesday.children - lists child fields and callable members available on this value
Syntax:
wednesday.children() -> List
Examples
# Inspect child entries available from the wednesday constant
let value = wednesday;
print value.children();
wednesday.fields
method returns an object containing the value's plain fields
Method: wednesday.fields - returns an object containing the value's plain fields
Syntax:
wednesday.fields() -> Object
Examples
# Inspect plain fields on the wednesday constant
let value = wednesday;
print value.fields();
wednesday.functions
method lists callable members available on this value
Method: wednesday.functions - lists callable members available on this value
Syntax:
wednesday.functions() -> List
Examples
# Inspect callable members on the wednesday constant
let value = wednesday;
print value.functions();
thursday.name
method returns the full weekday name
Method: thursday.name - returns the full weekday name
Syntax:
thursday.name() -> Text
Examples
# Use thursday.name as a report label
let value = thursday;
print value.name();
thursday.short
method returns the short weekday name
Method: thursday.short - returns the short weekday name
Syntax:
thursday.short() -> Text
Examples
# Use thursday.short for a compact calendar label
let value = thursday;
print value.short();
thursday.letter
method returns the one-letter weekday label
Method: thursday.letter - returns the one-letter weekday label
Syntax:
thursday.letter() -> Text
Examples
# Use thursday.letter in a narrow weekday table
let value = thursday;
print value.letter();
thursday.index
method returns the ISO weekday index
Method: thursday.index - returns the ISO weekday index
Syntax:
thursday.index() -> Integer
Examples
# Use thursday.index for weekday sorting
let value = thursday;
print value.index();
thursday.children
method lists child fields and callable members available on this value
Method: thursday.children - lists child fields and callable members available on this value
Syntax:
thursday.children() -> List
Examples
# Inspect child entries available from the thursday constant
let value = thursday;
print value.children();
thursday.fields
method returns an object containing the value's plain fields
Method: thursday.fields - returns an object containing the value's plain fields
Syntax:
thursday.fields() -> Object
Examples
# Inspect plain fields on the thursday constant
let value = thursday;
print value.fields();
thursday.functions
method lists callable members available on this value
Method: thursday.functions - lists callable members available on this value
Syntax:
thursday.functions() -> List
Examples
# Inspect callable members on the thursday constant
let value = thursday;
print value.functions();
friday.name
method returns the full weekday name
Method: friday.name - returns the full weekday name
Syntax:
friday.name() -> Text
Examples
# Use friday.name as a report label
let value = friday;
print value.name();
friday.short
method returns the short weekday name
Method: friday.short - returns the short weekday name
Syntax:
friday.short() -> Text
Examples
# Use friday.short for a compact calendar label
let value = friday;
print value.short();
friday.letter
method returns the one-letter weekday label
Method: friday.letter - returns the one-letter weekday label
Syntax:
friday.letter() -> Text
Examples
# Use friday.letter in a narrow weekday table
let value = friday;
print value.letter();
friday.index
method returns the ISO weekday index
Method: friday.index - returns the ISO weekday index
Syntax:
friday.index() -> Integer
Examples
# Use friday.index for weekday sorting
let value = friday;
print value.index();
friday.children
method lists child fields and callable members available on this value
Method: friday.children - lists child fields and callable members available on this value
Syntax:
friday.children() -> List
Examples
# Inspect child entries available from the friday constant
let value = friday;
print value.children();
friday.fields
method returns an object containing the value's plain fields
Method: friday.fields - returns an object containing the value's plain fields
Syntax:
friday.fields() -> Object
Examples
# Inspect plain fields on the friday constant
let value = friday;
print value.fields();
friday.functions
method lists callable members available on this value
Method: friday.functions - lists callable members available on this value
Syntax:
friday.functions() -> List
Examples
# Inspect callable members on the friday constant
let value = friday;
print value.functions();
saturday.name
method returns the full weekday name
Method: saturday.name - returns the full weekday name
Syntax:
saturday.name() -> Text
Examples
# Use saturday.name as a report label
let value = saturday;
print value.name();
saturday.short
method returns the short weekday name
Method: saturday.short - returns the short weekday name
Syntax:
saturday.short() -> Text
Examples
# Use saturday.short for a compact calendar label
let value = saturday;
print value.short();
saturday.letter
method returns the one-letter weekday label
Method: saturday.letter - returns the one-letter weekday label
Syntax:
saturday.letter() -> Text
Examples
# Use saturday.letter in a narrow weekday table
let value = saturday;
print value.letter();
saturday.index
method returns the ISO weekday index
Method: saturday.index - returns the ISO weekday index
Syntax:
saturday.index() -> Integer
Examples
# Use saturday.index for weekday sorting
let value = saturday;
print value.index();
saturday.children
method lists child fields and callable members available on this value
Method: saturday.children - lists child fields and callable members available on this value
Syntax:
saturday.children() -> List
Examples
# Inspect child entries available from the saturday constant
let value = saturday;
print value.children();
saturday.fields
method returns an object containing the value's plain fields
Method: saturday.fields - returns an object containing the value's plain fields
Syntax:
saturday.fields() -> Object
Examples
# Inspect plain fields on the saturday constant
let value = saturday;
print value.fields();
saturday.functions
method lists callable members available on this value
Method: saturday.functions - lists callable members available on this value
Syntax:
saturday.functions() -> List
Examples
# Inspect callable members on the saturday constant
let value = saturday;
print value.functions();
sunday.name
method returns the full weekday name
Method: sunday.name - returns the full weekday name
Syntax:
sunday.name() -> Text
Examples
# Use sunday.name as a report label
let value = sunday;
print value.name();
sunday.short
method returns the short weekday name
Method: sunday.short - returns the short weekday name
Syntax:
sunday.short() -> Text
Examples
# Use sunday.short for a compact calendar label
let value = sunday;
print value.short();
sunday.letter
method returns the one-letter weekday label
Method: sunday.letter - returns the one-letter weekday label
Syntax:
sunday.letter() -> Text
Examples
# Use sunday.letter in a narrow weekday table
let value = sunday;
print value.letter();
sunday.index
method returns the ISO weekday index
Method: sunday.index - returns the ISO weekday index
Syntax:
sunday.index() -> Integer
Examples
# Use sunday.index for weekday sorting
let value = sunday;
print value.index();
sunday.children
method lists child fields and callable members available on this value
Method: sunday.children - lists child fields and callable members available on this value
Syntax:
sunday.children() -> List
Examples
# Inspect child entries available from the sunday constant
let value = sunday;
print value.children();
sunday.fields
method returns an object containing the value's plain fields
Method: sunday.fields - returns an object containing the value's plain fields
Syntax:
sunday.fields() -> Object
Examples
# Inspect plain fields on the sunday constant
let value = sunday;
print value.fields();
sunday.functions
method lists callable members available on this value
Method: sunday.functions - lists callable members available on this value
Syntax:
sunday.functions() -> List
Examples
# Inspect callable members on the sunday constant
let value = sunday;
print value.functions();
barycentric
constant barycentric: origin at the solar-system barycenter; corrections are ignored
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: barycentric - barycentric: origin at the solar-system barycenter; corrections are ignored
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
barycentric -> StateOrigin
Examples
# Use barycentric as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, barycentric, icrf, no_correction);
print st.position().length();
bc
constant barycentric: origin at the solar-system barycenter; corrections are ignored
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: bc - barycentric: origin at the solar-system barycenter; corrections are ignored
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
bc -> StateOrigin
Examples
# Use bc as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, bc, icrf, no_correction);
print st.position().length();
heliocentric
constant heliocentric: origin at the Sun's center
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: heliocentric - heliocentric: origin at the Sun's center
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
heliocentric -> StateOrigin
Examples
# Use heliocentric as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, icrf, no_correction);
print st.position().length();
hc
constant heliocentric: origin at the Sun's center
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: hc - heliocentric: origin at the Sun's center
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
hc -> StateOrigin
Examples
# Use hc as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, hc, icrf, no_correction);
print st.position().length();
geocentric
constant geocentric: origin at Earth's center; conventional inferred axis is tod
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: geocentric - geocentric: origin at Earth's center; conventional inferred axis is tod
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
geocentric -> StateOrigin
Examples
# Use geocentric as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, geocentric, icrf, no_correction);
print st.position().length();
gc
constant geocentric: origin at Earth's center; conventional inferred axis is tod
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: gc - geocentric: origin at Earth's center; conventional inferred axis is tod
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
gc -> StateOrigin
Examples
# Use gc as the origin for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, gc, icrf, no_correction);
print st.position().length();
topocentric
constant topocentric: origin at the observer location; requires location and conventionally uses topographic axes
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: topocentric - topocentric: origin at the observer location; requires location and conventionally uses topographic axes
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
topocentric -> StateOrigin
Examples
# Use topocentric as the origin for a local state-vector query
let t = time(2026,1,1,0,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(mars, t, loc, topocentric, icrf, no_correction);
print st.position().length();
topo
constant topocentric: origin at the observer location; requires location and conventionally uses topographic axes
alternatives: barycentric, heliocentric, geocentric, topocentric
Constant: topo - topocentric: origin at the observer location; requires location and conventionally uses topographic axes
alternatives: barycentric, heliocentric, geocentric, topocentric
Syntax:
topo -> StateOrigin
Examples
# Use topo as the origin for a local state-vector query
let t = time(2026,1,1,0,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(mars, t, loc, topo, icrf, no_correction);
print st.position().length();
icrf
constant icrf: International Celestial Reference Frame axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: icrf - icrf: International Celestial Reference Frame axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
icrf -> StateAxis
Examples
# Use icrf as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, icrf, no_correction);
print st.position().length();
icrs
constant icrf: International Celestial Reference Frame axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: icrs - icrf: International Celestial Reference Frame axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
icrs -> StateAxis
Examples
# Use icrs as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, icrs, no_correction);
print st.position().length();
tod
constant tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: tod - tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
tod -> StateAxis
Examples
# Use tod as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, tod, no_correction);
print st.position().length();
true_of_date
constant tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: true_of_date - tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
true_of_date -> StateAxis
Examples
# Use true_of_date as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, true_of_date, no_correction);
print st.position().length();
trueofdate
constant tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: trueofdate - tod: true-of-date equatorial axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
trueofdate -> StateAxis
Examples
# Use trueofdate as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, trueofdate, no_correction);
print st.position().length();
ecliptic
constant ecliptic: true ecliptic and equinox of date axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: ecliptic - ecliptic: true ecliptic and equinox of date axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
ecliptic -> StateAxis
Examples
# Use ecliptic as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, ecliptic, no_correction);
print st.position().length();
ecliptic_of_date
constant ecliptic: true ecliptic and equinox of date axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: ecliptic_of_date - ecliptic: true ecliptic and equinox of date axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
ecliptic_of_date -> StateAxis
Examples
# Use ecliptic_of_date as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, ecliptic_of_date, no_correction);
print st.position().length();
earthfixed
constant ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: earthfixed - ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
earthfixed -> StateAxis
Examples
# Use earthfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, earthfixed, no_correction);
print st.position().length();
earth_fixed
constant ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: earth_fixed - ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
earth_fixed -> StateAxis
Examples
# Use earth_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, earth_fixed, no_correction);
print st.position().length();
ef
constant ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: ef - ef: Earth-fixed rotating axes
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
ef -> StateAxis
Examples
# Use ef as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, ef, no_correction);
print st.position().length();
sunfixed
constant sunfixed: Sun-fixed axes using the IAU solar pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: sunfixed - sunfixed: Sun-fixed axes using the IAU solar pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
sunfixed -> StateAxis
Examples
# Use sunfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, sunfixed, no_correction);
print st.position().length();
sun_fixed
constant sunfixed: Sun-fixed axes using the IAU solar pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: sun_fixed - sunfixed: Sun-fixed axes using the IAU solar pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
sun_fixed -> StateAxis
Examples
# Use sun_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, sun_fixed, no_correction);
print st.position().length();
mercuryfixed
constant mercuryfixed: Mercury-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: mercuryfixed - mercuryfixed: Mercury-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
mercuryfixed -> StateAxis
Examples
# Use mercuryfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, mercuryfixed, no_correction);
print st.position().length();
mercury_fixed
constant mercuryfixed: Mercury-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: mercury_fixed - mercuryfixed: Mercury-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
mercury_fixed -> StateAxis
Examples
# Use mercury_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, mercury_fixed, no_correction);
print st.position().length();
venusfixed
constant venusfixed: Venus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: venusfixed - venusfixed: Venus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
venusfixed -> StateAxis
Examples
# Use venusfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, venusfixed, no_correction);
print st.position().length();
venus_fixed
constant venusfixed: Venus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: venus_fixed - venusfixed: Venus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
venus_fixed -> StateAxis
Examples
# Use venus_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, venus_fixed, no_correction);
print st.position().length();
moonfixed
constant moonfixed: Moon-fixed axes from the lunar physical-libration model where available
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: moonfixed - moonfixed: Moon-fixed axes from the lunar physical-libration model where available
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
moonfixed -> StateAxis
Examples
# Use moonfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, moonfixed, no_correction);
print st.position().length();
moon_fixed
constant moonfixed: Moon-fixed axes from the lunar physical-libration model where available
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: moon_fixed - moonfixed: Moon-fixed axes from the lunar physical-libration model where available
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
moon_fixed -> StateAxis
Examples
# Use moon_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, moon_fixed, no_correction);
print st.position().length();
marsfixed
constant marsfixed: Mars-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: marsfixed - marsfixed: Mars-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
marsfixed -> StateAxis
Examples
# Use marsfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, marsfixed, no_correction);
print st.position().length();
mars_fixed
constant marsfixed: Mars-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: mars_fixed - marsfixed: Mars-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
mars_fixed -> StateAxis
Examples
# Use mars_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, mars_fixed, no_correction);
print st.position().length();
jupiterfixed
constant jupiterfixed: Jupiter-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: jupiterfixed - jupiterfixed: Jupiter-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
jupiterfixed -> StateAxis
Examples
# Use jupiterfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, jupiterfixed, no_correction);
print st.position().length();
jupiter_fixed
constant jupiterfixed: Jupiter-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: jupiter_fixed - jupiterfixed: Jupiter-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
jupiter_fixed -> StateAxis
Examples
# Use jupiter_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, jupiter_fixed, no_correction);
print st.position().length();
saturnfixed
constant saturnfixed: Saturn-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: saturnfixed - saturnfixed: Saturn-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
saturnfixed -> StateAxis
Examples
# Use saturnfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, saturnfixed, no_correction);
print st.position().length();
saturn_fixed
constant saturnfixed: Saturn-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: saturn_fixed - saturnfixed: Saturn-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
saturn_fixed -> StateAxis
Examples
# Use saturn_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, saturn_fixed, no_correction);
print st.position().length();
uranusfixed
constant uranusfixed: Uranus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: uranusfixed - uranusfixed: Uranus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
uranusfixed -> StateAxis
Examples
# Use uranusfixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, uranusfixed, no_correction);
print st.position().length();
uranus_fixed
constant uranusfixed: Uranus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: uranus_fixed - uranusfixed: Uranus-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
uranus_fixed -> StateAxis
Examples
# Use uranus_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, uranus_fixed, no_correction);
print st.position().length();
neptunefixed
constant neptunefixed: Neptune-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: neptunefixed - neptunefixed: Neptune-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
neptunefixed -> StateAxis
Examples
# Use neptunefixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, neptunefixed, no_correction);
print st.position().length();
neptune_fixed
constant neptunefixed: Neptune-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: neptune_fixed - neptunefixed: Neptune-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
neptune_fixed -> StateAxis
Examples
# Use neptune_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, neptune_fixed, no_correction);
print st.position().length();
plutofixed
constant plutofixed: Pluto-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: plutofixed - plutofixed: Pluto-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
plutofixed -> StateAxis
Examples
# Use plutofixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, plutofixed, no_correction);
print st.position().length();
pluto_fixed
constant plutofixed: Pluto-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: pluto_fixed - plutofixed: Pluto-fixed axes using the IAU pole and prime meridian
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
pluto_fixed -> StateAxis
Examples
# Use pluto_fixed as the frame for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, heliocentric, pluto_fixed, no_correction);
print st.position().length();
topographic
constant topographic: local observer horizon axes; requires location
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: topographic - topographic: local observer horizon axes; requires location
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
topographic -> StateAxis
Examples
# Use topographic as the frame for a local state-vector query
let t = time(2026,1,1,0,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(mars, t, loc, topocentric, topographic, no_correction);
print st.position().length();
horizon
constant topographic: local observer horizon axes; requires location
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Constant: horizon - topographic: local observer horizon axes; requires location
alternatives: icrf, tod, ecliptic, ef, sunfixed, mercuryfixed, venusfixed, moonfixed, marsfixed, jupiterfixed, saturnfixed, uranusfixed, neptunefixed, plutofixed, topographic
Syntax:
horizon -> StateAxis
Examples
# Use horizon as the frame for a local state-vector query
let t = time(2026,1,1,0,0,0);
let loc = location(latitude: 60.0, longitude: 10.0);
let st = state(mars, t, loc, topocentric, horizon, no_correction);
print st.position().length();
no_correction
constant no_correction: geometric position at the requested time
alternatives: no_correction, light_time, apparent, all_corrections
Constant: no_correction - no_correction: geometric position at the requested time
alternatives: no_correction, light_time, apparent, all_corrections
Syntax:
no_correction -> StateCorrection
Examples
# Use no_correction as the correction model for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, geocentric, icrf, no_correction);
print st.position().length();
light_time
constant light_time: uses the body's retarded position from iterative light travel time
alternatives: no_correction, light_time, apparent, all_corrections
Constant: light_time - light_time: uses the body's retarded position from iterative light travel time
alternatives: no_correction, light_time, apparent, all_corrections
Syntax:
light_time -> StateCorrection
Examples
# Use light_time as the correction model for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, geocentric, icrf, light_time);
print st.position().length();
apparent
constant apparent: applies stellar aberration from observer barycentric velocity
alternatives: no_correction, light_time, apparent, all_corrections
Constant: apparent - apparent: applies stellar aberration from observer barycentric velocity
alternatives: no_correction, light_time, apparent, all_corrections
Syntax:
apparent -> StateCorrection
Examples
# Use apparent as the correction model for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, geocentric, icrf, apparent);
print st.position().length();
all_corrections
constant all_corrections: applies light-time and stellar aberration; this is the state default
alternatives: no_correction, light_time, apparent, all_corrections
Constant: all_corrections - all_corrections: applies light-time and stellar aberration; this is the state default
alternatives: no_correction, light_time, apparent, all_corrections
Syntax:
all_corrections -> StateCorrection
Examples
# Use all_corrections as the correction model for a state-vector query
let t = time(2026,1,1,0,0,0);
let st = state(mars, t, geocentric, icrf, all_corrections);
print st.position().length();
List
value ordered array value
Value: List - ordered array value
Syntax:
[a, b, c]
Children: length(), first(), last(), index(), push(), slice(), flatten(), help(), available()
Examples
# Project a field from every row in an array of objects
let rows = [{x: 1, name: "sun"}, {x: 3, name: "moon"}];
print rows.x, rows.name;
List.length
method returns the number of array elements
Method: List.length - returns the number of array elements
Syntax:
<List>.length() -> Number
<List>.len() -> Number
Examples
# Inspect List.length on a List value
let value = [1, 2, 3];
print value.length();
List.first
method returns the first element or first count elements
Method: List.first - returns the first element or first count elements
Syntax:
<List>.first() -> Any
<List>.first(count: Integer) -> List
Examples
# Inspect List.first on a List value
let value = [1, 2, 3];
print value.first();
List.last
method returns the last element or last count elements
Method: List.last - returns the last element or last count elements
Syntax:
<List>.last() -> Any
<List>.last(count: Integer) -> List
Examples
# Inspect List.last on a List value
let value = [1, 2, 3];
print value.last();
List.index
method returns one or more indexed elements
Method: List.index - returns one or more indexed elements
Syntax:
<List>.index(index: Integer) -> Any
<List>.index(indexes: List) -> List
Examples
# Read an item from a list by index
let value = [1, 2, 3];
print value.index(1);
List.push
method returns a new array with one value appended
Method: List.push - returns a new array with one value appended
Syntax:
<List>.push(value: Any) -> List
Examples
# Inspect List.push on a List value
let value = [1, 2, 3];
print value.push(42.0);
List.slice
method returns a sub-array
Method: List.slice - returns a sub-array
Syntax:
<List>.slice(start: Integer) -> List
<List>.slice(start: Integer, stop: Integer) -> List
Examples
# Read a slice from a list
let value = [1, 2, 3];
print value.slice(1);
List.flatten
method returns a recursively flattened array
Method: List.flatten - returns a recursively flattened array
Syntax:
<List>.flatten() -> List
Examples
# Inspect List.flatten on a List value
let value = [1, 2, 3];
print value.flatten();
List.help
method returns contextual documentation for this array
Method: List.help - returns contextual documentation for this array
Syntax:
<List>.help() -> Help
<List>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect List.help on a List value
let value = [1, 2, 3];
print value.help();
List.available
method reports whether this array is available
Method: List.available - reports whether this array is available
Syntax:
<List>.available() -> Bool
Examples
# Inspect List.available on a List value
let value = [1, 2, 3];
print value.available();
Object
value ordered mutable field collection
Value: Object - ordered mutable field collection
Syntax:
{name: value, other: 2}
Children: help(), available()
Examples
# Store a small observation row and read its fields
let row = {body: sun.name, time: time(2026,1,1,0,0,0), altitude: 12.5};
print row.body, row.time.utc(), row.altitude;
Object.help
method returns contextual documentation for this value
Method: Object.help - returns contextual documentation for this value
Syntax:
<Object>.help() -> Help
<Object>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Object.help on a Object value
let value = {name: "value", count: 2};
print value.help();
Object.available
method reports whether this value is available
Method: Object.available - reports whether this value is available
Syntax:
<Object>.available() -> Bool
Examples
# Inspect Object.available on a Object value
let value = {name: "value", count: 2};
print value.available();
Arguments
value captured call argument list
Value: Arguments - captured call argument list
Syntax:
args(...)
Children: help(), available()
Examples
# Reuse and extend named arguments before constructing a location
let base = args(latitude: 60.0);
let full = base.with(longitude: 10.0);
print location(**full);
Arguments.help
method returns contextual documentation for this value
Method: Arguments.help - returns contextual documentation for this value
Syntax:
<Arguments>.help() -> Help
<Arguments>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Arguments.help on a Arguments value
let value = args(1, 2);
print value.help();
Arguments.available
method reports whether this value is available
Method: Arguments.available - reports whether this value is available
Syntax:
<Arguments>.available() -> Bool
Examples
# Inspect Arguments.available on a Arguments value
let value = args(1, 2);
print value.available();
Callable
value callable function, method, closure, or definition
Value: Callable - callable function, method, closure, or definition
Syntax:
function(...)
Children: help(), available()
Examples
# Store callable formulas in a namespace and choose one
let formulas = {square: (x): x * x, cube: (x): x * x * x};
let chosen = "cube";
print formulas[chosen](4);
Callable.help
method returns contextual documentation for this value
Method: Callable.help - returns contextual documentation for this value
Syntax:
<Callable>.help() -> Help
<Callable>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Callable.help on a Callable value
let value = ((x): x);
print value.help();
Callable.available
method reports whether this value is available
Method: Callable.available - reports whether this value is available
Syntax:
<Callable>.available() -> Bool
Examples
# Inspect Callable.available on a Callable value
let value = ((x): x);
print value.available();
Help
value structured documentation value
Value: Help - structured documentation value
Syntax:
help()
value.help()
Children: doc(), compact(), search(), help(), examples()
Examples
# Show a compact help summary inside a script
print help().compact();
Help.doc
method renders the full documentation page
Method: Help.doc - renders the full documentation page
Syntax:
<Help>.doc() -> Text
Examples
# Inspect Help.doc on a Help value
let value = help();
print value.doc();
Help.compact
method renders a compact one-line summary
Method: Help.compact - renders a compact one-line summary
Syntax:
<Help>.compact() -> Text
Examples
# Inspect Help.compact on a Help value
let value = help();
print value.compact();
Help.search
method searches recursively under this help value
Method: Help.search - searches recursively under this help value
Syntax:
<Help>.search(text: Text) -> HelpResult
Examples
# Search help and print compact match metadata
let hits = help.search("moon_phase");
print hits.length, hits[0].path;
Help.help
method looks up a named child or related help value
Method: Help.help - looks up a named child or related help value
Syntax:
<Help>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Help.help on a Help value
let value = help();
print value.help("value");
Help.examples
method returns common astronomy examples from the root help value
Method: Help.examples - returns common astronomy examples from the root help value
Syntax:
<Help>.examples() -> Help
Examples
# Inspect Help.examples on a Help value
let value = help();
print value.examples();
HelpResult
value list-like collection of help search or lookup results
Value: HelpResult - list-like collection of help search or lookup results
Syntax:
help().search("text")
result[0] -> Help
result.name -> List
Children: first(), count, doc(), compact(), search(), help(), name, path
Examples
# Search help and print matching documentation paths
let hits = help.search("time");
print hits.path;
HelpResult.first
method returns the first help result or Nil
Method: HelpResult.first - returns the first help result or Nil
Syntax:
<HelpResult>.first() -> Help|Nil
Examples
# Inspect HelpResult.first on a HelpResult value
let value = help.search("time");
print value.first();
HelpResult.count
method returns the number of help results
Method: HelpResult.count - returns the number of help results
Syntax:
<HelpResult>.count -> Number
<HelpResult>.length -> Number
<HelpResult>.len -> Number
Examples
# Inspect HelpResult.count on a HelpResult value
let value = help.search("time");
print value.count;
HelpResult.doc
method renders all result documentation pages
Method: HelpResult.doc - renders all result documentation pages
Syntax:
<HelpResult>.doc() -> Text
Examples
# Render one compact help document from a search result
let hits = help.search("moon_phase");
print hits[0].doc();
HelpResult.compact
method renders a compact result list
Method: HelpResult.compact - renders a compact result list
Syntax:
<HelpResult>.compact() -> Text
Examples
# Inspect HelpResult.compact on a HelpResult value
let value = help.search("time");
print value.compact();
HelpResult.search
method searches recursively inside each result
Method: HelpResult.search - searches recursively inside each result
Syntax:
<HelpResult>.search(text: Text) -> HelpResult
Examples
# Inspect HelpResult.search on a HelpResult value
let value = help.search("time");
print value.search("value");
HelpResult.help
method looks up a named child inside each result
Method: HelpResult.help - looks up a named child inside each result
Syntax:
<HelpResult>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect HelpResult.help on a HelpResult value
let value = help.search("time");
print value.help("value");
HelpResult.name
method projects result names as an array
Method: HelpResult.name - projects result names as an array
Syntax:
<HelpResult>.name -> List
Examples
# Inspect HelpResult.name on a HelpResult value
let value = help.search("time");
print value.name;
HelpResult.path
method projects result paths as an array
Method: HelpResult.path - projects result paths as an array
Syntax:
<HelpResult>.path -> List
Examples
# Inspect HelpResult.path on a HelpResult value
let value = help.search("time");
print value.path;
Nil
value absence of a value
Value: Nil - absence of a value
Syntax:
Nil
Children: help(), available()
Examples
# Inspect the result of a missing help lookup
let value = help("missing");
print value;
Nil.help
method returns contextual documentation for this value
Method: Nil.help - returns contextual documentation for this value
Syntax:
<Nil>.help() -> Help
<Nil>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Nil.help on a Nil value
let value = help("missing");
print value.help();
Nil.available
method reports whether this value is available
Method: Nil.available - reports whether this value is available
Syntax:
<Nil>.available() -> Bool
Examples
# Check availability on Nil
let value = nil;
print value.available();
Unavailable
value value that could not be computed but may be carried
Value: Unavailable - value that could not be computed but may be carried
Syntax:
not available
Children: help(), available()
Examples
# Show how unavailable values propagate through output
let value = 1 / undefined;
print value;
Unavailable.help
method returns contextual documentation for this value
Method: Unavailable.help - returns contextual documentation for this value
Syntax:
<Unavailable>.help() -> Help
<Unavailable>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Unavailable.help on a Unavailable value
let value = 1 / undefined;
print value.help();
Unavailable.available
method reports whether this value is available
Method: Unavailable.available - reports whether this value is available
Syntax:
<Unavailable>.available() -> Bool
Examples
# Inspect Unavailable.available on a Unavailable value
let value = 1 / undefined;
print value.available();
Bool
value boolean true or false value
Value: Bool - boolean true or false value
Syntax:
true
false
Children: help(), available()
Examples
# Check whether the Sun is above the horizon at a site
let loc = location(58.9666667, 5.7333333);
let t = time(2026,6,21,12,0,0);
let above_horizon = altitude(sun, t, loc) > 0;
print above_horizon;
Bool.help
method returns contextual documentation for this value
Method: Bool.help - returns contextual documentation for this value
Syntax:
<Bool>.help() -> Help
<Bool>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Bool.help on a Bool value
let value = true;
print value.help();
Bool.available
method reports whether this value is available
Method: Bool.available - reports whether this value is available
Syntax:
<Bool>.available() -> Bool
Examples
# Inspect Bool.available on a Bool value
let value = true;
print value.available();
Number
value numeric scalar value
Value: Number - numeric scalar value
Syntax:
1
3.14
infinity
undefined
Children: help(), available()
Examples
# Compute approximate daylight duration from sunrise and sunset
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let span = range(time(2026,6,21,0,0,0), time(2026,6,22,0,0,0));
let a = events(sunrise, span, loc).first().time;
let b = events(sunset, span, loc).first().time;
let hours = (b - a) * 24;
print hours;
Number.help
method returns contextual documentation for this value
Method: Number.help - returns contextual documentation for this value
Syntax:
<Number>.help() -> Help
<Number>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Number.help on a Number value
let value = 1;
print value.help();
Number.available
method reports whether this value is available
Method: Number.available - reports whether this value is available
Syntax:
<Number>.available() -> Bool
Examples
# Inspect Number.available on a Number value
let value = 1;
print value.available();
Text
value text string value
Value: Text - text string value
Syntax:
"text"
Children: help(), available()
Examples
# Format a local observation time as text
let t = time(2026,6,21,12,0,0);
let local = t.local("Europe/Oslo").iso;
print local;
Text.help
method returns contextual documentation for this value
Method: Text.help - returns contextual documentation for this value
Syntax:
<Text>.help() -> Help
<Text>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Text.help on a Text value
let value = "text";
print value.help();
Text.available
method reports whether this value is available
Method: Text.available - reports whether this value is available
Syntax:
<Text>.available() -> Bool
Examples
# Inspect Text.available on a Text value
let value = "text";
print value.available();
EventType
value astronomical event kind
Value: EventType - astronomical event kind
Syntax:
conjunction
opposition
rise
Children: help(), available()
Examples
# Use an event type to find the next sunrise
let loc = location(latitude: 58.9666667, longitude: 5.7333333);
let span = range(time(2026,6,21,0,0,0), time(2026,6,22,0,0,0));
let event = events(sunrise, span, loc).first();
print event.time.local("Europe/Oslo").iso;
EventType.help
method returns contextual documentation for this value
Method: EventType.help - returns contextual documentation for this value
Syntax:
<EventType>.help() -> Help
<EventType>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect EventType.help on a EventType value
let value = sunrise;
print value.help();
EventType.available
method reports whether this value is available
Method: EventType.available - reports whether this value is available
Syntax:
<EventType>.available() -> Bool
Examples
# Inspect EventType.available on a EventType value
let value = sunrise;
print value.available();
SearchDirection
value search direction
Value: SearchDirection - search direction
Syntax:
any
increasing
decreasing
Children: help(), available()
Examples
# Use a search direction in a crossing search
let value = any;
print value;
SearchDirection.help
method returns contextual documentation for this value
Method: SearchDirection.help - returns contextual documentation for this value
Syntax:
<SearchDirection>.help() -> Help
<SearchDirection>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect SearchDirection.help on a SearchDirection value
let value = any;
print value.help();
SearchDirection.available
method reports whether this value is available
Method: SearchDirection.available - reports whether this value is available
Syntax:
<SearchDirection>.available() -> Bool
Examples
# Inspect SearchDirection.available on a SearchDirection value
let value = any;
print value.available();
FieldSource
value NetCDF field source
Value: FieldSource - NetCDF field source
Syntax:
field source
Children: help(), available()
Examples
# Name the Earth topography dataset and sample it at a location
let loc = location(60.0, 10.0);
let terrain = field(earth_topography);
print sample(terrain, loc);
FieldSource.help
method returns contextual documentation for this value
Method: FieldSource.help - returns contextual documentation for this value
Syntax:
<FieldSource>.help() -> Help
<FieldSource>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect FieldSource.help on a FieldSource value
let value = earth_topography;
print value.help();
FieldSource.available
method reports whether this value is available
Method: FieldSource.available - reports whether this value is available
Syntax:
<FieldSource>.available() -> Bool
Examples
# Inspect FieldSource.available on a FieldSource value
let value = earth_topography;
print value.available();
NetCDF
value opened NetCDF dataset
Value: NetCDF - opened NetCDF dataset
Syntax:
netcdf(...)
Children: help(), available()
Examples
# Inspect a NetCDF-backed resource
let nc = netcdf(earth_topography);
print nc.path, nc.variables.length();
NetCDF.help
method returns contextual documentation for this value
Method: NetCDF.help - returns contextual documentation for this value
Syntax:
<NetCDF>.help() -> Help
<NetCDF>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect NetCDF.help on a NetCDF value
let value = netcdf(earth_topography);
print value.help();
NetCDF.available
method reports whether this value is available
Method: NetCDF.available - reports whether this value is available
Syntax:
<NetCDF>.available() -> Bool
Examples
# Inspect NetCDF.available on a NetCDF value
let value = netcdf(earth_topography);
print value.available();
Field
value sampleable gridded field
Value: Field - sampleable gridded field
Syntax:
field(...)
Children: help(), available()
Examples
# Sample a field value at a location
let loc = location(60.0, 10.0);
print sample(topography(earth), loc);
Field.help
method returns contextual documentation for this value
Method: Field.help - returns contextual documentation for this value
Syntax:
<Field>.help() -> Help
<Field>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect Field.help on a Field value
let value = topography(earth);
print value.help();
Field.available
method reports whether this value is available
Method: Field.available - reports whether this value is available
Syntax:
<Field>.available() -> Bool
Examples
# Inspect Field.available on a Field value
let value = topography(earth);
print value.available();
SearchGoal
value search goal such as target, minimum, or maximum
Value: SearchGoal - search goal such as target, minimum, or maximum
Syntax:
minimum
maximum
target(...)
Children: help(), available()
Examples
# Use a target goal to find a numeric crossing
let root = search((x): x - 2, range(0, 4, 0.25), target(0)).next();
print root;
SearchGoal.help
method returns contextual documentation for this value
Method: SearchGoal.help - returns contextual documentation for this value
Syntax:
<SearchGoal>.help() -> Help
<SearchGoal>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect SearchGoal.help on a SearchGoal value
let value = target(2.0);
print value.help();
SearchGoal.available
method reports whether this value is available
Method: SearchGoal.available - reports whether this value is available
Syntax:
<SearchGoal>.available() -> Bool
Examples
# Inspect SearchGoal.available on a SearchGoal value
let value = target(2.0);
print value.available();
Reference
value runtime reference value
Value: Reference - runtime reference value
Syntax:
reference(name)
Children: help(), available()
Examples
# Use an intrinsic reference value in a forecast sample
let value = temperature;
print value, value.help().name;
Reference.help
method returns contextual documentation for this value
Method: Reference.help - returns contextual documentation for this value
Syntax:
<Reference>.help() -> Help
<Reference>.help(name: Text) -> Help|HelpResult|Nil
Examples
# Inspect help for an intrinsic reference
let value = temperature;
print value.help().name;
Reference.available
method reports whether this value is available
Method: Reference.available - reports whether this value is available
Syntax:
<Reference>.available() -> Bool
Examples
# Check that an intrinsic reference is available
let value = temperature;
print value.available();