mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
The Ideal Coronagraph.
A simple toy coronagraph which operates only the pupil plane, subtracting the energy-minimizing wavefront [3]. For an on-axis source with a perfectly flat wavefront this results in perfect extinction. This coronagraph is not physically realizable, but it is often useful for modeling and analysis, and it has been shown that real-world optimized coronagraphs often approach ideal performance [23] [and Males in prep].
Definition at line 55 of file idealCoronagraph.hpp.
#include <wfp/idealCoronagraph.hpp>
Public Types | |
typedef _realT | realT |
The real floating point type. More... | |
typedef std::complex< realT > | complexT |
The complex floating point type. More... | |
typedef imagingArray< std::complex< realT >, fftwAllocator< std::complex< realT > >, 0 > | complexFieldT |
The wavefront complex field type. More... | |
typedef Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic > | imageT |
The image type. More... | |
Public Member Functions | |
int | wfSz () |
Get the wavefront size in pixels. More... | |
void | wfSz (int sz) |
Set the wavefront size in pixels. More... | |
int | setPupil (imageT &pupil) |
Set the real pupil mask. More... | |
int | loadPupil (const std::string &pupilFile) |
Load the real pupil mask from a FITS file. More... | |
int | loadCoronagraph (const std::string &cName) |
Load the components of the coronagraph (just a pupil) based in its base name. More... | |
int | propagate (complexFieldT &pupilPlane) |
Propagate the given pupil-plane wavefront through the coronagraph to the exit pupil plane. More... | |
int | propagate (imageT &fpIntensity, complexFieldT &pupilPlane) |
Propagate the given pupil-plane wavefront through the coronagraph to the exit pupil plane, and then to the final focal plane. More... | |
int | propagateNC (complexFieldT &pupilPlane) |
Propagate the given pupil-plane wavefront without the coronagraph. More... | |
int | propagateNC (imageT &fpIntensity, complexFieldT &pupilPlane) |
Propagate the given pupil-plane wavefront without the coronagraph to the exit pupil plane, and then to the final focal plane. More... | |
Public Attributes | |
std::string | _fileDir |
The directory where coronagraph files are stored. More... | |
int | _wfSz |
The linear size of the wavefront in pixels. More... | |
fraunhoferPropagator< complexFieldT > | m_fi |
Fraunhofer propagator. More... | |
realT | m_wholePixel {0} |
Determines how the image is centered. More... | |
typedef imagingArray<std::complex<realT>, fftwAllocator<std::complex<realT> >, 0> mx::wfp::idealCoronagraph< _realT >::complexFieldT |
The wavefront complex field type.
Definition at line 64 of file idealCoronagraph.hpp.
typedef std::complex<realT> mx::wfp::idealCoronagraph< _realT >::complexT |
The complex floating point type.
Definition at line 61 of file idealCoronagraph.hpp.
typedef Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic> mx::wfp::idealCoronagraph< _realT >::imageT |
The image type.
Definition at line 67 of file idealCoronagraph.hpp.
typedef _realT mx::wfp::idealCoronagraph< _realT >::realT |
The real floating point type.
Definition at line 58 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::loadCoronagraph | ( | const std::string & | cName | ) |
Load the components of the coronagraph (just a pupil) based in its base name.
Looks in _filDir for the files.
cName | The name of the coronagraph, without directory or file extensions |
Definition at line 206 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::loadPupil | ( | const std::string & | pupilFile | ) |
Load the real pupil mask from a FITS file.
The input mask does not have to be the same size as wfSz, as the stored mask will be padded.
[in] | pupilFile | the FITS file containing the pupil mask. |
Definition at line 191 of file idealCoronagraph.hpp.
References mx::fits::fitsFile< dataT >::read().
int mx::wfp::idealCoronagraph< realT >::propagate | ( | complexFieldT & | pupilPlane | ) |
Propagate the given pupil-plane wavefront through the coronagraph to the exit pupil plane.
pupilPlane | [in.out] The wavefront at the input pupil plane. It is modified by the coronagraph. |
Definition at line 222 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::propagate | ( | imageT & | fpIntensity, |
complexFieldT & | pupilPlane | ||
) |
Propagate the given pupil-plane wavefront through the coronagraph to the exit pupil plane, and then to the final focal plane.
[out] | fpIntensity | The intensity image in the focal plane. This should be pre-allocated. |
pupilPlane | [in.out] The wavefront at the input pupil plane. It is modified by the coronagraph. |
Definition at line 244 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::propagateNC | ( | complexFieldT & | pupilPlane | ) |
Propagate the given pupil-plane wavefront without the coronagraph.
For the ideal coronagraph nothing is done. This method is included for compliance with with the coronagraph interface.
pupilPlane | [in.out] The wavefront at the input pupil plane. It is un-modified. |
Definition at line 261 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::propagateNC | ( | imageT & | fpIntensity, |
complexFieldT & | pupilPlane | ||
) |
Propagate the given pupil-plane wavefront without the coronagraph to the exit pupil plane, and then to the final focal plane.
For the ideal coronagraph nothing is done to the input wavefront.
[out] | fpIntensity | The intensity image in the focal plane. This should be pre-allocated. |
pupilPlane | [in.out] The wavefront at the input pupil plane. It is un-modified. |
Definition at line 268 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< realT >::setPupil | ( | imageT & | pupil | ) |
Set the real pupil mask.
The input mask does not have to be the same size as wfSz, as the stored mask will be padded.
[in] | pupil | the pupil mask. |
Definition at line 176 of file idealCoronagraph.hpp.
References mx::improc::padImage().
int mx::wfp::idealCoronagraph< realT >::wfSz |
Get the wavefront size in pixels.
Definition at line 159 of file idealCoronagraph.hpp.
void mx::wfp::idealCoronagraph< realT >::wfSz | ( | int | sz | ) |
Set the wavefront size in pixels.
[in] | sz | is the new size |
Definition at line 165 of file idealCoronagraph.hpp.
std::string mx::wfp::idealCoronagraph< _realT >::_fileDir |
The directory where coronagraph files are stored.
Definition at line 70 of file idealCoronagraph.hpp.
int mx::wfp::idealCoronagraph< _realT >::_wfSz |
The linear size of the wavefront in pixels.
Definition at line 73 of file idealCoronagraph.hpp.
fraunhoferPropagator<complexFieldT> mx::wfp::idealCoronagraph< _realT >::m_fi |
Fraunhofer propagator.
Definition at line 80 of file idealCoronagraph.hpp.
realT mx::wfp::idealCoronagraph< _realT >::m_wholePixel {0} |
Determines how the image is centered.
If 0 (default) it is at 0.5*(wfSz-1), if true it is shifted by 0.5*m_wholePixel in each axis. This is passed to fraunhoferPropagator when it is resized.
Definition at line 86 of file idealCoronagraph.hpp.