Difference between revisions of "Old Simdata"

From CASA Guides
Jump to navigationJump to search
(Created page with '<pre> Help on simdata task: mosaic simulation task: mosaic simulation task (prototype): This task simulates interfermetric observations (currently only ALMA can b…')
m (moved Simdata to Old Simdata: deprecated in CASA 3.1)
(No difference)

Revision as of 10:52, 1 December 2010

Help on simdata task:

mosaic simulation task:
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, 
    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_sky -- atmospheric temperature in K 
    t_ground -- ground/spillover temperature in K 
    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.summary() # see header as attached to the image
        csys=ia.coordsys() # detach the CoordinateSystem
        csys.summary() # examine it
        arr=ia.getchunk() # get the data from the Image
        csys.reorder([0,2,1])  # reorder the CoordinateSystem
        arr=arr.reorder([0,2,1])  # reorder the data         
            # make a new image, with the right shape and CoordinateSystem
        ia.putchunk(arr)   # put the data into the new image.

    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