Simulating Observations in CASA 3.3: Difference between revisions

From CASA Guides
Jump to navigationJump to search
(17 intermediate revisions by 2 users not shown)
Line 11: Line 11:
''Note that <tt>sim_observe</tt> and <tt>sim_analyze</tt> are new tasks in CASA 3.3.  In earlier versions of CASA the functionality of both tasks was contained in a single task called <tt>simdata</tt>.  <tt>simdata</tt> is still available in CASA 3.3 but is deprecated and may be removed in a future CASA release.''   
''Note that <tt>sim_observe</tt> and <tt>sim_analyze</tt> are new tasks in CASA 3.3.  In earlier versions of CASA the functionality of both tasks was contained in a single task called <tt>simdata</tt>.  <tt>simdata</tt> is still available in CASA 3.3 but is deprecated and may be removed in a future CASA release.''   


CASA simulation uses the [http://www.mrao.cam.ac.uk/~bn204/alma/atmomodel.html aatm] atmospheric model, a thin wrapper of Juan Pardo's [http://damir.iem.csic.es/PARDO/class_atm.html ATM] library, to accurately calculate all atmospheric corruption terms (noise, phase delay) accurately as a function of frequency and site characteristics.
CASA simulation uses the [http://www.mrao.cam.ac.uk/~bn204/alma/atmomodel.html aatm] atmospheric model, a thin wrapper of Juan Pardo's [http://cab.inta-csic.es/users/jrpardo/class_atm.html ATM] library, to accurately calculate all atmospheric corruption terms (noise, phase delay) accurately as a function of frequency and site characteristics.


Part of CASA's simulation routines are generic ephemeris and geodesy calculations available in Python: see [[simutil.py]].
Part of CASA's simulation routines are generic ephemeris and geodesy calculations available in Python: see [[simutil.py]].
Line 34: Line 34:
== Simulating ALMA Observations ==
== Simulating ALMA Observations ==


We will update <tt>simdata</tt> as ALMA commissioning proceeds. During this period, we expect the noise properties of the telescope to be increasingly better characterized, and its configurations to be refined. Updates will be placed below, under "ALMA updates", along with an estimate of which version of CASA they will be applied to. Updated configuration files will also be placed here, until they can be incorporated in the next CASA release.  
We will update CASA's simulation tasks and tools as ALMA commissioning proceeds. During this period, we expect the noise properties of the telescope to be increasingly better characterized, and its configurations to be refined. Updates will be placed below, under "ALMA updates", along with an estimate of which version of CASA they will be applied to. Updated configuration files will also be placed here, until they can be incorporated in the next CASA release.  


Users should also be aware of the Observation Support Tool (OST) [http://almaost.jb.man.ac.uk/ ]. This is a web-based interface to an ALMA simulator hosted by the University of Manchester, UK. Like the <tt>sim_observe</tt>, it is based on the CASA <tt>sm</tt> toolkit, but uses different wrapper scripts, and, in particular, has a different treatment of atmospheric effects. Comparisons to the [https://almascience.nrao.edu/call-for-proposals/sensitivity-calculator ALMA sensitivity calculator] made in March 2011 suggest that both <tt>sim_observe</tt> and the OST give similar noises for observations in bands 3-8, but the OST diverges in bands 9 and 10. <font color="red"> In general, however, because the ALMA sensitivity calculator will be used for the technical assessment of ALMA proposals, only values from it, not <tt>sim_observe</tt> or the OST, should be used to estimate exposure times for ALMA Science Goals.</font>


Users should also be aware of the Observation Support Tool (OST) [http://almaost.jb.man.ac.uk/ ]. This is a web-based interface to an ALMA simulator hosted by the University of Manchester, UK. Like <tt>simdata</tt>, it is based on the CASA <tt>sm</tt> toolkit, but uses different wrapper scripts, and, in particular, has a different treatment of atmospheric effects. Comparisons to the [https://almascience.nrao.edu/call-for-proposals/sensitivity-calculator ALMA sensitivity calculator] made in March 2011 suggest that both <tt>simdata</tt> and the OST give similar noises for observations in bands 3-8, but the OST diverges in bands 9 and 10. <font color="red"> In general, however, because the ALMA sensitivity calculator will be used for the technical assessment of ALMA proposals, only values from it, not <tt>simdata</tt> or the OST, should be used to estimate exposure times for ALMA Science Goals.</font>
=== ALMA updates ===


No updates currently for CASA 3.3.


'''ALMA updates'''
== Tutorials, Recipes, and Example images ==


CASA 3.2 is currently up-to-date!
{| style="width: 100%; valign: top; background-color:#E0FFFF; border:1px solid #3366FF; text-align: center; cellpadding=0"


== Tutorials, Recipes, and Example images ==
! [[Simulation Guide for New Users (CASA 3.3)]]
| rowspan=2 style="border-bottom:1px solid black;" | [[File:30Dor_ES.png|100px]]
|-
| style="border-bottom:1px solid black;" | A fully annotated tutorial that uses a Spitzer SAGE 8 micron continuum image of 30 Doradus and scales it to greater distance.
|-


{| style="width: 100%; valign: top; background-color:#E0FFFF; border:1px solid #3366FF; " cellpadding=0
! [[M51 at z = 0.1 and z = 0.3 (CASA 3.3)]]
| New User's Guide to Simulated ALMA Observations:  fully annotated tutorial<br>
| rowspan=2; style="border-bottom:1px solid black;" | [[File:M51thumb.png|100px]]
This uses a Spitzer SAGE 8 micron continuum image of 30 Doradus and scales it to greater distance.
| rowspan=2; style="border-bottom:1px solid black;" | [[File:30Dor_ES.png|100px]]
|-
|-
!style="border-bottom:1px solid black;"| [[Simdata New Users Guide| simdata recipe page]]
| style="border-bottom:1px solid black;" | A fully annotated tutorial that uses a BIMA-SONG cube of a nearby galaxy and scales it to greater distance.
|-
|-


| Simulated ALMA Observation of M51 at z = 0.1 and z = 0.3:  fully annotated tutorial<br>
! [[Simulation Guide Component Lists (CASA 3.3)]]
This uses a BIMA-SONG cube of a nearby galaxy and scales it to greater distance.
| rowspan=2; style="border-bottom:1px solid black;" | [[File:Analyze_fits_list.jpg|100px]]
| rowspan=3; style="border-bottom:1px solid black;" | [[File:M51thumb.png|100px]]
|-
!style="solid black;"| &nbsp;&nbsp; [[M51 at z = 0.1 and z = 0.3|simdata recipe page]]
|-
|-
!style="border-bottom:1px solid black;"| NOTE: how to run the simulation faster by increasing the [[etime study|exposure time]]
| style="border-bottom:1px solid black;" | Tutorial for simulating data based on multiple sources (using both a FITS image and a component list).
|-
|-


 
! [[PPdisk simdata (CASA 3.3)]]
| Protoplanetary Disk: sky model and lightly annotated script<br>
This uses a theoretical model of dust continuum from Sebastian Wolff, scaled to the distance of a nearby star.  
| rowspan=2; stype="border-bottom:1px solid black;" | [[File:Psimthumb.png|100px]]
| rowspan=2; stype="border-bottom:1px solid black;" | [[File:Psimthumb.png|100px]]
|-
|-
!style="border-bottom:1px solid black;" | [[PPdisk simdata| simdata recipe page]]
| style="border-bottom:1px solid black;" | A sky model with a lightly annotated script that simulates a protoplanetary disk.  Uses a theoretical model of dust continuum from Sebastian Wolff, scaled to the distance of a nearby star.
|-
|-


| Nearby edge-on spiral galaxy: sky model, script, and discussion<br>
! [[N891 simdata (CASA 3.3)]]
This uses a Galactic CO cube from the Galactic Ring Survey and places
it at 10Mpc, similar to what NGC891 would look like if it were observable from the southern hemisphere.
| rowspan=2; style="border-bottom:1px solid black;" | [[File:N891thumb.png|100px]]
| rowspan=2; style="border-bottom:1px solid black;" | [[File:N891thumb.png|100px]]
|-
|-
!style="border-bottom:1px solid black;"| [[N891 simdata2| simdata recipe page]]
| style="border-bottom:1px solid black;" | A sky model, script, and discussion that simulates a nearby edge-on spiral galaxy. Uses a galactic CO cube from the Galactic Ring Survey and places it at 10Mpc. The data are similar to what NGC891 would look like if it were observable from the southern hemisphere.
|-
|-


| The face of Einstein: sky model and lightly annotated script<br>
! [[Einstein-Face (CASA 3.3)]]
An example of using a non-science image to demonstrate the effects of spatial filtering by ALMA.  
| rowspan=2; style="border-bottom:1px solid black;" | [[File:einstein_fs_cfg8_1hr.gif|100px]]
| rowspan=2; stype="border-bottom:1px solid black;" | [[File:einstein_fs_cfg8_1hr.gif|100px]]
|-
|-
!style="border-bottom:1px solid black;" | [[Einstein-Face | simdata recipe page]]
| style="border-bottom:1px solid black;" | A sky model and lightly annotated script that simulates the face of Einstein as seen by ALMA.  Uses a non-science image to demonstrate the effects of spatial filtering by ALMA.
|-
|-


 
! [[ACA Simulation]]
| rowspan=2; style="border-bottom:1px solid black;" | [[File:M51c.ALMA 0.5arcsec.skymodel.png|100px]]
|-
| style="border-bottom:1px solid black;" | A tutorial for simulating ALMA observations that use multiple configurations or use the
12-meter array in combination with the ALMA Compact Array.
|-


| colspan=2; style="border-bottom:1px solid black;" | [[Sim Inputs | Other example input images]]
| colspan=2; style="border-bottom:1px solid black;" | [[Sim Inputs | Other example input images]]
Line 94: Line 95:
|}
|}


== Technical and Planning ==


<br>
We welcome input on developing the CASA simulator.  Contact "rindebet at nrao.edu" if you would like to volunteer your input.
 
{{Checked 3.3.0}}
== Technical and Planning ==
We welcome input on developing the CASA simulator.  The following links are meetings, technical documents, and planning discussions.  Much of it won't make sense to a new user of CASA::simdata, but may be of interest to those wanting to delve deeper.  Contact "rindebet at nrao.edu" if you would like to volunteer your input.
* [http://almasimulations.pbworks.com/ Simulation Library] This will become a library of use cases and examples illustrating different science and observation setups.  It is in early stages as of Jan 2010, and we're actively seeking volunteers to turn their simulation projects into use cases.
* [https://safe.nrao.edu/wiki/bin/view/ALMA/Jan2010Wkshop Jan 2010 workshop] Including slides and discussion of how simdata and Simulator work "under the hood" and plans for development

Revision as of 14:45, 14 March 2014


This guide is applicable to CASA version 3.3.

Introduction

Simulation capability in CASA follows the usual two-layered structure: there is a beginner-level Python task interface called sim_observe, which calls methods in the sm C++ tool. The task interface turns a model of the sky (2 to 4 dimensions including frequency and Stokes) into the visibilities that would be measured with ALMA, (E)VLA, CARMA, SMA, ATCA, PdB, etc. sim_observe can also add thermal noise (from receiver, atmosphere, and ground) to the visibilities. The task sim_analyze will then produce a cleaned image of the model visibilities, compare that image with your input convolved with the synthesized beam, and calculate a fidelity image.

For more advanced users, the sm tool has methods that can be used to add phase delay variations, gain fluctuations and drift, cross-polarization, and (coming soon) bandpass and pointing errors to your simulated data. sm also has more flexibility in adding thermal noise than sim_observe.

Note that sim_observe and sim_analyze are new tasks in CASA 3.3. In earlier versions of CASA the functionality of both tasks was contained in a single task called simdata. simdata is still available in CASA 3.3 but is deprecated and may be removed in a future CASA release.

CASA simulation uses the aatm atmospheric model, a thin wrapper of Juan Pardo's ATM library, to accurately calculate all atmospheric corruption terms (noise, phase delay) accurately as a function of frequency and site characteristics.

Part of CASA's simulation routines are generic ephemeris and geodesy calculations available in Python: see simutil.py.

Note on cleaning: just as is the case for real images, cleaning images produced by sim_observe can lead to a spurious decrease in object fluxes and noise on the image ("clean bias"). This is particularly true for observations with poor coverage of the uv-plane, i.e. using telescopes with small numbers of antennas, such as the ALMA Early Science configurations, and/or in short "snapshot" observations. Users should always clean images with care, using a small number of iterations and/or a conservative (3-5sigma) threshold, and boxing bright sources.

Steps to simulation

If you have not already installed CASA, follow these steps: Install CASA.

sim_observe and sim_analyze can be broken down into "subtasks" that are modular, i.e. as long as you follow a few conventions about filenames, you can run each bit independently and optionally. For example, using sim_observe, you can modify the sky model, then predict ACA visibilities, then run again and predict ATCA 12m visibilities. With sim_analyze you can image and analyze both the ACA and ATCA measurement sets together. You can run interactive clean yourself, and, minding your filenames, you can run sim_analyze just to calculate a difference image and analyze the results.

The major steps involved in simulating data with CASA are:

  1. Modify Model - relabel (scale) the spectral and spatial coordinates and brightness of the sky model image.
  2. Set Pointings - calculate a mosaic of pointings and save in a text file. You could also make the text file yourself.
  3. Predict - Calculate visibilities for a specified array on a specified day.
  4. Corrupt - Corrupt the measurement set with thermal noise, phase noise, cross-polarization, etc.
  5. Image - Image the visibility data with clean.
  6. Analyze - Calculate and display the difference between output and input, and fidelity image.

Simulating ALMA Observations

We will update CASA's simulation tasks and tools as ALMA commissioning proceeds. During this period, we expect the noise properties of the telescope to be increasingly better characterized, and its configurations to be refined. Updates will be placed below, under "ALMA updates", along with an estimate of which version of CASA they will be applied to. Updated configuration files will also be placed here, until they can be incorporated in the next CASA release.

Users should also be aware of the Observation Support Tool (OST) [1]. This is a web-based interface to an ALMA simulator hosted by the University of Manchester, UK. Like the sim_observe, it is based on the CASA sm toolkit, but uses different wrapper scripts, and, in particular, has a different treatment of atmospheric effects. Comparisons to the ALMA sensitivity calculator made in March 2011 suggest that both sim_observe and the OST give similar noises for observations in bands 3-8, but the OST diverges in bands 9 and 10. In general, however, because the ALMA sensitivity calculator will be used for the technical assessment of ALMA proposals, only values from it, not sim_observe or the OST, should be used to estimate exposure times for ALMA Science Goals.

ALMA updates

No updates currently for CASA 3.3.

Tutorials, Recipes, and Example images

Simulation Guide for New Users (CASA 3.3) 30Dor ES.png
A fully annotated tutorial that uses a Spitzer SAGE 8 micron continuum image of 30 Doradus and scales it to greater distance.
M51 at z = 0.1 and z = 0.3 (CASA 3.3) M51thumb.png
A fully annotated tutorial that uses a BIMA-SONG cube of a nearby galaxy and scales it to greater distance.
Simulation Guide Component Lists (CASA 3.3) Analyze fits list.jpg
Tutorial for simulating data based on multiple sources (using both a FITS image and a component list).
PPdisk simdata (CASA 3.3) Psimthumb.png
A sky model with a lightly annotated script that simulates a protoplanetary disk. Uses a theoretical model of dust continuum from Sebastian Wolff, scaled to the distance of a nearby star.
N891 simdata (CASA 3.3) N891thumb.png
A sky model, script, and discussion that simulates a nearby edge-on spiral galaxy. Uses a galactic CO cube from the Galactic Ring Survey and places it at 10Mpc. The data are similar to what NGC891 would look like if it were observable from the southern hemisphere.
Einstein-Face (CASA 3.3) Einstein fs cfg8 1hr.gif
A sky model and lightly annotated script that simulates the face of Einstein as seen by ALMA. Uses a non-science image to demonstrate the effects of spatial filtering by ALMA.
ACA Simulation M51c.ALMA 0.5arcsec.skymodel.png
A tutorial for simulating ALMA observations that use multiple configurations or use the

12-meter array in combination with the ALMA Compact Array.

Other example input images
Other example output simulations (scripts to reproduce these are coming)

Technical and Planning

We welcome input on developing the CASA simulator. Contact "rindebet at nrao.edu" if you would like to volunteer your input.

Last checked on CASA Version 3.3.0.