Immoments

From CASA Guides
Revision as of 11:21, 14 December 2009 by Jgallimo (talk | contribs) (Created page with '<pre> Help on immoments task: Compute moments from an image The spectral moment distributions at each pixel are determined. See the cookbook and User Reference …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Help on immoments task:

Compute moments from an image
        The spectral moment distributions at each pixel are
        determined.  See the cookbook and User Reference Manual for
        mathematical details.

        The main control of the calculation is given by parameter
        moments:
        
        moments=-1  - mean value of the spectrum
        moments=0   - integrated value of the spectrum
        moments=1   - intensity weighted coordinate;traditionally used to get 
                      'velocity fields'
        moments=2   - intensity weighted dispersion of the coordinate; traditionally
                      used to get "velocity dispersion"
        moments=3   - median of I
        moments=4   - median coordinate
        moments=5   - standard deviation about the mean of the spectrum
        moments=6   - root mean square of the spectrum
        moments=7   - absolute mean deviation of the spectrum
        moments=8   - maximum value of the spectrum
        moments=9   - coordinate of the maximum value of the spectrum
        moments=10  - minimum value of the spectrum
        moments=11  - coordinate of the minimum value of the spectrum

        Keyword arguments:
        imagename -- Name of input image
                default: none; example: imagename="ngc5921_task.image"
        moments -- List of moments you would like to compute
                default: 0 (integrated spectrum);example: moments=[0,1]
                see list above
        axis -- The moment axis
                default: (spectral axis); example: axis=spec
                options: ra, dec, lattitude, longitude, spectral, stokes
        mask -- Mask applied to the image before calculating the moments.
                Default "" means no mask;  
                Example: mask="orion.mask".  

                Full description of the syntax can be found at
                http://www.astron.nl/aips++/docs/notes/223/node11.html>Aips++ Notes series

        region -- File path to an ImageRegion file or the name of
                  a region stored within the image..
                Default: none; 
                Example: region="myimage.im.rgn"
                         region="region1"
        box --  A box region on the directional plane
                Only pixel values acceptable at this time.
                Default: none; 
                Example: region="myimage.im.rgn"
                         region="region1"
        box --  A box region on the directional plane
                Only pixel values acceptable at this time.
                Default: none (whole 2-D plane); 
                  Example: box="10,10,50,50"
                      box = "10,10,30,30,35,35,50,50" (two boxes)
        chans -- channel numbers
                Range of channel numbers to include in statistics
                  All spectral windows are included
                Default:""= all;  Example: chans="3~20"    
        stokes -- Stokes parameters to analyze.
                Default: none (all); Example: stokes="IQUV";  
                                     Example:stokes="I,Q"
                Options: "I","Q","U","V","RR","RL","LR","LL","XX","YX","XY","YY", ...
        includepix -- Range of pixel values to include
                default: [-1] (all pixels); example=[0.02,100.0]
        excludepix -- Range of pixel values to exclude
                default: [-1] (don"t exclude pixels); example=[100.,200.]
        outfile -- Output image file name (or root for multiple moments)
                default: "" (input+auto-determined suffix);example: outfile="source_moment"

        Example for finding the 1-momment, intensity-weighted
        coordinate, often used for finding velocity fields.
        immoments( axis="spec", imagename="myimage", moment=1, outfile="velocityfields" )

        Example finding the spectral mean, -1 moment, on a specified region
        of the image as defined by the box and stokes parameters
        taskname="immoments"
        default()
        imagename = "myimage"
        moment    =  -1

        axis      = "spec"
        stoke     = "I"
        box       = [55,12,97,32]
        go

        Example using a mask created with a second file to select the
        data used to calculate the 0-moments, integrated values.  In
        this case the mask is from the calibrated.im file and all values
        that have a value greater than 0.5 will be positive in the mask..
        immoments( "clean.image", axis="spec", mask="calibrated.im>0.5", outfile="mom_withmask.im" )