|Select region of interest
When concatenating dissimilar images, you will probably want to set options=relax. This tells imcat not to be concerned if axis descriptors differ. However, the image dimensions must still be the same.
|Ignore header discrepancies
In the example, we take an image of some size and pad it out to be 512 by 512 pixels. Note that the frame keyword which specifies the output image size in relative pixels is in the non-standard order of xmin,xmax,ymin,ymax compared to the region keyword which expects xmin,ymin,xmax,ymax.
|Output size in relative pixels
The task regrid enables you to take an image, and regrid it via a cubic interpolation scheme on a new grid. This task can regrid any combination of the the first three axes of an image. The new grid can be specified in one of two ways. The first way (and generally easiest) is to give a template image and make the image of interest look like the template image. The alternative way requires you to specify the output header axis descriptors explicitly with the keyword desc. You have to input the reference value, reference pixel, pixel increment and number of pixels for each axis you want to regrid - pretty tedious stuff.
Note that regrid has comparatively recently been upgraded to handle non-linear axes correctly (older versions used a linear approximation
In this simple example, we regrid the first two axes of an image via a template image.
|Unset for template
|Regrid first two axes only please
Task regrid is smart enough to correctly handle different projection geometries, conversion between equatorial and galactic coordinates, equinox conversion between B1950 and J2000, as well as conversions between different velocity systems (radio vs optical, LSR vs barycentric).
If the template does not have quite the geometric grid that you want, then regrid provides a number of options to fiddle what it treats as the template coordinate system before it does the regridding. Option galeqsw causes the template to be switched from galactic to equatorial, or visa versa before the regridding operation, whereas the option equisw switches the equinox from B1950 to J2000 (or visa versa). The project keyword can be used to reset the projection geometry of the template. The noscale option causes the template coordinate system's cell size not to scale with frequency (the images made by invert are such that the cell size in inverse proportional to frequency).
makes the output exactly overlay the template or
the axis descriptors. However, if you really only want them in the same
coordinate system, with potentially different image sizes and offset perhaps
by an integral number of pixels, then use
Task regrid can be used to resample an image on its own. You would use this to set a different projection geometry, to switch between galactic and equatorial coordinates, or to change equinoxes. If both the template and axis descriptor are unset, regrid uses the main input as the template. To do this use options=offset along with the other options or parameters to change the template coordinate system.
There is a potential trap when regridding ATCA images to equatorial coordinates: ATCA images produced by invert are in the so-called ``NCP'' projection. As this projection has a singularity at the equator, it is generally disastrous to regrid an ATCA image which is near or on the galactic equator without also changing the projection. The ``SIN'' (sine) projection is a reasonable choice for this.