simdata and sim_observe can either generate mosaic pointing directions, or you can manually create a list.
Then the directions are calculated for you, you are restricted to having the dwell time at each point in the mosaic be equal to the integration time parameter, i.e. the simulated ms will only have one timestamp per pointing or scan. This is not how real telescopes work, but simplifies the number of input parameters. If you want to do more complex things, for example 6s integrations in 5 min scans, or different integration times on different mosaic pointings, or a calibrator with a shorter integration time than the science pointings, the recommended method is to use sim_observe to generate a simple pointing file (which is just an ascii file) and then edit it.
We'll begin with sim_observe, and use an Halpha image of M51 as a model, which you should download File:M51ha.fits.txt and place in your working directory.
sim_observe will make a copy m51c/m51c.skymodel, and not modify your input image.
default "sim_observe" project = "m51p" # Model sky = Halpha image of M51 skymodel = "m51ha.fits.txt"
Although the image has a world coordinate system, we want to override most of the parameters.
- We'll place the source in the southern hemisphere with the indirection parameter,
- set the pixel size to 0.1arcsec, effectively moving the galaxy further away (M51 itself would require a quite large mosaic, and in any case we need for the input model pixels to be significantly smaller than the synthesized beam that we'll be simulating, or else we won't be learning anything)
- consistent with simulating a more distant source, we'll set the peak brightness to 0.004 Jy/pixel
- set the frequency to 330GHz, and since its a 2D image we'll set the single "channel" width to be 50MHz, and peak brightness of 0.004 Jy/pixel - parameters plausible for observing an emission line in a galaxy.
# Set model image parameters: indirection="B1950 23h59m59.96s -34d59m59.50s" incell="0.1arcsec" inbright="0.004" incenter="330.076GHz" inwidth="50MHz"
We'll begin with the 12m ALMA array observation, and have sim_observe calculate a hexagonal mosaic of pointings. We'll set the integration time to 2min, since that's what we'll want for our scan duration or dwell time (if you ran observe with this parameter, as described above, you'd get one measurement every two minutes which would not result in realistic uv coverage).
We want to intersperse a calibrator observation after each pass of the mosaic, using caldirection and calflux
# have sim_observe calculate mosaic pointing locations: setpointings = True integration = "2min" mapsize = "1.5arcmin" maptype = "hex" pointingspacing = "9arcsec" # this could also be specified in units of the primary beam e.g. "0.5PB"
Note that we're turning observe=False - we don't want to actually do the calculation (yet).
observe = False graphics = "both" go()
Edit Pointing File
Open the pointing file created, m51p/m51p.alma_out10.ptg.txt, in a text editor. You'll see that it has a list of directions with dwell times in seconds:
#Epoch RA DEC TIME B1950 23:59:57.03053 -034.59.20.528857 120.0 B1950 23:59:57.76290 -034.59.20.528857 120.0 B1950 23:59:58.49527 -034.59.20.528857 120.0 B1950 23:59:59.22763 -034.59.20.528857 120.0 ...
Let's delete the furthest east and west pointings, to make a more irregularly shaped map that covers only the galaxy File:M51p.alma out10.ptg.txt
Then run sim_observe again, but with setpointings=False. Now, we change the integration to 6s. sim_observe will observe each pointing for the amount of time in the pointing file (we could have also changed the time on different pointings to be different), but with 6s integrations, resulting in 2min/6s data points per scan.
setpointings = False ptgfile = "m51p.alma_out10.ptg.txt" integration = "6s" # observe = True totaltime = "3" caldirection = "J2000 22h12m32s -30d10m04s" calflux = "0.9Jy"
Observe irregular mosaic
We'll add a calibrator, observed after each of 3 runs through the mosaic. The software is currently limited to calculating a single integration on the calibrator, i.e. it will observe it for 6s, and to only observe the calibrator at the end of the entire pointing list. Please suggest upgrades via the NRAO/CASA helpdesk to enable your use cases.
observe = True integration = "6s"