|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A Pyramid Wavefront Sensor slope reconstructor.
Calculates slopes, normalized by total flux in the image.
Definition at line 25 of file pywfsSlopeReconstructor.hpp.
#include <ao/sim/pywfsSlopeReconstructor.hpp>
Public Types | |
| typedef Eigen::Array< floatT, -1, -1 > | imageT |
| The type of the measurement (i.e. the slope vector) | |
| typedef Eigen::Array< floatT, -1, -1 > | rmatT |
| The type of the response matrix. | |
Public Member Functions | |
| pywfsSlopeReconstructor () | |
| Default c'tor. | |
| floatT | maskRadius () |
| Get the quadrant mask radius (_maskRadius) | |
| void | maskRadius (floatT mr) |
| Set the quadrant mask radius (_maskRadius) | |
| floatT | maskObscuration () |
| Get the quadrant mask central obscuration ratio (_maskObscuration) | |
| void | maskObscuration (floatT mo) |
| Set the quadrant mask central obscuration ratio (_maskObscuration) | |
| std::string | maskFile () |
| Get the quadrant mask file name (_maskFile) | |
| void | maskFile (const std::string &mf) |
| Set the quadrant mask file name (_maskFile) | |
| floatT | calAmp () |
| Get the calibration amplitude used in response matrix acquisition (_calAmp) | |
| void | calAmp (floatT ca) |
| Set the calibration amplitude used in response matrix acquisition (_calAmp) | |
| int | nModes () |
| Get the number of modes (_nModes) | |
| int | detRows () |
| Get the number of detector rows (_detRows) | |
| void | detRows (int dr) |
| Set the number of detector rows (_detRows) | |
| int | detCols () |
| Get the number of detector columns (_detCols) | |
| void | detCols (int dc) |
| Set the number of detector columns (_detCols) | |
| void | loadRecon (std::string fname) |
| Load the reconstrutor from the specified FITS file. | |
| int | measurementSize () |
| Return the size of the unbinned measurement. | |
| template<typename measurementT , typename wfsImageT > | |
| void | calcMeasurement (measurementT &slopes, wfsImageT &wfsImage) |
| Calculate the slope measurement. | |
| template<typename measurementT , typename wfsImageT > | |
| void | reconstruct (measurementT &commandVect, wfsImageT &wfsImage) |
| Reconstruct the wavefront from the input image, producing the modal amplitude vector. | |
| void | initializeRMat (int nmodes, floatT calamp, int detrows, int detcols) |
| Initialize the response matrix for acquisition. | |
| template<typename measurementT > | |
| void | accumulateRMat (int i, measurementT &measureVec) |
| Accumalte the next measurement in the response matrix. | |
| void | saveRMat (std::string fname) |
| Write the accumulated response matrix to disk. | |
Public Attributes | |
| int | _binFact |
| The binning to apply before reconstructing. | |
Protected Member Functions | |
| void | calcMask () |
| Calculates the quadrant mask. | |
Protected Attributes | |
| Eigen::Array< floatT, -1, -1 > | _recon |
| The reconstructor matrix. | |
| floatT | _maskRadius |
| 0 is centrally obscured circle, 1 is supplied by fits files | |
| floatT | _maskObscuration |
| The central obscuration of the quadrant mask. | |
| std::string | _maskFile |
| The name of the quadrant mask file. | |
| bool | _maskMade |
| Whether or not the mask has been made. | |
| Eigen::Array< floatT, -1, -1 > | _quadMask |
| The quadrant mask. | |
| int | _measurementSize |
| The number of slopes in the measurement. | |
| floatT | _calAmp |
| The calibration amplitude used for response matrix acquisition. | |
| int | _nModes |
| The number of modes to be reconstructed. | |
| int | _detRows |
| The size of the WFS image, in rows. | |
| int | _detCols |
| The size of the WFS image, in columns. | |
| imageT | _rMat |
| The response matrix. | |
| typedef Eigen::Array<floatT, -1, -1> mx::AO::sim::pywfsSlopeReconstructor< _floatT >::imageT |
The type of the measurement (i.e. the slope vector)
The type of the WFS image
Definition at line 34 of file pywfsSlopeReconstructor.hpp.
| typedef Eigen::Array<floatT, -1, -1> mx::AO::sim::pywfsSlopeReconstructor< _floatT >::rmatT |
The type of the response matrix.
Definition at line 37 of file pywfsSlopeReconstructor.hpp.
| mx::AO::sim::pywfsSlopeReconstructor< floatT >::pywfsSlopeReconstructor | ( | ) |
Default c'tor.
Definition at line 186 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::accumulateRMat | ( | int | i, |
| measurementT & | measureVec | ||
| ) |
Accumalte the next measurement in the response matrix.
| i | the measurement index |
| measureVec | is the i-th measurement vector |
Definition at line 446 of file pywfsSlopeReconstructor.hpp.
| floatT mx::AO::sim::pywfsSlopeReconstructor< floatT >::calAmp | ( | ) |
Get the calibration amplitude used in response matrix acquisition (_calAmp)
Definition at line 239 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::calAmp | ( | floatT | ca | ) |
Set the calibration amplitude used in response matrix acquisition (_calAmp)
| ca | [in] the new calibration amplitude |
Definition at line 245 of file pywfsSlopeReconstructor.hpp.
|
protected |
Calculates the quadrant mask.
Definition at line 308 of file pywfsSlopeReconstructor.hpp.
References mx::wfp::circularPupil().
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::calcMeasurement | ( | measurementT & | slopes, |
| wfsImageT & | wfsImage | ||
| ) |
Calculate the slope measurement.
| slopes | [out] a (_measurementSize X 2) array of slopes |
| wfsImage | [in] the WFS image from which to measure the slopes |
Definition at line 340 of file pywfsSlopeReconstructor.hpp.
| int mx::AO::sim::pywfsSlopeReconstructor< floatT >::detCols | ( | ) |
Get the number of detector columns (_detCols)
Definition at line 270 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::detCols | ( | int | dc | ) |
Set the number of detector columns (_detCols)
Definition at line 276 of file pywfsSlopeReconstructor.hpp.
| int mx::AO::sim::pywfsSlopeReconstructor< floatT >::detRows | ( | ) |
Get the number of detector rows (_detRows)
Definition at line 257 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::detRows | ( | int | dr | ) |
Set the number of detector rows (_detRows)
Definition at line 263 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::initializeRMat | ( | int | nmodes, |
| floatT | calamp, | ||
| int | detrows, | ||
| int | detcols | ||
| ) |
Initialize the response matrix for acquisition.
| nmodes | the number of modes |
| calamp | the calibration amplitude |
| detrows | the number of detector rows |
| detcols | the number of detector columns |
Definition at line 428 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::loadRecon | ( | std::string | fname | ) |
Load the reconstrutor from the specified FITS file.
| fname | is the name of the FITS file, including path |
Definition at line 283 of file pywfsSlopeReconstructor.hpp.
| std::string mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskFile | ( | ) |
Get the quadrant mask file name (_maskFile)
Definition at line 225 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskFile | ( | const std::string & | mf | ) |
Set the quadrant mask file name (_maskFile)
Calling this will cause the quadrant mask to be reloaded next time it is needed.
| mf | [in] the new mask file |
Definition at line 231 of file pywfsSlopeReconstructor.hpp.
| floatT mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskObscuration | ( | ) |
Get the quadrant mask central obscuration ratio (_maskObscuration)
Definition at line 211 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskObscuration | ( | floatT | mo | ) |
Set the quadrant mask central obscuration ratio (_maskObscuration)
Calling this will cause the quadrant mask to be recalculated next time it is needed.
| mo | [in] the new central obscuration ratio |
Definition at line 217 of file pywfsSlopeReconstructor.hpp.
| floatT mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskRadius | ( | ) |
Get the quadrant mask radius (_maskRadius)
Definition at line 197 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::maskRadius | ( | floatT | mr | ) |
Set the quadrant mask radius (_maskRadius)
Calling this will cause the quadrant mask to be recalculated next time it is needed.
| mr | [in] the new mask radius |
Definition at line 203 of file pywfsSlopeReconstructor.hpp.
| int mx::AO::sim::pywfsSlopeReconstructor< floatT >::measurementSize | ( | ) |
Return the size of the unbinned measurement.
Definition at line 331 of file pywfsSlopeReconstructor.hpp.
| int mx::AO::sim::pywfsSlopeReconstructor< floatT >::nModes | ( | ) |
Get the number of modes (_nModes)
Definition at line 251 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::reconstruct | ( | measurementT & | commandVect, |
| wfsImageT & | wfsImage | ||
| ) |
Reconstruct the wavefront from the input image, producing the modal amplitude vector.
Definition at line 416 of file pywfsSlopeReconstructor.hpp.
| void mx::AO::sim::pywfsSlopeReconstructor< floatT >::saveRMat | ( | std::string | fname | ) |
Write the accumulated response matrix to disk.
| fname | the name, including path, of the response matrix |
Definition at line 461 of file pywfsSlopeReconstructor.hpp.
| int mx::AO::sim::pywfsSlopeReconstructor< _floatT >::_binFact |
The binning to apply before reconstructing.
Definition at line 68 of file pywfsSlopeReconstructor.hpp.
|
protected |
The calibration amplitude used for response matrix acquisition.
Definition at line 57 of file pywfsSlopeReconstructor.hpp.
|
protected |
The size of the WFS image, in columns.
Definition at line 62 of file pywfsSlopeReconstructor.hpp.
|
protected |
The size of the WFS image, in rows.
Definition at line 61 of file pywfsSlopeReconstructor.hpp.
|
protected |
The name of the quadrant mask file.
Definition at line 49 of file pywfsSlopeReconstructor.hpp.
|
protected |
Whether or not the mask has been made.
Definition at line 51 of file pywfsSlopeReconstructor.hpp.
|
protected |
The central obscuration of the quadrant mask.
Definition at line 47 of file pywfsSlopeReconstructor.hpp.
|
protected |
0 is centrally obscured circle, 1 is supplied by fits files
The radius of the quadrant mask
Definition at line 46 of file pywfsSlopeReconstructor.hpp.
|
protected |
The number of slopes in the measurement.
Definition at line 55 of file pywfsSlopeReconstructor.hpp.
|
protected |
The number of modes to be reconstructed.
Definition at line 59 of file pywfsSlopeReconstructor.hpp.
|
protected |
The quadrant mask.
Definition at line 53 of file pywfsSlopeReconstructor.hpp.
|
protected |
The reconstructor matrix.
Definition at line 42 of file pywfsSlopeReconstructor.hpp.
|
protected |
The response matrix.
Definition at line 64 of file pywfsSlopeReconstructor.hpp.