mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::AO::sim::pyramidSensor< _realT, _detectorT > Class Template Reference

template<typename _realT, typename _detectorT>
class mx::AO::sim::pyramidSensor< _realT, _detectorT >

A Pyramid Sensor Simulation.

Template Parameters
_realTis the real floating point type used for calculations
_detectorTis the detector used to record the PyWFS image. Must conform to the mx::AO::sim detector interface specifications.

Definition at line 63 of file pyramidSensor.hpp.

#include <ao/sim/pyramidSensor.hpp>

Public Types

typedef _realT realT
 The real floating point type used for calculations.
 
typedef std::complex< realTcomplexT
 The complex floating point type used for calculations.
 
typedef wavefront< realTwavefrontT
 The wavefront data type.
 
typedef wfp::imagingArray< std::complex< realT >, wfp::fftwAllocator< std::complex< realT > >, 0 > complexFieldT
 The wavefront complex field type.
 
typedef _detectorT detectorT
 The wavefront sensor detector image type.
 
typedef wavefront< floatT > wavefrontT
 The wavefront data type.
 
typedef mx::imagingArray< std::complex< floatT >, fftwAllocator< std::complex< floatT > >, 0 > complexFieldT
 The wavefront complex field type.
 
typedef Eigen::Array< floatT, Eigen::Dynamic, Eigen::Dynamic > wfsImageT
 The wavefront sensor detector image type.
 

Public Member Functions

 pyramidSensor ()
 Default c'tor.
 
 pyramidSensor ()
 Default c'tor.
 
int wfSz ()
 Get the wavefront size in pixels.
 
void wfSz (int sz)
 Set the wavefront size in pixels.
 
int detRows ()
 Get the detector rows in pixels.
 
int detCols ()
 Get the detector columns in pixels.
 
void detSize (int nrows, int ncols)
 Set the detector columns in pixels.
 
floatT lambda ()
 Get the PyWFS central wavelength.
 
void lambda (floatT l)
 Set the PyWFS central wavelength.
 
int iTime ()
 Get the PyWFS integration time, in time steps.
 
void iTime (int it)
 Set the PyWFS integration time, in time steps.
 
int roTime ()
 Get the PyWFS detector readout time, in time steps.
 
void roTime (int rt)
 Set the PyWFS detector readout time, in time steps.
 
floatT simStep ()
 Get the simulation step-size, in seconds.
 
void simStep (floatT st)
 Set the simulation step-size, in seconds.
 
bool senseWavefront (wavefrontT &pupilPlane)
 Sense the wavefront aberrations.
 
bool senseWavefrontCal (wavefrontT &pupilPlane)
 Sense the wavefront aberrations in a calibration mode.
 
int wfPS ()
 Get the wavefront pixel scale in meters per pixel.
 
void wfPS (floatT ps)
 Set the wavefront pixel scale in meters per pixel.
 
floatT D ()
 Get the telescope diameter.
 
void D (floatT d)
 Set the telescope diameter.
 
int modSteps ()
 Get the number of modulation steps.
 
void modSteps (int mSt)
 Set the number of modulation steps.
 
floatT modRadius ()
 Get the radius of modulation.
 
void modRadius (floatT mR)
 Set the modulation radius.
 
int quadSz ()
 Get the quadrant size in pixels.
 
void quadSz (int sz)
 Set the quadrant size in pixels.
 

Public Attributes

std::vector< complexFieldTm_th_tiltedPlane
 Thread-local modulated wavefront.
 
std::vector< complexFieldTm_th_focalPlane
 Thread-local tip wavefront, used for FFT tilting.
 
std::vector< typename wfsImageT< realT >::imageT > m_th_focalImage
 Thread-local tip image.
 
std::vector< complexFieldTm_th_sensorPlane
 Thread-local sensor-pupil-plane wavefront.
 
std::vector< typename wfsImageT< realT >::imageT > m_th_sensorImage
 Thread-local sensor-pupil-plane intensity image.
 
wfsImageT< realTm_wfsImage
 The image formed by the WFS.
 
wfsImageT detectorImage
 The image on the detector, resized from wfsImage.
 

Protected Attributes

int _wfSz
 Size of the wavefront in pixels.
 
int _detRows
 
int _detCols
 
floatT _lambda
 Central wavelength, in meters.
 
int _iTime
 Integration time in loop steps.
 
int _roTime
 Readout time in loop steps.
 
floatT _simStep
 The simulation stepsize in seconds.
 
floatT _wfPS
 Wavefront pixel scale, in meters/pixel.
 
floatT _D
 Telescope diameter, in meters.
 
int _modSteps
 Number of steps in the modulation simulation.
 
floatT _modRadius
 Radius of the modulation in pixels.
 
int _quadSz
 The size of the PyWFS quadrant.
 
wfsImageT wfsImage
 The image formed by the WFS.
 

Standard WFS Interface

uint32_t m_wfSz { 0 }
 Size of the wavefront in pixels.
 
uint32_t m_detRows { 0 }
 
uint32_t m_detCols { 0 }
 
realT m_lambda { 0 }
 Central wavelength, in meters.
 
std::vector< realTm_wavelengths
 Vector of wavelengths in the WFS bandpass.
 
std::vector< realT_wavelengthWeights
 The relative weights of the wavelengths.
 
int m_iTime { 1 }
 Integration time in loop steps.
 
int m_roTime { 1 }
 Readout time in loop steps.
 
realT m_simStep { 0.001 }
 The simulation stepsize in seconds.
 
detectorT detector
 The WFS detector.
 
wfsImageT< realTdetectorImage
 The image on the detector, resized from m_wfsImage.
 
int wfSz ()
 Get the wavefront size in pixels.
 
void wfSz (const uint32_t &sz)
 Set the wavefront size in pixels.
 
uint32_t detRows ()
 Get the detector rows in pixels.
 
uint32_t detCols ()
 Get the detector columns in pixels.
 
void detSize (const uint32_t &nrows, const uint32_t &ncols)
 Set the detector columns in pixels.
 
realT lambda ()
 Get the PyWFS central wavelength.
 
void lambda (const realT &l)
 Set the PyWFS central wavelength.
 
int iTime ()
 Get the PyWFS integration time, in time steps.
 
void iTime (const uint32_t &it)
 Set the PyWFS integration time, in time steps.
 
int roTime ()
 Get the PyWFS detector readout time, in time steps.
 
void roTime (const uint32_t &rt)
 Set the PyWFS detector readout time, in time steps.
 
realT simStep ()
 Get the simulation step-size, in seconds.
 
void simStep (const realT &st)
 Set the simulation step-size, in seconds.
 
template<typename AOSysT >
void linkSystem (AOSysT &AOSys)
 Link this WFS to an AO system simulation.
 
bool senseWavefront (wavefrontT &pupilPlane)
 Sense the wavefront aberrations.
 
bool senseWavefrontCal (wavefrontT &pupilPlane)
 Sense the wavefront aberrations in calibration mode.
 

Pyramid Sensor Interface

uint32_t m_nSides {4}
 Number of sides in the pyramid.
 
uint32_t m_pupilSz { 0 }
 The size of the pupil in wavefront pixels.
 
realT m_pupilSep {1}
 The separation of the pupil images in fraction of a pupil. 0 <= m_pupilSep, default 1.
 
realT m_angleOffset {0}
 The angle by which to offset the pupils, in degrees. Default is 0.
 
uint32_t m_imageSz {0}
 The size of the resulting PyWFS image in wavefront pixels.
 
bool m_imageSzAuto { true }
 Flag to track if m_imageSz should be set to 0.
 
realT m_wfPS {0}
 Wavefront pixel scale, in meters/pixel.
 
realT m_D {0}
 Telescope diameter, in meters.
 
uint32_t m_modSteps { 20 }
 
realT m_perStep { 1 }
 
realT m_modRadius { 3.0 }
 Radius of the modulation in pixels.
 
int nSides ()
 Get the number of pyramid sides.
 
void nSides (const uint32_t &ns)
 Set the number of sides on the pyramid.
 
realT perStep ()
 Get the minimum number of modulation steps.
 
void perStep (const realT &prStp)
 Set the minimum number of modulation steps.
 
int modSteps ()
 Get the number of modulation steps.
 
realT modRadius ()
 Get the radius of modulation.
 
void modRadius (const realT &mR)
 Set the modulation radius.
 
realT wfPS ()
 Get the wavefront pixel scale in meters per pixel.
 
realT D ()
 Get the telescope diameter.
 
void D (const realT &d)
 Set the telescope diameter.
 
uint32_t pupilSz ()
 Get the pupil size in pixels.
 
void pupilSz (const uint32_t &sz)
 Set the pupil size in pixels.
 
realT pupilSep ()
 
void pupilSep (const realT &sz)
 
realT angleOffset ()
 Get the angle offset.
 
void angleOffset (const realT &ao)
 Set the angle offset.
 
uint32_t imageSz ()
 Get the image size in wavefront pixels.
 
void imageSz (const uint32_t &is)
 Set the image size in wavefront pixels.
 
bool imageSzAuto ()
 Get the value of the image size auto flag.
 
void imageSzAuto (const bool &ia)
 Set the value of the image size auto flag.
 

Member Typedef Documentation

◆ complexFieldT [1/2]

template<typename _realT , typename _detectorT >
typedef wfp::imagingArray<std::complex<realT>, wfp::fftwAllocator<std::complex<realT> >, 0> mx::AO::sim::pyramidSensor< _realT, _detectorT >::complexFieldT

The wavefront complex field type.

Definition at line 76 of file pyramidSensor.hpp.

◆ complexFieldT [2/2]

template<typename _realT , typename _detectorT >
typedef mx::imagingArray<std::complex<floatT>, fftwAllocator<std::complex<floatT> >, 0> mx::AO::sim::pyramidSensor< _realT, _detectorT >::complexFieldT

The wavefront complex field type.

Definition at line 47 of file pyramidSensorSepQuad.hpp.

◆ complexT

template<typename _realT , typename _detectorT >
typedef std::complex<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::complexT

The complex floating point type used for calculations.

Definition at line 70 of file pyramidSensor.hpp.

◆ detectorT

template<typename _realT , typename _detectorT >
typedef _detectorT mx::AO::sim::pyramidSensor< _realT, _detectorT >::detectorT

The wavefront sensor detector image type.

Definition at line 79 of file pyramidSensor.hpp.

◆ realT

template<typename _realT , typename _detectorT >
typedef _realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::realT

The real floating point type used for calculations.

Definition at line 67 of file pyramidSensor.hpp.

◆ wavefrontT [1/2]

template<typename _realT , typename _detectorT >
typedef wavefront<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::wavefrontT

The wavefront data type.

Definition at line 73 of file pyramidSensor.hpp.

◆ wavefrontT [2/2]

template<typename _realT , typename _detectorT >
typedef wavefront<floatT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::wavefrontT

The wavefront data type.

Definition at line 44 of file pyramidSensorSepQuad.hpp.

◆ wfsImageT

template<typename _realT , typename _detectorT >
typedef Eigen::Array<floatT, Eigen::Dynamic, Eigen::Dynamic> mx::AO::sim::pyramidSensor< _realT, _detectorT >::wfsImageT

The wavefront sensor detector image type.

Definition at line 50 of file pyramidSensorSepQuad.hpp.

Constructor & Destructor Documentation

◆ pyramidSensor() [1/2]

template<typename _floatT , typename _detectorT >
mx::AO::sim::pyramidSensor< _floatT, _detectorT >::pyramidSensor ( )

Default c'tor.

Definition at line 450 of file pyramidSensor.hpp.

◆ pyramidSensor() [2/2]

template<typename _realT , typename _detectorT >
mx::AO::sim::pyramidSensor< _realT, _detectorT >::pyramidSensor ( )

Default c'tor.

Member Function Documentation

◆ angleOffset() [1/2]

template<typename realT , typename detectorT >
realT mx::AO::sim::pyramidSensor< realT, detectorT >::angleOffset ( )

Get the angle offset.

See m_angleOffset

Returns
m_angleOffset

Definition at line 822 of file pyramidSensor.hpp.

◆ angleOffset() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::angleOffset ( const realT ao)

Set the angle offset.

See m_angleOffset.

Parameters
aothe new angle offset.

Definition at line 828 of file pyramidSensor.hpp.

◆ D() [1/4]

template<typename _floatT , typename _detectorT >
_floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::D ( )

Get the telescope diameter.

Returns
the telescope diameter in meters

Definition at line 684 of file pyramidSensor.hpp.

◆ D() [2/4]

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::D ( )

Get the telescope diameter.

Returns
the telescope diameter in meters

◆ D() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::D ( const realT d)

Set the telescope diameter.

Parameters
dis the new size in meters

Definition at line 690 of file pyramidSensor.hpp.

◆ D() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::D ( floatT  d)

Set the telescope diameter.

Parameters
dis the new size in meters

Definition at line 375 of file pyramidSensorSepQuad.hpp.

◆ detCols() [1/2]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detCols ( )

Get the detector columns in pixels.

Returns
m_detCols

Definition at line 485 of file pyramidSensor.hpp.

◆ detCols() [2/2]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::detCols ( )

Get the detector columns in pixels.

Returns
_detCols

◆ detRows() [1/2]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detRows ( )

Get the detector rows in pixels.

Returns
m_detRows

Definition at line 479 of file pyramidSensor.hpp.

◆ detRows() [2/2]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::detRows ( )

Get the detector rows in pixels.

Returns
_detRows

◆ detSize() [1/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::detSize ( const uint32_t &  nrows,
const uint32_t &  ncols 
)

Set the detector columns in pixels.

Parameters
nrowsThe number of rows
ncolsThe number of columns

Definition at line 491 of file pyramidSensor.hpp.

◆ detSize() [2/2]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detSize ( int  nrows,
int  ncols 
)

Set the detector columns in pixels.

Parameters
szis the new size

Definition at line 324 of file pyramidSensorSepQuad.hpp.

◆ imageSz() [1/2]

template<typename realT , typename detectorT >
uint32_t mx::AO::sim::pyramidSensor< realT, detectorT >::imageSz ( )

Get the image size in wavefront pixels.

This is the size of the image in un-binned wavefront space

Returns
m_imageSz

Definition at line 842 of file pyramidSensor.hpp.

◆ imageSz() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::imageSz ( const uint32_t &  is)

Set the image size in wavefront pixels.

This is the size of the image in un-binned wavefront space Setting a non-zero value also sets m_imageSizeAuto to false. Setting 0 also sets m_imageSizeAuto to true.

Definition at line 853 of file pyramidSensor.hpp.

◆ imageSzAuto() [1/2]

template<typename realT , typename detectorT >
bool mx::AO::sim::pyramidSensor< realT, detectorT >::imageSzAuto ( )

Get the value of the image size auto flag.

This controls whether image size is set automatically

Returns
m_imageSz

Definition at line 876 of file pyramidSensor.hpp.

◆ imageSzAuto() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::imageSzAuto ( const bool &  ia)

Set the value of the image size auto flag.

This controls whether image size is set automatically

Definition at line 882 of file pyramidSensor.hpp.

◆ iTime() [1/4]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::iTime ( )

Get the PyWFS integration time, in time steps.

Definition at line 529 of file pyramidSensor.hpp.

◆ iTime() [2/4]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::iTime ( )

Get the PyWFS integration time, in time steps.

◆ iTime() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::iTime ( const uint32_t &  it)

Set the PyWFS integration time, in time steps.

Parameters
itthe new integration time

Definition at line 535 of file pyramidSensor.hpp.

References mxThrowException.

◆ iTime() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::iTime ( int  it)

Set the PyWFS integration time, in time steps.

Definition at line 466 of file pyramidSensorSepQuad.hpp.

◆ lambda() [1/4]

template<typename _floatT , typename _detectorT >
_floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::lambda ( )

Get the PyWFS central wavelength.

Returns
the central wavelength in meters

Definition at line 508 of file pyramidSensor.hpp.

◆ lambda() [2/4]

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::lambda ( )

Get the PyWFS central wavelength.

Returns
the central wavelength in meters

◆ lambda() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::lambda ( const realT l)

Set the PyWFS central wavelength.

Parameters
lThe central wavelength, in meters

Definition at line 514 of file pyramidSensor.hpp.

◆ lambda() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::lambda ( floatT  l)

Set the PyWFS central wavelength.

Parameters
dis the new central wavelength in meters

Definition at line 343 of file pyramidSensorSepQuad.hpp.

◆ linkSystem()

template<typename _floatT , typename _detectorT >
template<typename AOSysT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::linkSystem ( AOSysT &  AOSys)

Link this WFS to an AO system simulation.

Parameters
AOSysThe AO system simulation to link to

Definition at line 584 of file pyramidSensor.hpp.

◆ modRadius() [1/4]

template<typename _floatT , typename _detectorT >
_floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modRadius ( )

Get the radius of modulation.

Returns
m_modRadius;

Definition at line 748 of file pyramidSensor.hpp.

◆ modRadius() [2/4]

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::modRadius ( )

Get the radius of modulation.

Returns
_modRadius;

◆ modRadius() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::modRadius ( const realT mR)

Set the modulation radius.

Parameters
mRis the new modulation radius in lambda/D
Parameters
[in]mRthe new value of modulation radius

Definition at line 754 of file pyramidSensor.hpp.

◆ modRadius() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modRadius ( floatT  mR)

Set the modulation radius.

Parameters
mRis the new modulation radius in lambda/D

Definition at line 401 of file pyramidSensorSepQuad.hpp.

◆ modSteps() [1/3]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modSteps ( )

Get the number of modulation steps.

Returns
m_modSteps, which is defined by perStep.

Definition at line 742 of file pyramidSensor.hpp.

◆ modSteps() [2/3]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::modSteps ( )

Get the number of modulation steps.

Returns
_modSteps;

◆ modSteps() [3/3]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modSteps ( int  mSt)

Set the number of modulation steps.

Parameters
mStis the new number of modulation steps

Definition at line 387 of file pyramidSensorSepQuad.hpp.

◆ nSides() [1/2]

template<typename realT , typename detectorT >
int mx::AO::sim::pyramidSensor< realT, detectorT >::nSides ( )

Get the number of pyramid sides.

Returns
the number of sides on the pyramid

Definition at line 666 of file pyramidSensor.hpp.

◆ nSides() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::nSides ( const uint32_t &  ns)

Set the number of sides on the pyramid.

Parameters
nsThe new number of sides on the pyramid

Definition at line 672 of file pyramidSensor.hpp.

◆ perStep() [1/2]

template<typename realT , typename detectorT >
realT mx::AO::sim::pyramidSensor< realT, detectorT >::perStep ( )

Get the minimum number of modulation steps.

Returns
m_perStep;

Definition at line 711 of file pyramidSensor.hpp.

◆ perStep() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::perStep ( const realT prStp)

Set the minimum number of modulation steps.

Parameters
mStis the new number of modulation steps
Parameters
prStpThe minimum number of lamba/D per step to take

Definition at line 717 of file pyramidSensor.hpp.

References mx::math::six_fifths().

◆ pupilSep() [1/2]

template<typename realT , typename detectorT >
realT mx::AO::sim::pyramidSensor< realT, detectorT >::pupilSep ( )

Get the pupil separation as a fraction of pupil size Get the pupil separation as a fraction of pupil size This is the pupil separation in un-binned wavefront space

Returns
m_pupilSep

Definition at line 802 of file pyramidSensor.hpp.

◆ pupilSep() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::pupilSep ( const realT sz)

Set the pupil separation as a fraction of pupil size Set the pupil separation as a fraction of pupil size This is the separation of the pupils in un-binned wavefront space. See m_pupilSep.

Parameters
szthe new pupil separation.

Definition at line 808 of file pyramidSensor.hpp.

◆ pupilSz() [1/2]

template<typename realT , typename detectorT >
uint32_t mx::AO::sim::pyramidSensor< realT, detectorT >::pupilSz ( )

Get the pupil size in pixels.

This is the pupil size in un-binned wavefront space

Returns
m_pupilSz
m_pupilSz

Definition at line 763 of file pyramidSensor.hpp.

◆ pupilSz() [2/2]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::pupilSz ( const uint32_t &  sz)

Set the pupil size in pixels.

This is the size of the pupils in un-binned wavefront space. See m_pupilSz.

Parameters
szthe new pupil size.

Definition at line 769 of file pyramidSensor.hpp.

◆ quadSz() [1/2]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::quadSz ( )

Get the quadrant size in pixels.

This is the size of the quadrant in un-binned wavefront space

Returns
_quadSz

Definition at line 409 of file pyramidSensorSepQuad.hpp.

◆ quadSz() [2/2]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::quadSz ( int  sz)

Set the quadrant size in pixels.

This is the size of the quadrant in un-binned wavefront space It should be at least the size of the Pupil. Make larger than the pupil to have smaller pupil images on the PyWFS detector.

Parameters
szis the new size

Definition at line 415 of file pyramidSensorSepQuad.hpp.

◆ roTime() [1/4]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::roTime ( )

Get the PyWFS detector readout time, in time steps.

Definition at line 551 of file pyramidSensor.hpp.

◆ roTime() [2/4]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::roTime ( )

Get the PyWFS detector readout time, in time steps.

◆ roTime() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::roTime ( const uint32_t &  rt)

Set the PyWFS detector readout time, in time steps.

Parameters
rtthe new readout time

Definition at line 557 of file pyramidSensor.hpp.

References mxThrowException.

◆ roTime() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::roTime ( int  rt)

Set the PyWFS detector readout time, in time steps.

Definition at line 489 of file pyramidSensorSepQuad.hpp.

◆ senseWavefront() [1/2]

template<typename _floatT , typename _detectorT >
bool mx::AO::sim::pyramidSensor< _floatT, _detectorT >::senseWavefront ( wavefrontT pupilPlane)

Sense the wavefront aberrations.

Returns
true if a new wavefront measurement is ready.
false if still integrating.
Parameters
pupilPlaneThe input wavefront to be sensed

Definition at line 591 of file pyramidSensor.hpp.

References mx::AO::sim::wavefront< _realT >::amplitude, mx::AO::sim::wavefront< _realT >::iterNo, and mx::AO::sim::wavefront< _realT >::phase.

◆ senseWavefront() [2/2]

template<typename _realT , typename _detectorT >
bool mx::AO::sim::pyramidSensor< _realT, _detectorT >::senseWavefront ( wavefrontT pupilPlane)

Sense the wavefront aberrations.

Returns true if a new wavefront measurement is ready. Retruns false if still integrating.

◆ senseWavefrontCal() [1/2]

template<typename _floatT , typename _detectorT >
bool mx::AO::sim::pyramidSensor< _floatT, _detectorT >::senseWavefrontCal ( wavefrontT pupilPlane)

Sense the wavefront aberrations in calibration mode.

Allows for faster calibrations.

Parameters
pupilPlaneThe input wavefront to be sensed

Definition at line 642 of file pyramidSensor.hpp.

◆ senseWavefrontCal() [2/2]

template<typename _realT , typename _detectorT >
bool mx::AO::sim::pyramidSensor< _realT, _detectorT >::senseWavefrontCal ( wavefrontT pupilPlane)

Sense the wavefront aberrations in a calibration mode.

Allows for faster calibrations.

◆ simStep() [1/4]

template<typename _floatT , typename _detectorT >
_floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::simStep ( )

Get the simulation step-size, in seconds.

Definition at line 568 of file pyramidSensor.hpp.

◆ simStep() [2/4]

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::simStep ( )

Get the simulation step-size, in seconds.

◆ simStep() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::simStep ( const realT st)

Set the simulation step-size, in seconds.

Parameters
stthe new simulation step size

Definition at line 574 of file pyramidSensor.hpp.

◆ simStep() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::simStep ( floatT  st)

Set the simulation step-size, in seconds.

Definition at line 507 of file pyramidSensorSepQuad.hpp.

◆ wfPS() [1/3]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfPS ( )

Get the wavefront pixel scale in meters per pixel.

Returns
the wavefront pixel scale in meters/pixel

Definition at line 678 of file pyramidSensor.hpp.

◆ wfPS() [2/3]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::wfPS ( )

Get the wavefront pixel scale in meters per pixel.

Returns
the wavefront pixel scale in meters/pixel

◆ wfPS() [3/3]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfPS ( floatT  ps)

Set the wavefront pixel scale in meters per pixel.

Parameters
psis the pixel scale

Definition at line 363 of file pyramidSensorSepQuad.hpp.

◆ wfSz() [1/4]

template<typename _floatT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfSz ( )

Get the wavefront size in pixels.

Returns
the wavefront size in pixels

Definition at line 458 of file pyramidSensor.hpp.

◆ wfSz() [2/4]

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::wfSz ( )

Get the wavefront size in pixels.

Returns
the wavefront size in pixels

◆ wfSz() [3/4]

template<typename realT , typename detectorT >
void mx::AO::sim::pyramidSensor< realT, detectorT >::wfSz ( const uint32_t &  sz)

Set the wavefront size in pixels.

Parameters
szthe new size

Definition at line 464 of file pyramidSensor.hpp.

◆ wfSz() [4/4]

template<typename _floatT , typename _detectorT >
void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfSz ( int  sz)

Set the wavefront size in pixels.

Parameters
szis the new size

Definition at line 299 of file pyramidSensorSepQuad.hpp.

Member Data Documentation

◆ _D

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::_D
protected

Telescope diameter, in meters.

Definition at line 75 of file pyramidSensorSepQuad.hpp.

◆ _detCols

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_detCols
protected

The number of columns of the WFS detector. After forming the image the WFS detector plane is re-binned to this.

Definition at line 60 of file pyramidSensorSepQuad.hpp.

◆ _detRows

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_detRows
protected

The number of rows of the WFS detector. After forming the image the WFS detector plane is re-binned to this.

Definition at line 58 of file pyramidSensorSepQuad.hpp.

◆ _iTime

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_iTime
protected

Integration time in loop steps.

Definition at line 65 of file pyramidSensorSepQuad.hpp.

◆ _lambda

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::_lambda
protected

Central wavelength, in meters.

Definition at line 63 of file pyramidSensorSepQuad.hpp.

◆ _modRadius

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::_modRadius
protected

Radius of the modulation in pixels.

Definition at line 79 of file pyramidSensorSepQuad.hpp.

◆ _modSteps

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_modSteps
protected

Number of steps in the modulation simulation.

Definition at line 77 of file pyramidSensorSepQuad.hpp.

◆ _quadSz

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_quadSz
protected

The size of the PyWFS quadrant.

Definition at line 81 of file pyramidSensorSepQuad.hpp.

◆ _roTime

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_roTime
protected

Readout time in loop steps.

Definition at line 67 of file pyramidSensorSepQuad.hpp.

◆ _simStep

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::_simStep
protected

The simulation stepsize in seconds.

Definition at line 69 of file pyramidSensorSepQuad.hpp.

◆ _wavelengthWeights

template<typename _realT , typename _detectorT >
std::vector<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::_wavelengthWeights
protected

The relative weights of the wavelengths.

Definition at line 105 of file pyramidSensor.hpp.

◆ _wfPS

template<typename _realT , typename _detectorT >
floatT mx::AO::sim::pyramidSensor< _realT, _detectorT >::_wfPS
protected

Wavefront pixel scale, in meters/pixel.

Definition at line 73 of file pyramidSensorSepQuad.hpp.

◆ _wfSz

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::_wfSz
protected

Size of the wavefront in pixels.

Definition at line 56 of file pyramidSensorSepQuad.hpp.

◆ detector

template<typename _realT , typename _detectorT >
detectorT mx::AO::sim::pyramidSensor< _realT, _detectorT >::detector

The WFS detector.

Definition at line 190 of file pyramidSensor.hpp.

◆ detectorImage [1/2]

template<typename _realT , typename _detectorT >
wfsImageT<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::detectorImage

The image on the detector, resized from m_wfsImage.

Definition at line 193 of file pyramidSensor.hpp.

◆ detectorImage [2/2]

template<typename _realT , typename _detectorT >
wfsImageT mx::AO::sim::pyramidSensor< _realT, _detectorT >::detectorImage

The image on the detector, resized from wfsImage.

Definition at line 109 of file pyramidSensorSepQuad.hpp.

◆ m_angleOffset

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_angleOffset {0}
protected

The angle by which to offset the pupils, in degrees. Default is 0.

If this is 0, then a 4-sided pyramid makes a square as usual. If this is set to 45 degrees, then a 4-sided pyramid makes a diamond.

Definition at line 236 of file pyramidSensor.hpp.

◆ m_D

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_D {0}
protected

Telescope diameter, in meters.

Definition at line 251 of file pyramidSensor.hpp.

◆ m_detCols

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_detCols { 0 }
protected

The number of columns of the WFS detector. After forming the image the WFS detector plane is re-binned to this.

Definition at line 97 of file pyramidSensor.hpp.

◆ m_detRows

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_detRows { 0 }
protected

The number of rows of the WFS detector. After forming the image the WFS detector plane is re-binned to this.

Definition at line 94 of file pyramidSensor.hpp.

◆ m_imageSz

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_imageSz {0}
protected

The size of the resulting PyWFS image in wavefront pixels.

If m_imageSzAuto is true, this is determined by number of sides (m_nSides), the pupil size (m_pupilSz), and the pupil separation (m_pupilSep). For a 4 sided pyramid this will be the larger of 2*m_pupilSep*m_pupilSz and 2*m_pupilSz.

If , then this is used regardless of the optimum size.

Definition at line 245 of file pyramidSensor.hpp.

◆ m_imageSzAuto

template<typename _realT , typename _detectorT >
bool mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_imageSzAuto { true }
protected

Flag to track if m_imageSz should be set to 0.

Definition at line 247 of file pyramidSensor.hpp.

◆ m_iTime

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_iTime { 1 }
protected

Integration time in loop steps.

Definition at line 107 of file pyramidSensor.hpp.

◆ m_lambda

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_lambda { 0 }
protected

Central wavelength, in meters.

Definition at line 100 of file pyramidSensor.hpp.

◆ m_modRadius

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_modRadius { 3.0 }
protected

Radius of the modulation in pixels.

Definition at line 259 of file pyramidSensor.hpp.

◆ m_modSteps

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_modSteps { 20 }
protected

Number of modulation steps in one integration. Can be set explicitly, but will be calculated if m_perStep is set.

Definition at line 253 of file pyramidSensor.hpp.

◆ m_nSides

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_nSides {4}
protected

Number of sides in the pyramid.

Definition at line 202 of file pyramidSensor.hpp.

◆ m_perStep

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_perStep { 1 }
protected

The minimum number of lamba/D per step in the modulation. Smaller will result in more steps.

Definition at line 256 of file pyramidSensor.hpp.

◆ m_pupilSep

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_pupilSep {1}
protected

The separation of the pupil images in fraction of a pupil. 0 <= m_pupilSep, default 1.

This sets the center-to-center separation of the pupils images in the focal plane wavefront. Note that the separation in detector pixels then depends on the scaling between wavefront pixels (m_wfSz) and detector pixels (m_detRows and m_detCols).

This sets the size of the region in the pre-detection image that each pupil image takes up, and therefore the size of the pre-detection image. If the pupil (as defined in the input wavefront) is 60 pixels across and m_pupilSep is set to 1.06667, then there will be a 2 pixel pad around each pupil image, resulting in 4 pixels between each geometric pupil image.

For a standard 4-sided pyramid, the pre-detection image will be 2*m_pupilSep*m_pupilSz across. For other n-sided pyramids, m_pupilSep still specifies the size of the pupil image region, but the total image size will be a function of the resultant pupil positions.

If m_pupilSep is less than 1, this will produce the "flattened pyramid", with overlap between the pupil images. In this case, image size will also be set by pupilSz to ensure that there are enough pixels included to show all pupils.

Definition at line 229 of file pyramidSensor.hpp.

◆ m_pupilSz

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_pupilSz { 0 }
protected

The size of the pupil in wavefront pixels.

This is the maximum diameter of the pupil in wavefront pixels.

Definition at line 208 of file pyramidSensor.hpp.

◆ m_roTime

template<typename _realT , typename _detectorT >
int mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_roTime { 1 }
protected

Readout time in loop steps.

Definition at line 109 of file pyramidSensor.hpp.

◆ m_simStep

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_simStep { 0.001 }
protected

The simulation stepsize in seconds.

Definition at line 111 of file pyramidSensor.hpp.

◆ m_th_focalImage

template<typename _realT , typename _detectorT >
std::vector<typename wfsImageT<realT>::imageT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_th_focalImage

Thread-local tip image.

Definition at line 410 of file pyramidSensor.hpp.

◆ m_th_focalPlane

template<typename _realT , typename _detectorT >
std::vector<complexFieldT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_th_focalPlane

Thread-local tip wavefront, used for FFT tilting.

Definition at line 408 of file pyramidSensor.hpp.

◆ m_th_sensorImage

template<typename _realT , typename _detectorT >
std::vector<typename wfsImageT<realT>::imageT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_th_sensorImage

Thread-local sensor-pupil-plane intensity image.

Definition at line 415 of file pyramidSensor.hpp.

◆ m_th_sensorPlane

template<typename _realT , typename _detectorT >
std::vector<complexFieldT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_th_sensorPlane

Thread-local sensor-pupil-plane wavefront.

Definition at line 412 of file pyramidSensor.hpp.

◆ m_th_tiltedPlane

template<typename _realT , typename _detectorT >
std::vector<complexFieldT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_th_tiltedPlane

Thread-local modulated wavefront.

Definition at line 406 of file pyramidSensor.hpp.

◆ m_wavelengths

template<typename _realT , typename _detectorT >
std::vector<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_wavelengths
protected

Vector of wavelengths in the WFS bandpass.

Todo:

when the filter should be set with astrospectrum, and should re-calculate the central wavelength.

need to verify that the wavefront propagation is appropriately chromatic

Definition at line 104 of file pyramidSensor.hpp.

◆ m_wfPS

template<typename _realT , typename _detectorT >
realT mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_wfPS {0}
protected

Wavefront pixel scale, in meters/pixel.

Definition at line 249 of file pyramidSensor.hpp.

◆ m_wfsImage

template<typename _realT , typename _detectorT >
wfsImageT<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_wfsImage

The image formed by the WFS.

Definition at line 428 of file pyramidSensor.hpp.

◆ m_wfSz

template<typename _realT , typename _detectorT >
uint32_t mx::AO::sim::pyramidSensor< _realT, _detectorT >::m_wfSz { 0 }
protected

Size of the wavefront in pixels.

Definition at line 92 of file pyramidSensor.hpp.

◆ wfsImage

template<typename _realT , typename _detectorT >
wfsImageT mx::AO::sim::pyramidSensor< _realT, _detectorT >::wfsImage
protected

The image formed by the WFS.

Definition at line 254 of file pyramidSensorSepQuad.hpp.


The documentation for this class was generated from the following files: