nraonrao
 
NRAO Home > CASA > TaskRef

0.1.69 simdata

Requires:

Synopsis mosaic simulation task: Description

This is a task which will simulate data. Many features are new and alpha code in 2009. Please contact CASA helpdesk with questions.

Arguments





Inputs

modelimage

input image name

allowed:

string

Default:

ignorecoord

scale model coordinates to output parameters

allowed:

bool

Default:

False

inbright

set peak surface brightness in Jy/pixel or ”unchanged”

allowed:

string

Default:

unchanged

complist

componentlist table to observe

allowed:

string

Default:

antennalist

antenna position file

allowed:

string

Default:

alma.out10.cfg

checkinputs

graphically verify parameters [yes—no—only]

allowed:

string

Default:

no

project

root for output files

allowed:

string

Default:

sim

refdate

center time/date of observation *see help

allowed:

string

Default:

2012/05/21/22:05:00

totaltime

total time of observation

allowed:

string

Default:

7200s

integration

integration (sampling) time

allowed:

string

Default:

10s

scanlength

number of integrations per pointing in the mosaic

allowed:

int

Default:

5

startfreq

frequency of first channel

allowed:

string

Default:

89GHz

chanwidth

channel width

allowed:

string

Default:

10MHz

nchan

number of channels

allowed:

int

Default:

1

direction

mosaic center, or list of pointings

allowed:

stringArray

Default:

J2000 19h00m00 -40d00m00

pointingspacing

spacing in between beams in mosaic

allowed:

string

Default:

1arcmin

relmargin

space btw. pointings and edge, relative to pointingspacing

allowed:

any

Default:

variant 1.0

cell

output cell/pixel size

allowed:

string

Default:

0.1arcsec

imsize

output image size in pixels (x,y)

allowed:

intArray

Default:

128 128

niter

maximum number of iterations

allowed:

int

Default:

500

threshold

mJy

flux level (+units) to stop cleaning

allowed:

doublemJy

Default:

0.01

psfmode

method of PSF calculation to use during minor cycles

allowed:

string

Default:

clark

weighting

weighting to apply to visibilities

allowed:

string

Default:

natural

robust

briggs robustness parameter

allowed:

double

Default:

0.0

uvtaper

apply additional uv tapering of visibilities.

allowed:

bool

Default:

False

outertaper

uv-taper on outer baselines in uv-plane

allowed:

stringArray

Default:

innertaper

uv-taper in center of uv-plane

allowed:

stringArray

Default:

1.0

noise

Jy

noise parameter for briggsabs mode weighting

allowed:

doubleJy

Default:

0.0

npixels

number of pixels for superuniform or briggs weighting

allowed:

int

Default:

0

stokes

Stokes params to image

allowed:

string

Default:

I

noise_thermal

add thermal noise

allowed:

bool

Default:

True

t_amb

ambient temperature

allowed:

double

Default:

265.

tau0

zenith opacity

allowed:

double

Default:

0.1

fidelity

Calculate fidelity images

allowed:

bool

Default:

True

display

Plot simulation result images,figures

allowed:

bool

Default:

True

verbose

allowed:

bool

Default:

False

Returns
void

Example

 
mosaic simulation task (prototype):  
 
    This task simulates interfermetric observations (currently  
    only ALMA can be done easily).  New functionality is actively  
    being added, so if you have changed versions of CASA, check  
    the inputs carefully.  
    Please contact CASA experts with any questions, especially  
    about features noted below as *experimental*  
    -------------------------------  
    Keyword arguments:  
    -------------------------------  
    -- Input Model:  
    modelimage -- name of an image to simulate (See below for explanation and examples!)  
    ignorecoord -- ignore whatever is in the image header for coordinates (see below)  
    inbright -- peak surface brightness to scale input image  
        in Jy/pixel.  
        [alpha alert] If you specify "unchanged" it will take the  
        numerical values in your image and assume they are in Jy/pixel,  
        even if it says some other unit in the header.  This will be made  
        more flexible in the future.  
    complist -- componentlist table to use to simulate the data.  
        * may be used with or without modelimage  
    antennalist -- ascii file containing antenna positions.  
        each row has x y z coordinates and antenna diameter;  
        header lines are required to specify the observatory name  
        and coordinate system e.g.  
          # observatory=ALMA  
          # coordsys=UTM  
          # datum=WGS84  
          # zone=19  
        * [alpha] standard arrays are found in your CASA data repository,  
          $CASAPATH/data/alma/simmos/  
        but for now you have to copy them to the current working dir.  
    checkinputs -- plot scaled model image and desired mosaic pointings,  
        target altitude, and [alpha] atmospheric transmission.  
        choose yes|no, or "only" to just check your inputs and stop without  
        creating the ms.  
    -------------------------------  
    -- Output Control:  
    project -- Name of project simulated; created ms and images will  
        start with this string  
    refdate -- Central time of simulated observation eg: ’2012/05/21/22:05:00’  
        [alpha] ** observations are centered at the nearest transit **  
    totaltime --- total time of observation e.g ’7200s’  
    integration --- Time interval for each integration e.g ’10s’  
    startfreq -- Frequency of first channel e.g ’89MHz’  
    chanwidth -- Channel width e.g ’10MHz’  
    nchan -- number of channels (can be 1 for a continuum simulation)  
    direction -- mosaic center direction e.g ’J2000 19h00m00 -40d00m00’  
        * can optionally be a list of pointings, which will override  
     pointingspacing.  Otherwise simdata will hexagonally  
     pack the input image with pointings.  When direction is a  
     list, the centroid of direction will be used as the center.  
    pointingspacing-- spacing in between beams e.g ’1arcsec’  
    relmargin -- how close pointing centers may approach the edge of the  
        output image, as a fraction of pointingspacing.  
     * ignored if direction is a list.  
    -------------------------------  
    -- Inversion and Deconvolution:  
    cell -- Cell size e.g ’10arcsec’  
        [alpha] can be set to "incell" to use that value.  
    imsize -- Image size in spatial pixels (x,y)  
     default = [250,250]; example: imsize=[500,500]  
    ** see "help clean" for more information on the new clean  
       parameters introduced in May 2008  
    niter -- Number of clean/deconvolution iterations, 0 for no cleaning  
    threshold -- Flux level to stop cleaning  
    psfmode -- minor cycle deconvolution algorithm  
     options: ’clark’,’hogbom’,’none’  
        ("none" forces niter to 0 and no imaging)  
    weighting -- Weighting to apply to visibilities  
     options: ’natural’,’uniform’,’briggs’,’briggsabs’,’radial’,’superuniform’  
    robust -- Brigg’s robustness parameter  
     options: -2.0 to 2.0; -2 (uniform)/+2 (natural)  
    uvtaper -- apply additional uv taper of visibilities  
    stokes -- Stokes parameters to image  
     default=’I’; example: stokes=’IQUV’;  
     options: ’I’,’IV’,’IQU’,’IQUV’  
    -------------------------------  
    -- Corrupting data:  
    noise_thermal -- add thermal noise  
        * [alpha] currently only knows about ALMA and (E)VLA receivers  
    t_amb -- ambient temperature in K = atmospheric temp  
    tau0 -- zenith opacity at observing frequency  
    -------------------------------  
    fidelity -- Calculate fidelity image  
    display -- Plot array config, uv coverage, beam, and images  
 
 
 
 
    -------------------------------  
    How to specify a model image:  
    -------------------------------  
    * simdata requires a CASA or fits image. If you merely have a grid of  
      numbers, you will need to write them out as fits or write a CASA script to  
      read them in and use the ia tool to create an image and insert the data.  
 
    * simdata does NOT require a coordinate system in the header. If the  
      coordinate information is incomplete, missing, or you would like to  
      override it, set "ignorecoord=False".  simdata will then assume that the  
      axes of your input correspond to RA, Dec, and (optionally) frequency and  
      (optionally) Stokes parameter.  It will assume that the spatial pixel  
      size equals the output parameter "cell", the center of the image is in  
      the (average of the) output parameter "direction", the spectral reference  
      frequency and starting frequency equal the output parameter "startfreq",  
      and the channel width equals the output parameter "chanwidth".  
 
    * [alpha alert] simdata does not easily change the number of channels yet.  
      It will warn you about this if you ask for a different number than the input  
      data cube.  
 
    * If you have a proper Coordinate System, simdata will so its best to  
      generate visibilities from that, and then create a synthesis image  
      according to the specified user parameters.  Again, regridding the  
      spectral dimension may not have complete flexibility yet.  
 
    * If you would like finer control of the input Coordinate System, you can  
      run simdata once with ’ignorecoord=True’ and ’checkinputs="only"’ (the  
      latter causes it to stop before doing the time-intensive visibility  
      calculations). Then begin simulating from the .coord image that gets created.  
 
    * You can manipulate the image header with the "imhead" task, or you can  
      delve deeper with the ia and cs tools.  If you use the tools, you should  
      be aware that a CoordinateSystem in CASA can exist independently of an  
      Image.  Once the CoordinateSystem is detached from the image, it is the  
      users responsibility to do any manipulation e.g. axis reordering on  
      both. Example:  
        ia.open("myimage_filename")  
        ia.summary() # see header as attached to the image  
        csys=ia.coordsys() # detach the CoordinateSystem  
        csys.summary() # examine it  
        csys.setreferencepixel([100,100])  
        arr=ia.getchunk() # get the data from the Image  
        ia.done()  
        csys.reorder([0,2,1])  # reorder the CoordinateSystem  
        arr=arr.reorder([0,2,1])  # reorder the data  
        ia.fromshape(outfile="mynewimage_file",shape=[32,32,256],csys=csys.torecord(),overwrite=True)  
            # make a new image, with the right shape and CoordinateSystem  
        ia.putchunk(arr)   # put the data into the new image.  
        csys.done()  
        ia.done()  
 
    -------------------------------  
    Output produced:  
    -------------------------------  
    $project.$modelimage.coord = input image recast into 4d image  
    $project.$modelimage.flat  = input image regridded to size, moment zero  
        image if the input was a cube.  
    $project.convolved = input image regridded to output size and  
        convolved with Gaussian synthesized beam for the observation  
    $project.ms = synthesized visibilities  
    $project.noisy.ms = visibilities with noise added  
      ** if noise is requested, then the noisy visibilities will be  
         used to create the synthsized image.  
    $project.clean.image = output cleaned synthesized image  
    $project.clean.psf = output synthesized beam  
      ** only one of dirty.image and clean.image will be created as output,  
         depending on whether niter=0 (invert to dirty) or niter>0 (clean)  
    $project.clean.image = output cleaned synthesized image moment zero if a cube  
    $project.diff.im = convolved input - output (2D)  
    $project.absdiff.im = max[ abs(diff) , 0.7*rms(diff) ]  
    $project.fidelity.im = convolved input / absdiff  
 

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.