6#ifndef CLIPM_PRIV_IMAGE_SIGNAL_H
7#define CLIPM_PRIV_IMAGE_SIGNAL_H
42#define clipm_priv_image_LOOP_GOOD_DATA_CONST( \
50 XACTION_ONLY_WITH_BPM) \
56 if (BADP_WDW != NULL) \
58 const cpl_binary *badp; \
59 for ( y = 0, data = DATA_WDW, badp = BADP_WDW; \
61 y++, data += IMSIZE_XY[0], badp += IMSIZE_XY[0]) \
64 for (x = 0; x < WDWSIZE_XY[0]; x++) \
68 XACTION_ONLY_WITH_BPM \
74 for ( y = 0, data = DATA_WDW; \
76 y++, data += IMSIZE_XY[0]) \
79 for (x = 0; x < WDWSIZE_XY[0]; x++) \
105 const cpl_image *img,
106 const double *xy_peakpos,
109 double *out_xy_middle,
110 double *out_xy_edge_sigma);
113 const cpl_image *img,
114 const cpl_size window_xxyy[4],
116 double initial_limits[],
120 double *out_kappasigma,
122 int *out_niterations);
125 const cpl_image *image,
126 const cpl_size window_xxyy[4],
129 cpl_size *out_nused);
132 const cpl_image *img,
133 const cpl_size window_xxyy[4],
134 const double *centre_xy,
140 double *centre_err_xy);
143 const cpl_size window_xxyy[4],
144 cpl_array **horizontal,
145 cpl_array **vertical,
146 cpl_array **x_weight_map,
147 cpl_array **y_weight_map);
150 const cpl_image *img,
151 const cpl_size window_xxyy[4],
156 const int window_xxyy[4],
157 cpl_image **contrib_sat);
160 const cpl_image *input,
161 const cpl_matrix *kernel,
162 const cpl_size window_xxyy[4],
167 const cpl_image *image,
168 const cpl_size window_xxyy[4],
172 const cpl_image *img,
173 const cpl_size window_xxyy[4],
175 cpl_size *out_nused);
178 const cpl_image *img,
cpl_error_code clipm_priv_image_collapse(const cpl_image *image, const cpl_size window_xxyy[4], cpl_array **horizontal, cpl_array **vertical, cpl_array **x_weight_map, cpl_array **y_weight_map)
Collapse an image (by averaging) in both dimensions.
Definition clipm_priv_image_signal.c:1623
cpl_size clipm_priv_image_pixel_count_below(const cpl_image *img, const cpl_size window_xxyy[4], double limit, cpl_size *out_nbad)
Count all the pixels (strictly) below a given limit.
Definition clipm_priv_image_signal.c:1822
double clipm_priv_image_estimate_fwhm_round(const cpl_image *img, double x_peakpos, double y_peakpos, double bg_level)
Estimate the FWHM of a round object.
Definition clipm_priv_image_signal.c:663
double clipm_priv_image_estimate_low_kappa_sigma(const cpl_image *image, const cpl_size window_xxyy[4], double kappa, double *out_sigma, cpl_size *out_nused)
Force the iterative kappa-sigma clipping to converge against the dark.
Definition clipm_priv_image_signal.c:203
cpl_error_code clipm_priv_image_estimate_fwhm_xy(const cpl_image *img, const double *xy_peakpos, double bg_level, double *out_xy_fwhm, double *out_xy_middle, double *out_xy_edge_sigma)
Estimate the FWHM of an object separable in x and y.
Definition clipm_priv_image_signal.c:864
cpl_image * clipm_priv_image_get_sat(const cpl_image *image, const int window_xxyy[4], cpl_image **contrib_sat)
cpl_image * clipm_priv_image_filter_lowpass(const cpl_image *image, const cpl_size window_xxyy[4], double sigma)
Convolve an image with a gaussian bell curve.
Definition clipm_priv_image_signal.c:2431
cpl_error_code clipm_priv_image_get_kappa_sigma(const cpl_image *img, const cpl_size window_xxyy[4], double kappa, double initial_limits[], int nmax_iterations, double *out_mean, double *out_sigma, double *out_kappasigma, cpl_size *out_nused, int *out_niterations)
Determine mean and sigma by iteratively ignoring outliers.
Definition clipm_priv_image_signal.c:1122
cpl_image * clipm_priv_image_conv_matrix(const cpl_image *input, const cpl_matrix *kernel, const cpl_size window_xxyy[4], int extend_bpm, int int2double)
Convolve an image with a kernel stored in a matrix.
Definition clipm_priv_image_signal.c:2051
double clipm_priv_image_get_mean_perimeter(const void *data, cpl_type type, double xc, double yc, double r, cpl_size xsize, cpl_size ysize, const cpl_binary *badp, cpl_size *nrpix)
Average values in a buffer along a perimeter.
Definition clipm_priv_image_signal.c:45
double clipm_priv_image_estimate_bg_in_region(const cpl_image *img, const cpl_size window_xxyy[4], double *out_sigma, cpl_size *out_nused)
Estimate the background in a small image region.
Definition clipm_priv_image_signal.c:489
cpl_error_code clipm_priv_image_get_psf_sigma(const cpl_image *img, const cpl_size window_xxyy[4], const double *centre_xy, double bg_level, double cut_lower, double cut_upper, double *sigma_xy, double gain, double *centre_err_xy)
Compute the sigma (RMS) of an object (i.e. the PSF).
Definition clipm_priv_image_signal.c:1421