7.4 Blanking of images

In order to determine accurate flux values in images, or moments of velocity profiles, it is desirable to restrict the integrations to pixels that contain emission, or, in other words, to exclude pixels that contribute only noise. If this is not done, the inclusion of noisy pixels will increase the rms in the derived integrated value to an unacceptable extent. The task BLANK gives the user the opportunity to replace pixels containing pure noise with values that AIPS and its tasks interpret as undefined. The decision whether a certain pixel contains pure noise, or carries some emission, can be made subjectively (using the TV) or in a more objective fashion (see below for an example). In all cases, BLANK creates an output image which is a copy of the input image with some pixels replaced by undefined values, or — if the user specifies it — by the value zero.

The most straightforward use of BLANK is to apply a cutoff to the input image, e.g. let BLANK replace with an undefined value every pixel in the input image that lies below a specified. e.g.3σ noise level. This effectively removes almost all noisy pixels. The disadvantage is that this method also removes any signal below the 3σ noise level. Since a substantial fraction of the total flux may be “hidden” in pixels below 3σ, this method prevents an accurate total flux determination. Another straightforward use of BLANK is to remove all pixels outside a user-specified radius. This allows blanking regions for which the primary-beam corrections, and hence the noise levels, are large.

A better way to perform the blanking is one which is not based on the pixel values in the input image itself, but on those in a second input image. Typically this is a convolved (spatially and/or in velocity) version of the input image, which has a higher signal to noise for extended emission than the input image. In the example given here we have the input image I1 of full spatial resolution, and a convolved version of this input image I2 with a linear beam size roughly twice full resolution. Careful inspection of this second image has shown that there are no outlying noise peaks above f mJy/beam. BLANK is then run as follows:

> TASK BLANK’ ; INP  C R

to review the required inputs.

> INDI 0 ; MCAT  C R

to help you find the catalog numbers of I1 and I2.

> INDI n1 ; GETN ctn1  C R

to select I1 from disk n1 catalog slot ctn1.

> IN2D n2 ; GET2N ctn2  C R

to select I2 from disk n2 catalog slot ctn2.

> OUTN xxxxx  C R

to specify xxxxx for the name of the blanked output image.

> OUTC ccc  C R

to specify ccc for the class of the blanked output image.

> OPCODE IN2C  C R

to specify that the blanking is performed using pixel values in a second input image.

> DPARM(3) sim - f , f  C R

to set DPARM(3) and DPARM(4) to specify that all pixels with fluxes in the second input image in the interval (-f,f) should be blanked.

> GO  C R

to compute the blanked output image.

The task REMAG can be used to replace blanked pixels by a value to be specified by the user.

The AIPS TV display may be used to do a more subjective blanking with this task. Set OPCODE TVCU  C R to display the image, one plane at a time in any transposition. You will be prompted to set “blotch” regions (much like TVSTAT and BLSUM) to define the areas to be blanked. This is one method for having different regions of signal at different spectral channels. There are also four windowing methods for blanking spectral-line cubes which have been transposed to have the frequency axis be first. In these methods, a window (range of spectral channels) about the peak signal in each spectrum is retained.

The task RMSD may be used to write a version of the input image blanking pixels below N times the rms in the image, computing the rms self-consistently in windows surrounding each pixel.