|
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 described by Cavarroc et al. [5] 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 [30] [and Males in prep].
Definition at line 58 of file idealCoronagraph.hpp.
#include <wfp/idealCoronagraph.hpp>
Public Types | |
| typedef _realT | realT |
| The real floating point type. | |
| typedef std::complex< realT > | complexT |
| The complex floating point type. | |
| typedef imagingArray< std::complex< realT >, fftwAllocator< std::complex< realT > >, 0 > | complexFieldT |
| The wavefront complex field type. | |
| typedef Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic > | imageT |
| The image type. | |
Public Member Functions | |
| int | wfSz () |
| Get the wavefront size in pixels. | |
| void | wfSz (int sz) |
| Set the wavefront size in pixels. | |
| int | setPupil (imageT &pupil) |
| Set the real pupil mask. | |
| int | loadPupil (const std::string &pupilFile) |
| Load the real pupil mask from a FITS file. | |
| int | loadCoronagraph (const std::string &cName) |
| Load the components of the coronagraph (just a pupil) based in its base name. | |
| int | propagate (complexFieldT &pupilPlane) |
| Propagate the given pupil-plane wavefront through the coronagraph to the exit pupil plane. | |
| int | propagate (imageT &fpIntensity, complexFieldT &pupilPlane) |
| int | propagateNC (complexFieldT &pupilPlane) |
| Propagate the given pupil-plane wavefront without the coronagraph. | |
| int | propagateNC (imageT &fpIntensity, complexFieldT &pupilPlane) |
Public Attributes | |
| std::string | _fileDir |
| The directory where coronagraph files are stored. | |
| int | _wfSz |
| The linear size of the wavefront in pixels. | |
| fraunhoferPropagator< complexFieldT > | m_fi |
| Fraunhofer propagator. | |
| realT | m_wholePixel { 0 } |
| Determines how the image is centered. | |
| typedef imagingArray<std::complex<realT>, fftwAllocator<std::complex<realT> >, 0> mx::wfp::idealCoronagraph< _realT >::complexFieldT |
The wavefront complex field type.
Definition at line 67 of file idealCoronagraph.hpp.
| typedef std::complex<realT> mx::wfp::idealCoronagraph< _realT >::complexT |
The complex floating point type.
Definition at line 64 of file idealCoronagraph.hpp.
| typedef Eigen::Array<realT, Eigen::Dynamic, Eigen::Dynamic> mx::wfp::idealCoronagraph< _realT >::imageT |
The image type.
Definition at line 70 of file idealCoronagraph.hpp.
| typedef _realT mx::wfp::idealCoronagraph< _realT >::realT |
The real floating point type.
Definition at line 61 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 215 of file idealCoronagraph.hpp.
References _fileDir, loadPupil(), MXE_PARAMNOTSET, and mxError.
| 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 200 of file idealCoronagraph.hpp.
References mx::fits::fitsFile< dataT, verboseT >::read(), and setPupil().
Referenced by loadCoronagraph().
| 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 230 of file idealCoronagraph.hpp.
References MXE_SIZEERR, and mxError.
Referenced by propagate().
| 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 252 of file idealCoronagraph.hpp.
References _wfSz, m_fi, and propagate().
| 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 267 of file idealCoronagraph.hpp.
Referenced by propagateNC().
| 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 274 of file idealCoronagraph.hpp.
References _wfSz, m_fi, and propagateNC().
| 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 185 of file idealCoronagraph.hpp.
References _wfSz, MXE_PARAMNOTSET, mxError, and mx::improc::padImage().
Referenced by loadPupil().
| int mx::wfp::idealCoronagraph< realT >::wfSz | ( | ) |
Get the wavefront size in pixels.
Definition at line 169 of file idealCoronagraph.hpp.
References _wfSz.
| void mx::wfp::idealCoronagraph< realT >::wfSz | ( | int | sz | ) |
Set the wavefront size in pixels.
| [in] | sz | is the new size |
Definition at line 175 of file idealCoronagraph.hpp.
References _wfSz, m_fi, and m_wholePixel.
| std::string mx::wfp::idealCoronagraph< _realT >::_fileDir |
The directory where coronagraph files are stored.
Definition at line 73 of file idealCoronagraph.hpp.
Referenced by loadCoronagraph().
| int mx::wfp::idealCoronagraph< _realT >::_wfSz |
The linear size of the wavefront in pixels.
Definition at line 76 of file idealCoronagraph.hpp.
Referenced by propagate(), propagateNC(), setPupil(), wfSz(), and wfSz().
| fraunhoferPropagator<complexFieldT> mx::wfp::idealCoronagraph< _realT >::m_fi |
Fraunhofer propagator.
Definition at line 83 of file idealCoronagraph.hpp.
Referenced by propagate(), propagateNC(), and wfSz().
| 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 89 of file idealCoronagraph.hpp.
Referenced by wfSz().