mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches

Provides a class to manage closed loop gain optimization. More...

Provides a class to manage closed loop gain optimization.

Author
Jared R. Males (jared.nosp@m.male.nosp@m.s@gma.nosp@m.il.c.nosp@m.om)

Definition in file clGainOpt.hpp.

#include <algorithm>
#include <cmath>
#include <limits>
#include <type_traits>
#include <Eigen/Dense>
#include "../../sys/timeUtils.hpp"
#include "../../math/constants.hpp"
#include "../../math/floatUtils.hpp"
#include <error/error_t.hpp>

Go to the source code of this file.

Classes

struct  mx::AO::analysis::clGainOpt< _realT >
 A class to manage optimizing closed-loop gains. More...
struct  mx::AO::analysis::clGainOpt< _realT >::maxStableGainReport
 Diagnostic summary of a maximum-stable-gain search. More...
struct  mx::AO::analysis::clGainOpt< _realT >::optGainReport
 Diagnostic summary of an open-loop optimum-gain search. More...
struct  mx::AO::analysis::clGainOptOptGain_OL< realT >
 Bisection worker struct for finding optimum closed loop gain from open loop PSDs. More...

Namespaces

namespace  mx
 The mxlib c++ namespace.

Functions

template<typename realT>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop (realT &gain, realT &var, clGainOptOptGain_OL< realT > &olgo, const realT &minimumGain, const realT &maximumGain, int minFindBits, uintmax_t minFindMaxIter, uintmax_t &iters)
 Minimize an open-loop variance objective on a bounded gain interval.
template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< float > (float &gain, float &var, clGainOptOptGain_OL< float > &olgo, const float &minimumGain, const float &maximumGain, int minFindBits, uintmax_t minFindMaxIter, uintmax_t &iters)
 Float specialization of the bounded open-loop gain minimizer.
template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< double > (double &gain, double &var, clGainOptOptGain_OL< double > &olgo, const double &minimumGain, const double &maximumGain, int minFindBits, uintmax_t minFindMaxIter, uintmax_t &iters)
 Double specialization of the bounded open-loop gain minimizer.
template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< long double > (long double &gain, long double &var, clGainOptOptGain_OL< long double > &olgo, const long double &minimumGain, const long double &maximumGain, int minFindBits, uintmax_t minFindMaxIter, uintmax_t &iters)
 Long-double specialization of the bounded open-loop gain minimizer.

Function Documentation

◆ optGainOpenLoop()

template<typename realT>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop ( realT & gain,
realT & var,
clGainOptOptGain_OL< realT > & olgo,
const realT & minimumGain,
const realT & maximumGain,
int minFindBits,
uintmax_t minFindMaxIter,
uintmax_t & iters )

Minimize an open-loop variance objective on a bounded gain interval.

Parameters
[out]gainbest gain estimate
[out]varvariance at the best gain estimate
[in,out]olgovariance objective and diagnostics
[in]minimumGainlower gain bound
[in]maximumGainupper gain bound
[in]minFindBitsrequested precision in binary digits
[in]minFindMaxItermaximum minimizer iterations
[out]itersminimizer iterations used

Definition at line 1115 of file clGainOpt.hpp.

References mx::exception, mx::noerror, mx::notimpl, and mx::timeout.

◆ optGainOpenLoop< double >()

template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< double > ( double & gain,
double & var,
clGainOptOptGain_OL< double > & olgo,
const double & minimumGain,
const double & maximumGain,
int minFindBits,
uintmax_t minFindMaxIter,
uintmax_t & iters )

Double specialization of the bounded open-loop gain minimizer.

Parameters
[out]gainbest gain estimate
[out]varvariance at the best gain estimate
[in,out]olgovariance objective and diagnostics
[in]minimumGainlower gain bound
[in]maximumGainupper gain bound
[in]minFindBitsrequested precision in binary digits
[in]minFindMaxItermaximum minimizer iterations
[out]itersminimizer iterations used

◆ optGainOpenLoop< float >()

template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< float > ( float & gain,
float & var,
clGainOptOptGain_OL< float > & olgo,
const float & minimumGain,
const float & maximumGain,
int minFindBits,
uintmax_t minFindMaxIter,
uintmax_t & iters )

Float specialization of the bounded open-loop gain minimizer.

Parameters
[out]gainbest gain estimate
[out]varvariance at the best gain estimate
[in,out]olgovariance objective and diagnostics
[in]minimumGainlower gain bound
[in]maximumGainupper gain bound
[in]minFindBitsrequested precision in binary digits
[in]minFindMaxItermaximum minimizer iterations
[out]itersminimizer iterations used

◆ optGainOpenLoop< long double >()

template<>
mx::error_t mx::AO::analysis::impl::optGainOpenLoop< long double > ( long double & gain,
long double & var,
clGainOptOptGain_OL< long double > & olgo,
const long double & minimumGain,
const long double & maximumGain,
int minFindBits,
uintmax_t minFindMaxIter,
uintmax_t & iters )

Long-double specialization of the bounded open-loop gain minimizer.

Parameters
[out]gainbest gain estimate
[out]varvariance at the best gain estimate
[in,out]olgovariance objective and diagnostics
[in]minimumGainlower gain bound
[in]maximumGainupper gain bound
[in]minFindBitsrequested precision in binary digits
[in]minFindMaxItermaximum minimizer iterations
[out]itersminimizer iterations used