# Difference between revisions of "Imaging an EVLA OSRO HI data set"

Line 82: | Line 82: | ||

Here, we are fitting the continuum to channels 10--55 and 120--155 of spectral window 0 (the ''only'' spectral window). We're averaging over one minute intervals ('''solint=''' '60s') before fitting the continuum; note that the default will fit each integration (so, every one second for un-averaged EVLA data). We're fitting a simple mean to the continuum ('''fitorder=''' 0), although higher-order fits are certainly possible. | Here, we are fitting the continuum to channels 10--55 and 120--155 of spectral window 0 (the ''only'' spectral window). We're averaging over one minute intervals ('''solint=''' '60s') before fitting the continuum; note that the default will fit each integration (so, every one second for un-averaged EVLA data). We're fitting a simple mean to the continuum ('''fitorder=''' 0), although higher-order fits are certainly possible. | ||

− | Note that the form of the output from [[uvcontsub]] can be a bit confusing, and depends on your choice of the '''fitmode''' and '''splitdata''' parameters. | + | Note that the form of the output from [[uvcontsub]] can be a bit confusing, and depends on your choice of the '''fitmode''' and '''splitdata''' parameters. If '''splitdata=''' True, two new measurement sets will be created: one with the fitted continuum data ('leo2.ms.cont') and one with the continuum-subtracted data ('leo2.ms.contsub'). [[Uvcontsub]] will also alter your 'corrected' and 'model' data columns---exactly how depends on your choice of '''fitmode'''. We have set '''fitmode=''' 'subtract', which means the fitted continuum values are placed in the 'model' column, and the continuum-subtracted data are placed in the 'corrected' column. If you have previously applied a calibration to this measurement set (so that the 'data' and 'corrected' columns are different), [[uvcontsub]] will overwrite the calibrated data. In this case, it is best to first create a new calibrated measurement set using [[split]], and then run [[uvcontsub]] on that newly-split data set. |

− | |||

[[Main Page | ↵ '''CASA Guides''']] | [[Main Page | ↵ '''CASA Guides''']] |

## Revision as of 20:52, 11 March 2010

This article is **under construction**. Watch this space!

## Overview

This tutorial explains how to image an HI dataset acquired with the WIDAR0 correlator. It assumes that you've already calibrated your data as described in the calibration tutorial, and that you now have a split dataset with a single source of interest in it. In this example, the source is called 'Leo-2'; see the calibration tutorial for more details on this data set.

## Flag Your Split Data

Load the split dataset into plotms and/or viewer and flag any bad data.

For a spectral line dataset like this one, you'll probably want to average in various ways to spot bad data. Averaging channels together can make bad baselines pop up!

## Doppler Tracking

Presently, doppler tracking is not performed online by the EVLA, so we have to correct for any velocity shifts now, in post-processing, with cvel.

# cvel :: regrid an MS to a new spectral window / channel structure or frame vis = 'leo2.ms' # Name of input measurement set outputvis = 'leo2_cvel.ms' # Name of output measurement set passall = False # Pass through (write to output MS) non-selected data with no change field = '' # Select field using field id(s) or field name(s) spw = '0' # Select spectral window/channels selectdata = False # Other data selection parameters mode = 'channel' # Regridding mode nchan = -1 # Number of channels in output spw (-1=all) start = 0 # first input channel to use width = 1 # Number of input channels to average interpolation = 'linear' # Spectral interpolation method phasecenter = '' # Image phase center: position or field index restfreq = '1420405751.786Hz' # rest frequency (see help) outframe = 'BARY' # Output frame (''=keep input frame) veltype = 'radio' # velocity definition hanning = False # Turn on Hanning smoothing of spectral channels async = False # If true the taskname must be started using cvel(...)

Cvel creates a new measurement set (**outputvis=** 'leo2_cvel.ms') for which, at each time, the spectrum has been shifted and channels regridded to keep the spectral line centered in the frame of your choice (here, we choose barycentric; **outframe=** 'BARY'). You'll also want to give cvel the rest frequency of your spectral line (**restfreq=** '1420405751.786Hz' for HI).

## Continuum Subtraction

In preparation for subtracting the continuum, let us plot up the combined spectrum on our science field and identify some line-free channels. Open up a plotms GUI window and load the doppler-tracked measurement set containing your science target. You'll want to average over both time and baselines to get as much signal-to-noise as possible, hopefully revealing a nice 21 cm profile. In the **Time**= 36000 (Set to some long time period, longer than your total observation duration)**Scan**= True (checkmark; average in time across scan boundaries)**All Baselines**= True (checkmark)
(See Averaging data in plotms for more details on averaging options). You'll also want to click on the **X Axis**= Channel**Y Axis**= Amp
The figure to the right shows the resulting plot in plotms. There is clearly some line emission around channel 190, and possibly some faint emission around channel 88. Let's use channels 10--55 and 120--155 to fit the continuum. |

Next, use uvcontsub to subtract the continuum from your data set. Here are the parameters we used:

# uvcontsub :: Continuum fitting and subtraction in the uv plane vis = 'leo2.ms' # Name of input visibility file field = '' # Select field using field id(s) or field name(s) fitspw = '0:10~55;120~155' # Spectral window/channel selection for fitting the continuum spw = '0' # Spectral window selection for subtraction/export solint = '60s' # Continuum fit timescale fitorder = 0 # Polynomial order for the fit fitmode = 'subtract' # Use of continuum fit (subtract,replace,model) splitdata = True # Split out continuum, continuum-subtracted data async = False # If true the taskname must be started using uvcontsub(...)

Here, we are fitting the continuum to channels 10--55 and 120--155 of spectral window 0 (the *only* spectral window). We're averaging over one minute intervals (**solint=** '60s') before fitting the continuum; note that the default will fit each integration (so, every one second for un-averaged EVLA data). We're fitting a simple mean to the continuum (**fitorder=** 0), although higher-order fits are certainly possible.

Note that the form of the output from uvcontsub can be a bit confusing, and depends on your choice of the **fitmode** and **splitdata** parameters. If **splitdata=** True, two new measurement sets will be created: one with the fitted continuum data ('leo2.ms.cont') and one with the continuum-subtracted data ('leo2.ms.contsub'). Uvcontsub will also alter your 'corrected' and 'model' data columns---exactly how depends on your choice of **fitmode**. We have set **fitmode=** 'subtract', which means the fitted continuum values are placed in the 'model' column, and the continuum-subtracted data are placed in the 'corrected' column. If you have previously applied a calibration to this measurement set (so that the 'data' and 'corrected' columns are different), uvcontsub will overwrite the calibrated data. In this case, it is best to first create a new calibrated measurement set using split, and then run uvcontsub on that newly-split data set.