FILTER







Syntax




   LET @name = @name FILTER @number
or symbolically

   LET @name = @name > @number


Description




The FILTER command reduces the number of intervals in a schedule by removing (filtering) intervals that contain (strictly) less than some number of seconds. It is typically used to remove intervals that are too short to contain complete observations.

Formally, let W be the schedule containing the intervals

   [a_1, b_1], [a_2, b_2],..., [a_n, b_n]
and let x be any number. Intervals that satisfy the inequality

   b_i - a_i  <  x
are removed. The remaining intervals are copied to the output schedule.

A graphical description of the FILTER command is shown below.

   Size limit    : ---
 
   Input schedule  :      ---     ---------  --        -----       -
   Output schedule :      ---     ---------            -----


Example 1.




The following commands determine when we can observe a body while in shadow for at least 60 seconds.

   FIND DARK ECLIPS OF BODY BY OBSTRUCTION FROM OBSERVER
        STEP SIZE LENGTH;
 
   FIND BLOCKED OCCULTATION OF BODY BO OBSTRUCTION FROM OBSERVER
        STEP SIZE LENTH;
 
   LET CLEAR_AND_DARK = DARK - BLOCKED;
 
   LET CLEAR_AND_DARK = CLEAR_AND_DARK > 60 seconds;


Example 2.




The following commands use the filter mechanism to find all of the intervals of a schedule that have duration less than 60 seconds.

   LET LONG  = SCHEDULE > 60 seconds;
   LET SHORT = SCHEDULE - LONG;


Notes




Compare with FILL, which removes small gaps between intervals (instead of small intervals between gaps).



Related Topics




  1. Fill
  2. About Schedules
  3. The Percy Help System