nraonrao
 
NRAO Home > CASA > CasaRef
imager.setoptions - Function

2.3.1 Set some general options for subsequent processing
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





Inputs

ftmachine

Fourier transform machine

allowed:

string

Default:

ft sd both wfmemoryft wproject mosaic ft

cache

Size of gridding cache in complex pixels; default use half the memory available on computer

allowed:

int

Default:

-1

tile

Size of a gridding tile in pixels (in 1 dimension)

allowed:

int

Default:

16

gridfunction

Gridding function

allowed:

string

Default:

SF BOX PB SF

location

Location used in phase rotations

allowed:

any

Default:

variant

padding

Padding factor in image plane (¿=1.0)

allowed:

double

Default:

1.0

freqinterp

interpolation mode in frequency;options:- nearest, linear, cubic, spline

allowed:

string

Default:

nearest

wprojplanes

No of gridding convolution functions used in wproject-ft machine

allowed:

int

Default:

1

epjtablename

E-Jones table name. This is used if applypointingoffsets is set to True.

allowed:

string

Default:

applypointingoffsets

Apply pointing offset corrections during deconvolution.

allowed:

bool

Default:

false

dopbgriddingcorrections

Correct for PB gridding before prediction of visibilities. This should be True when doing deconvolution. This should be False when predicting visibilities for model sky with no primary beam attenuation in the model.

allowed:

bool

Default:

true

cfcachedirname

Directory where convolution functions are to be (or are being ) cached on the disk.

allowed:

string

Default:

pastep

The number of steps in Parallactic Angle used to compute the average power pattern. Since a linear interpolation is used to interpolate convolution functions during gridding, this can be different from PA increment to compute new convolution functions. This parameter is however not used yet.

allowed:

double

Default:

1.0

pblimit

Primary beam limit when using PBWProjection

allowed:

double

Default:

0.05

Returns
bool

Example

- im.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).

im.open(’n1333.ms’)  
im.setdata(fieldid=[2:6, 8:12], spwid=[1:2])  
im.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)  
im.setoptions(ftmachine=’mosaic’)  
im.setvp(dovp=T)  
im.setoptions(ftmachine=’mosaic’)  
im.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.

im.open(’coma.ms’)  
im.setdata(spwid=1, fieldid=1);  
mydir=me.direction(’J2000’, ’12h30m48’, ’12d24m0’)  
im.defineimage(nx=200, cellx=’30arcsec’, phasecenter=mydir);  
im.make(’outlier1’);  
im.defineimage(nx=1800, cellx=’30arcsec’);  
im.setoptions(ftmachine=’wproject’,wprojplanes=512, padding=1.0)  
im.make(’main’)  
im.clean(algorithm=’mfclark’,model=[’main’, ’outlier1’], niter=10000, image=[’coma.image’, ’outlier1.image’])  
im.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()  

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.