Simdata CASA 3.4: Difference between revisions

From CASA Guides
Jump to navigationJump to search
No edit summary
(Replaced content with "{{simdata}}")
 
Line 1: Line 1:
mosaic simulation task:
{{simdata}}
 
    This task simulates interferometric 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*
    -------------------------------
    project -- root filename for all output files.
    -------------------------------
    skymodel -- image model of the sky,
        with optional parameters that can be overriden
    inbright -- peak brightness in Jy/pixel, or "" for unchanged
      * NOTE: "unchanged" 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.
    indirection -- central direction, or "" for unchanged
    incell -- spatial pixel size, or "" for unchanged
    incenter -- frequency of center channel e.g. "89GHz", or "" for unchanged
    inwidth -- width of channels, or "" for unchanged - this should be a
        string representing a quantity with units e.g. "10MHz"
      * NOTE: only works reliably with frequencies, not velocities
      * NOTE: it is not possible to change the number of spectral planes
        of the sky model, only to relabel them with different frequencies
        That kind of regridding can be accomplished with the CASA toolkit.
    -------------------------------
    complist -- component list model of the sky, added to or instead of skymodel
    compwidth -- bandwidth of components; if simulating from components only,
        this defines the bandwidth of the MS and output images
    -------------------------------
    setpointings -- calculate a map of pointings, or if false, provide ptgfile
      * if graphics selected, display the pointings shown on the model image
    ptgfile -- a text file specifying directions in the same
        format as the example, and optional integration times, e.g.
        #Epoch    RA          DEC      TIME(optional)
        J2000 23h59m28.10 -019d52m12.35 10.0
      * if the time column is not present in the file, it will use
        "integration" for all pointings.
      * NOTE: at this time the file should contain only science pointings:
        simdata will observe these, then optionally the calibrator,
        then the list of science pointings again, etc, until totaltime
        is used up.
    integration --- Time interval for each integration e.g '10s'
      * NOTE: to simulate a "scan" longer than one integration, use
        setpointings to generate a pointing file, and then edit the
        file to increase the time at each point to be larger than
        the parameter integration time.
    direction -- mosaic center direction e.g 'J2000 19h00m00 -40d00m00'
      * can optionally be a list of pointings
      * otherwise simdata will pack mapsize according to maptype
    mapsize -- angular size of map
      * set to "" to span the model image
    maptype -- hexagonal, linear, or ALMA for the same hex algorithm as the
        ALMA OT
    pointingspacing -- spacing in between beams e.g '1arcsec'
        or "0.25PB" to use 1/4 of the primary beam FWHM, or
        "" will use the primary beam HWHM.
    -------------------------------
    observe -- calculate visibilities from skymodel (which may have been
        modified above, (optionally) complist, and $ptgfile (which
        may have been generated above)
      * if graphics selected, display the array (like plotants), the uv
        coverage, the synthesized (dirty) beam, and ephemeris information
      * if simulating from component list only, you should specify
        compwidth, the desired bandwidth -
        there is not currently a way to specify the spectrum of a component,
        so simulations from a componentlist only will be continuum (1 chan)
    refdate -- date of simulated observation eg: '2012/05/21'
    hourangle -- hour angle of observation e.g. '-3h'
    totaltime --- total time of observation e.g '7200s' or if an number without
        units, interpreted as the number of times to repeat the map
    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
      * standard arrays are found in your CASA data repository,
        os.getenv("CASAPATH").split()[0]+"/data/alma/simmos/"
      * if "", will not not produce an interferometric MS
      * a string of the form "alma;0.5arcsec" will be parsed into a full 12m ALMA
        configuration.  This only works for full ALMA and may fail to find the
        standard configuration files on some systems - see casaguides.nrao.edu
    caldirection -- *NEW* an unresolved calibrator can be observed
        interleaved with the science pointings.  This feature is
        experimental, so please contact us with any questions.
      * The calibrator is implemented as a point source clean component
        with this direction and flux=calflux
    sdantlist -- antenna position file with antennas to be used for
        single dish or total power simulation
      * if "", will not produce a total power MS
    sdant -- the index of the antenna in the list to use for total
        power.  defaults to the first antenna on the list.
    -------------------------------
    thermalnoise -- add thermal noise
      * this parameter takes two possible values:
      - tsys-atm: J. Pardo's ATM library will be used to construct an
          atmospheric profile for the ALMA site:
          altitude 5000m, ground pressure 650mbar, relhum=20%,
          a water layer of user_pwv at altitude of 2km,
          the sky brightness temperature returned by ATM,
          and internally tabulated receiver temperatures
      - tsys-manual: instead of using the ATM model, specify the zenith
          sky brightness and opacity manually.  Noise is added and then
          the visibility flux scale is referenced above the atmosphere.
      * In either mode, noise is calculated using an antenna spillover
          efficiency of 0.96, taper of 0.86,
          surface accuracy of 25 and 300 microns for ALMA and EVLA
          respectively (using the Ruze formula for surface efficiency),
          correlator efficiencies of 0.95 and 0.91 for ALMA and EVLA,
          receiver temperatures for ALMA of
              17, 30, 37, 51, 65, 83,147,196,175,230 K interpolated between
              35, 75,110,145,185,230,345,409,675,867 GHz,
          for EVLA of
              500, 70,  60,  55,  100, 130, 350 K interpolated between
              0.33,1.47,4.89,8.44,22.5,33.5,43.3 GHz,
          for SMA of
              67,  116, 134, 500 K interpolated between
              212.,310.,383.,660. GHz
      * These are only approximate numbers and do not take into account
        performance at edges of receiver bands, neither are they guaranteed
        to reflect the most recent measurements.  Caveat emptor and use the
        sm tool to add noise if you want more precise control.
    t_ground -- ground/spillover temperature in K
    user_pwv -- precipitable water vapor if constructing an atmospheric model
    t_sky -- atmospheric temperature in K [for tsys-manual]
    tau0 -- zenith opacity at observing frequency [for tsys-manual]
      * see casaguides.nrao.edu for more information on noise,
        in particular how to add a phase screen using the toolkit
    seed -- random number seed for noise generation
    -------------------------------
    leakage -- add cross polarization corruption of this fractional magnitude
    -------------------------------
    image -- invert and deconvolve the measurement set(s)
      * NOTE: interactive clean or more parameters than the subset visible
        here are available by simply running the clean task directly,
        then returning to simdata to run "analyze" if desired.
      * NOTE: the channelization of the output image cube will be the
        same as that in the simulated Measurement Set.
      * if graphics selected, display the clean image and residual image
      * uses Cotton-Schwab clean for single fields and Mosaic gridding
        for multiple fields (with Clark PSF calculation in minor cycles).
    vis -- the simulated interferometric MS, or total-power one, or both
      * NOTE: vis='default' will automatically set proper MS name(s) ONLY
        when either observing or applying any noise in the same run.
      * you can use '$project' to let the task automatically replace it to
        the project name, e.g., vis='$project.noisy.ms,$project.nosisy.sd.ms'.
    modelimage -- prior (e.g. SD) image to be used in clean
    cell -- cell size e.g '10arcsec'.  "" defaults to the skymodel cell
    imsize -- image size in spatial pixels (x,y)
      0 or -1 will use the model image size; example: imsize=[500,500]
    niter -- mumber of clean/deconvolution iterations, 0 for no cleaning
    threshold -- flux level to stop cleaning
    weighting -- weighting to apply to visibilities
      options: 'natural','uniform','briggs' (robust=0.5)
    mask -- Specification of cleanbox(es), mask image(s), primary beam
      coverage level, and/or region(s) to be used for CLEANing.
      CLEAN tends to perform better, and is less likely to diverge, if
      the CLEAN component placement is limited by a mask to where real
      emission is expected to be.  e.g. pixel ranges mask=[110,110,150,145],
      filename of mask image mask='myimage.mask', or a file with mask
      regions --  see help for the clean task.
    outertaper -- apply additional uv outer taper of visibilities
    stokes -- Stokes parameters to image; 'I','IV','IQU','IQUV'
    -------------------------------
    analyze -- compute and display difference between model and output,
        fidelity, etc.
    showarray -- like plotants (ignored in single dish simulation)
    showuv -- display uv coverage
    showpsf -- display synthesized (dirty) beam (ignored in single dish simulation)
    showmodel -- display sky model at original resolution
    showconvolved -- display sky model convolved with output beam
    showclean -- display the synthesized image
    showresidual -- display the clean residual image (ignored in single dish simulation)
    showdifference -- display difference between output cleaned image and
        input model sky image convolved with output synthesized beam
    showfidelity -- display fidelity image
        fidelity = input/max( abs(input-output), 0.7*rms(output) )
 
    graphics -- view plots on the screen, saved to file, both, or neither
    verbose -- print extra information to the logger and terminal
    overwrite -- overwrite existing files in the project subdirectory
 
    Note that the RMS is calculated in the lower quarter of the image.
        This is likely not the best choice, so you are encouraged to
        measure RMS yourself in an off-source region using the viewer.
 
 
    -------------------------------
    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 the appropriate "in" paremeters.
      In the absence of other information, simdata will assume that the axes of
      your input correspond to RA, Dec, and (optionally) frequency and
      (optionally) Stokes parameter.
 
    * 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.  Regridding the
      spectral dimension may not have complete flexibility yet.
 
    * You can manipulate an 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: (not all will always exist, depending on input parameters)
    To support different runs with different arrays, the names have the
    configuration name from antennalist appended.
    -------------------------------
 
    project.[cfg].skymodel = 4d input sky model image (optionally) scaled
    project.[cfg].skymodel.flat.regrid.conv = input sky regridded to match the
        output image, and convolved with the output synthesized beam
    project.[cfg].skymodel.png = diagnostic figure of sky model with pointings
 
    project.[cfg].ptg.txt = list of mosaic pointings
    project.[cfg].quick.psf = psf calculated from uv coverage
    project.[cfg].ms = noise-free measurement set
    project.[cfg].noisy.ms = corrupted measurement set
    project.[cfg].observe.png = diagnostic figure of uv coverage and
        visibilities
 
    project.[cfg].image = synthesized image
    project.[cfg].flux.pbcoverage = promary beam correction for mosaic image
    project.[cfg].residual = residual image after cleaning
    project.[cfg].clean.last = parameter file of what parameters were used in
          the clean task
    project.[cfg].psf = synthesized beam calculated from weighted uv
          distribution
    project.[cfg].image.png = diagnostic figure of clean image and residual
 
    project.[cfg].fidelity = fidelity image
    project.[cfg].analysis.png = diagnostic figure of difference and fidelity
 
    project.[cfg].simdata.last = saved input parameters for simdata task

Latest revision as of 16:34, 18 May 2015