From: melvyn wright 
To: Jun-Hui Zhao , Christopher Faesi 
Cc: smamiriad@cfa.harvard.edu, Lei Zhu , Shi Hui 
Subject: Re: Question about continuum subtraction (fwd)

Hello Christopher,

There are several possibilities for continuum subtraction:

in uv domain :
1.uvlin or
2.uvcal options=contsub
These tasks use Re and Im to avoid noise bias.
Over a wide, or disconnected frequency intervals, there could be some
problems with subtracting the extrapolation of the fit to continuum

In the image domain
3.maths or
4. avmaths.
Image domain continuum subtraction can be made before of after image
deconvolution.

subtracting the continuum synthesized image and then deconvolving
the line-continuum, avoids variations in line-continuum due to the
non-linear deconvolutions.

subtracting after deconvolving avoids problems with different
uv-coverage in the line
and continuum ( which includes the scaling of uv with freq)


If there are one or more continuum bands at different frequencies from
the line data,
the following procedure offers some useful checks on the validity of
the continuum
subtraction.
i) make image of line channels
ii) make image(s) of continuum bands or channels. use same invert
weighting options as (i)
iii) imcat  in=line,continuum images  out=line+continuum options=relax
( because image
planes are not contiguous )

iv) avmaths options=subtact  region=one or more continuum planes
out=line-continuum
if there are several continuum bands (these are image planes after
imcat), then after avmaths
the difference between these gives a good measure of the success of
the continuum
subtraction.
v) deconvolve the line-continuum inages.

best wishes,

Melvyn