Previous Up Next

Chapter 9  Simulation

New in 4.4:

Single dish imaging is accomplished in simalma and simobserve by calling the sdimaging task with standard imaging parameters in ALMA, i.e., with spheroidal gridding, the cell size of 1/9 of the FWHM of primary beam, and convolution support of 6 pixes.


The tasks available for simulating observations are:

The capability of simulating observations and data sets from the JVLA and ALMA are an important use-case for CASA. This not only allows one to get an idea of the capabilities of these instruments for doing science, but also provides benchmarks for the performance and utility of the software to process “realistic” data sets (with atmospheric and instrumental effects). Simulations can also be used to tune parameters of the data reduction and therefore help to optimize the process. CASA can calculate visibilities (create a measurement set) for any interferometric array, and calculate and apply calibration tables representing some of the most important corrupting effects. simobserve can also simulate total power observations, which can be combined with interferometric data in simanalyze (i.e. one would run simobserve twice, simanalyze once). The task simalma is a task to simulate an ALMA observation, including ALMA 12-m, ACA 7-m and total power arrays, and generate a combined image. simalma also attempts to provide useful feedback on those different observation components, to help the user better understand the observing considerations.

Inside the Toolkit:

The simulator methods are in the sm tool. Many of the other tools are also helpful when constructing and analyzing simulations.

CASA’s simulation capabilities continue to be improved with each CASA release. For the most current information, please refer to http://www.casaguides.nrao.edu, and click on “Simulating Observations in CASA”. Following general CASA practice, the greatest flexibility and richest functionality is at the Toolkit level. The most commonly used procedures for interferometric and single dish simulation are encapsulated in the simobserve task.

9.1  Simulating ALMA observations with simobserve and simanalyze

The simobserve inputs are (submenus expand slightly differently for thermalnoise=manual and single dish observing):


project             =      'sim'        #  root prefix for output file names
skymodel            =         ''        #  model image to observe
     inbright       =         ''        #  scale surface brightness of
                                        #  brightest pixel e.g. "1.2Jy/pixel"
     indirection    =         ''        #  set new direction
                                        #   e.g. "J2000 19h00m00 -40d00m00"
     incell         =         ''        #  set new cell/pixel size
                                        #   e.g. "0.1arcsec"
     incenter       =         ''        #  set new frequency of center
                                        #  channel e.g. "89GHz"
                                        #   (required even for 2D model)
     inwidth        =         ''        #  set new channel width
                                        #  e.g. "10MHz" (required even
                                        #   for 2D model)

complist            =         ''        #  componentlist to observe
     compwidth      =     '8GHz'        #  bandwidth of components

setpointings        =       True        
     integration    =      '10s'        #  integration (sampling) time
     direction      =         ''        #  "J2000 19h00m00 -40d00m00"
                                        #   or "" to center on model
     mapsize        =   ['', '']        #  angular size of map or ""
                                        #  to cover model
     maptype        =     'ALMA'        #  hexagonal, square (raster),
                                        #  ALMA, etc.
     pointingspacing =         ''       #  spacing in between
                                        #  pointings or "0.25PB" or ""
                                        #  for ALMA default
                                        #   INT=lambda/D/sqrt(3), SD=lambda/D/3

obsmode             =      'int'        #  observation mode to simulate
                                        #  [int(interferometer)|sd(singledish)|""(none)]
     antennalist    = 'alma.out10.cfg'  #  interferometer antenna position file
     refdate        = '2014/05/21'      #  date of observation - not
                                        #   critical unless concatenating
                                        #   simulations
     hourangle      =  'transit'        #  hour angle of observation
                                        #  center e.g. "-3:00:00", "5h", "-4.5" (a
                                        #   number without units will
                                        #   be interpreted as hours), or "transit"
     totaltime      =    '7200s'        #  total time of observation
                                        #   or number of repetitions
     caldirection   =         ''        #  pt source calibrator [experimental]
     calflux        =      '1Jy'        

thermalnoise        = 'tsys-atm'        #  add thermal noise: 
                                        #  [tsys-atm|tsys-manual|""]
     user_pwv       =        1.0        #  Precipitable Water Vapor in mm
     t_ground       =      269.0        #  ambient temperature
     seed           =      11111        #  random number seed

leakage             =        0.0        #  cross polarization (interferometer only)
graphics            =     'both'        #  display graphics at each
                                        #   stage to [screen|file|both|none]
verbose             =      False        
overwrite           =       True        #  overwrite files starting with $project

This task takes an input model image or list of components, plus a list of antennas (locations and sizes), and simulates a particular observation (specified by mosaic setup and observing cycles and times). The output is a measurement set suitable for further analysis in CASA.

The simanalyze inputs are:


project             =      'sim'        #  root prefix for output file names
image               =       True        #  (re)image $project.*.ms to $project.image
     vis            =  'default'        #  Measurement Set(s) to image
     modelimage     =         ''        #  lower resolution prior
                                        #  image to use in clean e.g. existing total
                                        #   power image
     imsize         =          0        #  output image size in pixels
                                        #   (x,y) or 0 to match model
     imdirection    =         ''        #  set output image direction,
                                        #   (otherwise center on the model)
     cell           =         ''        #  cell size with units or "" to equal model
     interactive    =      False        #  interactive clean?  (make
                                        #   sure to set niter>0 also)
     niter          =          0        #  maximum number of
                                        #  iterations (0 for dirty image)
     threshold      =   '0.1mJy'        #  flux level (+units) to stop cleaning
     weighting      =  'natural'        #  weighting to apply to
                                        #  visibilities briggs will use robust=0.5
     mask           =         []        #  Cleanbox(es), mask
                                        #  image(s), region(s), or a level
     outertaper     =         []        #  uv-taper on outer baselines in uv-plane
     stokes         =        'I'        #  Stokes params to image
     featherimage   =         ''        #  image (e.g. total power) to
                                        #  feather with new image

analyze             =       True        #  (only first 6 selected
                                        #   outputs will be displayed)
     showuv         =       True        #  display uv coverage
     showpsf        =       True        #  display synthesized (dirty)
                                        #  beam (ignored in single dish simulation)
     showmodel      =       True        #  display sky model at original resolution
     showconvolved  =      False        #  display sky model convolved with output beam
     showclean      =       True        #  display the synthesized image
     showresidual   =      False        #  display the clean residual
                                        #  image (ignored in single dish simulation)
     showdifference =       True        #  display difference between
                                        #  output cleaned image and input
                                        #   model sky image convolved
                                        #   with output clean beam
     showfidelity   =       True        #  display fidelity

graphics            =     'both'        #  display graphics at each
                                        #  stage to [screen|file|both|none]
verbose             =      False        
overwrite           =       True        #  overwrite files starting with $project

This task analyzes one or more measurement sets - interferometric and/or single dish. The output is a synthesized image created from those visibilities, a difference image between the synthesized image and your sky model convolved with the output synthesized beam, and a fidelity image. (see ALMA memo 398 for description of fidelity, which is approximately the output image divided by the difference between input and output)

9.2  Simulating ALMA observations with simalma

The task simalma simulates an ALMA observation by ALMA 12-m, ACA-7m and total power arrays. It takes an input model image or a list of components, plus configurations of ALMA antennas (locations and sizes), and simulates a particular ALMA observation (specified by mosaic setup and observing cycles and times). The outputs are measurement sets. The task optionally generates synthesized images from the measurement sets as simanalyze does.

Technically speaking, simalma internally calls simobserve and simanalyze as many times as necessary to simulate and analyze an ALMA observation. Some of the simulation (simobserve) and imaging (simanalyze) parameters are automatically set to values typical of ALMA observations in simalma (see § 9.2.1 for more details). Thus, it has a simpler task interface compared to simobserve plus simanalyze at the cost of limited flexibility. If you want to have more control on simulation setup, it is available by manually running simobserve and simanalyze multiple times or by using sm tools.

The simalma inputs are:


project             =         ''        #  root prefix for output file names
project             =      'sim'        #  root prefix for output file names
dryrun              =      False        #  dryrun=True will only
                                        #  produce the informative report, not run
                                        #   simobserve/analyze
skymodel            =         ''        #  model image to observe
     inbright       =         ''        #  scale surface brightness of
                                        #   brightest pixel e.g. "1.2Jy/pixel"
     indirection    =         ''        #  set new direction
                                        #   e.g. "J2000 19h00m00 -40d00m00"
     incell         =         ''        #  set new cell/pixel size e.g. "0.1arcsec"
     incenter       =         ''        #  set new frequency of center
                                        #  channel e.g. "89GHz" (required even
                                        #   for 2D model)
     inwidth        =         ''        #  set new channel width
                                        #  e.g. "10MHz" (required even for 2D model)

complist            =         ''        #  componentlist to observe
     compwidth      =     '8GHz'        #  bandwidth of components

setpointings        =       True        
     integration    =      '10s'        #  integration (sampling) time
     direction      =         ''        #  "J2000 19h00m00 -40d00m00"
                                        #   or "" to center on model
     mapsize        =   ['', '']        #  angular size of map or "" to cover model

graphics            =     'both'        #  display graphics at each
                                        #   stage to [screen|file|both|none]
verbose             =      False        
overwrite           =      False        #  overwrite files starting with $project

The task simalma is designed as a task that is invoked only once for a simulation setup. It always sets up skymodel and pointings. That means that simalma is not supposed to be run multiple times for a project, unlike simobserve and simanalyze. The task simalma may ignore or overwrite the old results when it is run more than once with the same project name.

There are options in simalma to simulate observation of ACA 7-m and total power arrays, to apply thermal noise, and/or to generate images from simulated measurement sets. One inputs a vector of configurations, and a corresponding vector of totaltimes to observe each component. Thermal noise is added to visibilities when pwv   >   0 . The ATM atmospheric model is constructed from the characteristics of the ALMA site and a user defined Precipitable Water Vapour (pwv) value. Set pwv   =   0 to omit the thermal noise. Finally, when image = True, synthesized images are generated from the simulated measurement sets.

9.2.1  Implementation details

As mentioned in the previous section, simalma automatically sets some of the simulation and imaging parameters to values typical of ALMA observations. The implementations of antenna configurations, pointings, integration time, and imaging in CASA 4.4.0 are described in this section.


Antenna Configuration:

The configurations of the ALMA 12-m and 7-m arrays are defined by the antennalist parameter, which can be a vector. Each element of the vector can be either the name of an antenna configuration file or a desired resolution, e.g., ‘alma;cycle1;5arcsec’. Some examples:

Total power can either be included along with interferometric configurations e.g. antennalist = [’alma.cycle1.2.cfg’,’aca.cycle2.i.cfg’,’alma.tp.cfg’], or by using the tpnant and tptime parameters. The latter is preferred since it allows greater control (in particular the number of total power antennas to use – if more than one is used, multiple total power observations will be generated and combined in imaging).


Field Setup:

There are two ways to setup pointings, i.e., Rectangle Setup and Multi-Pointing.

In the Rectangle Setups, pointings are automatically calculated from the pointing centre (direction) and the map size. A rectangular map region is covered by a hexagonal grid (maptype = ‘alma’) with Nyquist sampling, i.e., 0.48  PB spacing (where PB   ≡   1.2   λ / D ), in both ALMA 12-m and ACA 7-m array simulations. A slightly larger area is mapped in ACA total power simulations for later combination with interferometer visibilities. The map area is extended by 1   PB in each direction and covered by a lattice grid with 0.225  PB spacing.

In Multi-Pointing, a list of pointings is defined in the direction parameter or read from a file (when setpointings = False; note that simobserve can read ALMA OT pointing files in the old and new format but the latter only when they are saved as sexagesimal absolute positions). The ALMA 12-m and ACA 7-m arrays observe the specified directions. The ACA total power simulations map either (1) square regions of PB extent centred at each of the pointings, or (2) a rectangle region that covers all the pointings. Either (1) or (2), whichever can be done with the smaller number of points, is selected. The pointing spacing in total power simulations is, again, 0.225  PB in lattice grids.

It is advisable that for Total Power Simulations, the field is chosen sufficiently large, maybe padding at least 1-2 primary beams on each side.


Integration time:

The total observation time of each component or configuration is defined by the totaltime parameter as noted above. A scalar will trigger use of the Cycle 2 default time multipliers, 1:0.5:2:4 for the first 12-m configuration, any additional 12-m configurations, any 7-m configuration, and any total power observation.

In general, the integration time (dump interval) of simulations is defined by the integration parameter with an exception. Since the ACA total power array always observes larger areas compared to the ALMA 12-m and ACA 7-m arrays, it is possible that the ACA total power array cannot cover all pointings in the given observation time. In such a case, the integration time in the total power simulation is scaled so that the all pointings are observed at least once in its observation time, i.e., integration_TP   =   tptime   /   ( the number of total power pointings ) .


Imaging and combination of ALMA with ACA:

The CLEAN algorithm is used in simalma to generate images from visibilities. The visibilities are weighted to UV-plane using Briggs weighting.

When ACA observations are simulated, visibilities of ACA 7-m are weighted by the relative sensitivities to ALMA 12-m visibilities, and both data sets are concatenated before imaging. The relative weight of ACA 7-m visibilities is defined in proportion to the difference of beam area, i.e., (7/12)2   =   0.34 . This is because simalma uses a bandwidth and an integration time common to both ALMA 12-m and ACA 7-m simulations.

The interferometer and total power images are combined using feather task when total power observations are included. The total power image is scaled by the interferometer primary beam coverage before combination. The final image product is the combined image corrected for the interferometer primary beam coverage. The output image of the feather task is divided by the interferometer primary beam coverage in the final step.


Previous Up Next