ifw-odp
4.0.0-pre1
|
Macros | |
#define | _POSIX_C_SOURCE 200112L |
Functions | |
cpl_error_code | clipm_centroiding_gauss (const cpl_image *image, const cpl_size window_xxyy[4], double *xy_centre, double *xy_centre_err, double *xy_sigma, double *xy_sigma_err, double *xy_fwhm, double *xy_fwhm_err, double *centre_intensity, int robustness) |
Determine the position of an object in an image window, for x and y separately, by collapsing the image and fitting a gaussian. More... | |
cpl_error_code | clipm_centroiding_moment (const cpl_image *image, const cpl_size window_xxyy[4], int allow_wdw_enlarge, double gain, double *out_xy_centre, double *out_xy_centre_err, double *out_xy_sigma, double *out_xy_fwhm, double *centre_intensity) |
Determine the barycenter of an object in an image window. More... | |
cpl_error_code | clipm_centroiding_multi_gauss (const cpl_image *image, const cpl_matrix *locations, cpl_size areasize, cpl_matrix **xy_centre, cpl_matrix **xy_centre_err, cpl_matrix **xy_sigma, cpl_matrix **xy_sigma_err, cpl_matrix **xy_fwhm, cpl_matrix **xy_fwhm_err, cpl_matrix **centre_intensities, cpl_array **all_error_codes, int robustness) |
Invoke clipm_centroiding_gauss() at several locations in an image. More... | |
This module provides functions for centroiding inside image windows.
#define _POSIX_C_SOURCE 200112L |
cpl_error_code clipm_centroiding_gauss | ( | const cpl_image * | image, |
const cpl_size | window_xxyy[4], | ||
double * | xy_centre, | ||
double * | xy_centre_err, | ||
double * | xy_sigma, | ||
double * | xy_sigma_err, | ||
double * | xy_fwhm, | ||
double * | xy_fwhm_err, | ||
double * | centre_intensity, | ||
int | robustness | ||
) |
Determine the position of an object in an image window, for x and y separately, by collapsing the image and fitting a gaussian.
image | Input image (FITS convention) |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
xy_centre | Output centre coordinate buffer of size 2 ([x, y]), can be NULL |
xy_centre_err | Output centre error buffer (1 sigma) of size 2 ([x_err, y_err]), can be NULL |
xy_sigma | Output sigma buffer of size 2 ([sx, sy]), can be NULL |
xy_sigma_err | Output sigma error buffer (1 sigma) of size 2 ([sx_err, sy_err]), can be NULL |
xy_fwhm | Output full-width-half-maximum buffer of size 2 ([fwhm_x, fwhm_y]), can be NULL |
xy_fwhm_err | Output FWHM error buffer (1 sigma) of size 2 ([fwhm_x_err, fwhm_y_err]), can be NULL |
centre_intensity | Output intensity of the (closest) centre pixel, can be NULL |
robustness | Maximum number of retries (>= 0) |
Reasonable values for robustness are:
If there are other peaks than the main object to be centered, it might be possible that the fitting locks onto them. With enough difference in weight, this should seldom happen. For the case that there are two peaks with diagonal offset, the x and y fit could lock onto the different peaks. This would be detected by a not successful final fitting process or strange results.
cpl_error_code clipm_centroiding_moment | ( | const cpl_image * | image, |
const cpl_size | window_xxyy[4], | ||
int | allow_wdw_enlarge, | ||
double | gain, | ||
double * | out_xy_centre, | ||
double * | out_xy_centre_err, | ||
double * | out_xy_sigma, | ||
double * | out_xy_fwhm, | ||
double * | centre_intensity | ||
) |
Determine the barycenter of an object in an image window.
image | Input image (FITS convention) |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
allow_wdw_enlarge | Flag to allow the function to increase the window size when it detects that the window cuts the wings of the centered object, default should be 0 |
gain | (Optional) detector gain input in unit [1/electrons], required for computation of out_xy_centre_err, ignored if out_xy_centre_err is NULL |
out_xy_centre | (Output) centre coordinate buffer of size 2 ([x, y]) |
out_xy_centre_err | (Optional output) centre uncertainty buffer of size 2 ([x, y]), can be NULL |
out_xy_sigma | (Optional output) sigma buffer of size 2 ([x, y]), can be NULL |
out_xy_fwhm | (Optional Output) FWHM (buffer of size 2 [x, y]), measured (not derived from sigma) |
centre_intensity | (Optional output) intensity of the (closest) centre pixel, can be NULL |
cpl_error_code clipm_centroiding_multi_gauss | ( | const cpl_image * | image, |
const cpl_matrix * | locations, | ||
cpl_size | areasize, | ||
cpl_matrix ** | xy_centre, | ||
cpl_matrix ** | xy_centre_err, | ||
cpl_matrix ** | xy_sigma, | ||
cpl_matrix ** | xy_sigma_err, | ||
cpl_matrix ** | xy_fwhm, | ||
cpl_matrix ** | xy_fwhm_err, | ||
cpl_matrix ** | centre_intensities, | ||
cpl_array ** | all_error_codes, | ||
int | robustness | ||
) |
Invoke clipm_centroiding_gauss() at several locations in an image.
image | Input image (FITS convention) |
locations | Center coordinates of sub-regions (windows) as 2 x N matrix |
areasize | Edge-length of the square sub-regions (windows), at least 5 |
xy_centre | Output centre coordinate matrix of size 2 x N ([x, y]), can be NULL |
xy_centre_err | Output centre error matrix (1 sigma) of size 2 x N, can be NULL |
xy_sigma | Output sigma matrix of size 2 x N, can be NULL |
xy_sigma_err | Output sigma error matrix (1 sigma) of size 2 x N, can be NULL |
xy_fwhm | Output full-width-half-maximum matrix of size 2 x N, can be NULL |
xy_fwhm_err | Output FWHM error matrix (1 sigma) of size 2 x N, can be NULL |
centre_intensities | Output intensity matrix of the (closest) centre pixels of size 1 x N, can be NULL |
all_error_codes | Output array of type CPL_TYPE_INT and size N, can be NULL |
robustness | Maximum number of respective retries (>= 0) |