Simulation capability in CASA follows the usual two-layered structure: there is a beginner-level python <tt>task</tt> interface called [[simdata]], which calls methods in the <tt>sm</tt> C++ <tt>tool</tt>. 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. The task also can produce a cleaned image of the model visibilities, compare that image with your input convolved with the synthesized beam, and calculate a fidelity image. <tt>simdata</tt> can add thermal noise (from receiver, atmosphere, and ground) to the visibilities.

Simulation capability in CASA follows the usual two-layered structure: there is a beginner-level python <tt>task</tt> interface called [[simdata]], which calls methods in the <tt>sm</tt> C++ <tt>tool</tt>. 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. The task also can produce a cleaned image of the model visibilities, compare that image with your input convolved with the synthesized beam, and calculate a fidelity image. <tt>simdata</tt> can add thermal noise (from receiver, atmosphere, and ground) to the visibilities.

Line 16:

Line 18:

== Steps to simulation ==

== Steps to simulation ==

+

+

<font color="red">If you have CASA 3.0.2 and simdata2, you should use simdata2</font>. It's better and better supported.

{| style="width: 100%; valign: top; " cellpadding=10

{| style="width: 100%; valign: top; " cellpadding=10

Line 32:

Line 36:

2. [[Input Model]] - Preparing a patch of sky for [[simdata]] to pseudoobserve.<br>

2. [[Input Model]] - Preparing a patch of sky for [[simdata]] to pseudoobserve.<br>

[[simdata2]] inputs look like this (v3.0.2; click to enlarge): [[File:Simdata2.png|100px]]

+

[[simdata2]] inputs look like this (v3.0.2; click to enlarge): [[file:Simdata2.png|100px]]

The subtasks are modular i.e. as long as you follow a few conventions about filenames, you can run each

The subtasks are modular i.e. as long as you follow a few conventions about filenames, you can run each

Line 56:

Line 62:

ATCA 12m visibilities and image and analyze both measurement sets together. You can run once to predict, run interactive clean yourself, and as long as you called your image $project.image, run <tt>simdata2</tt> just to calculate a difference image and analyze the results.

ATCA 12m visibilities and image and analyze both measurement sets together. You can run once to predict, run interactive clean yourself, and as long as you called your image $project.image, run <tt>simdata2</tt> just to calculate a difference image and analyze the results.

I always welcome input on developing the CASA simulator, and these 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:

I always welcome input on developing the CASA simulator, and these 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:

* [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.

* [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

* [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

Latest revision as of 21:03, 16 March 2012

Contents

Introduction

Simulation capability in CASA follows the usual two-layered structure: there is a beginner-level python task interface called simdata, 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. The task also can produce a cleaned image of the model visibilities, compare that image with your input convolved with the synthesized beam, and calculate a fidelity image. simdata can add thermal noise (from receiver, atmosphere, and ground) to the visibilities.

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 simdata, for example for new observatories that are unknown to simdata.

New for 3.0.2: Two task interfaces will be present, the old simdata and a new simdata2. We recommend using simdata2 -- simdata is being retained because it has had more extensive testing, and simdata2 is very new, but in the future simdata will be removed.

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

Because simdata is still actively being developed, documentation may lag reality, please email rindebet at nrao.edu with any questions - It's my job to help you use this software. In particular, you may find that some of the presentations and graphics below show parameter inputs that are slightly different from the latest version of CASA.

Steps to simulation

If you have CASA 3.0.2 and simdata2, you should use simdata2. It's better and better supported.

The subtasks are modular i.e. as long as you follow a few conventions about filenames, you can run each
bit independently and optionally. For example, you can modify the sky model, then predict ACA visibilities, then run again and predict
ATCA 12m visibilities and image and analyze both measurement sets together. You can run once to predict, run interactive clean yourself, and as long as you called your image $project.image, run simdata2 just to calculate a difference image and analyze the results.

Technical and Planning

I always welcome input on developing the CASA simulator, and these 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:

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.

Jan 2010 workshop Including slides and discussion of how simdata and Simulator work "under the hood" and plans for development