VanVleck.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2008 by Paul Demorest
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9#ifndef __VanVleck
10#define __VanVleck
11
12#include <vector>
13#include "NormalDistribution.h"
14
16
26class VanVleck {
27
28 public:
29
31 VanVleck();
32
34 void set_nlevel(int n);
35
37 int get_nlevel() const { return nlevel; }
38
41
43 void set_threshold(float *thr);
44
46 void set_uniform_levels();
47
50
52 void set_levels(float *lev);
53
55 double out_pow(double in_pow, double in_dc=0.0);
56
58 double d_out_pow(double in_pow, double in_dc=0.0);
59
61 double in_pow(double out_pow);
62
64
67 void set_in_power(double px, double py);
68
70 void correct_acf(std::vector<float> data);
71
73 void correct_ccf(std::vector<float> data);
74
75 protected:
76
78 int nlevel;
79
81 double pow_x;
82 double pow_y;
83
85 std::vector<float> thresh;
86
88 std::vector<float> levels;
89
92
94 double c1x, c1y, c3x, c3y;
95
96};
97
98#endif
void set_uniform_threshold()
Set uniform sampling thresholds.
Definition VanVleck.C:30
void correct_acf(std::vector< float > data)
Correct a vector of auto-correlations using current pow_x.
Definition VanVleck.C:200
int get_nlevel() const
Get number of levels;.
Definition VanVleck.h:37
double d_out_pow(double in_pow, double in_dc=0.0)
Return derivative d(out_pow)/d(in_pow)
Definition VanVleck.C:129
void set_in_power(double px, double py)
Set input powers for correlation correction.
Definition VanVleck.C:192
void set_uniform_levels()
Set uniform output levels.
Definition VanVleck.C:50
double out_pow(double in_pow, double in_dc=0.0)
Return output (quantized) power given input power, dc.
Definition VanVleck.C:92
double in_pow(double out_pow)
Return input (analog) power given output (quantized) power.
Definition VanVleck.C:158
void set_canonical_levels()
Set "canonical" output levels.
Definition VanVleck.C:66
double pow_x
Input powers to use in correcting corrrelations.
Definition VanVleck.h:81
double c1x
Storage for coeffs we may want to reuse.
Definition VanVleck.h:94
int nlevel
Number of levels.
Definition VanVleck.h:78
std::vector< float > thresh
Vector of sampling thresholds.
Definition VanVleck.h:85
std::vector< float > levels
Vector of output levels.
Definition VanVleck.h:88
void set_levels(float *lev)
Set arbitrary output levels.
Definition VanVleck.C:85
VanVleck()
Default constructor.
Definition VanVleck.C:13
void correct_ccf(std::vector< float > data)
Correct a vector of cross-correlations using current input powers.
Definition VanVleck.C:204
void set_threshold(float *thr)
Set arbitrary sampling thresholds.
Definition VanVleck.C:46
void compute_coeffs()
Compute coefficients for correlation correction using pow_x, pow_y.
void set_nlevel(int n)
Set number of levels.
Definition VanVleck.C:20

Generated using doxygen 1.14.0