3.12.8 filter phase

This allows you to enter one epoch-period combination, and up to 64 phases per invocation. The subsequent extract command will use the union of all these phases to filter the data.

xsel > filter phase epoch period phase save_file

The epoch is in MJD (in the same time system as the data), the period in days, and the phase(s) run from 0-1.

So to filter using the epoch 40000, period of .5 days, and the first and third quarters of the period, say

xsel > filter phase 40000 .5 "0.0-.25,0.5-0.75"

The double quotes are necessary to protect the comma.

Multiple invocations of filter phase now append to a phase-filter stack: each filter phase call writes one Xronos-format window file into the workspace and adds it to the stack. show filter lists all entries; clear filter phase (or clear phase) clears the whole stack. The stack can be saved with save phase.

This is a behaviour change from previous versions, where each filter phase command silently replaced the prior phase selection (after offering to save it). Scripts that relied on the overwrite semantics need to insert clear filter phase between successive filter phase commands when only the latest entry should be active.

The phase-filter stack is also the input to extract spectrum per=phase (see the extract section), which produces one spectrum per stack entry instead of using the union.

Externally-prepared Xronos window files (for example those written by the Xronos win command, or by save phase) can be pushed onto the stack with

xsel > filter phase file "win1.wnd win2.wnd"

Each file becomes one stack entry. The list accepts @file indirection. Entries are removed from the stack by giving the filename with a leading minus sign,

xsel > filter phase "-win1.wnd"

(the double quotes are necessary, as for filter time file removal) and removals may also be mixed into a filter phase file list. Files entered with filter phase file are referenced in place: removing them or clearing the phase filter drops them from the stack without deleting them, whereas the window files written by interactive filter phase invocations belong to the session workspace and are deleted.