API Reference / aspect · function

Function: aspect()

function aspect(
   body, 
   kind, 
   target, 
   orb?, 
   zodiac?): Predicate;

A Predicate that holds while body is within orb degrees of an exact aspect to target. Feed it to when to find the time windows, or compose it with allOf/anyOf.

Parameters

ParameterTypeDefault valueDescription
bodyBodyIdundefinedThe transiting body.
kindstringundefinedAspect name, e.g. "conjunction", "square", "trine", "opposition", "sextile".
targetnumber | BodyIdundefinedThe aspect target: a fixed ecliptic longitude in degrees (e.g. a natal point) or another body id (a mutual aspect).
orbnumber1.0Half-width of the window in degrees. Defaults to 1.0.
zodiacZodiac"tropical"Zodiac for the longitudes. Defaults to tropical.

Returns

Predicate

A predicate, true while within orb of the exact aspect.

Throws

Error if kind is not a known aspect.

Example

const natalSun = 79.3;
when(engine, aspect("saturn", "square", natalSun, 1), jd0, jd1); // Saturn squares

Start building

Quickstart →