Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1530
News FAQ
Search Home


next up previous contents index
Next: Quack Up: autoflag.setselect - Function Previous: autoflag.setselect - Function

Clipping.

The clip and flagrange parameters enable flagging based on the value of an expression. Clip implies flagging of all values outside a specific range, flagrange implies flagging within a specific range. Like other flagging methods, you can specify values via expressions. Two types of expressions are recognized: correlation-derived expresisons (see the general autoflag module description for details), and UVW expressions (see below). To use a single expression and range, set clip or flagrange to a record as folows:

- af:=autoflag('3C273XC1.MS')
- af.setdata();
- af.setselect(clip=[expr='+ ABS XX YY',min=1e-6,max=.5]) 
# Above the feeds are assumed to be linear; use RR and LL for circular. 
- af.run();

The expr field specifies the expression to clip on, and min and max specify the range. Either the min or max field may be omitted, in which case $ \pm$$ \infty$ is assumed. To flag several ranges and/or expressions, set clip or flagrange to a record of records:

- af:=autoflag('3C273XC1.MS')
- af.setdata();
- cliprec:=[=]
- cliprec[1] := [expr='+ ABS XX YY',min=1e-6,max=.5]
- cliprec[3] := [expr='- ABS XX YY',max=.5]
- cliprec[2] := [expr="UVD",min=1]
- af.setselect(clip=cliprec)

A shorthand way is also available: use expression as the field name, and set the field to (a) a record of min, max, (b) a 2-element array of (min,max), or (c) a single scalar value (assumed to be max). Thus, the record above may be equivalently formed as:

- cliprec['+ ABS XX YY'] := [1e-6,.5]         # equivalent to [min=1e-6,max=.5]
- cliprec['- ABS XX YY'] := .5                # equivalent to [max=.5]
- cliprec['UVD']         := [min=1]            
- af.setselect(clip=cliprec)

When specifying several ranges for the same expression, you must naturally use the longhand form.

In addition to the regular correlation expressions, select also recognizes a few UVW-based expressions. The simplest ones are: U, V, W, ABS U, ABS V, ABS W. UVD stands for uv-distance, and corresponds to $ \sqrt{{u^2+v^2}}$. Two more expressions represent angles in the uv-plane:

UVA
stands for uv position angle, specified in degrees clockwise from the v axis.

HA
stands for hour angle (East-West array assumed). It is specified in degrees counterclockwise from the u axis, using the following definition: u = B cos$ \alpha_{h}^{}$,    v = B sin$ \alpha_{h}^{}$sin$ \delta$, where B is baseline, $ \alpha_{h}^{}$ is hour angle, and $ \delta$ is declination.

When using the UVA and HA expressions, you are actually defining sectors in the uv-plane, from min. to max. angle, e.g.:

- af.setselect(flagrange=[expr="uva",min=47,max=49])

...flags everything in the sector between 47 and 49 degrees, in terms of positional angle.


next up previous contents index
Next: Quack Up: autoflag.setselect - Function Previous: autoflag.setselect - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-09-02