-
Notifications
You must be signed in to change notification settings - Fork 8
Simulations
When doing simulations the fisrt step is to create an empty measurement set (MS). The simulated data will be stored in the this MS.
In this section we introduce the makems and simms (CASA based) tools. Both these tools require a list of antenna positions for the observatory for which you want to simulate data. makems requires these positions to be in CASA Table format, while simms also allows ASCII files. Lets start with makems
The observation settings for the MS are given to makems via a configuration file such as the one bellow; find the same file here.
AntennaTableName=MeerKAT64_ANTENNAS # list of antenna positions (CASA table)
NTimes=240 # number of integrations
StepTime=60 # integration time in seconds
StartFreq=1.4e9
StepFreq=10e6
NFrequencies=1
NBands=1
Declination=-30.0.0
RightAscension=0:0:0
StartTime=2011/11/16/15:00 # Must be carefully chosen in order to get a sensible uv-coverage
MSName=makems_meerkat_m30_4h60s.MS
MSDesPath=. # Where to save MS
NParts=1
WriteImagerColumns=True # include imaging columns; {MODEL,CORRECTED}_DATA
WriteAutoCorr=True # Include autocorrelations
Then simply run $ makems makems_config.cfg
and you are almost good to go
(ensure that you have the file MeerKAT64_ANTENNAS
in your working directory). If the run was successful, you should see a file makems_meerkat_m30_4h60s.MS_p0
(Oleg Smirnov knows the reason for the p0 suffix), now rename this file makems_meerkat_m30_4h60s.MS;
running makems may also produce other files with suffixes .gds and .vds, you can delete these files.
If you have pyxis installed on your machine you can easily plot the uvcoverage by running
$ pyxis makems_meerkat_m30_4h60s.MS ms.plot_uvcov
.
simms requires CASA (version >= 4.22). Find simms here.
To make the same MS as above, run (see $ simms --help
for more info):
$ simms -T meerkat -l simms_meerkat_m30 -st 4 -dt 60 -ih -2 -f0 1.4GHz -df 10MHz -nc 1 -dir J2000,0deg,-30deg MeerKAT64_ANTENNAS
Then run $ pyxis makems_meerkat_m30_4h60s.MS ms.plot_uvcov
to see the uvcoverage.
See this notebook for an illustration of how the uv-coverage is affected by the declination.
Now that we have an empty MS, we need a sky model from which to predict the visibilities to fill this MS. Lets make a singlesource model; copy and paste the lines below into a file (name it mysky.txt).
#format:name rad_d dec_d i emaj_s emin_s pa_d
S1 0 -30 1 0 0 0
The model has a 1Jy point source at ra,dec=0,-30 degrees.
We are finally ready to fill the empty MS with visibilities. We will use MeqTrees to achieve this.
Open the MeqBrowser ($ meqbrowser
), start a MeqServer (press start) and load a simulation TDL script ; TDL -> Load TDL Script -> Cattery/Siamese/turbo-sim.py
.
Lets set the compile time options:
Sometimes useful to look at bookmarks; Select Bookmarks -> Output visibilities:inspector plot
.
To run the simulation press Run simulation
button in the TDL Jobs and Runtime Options window.
A panel with the visibilities for all the baselines should appear on the right (see screenhot below).
Lets go back to the previous window. Select TDL Exec
, expand Imaging options
in the window and set options as in the screenshot below, then press Make a dirty image
.
After a few seconds, a tigger window should pop-up with the image. Then to make a clean image, expand Make a clean image
then press the Make a clean image
button. Below are the dirty and clean images from the simulation.
Dirty Map | Clean Map |
---|---|