imProc.transIm - EranOfek/AstroPack GitHub Wiki
Description
The imProc.transIm package contains tools to register and transform images in AstroImage objects.
List of functions
-
imProc.transIm.imwarp - Apply the imwarp function on AstroImage object
-
imProc.transIm.transFromSources - Find transformation between images by pattern match of sources in the image and ref image.
-
imProc.transIm.updateHeaderCCDSEC - Update the NAXIS and CCDSEC-related keywords in the header
-
imProc.transIm.wcs2displacment - Generate a displacement field (for warp) from one WCS to another.
-
imProc.transIm.unitTest - unitTest for +imProc.register package
Selected Functions
imProc.transIm.imwarp
Apply the warp function on an AstroImage object. The Header, CatData, and PSF are not transformed. The function's main input are the AstroImage object and a transformation to apply to the AstroImage. The transformation can be any of the following.
- A two-column [X Y] shift matrix
- A 3x3 affine transformation
- A cube containing a displacement field - 3rd dim for X,Y displacements.
- AstroImage with AstroWCS
- AstroWCS
- Tran2D object
- An affine transformation object
- struct array with displacement fields in DF field.
For example, give an AstroImage objects AI and RefAI, and register the images in AI to RefAI:
RegisteredAI = imProc.transIm.imwarp(AI, RefAI);
To transform the image using a simpler function (e.g., shift):
% Shift image by DX=3, DY=2:
RegisteredAI = imProc.transIm.imwarp(AI, [3 2]);