Skip to main content

Event Filter Editor

The Event Filter Editor authors the optional filter script that further refines the events a study returns. A filter script is a C# boolean expression evaluated for every event the study finds; events for which the expression evaluates to true are kept, and events for which it evaluates to false are discarded. The filter script must be compiled before the study is generated; see Compile Filter Script.

event-filter-editor-overview

The Event Filter Editor's right-click context menu inserts pre-formed snippets at the cursor, preventing typos and syntax errors.

Type Filter Script

To author or modify a filter expression by typing it directly:

  • Type the C# boolean expression in the Event Filter editor text box.

Once a script is typed (or modified), compile it before generating events.

Insert Function Snippet

To insert a pre-formed function call (e.g., IsRetrograde(Body)) at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Functions menu item, then click the desired function snippet.

event-filter-functions-context-menu

Insert Generic Body Snippet

To insert a generic body identifier (Body, Body1, Body2, Body3) at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Generic Bodies menu item, then click the desired generic body.

Generic bodies adapt to the host study automatically. For two-body studies, Body1 is the inner body and Body2 is the outer body. For three-body studies, Body1, Body2, and Body3 are positionally generic. For studies with a natal body, the natal body is exposed with the next sequential number (e.g., Body3 for two transiting bodies plus a natal body).

Insert Body Snippet

To insert a specific body name (e.g., Sun, Moon, Mercury) at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Bodies menu item, then click the desired body name.

Insert Body Property Snippet

Body property suffixes provide raw measurements for filter expressions.

PropertyDescription
.LongitudeThe body's ecliptic longitude in degrees.
.LatitudeThe body's ecliptic latitude in degrees.
.DistanceThe body's distance in Astronomical Units (AU).
.LongitudeSpeedThe body's speed in longitude (degrees/day).
.LatitudeSpeedThe body's speed in latitude (degrees/day).
.DistanceSpeedThe body's speed in distance (AU/day).

To insert a body property suffix at the cursor:

  1. Click in the Event Filter Editor immediately after a body identifier.
  2. Right-click to open the categorized snippet menu.
  3. Click the Body Properties menu item, then click the desired property.

Insert Zodiac Sign Snippet

To insert a zodiac sign name (Aries through Pisces) at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Zodiac Signs menu item, then click the desired sign.

Insert Comparison Operator Snippet

To insert a comparison operator at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Comparison Operators menu item, then click the desired operator.
OperatorMeaning
>Greater Than
>=Greater Than or Equal To
<Less Than
<=Less Than or Equal To

Insert Logical Operator Snippet

To insert a logical operator at the cursor:

  1. Click in the Event Filter Editor at the desired insertion point.
  2. Right-click to open the categorized snippet menu.
  3. Click the Logical Operators menu item, then click the desired operator.
OperatorMeaning
&&And: true only if both sides are true.
||Or: true if at least one side is true.

Filter Script Functions

The Event Filter Editor supports a library of helper functions for common conditions:

FunctionPurpose
IsAspecting(Body1, Body2, angle, orb)Two bodies are within orb of the given aspect.
IsParallel(BodyA, BodyB, orb)Two bodies are parallel within orb.
IsContraParallel(BodyA, BodyB, orb)Two bodies are contraparallel within orb.
InRange(Body, min, max)A body's longitude is within a range.
IsOutOfBounds(Body)A body's latitude is "out of bounds" (beyond ~±23.4°).
IsRetrograde(Body)A body is moving retrograde.
IsDirect(Body)A body is moving direct.
InSign(Body, Sign)A body is in a specific zodiac sign.
InFireSign(Body)A body is in a fire sign (Aries, Leo, Sagittarius).
InEarthSign(Body)A body is in an earth sign (Taurus, Virgo, Capricorn).
InAirSign(Body)A body is in an air sign (Gemini, Libra, Aquarius).
InWaterSign(Body)A body is in a water sign (Cancer, Scorpio, Pisces).
InCardinalSign(Body)A body is in a cardinal sign.
InFixedSign(Body)A body is in a fixed sign.
InMutableSign(Body)A body is in a mutable sign.
InQuadrant(Body, n)A body is in quadrant 1 to 4 of its sign.
InDomicile(Body)A body is in its sign of domicile.
InDetriment(Body)A body is in its sign of detriment.
InExaltation(Body)A body is in its sign of exaltation.
InFall(Body)A body is in its sign of fall.
IsBodyPresent(Body, ...)A body is one of the bodies involved in the event.