Statistics of two-bit quantization and artifact correction parameters. More...

#include <JenetAnderson98.h>

Inheritance diagram for JenetAnderson98:
Reference::Able Reference::HeapTracked

Classes

class  EquationA5
 
class  Probability
 Interface to the measured distributions of Phi. More...
 

Public Member Functions

 JenetAnderson98 ()
 Default constructor.
 
void set_Phi (double Phi)
 Set the fraction of samples in the low voltage state. More...
 
void set_sigma_n (double sigma_n)
 Set the normalized, undigitized power. More...
 
double get_hi () const
 Get the optimal high voltage output levels, JA98 Eq.40.
 
double get_lo () const
 Get the optimal low voltage output levels, JA98 Eq.41.
 
double get_A () const
 Get the slope of digitized vs undigitized correlation, JA98 Eq.43.
 
void set_threshold (double t=get_optimal_spacing(2))
 Set the sampling threshold. More...
 
double get_threshold () const
 Get the sampling threshold.
 
double get_mean_Phi () const
 Get the expectation value of Phi, JA98 Eq.A2.
 
void set_mean_Phi (double mean_Phi)
 Set the expectation value of Phi. More...
 
double get_var_Phi () const
 Get the variance of Phi.
 
void get_prob_Phi (unsigned L, std::vector< float > &prob_Phi)
 Get the theoretical probability distribution of Phi, JA98 Eq.A6. More...
 
double A4 (double Phi)
 Given Phi, return the digitized power.
 
double invert_A4 (double sigma_hat)
 Given the digitized power, return Phi. More...
 
double A14 (double mean_Phi)
 Given <Phi>, return the digitized power.
 
double invert_A14 (double sigma_hat)
 Given the digitized power, return <Phi> More...
 
void set_measured_prob_Phi (const Probability *data)
 Set the measured probability distribution of Phi.
 
const Probabilityget_measured_prob_Phi () const
 Set the measured probability distribution of Phi.
 
- Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 
 Able (const Able &)
 Copy constructor.
 
Ableoperator= (const Able &)
 Assignment operator.
 
virtual ~Able ()
 Destructor.
 
unsigned get_reference_count () const
 Returns the number of references there are to this.
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 
 HeapTracked (const HeapTracked &)
 Copy constructor.
 
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
 
virtual ~HeapTracked ()
 Destructor.
 
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.
 

Static Public Member Functions

static double get_optimal_spacing (unsigned bits)
 Table 3 - Optimum Input Threshold Spacing for a Uniform Digitizer.
 
- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
 
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
 
static void operator delete (void *location)
 Regular delete overload.
 
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
 

Protected Member Functions

void set_alpha (double alpha, double Phi)
 Set the inverse width of the gaussian, sort of. More...
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object. More...
 
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object. More...
 

Protected Attributes

double threshold
 The sampling threshold.
 
Reference::To< const Probabilitymeasured
 The interface to a measured probability distribution of Phi.
 
double lo
 
double hi
 
double A
 
double mean_Phi
 
double var_Phi
 

Detailed Description

Statistics of two-bit quantization and artifact correction parameters.

Given either the fraction of digitized samples in the low voltage state, $\Phi$, or the instantaneous power normalized by the mean power, $\sigma_n=\sigma/\langle\sigma\rangle$, this class computes

  1. the output levels that minimize signal distortion (dynamic level setting), and
  2. the fractional quantization noise (scattered power correction).

    Parameters
    Phifraction of low voltage state samples, or
    sigma_nnormalized power
    Return values
    lothe optimal low voltage output level
    hithe optimal hi voltage output level
    Athe fractional quantization noise

    Furthermore, given the sampling threshold, $t$, this class computes the mean, variance, and probability distribution of $\Phi$.

Member Function Documentation

◆ get_prob_Phi()

void JenetAnderson98::get_prob_Phi ( unsigned  L,
std::vector< float > &  prob_Phi 
)

Get the theoretical probability distribution of Phi, JA98 Eq.A6.

Parameters
Lis the number of points used to measure Phi
Return values
prob_Phi[i]will contain the probability of Phi = i/L

◆ invert_A14()

double JenetAnderson98::invert_A14 ( double  sigma_hat)

Given the digitized power, return <Phi>

Uses the van Wijngaarden-Dekker-Brent method to invert Eq.A14 of JA98

References A14().

◆ invert_A4()

double JenetAnderson98::invert_A4 ( double  sigma_hat)

Given the digitized power, return Phi.

Uses the van Wijngaarden-Dekker-Brent method to invert Eq.A4 of JA98

References A4().

◆ set_alpha()

void JenetAnderson98::set_alpha ( double  alpha,
double  Phi 
)
protected

Set the inverse width of the gaussian, sort of.

$ \alpha= t/(\sqrt{2}\sigma)$ is the term in brackets on the right-hand side of Eq.45 of JA98

Referenced by set_Phi(), and set_sigma_n().

◆ set_mean_Phi()

void JenetAnderson98::set_mean_Phi ( double  Phi)

Set the expectation value of Phi.

Given the mean fraction of samples that lay within the thresholds, -t and +t, this method computes the threshold, where threshold = t/sigma.

References threshold.

◆ set_Phi()

void JenetAnderson98::set_Phi ( double  Phi)

Set the fraction of samples in the low voltage state.

This method inverts Eq.45 of JA98.

Phi is the left-hand side of Eq.44, the fraction of samples between x2 and x4; alpha is the inverse error function of Phi.

References set_alpha().

Referenced by JenetAnderson98::EquationA5::set_nsamp().

◆ set_sigma_n()

void JenetAnderson98::set_sigma_n ( double  sigma_n)

Set the normalized, undigitized power.

$ \sigma_n = \sigma/\langle\sigma\rangle $ and, as defined in Eq.38, $ t = \langle\sigma\rangle s$, where s is the spacing or optimal threshold.

References set_alpha(), and threshold.

◆ set_threshold()

void JenetAnderson98::set_threshold ( double  t = get_optimal_spacing(2))

Set the sampling threshold.

Given the sampling threshold, t, this method computes the mean fraction of samples that lay within the thresholds, -t and +t, where t = threshold * sigma. This is equivalent to:

  1. Eq.45 (with x4 = -x2 = t [Eq.38]);
  2. Eq.A2 (with xh = -xl = t); or
  3. the expectation value of the binomial distribution, Eq.A6 (cf. http://mathworld.wolfram.com/BinomialDistribution.html, Eqn. 12)

The variance of Phi is the variance of the binomial distribution, Eq.A6. (cf. http://mathworld.wolfram.com/BinomialDistribution.html, Eqn. 17)

References threshold.

Referenced by JenetAnderson98().


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17