Simdata CASA 3.2: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Akimball (talk | contribs)
Created page with "mosaic simulation task: mosaic simulation task: This task simulates interferometric observations (currently only ALMA can be done easily). New functionality is actively..."
 
Jott (talk | contribs)
Replaced content with "{{simdata}}"
 
Line 1: Line 1:
mosaic simulation task:
{{simdata}}
mosaic simulation task:
 
    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.
    -------------------------------
    modifymodel -- change the coordinate system of the model sky image?
      * if graphics selected, display the rescaled model image
    skymodel -- if modifymodel=False, use this as the sky model.
      * if modifyimage=True, use this as the starting point, modify it
        write the output to a different image (default $project.skymodel)
        and use that new image as the sky model
    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.
    -------------------------------
    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 repeat each pointing several times before moving to the
        next point.
    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 or linear
    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.
    -------------------------------
    predict -- 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
        modifymodel=False, and set 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 -- central time of simulated observation eg: '2012/05/21/22:05:00'
      * NOTE: observations are currently centered at the nearest transit *
    totaltime --- total time of observation e.g '7200s'
    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
    -------------------------------
    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
      ** use $project.noisy.ms if you have corrupted the 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)
    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.
      * it is recommended to have graphics turned on for this subtask
    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) )
 
 
 
 
    -------------------------------
    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 "modifymodel=True".  simdata will then 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)
    -------------------------------
    project.skymodel = 4d input sky model image (optionally) scaled
    project.skymodel.flat.regrid.conv = input sky regridded to match the output
        image, and convolved with the output synthesized beam
    project.skymodel.png = diagnostic figure of sky model with pointings
 
    project.ptg.txt = list of mosaic pointings
    project.quick.psf = psf calculated from uv coverage
    project.ms = noise-free measurement set
    project.noisy.ms = corrupted measurement set
    project.predict.png = diagnostic figure of uv coverage and visibilities
 
    project.image = synthesized image
    project.flux.pbcoverage = promary beam correction for mosaic image
    project.residual = residual image after cleaning
    project.clean.last = parameter file of what parameters were used in the
        clean task
    project.psf = synthesized beam calculated from weighted uv distribution
    project.image.png = diagnostic figure of clean image and residual
 
    project.fidelity = fidelity image
    project.analysis.png = diagnostic figure of difference and fidelity
 
    project.simdata.last = saved input parameters for simdata task

Latest revision as of 20:33, 18 May 2015