mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Classes | |
struct | fftwAllocator |
class | fraunhoferPropagator |
Class to perform Fraunhofer propagation between pupil and focal planes. More... | |
class | fraunhoferPropagator< _wavefrontT, 1 > |
Class to perform Fraunhofer propagation between pupil and focal planes using a GPU. More... | |
struct | idealCoronagraph |
The Ideal Coronagraph. More... | |
class | imagingArray |
class | imagingArray< _Scalar, _allocatorT, 0 > |
struct | imagingArrayInplaceAdd |
struct | imagingArrayInplaceAdd< imageT, typeT, true > |
struct | imagingArrayInplaceDivision |
struct | imagingArrayInplaceDivision< imageT, typeT, true > |
struct | imagingArrayInplaceProduct |
struct | imagingArrayInplaceProduct< imageT, typeT, true > |
struct | is_imagingArray |
Test whether a type is an imagingArray by testing whether it has a typedef of "is_imagingArray". More... | |
struct | lyotCoronagraph |
The Lyot Coronagraph. More... | |
Typedefs | |
template<typename scalarT > | |
using | imagingArrayT = imagingArray< scalarT, fftwAllocator< scalarT >, 0 > |
Functions | |
template<typename realT > | |
realT | fftPlateScale (size_t pixels, realT metersPerPixel, realT lambda) |
Calculate the angular plate scale (radians per pixel) of an image after propagation by FFT. | |
template<class arrayT > | |
int | 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. | |
template<class arrayT > | |
void | drawLine (arrayT &im, typename arrayT::Scalar x0, typename arrayT::Scalar y0, typename arrayT::Scalar x1, typename arrayT::Scalar y1, typename arrayT::Scalar halfWidth) |
Draw a line in an image. | |
template<typename arrayOutT , typename arrayInT > | |
void | makeComplexPupil (arrayOutT &complexPupil, const arrayInT &realPupil, int wavefrontSizePixels) |
Create a complex pupil plane wavefront from a real amplitude mask. | |
template<typename arrayOutT , typename arrayInT > | |
void | makeComplexPupil (arrayOutT &complexWavefront, const arrayInT &realAmplitude, const arrayInT &realPhase, int wavefrontSizePixels) |
Create a complex wavefront from a real amplitude and a real phase. | |
template<typename wavefrontT > | |
void | tiltWavefront (wavefrontT &complexWavefront, typename wavefrontT::Scalar::value_type xTilt, typename wavefrontT::Scalar::value_type yTilt) |
Apply a tilt to a wavefront. | |
template<typename imageT1 , typename imageT2 > | |
void | extractBlock (imageT1 &dest, int imX0, int imXsz, int imY0, int imYsz, imageT2 &src, int wfX0, int wfY0) |
Extract a block from one image and insert it into a second. | |
template<typename imageT1 , typename imageT2 , typename imageT3 > | |
void | extractMaskedPixels (imageT1 &dest, const imageT2 &src, const imageT3 &mask) |
Extract a pixels from one image and insert them into a second based on a mask. | |
template<typename realImageT , typename complexImageT > | |
void | extractIntensityImage (realImageT &im, int imX0, int imXsz, int imY0, int imYsz, complexImageT &wf, int wfX0, int wfY0) |
template<typename realImageT , typename complexImageT > | |
void | extractIntensityImageAccum (realImageT &im, int imX0, int imXsz, int imY0, int imYsz, complexImageT &wf, int wfX0, int wfY0) |
using mx::wfp::imagingArrayT = typedef imagingArray<scalarT, fftwAllocator<scalarT>, 0> |
Definition at line 353 of file imagingArray.hpp.
void mx::wfp::drawLine | ( | arrayT & | im, |
typename arrayT::Scalar | x0, | ||
typename arrayT::Scalar | y0, | ||
typename arrayT::Scalar | x1, | ||
typename arrayT::Scalar | y1, | ||
typename arrayT::Scalar | halfWidth | ||
) |
Draw a line in an image.
arrayT | is an Eigen-like array with public typedef Scalar |
im | [in.out] The input image, modified. | |
[in] | x0 | the x value, relative to image center, of the starting point |
[in] | y0 | the y value, relative to image center, of the starting point |
[in] | x1 | the x value, relative to image center, of the end point |
[in] | y1 | the y value, relative to image center, of the end point |
[in] | halfWidth | the half-width of the line. |
Definition at line 124 of file imagingUtils.hpp.
void mx::wfp::extractBlock | ( | imageT1 & | dest, |
int | imX0, | ||
int | imXsz, | ||
int | imY0, | ||
int | imYsz, | ||
imageT2 & | src, | ||
int | wfX0, | ||
int | wfY0 | ||
) |
Extract a block from one image and insert it into a second.
dest | [in/out] the image in which to place the extracted block. Must be pre-allocated. | |
[in] | imX0 | the x/row-coord of the lower left pixel of the destination region. |
[in] | imXsz | the x size (number of rows) of the block |
[in] | imY0 | the y/col-coord of the lower left pixel of the desination region |
[in] | imYsz | the y=size (number of cols) ov the block |
[in] | src | the source of the block. Must be large enough. |
[in] | wfX0 | the x/row-coord of the lower left pixel of the source region |
[in] | wfY0 | the y/col-coord of the lower left pixel of the source region |
Definition at line 280 of file imagingUtils.hpp.
Referenced by mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC(), and mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC().
void mx::wfp::extractIntensityImage | ( | realImageT & | im, |
int | imX0, | ||
int | imXsz, | ||
int | imY0, | ||
int | imYsz, | ||
complexImageT & | wf, | ||
int | wfX0, | ||
int | wfY0 | ||
) |
void mx::wfp::extractIntensityImageAccum | ( | realImageT & | im, |
int | imX0, | ||
int | imXsz, | ||
int | imY0, | ||
int | imYsz, | ||
complexImageT & | wf, | ||
int | wfX0, | ||
int | wfY0 | ||
) |
Definition at line 380 of file imagingUtils.hpp.
Referenced by mx::AO::sim::pyramidSensor< _realT, _detectorT >::doSenseWavefront(), and mx::AO::sim::pyramidSensor< _realT, _detectorT >::doSenseWavefrontNoMod().
void mx::wfp::extractMaskedPixels | ( | imageT1 & | dest, |
const imageT2 & | src, | ||
const imageT3 & | mask | ||
) |
Extract a pixels from one image and insert them into a second based on a mask.
Only pixels with a non-zero value in mask are changed in dest to have the value in src. Other pixels are not modified.
dest | [in/out] the image in which to place the extracted pixels. Must be the same size as src and mask. | |
[in] | src | the source of the pixels. Must be the same size as mask. |
[in] | mask | the mask image, where any value other than 0 indicates a pixel to extract. Must be the same size as src. |
Definition at line 314 of file imagingUtils.hpp.
References mxThrowException.
Referenced by mx::AO::sim::pyramidSensor< _realT, _detectorT >::makeOpdMask().