OPERA
1.0
Open source echelle spectrograph reduction pipeline
|
CCD library. More...
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include "operaError.h"
#include "libraries/operaCCD.h"
#include "libraries/operaImage.h"
#include "libraries/operaStats.h"
#include "libraries/operaFit.h"
Namespaces | |
namespace | operaCCD |
Functions | |
void | operaMaskPixbyCountRange (unsigned npixels, float *array, float *badpixmask, float *newmask, float minvalue, float maxvalue, unsigned char invert) |
This function creates a new mask based on a previous badpixel mask and on a defined range of values. | |
void | operaMarkPixbyCountRange (unsigned npixels, float *array, float *previousmarks, float *newmarks, float minvalue, float maxvalue, float index2mark) |
This function creates a mask where it marks pixels with the same number based on a defined range of values. | |
void | operaCCDGainNoise (unsigned npixels, unsigned nbias, float *biasdata[], unsigned nflat, float *flatdata[], float *badpixdata, float lowcount, float highcount, float maxbins, float minnpixelsperbin, float *gain, float *noise) |
This function calculates the CCD gain and noise given a set of bias and a set of flat arrays. | |
Variables | |
static int | verbose = 0 |
CCD library. | |
static int | debug = 0 |
CCD library.
void operaCCDGainNoise | ( | unsigned | npixels, |
unsigned | nbias, | ||
float * | biasdata[], | ||
unsigned | nflat, | ||
float * | flatdata[], | ||
float * | badpixdata, | ||
float | lowcount, | ||
float | highcount, | ||
float | maxbins, | ||
float | minnpixelsperbin, | ||
float * | gain, | ||
float * | noise | ||
) |
This function calculates the CCD gain and noise given a set of bias and a set of flat arrays.
npixels | is an unsigned for the number of pixels in the arrays, |
nbias | is an unsigned for the number of bias arrays, |
biasdata | is an array of float pointers that contain the bias data, |
nflat | is an unsigned for the number of flat arrays, |
badpixdata | is a float pointer that contains the badpixel mask data, |
lowcount | is a float for the lowest pixel count value to be considered |
highcount | is a float for the highest pixel count value to be considered |
maxbins | is a float for the number of bins to divide the range considered |
minnpixelsperbin | is a float for the minimum number of pixels per bin allowed in order to consider the bin |
gain | is a float pointer that returns the calculated gain value |
noise | is a float pointer that returns the calculated noise value |
void operaMarkPixbyCountRange | ( | unsigned | npixels, |
float * | array, | ||
float * | previousmarks, | ||
float * | newmarks, | ||
float | minvalue, | ||
float | maxvalue, | ||
float | index2mark | ||
) |
This function creates a mask where it marks pixels with the same number based on a defined range of values.
void operaMarkPixbyCountRange(unsigned npixels, float *array, float *previousmark, float *newmark, float minvalue, float maxvalue, unsigned index2mark)
npixels | is an unsigned for the number of elements in the array |
array | is a float pointer with the data |
previousmarks | is a float pointer with the input badpixel mask data |
newmarks | is a float pointer for the output mask |
minvalue | is a float that defines the minimum data value to keep mask on (value=1) |
maxvalue | is a float that defines the maximum data value to keep mask on (value=1) |
index2mark | is an unsigned to mark values on the selected elements |
void operaMaskPixbyCountRange | ( | unsigned | npixels, |
float * | array, | ||
float * | badpixmask, | ||
float * | newmask, | ||
float | minvalue, | ||
float | maxvalue, | ||
unsigned char | invert | ||
) |
This function creates a new mask based on a previous badpixel mask and on a defined range of values.
void operaMaskPixbyCountRange(unsigned npixels, float *array, float *badpixmask, float *newmask, float minvalue, float maxvalue, bool invert)
npixels | is an unsigned for the number of elements in the array |
array | is a float pointer with the data |
badpixmask | is a float pointer with the input badpixel mask data |
newmask | is a float pointer for the output mask |
minvalue | is a float that defines the minimum data value to keep mask on (value=1) |
maxvalue | is a float that defines the maximum data value to keep mask on (value=1) |
invert | is a bool that allows one to invert the mask values for the selected elements |