|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A Pyramid Sensor Simulation.
| _realT | is the real floating point type used for calculations |
| _detectorT | is the detector used to record the PyWFS image. Must conform to the mx::AO::sim detector interface specifications. |
Definition at line 69 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< realT > | complexT |
| The complex floating point type used for calculations. | |
| typedef wavefront< realT > | wavefrontT |
| The wavefront data type. | |
| typedef improc::eigenImage< std::complex< realT > > | complexFieldT |
| The wavefront complex field type. | |
| typedef wfp::fraunhoferPropagatorArrayT< realImageT, cudaGPU >::arrayT | realArrayT |
| The real array data type. | |
| typedef wfp::fraunhoferPropagatorArrayT< complexFieldT, cudaGPU >::arrayT | complexArrayT |
| The complex array data 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 constructor. | |
| ~pyramidSensor () | |
| Destructor. | |
| 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< complexArrayT > | m_th_tiltedPlane |
| Thread-local modulated wavefront. | |
| std::vector< complexArrayT > | m_th_focalPlane |
| Thread-local tip wavefront, used for FFT tilting. | |
| std::vector< realArrayT > | m_th_focalImage |
| Thread-local tip image. | |
| std::vector< complexArrayT > | m_th_sensorPlane |
| Thread-local sensor-pupil-plane wavefront. | |
| std::vector< realArrayT > | m_th_sensorImage |
| wfsImageT< realT > | m_wfsImage |
| The image formed by the WFS. | |
| wfsImageT | detectorImage |
| The image on the detector, resized from wfsImage. | |
Protected Member Functions | |
| template<int ccudaGPU = cudaGPU> | |
| complexArrayT * | uploadPupilPlaneCF (complexFieldT &cf, typename std::enable_if< ccudaGPU==0 >::type *=0) |
| Convert a cpu complex field to a pointer to its CPU memory. | |
| template<int ccudaGPU = cudaGPU> | |
| complexArrayT * | uploadPupilPlaneCF (complexFieldT &cf, typename std::enable_if< ccudaGPU==1 >::type *=0) |
| Convert a cpu complex field to a pointer to its GPU memory. | |
| template<int ccudaGPU = cudaGPU> | |
| void | accumWeightedImage (realArrayT &aim, realArrayT &im, realT w, typename std::enable_if< ccudaGPU==0 >::type *=0) |
| Accumulate an image with a weight applied on the CPU. | |
| template<int ccudaGPU = cudaGPU> | |
| void | accumWeightedImage (realArrayT &aim, realArrayT &im, realT w, typename std::enable_if< ccudaGPU==1 >::type *=0) |
| Accumulate an image with a weight applied on the GPU. | |
| template<int ccudaGPU = cudaGPU> | |
| void | downloadAccumImage (improc::eigenMap< realT > &im, realArrayT &aim, uint32_t naccums, typename std::enable_if< ccudaGPU==0 >::type *=0) |
| Scale the accumulated image by number of accumulations and assign it to the output image. CPU version. | |
| template<int ccudaGPU = cudaGPU> | |
| void | downloadAccumImage (improc::eigenMap< realT > &im, realArrayT &aim, uint32_t naccums, typename std::enable_if< ccudaGPU==1 >::type *=0) |
| Scale the accumulated image by number of accumulations and assign it to the output image. GPU version. | |
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< realT > | m_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< realT > | detectorImage |
| 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. | |
| typedef wfp::fraunhoferPropagatorArrayT<complexFieldT,cudaGPU>::arrayT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::complexArrayT |
The complex array data type.
Definition at line 92 of file pyramidSensor.hpp.
| typedef improc::eigenImage<std::complex<realT> > mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::complexFieldT |
The wavefront complex field type.
Definition at line 86 of file pyramidSensor.hpp.
| typedef mx::imagingArray<std::complex<floatT>, fftwAllocator<std::complex<floatT> >, 0> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::complexFieldT |
The wavefront complex field type.
Definition at line 47 of file pyramidSensorSepQuad.hpp.
| typedef std::complex<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::complexT |
The complex floating point type used for calculations.
Definition at line 78 of file pyramidSensor.hpp.
| typedef _detectorT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detectorT |
The wavefront sensor detector image type.
Definition at line 95 of file pyramidSensor.hpp.
| typedef wfp::fraunhoferPropagatorArrayT<realImageT,cudaGPU>::arrayT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::realArrayT |
The real array data type.
Definition at line 89 of file pyramidSensor.hpp.
| typedef _realT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::realT |
The real floating point type used for calculations.
Definition at line 75 of file pyramidSensor.hpp.
| typedef wavefront<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::wavefrontT |
The wavefront data type.
Definition at line 81 of file pyramidSensor.hpp.
| typedef wavefront<floatT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::wavefrontT |
The wavefront data type.
Definition at line 44 of file pyramidSensorSepQuad.hpp.
| typedef Eigen::Array<floatT, Eigen::Dynamic, Eigen::Dynamic> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::wfsImageT |
The wavefront sensor detector image type.
Definition at line 50 of file pyramidSensorSepQuad.hpp.
| mx::AO::sim::pyramidSensor< _floatT, _detectorT >::pyramidSensor | ( | ) |
Default constructor.
Definition at line 541 of file pyramidSensor.hpp.
| mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::~pyramidSensor | ( | ) |
Destructor.
Definition at line 549 of file pyramidSensor.hpp.
| mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::pyramidSensor | ( | ) |
Default c'tor.
|
protected |
Accumulate an image with a weight applied on the CPU.
aim += im*w
| [out] | aim | the image in which to accumulate the results |
| [in] | im | the image to weight and then add to output |
| [in] | w | the weight |
Definition at line 1433 of file pyramidSensor.hpp.
|
protected |
Accumulate an image with a weight applied on the GPU.
aim += im*w
| [out] | aim | the image in which to accumulate the results |
| [in] | im | the image to weight and then add to output |
| [in] | w | the weight |
Definition at line 1443 of file pyramidSensor.hpp.
| realT mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::angleOffset | ( | ) |
Get the angle offset.
See m_angleOffset
Definition at line 938 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::angleOffset | ( | const realT & | ao | ) |
Set the angle offset.
See m_angleOffset.
| ao | the new angle offset. |
Definition at line 944 of file pyramidSensor.hpp.
| _floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::D | ( | ) |
Get the telescope diameter.
Definition at line 797 of file pyramidSensor.hpp.
| floatT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::D | ( | ) |
Get the telescope diameter.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::D | ( | const realT & | d | ) |
Set the telescope diameter.
| d | is the new size in meters |
Definition at line 803 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::D | ( | floatT | d | ) |
Set the telescope diameter.
| d | is the new size in meters |
Definition at line 375 of file pyramidSensorSepQuad.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detCols | ( | ) |
Get the detector columns in pixels.
Definition at line 591 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detCols | ( | ) |
Get the detector columns in pixels.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detRows | ( | ) |
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detRows | ( | ) |
Get the detector rows in pixels.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::detSize | ( | const uint32_t & | nrows, |
| const uint32_t & | ncols | ||
| ) |
Set the detector columns in pixels.
| nrows | The number of rows |
| ncols | The number of columns |
Definition at line 597 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::detSize | ( | int | nrows, |
| int | ncols | ||
| ) |
Set the detector columns in pixels.
| sz | is the new size |
Definition at line 324 of file pyramidSensorSepQuad.hpp.
|
protected |
Scale the accumulated image by number of accumulations and assign it to the output image. CPU version.
im = aim / naccums
Definition at line 1460 of file pyramidSensor.hpp.
|
protected |
Scale the accumulated image by number of accumulations and assign it to the output image. GPU version.
im = aim / naccums
Definition at line 1470 of file pyramidSensor.hpp.
| uint32_t mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::imageSz | ( | ) |
Get the image size in wavefront pixels.
This is the size of the image in un-binned wavefront space
Definition at line 958 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::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 969 of file pyramidSensor.hpp.
| bool mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::imageSzAuto | ( | ) |
Get the value of the image size auto flag.
This controls whether image size is set automatically
Definition at line 992 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::imageSzAuto | ( | const bool & | ia | ) |
Set the value of the image size auto flag.
This controls whether image size is set automatically
Definition at line 998 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::iTime | ( | ) |
Get the PyWFS integration time, in time steps.
Definition at line 637 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::iTime | ( | ) |
Get the PyWFS integration time, in time steps.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::iTime | ( | const uint32_t & | it | ) |
Set the PyWFS integration time, in time steps.
| it | the new integration time |
Definition at line 643 of file pyramidSensor.hpp.
References mx::invalidconfig.
| 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.
| _floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::lambda | ( | ) |
Get the PyWFS central wavelength.
Definition at line 616 of file pyramidSensor.hpp.
| floatT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::lambda | ( | ) |
Get the PyWFS central wavelength.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::lambda | ( | const realT & | l | ) |
Set the PyWFS central wavelength.
| l | The central wavelength, in meters |
Definition at line 622 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::lambda | ( | floatT | l | ) |
Set the PyWFS central wavelength.
| d | is the new central wavelength in meters |
Definition at line 343 of file pyramidSensorSepQuad.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::linkSystem | ( | AOSysT & | AOSys | ) |
Link this WFS to an AO system simulation.
| AOSys | The AO system simulation to link to |
Definition at line 692 of file pyramidSensor.hpp.
| _floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modRadius | ( | ) |
| floatT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::modRadius | ( | ) |
Get the radius of modulation.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::modRadius | ( | const realT & | mR | ) |
Set the modulation radius.
| mR | is the new modulation radius in lambda/D |
| [in] | mR | the new value of modulation radius |
Definition at line 868 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modRadius | ( | floatT | mR | ) |
Set the modulation radius.
| mR | is the new modulation radius in lambda/D |
Definition at line 401 of file pyramidSensorSepQuad.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modSteps | ( | ) |
Get the number of modulation steps.
Definition at line 856 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::modSteps | ( | ) |
Get the number of modulation steps.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::modSteps | ( | int | mSt | ) |
Set the number of modulation steps.
| mSt | is the new number of modulation steps |
Definition at line 387 of file pyramidSensorSepQuad.hpp.
| int mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::nSides | ( | ) |
Get the number of pyramid sides.
Definition at line 778 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::nSides | ( | const uint32_t & | ns | ) |
Set the number of sides on the pyramid.
| ns | The new number of sides on the pyramid |
Definition at line 784 of file pyramidSensor.hpp.
| realT mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::perStep | ( | ) |
Get the minimum number of modulation steps.
Definition at line 825 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::perStep | ( | const realT & | prStp | ) |
Set the minimum number of modulation steps.
| mSt | is the new number of modulation steps |
| prStp | The minimum number of lamba/D per step to take |
Definition at line 831 of file pyramidSensor.hpp.
References mx::math::six_fifths().
| realT mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::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
Definition at line 918 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::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.
| sz | the new pupil separation. |
Definition at line 924 of file pyramidSensor.hpp.
| uint32_t mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::pupilSz | ( | ) |
Get the pupil size in pixels.
This is the pupil size in un-binned wavefront space
Definition at line 877 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::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.
| sz | the new pupil size. |
Definition at line 883 of file pyramidSensor.hpp.
| 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
Definition at line 409 of file pyramidSensorSepQuad.hpp.
| 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.
| sz | is the new size |
Definition at line 415 of file pyramidSensorSepQuad.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::roTime | ( | ) |
Get the PyWFS detector readout time, in time steps.
Definition at line 659 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::roTime | ( | ) |
Get the PyWFS detector readout time, in time steps.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::roTime | ( | const uint32_t & | rt | ) |
Set the PyWFS detector readout time, in time steps.
| rt | the new readout time |
Definition at line 665 of file pyramidSensor.hpp.
References mx::invalidconfig.
| 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.
| bool mx::AO::sim::pyramidSensor< _floatT, _detectorT >::senseWavefront | ( | wavefrontT & | pupilPlane | ) |
Sense the wavefront aberrations.
| pupilPlane | The input wavefront to be sensed |
Definition at line 699 of file pyramidSensor.hpp.
References mx::AO::sim::wavefront< _realT >::amplitude, mx::AO::sim::wavefront< _realT >::iterNo, and mx::AO::sim::wavefront< _realT >::phase.
| bool mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::senseWavefront | ( | wavefrontT & | pupilPlane | ) |
Sense the wavefront aberrations.
Returns true if a new wavefront measurement is ready. Retruns false if still integrating.
| bool mx::AO::sim::pyramidSensor< _floatT, _detectorT >::senseWavefrontCal | ( | wavefrontT & | pupilPlane | ) |
Sense the wavefront aberrations in calibration mode.
Allows for faster calibrations.
| pupilPlane | The input wavefront to be sensed |
Definition at line 753 of file pyramidSensor.hpp.
| bool mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::senseWavefrontCal | ( | wavefrontT & | pupilPlane | ) |
Sense the wavefront aberrations in a calibration mode.
Allows for faster calibrations.
| _floatT mx::AO::sim::pyramidSensor< _floatT, _detectorT >::simStep | ( | ) |
Get the simulation step-size, in seconds.
Definition at line 676 of file pyramidSensor.hpp.
| floatT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::simStep | ( | ) |
Get the simulation step-size, in seconds.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::simStep | ( | const realT & | st | ) |
Set the simulation step-size, in seconds.
| st | the new simulation step size |
Definition at line 682 of file pyramidSensor.hpp.
| 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.
|
protected |
Convert a cpu complex field to a pointer to its CPU memory.
This just returns a pointer to the input array
| [in] | cf | the CPU complex field |
Definition at line 1415 of file pyramidSensor.hpp.
|
protected |
Convert a cpu complex field to a pointer to its GPU memory.
This uploads the input array to the device and returns a cudaPtr.
| [in] | cf | the CPU complex field |
Definition at line 1424 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfPS | ( | ) |
Get the wavefront pixel scale in meters per pixel.
Definition at line 791 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::wfPS | ( | ) |
Get the wavefront pixel scale in meters per pixel.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfPS | ( | floatT | ps | ) |
Set the wavefront pixel scale in meters per pixel.
| ps | is the pixel scale |
Definition at line 363 of file pyramidSensorSepQuad.hpp.
| int mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfSz | ( | ) |
Get the wavefront size in pixels.
Definition at line 564 of file pyramidSensor.hpp.
| int mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::wfSz | ( | ) |
Get the wavefront size in pixels.
| void mx::AO::sim::pyramidSensor< realT, detectorT, cudaGPU >::wfSz | ( | const uint32_t & | sz | ) |
Set the wavefront size in pixels.
| sz | the new size |
Definition at line 570 of file pyramidSensor.hpp.
| void mx::AO::sim::pyramidSensor< _floatT, _detectorT >::wfSz | ( | int | sz | ) |
Set the wavefront size in pixels.
| sz | is the new size |
Definition at line 299 of file pyramidSensorSepQuad.hpp.
|
protected |
Telescope diameter, in meters.
Definition at line 75 of file pyramidSensorSepQuad.hpp.
|
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.
|
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.
|
protected |
Integration time in loop steps.
Definition at line 65 of file pyramidSensorSepQuad.hpp.
|
protected |
Central wavelength, in meters.
Definition at line 63 of file pyramidSensorSepQuad.hpp.
|
protected |
Radius of the modulation in pixels.
Definition at line 79 of file pyramidSensorSepQuad.hpp.
|
protected |
Number of steps in the modulation simulation.
Definition at line 77 of file pyramidSensorSepQuad.hpp.
|
protected |
The size of the PyWFS quadrant.
Definition at line 81 of file pyramidSensorSepQuad.hpp.
|
protected |
Readout time in loop steps.
Definition at line 67 of file pyramidSensorSepQuad.hpp.
|
protected |
The simulation stepsize in seconds.
Definition at line 69 of file pyramidSensorSepQuad.hpp.
|
protected |
The relative weights of the wavelengths.
Definition at line 124 of file pyramidSensor.hpp.
|
protected |
Wavefront pixel scale, in meters/pixel.
Definition at line 73 of file pyramidSensorSepQuad.hpp.
|
protected |
Size of the wavefront in pixels.
Definition at line 56 of file pyramidSensorSepQuad.hpp.
| detectorT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detector |
The WFS detector.
Definition at line 209 of file pyramidSensor.hpp.
| wfsImageT<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detectorImage |
The image on the detector, resized from m_wfsImage.
Definition at line 212 of file pyramidSensor.hpp.
| wfsImageT mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::detectorImage |
The image on the detector, resized from wfsImage.
Definition at line 109 of file pyramidSensorSepQuad.hpp.
|
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 255 of file pyramidSensor.hpp.
|
protected |
Telescope diameter, in meters.
Definition at line 270 of file pyramidSensor.hpp.
|
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 116 of file pyramidSensor.hpp.
|
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 113 of file pyramidSensor.hpp.
|
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 264 of file pyramidSensor.hpp.
|
protected |
Flag to track if m_imageSz should be set to 0.
Definition at line 266 of file pyramidSensor.hpp.
|
protected |
Integration time in loop steps.
Definition at line 126 of file pyramidSensor.hpp.
|
protected |
Central wavelength, in meters.
Definition at line 119 of file pyramidSensor.hpp.
|
protected |
Radius of the modulation in pixels.
Definition at line 278 of file pyramidSensor.hpp.
|
protected |
Number of modulation steps in one integration. Can be set explicitly, but will be calculated if m_perStep is set.
Definition at line 272 of file pyramidSensor.hpp.
|
protected |
Number of sides in the pyramid.
Definition at line 221 of file pyramidSensor.hpp.
|
protected |
The minimum number of lamba/D per step in the modulation. Smaller will result in more steps.
Definition at line 275 of file pyramidSensor.hpp.
|
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 248 of file pyramidSensor.hpp.
|
protected |
The size of the pupil in wavefront pixels.
This is the maximum diameter of the pupil in wavefront pixels.
Definition at line 227 of file pyramidSensor.hpp.
|
protected |
Readout time in loop steps.
Definition at line 128 of file pyramidSensor.hpp.
|
protected |
The simulation stepsize in seconds.
Definition at line 130 of file pyramidSensor.hpp.
| std::vector<realArrayT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_th_focalImage |
Thread-local tip image.
Definition at line 431 of file pyramidSensor.hpp.
| std::vector<complexArrayT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_th_focalPlane |
Thread-local tip wavefront, used for FFT tilting.
Definition at line 429 of file pyramidSensor.hpp.
| std::vector<realArrayT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_th_sensorImage |
Thread-local sensor-pupil-plane intensity image
Definition at line 435 of file pyramidSensor.hpp.
| std::vector<complexArrayT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_th_sensorPlane |
Thread-local sensor-pupil-plane wavefront.
Definition at line 433 of file pyramidSensor.hpp.
| std::vector<complexArrayT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_th_tiltedPlane |
Thread-local modulated wavefront.
Definition at line 427 of file pyramidSensor.hpp.
|
protected |
Vector of wavelengths in the WFS bandpass.
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 123 of file pyramidSensor.hpp.
|
protected |
Wavefront pixel scale, in meters/pixel.
Definition at line 268 of file pyramidSensor.hpp.
| wfsImageT<realT> mx::AO::sim::pyramidSensor< _realT, _detectorT, _cudaGPU >::m_wfsImage |
The image formed by the WFS.
Definition at line 452 of file pyramidSensor.hpp.
|
protected |
Size of the wavefront in pixels.
Definition at line 111 of file pyramidSensor.hpp.
|
protected |
The image formed by the WFS.
Definition at line 254 of file pyramidSensorSepQuad.hpp.