2.3.1 DEPRECATED...use defineimage instead.Set the image parameters for
subsequent processing
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.
imager can perform multi-frequency synthesis over several spectral windows
(mode=’mfs’). To achieve 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:
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 imager 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.
For wide-field or 3D imaging see setoptions section for some examples.
Arguments
| Inputs |
| ||
| 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 | arcsec | Cellsize in x (e.g. ’1arcsec’)
| |
| allowed: | doublearcsec |
|
| Default: | 1.0 |
|
| celly | arcsec | Cellsize in y (e.g. ’1arcsec’)
| |
| allowed: | doublearcsec |
|
| Default: | 1.0 |
|
| stokes |
| Stokes parameters to image (e.g. ’IQUV’)
| |
| allowed: | string |
|
| Default: | IV IQU IQUV I |
|
| doshift |
| Use the specified phase center? T or F
| |
| allowed: | bool |
|
| Default: | false |
|
| phasecenter |
| Direction of phase center as a measure
| |
| allowed: | MDirection |
|
| Default: | 00h00m00.00 +090d00m00.000 B1950 |
|
| shiftx | arcsec | Shift in x (e.g. ’23.7arcsec’)
| |
| allowed: | doublearcsec |
|
| Default: | 0.0 |
|
| shifty | arcsec | Shift in y (e.g. ’-54.2arcsec’)
| |
| allowed: | doublearcsec |
|
| Default: | 0.0 |
|
| mode |
| Type of processing
| |
| allowed: | string |
|
| Default: | channel velocity mfs |
|
| nchan |
| Number of channels
| |
| allowed: | int |
|
| Default: | 1 |
|
| start |
| Start channel (0-relative)
| |
| allowed: | int |
|
| Default: | 0 |
|
| step |
| Step in channel
| |
| allowed: | int |
|
| Default: | 1 |
|
| mstart |
| Start velocity
| |
| allowed: | MRadialVelocity |
|
| Default: | 0 km/s |
|
| mstep |
| Step in velocity
| |
| allowed: | MRadialVelocity |
|
| Default: | 1 km/s |
|
| spwid |
| Spectral Window Ids (0 relative)
| |
| allowed: | intArray |
|
| Default: | 0 |
|
| fieldid |
| Field Id (0 relative)
| |
| allowed: | int |
|
| Default: | 0 |
|
| facets |
| Number of facets on each axis
| |
| allowed: | int |
|
| Default: | 1 |
|
| distance | m | Distance to object: usually ignore this! (m)
| |
| allowed: | doublem |
|
| Default: | 0.0 |
|
Example
## Example 1
im.setimage(nx=1024,ny=1024, cellx=’30marcsec’,celly=’30marcsec’, nchan=1, stokes=’IV’, doshift=T, phasecenter=dm.direction(’mars’)); ## Example 2 im.setimage(nx=1024,ny=1024, cellx=’30marcsec’,celly=’30marcsec’, nchan=1, stokes=’IV’, doshift=T, phasecenter=image(’othermarsimage’).coordmeasures().direction); ## Example 3 myimager.setdata(mode=’channel’, nchan=10, start=3, spwid=[1,2], fieldid=[3, 4, 5, 6, 7, 9, 10]) myimager.setimage(nx=500, ny=500, mode=’mfs’, spwid=[1,2], fieldid=7) myimager.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’) im.setimage(nx=100, ny=100, cellx=’0.1arcsec’, celly=’0.1arsec’, doshift=T, phasecenter=dir1) im.make(’box1’) im.setimage(nx=100, ny=100, cellx=’0.1arcsec’, celly=’0.1arsec’, doshift=T, phasecenter=dir2) im.make(’box2’) im.setimage(nx=100, ny=100, cellx=’0.1arcsec’, celly=’0.1arsec’, doshift=T, phasecenter=dir3) im.make(’box3’) im.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.
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.