Astrology
WebAssembly requirement
Most functions in this module use the Swiss Ephemeris compiled to WebAssembly. See the integration guide before using them.
Functions that are pure math (no WASM) are noted in each section.
Bilingual natal descriptions
The catalog contains 1580 unique bilingual entries. Shared lookup aliases count as one entry.
Available in npm version 6.18.0 and later: the complete 431-entry catalog
and the getters for it. The 1149 entries added afterwards (Descendant signs, signs
on house cusps, retrograde planets by sign and house, Vertex, planet-pair
aspects, Sun with Ascendant, symbolic degrees, dignity statuses and decans) and
their getters are available in npm version 6.20.0 and later, together with the
astrology:describe CLI command.
import { getSunAscendantDescription, getSunAscendantDescriptionEntry, getSymbolicDegreeNumber, getSymbolicDegreeDescription, getSymbolicDegreeDescriptionEntry, getDignityStatusDescription, getDignityStatusDescriptionEntry, getDecanDescription, getDecanDescriptionEntry, getAspectPairDescription, getAspectPairDescriptionEntry, getHouseCuspSignDescription, getHouseCuspSignDescriptionEntry, getRetrogradePlanetSignDescription, getRetrogradePlanetSignDescriptionEntry, getRetrogradePlanetHouseDescription, getRetrogradePlanetHouseDescriptionEntry, getVertexContactDescription, getVertexContactDescriptionEntry, getLunarNodeHouseDescription, getLunarNodeHouseDescriptionEntry, getLunarNodeSignDescription, getLunarNodeSignDescriptionEntry, getLunarNodeDescription, getLunarNodeDescriptionEntry, getSectDescription, getSectDescriptionEntry, getRetrogradePlanetDescription, getRetrogradePlanetDescriptionEntry, getPointHouseDescription, getPointHouseDescriptionEntry, getPointSignDescription, getPointSignDescriptionEntry, getPointDescription, getPointDescriptionEntry, getAspectDescription, getAspectDescriptionEntry, getAngleDescription, getAngleDescriptionEntry, getPolarityDescription, getPolarityDescriptionEntry, getModalityDescription, getModalityDescriptionEntry, getElementDescription, getElementDescriptionEntry, getSignDescription, getSignDescriptionEntry, getPlanetDescription, getPlanetDescriptionEntry, getPlanetSignDescription, getPlanetSignDescriptionEntry, getPlanetHouseDescription, getPlanetHouseDescriptionEntry, getHouseDescription, getHouseDescriptionEntry, getAngleSignDescription, getAngleSignDescriptionEntry,} from 'kaabalah/astrology';
getLunarNodeDescription('north', 'pt-BR');getLunarNodeDescriptionEntry('south')?.keywords.en;getLunarNodeSignDescription('north', 'Aries', 'pt-BR');getLunarNodeSignDescriptionEntry('south', 'Libra')?.keywords.en;getLunarNodeHouseDescription('north', 1, 'pt-BR');getLunarNodeHouseDescriptionEntry('south', 7)?.keywords.en; // same directed axis accountgetSectDescription('diurnal', 'pt-BR');getSectDescriptionEntry('nocturnal')?.keywords.en;getPlanetDescription('sun', 'pt-BR'); // general planetary functiongetPlanetDescriptionEntry('sun')?.keywords.en;getRetrogradePlanetDescription('mercury', chart.planets.mercury?.longitudeSpeed, 'pt-BR');getRetrogradePlanetDescriptionEntry('saturn', chart.planets.saturn?.longitudeSpeed)?.keywords.en;getSignDescription('Aries', 'pt-BR'); // general zodiacal qualitiesgetSignDescriptionEntry('Aries')?.keywords.en;getElementDescription('fire', 'pt-BR'); // lowercase classical element keygetElementDescriptionEntry('fire')?.keywords.en;getModalityDescription('Cardinal', 'pt-BR');getModalityDescriptionEntry('Cardinal')?.keywords.en;getPolarityDescription('positive', 'pt-BR');getPolarityDescriptionEntry('negative')?.keywords.en;getAngleDescription('dc', 'pt-BR'); // general Descendant conceptgetAngleDescriptionEntry('mc')?.keywords.en;getAspectDescription('opposition', 'pt-BR'); // general tension between planetsgetAspectDescriptionEntry('duodecile')?.keywords.en; // semisextile conceptgetPointDescription('parsFortunae', 'pt-BR'); // Part of Fortune conceptgetPointDescriptionEntry('parsFortunae')?.keywords.en;getPointDescription('chiron', 'pt-BR'); // general Chiron conceptgetPointDescriptionEntry('chiron')?.keywords.en;getPointDescription('lilith mean', 'pt-BR');getPointDescriptionEntry('lilith true')?.keywords.en; // same shared Lilith conceptgetPointSignDescription('lilith true', 'Taurus', 'pt-BR');getPointSignDescriptionEntry('lilith mean', 'Taurus')?.keywords.en; // same Taurus interpretationgetPointSignDescription('chiron', 'Aries', 'pt-BR');getPointHouseDescription('chiron', 1, 'pt-BR'); // same entry as Chiron/AriesgetPointSignDescription('parsFortunae', 'Aries', 'pt-BR');getPointSignDescriptionEntry('parsFortunae', 'Aries')?.keywords.en;getPointHouseDescription('parsFortunae', 9, 'pt-BR');getPointHouseDescriptionEntry('parsFortunae', 9)?.keywords.en;
getPlanetSignDescription('sun', 'Aries'); // English (default)getPlanetSignDescription('sun', 'Aries', 'pt-BR'); // Portugueseconst entry = getPlanetSignDescriptionEntry('sun', 'Aries');entry?.keywords.pt; // Portuguese keywordsentry?.en; // English textentry?.pt; // Portuguese text
getPlanetHouseDescription('sun', 2, 'pt-BR'); // one-based chart house numbergetPlanetHouseDescriptionEntry('sun', 2)?.keywords.en;
getHouseDescription(4, 'pt-BR'); // numbered house themegetHouseDescriptionEntry(4)?.keywords.en;
getAngleSignDescription('ascendant', 'Aries', 'pt-BR');getAngleSignDescriptionEntry('ascendant', 'Aries')?.keywords.en;getAngleSignDescription('mc', 'Taurus'); // actual Midheaven signgetAngleSignDescription('ic', 'Cancer', 'pt-BR'); // actual Imum Coeli signgetAngleSignDescription('dc', 'Libra', 'pt-BR'); // actual Descendant sign
getHouseCuspSignDescription(2, 'Taurus', 'pt-BR'); // sign on a numbered house cuspgetHouseCuspSignDescriptionEntry(2, 'Taurus')?.keywords.en;
const speed = chart.planets.mars?.longitudeSpeed;getRetrogradePlanetSignDescription('mars', 'Leo', speed, 'pt-BR');getRetrogradePlanetHouseDescription('mars', 3, speed, 'pt-BR');
getPointDescription('vertex', 'pt-BR'); // also 'antivertex'getPointHouseDescription('vertex', 5, 'pt-BR'); // houses 4-9 onlygetVertexContactDescription('venus', 'pt-BR'); // planet in contact with the Vertex
getAspectPairDescription('trine', 'moon', 'sun', 'pt-BR'); // either planet ordergetAspectPairDescriptionEntry('square', 'sun', 'moon')?.keywords.en;
getSunAscendantDescription('Taurus', 'Aries', 'pt-BR'); // Sun sign, then Ascendant sign
const degree = getSymbolicDegreeNumber(chart.planets.sun.longitude); // { sign, degree }if (degree) getSymbolicDegreeDescription(degree.sign, degree.degree, 'pt-BR');
getDignityStatusDescription('exaltation', 'pt-BR'); // domicile, exaltation, detriment, fallgetDecanDescription('Aries', 2, 'pt-BR'); // sign and decan number 1-3getDecanDescription(undefined, undefined, 'pt-BR'); // the decan method concept
getPointSignDescription('vertex', 'Leo', 'pt-BR'); // same account as the Vertex in house 5getPointHouseDescription('lilith mean', 2, 'pt-BR'); // same account as Lilith in TaurusLunar-node concepts use explicit astronomical roles north and south, without
hemisphere inversion. Both chart.planets["mean node"] and ["true node"] are
North Node calculation modes. BirthChart has no dedicated stored South Node;
the existing points adapter can expose derived south-node points. These pure
role lookups do not derive positions or equate the two calculation modes.
Node-sign lookups take the actual sign for the specified role. North and South
have independent profiles; one is not inferred from the other’s sign.
Node-house lookups reuse 12 directed axes through 24 role/house
queries. North house 1 and South house 7 return the same joint account; North
house 7 describes the opposite developmental direction. These are lookup aliases,
not a calculation of a missing position. Houses require integer numbers 1–12.
Sect descriptions accept an already determined diurnal or nocturnal value,
such as chart.sect. They describe the physical-horizon distinction and retain
the profection context of the Sun/Moon sect-light association. They do
not calculate sect from houses or add timing interpretations. The calculation
treats the exact horizon as nocturnal.
Retrograde profiles cover Mercury through Pluto. Pass the planet’s available
longitudeSpeed; only a finite negative number selects a natal retrograde profile.
Missing, nonfinite, zero or positive speeds return undefined, as do unsupported
Sun, Moon and point keys. These lookups do not accept a natal boolean or supply
retrograde sign, house or timing interpretations.
Aspect keys match AspectName: conjunction, duodecile, octile, sextile,
square, trine, trioctile, quincunx and opposition. Descriptions concern
the aspect type; they do not supply planet-pair or synastry interpretations.
Display terms include semissextil/semisextile (duodecile),
semiquadratura/semisquare (octile) and sesquiquadratura/sesquisquare (trioctile).
The Part of Fortune concept uses parsFortunae, matching chart.nodes.parsFortunae.
It describes a virtual point; it does not identify that point with the complete
Wheel of Fortune symbol. Fortune-sign profiles use the same point key and title-case sign names.
They describe the manner of expression associated with that placement.
Fortune-house profiles describe the field of experience and use integer house
numbers from 1 to 12, independently of the sign lookup.
The Chiron concept uses chiron, matching chart.planets.chiron. It describes
the wounded-healer image and its symbolic themes. Chiron placements reuse 12 joint sign-or-house accounts through 24 lookup
aliases. Each corresponding sign/house query returns the same frozen entry,
independent of the general concept. This aliasing does not equate
signs with houses across astrology or create a 144-combination grid.
The Lilith concept accepts lilith mean and lilith true, matching the two
chart planet keys. Both return one frozen interpretation entry; their calculated
positions remain distinct. The 12 Lilith-sign entries also share interpretation
between modes: pass the sign calculated for the requested mode. Only the point
key aliases; the supplied sign stays unchanged. Lilith-house profiles remain
unsupported. The bare lilith alias does not select a default mode.
These point getters do not use general sign or planet profiles as fallbacks.
These getters are pure JSON lookups and require no WebAssembly initialization.
Coverage: 12 directed lunar-node house-axis accounts, 24 lunar-node sign profiles, 2 lunar-node concepts, 2 sect concepts, 8 natal retrograde planet profiles, 10 basic planet profiles, 12 basic sign profiles, 4 classical element profiles, 3 modality profiles, 2 polarity profiles, 4 general angle profiles, 9 aspect-type profiles, 1 Part of Fortune concept, 1 Chiron concept, 1 shared Lilith concept, 12 shared Lilith-sign profiles, 12 shared Chiron placement profiles, 12 Fortune-sign profiles, 12 Fortune-house profiles, 120 planet-sign entries, 120 planet-house entries, 12 numbered house themes
and 36 angle-sign entries: 12 each for Ascendant, Midheaven (MC) and Imum Coeli (IC).
Missing combinations and unsupported keys return undefined, with no generic profile
fallback. Planet keys use lowercase chart names, signs use title case, and house
arguments are integer numbers from 1 to 12 (strings are not coerced). Entries
and keywords are deeply frozen. Portuguese is selected when
language?.startsWith('pt'); other languages use English.
General planet profiles describe each planet’s function in a chart. General sign
profiles describe zodiacal qualities as potential expressions within a chart.
Element keys are fire, earth, air and water, matching TriplicityElement.
Temperament labels are sanguine for fire, choleric for earth,
phlegmatic for air and melancholic for water.
Modality keys follow MODALITIES: Cardinal, Fixed and Mutable.
Polarity keys are positive and negative, describing symbolic activity and
receptivity. These definitions do not classify individual signs or determine chart sect.
Planet placements describe general tendencies, read with the other factors in a natal chart.
They do not assign a person’s evolutionary level or promise outcomes.
Numbered house themes describe domains of life. House numbers and angles have
distinct chart fields. Angle lookups use ascendant, mc, ic and dc,
independently of house cusps. All four general angle concepts and their sign placements are available.
Signs on house cusps (getHouseCuspSignDescription) are a separate table from the
angle signs: a house 10 cusp is not the Midheaven in every house system. 139 of the
144 combinations are available, mostly as a single short sentence.
Retrograde placements take the same longitudeSpeed guard as the general retrograde
profiles. All eight planets from Mercury through Pluto have all twelve natal
signs and all twelve natal houses: 96 sign entries and 96 house entries, alongside
eight general natal profiles. Outer-planet sign themes describe a shared
generational context; the natal house and aspects supply personal context.
Unsupported bodies or invalid keys return undefined without fallback. These
lookups use natal placements; the sky-retrograde lookups below use current
transiting placements.
Vertex lookups use the point getters with vertex and antivertex, plus
getVertexContactDescription. They cover the two concepts, the Vertex in houses 4 to 9 and planet
contacts for every planet except Neptune. What counts as a contact is the
caller’s decision; the lookup takes only the planet. The Vertex by sign is read
through the natural house of the sign, so getPointSignDescription('vertex', sign)
answers for Cancer through Sagittarius only. Lilith by house is read the same way
in reverse: house N returns the account of the Nth sign.
Planet-pair aspects cover conjunction, sextile, square, trine, quincunx and
opposition between the ten planets: 256 of the 270 combinations. Each entry is the
shared theme for that pair. Unsupported pairs return undefined, with no fallback to the general aspect
concept.
Sun with Ascendant covers the 144 ordered combinations and is separate from the twelve standalone Ascendant profiles.
Symbolic degrees are the 360 degree images (monomers), usually two per degree. The
text states the image and its associated meaning where available.
getSymbolicDegreeNumber(longitude) uses the following boundary rule: 18°00′ is the 18th
degree and anything above it up to 19°00′ is the 19th, so an exact sign boundary
belongs to the 30th degree of the previous sign.
Dignity statuses describe domicile, exaltation, detriment and fall as concepts;
getEssentialDignity still decides which planet holds which status. Decan profiles
are keyed by sign and decan number and use the same Chaldean rulers as getDecan.
Bilingual timing descriptions
Timing descriptions use a separate immutable bank, ASTROLOGY_TIMING_DESCRIPTIONS.
It includes current-period themes and separate traditional natal reference entries.
Each text getter has an Entry counterpart
returning { pt, en, keywords, src, reviewNotes }; the last two fields are empty
compatibility arrays. English is the
default; a case-sensitive pt locale prefix selects Portuguese.
import { getTransitPlanetDescription, getTransitAspectDescription, getSkyRetrogradePlanetDescription, getSkyRetrogradeSignDescription, getMoonPhaseDescription, getDailyMoonSignDescription, getSignIngressDescription, getLunationSignDescription, getNakshatraDescription, getNakshatraPadaDescription, getVimshottariDashaDescription, getSeasonalFestivalDescription, getSeasonalPointDescription, getDayRulerDescription, getPlanetaryHourRulerDescription, getTimingTechniqueDescription, getFirdariaMajorPeriodDescription, getFirdariaSubPeriodDescription, getFirdariaRelationshipDescription, getFirdariaPairDescription, getSolarReturnPlanetHouseDescription, getSolarReturnAspectDescription, getSolarReturnNatalAspectDescription, getSolarReturnNatalSignDescription, getSolarReturnAphorismDescription, getSolarReturnMcHouseDescription,} from 'kaabalah/astrology';
getTransitPlanetDescription('saturn', 'pt-BR');getTransitAspectDescription('saturn', 'square', 'sun', 'pt-BR'); // transit Saturn to natal SungetTransitAspectDescription('sun', 'square', 'saturn'); // directed lookup: transit Sun to natal SaturngetTransitAspectDescription('mean node', 'sextile', 'chiron', 'pt-BR');getTransitAspectDescription('sun', 'quincunx', 'saturn'); // undefined: unsupported aspectgetSkyRetrogradePlanetDescription('mercury', -0.1, 'pt-BR');getSkyRetrogradeSignDescription('mercury', 'Aries', -0.1, 'pt-BR');getMoonPhaseDescription('full', 'pt-BR');getDailyMoonSignDescription('Taurus', 'pt-BR');getSignIngressDescription('Aries', 'pt-BR'); // destination-sign themesgetLunationSignDescription('new', 'Aries', 'pt-BR');getLunationSignDescription('full', 'Aries', 'pt-BR'); // Moon in Aries, Sun oppositegetNakshatraDescription('Purva_Bhadrapada', 'pt-BR');getNakshatraPadaDescription('Ashwini', 3, 'pt-BR'); // natal reference themegetNakshatraPadaDescription('Bharani', 1); // natal reference for the specified quartergetNakshatraPadaDescription('Ashwini', 0); // undefined: invalid quartergetVimshottariDashaDescription('ketu', 'pt-BR');getSeasonalFestivalDescription('yule', 'pt-BR');getSeasonalPointDescription('june-solstice', 'south', 'pt-BR'); // YulegetDayRulerDescription('Sun', 'pt-BR');getPlanetaryHourRulerDescription('Mercury', 'pt-BR');getTimingTechniqueDescription('monthly-profection', 'pt-BR');getTimingTechniqueDescription('firdaria', 'pt-BR');getFirdariaMajorPeriodDescription('NorthNode', 'pt-BR');getFirdariaSubPeriodDescription('Jupiter', 'pt-BR');getFirdariaRelationshipDescription('pt-BR');getFirdariaPairDescription('Venus', 'Mercury', 'pt-BR');getFirdariaPairDescription('Mercury', 'Venus'); // reversed roles select a different entrygetFirdariaPairDescription('NorthNode', 'Jupiter'); // undefined: unsupported node pairgetSolarReturnPlanetHouseDescription('sun', 6, 'pt-BR');getSolarReturnPlanetHouseDescription('moon', 12, 'pt-BR');getSolarReturnPlanetHouseDescription('mercury', 6, 'pt-BR');getSolarReturnPlanetHouseDescription('pluto', 12);getSolarReturnPlanetHouseDescription('mercury', 0); // undefined: invalid annual housegetSolarReturnAspectDescription('conjunction', 'sun', 'mars', 'pt-BR');getSolarReturnAspectDescription('conjunction', 'mars', 'sun'); // same within-return pairgetSolarReturnAspectDescription('trine', 'sun', 'mars'); // both planets in the annual chartgetSolarReturnNatalAspectDescription('saturn', 'conjunction', 'mars', 'pt-BR');getSolarReturnNatalAspectDescription('mars', 'conjunction', 'saturn'); // annual Mars to natal SaturngetSolarReturnNatalAspectDescription('ascendant', 'conjunction', 'moon');getSolarReturnNatalAspectDescription('chiron', 'opposition', 'mercury', 'pt-BR');getSolarReturnNatalAspectDescription('sun', 'conjunction', 'sun'); // undefined: defining solar returngetSolarReturnNatalSignDescription('saturn', 'moon', 'pt-BR');getSolarReturnNatalSignDescription('moon', 'saturn'); // reversed roles select a different entrygetSolarReturnNatalSignDescription('moon', 'moon'); // same sign at birth and returngetSolarReturnNatalSignDescription('saturn', 'mars'); // annual Saturn in natal Mars's signgetSolarReturnAphorismDescription('ascendant-in-natal-jupiter-house', 'pt-BR');getSolarReturnAphorismDescription('natal-tenth-sign-in-return-house-7');getSolarReturnAphorismDescription('natal-fortune-sign-in-return-house-12');getSolarReturnAphorismDescription('return-second-ruler-in-first-financial-situation', 'pt-BR');getSolarReturnMcHouseDescription(10); // profession, occupation, fame or fortune| Lookup | Coverage |
|---|---|
getTransitPlanetDescription | Sun through Pluto, lowercase chart keys |
getTransitAspectDescription | 840 directed profiles across 12 transiting bodies, five major aspects and 14 natal points |
getProgressedHouseDescription | Secondary progressed sun and moon, each in natal houses 1–12 (24 profiles) |
getProfectionHouseDescription | All twelve computed profected houses; period-neutral focus themes |
getSolarReturnAscendantHouseDescription | Solar-return Ascendant in natal houses 1–12; annual interpretations |
getSolarReturnMcHouseDescription | Solar-return MC in natal houses 1–12; twelve annual situation interpretations |
getSolarReturnPlanetHouseDescription | All ten return planets, sun through pluto, each in all twelve annual houses (120 profiles); other bodies absent |
getSolarReturnAspectDescription | 214 major aspects between planets in the same return chart; either planet order |
getSolarReturnNatalAspectDescription | 947 directed return-to-natal contacts, including source readings and class-grounded syntheses |
getSolarReturnNatalSignDescription | 100 directed combinations for a return planet occupying a natal planet’s sign |
getSolarReturnAphorismDescription | 141 conditional references, including Ascendant rules, natal-tenth-sign and natal-Fortune-sign grids, and four annual-rulership examples |
getSkyRetrogradePlanetDescription | Mercury through Pluto; a finite numeric negative longitude speed is required |
getSkyRetrogradeSignDescription | Mercury through Pluto × twelve current sky signs (96 profiles); finite negative longitude speed required |
getMoonPhaseDescription | All eight MoonPhaseName values |
getDailyMoonSignDescription | All twelve title-case zodiac signs, Aries through Pisces |
getSignIngressDescription | All twelve destination signs, Aries through Pisces |
getLunationSignDescription | new and full, each with all twelve Moon signs |
getNakshatraDescription | All 27 canonical underscored NakshatraId keys; deity and electional nature |
getNakshatraPadaDescription | All 27 canonical NakshatraId keys × integer quarters 1–4 (108 natal reference entries) |
getVimshottariDashaDescription | All nine lowercase VimshottariLord keys; major-period themes |
getSeasonalFestivalDescription | samhain, yule, imbolc, ostara, beltane, litha, lammas, mabon |
getSeasonalPointDescription | All eight SeasonalPointId values, with an explicit north or south hemisphere |
getDayRulerDescription, getPlanetaryHourRulerDescription | The seven title-case PlanetaryHourRuler names |
getTimingTechniqueDescription | annual-profection, monthly-profection, solar-return, lunar-return, jupiter-return, saturn-return, nodal-return, firdaria |
getFirdariaMajorPeriodDescription | The nine FirdariaPlanet keys, including NorthNode and SouthNode |
getFirdariaSubPeriodDescription | Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn |
getFirdariaRelationshipDescription | The general major-period/sub-period relationship |
getFirdariaPairDescription | All seven classical major lords × seven classical sub-lords (49 directed modern profiles); node combinations absent |
getSkyRetrogradeSignDescriptionEntry(planet, sign, longitudeSpeed) returns an
immutable bilingual entry with keywords. Its text counterpart is
getSkyRetrogradeSignDescription(planet, sign, longitudeSpeed, language?).
Coverage is all eight planets from Mercury through Pluto in all twelve signs.
The planet key is lowercase; the sign is the canonical English name, such as
Aries or Taurus.
Supply the transiting planet’s current sign and its computed longitude speed.
For example, Mercury retrograde in Taurus selects mercury/Taurus. The sign
argument does not select the person’s natal Sun or Ascendant. A missing,
nonfinite, zero or positive speed returns undefined, as do unsupported planets,
sign aliases and invalid runtime keys. There is no natal-placement, whole-planet
or reversed-key fallback. Portuguese locales begin with pt; English is the
default. The lookup does not calculate positions, retrograde dates or chart
contacts. These period descriptions include sign-specific themes, possible
difficulties and qualifications.
The general transit, day-ruler and hour-ruler descriptions adapt planetary symbolism to their timing roles. A particular planet/aspect/natal-target reading is a separate lookup. Descriptions retain their astrological meanings and qualifications; a lookup returns text without assessing chart conditions.
The directional transit-aspect bank covers the ten planets, the mean North Node and Chiron as transiting bodies. Each has conjunction, sextile, square, trine and opposition entries for those same natal points plus the natal Ascendant and Midheaven. The bank includes direct course readings such as Pluto conjunct the natal Midheaven. Editorial syntheses combine the taught transiting and natal roles with the meaning of the aspect.
Pass the transiting body, aspect and natal point in that order. Use
mean node for the mean North Node and mc for the Midheaven. Each contact
uses the same description across motion directions. Exact timing and
retrograde status come from the transit calculation. The bilingual
entries retain chart qualifications in the text. An unlisted combination
returns undefined.
getProgressedHouseDescriptionEntry(progressedPlanet, natalHouse) returns an
immutable bilingual entry with keywords;
getProgressedHouseDescription(progressedPlanet, natalHouse, language?) returns
the text (Portuguese for pt*, English by default). Coverage is the
secondary progressed Sun and Moon through all twelve natal houses. The caller
supplies the body and the integer house number from its computed placement;
the lookup does not calculate a progression or locate a body among house cusps.
Do not substitute the progressed chart’s own house number for a natal-house
placement. Other bodies, invalid house numbers and unsupported keys return
undefined without coercion or a natal/transit/profection fallback.
These describe progressed-body roles and house topics. The Sun specifies that a house ingress alone does not indicate a notable occurrence. Moon descriptions include physical, emotional and situational changes and potential new events, with favorable or adverse character depending on the natal Moon, house ruler and aspects. Those conditions are stated in the prose, not assessed by the lookup. No fixed duration, ingress date or progressed aspect-pair interpretation is calculated. These are secondary progressions, not solar arcs or progressed solar-return charts.
The Moon bank covers all eight phases with their cycle symbolism. Bodily, relationship, ritual and event interpretations retain their qualifications; intermediate-phase cycle adaptations remain distinct from claims about a person born under that phase. Phase selection keeps the library’s centered 45-degree sectors; description lookup does not classify a phase or change its angular boundaries. The daily Moon-sign bank covers all twelve signs with two-sentence interpretations and bilingual keywords. Its transit interpretations retain waxing/waning and other qualifications in the prose; the sign-only lookup does not assess those conditions. No natal or neighboring profile fills a gap.
Sign-ingress descriptions provide two sentences and bilingual keywords for the destination sign. Pass the sign being entered, including on a retrograde re-entry. They describe general sign symbolism. The entering planet and its aspects need to be considered separately; these entries supply no planet-by-sign interpretation or ingress date calculation.
Lunation-sign descriptions combine new/full Moon themes with the Moon’s sign.
Use the Moon’s sign for both phases; at a full Moon the Sun is opposite it.
Each pair has two sentences and bilingual keywords describing phase and sign
symbolism. Individual chart conditions must be assessed separately.
Other phase keys return undefined; no lunation date is calculated by the lookup.
Nakshatra entries describe traditional deity associations and electional categories.
They do not assign natal personality traits. The separate pada bank contains all
108 quarters as natal reference descriptions, including physical,
health, relationship, financial and other interpretations with their
qualifications. Each quarter has its own
entry. Invalid IDs or quarters return undefined, without a whole-nakshatra
fallback. The bank does not predict daily Moon events, determine navamsha signs
or equate Dhruva with sidereal coordinates.
Vimshottari profiles describe the major-period lord and retain conditions about
placement and aspects in the prose. The lookup does not assess those conditions
or interpret an antardasha, major/sub-lord pair or Yogini period. These banks use
already calculated identifiers and leave the selected coordinate frame unchanged.
Seasonal-point lookup associates an astronomical point with seasonal festival symbolism for the supplied hemisphere. It does not calculate a festival date or equate a fixed civil-calendar celebration with an exact longitude crossing. The northern and southern associations are six months apart.
Day and hour getters accept the ruler already computed by getPlanetaryHours.
They keep its standard weekday rulers and unequal sunrise-based hours; the
description lookup performs no date, location, sunrise or hour calculation.
Technique introductions explain the method without interpreting an individual
chart. Annual profection uses the whole-sign convention;
monthly prose follows one sign per month without asserting equal day counts
(getMonthlyProfections uses calendar-month anniversaries). Lunar-return prose
refers to the Moon returning to its natal longitude. A return-instant finder
does not calculate or interpret a return chart merely by returning that instant.
Jupiter, Saturn and nodal return introductions describe approximate cycle lengths
and interpretive themes. A nodal return refers to the north node returning to its
natal longitude, using the same mean/true-node convention as the calculation.
The description getters do not calculate return dates or select a unique pass.
getProfectionHouseDescriptionEntry(house) returns one of twelve immutable
profected-house focus entries, with bilingual text and keywords.
getProfectionHouseDescription(house, language?) returns the localized text
(Portuguese for pt*, English by default). Pass the numerical house already
computed by the profection method, for example getProfectionForAge(chart, age).house.
Only integer numbers from 1 through 12 are accepted; invalid inputs return
undefined without coercion or fallback.
These combine the profection activation method with house topics, rather than claiming a traditional twelve-house event dictionary. Bodily, relationship, birth/death/rebirth and difficult house domains remain part of those topics. Read the period ruler’s natal condition, placement and aspects separately; the lookup does not assess them, calculate dates or houses, or interpret a sign/lord combination. These entries do not establish a daily profection method.
getSolarReturnAscendantHouseDescriptionEntry(natalHouse) returns one of twelve
immutable bilingual entries with keywords;
getSolarReturnAscendantHouseDescription(natalHouse, language?) returns its text
(Portuguese for pt*, English by default). Supply the already computed natal
house containing the solar-return Ascendant. This is a directed overlay;
the natal Ascendant in a return-chart house is a different placement. The lookup
does not compute a return chart, choose a return location, locate an Ascendant
among cusps or equate the tenth house with the MC. Only integer numbers 1–12 are
accepted; invalid values return undefined without coercion or fallback.
These describe annual Ascendant placements with their favorable and adverse branches, including health, mortality, reproductive, relationship, financial and other event interpretations. Their chart conditions remain explicit. Read both charts as a whole; the lookup does not assess those conditions or interpret a return-planet/natal-planet aspect.
getSolarReturnMcHouseDescriptionEntry(natalHouse) returns an immutable
bilingual entry with keywords, and
getSolarReturnMcHouseDescription(natalHouse, language?) returns the text
(Portuguese for pt*, English by default). Supply the already computed natal
house containing the solar-return MC longitude. Coverage is houses 1–12.
The tenth-house entry describes the MC returning to its natal position. The lookup does not calculate exact angular
coincidence or equate the MC with the tenth cusp across house systems.
These twelve interpretations concern social and occupational circumstances,
including favorable opportunities, dependence, financial outcomes, mortality
affecting business and professional difficulties. Their conditions
and contrasting outcomes remain in the prose; the lookup does not assess them.
This is return MC in natal houses, distinct from natal MC
in return houses, the return chart’s own tenth house, and the return Ascendant
overlay. Only integer numbers 1–12 are valid inputs; unsupported and invalid
queries remain undefined, without coercion or another bank’s fallback.
No return place, chart, cusp placement, date, aspect or angle tolerance is computed.
getSolarReturnPlanetHouseDescriptionEntry(planet, annualHouse) returns an
immutable bilingual entry with keywords;
getSolarReturnPlanetHouseDescription(planet, annualHouse, language?) returns
the text (Portuguese for pt*, English by default). Use a lowercase planet key
and its already computed house in the solar-return chart itself. Current
coverage is all ten planets — sun, moon, mercury, venus, mars, jupiter,
saturn, uranus, neptune and pluto — each in all twelve annual houses
(120 bilingual profiles). Other bodies remain unsupported and return undefined. Invalid keys,
non-numeric or non-integer houses and out-of-range values also return
undefined, without coercion or a natal, transit, progression or overlay fallback.
These describe annual planet placements, including favorable and adverse outcomes, bodily and mortality interpretations, and their rulership, aspect and whole-chart qualifications. The fifth house’s focus changes according to the houses ruled by the Sun. The sixth and twelfth entries include bodily and mortality interpretations; Moon entries retain their aspect, sign, gender and rulership qualifications. The lookup does not identify ruled houses or assess aspects and condition. A return planet’s annual-house placement is distinct from its placement in natal houses or a natal planet in return houses. This lookup does not compute a chart, place, date or cusp placement, equate annual house 10 with an MC conjunction, or describe a progressed chart or return-to-natal planetary aspect.
The method weighs signs, aspects, rulership and the whole chart, with annual-to-natal house overlays taking precedence over isolated annual-house indications. The Sun’s fixed return sign is not reweighed for zodiacal strength or weakness in this method. Mercury is described as acting more through rulership and aspects than through its occupied house. The interpretations treat Mercury or Venus conjunct the Sun as reinforcing the occupied annual house; the lookup does not calculate this condition.
The interpretations associate Venus with intimate happiness, especially in men’s charts, and a pleasant influence in its house, with jealousy in Scorpio; Mars acts rapidly through strong anger or desire and signifies the lover in women’s charts. Jupiter brings some luck or happiness to its annual house; the interpretations describe an increased benefic influence when it was weak natally in Gemini, Virgo or Capricorn, is strong at the return and adversely aspects its natal position. Saturn usually signifies a burden lasting through the year, requiring attention to aspects, rulership and natal links; Uranus more often acts through a sudden, brief event, while Neptune acts more inwardly and psychically. Pluto’s meanings are approximate and still developing; the lookup does not determine whether their conditions hold.
getSolarReturnAspectDescriptionEntry(aspect, planetA, planetB) returns an
immutable bilingual entry for an aspect between two planets in the same
solar-return chart. getSolarReturnAspectDescription(aspect, planetA, planetB, language?) returns its text. The ten lowercase planet keys are accepted in either
order; the stored pair uses Sun-through-Pluto order. This normalization applies
only to this within-return lookup. Identical bodies, unsupported bodies/aspects,
non-string inputs and unsupported combinations return undefined, without natal,
transit or general-aspect fallback.
The bank has 214 entries across conjunction, sextile, square, trine and opposition. Eleven combinations are excluded by planetary elongation. A Sun–Mercury or Sun–Venus pair supports conjunction only, and Mercury–Venus supports conjunction and sextile. The bank combines direct interpretations with class-grounded syntheses using both planets in the annual chart. The direct Mars–Uranus opposition retains its financial second/eighth-house condition for theft or involuntary money loss. Sign, house, rulership, natal-aspect, annual-aspect and other conditions remain explicit in the source readings. Check those conditions in the full annual chart.
The aspect method describes at most 8° for the luminaries in applying conjunctions/oppositions and 6° for other planets, with tighter aspects more tangible. Separating aspects usually concern something preceding the birthday, with only an appearance of realization during the coming year. These are textual interpretation conventions; these getters do not select an orb policy, measure aspects, compute applying/separating motion or change the calculator. The descriptions also associate adverse Uranus–Ascendant aspects with electrical accidents, their severity proportional to Uranus’s strength; this general angular clause does not identify an individual aspect/pair entry in the planet-only bank.
getSolarReturnNatalAspectDescriptionEntry(returnPoint, aspect, natalPoint) and
getSolarReturnNatalAspectDescription(returnPoint, aspect, natalPoint, language?)
are a directed lookup. The first point belongs to the return chart and the
last point belongs to the natal chart. Both parameters use
SolarReturnNatalDescriptionPoint, which accepts the ten planets from Sun
through Pluto, mean node, chiron, ascendant and mc. Use the chart
roles and aspect as supplied. The bank covers 947 of the 980 ordered
combinations across the five major aspects. The other 33 keys return
undefined. These are the defining Sun conjunction, the four other
Sun-to-Sun aspects and 28 combinations among the Sun, Mercury and Venus
excluded by their maximum angular separation using a 1° reference orb.
Calculate the contact with your chosen orb before selecting the description.
Use both charts to verify any additional conditions in the text.
Several angle entries preserve specific source rules. A. de Thyane’s rules for the annual Ascendant square or opposite the natal Ascendant retain their original qualifications. The Midheaven oppositions retain the old-age or natal-fourth-house and affliction conditions stated for the respective contact. The Ascendant trine and Midheaven trine and square follow Morin’s instructions to consider rulers and natal directions. The annual Ascendant–natal Saturn entry follows Morin’s rule, including the natal eighth-house placement or rulership and corroborating timing conditions.
The planetary conjunction entries include 37 directed natal-place readings from the Basel 1559 Latin witness of Abū Maʿshar’s De revolutionibus nativitatum. The text distinguishes a planet arriving at a natal sign, degree or bound. These entries describe the natal-place contact and retain its chart conditions. The historical text does not supply the lookup’s angular tolerance.
Brian Clark’s notes also cover Uranus, Neptune and Pluto conjunct the natal Sun at the time of the return. These readings relate the contact to successive returns and to the houses occupied by the Sun and the outer planet that year.
The editorial syntheses apply taught meanings for the annual body or angle, the aspect and the natal target. For example, the annual Moon conjunct natal Venus joins emotional security with affection and relationship choices. Read these themes in the context of both charts, including the houses and planetary conditions involved.
The descriptions read these contacts through planet nature and both charts’ house overlays, giving special prominence to annual Ascendant/MC contacts while still prioritizing configurations within the annual chart. Check the annual placement of the natal planet contacted. Conditions and examples remain explicit: the annual Ascendant–natal Mars reading retains sixth/twelfth rulership without specifying which chart supplies those ruled houses; the Neptune–Jupiter entry marks its family/recovery/maternal-mortality example as a specific chart illustration, alongside the general worry and diminished-optimism reading. Changes in annual dignity can improve or aggravate natal indications; natal-aspect repetition alone does not guarantee a favorable or unfavorable year. Birthday retrogradation is described as prolonging an existing state or obstacles, with interpretation subordinate to houses. These lookups assess none of those conditions, compute no chart/date and do not describe progressed aspects.
getSolarReturnNatalSignDescriptionEntry(returnPlanet, natalPlanet) returns an
immutable bilingual entry for a return planet occupying the zodiac sign that
the natal planet occupied at birth. getSolarReturnNatalSignDescription( returnPlanet, natalPlanet, language?) returns its text. Verify the sign placement
in the two computed charts before calling it. Both IDs use lowercase planet keys;
no chart, sign comparison, ingress date, exact conjunction or orb is calculated.
The pair is directed. A same-body key means the planet occupies its natal sign
at the return, without asserting an exact return to its natal degree.
All 100 ordered planet pairs are covered. The original 36 aphorism
readings retain their source conditions. The remaining entries include
class-grounded readings for a shared sign and a sun/sun reference for
the defining return of the Sun. Matching signs can span different degrees
and houses. Check the annual house, rulerships and aspects when applying
the themes. An unsupported ID returns undefined. English is the default
and a locale starting with pt selects Portuguese.
The 36 original entries preserve the aphorisms’ specific favorable/adverse outcomes, including illness, mortality, pregnancy, relationship, property, reputation and political or social circumstances. Conditions concerning aspects, dignity, sect, annual houses, lunar phase, oriental/occidental position, gender and the person’s circumstances remain textual. The Mars–Saturn mitigation in Aries or Scorpio retains its exception for women’s charts; within this aphorism series, the ruler of the year is understood as the Ascendant’s ruler. This is not a definition for other Timing methods. Some conditions leave the chart or actor unspecified. None of these conditions is assessed by the lookup.
The interpretation context compares the return with transits and adjacent annual charts and considers the person’s condition, possibilities and way of life. It cautions against turning every configuration into a major event. This qualification applies to the predictive interpretations, including difficult outcomes. The separate initial Ascendant sign/house aphorisms and later rules requiring several chart conditions are not implied by this planet/sign bank.
getSolarReturnAphorismDescriptionEntry(aphorism) returns an immutable bilingual
conditional reference with keywords, and
getSolarReturnAphorismDescription(aphorism, language?) returns its text.
SolarReturnAphorismId is the union of supported IDs. The bank is exposed as
ASTROLOGY_TIMING_DESCRIPTIONS.solarReturnAphorisms; its keys can be enumerated to
inspect coverage. IDs select reference descriptions. A successful lookup does not
mean that a chart satisfies their conditions: the lookup computes nothing. To find the
aphorisms whose conditions hold, use matchSolarReturnAphorisms (below).
Matching the aphorisms to a year
matchSolarReturnAphorisms(natal, solarReturn, options?) checks every aphorism’s “if”
clause against a natal chart and one of its solar return charts
(getSolarReturnChart(...).solarReturnChart). It returns:
specific: the matching IDs in bank order.general: the three rules about return-to-natal contacts that nearly every year meets.yearRulerandfirstHouseRuler: the planets it read.ageandmethod.
Show each ID with getSolarReturnAphorismDescription(id, language). Qualifiers that only
shade the outcome (“especially if…”, the person’s circumstances) are not required; the
text carries them.
import { getBirthChart, getSolarReturnChart, matchSolarReturnAphorisms, getSolarReturnAphorismDescription } from 'kaabalah/astrology';
const natalChart = await getBirthChart(natal);const { solarReturnChart } = await getSolarReturnChart({ natal, year: 2026 });const { specific, yearRuler } = matchSolarReturnAphorisms(natalChart, solarReturnChart);specific.map((id) => getSolarReturnAphorismDescription(id, 'en'));Conventions (SOLAR_RETURN_APHORISM_METHOD):
- Ruler of the year. By default this is the annual profection lord: the traditional ruler of
the sign that lies, past the natal Ascendant’s, as many signs as completed years at the return.
Most of these rules come from Junctinus through Volguine’s Technique of Solar Returns.
Junctinus read returns with profections, and the text names “Saturn, ruler of the year” apart
from “the annual first-house ruler”.
{ yearRuler: 'return-ascendant' }takes the return Ascendant’s ruler instead. - First-house ruler. The traditional ruler of the return Ascendant sign is “the ruler of the first house” or “its ruler”.
- Aspects. Ptolemaic aspects within one chart use
DEFAULT_ASPECT_SPECSorbs (8, 5, 6, 7, 8). A return point on a natal point must be within 3°. - Afflicted: a conjunction, square or opposition to Saturn or Mars.
- Unfortunate: afflicted, in detriment or fall, within 8.5° of the Sun, or in house 6, 8 or 12.
- Eclipses. These are the year’s eclipses from this return to the next. They are searched with
findEclipses, so the Swiss Ephemeris must be ready; you can also pass them aseclipses, and[]skips the two eclipse rules. “The Sun eclipsed” at the return means a solar eclipse maximum within a day of it. - Volguine’s readings.
- “Opposite the seventh” is house 1 in either chart.
- “A sign linked to a malefic at birth” (§563) is any sign inside the return’s first house that a natal malefic occupied.
- “Benefic at birth, malefic in the return” (§540) is one planet whose condition turns from fortunate to unfortunate.
SOLAR_RETURN_APHORISM_TRIGGERS holds the check for each ID, and SolarReturnAphorismFacts
holds the chart facts they read, for callers that want to test a single rule.
The 141 references preserve the selected aphorisms’ complete prerequisites and
favorable/adverse branches: combinations of natal and annual houses, rulers,
aspects, dignity, sect, lunar phase, oriental/occidental position, eclipses and
other specified factors. They retain health, mortality, captivity, sexuality,
family, property, reputation, political/status and other outcomes.
Several aphorisms may discuss a topic addressed by another bank; their distinct
conditions are kept in the reference text rather than imposed on that bank.
Unknown IDs and non-string runtime inputs return undefined without aliases,
partial matching or fallback. Locale handling and recursive immutability match
the other Timing entries.
The initial rules describe the return Ascendant passing through a natal house
containing a planet. The reciprocal malefic/Ascendant condition is a
separate configuration with no specified contact orb. In
ascendant-second-eighth-venus-saturn-captivity, the entry places
the return Ascendant in the natal second house and the annual seventh house
in correspondence with the natal eighth, with Venus ruling the year and Saturn
in the fourth. The entry supplies reference prose; it does not calculate or
match these conditions.
The natal-tenth-sign-in-return-house-1 through -12 references concern the
sign of the natal tenth house in the specified annual house. The
natal-fortune-sign-in-return-house-1 through -12 references concern the
natal sign of the Part of Fortune. Neither series asserts an exact MC or
Fortune longitude contact, or substitutes for the directed return-MC-in-natal-house
lookup. The caller must resolve the stated placement convention separately.
These entries preserve all stated natal promise, aspect, circumstance and other
qualifications, including unfavorable branches.
Four further references describe the annual rulers of the second, fifth, sixth and eighth houses placed in the annual first house. They retain the financial planet/dignity/aspect branches, adult/elderly distinction, health/work exception and other-chart-confirmation condition, and the natal-rulership qualification identifying the person concerned in the eighth-ruler interpretation. The stomach-ulcer example illustrates a particular chart. These four examples do not establish a complete rulership matrix or a natal-ruler placement dictionary, and the lookup does not calculate their conditions.
Additional conditional references cover a dignified planet opposing its own weak natal position, the annual Ascendant in adverse aspect to the natal Midheaven, and Morin’s rule for evaluating natal and annual aspects with reception. Ibn Ezra’s references distinguish a planet returning to its own natal position from a planet occupying another’s, with the four benefic and malefic cases kept together as stated in Book of Nativities IV §20. Other references cover conjunctions of rulers of the same natal and annual house, the return of at least three planets to their natal places, and an afflicted annual Saturn overlying a natal planet.
Interpretation conventions remain textual. Within this aphorism series, ruler of the year means Ascendant ruler without a natal/annual chart assignment where unspecified. The via-combusta interpretations use the following intervals, from the 18th degree of Gemini through the 2nd degree of Cancer inclusive and from the 24th degree of Sagittarius through the 2nd degree of Capricorn inclusive. These differ from conventional via-combusta intervals; they are not solar-combustion conditions. The eclipse commentary retains its coincidence-at-return condition, emphasis on solar eclipses, Ascendant/health branches and a limited sample of four solar eclipses. Unresolved conditions are stated explicitly. The whole-chart and person-circumstance interpretation context above also applies to this bank.
Firdaria role profiles distinguish the major lord’s broad chapter from the sub-lord’s emphasis within it. A separate general description explains the relationship between period roles.
The separate pair bank contains 49 directed entries: each of the seven classical
major lords with each of the seven classical sub-lords. Each
entry retains the major lord’s context and the sub-lord’s focus; reversing the
arguments retrieves a different entry. Same-lord pairs describe a
concentrated emphasis. Read the rulers’ natal houses, rulerships, aspects and
conditions separately; the lookup returns the interpretation without
assessing those conditions.
getFirdariaPairDescriptionEntry(majorLord, subLord) returns the immutable entry,
and getFirdariaPairDescription(majorLord, subLord, language?) returns its text.
Unsupported combinations return undefined, without reversed or role-profile
fallback. Neither getter calculates dates, sect or period lengths.
Major-period keys follow FirdariaPlanet exactly. North and South Nodes retain
major-period profiles; node sub-period and pair lookups return undefined.
The pair bank covers planetary partnerships only. The calculator treats node
majors as undivided: they have empty subPeriods and
currentSub is null while either node rules. Node pairs are not applicable. Firdaria
profiles remain independent of dasha and natal-placement descriptions.
1. Birth Charts
import { getBirthChart, HouseSystem } from 'kaabalah/astrology';getBirthChart(options): Promise<BirthChart>
Calculates a full natal chart. Timezone is auto-detected from latitude/longitude by default.
const chart = await getBirthChart({ date: { year: 1990, month: 6, day: 15, hour: 14, minute: 30 }, latitude: 48.856, longitude: 2.352, houseSystem: HouseSystem.PLACIDUS, // optional, defaults to PLACIDUS timeZoneSettings: { autoTimeZone: true }, // default — or { timeZone: 'America/Paris' }});
chart.planets.sun.zodiacPosition.sign // "Gemini"chart.planets.sun.zodiacPosition.house // 10chart.houses.ascendant.sign // "Virgo"chart.houses.mc.sign // "Gemini"chart.nodes.parsFortunae.zodiacPosition.sign // Part of Fortunechart.aspects // AspectEdge[]chart.sect // "diurnal" | "nocturnal" (Sun above the horizon)chart.dateUtc // Date (UTC)BirthChartOptions
| Field | Type | Description |
|---|---|---|
date | Date | LocalDateTimeParts | Local civil date-time. Use LocalDateTimeParts ({ year, month, day, hour?, minute?, second? }) to avoid timezone ambiguity. |
latitude | number | −90 to 90 |
longitude | number | −180 to 180 |
houseSystem | HouseSystem | Optional. Defaults to PLACIDUS. Placidus and Koch are undefined beyond the polar circle (|latitude| >= ~66.56): getBirthChart then throws a SwissEphError with code SWISSEPH_HOUSES_UNAVAILABLE. |
houseSystemFallback | "whole-sign" | "equal" | "porphyry" | Optional, opt-in, off by default. Substitutes that system only when the requested one is unavailable at the latitude. A substitution is never silent: chart.houseSystem is the system actually used and chart.houseSystemSubstitution records the request, reason and a notice. |
timeZoneSettings | TimeZoneOptions | Optional. Defaults to { autoTimeZone: true }. |
BirthChart return type
| Field | Type | Description |
|---|---|---|
dateUtc | Date | Chart moment in UTC. |
planets | Record<string, HydratedPlanet> | Keyed by lowercase planet name (e.g. "sun", "moon", "true node"). |
nodes | Record<string, HydratedNode> | Currently contains parsFortunae (Part of Fortune). |
houses | object | Contains ascendant, mc, dc, ic, houses[], and optional ascmc auxiliary points. |
aspects | AspectEdge[] | All intra-chart aspects including Ascendant and MC. |
houseSystem | HouseSystem | House system the cusps were computed with. |
sect | "diurnal" | "nocturnal" | From the Sun’s altitude at the birth place (physical horizon), identical for every house system. See Sect. |
sectDetails | SectResult | Geometric and apparent Sun altitude and the convention used. |
lots | LotsResult & { fortunePosition, spiritPosition } | Lots of Fortune and Spirit with the formulas used. |
moonPhase | MoonPhaseResult | Elongation, 8-phase name, waxing flag and illumination (labelled approximate). |
ZodiacPosition (used throughout):
{ sign: string; // e.g. "Scorpio" decimalDegrees: number; // 0–30 within sign traditionalFormat: string; // "9°48'" decimal: string; // "9.80°" longitude: number; // 0–360 house: number; // 1–12}House systems
| Constant | Description |
|---|---|
HouseSystem.PLACIDUS | Default, most widely used |
HouseSystem.WHOLE_SIGN | Required for profections and firdaria |
HouseSystem.KOCH | Koch |
HouseSystem.EQUAL | Equal from Ascendant |
HouseSystem.REGIOMONTANUS | Regiomontanus |
HouseSystem.CAMPANUS | Campanus |
HouseSystem.PORPHYRIUS | Porphyry |
HouseSystem.MORINUS | Morinus |
HouseSystem.MERIDIAN | Meridian |
HouseSystem.KRUSINSKI | Krusinski |
HouseSystem.ALCABITIUS | Alcabitius |
Minimal natal example
import { getBirthChart, getSwissEph } from 'kaabalah/astrology';
await getSwissEph(); // once per process; loads the bundled WASM and ephemeris files
const chart = await getBirthChart({ date: { year: 1990, month: 6, day: 15, hour: 14, minute: 30 }, latitude: 48.856, longitude: 2.352, timeZoneSettings: { timeZone: 'Europe/Paris' },});
chart.planets.sun.zodiacPosition.sign; // "Gemini"chart.planets.sun.zodiacPosition.traditionalFormat; // "24°09'"chart.houses.ascendant.sign; // "Libra"chart.sect; // "diurnal"chart.sectDetails.sunGeometricAltitude.toFixed(2); // "63.32"chart.lots.fortunePosition.sign; // "Gemini"chart.lots.spiritPosition.sign; // "Capricorn"chart.moonPhase.phase; // "last_quarter"chart.moonPhase.illumination.method; // "approximate"The values above are the real output of this script (synthetic input). getSwissEph() is optional (every calculation initialises the runtime on first use) but calling it explicitly lets you pass wasmPath/ephePath and strictEphemeris, see Ephemeris provenance and strict mode. It writes a “Setting ephemeris path to …” notice to stderr unless you pass onRuntimeNotice.
Sect (physical horizon)
Sect depends on the sky, not on the house system. getBirthChart computes the Sun’s geometric (unrefracted, centre-of-disc) altitude at the birth place with Swiss swe_azalt:
- the chart is diurnal when the altitude is strictly greater than
0degrees; - an altitude exactly on the threshold is nocturnal (the documented exact-horizon convention, echoed in
chart.sectDetails.method.exactHorizon); - the result is identical in Placidus, whole-sign, equal and every other house system.
import { computeSect, getSectFromAltitude } from 'kaabalah/astrology';
getSectFromAltitude(0.5); // "diurnal"getSectFromAltitude(0); // "nocturnal"getSectFromAltitude(-0.5, -1); // "diurnal": a custom horizon threshold of -1 degreecomputeSect(dateUtc, latitude, longitude, sun, { basis, horizonAltitude }) is the underlying call (needs an initialised Swiss Ephemeris). basis: "apparent" compares the refraction-corrected altitude (standard pressure and temperature) instead. The older getSect(sunHouse) is deprecated: it is only correct when house cusps follow the horizon.
Lots of Fortune and Spirit
chart.lots holds the two Hellenistic lots, sect-reversed counterparts of each other:
| Diurnal | Nocturnal | |
|---|---|---|
| Fortune | ASC + Moon - Sun | ASC + Sun - Moon |
| Spirit | ASC + Sun - Moon | ASC + Moon - Sun |
So Fortune + Spirit = 2 x ASC (mod 360) in either sect. chart.lots.method records the sect and formulas used. The pure helpers are computeLots(asc, sun, moon, sect), calcLotOfFortune and calcLotOfSpirit. chart.nodes.parsFortunae is the legacy entry for Fortune and equals lots.fortune.
Moon phase
chart.moonPhase (pure helper computeMoonPhase(sunLongitude, moonLongitude)) reports the Moon-Sun elongation in [0, 360), an 8-phase name (new, waxing_crescent, first_quarter, waxing_gibbous, full, waning_gibbous, last_quarter, waning_crescent) with 45-degree sectors centred on the principal phases (boundaries at 22.5, 67.5, … degrees; lower bound inclusive), waxing, and illuminatedFraction.
The illumination is approximate: (1 - cos(elongation)) / 2 from the ecliptic longitude difference, ignoring the Moon’s latitude and the Sun/Moon distance ratio. The label is carried in illumination.method ("approximate"); this build never reports an "exact" value.
2. Synastry
import { getSynastryChart } from 'kaabalah/astrology';getSynastryChart(options): Promise<SynastryChart>
Calculates two birth charts and computes all cross-chart aspects (every planet/angle in chart A against every planet/angle in chart B).
const synastry = await getSynastryChart({ chartA: { date: new Date('1990-06-15'), latitude: 48.856, longitude: 2.352 }, chartB: { date: new Date('1992-03-21'), latitude: 51.5, longitude: -0.12 }, aspectSpecs: DEFAULT_ASPECT_SPECS, // optional override});
synastry.chartA // BirthChartsynastry.chartB // BirthChartsynastry.aspects // AspectEdge[] — cross-chart aspectsSynastryChartOptions extends TwoChartOptions:
| Field | Type | Description |
|---|---|---|
chartA | BirthChartOptions | First person’s chart options. |
chartB | BirthChartOptions | Second person’s chart options. |
aspectSpecs | AspectSpec[] | Optional. Overrides default aspect orbs. |
omitCharts | boolean | Optional. true returns { charts: { a, b }, aspects } with metadata-only chart references (dateUtc, houseSystem) instead of two full charts. |
Already-computed charts
getSynastryFromCharts(chartA, chartB, options?) computes synastry from two charts you already have, without touching the ephemeris. N people need N getBirthChart calls instead of N(N-1)/2:
import { getSynastryFromCharts } from 'kaabalah/astrology';
const summary = getSynastryFromCharts(chartA, chartB, { omitCharts: true, ids: { a: 'ana', b: 'bruno' } });summary.charts.a.id; // "ana" (ids are echoed verbatim)summary.aspects; // AspectEdge[]For many people use collections.
3. Composite Charts
import { getCompositeChart } from 'kaabalah/astrology';getCompositeChart(options): Promise<CompositeChart>
Calculates a midpoint composite chart from two birth charts. Planets are the shorter-arc midpoint of the corresponding points in each chart; angles and houses follow the conventions below. getCompositeFromCharts(chartA, chartB, options?) does the same from charts you already computed.
const composite = await getCompositeChart({ chartA: { date: new Date('1990-06-15'), latitude: 48.856, longitude: 2.352 }, chartB: { date: new Date('1992-03-21'), latitude: 51.5, longitude: -0.12 },});
composite.chartA // BirthChartcomposite.chartB // BirthChartcomposite.compositePlanets // Record<string, { name, longitude, zodiacPosition }>composite.compositeHouses // ZodiacPosition[]composite.aspects // AspectEdge[] — aspects within composite chartcomposite.compositeAngles // { ascendant, mc, descendant, ic } ZodiacPositionscomposite.compositeMethod // conventions used (midpoint, antipodal policy, house rule)composite.notices // antipodal pairs, MC/cusp corrections, fallbackscomposite.houseSystems // { a, b } house system of each input and where it came fromConventions (all echoed in compositeMethod / notices):
- Midpoint: shorter-arc midpoint of two ecliptic longitudes.
- Antipodal rule: two points within
0.001degree of exact opposition have two equally valid midpoints. The rule is symmetric in its arguments: the arithmetic mean of the two normalised longitudes in[0, 360)is used (the arc that does not cross 0 Aries), and the pair is flagged as anoticesentry of type"antipodal". - Angles: composite ASC is the midpoint of both ASCs. The composite MC is the midpoint of both MCs or its opposite, whichever lies 0-180 degrees behind the composite ASC (
mc_flippednotice when the opposite is used). DSC = ASC + 180, IC = MC + 180. - Whole-sign houses (both charts whole-sign): house 1 starts at 0 degrees of the composite ASC’s sign and each house is 30 degrees. Previously the cusps were midpoints of the two charts’ whole-sign cusps.
- Other systems: cusp i is the midpoint of cusp i of both charts, anchored to the composite ASC for cusp 1, then walked in order; a midpoint on the wrong side is replaced by its opposite (
cusp_corrected). If the cusps still cannot be ordered strictly increasing, equal houses from the composite ASC are used andcompositeMethod.fallbackis"equal"with anequal_house_fallbacknotice. Mixing a whole-sign chart with another system adds amixed_house_systemsnotice. - Aspects are computed from the final composite point set only.
Composite and Davison charts are different methods, see Davison charts.
4. Transits
import { getTransitChart, getTransitRange } from 'kaabalah/astrology';getTransitChart(options): Promise<TransitChart>
Places current (or any date’s) transiting planets against a natal chart. Transit planets are placed into natal houses.
const transit = await getTransitChart({ natal: { date: new Date('1990-06-15'), latitude: 48.856, longitude: 2.352 }, transitDate: new Date('2026-04-22'), maxOrb: 3, aspectFilter: ['conjunction', 'square', 'opposition'], transitPlanets: ['saturn', 'pluto'], natalPlanets: ['sun', 'moon', 'ascendant', 'mc'], transitLatitude: 48.856, // optional, defaults to natal location transitLongitude: 2.352,});
transit.natalChart // BirthCharttransit.transitDateUtc // Datetransit.transitPlanets // Record<string, TransitPlanet>transit.aspects // TransitAspectEdge[]TransitChartOptions
| Field | Type | Default | Description |
|---|---|---|---|
natal | BirthChartOptions | required | Natal chart options. |
transitDate | Date | required | The transit moment. |
transitLatitude | number | natal latitude | Override transit location. |
transitLongitude | number | natal longitude | Override transit location. |
aspectSpecs | AspectSpec[] | DEFAULT_ASPECT_SPECS | Override orbs. |
maxOrb | number | — | Filter to aspects tighter than this orb. |
aspectFilter | AspectName[] | — | Keep only these aspect types. |
transitPlanets | string[] | all | Lowercase planet names to include as transit points. |
natalPlanets | string[] | all | Lowercase natal points to use as targets (includes "ascendant", "mc"). |
TransitAspectEdge (extends AspectEdge):
| Field | Type | Description |
|---|---|---|
applying | boolean | True when the orb is decreasing. |
retrograde | boolean | True when the transit planet is moving retrograde. |
category | "slow" | "fast" | Slow: Saturn, Jupiter, Uranus, Neptune, Pluto, Chiron, Nodes. |
getTransitRange(options): Promise<TransitRangeResult>
Scans a date range (from / to are a Date or LocalDateTimeParts; a legacy Date is read with host-local getters and reinterpreted in the transit location’s zone, so pass transitTimeZoneSettings: { treatAsUTC: true } to use its own UTC instant) and returns exact aspect events: instants at which the signed angular difference between a transiting body and a fixed natal target crosses the aspect angle, found by signed-angle root bracketing with velocity-zero stations and verified against an angular tolerance. See Exact events for the full contract. Fast bodies (Sun, Moon, Mercury, Venus, Mars) use a scan step of at most 0.25 days, every body at most 2 days.
const range = await getTransitRange({ natal: { date: new Date('1990-06-15'), latitude: 48.856, longitude: 2.352 }, from: new Date('2026-04-01'), to: new Date('2026-06-01'), stepDays: 1, maxOrb: 2, transitPlanets: ['saturn', 'neptune'],});
range.natalChart // BirthChartrange.from // Daterange.to // Daterange.perfections // AspectPerfection[]AspectPerfection:
| Field | Type | Description |
|---|---|---|
transitPlanet | string | Name of transiting planet. |
natalPlanet | string | Name of natal point. |
aspect | AspectName | Aspect type. |
exactDate | Date | Verified root: a true UTC instant at which the aspect is exact. |
exactOrb | number | The angular residual of the root (about 0, degrees), not the display orb. |
retrograde | boolean | Whether transit planet was retrograde at perfection. |
category | "slow" | "fast" | Planet speed category. |
kind | "exact" | Always "exact". |
exactJd | number | Julian Day (UT) of the root. |
solver | PerfectionSolverMetadata | Residual, bracket width, tolerance, iterations, direction, tangent flag, scan step, target longitude, coverage and method. |
Natal targets are fixed points (zero velocity), so applying/separating depends only on the transiting body. For transits over an already-computed natal chart (or any derived chart exposing planets and houses) use getTransitChartFromChart(natalChart, { transitDate, transitLatitude, transitLongitude, ... }); a BirthChart does not store its location, so the transit location is explicit.
5. Solar Returns
import { getSolarReturnChart } from 'kaabalah/astrology';getSolarReturnChart(options): Promise<SolarReturnChart>
Finds the exact UTC moment when the transiting Sun returns to its natal longitude in the specified year (signed-angle root search solved to a 0.001-second bracket by default), then casts a full chart at that moment. The search window is anchored on the natal instant’s local anniversary and widens if no crossing is found, so births at any UTC offset are covered. The solved instant is UTC and the chart is cast with treatAsUTC.
const sr = await getSolarReturnChart({ natal: { date: { year: 1990, month: 6, day: 15, hour: 14, minute: 30 }, latitude: 48.856, longitude: 2.352, }, year: 2026, solarReturnLatitude: 40.7128, // optional relocated SR solarReturnLongitude: -74.006, solarReturnHouseSystem: HouseSystem.WHOLE_SIGN, // optional});
sr.natalChart // BirthChartsr.solarReturnChart // BirthChart — cast at exactReturnDate, SR locationsr.exactReturnDate // Date (UTC)sr.natalSunLongitude // number — natal Sun longitude used for searchsr.year // numbersr.residualDegrees // angular residual of the Sun at the solved root (about 0)sr.solver // { bracketWidthSeconds, timeToleranceSeconds, iterations, direction, coverage, method }SolarReturnOptions
| Field | Type | Default | Description |
|---|---|---|---|
natal | BirthChartOptions | required | Natal chart options. |
year | number | required | Target year for the return. |
solarReturnLatitude | number | natal latitude | Relocated SR location. |
solarReturnLongitude | number | natal longitude | Relocated SR location. |
solarReturnHouseSystem | HouseSystem | natal house system | SR chart house system. |
returnPrecisionSeconds | number | 0.001 | Final bracket width of the solved instant, in seconds. |
residualToleranceDegrees | number | 1e-6 | Maximum accepted angular residual. |
6. Profections
Pure math — requires a whole-sign
BirthChart, but no additional WASM calls.
import { getAnnualProfection, getMonthlyProfections } from 'kaabalah/astrology';Profections are a Hellenistic time-lord technique that advances the Ascendant one house per year. Each house corresponds to a sign, and that sign’s domicile ruler becomes the time lord for the year.
getAnnualProfection(natalChart, birthDate, targetYear?): AnnualProfection
// natalChart must use HouseSystem.WHOLE_SIGNconst chart = await getBirthChart({ date: new Date('1990-06-15'), latitude: 48.856, longitude: 2.352, houseSystem: HouseSystem.WHOLE_SIGN,});
const profection = getAnnualProfection(chart, new Date('1990-06-15'), 2026);// { age: 36, house: 1, sign: "Virgo", ruler: "Mercury", targetYear: 2026 }| Return field | Type | Description |
|---|---|---|
age | number | Age at start of the profection year. |
house | number | Activated house (1–12). |
sign | string | Sign on the activated house cusp. |
ruler | TraditionalPlanet | Domicile ruler = time lord for the year. |
targetYear | number | The year queried. |
getMonthlyProfections(natalChart, birthDate, targetYear?): MonthlyProfectionsResult
Returns the annual profection plus 12 monthly sub-profections, each advancing one sign from the annual sign, starting on the birthday each month.
const monthly = getMonthlyProfections(chart, new Date('1990-06-15'), 2026);
monthly.annualProfection // AnnualProfectionmonthly.months // MonthlyProfection[]// monthly.months[0] = { month: 1, startDate: Date, sign: "Virgo", ruler: "Mercury" }7. Firdaria
Pure math — no WASM dependency.
import { getFirdaria } from 'kaabalah/astrology';getFirdaria(birthDate, isDiurnal, targetDate?, options?): FirdariaResult
Computes the 75-year planetary period cycle. Sect determines the sequence order: diurnal charts begin with the Sun; nocturnal charts begin with the Moon. Sub-periods follow Chaldean descent from the major period ruler.
const firdaria = getFirdaria( new Date('1990-06-15'), true, // isDiurnal — use chart.sect === 'diurnal' new Date('2026-04-22'));
firdaria.sect // "diurnal"firdaria.currentMajor // FirdariaMajorPeriodfirdaria.currentSub // FirdariaSubPeriod | null (null during node majors)firdaria.allPeriods // FirdariaMajorPeriod[]Diurnal sequence (75 years total): Sun 10y → Venus 8y → Mercury 13y → Moon 9y → Saturn 11y → Jupiter 12y → Mars 7y → North Node 3y → South Node 2y
Nocturnal sequence: Moon 9y → Saturn 11y → Jupiter 12y → Mars 7y → North Node 3y → South Node 2y → Sun 10y → Venus 8y → Mercury 13y
FirdariaMajorPeriod:
| Field | Type | Description |
|---|---|---|
planet | FirdariaPlanet | Major period ruler. |
years | number | Duration of the major period. |
startDate | Date | Period start. |
endDate | Date | Period end. |
subPeriods | FirdariaSubPeriod[] | 7 equal sub-periods for planets; empty for node majors. |
FirdariaOptions:
| Field | Type | Default | Description |
|---|---|---|---|
nodeSubPeriodStart | "jupiter-saturn" | "sun-mars" | — | Deprecated and ignored; node majors are undivided. |
8. Aspects
Pure math — no WASM dependency.
import { computeAspects, computeSynastryAspects, computeMidpoints, getAspectMatch, DEFAULT_ASPECT_SPECS,} from 'kaabalah/astrology';getAspectMatch(lonA, lonB, specs?)
Check whether two ecliptic longitudes form any aspect. Returns the matching spec and orb, or null.
const match = getAspectMatch(15, 105);// { spec: { name: "square", angle: 90, orb: 6 }, orb: 0, delta: 90 }computeAspects(planets, specs?): AspectEdge[]
All unique intra-chart aspects among a set of points.
const aspects = computeAspects({ sun: { longitude: 84.5 }, moon: { longitude: 210.3 }, ascendant: { longitude: 165.0 },});computeSynastryAspects(planetsA, planetsB, specs?): AspectEdge[]
All cross-chart aspects — every point in A vs every point in B.
const crossAspects = computeSynastryAspects( { sun: { longitude: 84.5 }, moon: { longitude: 210.3 } }, { sun: { longitude: 120.1 }, moon: { longitude: 300.0 } });computeMidpoints(planetsA, planetsB): Record<string, number>
Shorter-arc midpoint longitude for each planet that exists in both maps. Used internally by getCompositeChart.
const midpoints = computeMidpoints( { sun: { longitude: 84.5 }, moon: { longitude: 210.3 } }, { sun: { longitude: 120.1 }, moon: { longitude: 300.0 } });// { sun: 102.3, moon: 255.15 }DEFAULT_ASPECT_SPECS
| Aspect | Angle | Default orb |
|---|---|---|
| conjunction | 0° | 8° |
| duodecile | 30° | 2° |
| octile | 45° | 3° |
| sextile | 60° | 5° |
| square | 90° | 6° |
| trine | 120° | 7° |
| trioctile | 135° | 3° |
| quincunx | 150° | 3° |
| opposition | 180° | 8° |
AspectEdge:
| Field | Type | Description |
|---|---|---|
planetA | string | First point name. |
planetB | string | Second point name. |
longitudeA | number | Longitude of point A. |
longitudeB | number | Longitude of point B. |
aspect | AspectName | Aspect name. |
aspectAngle | number | Exact aspect angle. |
delta | number | Shorter arc between the two points. |
orb | number | Deviation from exact (degrees). |
9. Astrocartography
Pure math — no WASM dependency (uses pre-computed equatorial positions synchronously).
import { queryAstrocartographyLocation, computeAstrocartographyMap, computeGMST, computeMCLongitude, computeICLongitude, computeHorizonLongitude, findParansAtLatitude, ASTROCARTOGRAPHY_DEFAULT_PLANETS,} from 'kaabalah/astrology';queryAstrocartographyLocation(date, options): AstrocartographyQueryResult
Primary API. For a natal UTC date and a query location, returns how close each planet/angle line is to that location, which lines are active (within orb), and any paran crossings at the query latitude.
const result = queryAstrocartographyLocation(chart.dateUtc, { latitude: 51.5, longitude: -0.12, orb: 3, // default 2 paranOrb: 1, // default 1 planets: ASTROCARTOGRAPHY_DEFAULT_PLANETS, // optional subset});
result.lines // AstrocartographyLineProximity[] — sorted by distanceresult.activeLines // AstrocartographyLineProximity[] — within orbresult.parans // AstrocartographyParan[]AstrocartographyLineProximity:
| Field | Type | Description |
|---|---|---|
planet | string | Planet name. |
angle | "MC" | "IC" | "AC" | "DC" | Angle line type. |
distance | number | Degrees of longitude separation (0–180). |
active | boolean | True when distance ≤ orb. |
longitude | number | Geographic longitude of the line (−180 to 180). |
AstrocartographyParan:
| Field | Type | Description |
|---|---|---|
latitude | number | Query latitude. |
planetA / planetB | string | Two planets sharing this latitude. |
angleA / angleB | AngleType | Their respective angle types. |
longitudeA / longitudeB | number | Their geographic longitudes. |
computeAstrocartographyMap(date, options?): AstrocartographyMap
Generates the complete ACG map: MC/IC lines as constant longitudes, AC/DC lines as arrays of latitude/longitude points from a latitude sweep.
const map = computeAstrocartographyMap(chart.dateUtc, { latitudeStep: 1, // default 1 degree latitudeRange: 66.5, // default 66.5 (polar circle)});
map.meridianLines // AstrocartographyMeridianLine[]map.horizonLines // AstrocartographyHorizonLine[]Lower-level helpers
| Function | Signature | Description |
|---|---|---|
computeGMST | (julianDay) → number | Greenwich Mean Sidereal Time in degrees. |
computeMCLongitude | (gmst, ra) → number | Geographic longitude of a planet’s MC line (−180..180). |
computeICLongitude | (gmst, ra) → number | Geographic longitude of a planet’s IC line. |
computeHorizonLongitude | (gmst, ra, dec, latitude, "AC"|"DC") → number | null | Geographic longitude of AC or DC line at a latitude. Returns null if circumpolar. |
findParansAtLatitude | (positions, gmst, latitude, paranOrb?) → AstrocartographyParan[] | Paran crossings at a latitude from pre-computed equatorial positions. |
ASTROCARTOGRAPHY_DEFAULT_PLANETS: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Chiron, True Node.
10. Essential Dignity
Pure math — no WASM dependency.
import { getEssentialDignity, getDomicileRuler, getExaltation, getDetriment, getFall, getOppositeSign, DOMICILE_RULERS, EXALTATIONS,} from 'kaabalah/astrology';Traditional Hellenistic rulership data for the seven classical planets.
getEssentialDignity(planet, sign): EssentialDignityResult
Comprehensive dignity assessment for a planet in a sign.
const dignity = getEssentialDignity('Saturn', 'Libra');// { domicile: false, exaltation: true, detriment: false, fall: false,// domicileRuler: "Venus", peregrine: false }EssentialDignityResult:
| Field | Type | Description |
|---|---|---|
domicile | boolean | Planet rules this sign. |
exaltation | boolean | Planet is exalted here. |
detriment | boolean | Planet is in detriment here. |
fall | boolean | Planet is in fall here. |
domicileRuler | TraditionalPlanet | The sign’s domicile ruler (may differ from the queried planet). |
peregrine | boolean | None of domicile, exaltation, detriment, or fall. |
Individual lookup functions
getDomicileRuler('Scorpio') // "Mars"getExaltation('Saturn') // { sign: "Libra", degree: 21 }getDetriment('Mars') // ["Libra", "Taurus"]getFall('Jupiter') // "Capricorn"getOppositeSign('Aries') // "Libra"TraditionalPlanet values: "Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn".
11. Decans
Pure math — no WASM dependency.
import { getDecan } from 'kaabalah/astrology';getDecan(longitude): DecanResult
Returns the decan (face) for an ecliptic longitude using Chaldean rulers and the Golden Dawn tarot correspondence.
const decan = getDecan(84.5); // 24°30' Gemini// {// sign: "Gemini",// decanNumber: 3,// ruler: "Saturn",// tarotCard: "Ten of Swords",// startDegree: 80,// endDegree: 90,// degreeWithinSign: 24.5,// }DecanResult:
| Field | Type | Description |
|---|---|---|
sign | string | Zodiac sign. |
decanNumber | 1 | 2 | 3 | Which decan within the sign. |
ruler | TraditionalPlanet | Chaldean ruler of this decan. |
tarotCard | string | Golden Dawn minor arcana card (e.g. "Five of Wands"). |
startDegree | number | Absolute ecliptic longitude start (0–360). |
endDegree | number | Absolute ecliptic longitude end (0–360). |
degreeWithinSign | number | Position within the sign (0–30). |
12. Dodecatemoria
Pure math — no WASM dependency.
import { getDodecatemoria } from 'kaabalah/astrology';getDodecatemoria(longitude): DodecatemoriaResult
Computes the 12th-part (dodecatemoria) for an ecliptic longitude. Each 2.5° segment of a sign maps to one of the 12 signs starting from the sign itself.
const result = getDodecatemoria(5.0); // 5° Aries// {// originalSign: "Aries",// originalDegree: 5,// dodecatemoriaSign: "Taurus",// dodecatemoriaIndex: 1,// }DodecatemoriaResult:
| Field | Type | Description |
|---|---|---|
originalSign | string | Sign of the input longitude. |
originalDegree | number | Degree within the original sign (0–30). |
dodecatemoriaSign | string | The 12th-part sign. |
dodecatemoriaIndex | number | 0–11 offset from the original sign. |
13. Utility functions
Pure math — no WASM dependency.
import { formatDegreeMinutes, getZodiacPosition, findHouseOf, normalizeAngle, getSect, SIGNS,} from 'kaabalah/astrology';getSect(sunHouse): Sect
Deprecated. House-based approximation of sect: it is only right when the cusps follow the horizon (Placidus-like systems) and can be wrong by up to a sign in whole-sign or equal houses.
getBirthChartno longer uses it; it readschart.sectfrom the physical horizon (see Sect).
Determines chart sect from the Sun’s house position. Houses 7–12 place the Sun above the horizon → "diurnal"; otherwise "nocturnal".
import { getSect, type Sect } from 'kaabalah/astrology';
getSect(10); // "diurnal"getSect(3); // "nocturnal"
// Not guaranteed to equal chart.sect: prefer chart.sect or computeSect().Other helpers
| Function | Signature | Description |
|---|---|---|
formatDegreeMinutes | (decimalDegrees) → string | Formats a decimal degree as "9°48'". |
getZodiacPosition | (longitude, houseCusps) → ZodiacPosition | Converts a 0–360 longitude to a full ZodiacPosition including house. |
findHouseOf | (longitude, housePositions) → number | Returns the house number (1–12) for a longitude given cusp array. |
normalizeAngle | (angle) → number | Wraps any angle to 0–360. |
SIGNS | readonly string[] | ["Aries", ..., "Pisces"] — 12 sign names in order. |
Planetary hours
Requires the Swiss Ephemeris (
await getSwissEph(...)); the call itself is synchronous.
getPlanetaryHours({ date, latitude, longitude, timeZoneSettings? }) returns the planetary day that contains the instant date at a place: sunrise (at or before date), sunset, nextSunrise, the weekday of the sunrise (0 = Sunday), its dayRuler, the 24 hours and current, the hour containing date. Daylight is cut into 12 equal hours and the night into 12 equal hours (dayHourMinutes, nightHourMinutes), each with index (0-23 from sunrise), number (1-12 within day or night), isDay, ruler, start (inclusive) and end (exclusive). Rulers follow the Chaldean order (CHALDEAN_ORDER: Saturn, Jupiter, Mars, Sun, Venus, Mercury, Moon) from the ruler of the weekday (WEEKDAY_RULERS). The planetary day starts at sunrise, so an instant before sunrise still belongs to the previous weekday.
import { getPlanetaryHours } from 'kaabalah/astrology';
const r = getPlanetaryHours({ date: new Date('2024-03-20T12:00:00Z'), latitude: 51.4779, longitude: -0.0015, timeZoneSettings: { timeZone: 'Europe/London' },});if (r.available) { r.sunrise.toISOString(); // "2024-03-20T06:01:30.630Z" r.sunset.toISOString(); // "2024-03-20T18:14:07.554Z" r.dayRuler; // "Mercury" (Wednesday) r.current.ruler; // "Sun" (6th day hour) r.method.weekdayBasis; // "time-zone"}- Sunrise and sunset are the Swiss Ephemeris rise and set of the Sun’s upper limb with standard refraction at sea level, the convention of published almanac times.
- Weekday: read at the sunrise instant in
timeZoneSettings.utcOffsetMinutes, else intimeZoneSettings.timeZone(IANA), else in the local mean time of the longitude (4 minutes per degree).method.weekdayBasissays which ("utc-offset","time-zone","local-mean-time"). Local mean time gives the civil weekday almost everywhere; pass the zone where civil time sits far from mean time (Kiritimati, UTC+14 at 157 degrees west, is a calendar day ahead). The lat/lon zone lookup of the chart functions is asynchronous and is not used here. - Polar day and night: when the Sun does not rise or set around
datethe result is{ available: false, reason: "polar-day" | "polar-night", message, sunApparentAltitude }; nothing is thrown and no hours are invented. Invalid input throwsTimelineError(INVALID_INPUT).
14. Extended essential dignities
Pure math — no WASM dependency.
getEssentialDignities(planet, longitude, sect?) extends the sign-level getEssentialDignity with the degree- and sect-aware dignities. It does not replace it: the legacy function’s peregrine ignores triplicity, bounds and faces.
import { getEssentialDignities } from 'kaabalah/astrology';
const d = getEssentialDignities('Venus', 342.5, 'diurnal'); // 12°30' Pisces, day chartd.positiveDignities; // ["exaltation", "triplicity"]d.rulers.bound; // "Jupiter" (Egyptian bound 12-16 degrees of Pisces)d.rulers.face; // "Jupiter"d.rulers.triplicity; // { element: "water", day: "Venus", night: "Mars", participating: "Moon", sectRuler: "Venus" }d.peregrine; // falseTraditions and conventions (also in d.tradition and DIGNITY_TRADITION):
- Rulership, exaltation, detriment, fall: the traditional Ptolemaic tables already used by this module.
- Triplicity: Dorothean day, night and participating rulers per element (
DOROTHEAN_TRIPLICITY_RULERS; fire Sun/Jupiter/Saturn, earth Venus/Moon/Mars, air Saturn/Mercury/Jupiter, water Venus/Mars/Moon).triplicityis true when the planet is the ruler matching the suppliedsect;participatingTriplicitymarks the third ruler;triplicityRolereports which of the three it is, if any. Without asectthe day/night match isfalse. - Bounds: Egyptian bounds (
EGYPTIAN_BOUNDS,getEgyptianBound). Face: Chaldean decans (getFaceRuler). - Interval endpoints: every degree interval is half-open
[start, end); 12.0 degrees of Pisces belongs to the bound that starts at 12, not to the one that ends there. - Peregrine is true only when none of domicile, exaltation, any of the three triplicity roles (so it does not depend on sect knowledge), bound or face applies. Detriment and fall do not make a planet non-peregrine and are not substitutes for the positive dignities.
The Egyptian-bound and Dorothean tables have not been independently validated against an external reference. Cross-check them against your chosen tradition before relying on them.
15. Exact events and returns
Exact transit events versus closest approaches
Exact events are found by signed-angle root bracketing, never by minimising an orb. An event reported as exact is an instant at which longitude(t) - target crosses zero, verified against an angular tolerance (default 1e-6 degrees). Three quantities are kept separate:
- the display orb of an aspect spec (a presentation setting, never used by the solver);
- the root residual: the angular difference at the emitted instant (
exactOrb/residualDegrees, about1e-10); - the time tolerance: the final bracket width in seconds (default
0.001; the real bracket is also returned).
Every crossing of every aspect angle is reported (a retrograde double or triple pass yields several events), exactDate is a true UTC instant, and velocity-zero stations inside a scan step are inserted into the search so that close double passes and tangent touches are recovered. A near miss is not exact. It is reported separately, and only when you ask:
import { getTransitRange } from 'kaabalah/astrology';
const natal = { date: new Date(Date.UTC(2000, 3, 5)), latitude: 20, longitude: 0, timeZoneSettings: { treatAsUTC: true } };
const near = await getTransitRange({ natal, from: new Date(Date.UTC(2026, 6, 20)), to: new Date(Date.UTC(2026, 7, 2)), stepDays: 1, transitPlanets: ['saturn'], natalPlanets: ['sun'], aspectSpecs: [{ name: 'conjunction', angle: 0, orb: 1 }], includeClosestApproaches: true,});
near.perfections; // [] (Saturn never reaches the natal Sun in this window)near.closestApproaches[0].kind; // "closest-approach"near.closestApproaches[0].date.toISOString(); // "2026-07-26T19:56:31.000Z" (Saturn's station)near.closestApproaches[0].separationDegrees; // 0.7617678482379233Real output. Before this change the same call reported an exactDate near 2026-07-27 with a 0.76 degree residual as if it were exact.
An exact event with its solver metadata (Jupiter conjunct the natal Saturn of the same chart):
const range = await getTransitRange({ natal, from: new Date(Date.UTC(2024, 0, 1)), to: new Date(Date.UTC(2024, 11, 31)), stepDays: 1, transitPlanets: ['jupiter'], natalPlanets: ['sun', 'saturn'], aspectFilter: ['conjunction', 'opposition', 'square', 'trine'],});const e = range.perfections[0];e.aspect; // "conjunction"e.exactDate.toISOString(); // "2024-03-25T09:49:25.941Z"e.exactOrb; // 4.39e-10 (residual in degrees)e.solver.bracketWidthSeconds; // 0.00064e.solver.scanStepDays; // 1e.solver.coverage.scope; // "finite-grid"getTransitRange options timeToleranceSeconds, residualToleranceDegrees and includeClosestApproaches control the solver; maxOrb filters on the residual and is therefore not useful for exact events.
Coverage qualification. The search is a finite-grid, station-aware numerical search: stations are located from speed sign changes on the scan grid. A pair of velocity-zero crossings hidden inside a single grid step is not formally excluded, so this is not a symbolic proof that all passes were found; the wording is returned in every solver.coverage.note. Use a smaller stepDays for very slow, near-stationary configurations.
Returns and other crossings
All of these share one root-search primitive (findAngularRoots), so a solar return, a Jupiter return, a Uranus opposition and a transit aspect use the same bracketing, residual check and metadata:
import { findSaturnReturns, findJupiterReturns, findNodalReturns, findUranusOppositions, findLunarReturns, findPlanetaryReturns, findBodyLongitudeCrossings } from 'kaabalah/astrology';
const saturn = findSaturnReturns({ natalChart: chart, from: new Date(Date.UTC(2027, 0, 1)), to: new Date(Date.UTC(2031, 0, 1)) });const c = saturn.crossings[0];c.instant.toISOString(); // "2029-05-16T01:15:44.087Z"c.passIndex + '/' + c.passCount; // "1/1"c.direction; // "direct"c.residualDegrees; // ~1e-10Jupiter and Saturn returns return all passes (up to three, because of retrograde motion); nodal returns take node: "mean" | "true"; findLunarReturns scans in half-day steps; findPlanetaryReturns({ body, natalLongitude | natalChart, offsetDegrees }) covers any body and offset. The scan step is at most 2 days for every body (MAX_BODY_SCAN_STEP_DAYS).
The solar return solves the Sun’s crossing to a 0.001 second bracket by default (it used to stop at a coarse 60-second bracket); returnPrecisionSeconds makes the precision explicit:
const sr = await getSolarReturnChart({ natal, year: 2025 });sr.exactReturnDate.toISOString(); // "2025-04-05T01:16:39.533Z"sr.solver.bracketWidthSeconds; // 0.00064const coarse = await getSolarReturnChart({ natal, year: 2025, returnPrecisionSeconds: 1 });coarse.exactReturnDate.toISOString(); // "2025-04-05T01:16:39.591Z"coarse.solver.bracketWidthSeconds; // 0.33Return-pass timelines
getReturnPassTimeline({ natalChart, from, to, kinds }) merges the passes of several kinds (saturn-return, jupiter-return, uranus-opposition, mean-nodal-return, true-nodal-return, solar-return) into one chronologically sorted list, each entry with its pass index, direction, residual and solver metadata. The window is capped (MAX_RETURN_TIMELINE_YEARS = 150, MAX_RETURN_TIMELINE_PASSES = 2000; violations throw a typed TimelineError). The trivial zero-offset pass at the natal instant is dropped and counted in excludedNatalInstantPasses.
const tl = getReturnPassTimeline({ natalChart: chart, from: new Date(Date.UTC(2000, 3, 6)), to: new Date(Date.UTC(2032, 0, 1)), kinds: ['saturn-return', 'jupiter-return'] });tl.entries.map((e) => `${e.kind} ${e.passIndex}/${e.passCount} ${e.instant.toISOString().slice(0, 10)}`);// jupiter-return 1/6 2011-08-17, ..., jupiter-return 6/6 2024-02-22, saturn-return 1/1 2029-05-16Stations and retrograde periods
findStations({ body, start, end }) returns every instant at which a body’s geocentric longitude speed changes sign inside the window: kind is "retrograde" when the body turns retrograde and "direct" when it turns direct, with the UTC instant, longitude, sign and signDegree. findRetrogradePeriods({ body | bodies, start, end }) pairs them into the retrograde periods that overlap the window, for one body or several (Mercury through Pluto when none is given).
import { findStations, findRetrogradePeriods, Planet } from 'kaabalah/astrology';
const year = { start: new Date(Date.UTC(2025, 0, 1)), end: new Date(Date.UTC(2026, 0, 1)) };findStations({ body: Planet.MERCURY, ...year }).stations.map((s) => `${s.kind} ${s.instant.toISOString().slice(0, 10)} ${s.sign}`);// retrograde 2025-03-15 Aries, direct 2025-04-07 Pisces, retrograde 2025-07-18 Leo,// direct 2025-08-11 Leo, retrograde 2025-11-09 Sagittarius, direct 2025-11-29 Scorpio
const all = findRetrogradePeriods(year);const mars = all.periods.find((p) => p.body === Planet.MARS);mars.startsBeforeWindow; // truemars.stationRetrograde.instant.toISOString(); // "2024-12-06T23:33:11.272Z" (inWindow: false)mars.stationDirect.instant.toISOString(); // "2025-02-24T01:59:48.025Z"A period already under way at start, or still open at end, keeps its true opening or closing station: it is searched outside the window within outsideSearchDays (default 200, at most MAX_STATION_OUTSIDE_SEARCH_DAYS = 400). A station not found there is null and named in notices. To ask whether a planet is retrograde on a day, pass that day as the window: a period comes back if and only if the planet is retrograde in it.
Supported bodies are Mercury through Pluto (STATION_BODIES). The Sun and Moon never station and give an empty result with a never-stations notice. The lunar nodes are left out (the mean node is always retrograde; the true node’s brief direct episodes are not retrograde periods), and they, like any other body, throw a typed TimelineError, as do windows over MAX_STATION_WINDOW_YEARS (150). Stations are refined to one second by default (timeToleranceSeconds) on a scan grid of at most 2 days; the same finite-grid coverage note applies.
Declination. Two sibling searches work on geocentric declination and never use the words retrograde or direct. findDeclinationStations({ body, start, end }) returns the turning points of declination, where its speed changes sign: kind is "turns-south" at a local maximum (extremum: "maximum") and "turns-north" at a local minimum, with the declination, the ecliptic longitude and sign at that instant, the true obliquity of date and outOfBounds (absolute declination greater than that obliquity). findEquatorCrossings({ body, start, end }) returns the instants declination crosses 0, with direction "northward" or "southward".
import { findDeclinationStations, findEquatorCrossings, Planet } from 'kaabalah/astrology';
findDeclinationStations({ body: Planet.MERCURY, ...year }).stations .map((s) => `${s.kind} ${s.instant.toISOString().slice(0, 10)} ${s.declination.toFixed(2)}${s.outOfBounds ? ' out of bounds' : ''}`);// turns-north 2025-01-15 -23.78 out of bounds, turns-south 2025-03-16 6.84, turns-north 2025-04-12 -1.91,// turns-south 2025-06-10 25.31 out of bounds, turns-north 2025-07-24 12.36, turns-south 2025-08-19 17.40,// turns-north 2025-11-06 -24.01 out of bounds, turns-south 2025-11-30 -15.45
findEquatorCrossings({ body: Planet.SUN, ...year }).crossings.map((c) => `${c.direction} ${c.instant.toISOString()}`);// northward 2025-03-20T09:02:10.847Z, southward 2025-09-22T18:19:09.939ZThese accept the Sun and Moon as well (DECLINATION_BODIES, the Sun through Pluto); the Moon is scanned every 0.25 day by default. The Sun’s declination stations are the solstices and its equator crossings the equinoxes, but as extrema and zeros of declination, not as longitude crossings: because of the Sun’s small ecliptic latitude and the nutation in obliquity they fall within about a minute (equinoxes) and two to three minutes (solstices) of the instants the Sun’s longitude reaches 0, 90, 180 and 270 degrees, so the sign at a solstice station can read 29.99 degrees of the sign before. The Sun defines the bound, so its outOfBounds is always false. Declination and its speed come from the ephemeris with the equatorial and speed flags (true equator of date), not from a finite difference.
The eight points of the year
findSeasonalPoints({ start, end, hemisphere? }) returns the instants at which the Sun’s tropical longitude crosses 0, 45, 90, 135, 180, 225, 270 and 315 degrees: the two equinoxes, the two solstices and the four cross-quarter points at 15 degrees of the fixed signs. Each point has a stable id, a kind ("equinox", "solstice", "cross-quarter"), the UTC instant, the longitude, the sign and the signDegree (0 or 15). getSeasonalPosition({ date, hemisphere? }) returns the previous and next point around an instant and the fraction of the time between them that has elapsed.
import { findSeasonalPoints, getSeasonalPosition } from 'kaabalah/astrology';
const year = { start: new Date(Date.UTC(2025, 0, 1)), end: new Date(Date.UTC(2026, 0, 1)) };findSeasonalPoints(year).points.map((p) => `${p.id} ${p.instant.toISOString()}`);// aquarius-midpoint 2025-02-03T14:10:28.278Z, march-equinox 2025-03-20T09:01:29.128Z,// taurus-midpoint 2025-05-05T05:57:11.613Z, june-solstice 2025-06-21T02:42:15.893Z,// leo-midpoint 2025-08-07T05:51:34.944Z, september-equinox 2025-09-22T18:19:20.740Z,// scorpio-midpoint 2025-11-07T04:04:03.058Z, december-solstice 2025-12-21T15:03:05.414Z
const now = getSeasonalPosition({ date: new Date('2026-11-20T12:00:00Z'), hemisphere: 'south' });now.previous.id; // "scorpio-midpoint"now.next.id; // "december-solstice"now.next.season; // { hemisphere: "south", name: "summer", phase: "start" }now.fraction; // between 0 and 1- Ids are hemisphere neutral:
march-equinox,june-solstice,september-equinox,december-solstice, andtaurus-midpoint,leo-midpoint,scorpio-midpoint,aquarius-midpoint. No id names a season or a festival, because the same instant opens spring in one hemisphere and autumn in the other.SEASONAL_POINTSlists the eight definitions in zodiacal order. - Season label: only with
hemisphere: "north" | "south". Each point then carriesseason: { hemisphere, name, phase }, where an equinox or solstice is the"start"of an astronomical season and a cross-quarter point its"midpoint". The March equinox starts spring in the north and autumn in the south. - Cross-quarter points are defined by solar longitude (15 degrees of Taurus, Leo, Scorpio, Aquarius), not as the midpoint in time between an equinox and a solstice; the two differ by a day or two.
fractionis elapsed time over the time between the two points, in[0, 1); an instant exactly at a point has that point aspreviousand a fraction of 0.
The instants are crossings of the Sun’s geocentric apparent longitude, the definition behind published equinox and solstice times, solved with the same crossing solver as the returns. Windows over MAX_SEASONAL_WINDOW_YEARS (150) and invalid dates throw a typed TimelineError.
Lunations
findLunations({ start, end, phases? }) returns the exact instants of the Moon’s four principal phases inside the window: the Moon’s longitude minus the Sun’s equal to 0 ("new"), 90 ("first_quarter"), 180 ("full") and 270 degrees ("last_quarter"), the same spelling as MoonPhaseName. Each lunation has the phase, the UTC instant, the jd, the sunLongitude and moonLongitude, and the Moon’s sign and signDegree at that instant.
import { findLunations } from 'kaabalah/astrology';
const window = { start: new Date(Date.UTC(2024, 2, 20)), end: new Date(Date.UTC(2024, 3, 30)) };findLunations(window).lunations.map((l) => `${l.phase} ${l.instant.toISOString()} ${l.sign}`);// full 2024-03-25T07:00:19.747Z Libra, last_quarter 2024-04-02T03:14:43.924Z Capricorn,// new 2024-04-08T18:20:51.660Z Aries, first_quarter 2024-04-15T19:13:07.173Z Cancer,// full 2024-04-23T23:48:58.898Z Scorpio
findLunations({ ...window, phases: ['new', 'full'] }).lunations.length; // 3- Window:
startandendare absolute UTC instants, both inclusive. Results are in time order, so the phases alternate new, first quarter, full, last quarter. phaseslimits the search (default: all four).LUNATION_PHASESlists the four definitions with their elongation.signis the Moon’s tropical sign. At a new moon the Sun is in the same degree; at a full moon it is in the opposite sign.- Use
findEclipsesfor eclipse dates and classifications.
The instants are roots of the geocentric apparent elongation, solved with the same solver as the returns on a half day grid (LUNATION_SCAN_STEP_DAYS). Windows over MAX_LUNATION_WINDOW_YEARS (150), unknown phases and invalid dates throw a typed TimelineError.
Eclipses
findEclipses({ start, end }) searches for worldwide solar and lunar eclipses using Swiss Ephemeris. It requires an initialized ephemeris and a WASM build with eclipse support. The search uses the instant of global maximum and returns events in chronological order. The window includes start and excludes end, with a maximum span of 150 years.
import { findEclipses } from 'kaabalah/astrology';
const { eclipses } = findEclipses({ start: new Date('2026-01-01T00:00:00Z'), end: new Date('2027-01-01T00:00:00Z'),});Each event gives its kind, type, UT Julian day, JavaScript date, and apparent tropical longitudes of the Sun and Moon at maximum. longitude, sign, and signDegree refer to the eclipsed body, which is the Sun for a solar eclipse and the Moon for a lunar eclipse. To project eclipses into a solar-return chart, search between two successive exact returns and use each event’s longitude with the first return’s house cusps.
Sign ingress windows
A classical Jyotish rule (Muhurta Chintamani, on the planets’ change of signs) says a planet starts giving the effect of the next sign before it enters it. INGRESS_LEAD_TIMES holds the figures and findIngressWindows({ bodies?, start, end }) returns every sign ingress whose lead window overlaps the range, with the instant the window begins.
| Body | Lead time | In days |
|---|---|---|
| Sun | 5 days | 5 |
| Moon | 3 ghatis (72 minutes) | 0.05 |
| Mars | 8 days | 8 |
| Mercury | 7 days | 7 |
| Venus | 7 days | 7 |
| Jupiter | 2 months | 60 |
| Saturn | 6 months | 180 |
| Rahu (and Ketu) | 3 months | 90 |
import { findIngressWindows, Planet } from 'kaabalah/astrology';
const r = findIngressWindows({ bodies: [Planet.SATURN], start: new Date(Date.UTC(2027, 10, 1)), end: new Date(Date.UTC(2027, 11, 1)),});const w = r.windows[0];`${w.id} ${w.fromSign} to ${w.toSign}`; // "saturn Aries to Taurus"w.instant.toISOString(); // "2028-04-13T03:39:44.985Z" (after `end`)w.windowStart.toISOString(); // "2027-10-16T03:39:44.985Z"w.windowOpenAtStart; // truew.ingressInRange; // falseEach entry has the point id (sun … pluto, mean-node, south-node-mean, …), the ephemeris body and bodyName, fromSign, toSign, direction, the exact ingress (instant, jd), the boundaryLongitude, the leadTime and the windowStart (windowStartJd), plus windowOpenAtStart and ingressInRange. Entries are ordered by exact ingress instant.
- Which ingresses: an ingress is returned when it is at or after
startand its window begins at or beforeend. Each body is searched up toendplus its own lead time, so a Saturn ingress up to 180 days afterendis found when its window is already open in the range. An ingress beforestartis not returned. - Signs are tropical, as in the rest of the library’s sign-change code; there is no zodiac option.
- Months and ghatis: a month counts as 30 days (
INGRESS_MONTH_DAYS) and a ghati as 24 minutes (GHATI_MINUTES). The convention is echoed inmethod. - Rahu and Ketu: Rahu is the lunar north node. The default body list (
DEFAULT_INGRESS_BODIES, the Sun through Pluto and the mean node) uses the mean node, the library’s default node; passPlanet.TRUE_NODEfor the true node. Ketu is emitted as the opposite point (south-node-meanorsouth-node-true) with the same instant and lead time and the opposite signs;southNode: falseleaves it out. The nodes move backwards, so theirdirectionis"retrograde"and they enter the previous sign. - Retrograde re-entries: every crossing of a sign boundary is returned with its
direction. A planet that enters a sign, falls back and enters again gives three entries ("direct","retrograde","direct"). The lead time is subtracted from a retrograde crossing in the same way as from a direct one; filter ondirectionif you only want forward entries. - Bodies without a configured lead time (Uranus, Neptune, Pluto, Chiron, Lilith) are returned with the exact ingress,
leadTime: nullandwindowStart: null.getIngressLeadTime(body)gives the lead time of one body.
Ranges over MAX_INGRESS_WINDOW_YEARS (150), an empty or unsupported body list and invalid dates throw a typed TimelineError. The Moon is scanned every half day and the other bodies every day; the same finite-grid coverage note applies.
16. Points, IDs and legacy dictionaries
getChartPoints(chart) maps a BirthChart to typed points with stable, language-independent IDs (PointId): sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto, mean-node, true-node, south-node-mean, south-node-true, mean-lilith, true-lilith, chiron, asc, mc, dsc, ic, vertex, lot-fortune, lot-spirit. Each ChartPoint carries kind (luminary, planet, node, angle, lot, point), longitude, speed (null means explicitly unavailable: angles, lots), the legacyKey and flags (derived, timeDependent, placeholder, rectified).
The legacy spaced-key dictionaries (chart.planets["mean node"], …) are unchanged and only read. pointIdFromLegacyKey, legacyKeyFromPointId and toLegacyPointRecord convert in both directions, so typed points can still be fed to computeAspects.
17. Orb policies
The legacy computeAspects uses one orb per aspect, and a CLI or option maxOrb is a post-filter: it can only narrow edges that were already generated, so it cannot recover a contact the generation orb left out (for example a 5.5 degree sextile with the default 5 degree sextile orb). An OrbPolicy is consulted for every pair before an edge exists:
import { computeAspectsWithPolicy, getChartPoints, PTOLEMAIC_PLUS_QUINCUNX, sortTightContacts } from 'kaabalah/astrology';
const result = computeAspectsWithPolicy(getChartPoints(chart), PTOLEMAIC_PLUS_QUINCUNX);result.counts; // { raw, grouped, byAspect }result.edges[0]; // { a, b, aspect, orb, orbLimit, orbRule, motion, orbRate, axisKey, ... }result.policy; // describeOrbPolicy(): the full rule set that produced the edgessortTightContacts(result.edges, { maxOrb: 1, limit: 10 });PTOLEMAIC_PLUS_QUINCUNX (id ptolemaic-plus-quincunx) has conjunction, sextile, square, trine, quincunx and opposition with per-class orbs: luminaries 8, planets 6, and 3 for any angle, node, point or lot. A pair resolves to the first applicable rule: a pointPairOrbs entry, a classPairOrbs entry, the classOrbs of the first class in classPrecedence held by either point (so a luminary paired with an angle gets 3, not 8), then the aspect’s base orb (combine: "min" additionally caps by the base orb). It is a profile you opt in to, not a replacement for the default aspects. Define your own with defineOrbPolicy; invalid specs throw AspectConfigError with a stable code.
- Motion:
motionis"applying","separating","exact"ornull, from the instantaneous derivative of the orb (orbRate, degrees per day). It isnullwith amotionUnavailableReasonwhen a speed is unknown (angles, lots) or the relative speed is zero. - Transit targets stay fixed:
computeTransitAspectsWithPolicy(orfixedTargets: trueon the two-set variant) treats the natal set as stationary. - Raw counts versus axis groups: opposite ends of one axis (ASC/DSC, MC/IC, node/south node) are the same observation.
counts.rawcounts every edge andcounts.groupedone per axis-equivalence group (groupAspectsByAxis), so opposite angles do not masquerade as independent observations. Same-set pairs on one axis are skipped unlessincludeSameAxisPairs.
18. Input quality and untimed charts
getQualifiedChart({ quality, date, latitude, longitude, ... }) is the opt-in, quality-aware entry point (getBirthChart is unchanged). quality is one of:
| Quality | Behaviour |
|---|---|
recorded | Full chart from a documented birth time. |
rectified | Full chart; every time-dependent point (Moon degree, angles, vertex, lots) is flagged rectified: true, and selectAnalysisPoints(points, { excludeRectifiedAngles: true }) can drop the angles. |
untimed | No chart. Positions are computed at local noon and every point is flagged placeholder: true. The Moon degree, angles, houses, lots, sect and time-dependent techniques are omitted from analysisPoints with a structured reason in unavailable. The whole-day Moon sign range is reported instead. |
partial | No full date: no chart is invented, only structured unavailability. |
import { getQualifiedChart } from 'kaabalah/astrology';
const untimed = await getQualifiedChart({ quality: 'untimed', date: { year: 1990, month: 6, day: 15 }, latitude: 51.5, longitude: -0.12, timeZoneSettings: { timeZone: 'Europe/London' },});
untimed.status; // "limited"untimed.chart; // nulluntimed.unavailable.map((u) => u.item);// ["moon-degree", "angles", "houses", "lots", "sect", "time-dependent-techniques"]untimed.moonDayRange.signs; // ["pisces"] (local 00:00 to the next local 00:00)untimed.moonDayRange.changesSign; // falseuntimed.analysisPoints.some((p) => p.id === 'moon' || p.id === 'asc'); // falseuntimed.points.find((p) => p.id === 'sun').flags.placeholder; // trueReal output. untimed.signChanges lists other bodies that change sign during that local day, so a sign is never asserted when it is not constant.
result.provenance (TimeProvenance) makes the time and place assumptions explicit: basis (iana-zone, utc-offset, auto-from-coordinates, utc-instant, local-mean-time, unknown-place), the zone, the resolved offset and DST flag, alreadyUtc, localMeanTime, the reference instant, placeRole (birthplace, residence, event, unknown) and notes. localMeanTime: true reads the wall-clock time as local mean time of the longitude (4 minutes per degree) for pre-standard-time records. Wall-clock input reuses LocalDateTimeParts / TimeZoneOptions; there is no second representation. Errors are InputQualityError with a code.
19. Several house systems from one calculation
import { getHousesForSystems, HouseSystem } from 'kaabalah/astrology';
const r = await getHousesForSystems( { date: { year: 1985, month: 3, day: 14, hour: 9, minute: 30 }, latitude: 40, longitude: -3, timeZoneSettings: { treatAsUTC: true } }, [HouseSystem.PLACIDUS, HouseSystem.WHOLE_SIGN, HouseSystem.KOCH]);
Object.keys(r.systems); // ["P", "W", "K"]r.sect.sect; // "diurnal" (the same for every system)r.systems.P.placements.sun; // 11r.systems.W.placements.sun; // 10r.points; // ChartPoint[] computed oncePlanets, sect and the lots are computed once; only the cusps, the descendant/IC and each point’s house placement are produced per system. A system Swiss cannot compute is listed in r.failures instead of aborting the others. (The numbers above are from a synthetic input and a real run.)
20. House overlays, Davison charts and derived charts
House overlays
import { getHouseOverlays } from 'kaabalah/astrology';
const ov = getHouseOverlays(chartA, chartB);ov.aInB.placements; // [{ point: "sun", longitude, house: 9 }, ...] A's points in B's housesov.bInA.available; // true; false with a reason when the receiving chart has no full 12 cusps (untimed)A point on a cusp belongs to the house that starts there. The house system of each receiving chart is reported (BirthChart.houseSystem, else the option, else null). derivedChartAspectPoints(chart) converts a natal, Davison, progressed, solar-return or composite chart to the point record accepted by computeAspects, computeSynastryAspects and computeTransitAspects.
Davison charts
A Davison chart is a real chart cast for the midpoint in time and place of two births. The midpoint composite instead averages two charts’ longitudes point by point and has no time or place of its own; the two methods differ, sometimes by many degrees (for the synthetic pair below the midpoint composite Sun is at 287.247 degrees and the Davison Sun at 287.338).
import { getDavisonChart } from 'kaabalah/astrology';
const dv = getDavisonChart({ a: { dateUtc: new Date(Date.UTC(1985, 2, 14, 9, 30)), latitude: 40, longitude: -3 }, b: { dateUtc: new Date(Date.UTC(1992, 10, 2, 22, 5)), latitude: 48, longitude: 2 },});
dv.midpointDateUtc.toISOString(); // "1989-01-07T15:47:30.000Z"dv.location; // { latitude: 44, longitude: -0.5 }dv.chart; // full BirthChart at the midpointdv.method; // conventionsConventions (in dv.method): time is the arithmetic mean of the two UTC Julian Days (the exact instant midpoint); the default place is "arithmetic-shorter-arc" (mean latitude, longitude midpoint along the shorter arc, normalised to (-180, 180], so 179 E and 179 W give 180); geographicMidpoint: "great-circle" uses the surface midpoint instead. Antipodal longitudes or places have no unique midpoint and add a notices entry. getDavisonChartFromOptions(a, b) accepts getBirthChart options. Errors are DerivedChartError with a code.
21. Secondary progressions and solar arcs
Both are synchronous (initialised Swiss Ephemeris required), take an explicit natal chart, place and UTC target, and declare their conventions in method.
import { getSecondaryProgressions, getSolarArcDirections } from 'kaabalah/astrology';
const target = new Date(Date.UTC(2020, 2, 14));const sp = getSecondaryProgressions({ natalChart: chart, natalLatitude: 40, natalLongitude: -3, target });sp.ageYears; // 34.9996sp.method.timeKey.yearLength.spec; // "julian (365.25 days)"Object.keys(sp.angles); // ["quotidian", "solar-arc", "naibod"]
const sa = getSolarArcDirections({ natalChart: chart, natalLatitude: 40, natalLongitude: -3, target, targets: ['sun', 'moon', 'ascendant', 'mc'] });sa.arcDegrees; // 34.5433sa.method.targetSet; // ["sun", "moon", "ascendant", "mc"]- Time key: progressed Julian Day = natal JD + age in years (“a day for a year”). The year length is explicit:
"julian"365.25 (default),"tropical"365.2422, a number of days, or"solar-return"(real years: completed solar returns plus the fraction of the current interval). The age is capped at 200 years; a target before birth throwsDerivedChartError(TARGET_BEFORE_BIRTH). - Progressed angles are not a single convention; all are returned:
quotidian(houses and angles computed at the progressed JD for the natal place; the reference convention and the one behindchart.houses),solar-arc(natal angles plus the true solar arc) andnaibod(natal ARMC plus 0.985647 degrees per year of age; angles only). - Solar arc: the true arc is progressed Sun minus natal Sun, added uniformly to an explicit target set (
targets, default every body plus the four angles);arcKind: "naibod"uses the mean arc instead. Directed points have no speed.
The progressed and directed points are accepted directly by the aspect functions (sp.points, sa.points).
Progressed perfections
findProgressedPerfections({ natalChart, from, to }) returns the real-life instants at which a secondary-progressed body is exactly in aspect to a natal point, inside a window of real dates.
import { findProgressedPerfections } from 'kaabalah/astrology';
const r = findProgressedPerfections({ natalChart: chart, from: new Date(Date.UTC(2026, 0, 1)), to: new Date(Date.UTC(2028, 0, 1)),});r.perfections[0];// { progressedBody: "moon", natalPoint: "pluto", aspect: "trine",// exactDate: Date (real-life instant, UTC), progressedJd: 2448093.67, retrograde: false }r.method.timeKey.yearLength.spec; // "julian (365.25 days)"- Time key: the same as
getSecondaryProgressions, with the sameyearLengthoption and default. The window is mapped to progressed Julian Days, the aspects are solved there, and each exact progressed Julian Day (progressedJd) is mapped back to the real instantexactDate. PassingexactDateastargettogetSecondaryProgressionsgives the body at the exact aspect. progressedBodies: lowercase keys as inchart.planets; defaultsun,moon,mercury,venus,mars. Bodies only: the progressed angles are not searched.natalPoints: keys ofchart.planetsplusascendantandmc; default the ten planets,mean node,chiron,ascendantandmc. They are fixed targets.aspects: default the five major ones (conjunction, sextile, square, trine, opposition).retrogradeis true when the progressed body is moving backwards at that instant.- Precision: a day of ephemeris time is a year of life, so the solver’s 0.001 second tolerance is under half a second of
exactDate, and the scan step is scaled to the window (at mostMAX_PROGRESSED_SCAN_STEP_DAYS, a quarter of an ephemeris day). Compare two runs of the same event to the second, not to the millisecond.
The progressed Moon gives about four of these a year over the default natal points; the other bodies a few per decade. Errors are DerivedChartError with a code (INVALID_INPUT, TARGET_BEFORE_BIRTH, AGE_LIMIT_EXCEEDED).
22. Profection, firdaria and return timelines
Bounded timelines reuse the existing modules; unbounded requests are refused with a typed TimelineError (INVALID_RANGE, RANGE_TOO_LARGE, UNBOUNDED_INPUT, INVALID_INPUT, UNAVAILABLE_INPUT).
import { getAnnualProfectionTimeline, getProfectionForAge, getFirdariaTimeline } from 'kaabalah/astrology';
const profections = getAnnualProfectionTimeline(chart, { year: 2000, month: 4, day: 5 }, { fromAge: 24, toAge: 26 });profections.entries.map((e) => [e.age, e.house, e.sign, e.ruler, e.start, e.endExclusive]);// age 24: house 1 Capricorn (Saturn) 2024-04-05..2025-04-05; age 25: Aquarius (Saturn); age 26: Pisces (Jupiter)
const firdaria = getFirdariaTimeline(birthDate, chart.sect === 'diurnal', { from: new Date(Date.UTC(2020, 0, 1)), to: new Date(Date.UTC(2030, 0, 1)), includeSubPeriods: false });firdaria.entries.map((e) => [e.planet, e.clippedStart, e.clippedEnd]);- Profections count whole signs from the natal ascendant sign (
getProfectionForAge), so the timeline is correct for any recorded house system. A range is given as ages or as civil-date bounds; a year is[birthday, next birthday)and a 29 February birthday falls on 1 March in common years (capMAX_PROFECTION_TIMELINE_YEARS= 150). The legacygetAnnualProfectionreads the sign on the house cusp and is only right for whole-sign charts. - Firdaria (
getFirdariaTimeline,getFirdariaPeriods) return major and sub-periods intersecting a window, clipped to it, with the nominal bounds,clippedStartandclippedEndkept. Year length is 365.25 days; intervals are half-open. At most 3 cycles of the 75-year sequence and a 225-year window are allowed. - Returns: see Return-pass timelines.
23. Collections and bulk workflows
computeCollection(manifest, options) computes people, events and pairs from one manifest. Each person’s natal chart is computed once however many pairs they appear in, user IDs are kept verbatim, and the output order is deterministic (people and events in manifest order, pairs by manifest index with i < j).
import { computeCollection } from 'kaabalah/astrology';import { toMarkdownTable, toTable } from 'kaabalah';
const utc = { treatAsUTC: true };const result = await computeCollection({ people: [ { id: 'a', chart: { date: { year: 1985, month: 3, day: 14, hour: 9, minute: 30 }, latitude: 40, longitude: -3, timeZoneSettings: utc } }, { id: 'b', chart: { date: { year: 1992, month: 11, day: 2, hour: 22, minute: 5 }, latitude: 48, longitude: 2, timeZoneSettings: utc } }, { id: 'c', chart: { date: { year: 1978, month: 7, day: 30, hour: 4, minute: 45 }, latitude: -23, longitude: -46, timeZoneSettings: utc } }, { id: 'd', chart: { date: { year: 2001, month: 1, day: 20, hour: 12 }, latitude: 0, longitude: 0, timeZoneSettings: utc }, quality: 'untimed' }, ], pairs: { mode: 'all' }, // 4 people -> 6 pairs, 4 chart computations});
const rows = result.pairs.map((p) => ({ a: p.idA, b: p.idB, ok: p.ok, aspects: p.ok ? p.aspectCount : null, partial: p.ok ? p.partial : null }));console.log(toMarkdownTable(toTable(rows, [{ key: 'a' }, { key: 'b' }, { key: 'ok', type: 'boolean' }, { key: 'aspects', type: 'integer' }, { key: 'partial', type: 'boolean' }])));Real output:
| a | b | ok | aspects | partial || --- | --- | --- | ---: | --- || a | b | true | 125 | false || a | c | true | 117 | false || a | d | true | 89 | true || b | c | true | 122 | false || b | d | true | 109 | true || c | d | true | 107 | true |result.summary is { people: { total: 4, ok: 4, failed: 0 }, pairs: { total: 6, ok: 6, unavailable: 0, partial: 3, aspects: 669 }, ... }.
- Pair selection:
{ mode: "all" },{ mode: "pairs", pairs: [[idA, idB], ...] }or{ mode: "timed-only" }(all pairs among people whose quality isrecordedorrectified). Unknown IDs, self-pairs and duplicate IDs throwCollectionErrorbefore any chart is computed. - Quality: untimed and partial people lose the Moon and both angles in pair aspects; those pairs are flagged
partial: trueand listexcludedPoints. - Failures are data: one person’s failure becomes
{ ok: false, error }and every pair involving them is{ ok: false, error: { code: "PERSON_UNAVAILABLE" }, unavailablePeople }, never dropped silently. - Lightweight records: charts are not embedded unless
includeCharts: true. Already-computed charts go inprecomputed. - Concurrency, progress, cancellation:
concurrency(default 4, max 64) bounds the tasks in flight and the results running ahead of the consumer; Swiss Ephemeris itself runs as synchronous WebAssembly on the JS thread, so this does not make it parallel.onProgressand a standardAbortSignal(signal; cancellation throwsCollectionAbortError) are supported.iterateCollectionstreams records (people, events, pairs, then one summary), which suits NDJSON. - Limits: 500 people, 1,000 events, 125,000 pairs and 64 concurrent tasks at most (
COLLECTION_HARD_LIMITS;options.limitscan only lower them). - There are no person-by-event transit contacts yet: events are computed and listed, but only people pairs get aspects.
toTable, toMarkdownTable, aspectEdgesTable, chartPointsTable and numerologyIntervalsTable are dependency-free JSON/Markdown tabulation helpers exported from the package root kaabalah. Cells are numeric data only; unavailable values render as n/a.
24. Cache keys
buildChartCacheKey(components) builds a deterministic key from every input that can change a result: the normalised date, time semantics, timezone and the resolved offset actually applied, coordinates, input quality, house systems, point selection, orb policy, frame (tropical, lahiri, dhruva), node convention, year length, Dhruva GC constants, the ephemeris identity (ephemerisIdentityFromInfo(getSwissEphInfo())), the package version and any extra configuration. A person’s ID is not an accepted component. A required component that is undefined throws CacheKeyError (MISSING_COMPONENT); use null where a component does not apply. createBoundedMemo({ maxEntries }) is a small bounded LRU you can put in front of the calculation.
import { buildChartCacheKey, ephemerisIdentityFromInfo, getSwissEphInfo, normalizeUtcInstant } from 'kaabalah/astrology';
const key = buildChartCacheKey({ date: normalizeUtcInstant(new Date(Date.UTC(1985, 2, 14, 9, 30))), timeSemantics: 'utc-instant', timeZone: null, resolvedUtcOffsetMinutes: null, latitude: 40, longitude: -3, quality: 'recorded', houseSystems: ['P'], points: ['sun', 'moon'], orbPolicy: null, frame: 'tropical', nodeConvention: null, yearLengthDays: null, gcConstants: null, ephemeris: ephemerisIdentityFromInfo(getSwissEphInfo()),});// "kaabalah:chart:v1:{...canonical JSON...}"normalizeChartDate(date) reads a Date with local getters, the same convention getBirthChart uses for a local Date; use normalizeUtcInstant for a UTC instant. Do not mix them.
25. Capability discovery
getCapabilities() returns a versioned, JSON-serialisable description of what this build can compute and the limits it enforces (schema version, modules, house systems, points, aspects, zodiac/nakshatra frames, defaults, GC constants, input qualities, ephemeris coverage, numerology layers and policies, collection and numerology limits, error codes). It never throws and never initialises the engine; ephemeris coverage is coverageSource: "runtime" once initialised and "static" otherwise.
assertEphemerisReady({ year }) turns missing data into an actionable SwissEphError: SWISSEPH_NOT_INITIALIZED, SWISSEPH_EPHEMERIS_FILES_UNAVAILABLE or SWISSEPH_DATE_OUT_OF_RANGE (the shipped files cover 1800 to 2399).
26. Ephemeris provenance and strict mode
getSwissEphInfo() reports what the engine actually resolved: runtime (node/browser), the WASM and ephemeris paths and where each came from (explicit, env, candidate, bundled), how the files are mounted (nodefs-mount, host-path, memfs-copy, browser-memfs), which required .se1 files are visible, the shipped coverage, and an init-time probe (Sun at J2000 with Swiss files requested). swissEphemerisVersion is null: the shipped WASM build does not export swe_version.
import { calculatePlanetPositionDetailed, getSwissEph, Planet, SwissEphError } from 'kaabalah/astrology';
const d = calculatePlanetPositionDetailed(new Date(Date.UTC(2500, 0, 1)), Planet.SUN);d.ephemeris; // "moshier": outside the installed 1800-2399 filesd.substituted; // trued.requestedFlags; // 258d.returnedFlags; // 260Real output. A substituted ephemeris is never labelled as Swiss-file output. With await getSwissEph({ strictEphemeris: true }) (or setSwissEphStrictEphemeris(true)), that call throws SwissEphEphemerisMismatchError (code SWISSEPH_EPHEMERIS_MISMATCH, reason: "date_outside_installed_ephemeris_files").
Initialisation now throws a typed SwissEphError instead of logging and continuing; the code is one of SWISSEPH_NOT_INITIALIZED, SWISSEPH_ASSET_NOT_FOUND, SWISSEPH_NODE_BUILTINS_UNAVAILABLE, SWISSEPH_EPHEMERIS_FILES_UNAVAILABLE, SWISSEPH_EPHEMERIS_FILE_UNAVAILABLE, SWISSEPH_DATE_OUT_OF_RANGE, SWISSEPH_EPHEMERIS_MISMATCH, SWISSEPH_CALCULATION_FAILED, SWISSEPH_STATE_MISUSE. If the .se1 files cannot be read, init fails (previously Swiss Ephemeris silently used Moshier). Swiss’s sidereal mode and topocentric observer are process-wide state; the library only changes them inside the synchronous withSwissEphState (and Jyotish’s withSiderealMode), restoring the defaults before returning, so concurrent calculations cannot contaminate each other.
ESM, CJS and browser initialisation
- CJS and native ESM (Node):
await getSwissEph()resolves the bundled assets next to the running module (import.meta.urlin ESM,__dirnamein CJS). Native ESM used to fail with__dirname is not defined. - Explicit paths always win:
getSwissEph({ wasmPath, ephePath }), or theKAABALAH_WASM_PATH/KAABALAH_EPHE_PATHenvironment variables. - Browser: the ephemeris files are fetched into the module’s in-memory file system. Serve
swisseph.web.wasmand the three.se1files and passwasmPathandephePathexplicitly. The default (non-explicit) browser asset path has not been exercised by an automated browser test.
See the WebAssembly guide for asset locations and troubleshooting.
27. Jyotish
Dhruva (equatorial) and Lahiri (sidereal) nakshatras, karakas and dashas live on their own page: Jyotish.