28 #ifndef SCIMATH_VANVLECK_H
29 #define SCIMATH_VANVLECK_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Matrix.h>
34 #include <casacore/scimath/Functionals/Interpolate1D.h>
35 #include <casacore/casa/BasicSL/Constants.h>
230 { return ::erfc(threshhold/
sqrt(2.0));}
static Double predictNgt3(Int n, Double threshhold)
Predict a zero-lag value given the indicated first threshold level for n>3.
static Double threshNgt3(Int n, Double zerolag)
compute first threshhold for a given zerolag for n>3
static Vector< Double > itsQy1
static Matrix< Double > itsQx1Qy1diffs
This is (Qx1[i+1]-Qx1[i])*(Qy1[j+1]*Qy1[j])
static Vector< Double > itsQx1
static Bool dcoff3(Double &dcoffset, Double &threshold, Double zerolag, Double bias)
implementation of dcoff for the 3-level case
static Vector< Double > itsQx0Qx0
Useful combinations of the above - to speed up drbydrho these are -1/2*(Qx0*Qx0) and -1/2*(Qy0*Qy0) T...
static void getTable(Vector< Double > &rs, Vector< Double > &rhos)
Get the data used in setting up the interpolation.
static Double threshN3(Double zerolag)
compute first threshhold for a given zerolag for n==3
static Double predict(Int n, Double threshhold)
Predict a given zero-lag given n and a threshold.
static Vector< Double > itsQx0
the quantization functions
static void size(uInt npts)
Set the interpolation table size.
static Interpolate1D< Double, Double > * itsInterp
The interpolator.
static Matrix< Double > itsQx0Qy0
This is Qx0[i]*Qy0[j].
static Double rinc(Double &rhoi, Double &rhof)
For a given rhoi, rhof, this produces a high-accuracy numerical approximation to the integral of drby...
static Bool itsEquiSpaced
static void setQuantization(const Matrix< Double > &qx, const Matrix< Double > &qy)
Set the x and y quantization functions.
static uInt getsize()
get the current size.
static uInt itsSize
the number of points to use in setting up the interpolator
static Double invErf(Double x)
inverse err fn - used by invErfc
static Double invErfc(Double x)
inverse complementary err fn - used by threshN3
static Double thresh(Int n, Double zerolag)
Given a measured zero-lag autocorrelation and number of levels (n>=3) return the first positive quant...
static Double drbydrho(Double *rho)
The fortran numerical integration function will call this.
static void initInterpolator()
initialize the interpolator
static Double r(const Double rho)
Given a rho return the corresponding corrected r Returns 0.0 if no quantization has been set yet.
static Double predictN3(Double threshhold)
Predict a zero-lag value given the indicated first threshold level for n=3.
static std::mutex theirMutex
The mutex to make the functions thread-safe.
static Bool dcoff(Double &dcoffset, Double &threshold, Int n, Double zerolag, Double bias)
Compute an approximation to the mean signal level (DC offset) and quantizer threshold setting (both i...
static Vector< Double > itsQy0Qy0
static Vector< Double > itsQy0
static Bool setEquiSpaced(Double xlev, Double ylev, Double xmean, Double ymean, Int n)
Set the x and y quantization levels for the case of equi-spaced levels with a possible non-zero offse...
this file contains all the compiler specific defines
LatticeExprNode sqrt(const LatticeExprNode &expr)
bool Bool
Define the standard types used by Casacore.