E.9 Spectral-line imaging hints

Some spectral-line data sets contain only a few spectral windows, each with a great many spectral channels. The continuum subtraction task UVLSF requires that the continuum signal be a linear function of channel across each spectral window. Converting the data to more spectral windows with task MORIF or REIFS may make the data come closer to this requirement. Having more spectral windows with fewer channels may also speed up imaging in the LINIMAGE procedure mentioned below.

In many spectral-line observations you will want to separate the continuum signal from the channel-dependent signals. This is discussed in some detail in 8.3. The larger number of channels from the EVLA does mean that continuum may be estimated with greater accuracy than when there were rather few channels which were both free of edge effects and spectral-line signal. The wider total bandwidth may, however, invalidate the assumption that the continuum signal at each visibility point can be represented by a polynomial of zero or first order. If there is a single dominant continuum source offset from the phase center, the assumption may be rendered valid by shifting the data with UVLSF to center the continuum source temporarily in order to subtract it. To examine this assumption and to determine which channels appear safe to use as “continuum” channels, use POSSM.


to set the task name and clear the adverbs.


to select the calibrated line data set on disk Tn and catalog number Tm.

> DOTV 1 ; NPLOTS 1  C R

to plot only on the TV, one baseline at a time.

> ANTEN n1 , n2 , n3 , n4  C R

to select the antennas nearest the center of the array


and only them.

> BIF j ; EIF BIF  C R

to plot one IF at a time.

> APARM 0  C R

to display vector averaged spectra. Scalar averaged spectra will turn up at the edges reflecting the decreased signal to noise in the outer channels which will assist in determining channels that should be omitted.

> GO  C R

to run the task. Make notes of the desirable channels IF by IF.

Note also whether the continuum appears to be a linear function of channel. If so, then use UVLSF to fit the continuum signal, writing a continuum only and a spectral-line only data set:


to set the task name and clear the adverbs.


to select the calibrated line data set on disk Tn and catalog number Tm.

> ICHANSEL c11,c12, 1,if1,c21,c22, 1,if2,c31,c32, 1,if3,  C R


to select the range(s) of channels which are reliable for fitting the continuum. For a multi-IF data set, you will need to select the channel ranges carefully by IF.

> ORDER 1  C R

to select fitting the continuum in real and imaginary parts with a first order polynomial in channel number. UVLSF offers orders up to four, but they are not for the faint at heart and will give bad results if there are large ranges of channels left out of the fit due to line signals.


to have the continuum which was fit written as a separate data set. This may be used to image the continuum.

> SHIFT Δx, Δy  C R

to shift the phase center to the dominant continuum source temporarily for the fitting.

> GO  C R

to run the task.

Imaging the continuum output may, in addition to any scientific value of the continuum image, provide additional flagging and even self-calibration information which may be applied to the line data.

If UVLSF cannot be used, flag the channels at the edges and those with spectral signals using UVFLG. Construct a continuum image with IMAGR on this flagged, spectral-line data set. Note that you might want to reduce the size of the data set with time averaging (UVAVG) and/or channel averaging (SPLIT or AVSPC) before beginning the imaging. Imaging is discussed in detail in 5.2 through 5.3.6 and will not be discussed here. You may find that additional editing is needed and that iterative self-calibration is of use. Be sure to copy those flags (but not the edge and spectral-signal flags) and final SN table back to the line data set. Apply them with SPLIT and then subtract the final continuum model with UVSUB. It you have had to use the spectral index options of IMAGR, you may do the proper subtraction including these options with OOSUB rather than UVSUB.

At present, the EVLA observing setup allows you to select the initial frequency of observation based on a desired LSRK velocity in the central channel. From there, however, the observations are conducted at a fixed frequency. Furthermore, the information about rest frequencies, source velocities, and even more fundaemtal parameters such as reference frame (LSRK or barycentric) and type of velocity (radio or optical) are lost. SETJY allows you to correct this. First use SETJY to set the desired rest frequencies (note that they are allowed to be a function of IF) and the VELTYP and VELDEF. Then use OPTYEP=’VCAL’ over all sources and IFs. This will compute the velocities at which you observed for the first time you observed each source and enter the values in the source table.

Having done this, the task CVEL may be used to shift the visibility data to correct for the rotation of the Earth about its axis as well as the motion of the Earth about the Solar System barycenter and the motion of the barycenter with respect to the Local kinetic Standard of Rest. CVEL works on multi-source as well as single-source data sets. It applies any flagging and bandpass calibration to the data before shifting the velocity (which it does by a carefully correct Fourier transform method). Note, the use of Fourier-transforms means that one must not use CVEL on data with channel separations comparable to the widths of some of the spectral features. Furthermore, narrow EVLA bands apparently have sharp cutoffs at the edges which cause any continuum signal to generate sine waves in amplitude after the FFT. Therefore, UVLSF must be run before CVEL. The velocity information used by CVEL must be correct. Use LISTR and SETJY to insure this before using SPLIT and CVEL. A special version of CVEL has been written to correct not only for the Earth’s motion but also for planetary motion to observe a line at rest with respect to a planet; see PCVEL.

Spectral-line imaging of EVLA data will resemble that for the old VLA except for the increased number of spectral channels and the consequent increase in the data set size. Since IMAGR must read the full data set to select the data for the next channel to be imaged, it is important that the data set be small enough to fit in computer memory if at all possible. OSRO data sets may not need this operation and skipping it may simplify any continuum imaging that you wish to do. However, separating the IFs into separate files will not interfere with spectral imaging and will help with the data set size problem:


to reset all adverbs and choose the task.


to select the calibrated target data set on disk Tn and catalog number Tm.


to have the task resume AIPS only after it has finished.


to avoid file name issues and select the output disk.

> FOR BIF = 1 TO N; EIF = BIF ; GO; END  C R

  to make separate files of each of the N IFs.

> DOWAIT -1  C R

to turn off waiting.

Doing this UVCOP step on large data sets will be worth any extra trouble it may cause. A RUN file and procedure called LINIMAGE has been written to assist in this process. It even runs FLATN and reassembles the images from the separate IFs into cubes with MCUBE or FQUBE if necessary. Note that you could perform the separation into separate IFs before UVLSF which will speed up POSSM and UVLSF. However, the continuum output would then have to be assembled using VBGLU, which is why the steps above were shown in the present order.

Spectral-line imaging is discussed in 8.4 as well as throughout Chapter 5. With large numbers of spectral channels, you may wish to have IMAGR find appropriate Clean boxes for you. Set IM2PARM(1) through IM2PARM(6) cautiously. IM2PARM(7) controls whether the boxes of channel n are passed on to channel n + 1. The default does not pass the boxes along when auto-boxing which is probably the correct decision. The end result of the imaging will be one image “cube” for each IF since each IF has to be imaged separately even with a multi-IF input data set. (If you set BIF = 1; EIF = 0 and try to image channel 103, you will actually image the average of channel 103 from each of the IFs.) To put the individual cubes together into one large cube, use MCUBE (8.5.1).

The wide bandwidths of the EVLA have revealed an error in the old code. IMAGR and MCUBE now control the units of data cubes carefully, making sure that each plane is in units of Jy per header beam. The actual restoring beamwidths used are now maintained in a CG table. This allows the best resolution to be used in each plane and the approximate match between the units of the residual image and the restored components to be maintained, while still returning correct fluxes when integrating brightness over area. CONVL with OPCODE = ’GAUS’ will now use the CG table to find the exact Gaussian needed to produce a constant resolution in each plane. Use of BMAJ = 0 in IMAGR followed by CONVL is now the best way to insure a constant resolution with correct image units throughout.