Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: imager.setscales - Function Up: imager - Tool Previous: imager.setmfcontrol - Function


imager.setoptions - Function



Package synthesis
Module imager
Tool imager


Set some general options for subsequent processing


Synopsis
setoptions(ftmachine, cache, tile, gridfunction, location, padding, usemodelcol, wprojplanes)


Description
This function is for setting different gridding and memory options

ftmachine
The options for ftmachine are:
ft
Standard interferometric gridding
sd
Standard single dish gridding
both
ft and sd as appropriate.
wfmemoryft
option for wide-field imaging, to grid in memory for all facets in one pass through the data
wproject
option for using the wproject algorithm for wide-field imaging; when this option is used the parameter wprojplanes define the number of convolution functions to be used
mosaic
option to use the gridder that uses the primary beam as the convolution function in gridding

cache
The size of the cache used (in complex pixels) during the gridding process. The default is to use half the physical memory of the machine as specified by the aipsrc variable system.resources.memory.
tile
The side of the tile (in complex pixels) during the gridding process.
gridfunction
The gridding function used. Currently only Box-car ('BOX') and Prolate Spheriodal Wave Function ('SF') are supported. In the case of Single-Dish imaging the Primary Beam ('PB') also can be used.
location
For some unusual types of image, one needs to know the location to be used in calculating phase rotations. For example, one can specify images to be constructed in azel, in which case, an antenna position must be chosen. One can use functions of measures: either observatory to get the position of a named observatory (e.g. dm.observatory('ATCA')) or position to set the position (e.g. dm.position('wgs84','30deg','40deg','10m')). Although this information is available from the MeasurementSet, what location is ambiguous in some cases e.g. VLBI.
padding
When gridding and transforming, the array may be padded by this factor in the image plane. This reduces aliasing, especially in wide-field cleaning.
usemodelcol
if this is false it tells imager to create and use the model visibility on the fly and in memory as far as possible...otherwise if it is True then imager will use the MODEL_DATA column to do this.
wprojplanes
this parameter is is used only of ftmachine is set to wproject. This defines how many convolution functions is used in the Wprojection gridder.



Arguments

ftmachine in Fourier transform machine
Allowed: String:'ft'|'sd'|'both' | 'wfmemoryft'| 'wproject' |'mosaic'
Default: 'ft'
cache in Size of gridding cache in complex pixels
Allowed: Int
Default: 4194304
tile in Size of a gridding tile in pixels (in 1 dimension)
Allowed: Int
Default: 16
gridfunction in Gridding function
Allowed: String: 'SF'|'BOX'|'PB'
Default: 'SF'
location in Location used in phase rotations
Allowed: position measure
padding in Padding factor in image plane (>=1.0)
Allowed: Float
Default: 1.0
usemodelcol in use MODEL_DATA column or not
Allowed: boolean
Default: T
wprojplanes in No of gridding convolution functions used in wproject-ft machine
Allowed: Integer
Default: 1


Returns
Bool


Example
- imgr.setoptions(cache=10000000, tile=32, gridfunction='BOX',
  location=dm.location('vla'))
The above example is to tell imager to use memory to fit 10000000 complex numbers and tile the image with tiles of 32 pixels on a side. Also it tells imager to use a box function as gridding function. The location parameter will make imager overide the position of the telescope to use (the default is the one it gets from the ms).

myim:=imager('n1333.ms')
myim.setdata(fieldid=[2:6, 8:12], spwid=[1:2])
myim.setimage(nx=800, ny=800, cellx='0.5arcsec', celly='0.5arcsec', mode='velocity', nchan=30, mstart='-10km/s', mstep='1.8km/s', spwid=[1,2],fieldid=3)
myim.setoptions(ftmachine='mosaic')
myim.setvp(dovp=T)
myim.setoptions(ftmachine='mosaic')
myim.clean(algorithm='mfclark', model='try1', niter=200)

In the above example we are making a mosaic using the fields 2,3,4,5,6,8,9,10,11,12 and we use the mosaic ftmachine. This uses the primary beam of the telescope as the gridding function.

pim:=imager('coma.ms')

pim.setdata(spwid=1, fieldid=1);
mydir:=dm.direction('J2000', '12h30m48', '12d24m0')
pim.setimage(nx=200, ny=200, cellx='30arcsec', celly='30arcsec', doshift=T, phasecenter=mydir); 
pim.make('outlier1');
pim.setimage(nx=1800, ny=1800, cellx='30arcsec',celly='30arcsec',facets=1);
pim.setoptions(ftmachine='wproject',wprojplanes=512, padding=1.0)
pim.make('main')
pim.clean(algorithm='mfclark',model=['main', 'outlier1'], niter=10000)
pim.done()

In the above example we are using the Wprojection algorithm for 3-D imaging. We are using 512 gridding functions. Sometimes if there is a memory issue (very large images and many griding functions) we suggest the use of facetting of the image with wprojection. So the example above would be something like below. Note that when using facets only the wfclark and wfhogbom can be used for now. Note on how an outlier field (or flanking) field is set on an interfering source outside of the field of interest.

pim:=imager('coma.ms')

pim.setdata(spwid=1, fieldid=1);
mydir:=dm.direction('J2000', '12h30m48', '12d24m0')
pim.setimage(nx=200, ny=200, cellx='30arcsec', celly='30arcsec', doshift=T, phasecenter=mydir); 
pim.make('outlier1');
pim.setimage(nx=3000, ny=3000, cellx='30arcsec',celly='30arcsec',facets=3);
pim.setoptions(ftmachine='wproject',wprojplanes=200, padding=1.2)
pim.make('main')
pim.clean(algorithm='wfclark',model=['main', 'outlier1'], niter=10000)
pim.done()





next up previous contents index
Next: imager.setscales - Function Up: imager - Tool Previous: imager.setmfcontrol - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15