SpatialFrequencyLimits¶

class
mpdaf.obj.
SpatialFrequencyLimits
(fmax, rot)[source]¶ Bases:
object
Allow to keep track of the spatial frequency limits of an image.
Such that before resampling an image it can see if anything needs to be done to avoid undersampling and generating aliasing artefacts in the output image.
The bandlimits are recorded as an ellipse. Most telescopes have circularly symmetric PSFs and thus circularly symmetric spatialfrequency band limits, but this spatialfrequency profile may become elliptical if an image is resampled to have a lower resolution along one axis.
The ellipse is defined in its own X,Y coordinate system as follows:
xe(t)=xs*cos(t) ye(t)=ys*sin(t)
The ye axis of the ellipse is at self.rot degrees west of north in the image. For the Y axis of a coordinate system where Y is rot degrees west of north, the ellipse thus has to be rotated by
psi = (rot  self.rot)
degrees anticlockwise to calculate the X and Y values of the ellipse in that coordinate system:x(t) = cos(psi), sin(psi) xe(t) y(t) sin(psi), cos(psi) ye(t)
 Parameters
 fmax
float
,float
The frequency limits along the Yaxis and Xaxis of an elliptically shaped bandlimit (eg. cycles per degree).
 rot
float
The rotation angle of the Y axis of the ellipse westward of north (degrees). This is defined such that if image.wcs.get_rot() is passed to this function, the Y axis of the ellipse will be aligned with the Y axis of the image.
 fmax
Methods Summary
deepcopy
(self)ellipse_locus
(self, t, rot)Return the Y,X coordinates of the bandlimiting ellipse at ellipse phase t.
get_fmax
(self, rot)Return the spatialfrequency bandlimits along a Y axis that is ‘rot’ degrees west of north, and an X axis that is 90 degrees away from this Y axis in the sense of a rotation from north to east.
Methods Documentation

ellipse_locus
(self, t, rot)[source]¶ Return the Y,X coordinates of the bandlimiting ellipse at ellipse phase t.
 Parameters
 Returns
 out
numpy.ndarray
The Y and X coordinates of the bandlimiting ellipse.
 out

get_fmax
(self, rot)[source]¶ Return the spatialfrequency bandlimits along a Y axis that is ‘rot’ degrees west of north, and an X axis that is 90 degrees away from this Y axis in the sense of a rotation from north to east.
 Parameters
 rot
float
The angle of the target Y axis west of north (degrees).
 rot
 Returns
 out
numpy.ndarray
The maximum spatial frequencies along the Y and X axes at rotation angle rot, in the same units as were used to initialize the object.
 out