SpatialFrequencyLimits¶
- class mpdaf.obj.SpatialFrequencyLimits(fmax, rot)[source]¶
Bases:
object
Allow one 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 band-limits are recorded as an ellipse. Most telescopes have circularly symmetric PSFs and thus circularly symmetric spatial-frequency band limits, but this spatial-frequency 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 Y-axis and X-axis of an elliptically shaped band-limit (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
()ellipse_locus
(t, rot)Return the Y,X coordinates of the band-limiting ellipse at ellipse phase t.
get_fmax
(rot)Return the spatial-frequency band-limits 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(t, rot)[source]¶
Return the Y,X coordinates of the band-limiting ellipse at ellipse phase t.
- Parameters:
- Returns:
- out
numpy.ndarray
The Y and X coordinates of the band-limiting ellipse.
- out
- get_fmax(rot)[source]¶
Return the spatial-frequency band-limits 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