17 int offset(
int fCapId1,
int fCapId2) {
23 return fCapId1 * 4 + fCapId2;
46 double sigma =
sqrt(0.5 * (s_xx_mean +
sqrt(s_xx_mean * s_xx_mean - 2 * s_xy_mean * s_xy_mean)));
47 double corr = sigma == 0 ? 0 : 0.5 * s_xy_mean / sigma;
48 for (
unsigned i = 0;
i < fFrames;
i++) {
49 fNoise[
i] = fGauss[
i] * sigma;
51 fNoise[
i] += fGauss[
i - 1] *
corr;
53 fNoise[
i] += fGauss[
i + 1] *
corr;
void setSigma(int fCapId1, int fCapId2, float fSigma)
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
const float * getValues() const
get value for all capId = 0..3, 10 values in total
CastorPedestalWidth(int fId=0)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3