1 #ifndef _utl_ComplexLgAmpPhase_h_
2 #define _utl_ComplexLgAmpPhase_h_
7 #include <utl/AugerException.h>
128 const double frac = (x - x1) / (x2 - x1);
129 const double anew = a1 + frac * (a2 - a1);
130 const double pnew = p1 + frac * (p2 - p1);
double GetAmplitude() const
Get the amplitude.
constexpr double Interpolate(const double dx, const double dy, const double x)
double GetImag() const
Get the imaginary part.
ComplexLgAmpPhase operator*(const ComplexLgAmpPhase &rhs) const
double GetPhase() const
Get the phase in radians, can be bigger than 2*pi.
std::complex< double > GetComplex() const
Get the complex number in standard notation; this clips the phase to 2*pi!
ComplexLgAmpPhase & operator/=(const ComplexLgAmpPhase &rhs)
double pow(const double x, const unsigned int i)
const phoenix::function< PowerToImpl > power
ComplexLgAmpPhase & operator*=(const ComplexLgAmpPhase &rhs)
double GetReal() const
Get the real part.
bool operator==(const ComplexLgAmpPhase &rhs) const
A class to store complex numbers which are internally represented by log10(amplitude) and phase (and ...
double GetLgAmplitude() const
Get log10(amplitude)
ComplexLgAmpPhase(const double lgamp, const double phase=0)
Constructor using log10(amplitude) and phase (in radians)
ComplexLgAmpPhase()
Standard constructor initializing to zero.
ComplexLgAmpPhase operator/(const ComplexLgAmpPhase &rhs) const
ComplexLgAmpPhase & Pow(double power)