setimage(nx, ny, cellx, celly, stokes, doshift, phasecenter, shiftx, shifty, mode, nchan, start, step, mstart, mstep, spwid, fieldid, facets, distance)
Description
Define the default image parameters. If an image is to be
made, then these parameters are used in the construction
of the image. Thus, for example, the tool function
make
makes an (empty) image using these parameters.
Note that some parameters can be specified either in canonical units
or via measures. To establish default values, the ids for the default
spectral window and default field id must be given.
The meaning of arguments mode, nchan, step, etc. is described in
setdata. qimager can perform multi-frequency
synthesis over several spectral windows (mode='mfs'). To acheive this,
you should set spwid to an array of the required spectral windows
(e.g. spwid=1:2).
WARNING: For multifrequency synthesis, 'mfs', it is important that the spwid's
selected in setdata be the SAME as the one
selected in 'setimage'. Otherwise the frequency at which the image
is made is not going to be the same as to the one as the one used in
gridding the visibility and can lead to image artifacts.
The phase center of the image defaults to that of the specified
fieldid (the first if none is specified). This is important if you have
multiple pointings in the data. The user would have used
setdata to select which pointings
would be used in imaging. Note that the fieldid refers
to the ordering of fields in a MeasurementSet, and has no connection
with the number of facets in an image. A phase center may be also
specified in an argument to setimage using any valid
direction. If the conversion
from the observed direction requires frame information then this
is taken as follows:
- Direction information, including the coordinate system,
is taken from the relevant entry in the Field table of the
MeasurementSet.
- The epoch is taken from the time of observation of
each visibility.
- A position is specified via the qimager tool function setoptions
If the specified number of facets is greater than unity then the image
is split into facets (this number along the x and y axes) and
processed. This is necessary when using wide-field algorithm for
deconvolving the image, in cases of non-coplanar arrays (e.g the VLA
at low frequencies but can be safely left at 1 for the ATCA or WSRT).
Finally, a position shift may be added using the arguments shiftx,
shifty. This will be added to whatever the phase center was set to
as described above. The shift is a real angle on the qimager so that,
in e.g. RA, DEC, the RA shift is divided by cos(DEC) before being
added to the RA. The sense of the shift is that the position after
addition of the shift gives the new phase center of the image. The
shift is in the reference frame of the phase center.
For spectral imaging setimage and setdata defines the
spectral channels that are imaged. Examples are given in the
setdata section.
Arguments
nx |
|
Total number of spatial pixels in x |
|
|
Allowed: |
Int |
|
|
Default: |
128 |
ny |
|
Total number of spatial pixels in y |
|
|
Allowed: |
Int |
|
|
Default: |
128 |
cellx |
|
Cellsize in x (e.g. '1arcsec') |
|
|
Allowed: |
Quantity |
|
|
Default: |
'1arcsec' |
celly |
|
Cellsize in y (e.g. '1arcsec') |
|
|
Allowed: |
Quantity |
|
|
Default: |
'1arcsec' |
stokes |
|
Stokes parameters to image (e.g. 'IQUV') |
|
|
Allowed: |
'I'|'IV'|'IQU'|'IQUV' |
|
|
Default: |
'I' |
doshift |
|
Use the specified phase center? T or F |
|
|
Allowed: |
Bool |
|
|
Default: |
F |
phasecenter |
|
Direction of phase center as a measure |
|
|
Allowed: |
MDirection |
shiftx |
|
Shift in x (e.g. '23.7arcsec') |
|
|
Allowed: |
Quantity |
|
|
Default: |
'0arcsec' |
shifty |
|
Shift in y (e.g. '-54.2arcsec') |
|
|
Allowed: |
Quantity |
|
|
Default: |
'0arcsec' |
mode |
|
Type of processing |
|
|
Allowed: |
'mfs'|'channel'|'velocity' |
|
|
Default: |
'mfs' |
nchan |
|
Number of channels |
|
|
Allowed: |
Int |
|
|
Default: |
1 |
start |
|
Start channel (1-relative) |
|
|
Allowed: |
Int |
step |
|
Step in channel |
|
|
Allowed: |
Int |
mstart |
|
Start velocity |
|
|
Allowed: |
MRadialVelocity |
mstep |
|
Step in velocity |
|
|
Allowed: |
MRadialVelocity |
spwid |
|
Spectral Window Ids (1 relative) |
|
|
Allowed: |
Vector of Ints |
|
|
Default: |
1 |
fieldid |
|
Field Id (1 relative) |
|
|
Allowed: |
Int |
|
|
Default: |
1 |
facets |
|
Number of facets on each axis |
|
|
Allowed: |
Integer |
|
|
Default: |
1 |
distance |
|
Distance to object: usually ignore this! (m) |
|
|
Allowed: |
Quantity |
|
|
Default: |
'0m' |
Example
## Example 1
imgr.setimage(nx=1024,ny=1024, cellx='30marcsec',celly='30marcsec',
nchan=1, stokes='IV', doshift=T, phasecenter=dm.direction('mars'));
## Example 2
imgr.setimage(nx=1024,ny=1024, cellx='30marcsec',celly='30marcsec',
nchan=1, stokes='IV', doshift=T,
phasecenter=image('othermarsimage').coordmeasures().direction);
## Example 3
myqimager.setdata(mode='channel', nchan=10, start=3, spwid=[1,2], fieldid=[3, 4, 5, 6, 7, 9, 10])
myqimager.setimage(nx=500, ny=500, mode='mfs', spwid=[1,2], fieldid=7)
myqimager.clean(algorithm='mfclark', niter=1000, model='mosaic')
## Example 4
dir1:=dm.direction('J2000', '20h00m00', '21d00m00')
dir2:=dm.direction('J2000', '20h10m00', '21d00m00')
dir3:=dm.direction('J2000', '20h00m00', '21d03m00')
imgr.setimage(nx=100, ny=100, cellx='0.1arcsec', celly='0.1arsec',
doshift=T, phasecenter=dir1)
imgr.make('box1')
imgr.setimage(nx=100, ny=100, cellx='0.1arcsec', celly='0.1arsec',
doshift=T, phasecenter=dir2)
imgr.make('box2')
imgr.setimage(nx=100, ny=100, cellx='0.1arcsec', celly='0.1arsec',
doshift=T, phasecenter=dir3)
imgr.make('box3')
imgr.clean(algorithm='mfclark', model=['box1', 'box2', 'box3'],
image=['box1.restored', 'box2.restored', 'box3.restored'],
residual=['box1.residual', 'box2.residual', 'box3.residual'])
In the first example, the image parameters are set for 1024 by 1024
pixels of 30marc, 1 channel will be made, Stokes I and V will be
imaged, and the phasecenter will be the direction of Mars as given by
the JPL DE-200 emphemeris. In the second, the phase center is taken
to be that of the reference pixel of another image.
The third example shows the use of setdata and setimage to setup a mosaic. In
the set data we have chosen 10 channels (for each IF) of data starting form
channel 3. We also have selected IF 1 and 2. We have selected data from
fields 3 to 10. In the setimage we decide to use the data to make a
multifrequency synthesis image. We center the image on the field 7 pointing.
The fourth example is use to clean regions where the user knows the
sources are and ignore all the other regions. This is very efficient
in large fields with few sources. Smaller images are made and
deconvolved around known sources rather than making a big image
englobing all three fields. Care should be taken in NOT overlapping
the regions imaged this way otherwise the deconvolution will fail.
Next: qimager.advise - Function
Up: qimager - Tool
Previous: qimager.setdata - 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