fdhwlib
2.0.25
|
#include <analysematrix.h>
Analyse the variance matrix of a telescope All functions are on matrices of 20x22 elements.
Definition at line 22 of file analysematrix.h.
analyseMatrix::analyseMatrix | ( | ) |
analyseMatrix::~analyseMatrix | ( | ) |
void analyseMatrix::addMask | ( | int | res[20][22], |
int | mask[20][22] | ||
) |
Add two masks.
void analyseMatrix::addMatrix | ( | double | res[20][22], |
double | matrix[20][22] | ||
) |
Add two matrixes.
void analyseMatrix::addNoisyPixel | ( | int | mask[20][22] | ) |
Add a new noisy pixel mask.
void analyseMatrix::classifyByThreshold | ( | double | thresh, |
double | matrix[20][22], | ||
int | res[20][22], | ||
int | up = 1 |
||
) |
Classify by using a constant threshold matrix, res and mask are 20x22 pixel.
The up parameter controls whether the values higher or lower of the threshold should be taken.
void analyseMatrix::clearFaultyPixel | ( | ) |
Clear faulty pixel matrix.
void analyseMatrix::clearNoisyPixel | ( | ) |
Clear noisy pixel matrix.
void analyseMatrix::copyMask | ( | int | res[20][22], |
int | mask[20][22] | ||
) |
Copy the mask to res.
void analyseMatrix::copyMatrix | ( | double | res[20][22], |
double | matrix[20][22] | ||
) |
Copy matrix to res.
void analyseMatrix::displayMatrix | ( | FILE * | fout, |
double | matrix[20][22], | ||
const char * | title | ||
) |
Display a matrix of 20x22 elements.
void analyseMatrix::displayMatrix | ( | FILE * | fout, |
int | matrix[20][22], | ||
const char * | title, | ||
int | norm = 0 , |
||
int | value = 0 , |
||
const char * | tag = 0 |
||
) |
Display a matrix of 20x22 integer elements.
With the argument norm > 0, relative values in percent a the normation given will be displayed. A special value can be replaced by a tag.
void analyseMatrix::displayNoisyPixelList | ( | FILE * | fout | ) |
Display the list of noisy pixel in the last analysis.
int analyseMatrix::displayPixelList | ( | FILE * | fout, |
int | matrix[20][22] | ||
) |
Display list of coordinates of all pixel in the mask Returns the number of pixel in the mask.
void analyseMatrix::divMatrix | ( | double | res[20][22], |
double | matrix[20][22] | ||
) |
Devide by matrix.
void analyseMatrix::divMatrix | ( | double | res[20][22], |
int | matrix[20][22] | ||
) |
Devide by matrix.
void analyseMatrix::filterBy2x2 | ( | int | filter[2][2], |
int | col, | ||
int | row, | ||
double | matrix[20][22], | ||
double | res[20][22], | ||
int | mask[20][22] | ||
) |
Filter a matrix using a free 2x2 matrix.
With mask pixel can be excluded from the calculation matrix, res and mask are 20x22 pixel Parameters (col/row) determine the center pixel of the filter. Possible values are col, row = {0|1}.
void analyseMatrix::findHighNoise | ( | FILE * | fout, |
double | matrix[20][22] | ||
) |
Analyse matrix and store result in the local arrays.
void analyseMatrix::findHighNoise1 | ( | FILE * | fout, |
double | matrix[20][22], | ||
int | res[20][22], | ||
int | err[20][22] | ||
) |
Automatically find pixel with high noise in the variance matrix.
Algorithm:
Parameter of the alorithm:
void analyseMatrix::findHighNoise2 | ( | FILE * | fout, |
double | matrix[20][22], | ||
int | res[20][22], | ||
int | err[20][22] | ||
) |
Automatically find pixel with high noise in the variance matrix.
Algorithm:
Parameter of the algorithm:
void analyseMatrix::invertMask | ( | int | mask[20][22] | ) |
Invert the values of the mask.
void analyseMatrix::maxMask | ( | int | max, |
int | mask[20][22] | ||
) |
Maximum of constant and mask values.
void analyseMatrix::meanMatrix | ( | double | matrix[20][22], |
double * | mean, | ||
double * | var, | ||
int * | n, | ||
int | mask[20][22] | ||
) |
Calculate the mean value of a matrix.
Mask can be used to exclude some pixel from mean value
void analyseMatrix::meanMatrix | ( | double | matrix[20][22], |
double * | mean, | ||
double * | var, | ||
int * | n, | ||
int | mask[20][22], | ||
int | err[20][22] | ||
) |
void analyseMatrix::meanOfNoisyPixel | ( | double | matrix[20][22], |
double * | mean, | ||
double * | var, | ||
int * | n | ||
) |
Mean of noisy pixel Faulty pixel are not considered.
void analyseMatrix::meanOfNormalPixel | ( | double | matrix[20][22], |
double * | mean, | ||
double * | var, | ||
int * | n | ||
) |
Mean of normal pixel.
Faulty pixel are not considered
void analyseMatrix::minMask | ( | int | min, |
int | mask[20][22] | ||
) |
Minimum of constant and mask values.
void analyseMatrix::multMask | ( | int | value, |
int | mask[20][22] | ||
) |
Multiply mask by constant.
void analyseMatrix::multMatrix | ( | double | value, |
double | matrix[20][22] | ||
) |
Multiply matrix by constant.
int analyseMatrix::nMask | ( | int | mask[20][22] | ) |
Count the pixel in the mask.
int analyseMatrix::nNoisyPixel | ( | ) |
Number of noisy pixel.
void analyseMatrix::orMask | ( | int | res[20][22], |
int | mask[20][22] | ||
) |
Merge two mask using a logical or.
void analyseMatrix::setMatrix | ( | double | value, |
double | matrix[20][22] | ||
) |
Set matrix to constant value.
void analyseMatrix::setMatrix | ( | int | value, |
int | matrix[20][22] | ||
) |
Debug flag.
Definition at line 220 of file analysematrix.h.
int analyseMatrix::faultyPixel[20][22] |
Matrix of faulty pixel.
Every time the statistical evaluation finds pixel with neg variances they were marked in the faulty pixel matrix and excluded from further calculations
Definition at line 193 of file analysematrix.h.
Absolut threshold used to find noisy pixel relativ to the distribution mean.
Definition at line 212 of file analysematrix.h.
Find extreme low noise pixel?! These pixel will be added to the error pixel.
Definition at line 216 of file analysematrix.h.
Tolerated varinance deviation.
Definition at line 206 of file analysematrix.h.
Difference between neiboring pixel relativ to the distribution mean.
Definition at line 209 of file analysematrix.h.
Tolerated variance changes proportional to variance distribution over the telescope.
Definition at line 202 of file analysematrix.h.
int analyseMatrix::noisyPixel[20][22] |
Matrix of noisy pixel.
Every time the statistical evaluation finds pixel with high noise they were marked in the noisy pixel matrix and excluded from further calculations
Definition at line 185 of file analysematrix.h.
int analyseMatrix::noisyPixelLast[20][22] |
Last noisy pixel mask calculated by findNoisyPixel()
Definition at line 188 of file analysematrix.h.
Count the number of analysis runs per telescope.
Definition at line 196 of file analysematrix.h.