mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Tools for modeling wavefront propagation
Classes | |
class | mx::wfp::fraunhoferPropagator< _wavefrontT > |
Class to perform Fraunhofer propagation between pupil and focal planes. More... | |
class | mx::wfp::fraunhoferPropagator< _wavefrontT, 1 > |
Class to perform Fraunhofer propagation between pupil and focal planes using a GPU. More... | |
Modules | |
Point Spread Functions | |
Coronagraphs | |
Adaptive Optics | |
Wavefront Propagation Files | |
Files | |
file | fraunhoferPropagator.hpp |
Declares and defines a class for Fraunhofer propagation of optical wavefronts. | |
file | fraunhoferPropagatorCuda.hpp |
Declares and defines a class for Fraunhofer propagation of optical wavefronts with Cuda. | |
file | imagingArray.hpp |
Declares and defines a class for managing images. | |
file | imagingUtils.hpp |
Utilities for modeling image formation. | |
Functions | |
template<typename realT > | |
realT | mx::wfp::fftPlateScale (size_t pixels, realT metersPerPixel, realT lambda) |
Calculate the angular plate scale (radians per pixel) of an image after propagation by FFT. More... | |
template<class arrayT > | |
int | mx::wfp::circularPupil (arrayT &m, typename arrayT::Scalar eps=0, typename arrayT::Scalar rad=0, typename arrayT::Scalar overscan=0) |
Fill in an Eigen-like array with a circular pupil mask. More... | |
template<typename arrayOutT , typename arrayInT > | |
void | mx::wfp::makeComplexPupil (arrayOutT &complexPupil, const arrayInT &realPupil, int wavefrontSizePixels) |
Create a complex pupil plane wavefront from a real amplitude mask. More... | |
template<typename arrayOutT , typename arrayInT > | |
void | mx::wfp::makeComplexPupil (arrayOutT &complexWavefront, const arrayInT &realAmplitude, const arrayInT &realPhase, int wavefrontSizePixels) |
Create a complex wavefront from a real amplitude and a real phase. More... | |
template<typename wavefrontT > | |
void | mx::wfp::tiltWavefront (wavefrontT &complexWavefront, typename wavefrontT::Scalar::value_type xTilt, typename wavefrontT::Scalar::value_type yTilt) |
Apply a tilt to a wavefront. More... | |
int mx::wfp::circularPupil | ( | arrayT & | m, |
typename arrayT::Scalar | eps = 0 , |
||
typename arrayT::Scalar | rad = 0 , |
||
typename arrayT::Scalar | overscan = 0 |
||
) |
Fill in an Eigen-like array with a circular pupil mask.
Sets any pixel which is at rad <= r < rad+(1.0/overscan) pixels to rho = 1,
0 | on success |
-1 | on error |
m | [in.out] is the allocated Array. Dimensions are used to create the pupil. | |
[in] | eps | [optional] is the central obscuration. 0-1, default is 0. |
[in] | rad | [optional] is the desired radius. If rad <= 0, then the maximum radius based on dimensions of m is used. Default is 0. |
[in] | overscan | [optional] overscan in fractional pixels, to include partial pixels on the edge. Default is 0. |
Definition at line 72 of file imagingUtils.hpp.
Referenced by mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::makeFocalMask(), and mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC().
realT mx::wfp::fftPlateScale | ( | size_t | pixels, |
realT | metersPerPixel, | ||
realT | lambda | ||
) |
Calculate the angular plate scale (radians per pixel) of an image after propagation by FFT.
realT | a real floating point type |
[in] | pixels | the linear dimension of the FFT (including 0 pad, etc.) |
[in] | metersPerPixel | the scale of the input wavefront [m/pix] |
[in] | lambda | the wavelength of the wavefront [m] |
Definition at line 54 of file imagingUtils.hpp.
void mx::wfp::makeComplexPupil | ( | arrayOutT & | complexPupil, |
const arrayInT & | realPupil, | ||
int | wavefrontSizePixels | ||
) |
Create a complex pupil plane wavefront from a real amplitude mask.
The input real amplitude mask is placed in the center of a 0-padded complex array.
[out] | complexPupil | the complex pupil plane wavefront |
[in] | realPupil | a real amplitude mask. |
[in] | wavefrontSizePixels | the desired size of the ouput wavefront, should be at least as big as realPupil |
Definition at line 183 of file imagingUtils.hpp.
Referenced by mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC().
void mx::wfp::makeComplexPupil | ( | arrayOutT & | complexWavefront, |
const arrayInT & | realAmplitude, | ||
const arrayInT & | realPhase, | ||
int | wavefrontSizePixels | ||
) |
Create a complex wavefront from a real amplitude and a real phase.
The wavefront is placed in the center of a 0-padded complex array.
[out] | complexWavefront | the complex pupil plane wavefront |
[in] | realAmplitude | is the real-valued amplitude. |
[in] | realPhase | is the real-valued phase in radians, same size as realAmplitude |
[in] | wavefrontSizePixels | the desired size of the ouput wavefront, should be at least as big as the real arrays |
Definition at line 217 of file imagingUtils.hpp.
void mx::wfp::tiltWavefront | ( | wavefrontT & | complexWavefront, |
typename wavefrontT::Scalar::value_type | xTilt, | ||
typename wavefrontT::Scalar::value_type | yTilt | ||
) |
Apply a tilt to a wavefront.
complexWavefront | [in.out] the complex wavefront to tilt, will be modified on output |
xTilt | [input] the amount of tilt in the x direction, in pixels |
yTilt | [input] the amount of tilt in the y direction, in pixels |
Definition at line 248 of file imagingUtils.hpp.