ifw-odp 5.1.1
 
Loading...
Searching...
No Matches
clipm_priv_image_signal.h
Go to the documentation of this file.
1
5
6#ifndef CLIPM_PRIV_IMAGE_SIGNAL_H
7#define CLIPM_PRIV_IMAGE_SIGNAL_H
8
9/*-----------------------------------------------------------------------------
10 Includes
11 -----------------------------------------------------------------------------*/
12
13#include <cpl.h>
14
15/*-----------------------------------------------------------------------------
16 Declaration Block
17 -----------------------------------------------------------------------------*/
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/*-----------------------------------------------------------------------------
24 * Defines
25 * -----------------------------------------------------------------------------*/
26
27/*----------------------------------------------------------------------------*/
41/*----------------------------------------------------------------------------*/
42#define clipm_priv_image_LOOP_GOOD_DATA_CONST( \
43 TYPE, \
44 IMSIZE_XY, \
45 WDWSIZE_XY, \
46 DATA_WDW, \
47 BADP_WDW, \
48 YACTION, \
49 XACTION, \
50 XACTION_ONLY_WITH_BPM) \
51do { \
52 int x, \
53 y; \
54 const TYPE *data; \
55 \
56 if (BADP_WDW != NULL) \
57 { \
58 const cpl_binary *badp; \
59 for ( y = 0, data = DATA_WDW, badp = BADP_WDW; \
60 y < WDWSIZE_XY[1]; \
61 y++, data += IMSIZE_XY[0], badp += IMSIZE_XY[0]) \
62 { \
63 YACTION \
64 for (x = 0; x < WDWSIZE_XY[0]; x++) \
65 if (! badp[x]) \
66 { \
67 XACTION \
68 XACTION_ONLY_WITH_BPM \
69 } \
70 } \
71 } \
72 else \
73 { \
74 for ( y = 0, data = DATA_WDW; \
75 y < WDWSIZE_XY[1]; \
76 y++, data += IMSIZE_XY[0]) \
77 { \
78 YACTION \
79 for (x = 0; x < WDWSIZE_XY[0]; x++) \
80 { \
81 XACTION \
82 } \
83 } \
84 } \
85} while (0)
86
87
88/*-----------------------------------------------------------------------------
89 Prototypes
90 -----------------------------------------------------------------------------*/
91
93 const void *data,
94 cpl_type type,
95 double xc,
96 double yc,
97 double r,
98 cpl_size xsize,
99 cpl_size ysize,
100 const cpl_binary
101 *badp,
102 cpl_size *nrpix);
103
105 const cpl_image *img,
106 const double *xy_peakpos,
107 double bg_level,
108 double *out_xy_fwhm,
109 double *out_xy_middle,
110 double *out_xy_edge_sigma);
111
113 const cpl_image *img,
114 const cpl_size window_xxyy[4],
115 double kappa,
116 double initial_limits[],
117 int nmax_iterations,
118 double *out_mean,
119 double *out_sigma,
120 double *out_kappasigma,
121 cpl_size *out_nused,
122 int *out_niterations);
123
125 const cpl_image *image,
126 const cpl_size window_xxyy[4],
127 double kappa,
128 double *out_sigma,
129 cpl_size *out_nused);
130
131cpl_error_code clipm_priv_image_get_psf_sigma(
132 const cpl_image *img,
133 const cpl_size window_xxyy[4],
134 const double *centre_xy,
135 double bg_level,
136 double cut_lower,
137 double cut_upper,
138 double *sigma_xy,
139 double gain,
140 double *centre_err_xy);
141
142cpl_error_code clipm_priv_image_collapse( const cpl_image *image,
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);
148
150 const cpl_image *img,
151 const cpl_size window_xxyy[4],
152 double limit,
153 cpl_size *out_nbad);
154
155cpl_image *clipm_priv_image_get_sat( const cpl_image *image,
156 const int window_xxyy[4],
157 cpl_image **contrib_sat);
158
160 const cpl_image *input,
161 const cpl_matrix *kernel,
162 const cpl_size window_xxyy[4],
163 int extend_bpm,
164 int int2double);
165
167 const cpl_image *image,
168 const cpl_size window_xxyy[4],
169 double sigma);
170
172 const cpl_image *img,
173 const cpl_size window_xxyy[4],
174 double *out_sigma,
175 cpl_size *out_nused);
176
178 const cpl_image *img,
179 double x_peakpos,
180 double y_peakpos,
181 double bg_level);
182
183
184/*----------------------------------------------------------------------------*/
185
186#ifdef __cplusplus
187} /* extern "C" */
188#endif
189
190#endif /* CLIPM_PRIV_IMAGE_SIGNAL_H */
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