Transform the image
Using the function specified by transform_func, the transform will be applied to data, uncertainty, and mask in ccd.
Parameters: | ccd : CCDData
transform_func : function
kwargs: dict
add_keyword : str, Keyword or dict-like, optional
|
---|---|
Returns: | ccd : CCDData
|
Notes
At this time, transform will be applied to the uncertainy data but it will only transform the data. This will not properly handle uncertainties that arise due to correlation between the pixels.
These should only be geometric transformations of the images. Other methods should be used if the units of ccd need to be changed.
Examples
Given an array that is 100x100,
>>> import numpy as np
>>> from astropy import units as u
>>> arr1 = CCDData(np.ones([100, 100]), unit=u.adu)
the syntax for transforming the array using scipy.ndimage.interpolation.shift
>>> from scipy.ndimage.interpolation import shift
>>> transformed = transform(arr1, shift, shift=(5.5, 8.1))