2.4.1 Construct a simulator tool and creating a new MeasurementSet
Description
This is used to construct simulator tools. A simulator tool can either be
instantiated from an existing MeasurementSet, predicting and/or corrupting
data on the given coordinates, or it can be used to create a fundamentally new
MeasurementSet from descriptions of the array configuration and the
observational parameters. This is useful for making a simulator tool which will
make a MeasurementSet from scratch. In order to do this, you must also run
setconfig, setfield, setspwindow, setfeed, and settimes. Creating the
actual MS is performed by observe. Data can be predict-ed and then
corrupted-ed. In this example, we read in the antenna coordinates from an
ASCII file:
Arguments
| Inputs |
| ||
| ms |
| MeasurementSet to be created
| |
| allowed: | string |
|
| Default: |
|
|
Example
tabname = ’VLAC.LOCAL.TAB’
asciifile = ’VLAC.LOCAL.STN’ mytab=table.create() mytab.fromascii(tabname, asciifile); xx=[]; yy:=[]; zz:=[]; diam:=[]; xx = mytab.getcol(’X’); yy = mytab.getcol(’Y’); zz = mytab.getcol(’Z’); diam = mytab.getcol(’DIAM’); # sm.open(’NEW1.ms’) # do configuration posvla = me.observatory(’vla’); # me.observatory(’ALMA’) also works! sm.setconfig(telescopename=’VLA’, x=xx, y=yy, z=zz, dishdiameter=diam, mount=’alt-az’, antname=’VLA’, coordsystem=’local’, referencelocation=posvla); # Initialize the spectral windows sm.setspwindow(spwname=’CBand’, freq=’5GHz’, deltafreq=’50MHz’, freqresolution=’50MHz’, nchannels=1, stokes=’RR RL LR LL’); sm.setspwindow(spwname=’LBand’, freq=’1.420GHz’, deltafreq=’3.2MHz’, freqresolution=’3.2MHz’, nchannels=32, stokes=’RR LL’); # Initialize the source and calibrater sm.setfield(sourcename=’My cal’, sourcedirection=[’J2000’,’00h0m0.0’,’+45.0.0.000’], calcode=’A’); sm.setfield(sourcename=’My source’, sourcedirection=[’J2000’,’01h0m0.0’,’+47.0.0.000’]); sm.setlimits(shadowlimit=0.001, elevationlimit=’8.0deg’); sm.setauto(autocorrwt=0.0); sm.settimes(integrationtime=’10s’, usehourangle=F, referencetime=me.epoch(’utc’, ’today’)); sm.observe(’My cal’, ’LBand’, starttime=’0s’, stoptime=’300s’); sm.observe(’My source’, ’LBand’, starttime=’310s’, stoptime=’720s’); sm.observe(’My cal’, ’CBand’, starttime=’720s’, stoptime=’1020s’); sm.observe(’My source’, ’CBand’, starttime=’1030s’, stoptime=’1500s’); sm.setdata(spwid=1, fieldid=1); sm.predict(imagename=’M31.MOD’); sm.setdata(spwid=2, fieldid=2); sm.predict(imagename=’BigLBand.MOD’); sm.close(); |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.