28 #ifndef SCIMATH_VANVLECK_H
29 #define SCIMATH_VANVLECK_H
230 { return ::erfc(threshhold/
sqrt(2.0));}
static Vector< Double > itsQy0
static void initInterpolator()
initialize the interpolator
A class of static functions to aid with vanVleck corrections of lag data.
static void getTable(Vector< Double > &rs, Vector< Double > &rhos)
Get the data used in setting up the interpolation.
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 predictNgt3(Int n, Double threshhold)
Predict a zero-lag value given the indicated first threshold level for n>3.
static uInt itsSize
the number of points to use in setting up the interpolator
static Interpolate1D< Double, Double > * itsInterp
The interpolator.
static Double predictN3(Double threshhold)
Predict a zero-lag value given the indicated first threshold level for n=3.
static Vector< Double > itsQx0
the quantization functions
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 void setQuantization(const Matrix< Double > &qx, const Matrix< Double > &qy)
Set the x and y quantization functions.
static Double invErfc(Double x)
inverse complementary err fn - used by threshN3
static Double threshNgt3(Int n, Double zerolag)
compute first threshhold for a given zerolag for n>3
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 Double invErf(Double x)
inverse err fn - used by invErfc
static Double threshN3(Double zerolag)
compute first threshhold for a given zerolag for n==3
static void size(uInt npts)
Set the interpolation table size.
LatticeExprNode sqrt(const LatticeExprNode &expr)
static std::mutex theirMutex
The mutex to make the functions thread-safe.
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 rinc(Double &rhoi, Double &rhof)
For a given rhoi, rhof, this produces a high-accuracy numerical approximation to the integral of drby...
bool Bool
Define the standard types used by Casacore.
static Matrix< Double > itsQx0Qy0
This is Qx0[i]*Qy0[j].
static Double drbydrho(Double *rho)
The fortran numerical integration function will call this.
static Vector< Double > itsQy0Qy0
static Matrix< Double > itsQx1Qy1diffs
This is (Qx1[i+1]-Qx1[i])*(Qy1[j+1]*Qy1[j])
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...
static Bool dcoff3(Double &dcoffset, Double &threshold, Double zerolag, Double bias)
implementation of dcoff for the 3-level case
static Vector< Double > itsQx1
static Double predict(Int n, Double threshhold)
Predict a given zero-lag given n and a threshold.
static Vector< Double > itsQy1
static uInt getsize()
get the current size.
static Bool itsEquiSpaced