VIMOS DRS Reference Manual
2.9.13
|
Functions | |
VimosImage * | imageArith (VimosImage *ima1, VimosImage *ima2, VimosOperator optype) |
VimosImage * | constArith (VimosImage *ima_in, double constant, VimosOperator optype) |
int | imageArithLocal (VimosImage *ima1, VimosImage *ima2, VimosOperator optype) |
int | constArithLocal (VimosImage *ima_in, double constant, VimosOperator optype) |
VimosImage * | VmFrAveFil (VimosImage *ima_in, int filtsizex, int filtsizey, int excludeCenter) |
VimosImage * | VmFrMedFil (VimosImage *ima_in, int filtsizex, int filtsizey, int excludeCenter) |
VimosImage * | VmFrFilter (VimosImage *image, int xSize, int ySize, FilterMethod method, int excludeCenter) |
VimosImage * | VmImNorm (VimosImage *ima_in, Method meth) |
VimosImage * | frComb (VimosImage **ima_list, int num, CombMethod combMethod, CombParameters *combParameter, int flag) |
VimosImage * | frCombSum (VimosImage **ima_list, int num) |
VimosImage * | frCombAverage (VimosImage **ima_list, int num) |
VimosImage * | frCombMedian (VimosImage **ima_list, int num, int flag) |
VimosImage * | frCombMinMaxReject (VimosImage **ima_list, int minrej, int maxrej, int num) |
VimosImage * | OLDfrCombMinMaxReject (VimosImage **ima_list, double minrej, double maxrej, int num) |
VimosImage * | frCombKSigma (VimosImage **ima_list, double dklow, double dkhigh, int num) |
float | imageMean (VimosImage *ima_in) |
float | imageMedian (VimosImage *ima_in) |
float | imageAverageDeviation (VimosImage *image, float level) |
float | imageSigma (VimosImage *image) |
float | imageMedSigma (VimosImage *image) |
float | imageMinimum (VimosImage *ima_in) |
float | imageMaximum (VimosImage *ima_in) |
VimosDpoint * | imageHistogram (VimosImage *ima_in, unsigned int nbins) |
float | imageMode (VimosImage *ima_in) |
float | sumPixelsInImage (VimosImage *ima_in, int x, int y, int nx, int ny) |
float * | collapse2Dto1D (VimosImage *ima_in, int x, int y, int nx, int ny, Direction collapse) |
VimosPixel * | finePosition (VimosImage *ima_in, VimosPixel *p_list, int npix, double r1, double r2, double r3) |
VimosPixel * | finePositionSimple (VimosImage *ima_in, VimosPixel *in_pixel, double r1) |
VimosImage * | imageShift (VimosImage *imageIn, float xshift, float yshift, int outXlen, int outYlen, float outVal) |
char ** | getFitsFileExtensionsNames (fitsfile *fptr, int *extNum) |
VimosBool | createFitsImage (char *filename, VimosImage *image, const char *category) |
The module provides the image datatype and the fundamental operations.
float* collapse2Dto1D | ( | VimosImage * | ima_in, |
int | x, | ||
int | y, | ||
int | nx, | ||
int | ny, | ||
Direction | collapse | ||
) |
Collapse a rectangle inside an image into one column/row.
ima_in | input image |
x | x lower left corner of the rectangle |
y | y lower left corner of the rectangle |
nx | number of pixels in x |
ny | number of pixels in y |
collapse | direction of collape: ROW or COLUMNS |
collapse a rectangle inside an image into one column. Compute the sum of the rows or of the columns of a rectangle. Input an Image, the lower left corner coordinates (x,y) of the rectangle; the number of pixels (nx, ny) from (x,y), and the collapsing direction: collapse ROW: sum of rows and collapse COLUMN: sum of columns.
VimosImage* constArith | ( | VimosImage * | ima_in, |
double | constant, | ||
VimosOperator | optype | ||
) |
Arithmetic operations between an image and a constant. Result is a new image.
ima_in | pointer to image |
constant | constant |
optype | operation type |
Arithmetic operations between an image and a constant. The result is a new image. The aritmetic operations are VM_OPER_ADD, VM_OPER_SUB, VM_OPER_MUL, VM_OPER_DIV
int constArithLocal | ( | VimosImage * | ima_in, |
double | constant, | ||
VimosOperator | optype | ||
) |
Arithmetic operations between an image and a constant. Result is stored in the input image.
ima_in | pointer to image |
constant | constant |
optype | operation type |
Arithmetic operations between an image and a constant. The result is stored in the input image. The aritmetic operations are VM_OPER_ADD, VM_OPER_SUB, VM_OPER_MUL, VM_OPER_DIV
VimosBool createFitsImage | ( | char * | filename, |
VimosImage * | image, | ||
const char * | category | ||
) |
Write a VimosImage into a disk FITS file
filename | name of the fitsfile |
image | Vimos Image to be written as a FITS file |
category | Category of image to write |
Create a disk image FITS file from structure VimosImage
VimosPixel* finePosition | ( | VimosImage * | ima_in, |
VimosPixel * | p_list, | ||
int | npix, | ||
double | r1, | ||
double | r2, | ||
double | r3 | ||
) |
Refine the peak centers by computing the baricenter.
ima_in | input image |
p_list | list of pixel position to refine |
npix | size of p_list array |
r1 | defines a disk in which the barycenter will be computed |
r2 | inner radius of the ring where the background is computed |
r3 | outer radius of the ring where the background is computed |
Refine the peak centers, by computing a barycenter The 3 doubles (r1, r2, r3) define 3 circle radiuses: r2 and r3 define a ring centered on each pixel in the list, around which the background will be estimated. r1 defines a disk in which the barycenter will be computed, i.e. the centroid pixel, weighted by pixel values, from which the background value has been subtracted: x_center = (1/sum(pixel[i]-bg))*(sum(x[i] * (pixel[i]-bg))) y_center = (1/sum(pixel[i]-bg))*(sum(y[i] * (pixel[i]-bg)))
VimosPixel* finePositionSimple | ( | VimosImage * | ima_in, |
VimosPixel * | in_pixel, | ||
double | r1 | ||
) |
Refine a peak center by computing the baricenter.
ima_in | input image |
in_pixel | expected position of the peak |
r1 | defines a square around expected position where to look for the peak |
Refine a single peak centers, by computing a barycenter. Define a squared region of the image of dimension r1 around expected position and compute baricenter (for baricenter determination see doc of "findPeak2D")
VimosImage* frComb | ( | VimosImage ** | ima_list, |
int | num, | ||
CombMethod | combMethod, | ||
CombParameters * | combParameter, | ||
int | flag | ||
) |
Combine a list of images.
ima_list | Pointer to the array of images to combine |
num | Number of images to combine |
combMethod | Combination method |
combParameter | Used just when combination the method requires extra parameters, as in COMB_REJECT or COMB_KSIGMA. |
flag | Reject or not -32000 values in input |
Combine a list of images according to the method. Possible methods are COMB_KSIGMA, COMB_MEDIAN, COMB_AVERAGE, COMB_SUM, COMB_REJECT, and AUTO. AUTO automatically selects the combination method based on the number of frames
VimosImage* frCombAverage | ( | VimosImage ** | ima_list, |
int | num | ||
) |
Compute average image of a list of images.
ima_list | pointer to the array of images to combine |
num | number of images |
Average a list of images. Result is a newly allocated image.
VimosImage* frCombKSigma | ( | VimosImage ** | ima_list, |
double | dklow, | ||
double | dkhigh, | ||
int | num | ||
) |
Combine a list of images with rejection of pixels outside a K*sigma threshold (sigma-clipping)
ima_list | pointer to the array of images to combine |
klow | number of sigma for low values sigma-clipping |
khigh | number of sigma for high values sigma-clipping |
num | number of images |
Combine frame with rejection of pixels outside a k*sigma treshold. The threshold is calculated on the median value, and not on the average to limit the influence of bad pixels. Input a list of images; klow to set the low treshold (=median-klow*sigma), and khigh to set the high treshold (=median+khigh*sigma). Result is a newly allocated image.
VimosImage* frCombMedian | ( | VimosImage ** | ima_list, |
int | num, | ||
int | flag | ||
) |
Compute median image of a list of images.
ima_list | pointer to the array of images to combine |
num | number of images |
Compute median image of a list of images. Result is a newly allocated image.
VimosImage* frCombMinMaxReject | ( | VimosImage ** | ima_list, |
int | minrej, | ||
int | maxrej, | ||
int | num | ||
) |
Combine images with rejection of highest/lowest pixels values.
ima_list | pointer to the array of images to combine |
minrej | number of pixels to min-reject |
maxrej | number of pixels to max-reject |
num | number of images |
A zero value for both minrej and maxrej is illegal, and in that case a NULL pointer is returned. If the total number of pixels to be rejected is greater then or equal to the number of input images, nothing is done and a NULL pointer is returned.
VimosImage* frCombSum | ( | VimosImage ** | ima_list, |
int | num | ||
) |
Sum a list of images.
ima_list | pointer to the array of images to combine |
num | number of images |
Sum a list of images. Result is a newly allocated image.
char** getFitsFileExtensionsNames | ( | fitsfile * | fptr, |
int * | extNum | ||
) |
Get the list of
fptr | pointer to fitsfile |
extNum | pointer to extension number |
Create a list of extension names of a FITS file
VimosImage* imageArith | ( | VimosImage * | ima1, |
VimosImage * | ima2, | ||
VimosOperator | optype | ||
) |
Arithmetic operations between 2 images. Result is a new image.
ima1 | pointer to first image |
ima2 | pointer to second image |
optype | operation type |
Arithmetic operations between 2 images. The 2 images must have the same dimensions. The output is 1 newly allocated image. The aritmetic operations are VM_OPER_ADD, VM_OPER_SUB, VM_OPER_MUL, VM_OPER_DIV
int imageArithLocal | ( | VimosImage * | ima1, |
VimosImage * | ima2, | ||
VimosOperator | optype | ||
) |
Arithmetic operations between 2 images. Result is stored in the first image.
ima1 | pointer to first image |
ima2 | pointer to second image |
optype | operation type |
Arithmetic operations between 2 images. The 2 images must have the same dimensions. The output is stored in the first image. The aritmetic operations are VM_OPER_ADD, VM_OPER_SUB, VM_OPER_MUL, VM_OPER_DIV
float imageAverageDeviation | ( | VimosImage * | image, |
float | level | ||
) |
Compute average deviation from any given value
image | input image |
level | reference value |
Compute average deviation from any given value
VimosDpoint* imageHistogram | ( | VimosImage * | ima_in, |
unsigned int | nbins | ||
) |
Compute image histogram
ima_in | input image |
nbins | number of bins for the histogram |
Compute an image histogram. Input one image and the number of bins for the histogram. Output a list of [nbins] VimosDpoints, where x contains the central pixelvalue for each bin, and y contains the number of pixels in this bin.
float imageMaximum | ( | VimosImage * | ima_in | ) |
Compute image maximum value of an image
ima_in | input image |
Compute the maximum value of an image
float imageMean | ( | VimosImage * | ima_in | ) |
Compute the average value of an image
ima_in | input image |
Compute the average value of an image
float imageMedian | ( | VimosImage * | ima_in | ) |
Compute the median value of an image
ima_in | input image |
Compute the median value of an image. Use median-wirth.
float imageMedSigma | ( | VimosImage * | image | ) |
Compute image sigma using median value instead of mean estimate
image | input image |
Compute the sigma value of an image using the median value instead of the mean
float imageMinimum | ( | VimosImage * | ima_in | ) |
Compute image minimum value of an image
ima_in | input image |
Compute the minimum value of an image
float imageMode | ( | VimosImage * | ima_in | ) |
Compute image mode value of an image
ima_in | input image |
Compute the mode value of an image (i.e. the histo peak position) It depends on the number of bins (binzise). Here take the bin size = 1 data unit (i.e. bin number =(int) max - min)
VimosImage* imageShift | ( | VimosImage * | imageIn, |
float | xshift, | ||
float | yshift, | ||
int | outXlen, | ||
int | outYlen, | ||
float | outVal | ||
) |
Shift an image in X and/or Y
imageIn | pointer to input image |
xshift | shift in X coordinate |
yshift | shift in Y coordinate |
outVal | substitution value |
Image shifting. The output is 1 newly allocated image.
float imageSigma | ( | VimosImage * | image | ) |
Compute image sigma
image | input image |
Compute the sigma value of an image
VimosImage* OLDfrCombMinMaxReject | ( | VimosImage ** | ima_list, |
double | minrej, | ||
double | maxrej, | ||
int | num | ||
) |
Combine images with rejection of high/low pixels values.
ima_list | pointer to the array of images to combine |
minrej | percent of pixels to min-reject |
maxrej | percent of pixels to max-reject |
num | number of images |
Percentages are expressed with numbers from 0 to 100. If the percent of pixels to max or min reject is less then the min percentage step (i.e. 100/num), no image will be min or max rejected. Not more than 90 percent of pixel values can be rejected: if such threshold is trespassed, a NULL pointer is returned.
float sumPixelsInImage | ( | VimosImage * | ima_in, |
int | x, | ||
int | y, | ||
int | nx, | ||
int | ny | ||
) |
Compute the sum of all pixelvalues in a rectangle.
ima_in | input image |
x | x lower left corner of the rectangle |
y | y lower left corner of the rectangle |
nx | number of pixels in x |
ny | number of pixels in y |
Compute the sum of all pixelvalues in a rectangle. The rectangle is given by the lower left corner coordinates (x,y) and the number of pixels nx and ny.
VimosImage* VmFrAveFil | ( | VimosImage * | ima_in, |
int | filtsizex, | ||
int | filtsizey, | ||
int | excludeCenter | ||
) |
Apply a average filter to an image.
ima_in | pointer to input image |
filtsizex | size in x of the filter box |
filtsizey | size in y of the filter box |
excludeCenter | flag to exclude the center of the box in the computation of the average |
Apply an optimized average filter of sizes filtsizex, filtsixey to an image. The output is a newly allocated image. Set excludeCenter flag to 1 to exclude the center of the median kernel from the median computation. If the median kernel extends over the image edges, the boundary points are repeated such that the box has always the same size (this is a modification compared to the original algorithm).
VimosImage* VmFrFilter | ( | VimosImage * | image, |
int | xSize, | ||
int | ySize, | ||
FilterMethod | method, | ||
int | excludeCenter | ||
) |
Filter an image.
image | pointer to input image |
xSize | size in x of the filter box |
ySize | size in y of the filter box |
method | filter method |
excludecenter | flag to exclude the center of the box in the computation of the median |
Apply a filter of choice to an image. Available method are median, average, gaussian filter. An automatic method can be specified.
VimosImage* VmFrMedFil | ( | VimosImage * | ima_in, |
int | filtsizex, | ||
int | filtsizey, | ||
int | excludeCenter | ||
) |
Apply a median filter to an image.
ima_in | pointer to input image |
filtsizex | size in x of the filter box |
filtsizey | size in y of the filter box |
excludecenter | flag to exclude the center of the box in the computation of the median |
Apply an optimized median filter of sizes filtsizex, filtsixey to an image. The output is a newly allocated image. Set excludeCenter flag to 1 to exclude the center of the median kernel from the median computation. If the median kernel extends over the image edges, the boundary points are repeated such that the box has always the same size (this is a modification compared to the original algorithm).
VimosImage* VmImNorm | ( | VimosImage * | ima_in, |
Method | meth | ||
) |
Normalize an image.
ima_in | pointer to input image |
meth | normalization method |
Normalize an image. Possible normalization methods are: MEAN normalize image to its mean value, MEDIAN: normalize image to its median value, and MODE: normalize image to its mode. The output is a newly allocated image.