casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Functions
imcontsub Namespace Reference

Functions

def imcontsub

Function Documentation

def imcontsub.imcontsub (   imagename = '',
  linefile = '',
  contfile = '',
  fitorder = 0,
  region = '',
  box = '',
  chans = '',
  stokes = '' 
)
Estimates and subtracts continuum emission from an image cube

  For each (x, y) column in imagename (or a subset selected by region and/or
  box), this estimates the continuum by fitting a polynomial to one or more
  subsets of the channels.  The continuum estimate is saved in contfile, and
  subtracted from imagename (or its subset) to make a spectral line estimate,
  which is saved in linefile.

  
  

  Keyword arguments:
  imagename -- Input image cube
    Default: none; Example: imagename='ngc5921_task.im'
  linefile -- Name of output spectral line cube
    Default: none; Example: outline='ngc5921_line.im'
  contfile -- Name of output continuum cube
    Default: none; Example: contfile='ngc5921_cont.im'
  fitorder -- Polynomial order for the continuum estimation.
    Default: 0; Example fitorder=2
  region -- ImageRegion file to select a portion of the cube for output.
    Default: '' (= everything)
    Example: region='myimage.im.rgn'
     region='region1'
    Use the viewer on the image cube to define the continuum
    regions.  This is more general than box but still experimental.
    N.B. This is NOT for selecting a subset of the input for
 fitting the continuum!  Only pixels that are in region
 will be considered, however.

  box --  A [blcx, blcy, trcx, trcy] region on the directional plane for
  selecting a subset for output.
  ONLY pixel values are acceptable at this time.
  Default: none (whole 2-D plane); Example: box='10,10,50,50'
  N.B. This is NOT for selecting a subset of the input for
       fitting the continuum!  Only pixels that are in region
       will be considered, however.
  chans -- line-free channel numbers to fit the continuum to.
   N.B.: This is currently the _only_ way to specify what is
         continuum vs. line emission.
   ONLY channel numbers accepted at this time, i.e. there is no
   'spw:' as in the spw parameter of other tasks.  For
   a multi-spw image, the channelization must be the same for all.
   Default: '' (all)
   Example: chans='3~6;>40'
  stokes -- Stokes parameters to image, may or may not be separated
    by commas but best if you use commas.
    Default: none (all); Example: stokes='IQUV';
    Options: 'I','Q','U','V','RR','RL','LR','LL','XX','YX','XY','YY', ... 

Definition at line 13 of file imcontsub.py.