Flagging a Sector of Data - UVSECTOR

The task uvsector flags a set of visibilities based on their u-v position angle. To understand the utility of this, consider the samples measured in the u-v plane at a particular time instant. For an east-west array (i.e. the ATCA) the samples will lie on a spoke of an ellipse. If there is a glitch an a particular time, the bad data will cause a stripe pattern in the resultant image which is at right angles to the spoke. The position angle of the stripe can be used to determine the u-v plane position angle of the glitch. From this you could determine the offending time and then flag the appropriate data. Task uvsector performs these operations for you.

Task uvsector will flag a sector of visibility data with a given u-v position angle (or hour angle). While you can give the position angle of the sector to be flagged directly (via the angle parameter), it is more convenient to indicate the position angle indirectly via the stripe direction in an image. How do you specify a stripe direction? You do this by specifying a long, thin region in a image. Normally you will generate the region by using cgcurs (see Section 17.3 for more information on cgcurs). With cgcurs, you display a greyscale of the image, and then use a cursor to selection a long, thin, region containing the crest of a single stripe. The selected region is then written into a text file, cgcurs.region. While this may be a rather odd way to define a direction, it allows uvsector to use the interactive facilities of cgcurs.

Typical inputs to use cgcurs are

CGCURS
in=vela.icln Input image (probably CLEANed).
type=grey Greyscale plot.
range= Set the range to highlight the stripes.
device=/xs PGPLOT device - Xwindows here.
options=region Define a region of interest.

The width of the sector that uvsector flags is given as a angle (in degrees) via the width parameter. Remember that 1 degree is equivalent to 4 minutes of observing time, so do not set it to any value larger than you need. Normally you would set this to a few degrees, based on your confidence in the accuracy of the stripe direction. The default is 5 degrees.

As uvsector flags a sector, if your input visibility data-set contains multiple configurations, data within that sector for all configurations will be flagged by default. Generally this is not what you are likely to want. If you know which configuration contains the bad data, you can use the select keyword to ensure just that configuration is affected. Selecting by time is probably the easiest.

The breadth of a stripe also contains useful information - a glitch in just the short baselines will cause a broad stripe, whereas a glitch in just the long baselines will cause a narrow stripe separation. A glitch in just one baseline will give a two dimensional sinusoid. Given the separation between stripes, you could make an approximate calculation of the corresponding u-v radius of the bad data. For a stripe separation (crest to crest) of x arcseconds, the corresponding u-v radius is

\begin{displaymath}
r = \frac{206}{x} {\rm kilowavelengths}
\end{displaymath}

You may then use select=uvrange so that only data at the appropriate u-v radius is flagged. For example if the crest-to-crest separation is 20 arcsec, we might flag data only with spacings of $10 \pm2$ kilowavelengths.

UVSECTOR
vis=vela.uv Visibility data to be flagged.
angle Leave unset if defining position
  angle by a stripe direction.
in=vela.icln The image containing stripes,
  used only for its coordinate information.
region=@cgcurs.region A long, thin, region along the crest
  of a stripe.
width=3 Flag data over 3 degrees (12 minutes of time)
select Leave unset to flag all data in the sector,
or  
select=uvrange(8,12) Flag data within the sector and between 8 to 12
  kilolambda.

Miriad manager
2016-06-21