|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Class to manage the calculation of temporal PSDs of the Fourier modes in atmospheric turbulence.
Works with both basic (sines/cosines) and modified Fourier modes.
| realT | is a real floating point type for calculations. Currently must be double due to gsl_integration. |
| aosysT | is an AO system type, usually of type ao_system. |
Split off the integration parameters in a separate structure.
once integration parameters are in a separate structure, make this a class with protected members.
Definition at line 355 of file fourierTemporalPSD.hpp.
#include <ao/analysis/fourierTemporalPSD.hpp>
Public Types | |
| typedef _realT | realT |
| The type for arithmetic. | |
| typedef std::complex< realT > | complexT |
| The complex type for arithmetic. | |
| typedef fourierTemporalPSDReport< realT > | reportT |
| Quadrature report type used by this specialization. | |
Public Member Functions | |
| fourierTemporalPSD () | |
| Default c'tor. | |
| fourierTemporalPSD (const fourierTemporalPSD &)=delete | |
| Disallow copying unique workspace ownership. | |
| fourierTemporalPSD & | operator= (const fourierTemporalPSD &)=delete |
| Disallow copy assignment of unique workspace ownership. | |
| fourierTemporalPSD (fourierTemporalPSD &&) noexcept=default | |
| Move workspace ownership and evaluator state. | |
| fourierTemporalPSD & | operator= (fourierTemporalPSD &&) noexcept=default |
| Move-assign workspace ownership and evaluator state. | |
| ~fourierTemporalPSD ()=default | |
| Release owned resources. | |
| realT | fastestPeak (int m, int n) |
| Determine the frequency of the highest V-dot-k peak. | |
| error_t | singleLayerPSD (std::vector< realT > &PSD, std::vector< realT > &freq, realT m, realT n, int layer_i, int p, realT fmax=0, reportT *report=nullptr, fourierTemporalPSDPolicy policy=fourierTemporalPSDPolicy::permissive) |
| Calculate the temporal PSD for a Fourier mode for a single layer. | |
| template<bool parallel = true> | |
| error_t | multiLayerPSD (std::vector< realT > &PSD, std::vector< realT > &freq, realT m, realT n, int p, realT fmax=0, reportT *report=nullptr, fourierTemporalPSDPolicy policy=fourierTemporalPSDPolicy::permissive) |
| Calculate the temporal PSD for a Fourier mode in a multi-layer model. | |
| error_t | makePSDGrid (const std::string &dir, int mnMax, realT dFreq, realT maxFreq, realT fmax=0) |
| Calculate PSDs over a grid of spatial frequencies. | |
| int | analyzePSDGrid (const std::string &subDir, const std::string &psdDir, int mnMax, int mnCon, realT gfixed, int lpNc, realT lpRegPrecision, std::vector< realT > &mags, int lifetimeTrials=0, bool ucLifeTs=false, bool writePSDs=false, bool writeXfer=false) |
| Analyze a PSD grid under closed-loop control. | |
| int | intensityPSD (const std::string &subDir, const std::string &psdDir, const std::string &CvdPath, int mnMax, int mnCon, std::vector< realT > &mags, int lifetimeTrials, bool writePSDs) |
GSL Integration Tolerances | |
For good results it seems that absolute tolerance (absTol) needs to be 1e-10. Lower tolerances cause some frequencies to drop out, etc. Relative tolerance (relTol) seems to be less sensitive, and 1e-4 works on cases tested as of 1 Jan, 2017. See the documentation for the GSL Library integrators at (https://www.gnu.org/software/gsl/manual/htmlm_node/QAGI-adaptive-integration-on-infinite-intervals.html) | |
| void | absTol (realT at) |
| Set absolute tolerance. | |
| realT | absTol () |
| Get the current absolute tolerance. | |
| void | relTol (realT rt) |
| Set relative tolerance. | |
| realT | relTol () |
| Get the current relative tolerance. | |
Disk Storage | |
These methods handle writing to and reading from disk. The calculated PSDs are store in the mx::BinVector binary format. A grid of PSDs is specified by its directory name. The directory contains one frequency file (freq.binv), and a set of PSD files, named according to psd_<m>_<n>_.binv. | |
| int | getGridFreq (std::vector< realT > &freq, const std::string &dir) |
| Get the frequency scale for a PSD grid. | |
| int | getGridPSD (std::vector< realT > &psd, const std::string &dir, int m, int n) |
| Get a single PSD from a PSD grid. | |
| int | getGridPSD (std::vector< realT > &freq, std::vector< realT > &psd, const std::string &dir, int m, int n) |
| Get both the frequency scale and a single PSD from a PSD grid. | |
Public Attributes | |
| aosysT * | m_aosys { nullptr } |
| Pointer to an AO system structure. | |
| realT | m_f { 0 } |
| the current temporal frequency | |
| realT | m_m { 0 } |
| the spatial frequency m index | |
| realT | m_n { 0 } |
| the spatial frequency n index | |
| realT | m_cq { 0 } |
| The cosine of the wind direction. | |
| realT | m_sq { 0 } |
| The sine of the wind direction. | |
| realT | m_spatialFilter { false } |
| Flag indicating if a spatial filter is applied. | |
| realT | m_f0 { 0 } |
| the Berdja boiling parameter | |
| int | m_p { 1 } |
| int | _layer_i |
| The index of the current layer. | |
| int | _useBasis |
| realT | _absTol |
| The absolute tolerance to use in the GSL integrator. | |
| realT | _relTol |
| The relative tolerance to use in the GSL integrator. | |
| int | m_mode_i |
| Projected basis mode index. | |
| Eigen::Array< realT, -1, -1 > | m_modeCoeffs |
| Coeeficients of the projection onto the Fourier modes. | |
Protected Member Functions | |
| fourierTemporalPSD (fourierTemporalPSD_detail::gslWorkspaceAllocator allocator) | |
| Construct with a custom workspace allocator. | |
| void | initialize () |
| Initialize parameters to default values. | |
| error_t | allocateWorkspace () |
| Allocate the worker workspace if it is not already available. | |
| error_t | validatePsdInputs (const std::vector< realT > &PSD, const std::vector< realT > &freq, realT m, realT n, int p, realT fmax, int layer_i, fourierTemporalPSDPolicy policy) |
| Validate state and arguments shared by single- and multilayer calculations. | |
| error_t | validateAtmosphere (int layer_i) |
| Validate the configured atmosphere and optionally a requested layer. | |
| error_t | singleLayerPSDImpl (std::vector< realT > &PSD, std::vector< realT > &freq, realT m, realT n, int layer_i, int p, realT fmax, reportT &report, fourierTemporalPSDPolicy policy) |
| Calculate a single-layer temporal PSD while the caller manages the GSL error handler. | |
Protected Attributes | |
| fourierTemporalPSD_detail::gslWorkspacePtr | m_workspace |
| Unique ownership of the GSL integration workspace used by worker instances. | |
| fourierTemporalPSD_detail::gslWorkspaceAllocator | m_workspaceAllocator { gsl_integration_workspace_alloc } |
| Allocation function used when a worker lazily creates its GSL workspace. | |
| typedef std::complex<realT> mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::complexT |
The complex type for arithmetic.
Definition at line 361 of file fourierTemporalPSD.hpp.
| typedef _realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::realT |
The type for arithmetic.
Definition at line 358 of file fourierTemporalPSD.hpp.
| typedef fourierTemporalPSDReport<realT> mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::reportT |
Quadrature report type used by this specialization.
Definition at line 364 of file fourierTemporalPSD.hpp.
| mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::fourierTemporalPSD | ( | ) |
Default c'tor.
Definition at line 719 of file fourierTemporalPSD.hpp.
References initialize(), and m_aosys.
Referenced by singleLayerPSDImpl().
|
delete |
Disallow copying unique workspace ownership.
|
defaultnoexcept |
Move workspace ownership and evaluator state.
|
default |
Release owned resources.
|
explicitprotected |
Construct with a custom workspace allocator.
| [in] | allocator | workspace allocation function |
Definition at line 726 of file fourierTemporalPSD.hpp.
References initialize(), m_aosys, and m_workspaceAllocator.
| realT mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::absTol | ( | ) |
Get the current absolute tolerance.
Definition at line 899 of file fourierTemporalPSD.hpp.
References _absTol.
| void mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::absTol | ( | realT | at | ) |
Set absolute tolerance.
| at | is the new absolute tolerance. |
Definition at line 893 of file fourierTemporalPSD.hpp.
References _absTol.
Referenced by TEST_CASE().
|
protected |
Allocate the worker workspace if it is not already available.
Definition at line 734 of file fourierTemporalPSD.hpp.
References mx::allocerr, mx::invalidconfig, m_workspace, m_workspaceAllocator, mx::internal::mxlib_error_report(), mx::noerror, and WSZ.
Referenced by singleLayerPSDImpl().
| int mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::analyzePSDGrid | ( | const std::string & | subDir, |
| const std::string & | psdDir, | ||
| int | mnMax, | ||
| int | mnCon, | ||
| realT | gfixed, | ||
| int | lpNc, | ||
| realT | lpRegPrecision, | ||
| std::vector< realT > & | mags, | ||
| int | lifetimeTrials = 0, | ||
| bool | ucLifeTs = false, | ||
| bool | writePSDs = false, | ||
| bool | writeXfer = false ) |
Analyze a PSD grid under closed-loop control.
This always analyzes the simple integrator, and can also analyze the linear predictor controller. Outputs maps of optimum gains, predictor coefficients, variances, and contrasts for a range of guide star magnitudes. Optionally calculates speckle lifetimes. Optionally writes the closed-loop PSDs and transfer functions.
| [out] | subDir | the sub-directory of psdDir where to write the results. Is created. |
| [in] | psdDir | the directory containing the grid of PSDs. |
| [in] | mnMax | the maximum value of m and n in the grid. |
| [in] | mnCon | the maximum value of m and n which can be controlled. |
| [in] | gfixed | if > 0 then this fixed gain is used in the SI. |
| [in] | lpNc | the number of linear predictor coefficients to analyze. If 0 then LP is not analyzed. |
| [in] | lpRegPrecision | the initial precision for the LP regularization algorithm. Normal value is 2. Higher is faster. Decrease if getting stuck in local minima. |
| [in] | mags | the guide star magnitudes to analyze for. |
| [in] | lifetimeTrials | [optional] number of trials used for calculating speckle lifetimes. If 0,lifetimes are not calculated. |
| [in] | ucLifeTs | [optional] flag controlling whether lifetimes are calculated for uncontrolled modes. |
| [in] | writePSDs | [optional] flag controlling if resultant PSDs are saved |
| [in] | writeXfer | [optional] flag controlling if resultant transfer functions are saved |
Definition at line 1396 of file fourierTemporalPSD.hpp.
References mx::AO::analysis::clGainOpt< _realT >::a(), mx::AO::analysis::clGainOpt< _realT >::b(), mx::AO::analysis::clGainOpt< _realT >::clETF(), mx::AO::analysis::clGainOpt< _realT >::clNTF(), mx::AO::analysis::clGainOpt< _realT >::clTF2(), mx::AO::analysis::clGainOpt< _realT >::clVariance(), mx::ioutils::createDirectories(), mx::error, mx::AO::analysis::clGainOpt< _realT >::f(), getGridPSD(), gmax, mx::ipc::ompLoopWatcher< _outputT, _printPretty, _printLoops, _printPercent, _printNLine, _time >::incrementAndOutputStatus(), m_aosys, mx::AO::analysis::clAOLinearPredictor< _realT >::m_precision0, mx::sigproc::makeFourierModeFreqs_Rect(), mx::noerror, mx::AO::analysis::clGainOpt< _realT >::optGainOpenLoop(), mx::sigproc::psdVar(), mx::AO::analysis::clAOLinearPredictor< _realT >::regularizeCoefficients(), mx::AO::analysis::wfsNoisePSD(), mx::fits::fitsFile< dataT, verboseT >::write(), and mx::ioutils::writeBinVector().
| realT mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::fastestPeak | ( | int | m, |
| int | n ) |
Determine the frequency of the highest V-dot-k peak.
| m | the spatial frequency u index |
| n | the spatial frequency v index |
Definition at line 917 of file fourierTemporalPSD.hpp.
References m_aosys.
Referenced by multiLayerPSD().
| int mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::getGridFreq | ( | std::vector< realT > & | freq, |
| const std::string & | dir ) |
Get the frequency scale for a PSD grid.
| [out] | freq | the vector to populate with the frequency scale. |
| [in] | dir | specifies the directory containing the grid. |
Definition at line 2875 of file fourierTemporalPSD.hpp.
References mx::ioutils::readBinVector().
Referenced by getGridPSD(), and intensityPSD().
| int mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::getGridPSD | ( | std::vector< realT > & | freq, |
| std::vector< realT > & | psd, | ||
| const std::string & | dir, | ||
| int | m, | ||
| int | n ) |
Get both the frequency scale and a single PSD from a PSD grid.
| [out] | freq | the vector to populate with the frequency scale. |
| [out] | psd | the vector to populate with the PSD. |
| [in] | dir | specifies the directory containing the grid. |
| [in] | m | specifies the u component of spatial frequency. |
| [in] | n | specifies the v component of spatial frequency. |
Definition at line 2892 of file fourierTemporalPSD.hpp.
References getGridFreq(), and getGridPSD().
| int mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::getGridPSD | ( | std::vector< realT > & | psd, |
| const std::string & | dir, | ||
| int | m, | ||
| int | n ) |
Get a single PSD from a PSD grid.
| [out] | psd | the vector to populate with the PSD. |
| [in] | dir | specifies the directory containing the grid. |
| [in] | m | specifies the u component of spatial frequency. |
| [in] | n | specifies the v component of spatial frequency. |
Definition at line 2883 of file fourierTemporalPSD.hpp.
References mx::ioutils::readBinVector().
Referenced by analyzePSDGrid(), getGridPSD(), and intensityPSD().
|
protected |
Initialize parameters to default values.
Definition at line 756 of file fourierTemporalPSD.hpp.
References _absTol, _relTol, and _useBasis.
Referenced by fourierTemporalPSD(), and fourierTemporalPSD().
| int mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::intensityPSD | ( | const std::string & | subDir, |
| const std::string & | psdDir, | ||
| const std::string & | CvdPath, | ||
| int | mnMax, | ||
| int | mnCon, | ||
| std::vector< realT > & | mags, | ||
| int | lifetimeTrials, | ||
| bool | writePSDs ) |
| [in] | mnMax | the maximum value of m and n in the grid. |
| [in] | mnCon | the maximum value of m and n which can be controlled. |
| [in] | mags | the guide star magnitudes |
| [in] | lifetimeTrials | [optional] number of trials used for calculating speckle lifetimes. If 0, lifetimes are not calculated. |
| [in] | writePSDs | [optional] flag controlling if resultant PSDs are saved |
Definition at line 2183 of file fourierTemporalPSD.hpp.
References mx::sigproc::augment1SidedPSD(), mx::sigproc::augment1SidedPSDFreq(), backward, mx::error, getGridFreq(), getGridPSD(), mx::math::half_pi(), mx::sigproc::window::hann(), mx::improc::eigenCube< dataT >::image(), mx::ipc::ompLoopWatcher< _outputT, _printPretty, _printLoops, _printPercent, _printNLine, _time >::incrementAndOutputStatus(), m_aosys, mx::sigproc::makeFourierModeFreqs_Rect(), mx::sigproc::normPSD(), mx::sigproc::psdVar(), mx::fits::fitsFile< dataT, verboseT >::read(), mx::ioutils::readBinVector(), mx::math::randomT< typeT, _ranengT, _randistT >::seed(), mx::sigproc::averagePeriodogram< realT >::size(), mx::math::vectorMeanSub(), mx::math::vectorVariance(), mx::AO::analysis::wfsNoisePSD(), mx::sigproc::averagePeriodogram< realT >::win(), and mx::fits::fitsFile< dataT, verboseT >::write().
| error_t mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::makePSDGrid | ( | const std::string & | dir, |
| int | mnMax, | ||
| realT | dFreq, | ||
| realT | maxFreq, | ||
| realT | fmax = 0 ) |
Calculate PSDs over a grid of spatial frequencies.
The grid of spatial frequencies is square, set by the maximum value of m and n.
The PSDs are written as mx::binVector binary files to a directory. We do not use FITS since this adds overhead and cfitisio handles parallelization poorly due to the limitation on number of created file pointers.
Inputs and AO-system state are validated before any output is created. A positive fmax switches each PSD to its asymptotic power-law tail above that frequency; zero selects the multilayer default cutoff. Calculation and write failures are collected by spatial-mode index and the first failure in grid order is returned after the parallel loop. Files completed before a calculation or write failure are retained.
| [in] | dir | the directory for output of the PSDs |
| [in] | mnMax | the positive maximum value of m and n in the grid |
| [in] | dFreq | the positive temporal frequency spacing |
| [in] | maxFreq | the positive maximum temporal frequency to calculate |
| [in] | fmax | maximum exactly calculated frequency, or 0 for the default cutoff |
Definition at line 1235 of file fourierTemporalPSD.hpp.
References _absTol, _relTol, _useBasis, mx::ioutils::createDirectories(), mx::fileoerr, mx::filewerr, mx::ipc::ompLoopWatcher< _outputT, _printPretty, _printLoops, _printPercent, _printNLine, _time >::incrementAndOutputStatus(), mx::invalidarg, mx::math::isFinite(), m_aosys, mx::sigproc::makeFourierModeFreqs_Rect(), multiLayerPSD(), mx::internal::mxlib_error_report(), mx::noerror, mx::sizeerr, validatePsdInputs(), mx::math::vectorScale(), and mx::ioutils::writeBinVector().
Referenced by TEST_CASE(), and TEST_CASE().
| error_t mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::multiLayerPSD | ( | std::vector< realT > & | PSD, |
| std::vector< realT > & | freq, | ||
| realT | m, | ||
| realT | n, | ||
| int | p, | ||
| realT | fmax = 0, | ||
| reportT * | report = nullptr, | ||
| fourierTemporalPSDPolicy | policy = fourierTemporalPSDPolicy::permissive ) |
Calculate the temporal PSD for a Fourier mode in a multi-layer model.
PSD and freq must have the same nonzero size. Frequencies must be finite, nonnegative, and strictly increasing. The AO system, integration controls, and complete atmosphere are validated before calculation. A precondition failure leaves PSD unchanged and clears report when supplied.
| parallel | controls whether layers are calculated in parallel. Default is true. Set to false if this is called inside a parallelized loop, as in makePSDGrid. |
In permissive mode, recognized convergence failures are retained and summarized in report. Strict mode returns error_t::liberr if any layer has such a failure; the output PSD is incomplete and must be discarded whenever this function returns an error.
| [out] | PSD | calculated PSD |
| [in] | freq | temporal-frequency grid |
| [in] | m | first spatial-frequency index |
| [in] | n | second spatial-frequency index |
| [in] | p | Fourier-mode parity |
| [in] | fmax | maximum exactly integrated frequency, or 0 for the default cutoff |
| [out] | report | optional quadrature report |
| [in] | policy | non-convergence policy |
Definition at line 1202 of file fourierTemporalPSD.hpp.
References mx::AO::analysis::fourierTemporalPSDReport< realT >::clear(), fastestPeak(), mx::noerror, and validatePsdInputs().
Referenced by makePSDGrid(), TEST_CASE(), and TEST_CASE().
|
delete |
Disallow copy assignment of unique workspace ownership.
|
defaultnoexcept |
Move-assign workspace ownership and evaluator state.
| realT mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::relTol | ( | ) |
Get the current relative tolerance.
Definition at line 911 of file fourierTemporalPSD.hpp.
References _relTol.
| void mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::relTol | ( | realT | rt | ) |
Set relative tolerance.
| rt | is the new relative tolerance. |
Definition at line 905 of file fourierTemporalPSD.hpp.
References _relTol.
Referenced by TEST_CASE().
| error_t mx::AO::analysis::fourierTemporalPSD< realT, aosysT >::singleLayerPSD | ( | std::vector< realT > & | PSD, |
| std::vector< realT > & | freq, | ||
| realT | m, | ||
| realT | n, | ||
| int | layer_i, | ||
| int | p, | ||
| realT | fmax = 0, | ||
| reportT * | report = nullptr, | ||
| fourierTemporalPSDPolicy | policy = fourierTemporalPSDPolicy::permissive ) |
Calculate the temporal PSD for a Fourier mode for a single layer.
PSD and freq must have the same nonzero size. Frequencies must be finite, nonnegative, and strictly increasing. The AO system, integration controls, requested layer, and atmosphere are validated before calculation. A precondition or allocation failure leaves PSD unchanged and clears report when supplied.
When extending beyond fmax, up to the last 50 exactly integrated bins are averaged after projection to the first tail frequency. If fewer than 50 exact bins are available, all available exact bins are used. At least one exact bin is required to initialize the tail.
In permissive mode, finite best approximations returned with GSL_EMAXITER, GSL_EROUND, GSL_ESING, or GSL_EDIVERGE are retained and summarized in report. In strict mode the calculation continues to characterize all such failures but returns error_t::liberr and the output PSD must be discarded.
| [out] | PSD | calculated PSD |
| [in] | freq | temporal-frequency grid |
| [in] | m | first spatial-frequency index |
| [in] | n | second spatial-frequency index |
| [in] | layer_i | atmospheric-layer index |
| [in] | p | Fourier-mode parity |
| [in] | fmax | maximum exactly integrated frequency, or 0 for the grid maximum |
| [out] | report | optional quadrature report |
| [in] | policy | non-convergence policy |
Definition at line 940 of file fourierTemporalPSD.hpp.
References mx::AO::analysis::fourierTemporalPSDReport< realT >::clear(), mx::noerror, singleLayerPSDImpl(), and validatePsdInputs().
Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().
|
protected |
Calculate a single-layer temporal PSD while the caller manages the GSL error handler.
| [out] | PSD | calculated PSD |
| [in] | freq | temporal-frequency grid |
| [in] | m | first spatial-frequency index |
| [in] | n | second spatial-frequency index |
| [in] | layer_i | atmospheric-layer index |
| [in] | p | Fourier-mode parity |
| [in] | fmax | maximum exactly integrated frequency |
| [out] | report | accumulated quadrature report |
| [in] | policy | non-convergence policy |
Definition at line 965 of file fourierTemporalPSD.hpp.
References fourierTemporalPSD(), _absTol, _layer_i, _relTol, _useBasis, allocateWorkspace(), mx::error, mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), mx::invalidarg, mx::math::isFinite(), mx::liberr, m_aosys, m_cq, m_f, m_f0, m_m, m_mode_i, m_modeCoeffs, m_n, m_p, m_spatialFilter, m_sq, m_workspace, m_workspaceAllocator, mx::internal::mxlib_error_report(), mx::noerror, mx::AO::analysis::fourierTemporalPSDReport< realT >::record(), and WSZ.
Referenced by singleLayerPSD().
|
protected |
Validate the configured atmosphere and optionally a requested layer.
| [in] | layer_i | layer index, or -1 to validate all layers |
Definition at line 765 of file fourierTemporalPSD.hpp.
References mx::invalidarg, mx::invalidconfig, mx::math::isFinite(), m_aosys, mx::internal::mxlib_error_report(), and mx::noerror.
Referenced by validatePsdInputs().
|
protected |
Validate state and arguments shared by single- and multilayer calculations.
| [in] | PSD | output storage to validate |
| [in] | freq | temporal-frequency grid |
| [in] | m | first spatial-frequency index |
| [in] | n | second spatial-frequency index |
| [in] | p | Fourier-mode parity |
| [in] | fmax | maximum exactly integrated frequency |
| [in] | layer_i | layer index, or -1 to validate all layers |
| [in] | policy | non-convergence policy |
Definition at line 804 of file fourierTemporalPSD.hpp.
References _absTol, _relTol, _useBasis, mx::math::half_pi(), mx::invalidarg, mx::invalidconfig, mx::math::isFinite(), m_aosys, m_f0, mx::internal::mxlib_error_report(), mx::noerror, mx::sizeerr, and validateAtmosphere().
Referenced by makePSDGrid(), multiLayerPSD(), and singleLayerPSD().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::_absTol |
The absolute tolerance to use in the GSL integrator.
Definition at line 396 of file fourierTemporalPSD.hpp.
Referenced by absTol(), absTol(), initialize(), makePSDGrid(), singleLayerPSDImpl(), and validatePsdInputs().
| int mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::_layer_i |
The index of the current layer.
Definition at line 383 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::_relTol |
The relative tolerance to use in the GSL integrator.
Definition at line 397 of file fourierTemporalPSD.hpp.
Referenced by initialize(), makePSDGrid(), relTol(), relTol(), singleLayerPSDImpl(), and validatePsdInputs().
| int mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::_useBasis |
Set to MXAO_FTPSD_BASIS_BASIC/MODIFIED/PROJECTED_* to use the basic sin/cos modes, the modified Fourier modes, or a projection of them.
Definition at line 385 of file fourierTemporalPSD.hpp.
Referenced by initialize(), makePSDGrid(), singleLayerPSDImpl(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and validatePsdInputs().
| aosysT* mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_aosys { nullptr } |
Pointer to an AO system structure.
Definition at line 367 of file fourierTemporalPSD.hpp.
Referenced by fourierTemporalPSD(), fourierTemporalPSD(), analyzePSDGrid(), mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), fastestPeak(), intensityPSD(), makePSDGrid(), singleLayerPSDImpl(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), validateAtmosphere(), and validatePsdInputs().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_cq { 0 } |
The cosine of the wind direction.
Definition at line 372 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_f { 0 } |
the current temporal frequency
Definition at line 369 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_f0 { 0 } |
the Berdja boiling parameter
Definition at line 379 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_mod(), singleLayerPSDImpl(), and validatePsdInputs().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_m { 0 } |
the spatial frequency m index
Definition at line 370 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| int mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_mode_i |
Projected basis mode index.
Definition at line 399 of file fourierTemporalPSD.hpp.
Referenced by singleLayerPSDImpl().
| Eigen::Array<realT, -1, -1> mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_modeCoeffs |
Coeeficients of the projection onto the Fourier modes.
Definition at line 401 of file fourierTemporalPSD.hpp.
Referenced by singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_n { 0 } |
the spatial frequency n index
Definition at line 371 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_basic(), mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| int mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_p { 1 } |
The parity of the mode, +/- 1. If _useBasis==MXAO_FTPSD_BASIS_BASIC then +1 indicates cosine, -1 indicates sine.
Definition at line 381 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_basic(), and singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_spatialFilter { false } |
Flag indicating if a spatial filter is applied.
Definition at line 374 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
| realT mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::m_sq { 0 } |
The sine of the wind direction.
Definition at line 373 of file fourierTemporalPSD.hpp.
Referenced by mx::AO::analysis::F_mod(), and singleLayerPSDImpl().
|
protected |
Unique ownership of the GSL integration workspace used by worker instances.
Definition at line 390 of file fourierTemporalPSD.hpp.
Referenced by allocateWorkspace(), and singleLayerPSDImpl().
|
protected |
Allocation function used when a worker lazily creates its GSL workspace.
Definition at line 393 of file fourierTemporalPSD.hpp.
Referenced by fourierTemporalPSD(), allocateWorkspace(), and singleLayerPSDImpl().