Purpose of this page: instructions for people within the project to make example ES simulations

Simulating from component lists:
  • For a handful of point sources, this is easier than making a model sky image
  • Caveat: complist-only functionality was re-enabled only in Sept '10 so you may find "features". I amost exclusively use casapy-active. I tested it briefly on casapy-test r12608, so you can try that; it almost certainly doesn't work on casapy-stable.

cl.done()
cl.addcomponent(dir="J2000 18h00m00s -23d0m00.s", flux=.01, freq='245.0GHz')
cl.addcomponent(dir="J2000 18h00m00.072s -23d0m01.s", flux=.005, freq='245.0GHz')
cl.addcomponent(dir="J2000 18h00m00.144s -23d0m00.s", flux=.0025, freq='245.0GHz')
cl.addcomponent(dir="J2000 18h00m00.072s -22d59m59.s", flux=.001, freq='245.0GHz')
cl.rename("1mm.-23.cl")
creates:

Configuration:

Richard Hills suggests this example configuration (not optimized): 250m_Array_2.pdf

Al Wootten translated the pad names into locations, and this is the sindata-readable cfg formatted file: ES.250m.20100902.cfg

Example: Here's an example of 2mm PWV, the 4-point-source componentlist just described, at zenith (remember that simdata observes at transit, so you have to simulate different elevations by changing the dec. C'est la vie.

es.1mm.el90.1min.2mmpwv.simdata.last

project  = 'es.1mm.el40.1min.2mmpwv' 
modifymodel  =  False       
setpointings  =  True        
predict  =  True        
complist  = '1mm.+27.cl'
antennalist  = 'ES.250m.20100902.cfg'
totaltime  = '60s'
thermalnoise = 'tsys-atm'
user_pwv  = 2.0 
image =  True  
vis = '$project.noisy.ms'
imsize = [128, 128] 
cell = '0.1arcsec' 
niter = 5000
threshold = '5e-5Jy'
analyze = True 
graphics = "both"
verbose = True
overwrite = True

es.1mm.el40.1min.2mmpwv.analysis.png

Making model images: If you want to make a model image in CASA from components (e.g. to edit the spectra of sources in a cube -- components don't yet cupport nontrivial spectra, or use component shapes other than gaussians), here are example incantations:

# create blank im (100x100 pixels, 1 stokes, 1 freq bin i.e. continuum)
myim=ia.newimagefromshape(outfile='my.image',shape=[100,100,1,1])

# get its coordsys:
mycs=myim.coordsys()

# you don't need to do this, but deg is nicer than arcmin for eg. the 
# ref posn
mycs.setunits(['deg','deg','','Hz'])

# make pixel size 1 arcsec:
arcsec=qa.convert('1arcsec',mycs.units()[0])['value']
mycs.setincrement([-1*arcsec,1*arcsec],type='direction')

# set refdir (ra/dec in degrees)
mycs.setreferencevalue([-90.,-42],'direction')

# set image freq to 672 GHz
mycs.setreferencevalue(672.e9,'spectral')

# set bandwidth to 2GHz (there may be a factor of two here I should
# check)
mycs.setincrement(2.e9,'spectral')

# sanity check - look in logger:
mycs.summary()

# now reattach the coordsys to the image:
myim.setcoordsys(mycs.torecord())

# this should look sensible:
myim.summary()

# and now you can stick in the components:
myim.modify(cl.torecord(),subtract=false)

# and the max in here better no longer be zero:
myim.statistics()

# just to make sure it gets written to disk
myim.done()

# now you can use my.image in simdata.

Topic revision: r1 - 2010-09-06, RemyIndebetouw
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback