10.4 Analysis and display of single-dish data

The analysis and display of images produced from single-dish data are not, in general, different from those produced by interferometers. See Chapter 6 for a discussion of display tools, Chapter 7 for a variety of analysis tasks, and §8.5 and §8.6 for spectral-line analysis and display. Some matters of particular interest to single-dish users will be discussed below.

10.4.1 Spectral baseline removal

As the SPFLG display in §10.2.2 shows, one of the first things most users will want to do is remove a spectral baseline at each pixel in the their image. This is frequently done with SDLSF (§10.2.4). To do this in the image plane, you must first transpose the data cube to make the frequency axis be first:

> TASK TRANS’ ; INP  C R

to review the task’s parameters.

> INDI n1 ; GETN ctn1  C R

to select the input image from disk n1 catalog slot ctn1.

> TRANSCOD ’312’ ; OUTCL ’VXY’  C R

to move the frequency axis from 3rd to 1st.

> GO  C R

to transpose the cube.

You must also determine, using this input image if needed, which spectral channels are completely free of real emission or absorption. TVMOVIE is often useful; see §8.5.4. Then:

> TASK IMLIN’ ; INP  C R

to review the task’s parameters.

> INDI n2 ; GETN ctn2  C R

to select the input image (output from TRANS) from disk n2 catalog slot ctn2.

> ORDER 1  C R

to subtract linear baselines; up to 4th are allowed.

> NBOXES n  C R

to select n contiguous regions along the spectral axis to be used in fitting the channels.

> BOX c11, c12, c21, c22, cn1, cn2  C R

to use spectral channels c11c12, c21c22, up to cn1cn2 to fit the baselines at each pixel.

> INP  C R

to review the inputs.

> GO  C R

to fit the baselines, writing a new data cube.

It is sometimes useful to specify DOOUT TRUE to obtain images of the fit parameters and of their uncertainties. The uncertainty in the DC offset is a good measure of the uncertainty in the image.

The output from IMLIN is the baseline-corrected image in the familiar position-velocity form, with a third axis giving multiple positions on the second celestial coordinate. To go back to sky images as a function of frequency:

> TASK TRANS’ ; INP  C R

to review the task’s parameters.

> INDI n3 ; GETN ctn3  C R

to select the input image (output from IMLIN) from disk n3 catalog slot ctn3.

> TRANSCOD ’231’ ; OUTCL ’XYV’  C R

to move the frequency axis from 1st to 3rd.

> GO  C R

to transpose the cube back again.

10.4.2 Using WTSUM and BSAVG to combine images

To do a weighted average of multiple images of the same field, be sure to make all images with the same geometry type, the same cell size, and the same center coordinate. If you have two images,

> TASK WTSUM’ ; INP  C R

to review the inputs.

> INDI n1 ; GETN ctn1  C R

to select the first input image from disk n1 catalog slot ctn1.

> INDI n2 ; GET2N ctn2  C R

to select the second input image from disk n1 catalog slot ctn2.

> INDI n3 ; GET3N ctn3  C R

to select the first weight image from disk n3 catalog slot ctn3.

> INDI n4 ; GET4N ctn4  C R

to select the second weight image from disk n4 catalog slot ctn4.

> DOINVER FALSE  C R

to state that the weight images are weights rather than rms’s.

> GO  C R

to compute an averaged image cube and a new weight image.

The weight images can be either a single plane or a cube that matches the corresponding image cube. All must be on the same spectral and celestial coordinate system.

If you have more than two images of the same field, then all images must have the same name parameters, differing only by having consecutive sequence numbers. All weight images must have the same name parameters with corresponding consecutive sequence numbers. The verb RENAME may be used to correct problems in naming. Then

> TASK WTSUM’ ; INP  C R

to review the inputs.

> INDI n1 ; GETN ctn1  C R

to select the first input image from disk n1 catalog slot ctn1.

> CLR2NAME ; IN2SEQ m2  C R

to select the looping mode and set the highest image sequence number.

> INDI n3 ; GET3N ctn3  C R

to select the first weight image from disk n3 catalog slot ctn3.

> CLR4NAME  C R

to clear the unused fourth name set.

> DOINVER FALSE  C R

to state that the weight images are weights rather than rms’s.

> GO  C R

to compute an averaged image cube and a new weight image.

If m1 is the sequence number of the first image (in ctn1) and w1 is the sequence number of the first weight image (in ctn3), then images of sequence numbers m1 through m2 will be weighted with corresponding weight images of sequence number w1 through w1 + m2 -m1. All weight images must be a single plane or all weight images must be a full cube matching the images.

BSAVG is a special task written to average beam-switched continuum images. Each image is Fourier transformed and weighted to give no weight to Fourier components at the beam switching spatial frequency and direction (since the images lack any non-noise information at these lines in the Fourier domain). Images made at different parallactic angles (i.e., different hour angles) have these zero-weight lines at different angles while images made with different throw lengths have these zero-weight lines at different spatial frequencies. Thus, averaging images in this way (and Fourier transforming them back) should produce images with less noise and more information content. This algorithm works only on images that are made very quickly. If there is a significant rotation of the parallactic angle during the observation of one image, then the zero-weight “line” is actually curved and smeared away from the center (in Fourier space). The failure of this algorithm when observations are made with constant-elevation throws is one reason why some telescopes are designed to beam-switch in celestial coordinates.

10.4.3 Spectral moment analysis

A data cube may be reduced to a line-sum and a predominant-velocity image when the spectral shape is fairly simple at all points of the image. The simplest task to do this is:

> TASK XMOM’ ; INP  C R

to review the inputs.

> INDI n ; GETN ctn  C R

to select the input image from disk n catalog slot ctn — use the output from IMLIN with velocity as the first axis.

> FLUX x  C R

to include only pixels > x in brightness when computing the moments.

> GO  C R

to compute images of the oth through 3rd moments plus an image of the number of pixels used at each position.

This simple prescription will produce a result which should tell you whether this mode of analysis is interesting. If it is, then the regions of signal should be separated from regions of no signal so that the latter do not contribute to the noise in the moment images. See the discussions in §7.4 and §8.6 for methods of doing this. After the non-signal regions are blanked, the moments should be recomputed.

10.4.4 Source modeling and fitting

Gaussian fitting of images is discussed in some detail in §7.5 while source modeling may be done in the “uv” data domain with SDMOD (§10.2.5) and in the image domain with IMMOD. The task SAD will find, and fit Gaussians to, sources in your image. Although it works on a plane of the image at a time, it records the plane number in its output model-fit (MF) table. This will allow you to examine the fits to your sources as a function of frequency. To run SAD on a number of image planes:

> TASK SAD’ ; INP  C R

to review the inputs.

> INDI n ; GETN ctn  C R

to select the image cube from disk n catalog slot ctn

> BLC 0 ; TRC 0  C R

to search for sources over the full plane.

> DORESID FALSE  C R

to delete the residual image after fitting; the fit results are kept in an MF file attached to the input image.

> NGAUSS 10  C R

to allow up to 10 possible sources to be fit; make this enough to allow for a noise spike or two.

> CUTOFF x  C R

to fit “islands” of flux > x only — this is probably the most important parameter.

> DOCRT 132  C R

to display results on your workstation rather than the line printer.

> DOALL 1 ; DOWIDTH 1  C R

to allow the task to fit multiple sources to an island and to fit the source widths.

> OUTVERS -1  C R

to suppress writing of CC files.

> INVERS 1  C R

to use one MF file for all fits.

> DOWAIT TRUE  C R

to resume AIPS only when the task finishes; this allows looping without tripping over ourselves.

> INP  C R

to recheck the inputs.

> FOR BLC(3) = c1 TO c2 ; GO; END  C R

to fit channels c1 through c2.

SAD will reject dubious solutions for a variety of reasons. The DPARM adverb allows you to control these reasons and PRTLEV controls how much of an explanation you get.

SAD offers a printer option to provide a detailed account of each execution. To view a simpler summary of the current contents of one or more MF files, use

> TASK MFPRT’ ; INP  C R

to review the inputs.

> INDI n ; GETN ctn  C R

to select the image cube from disk n catalog slot ctn as input to SAD.

> INVER n1 ; IN2VER n2 ; XINC 1 C R

to view MF file versions n1 through n2.

> DOCRT 132  C R

to see the display on your monitor.

> FLUX 0 ; IMSIZE 0  C R

to see all components.

> SORT ’C’  C R

to see the file in channel number order.

> GO  C R

to run the task.

Setting DOCRT FALSE and specifying OUTPRINT will produce a file suitable for some non-AIPS modeling programs.

10.4.5 Image displays

The subject of displays in AIPS has been treated extensively in earlier chapters. To make a printer representation of your image, see §6.2.2 for a discussion of PRTIM. See §6.3.2 for a discussion of plotter displays of images including tasks CNTR, PCNTR, GREYS, PLROW, PROFL, IMVIM, and IMEAN. Spectral-line displays are described in some detail in §8.5.4 including tasks KNTR and PLCUB and the TV-movie display verbs TVMOVI and TVCUBE. The use of the TV for display, image enhancement, parameter setting, data examination, image comparison, and the like is described in detail in §§6.4.

For tutorial purposes, we will include one example here. The contouring task of choice is now KNTR since it can display images in grey-scales and/or contours with one or more planes per display and with an optional beam display. It also can plot polarization and has several “coloring” options. For example, to display several spectral channels as contours with the 0th-moment (total CO) image as a grey scale on each display, enter

> TASK KNTR’ ; INP  C R

to review the inputs.

> INDI n1 ; GETN ctn1  C R

to select the image cube from disk n1 catalog slot ctn1.

> IN2DI n2 ; GET2N ctn2  C R

to select the 0th-moment image plane from disk n2 catalog slot ctn2.

> DOCONT 1 ; DOGREY 2 ; DOVECT -1  C R

to have contours drawn of the first image, grey-scale of the second image, and no polarization.

> BLC 0 , 0 , c1 ; TRC 0 , 0 , c1  C R

to draw the full plane from channels c1 through c2.

> ZINC Δc  C R

to display every Δcth channel.

> PIXRANGE B1, B2  C R

to do grey scales from B1 through B2 only, clipping the most negative and positive values if desired. The default is the full range of image DOGREY.

> FUNCTYPE ’SQ’  C R

to use a square-root transfer function on the grey scales to emphasize the lower levels.

> OFMFILE ’ ’  C R

to do no pseudo-coloring in KNTR.

> DOWEDGE 1  C R

to plot a step wedge along the top.

> CLEV 0.1  C R

to plot 0.1 K as the basic contour level.

> LEVS 2.7, 7.4, 20.1, 54.6, 148.4, 403.4  C R

to do logarithmic contours, starting at 0.27 K.

> CBPLOT 18  C R

to plot a half-power beam contour in the upper right corner and fill it in.

> LABEL 1  C R

to label each pane with its coordinate (velocity usually).

> DOTV -1 ; INP

to make a plot file and to review the inputs.

> GO  C R

to run the task.

The contour lines will be drawn in a contrasting color when the background grey-scale intensity is high. When KNTR has finished:

> PLVER 0  C R

to plot the most recent plot file for the image.

> OUTFILE    C R

to print the plot immediately rather than saving it in a file.

> GO LWPLA  C R

to translate the plot file into PostScript on a suitable printer.

LWPLA offers additional control over fonts, paper size, line width, the grey-scale plotting (if PIXRANGE was not quite right), image pseudo-coloring, coloring of lines and backgrounds, and number of copies. It can make an “encapsulated” PostScript file for inclusion in other documents, such as this CookBook. See HELP POSTSCRIPT for information on other things that can be done with PostScript plot files.

10.4.6 Backing up your data

The next chapter describes how to help the AIPS programming team (with “GRIPEs”), to exit AIPS (with EXIT), to delete your data (with ZAP and ALLDEST), and, most importantly, to back up your data. Do not assume that data on disk is permanent. Disks can fail and users can make mistakes, so it it is wise to make backups to some demountable medium.