Functions | |
| static cpl_image * | filter_median (const cpl_image *image, int radx, int rady, bool extrapolate_border) |
| Median filter. | |
| const cpl_property * | uves_find_property_const (const uves_propertylist *plist, const char *name, int number) |
| Find named property. | |
| cpl_property * | uves_find_property (uves_propertylist *plist, const char *name, int number) |
| cpl_error_code | uves_filter_image_average (cpl_image *image, int radius_x, int radius_y) |
| Average filter. | |
| cpl_error_code | uves_filter_image_median (cpl_image **image, int xwindow, int ywindow, bool extrapolate_border) |
| Median filter. | |
| double | uves_utils_get_kth_double (double *a, int n, int k) |
| returns the kth value of an array | |
| double | uves_tools_get_median (double *a, int n) |
| returns median (not CPL median) of an array | |
| cpl_error_code | uves_fit_gaussian_2d_image (const cpl_image *image, const cpl_image *noise, int x1, int y_1, int x2, int y2, double *x0, double *y_0, double *sigmax, double *sigmay, double *amplitude, double *dx0, double *dy0) |
| Fit a 2d gaussian to an image sub-window. | |
| static cpl_image * filter_median | ( | const cpl_image * | image, | |
| int | radx, | |||
| int | rady, | |||
| bool | extrapolate_border | |||
| ) | [static] |
Median filter.
| image | Image to filter | |
| radx | x-radius of median window | |
| rady | y-radius of median window | |
| extrapolate_border | If false (which should be considered the default value), a smaller window is used at the image borders (where the full window would be partially outside of the image). If true, the median is calculated only for points where the full window is inside the image, and the border region is obtained by constant extrapolation. |
Definition at line 493 of file uves_utils_cpl.c.
References assure, assure_mem, uves_max_int(), uves_min_int(), uves_tostring_cpl_type(), and uves_utils_get_kth_double().
Referenced by uves_filter_image_median().
| const cpl_property* uves_find_property_const | ( | const uves_propertylist * | plist, | |
| const char * | name, | |||
| int | number | |||
| ) |
Find named property.
| plist | propertylist to search | |
| name | property name | |
| number | number of property to find (counting from zero). E.g. setting number=1 would return the 2nd property with matching name |
Definition at line 177 of file uves_utils_cpl.c.
References assure, uves_propertylist_get_const(), and uves_propertylist_get_size().
Referenced by uves_find_property().
| cpl_error_code uves_filter_image_average | ( | cpl_image * | image, | |
| int | radius_x, | |||
| int | radius_y | |||
| ) |
Average filter.
| image | Image to filter | |
| radius_x | width of filter window is 2*radius_x + 1 | |
| radius_y | height of filter window is 2*radius_y + 1 |
There is currently no handling of bad pixels.
Definition at line 228 of file uves_utils_cpl.c.
References assure, uves_msg_debug, and uves_tostring_cpl_type().
| cpl_error_code uves_filter_image_median | ( | cpl_image ** | image, | |
| int | xwindow, | |||
| int | ywindow, | |||
| bool | extrapolate_border | |||
| ) |
Median filter.
| image | Image to filter | |
| xwindow | x-radius of filter window | |
| ywindow | y-radius of filter window | |
| extrapolate_border | See filter_median() |
cpl_image_get_median_window() is called for each pixel. A more clever implementation would keep track of the running window.
Definition at line 353 of file uves_utils_cpl.c.
References assure, check, and filter_median().
Referenced by uves_get_blaze_ratio(), and uves_response_efficiency().
| double uves_utils_get_kth_double | ( | double * | a, | |
| int | n, | |||
| int | k | |||
| ) |
returns the kth value of an array
| a | array | |
| n | array size | |
| k | component to evaluate |
Definition at line 416 of file uves_utils_cpl.c.
Referenced by filter_median(), and uves_tools_get_median().
| double uves_tools_get_median | ( | double * | a, | |
| int | n | |||
| ) |
returns median (not CPL median) of an array
| a | array | |
| n | array size |
Definition at line 452 of file uves_utils_cpl.c.
References uves_utils_get_kth_double().
Referenced by opt_get_noise_median(), and opt_get_sky().
| cpl_error_code uves_fit_gaussian_2d_image | ( | const cpl_image * | image, | |
| const cpl_image * | noise, | |||
| int | x1, | |||
| int | y_1, | |||
| int | x2, | |||
| int | y2, | |||
| double * | x0, | |||
| double * | y_0, | |||
| double * | sigmax, | |||
| double * | sigmay, | |||
| double * | amplitude, | |||
| double * | dx0, | |||
| double * | dy0 | |||
| ) |
Fit a 2d gaussian to an image sub-window.
| image | The image to fit. | |
| noise | The uncertainty (one sigma, gaussian errors assumed) associated with the image. If NULL, constant uncertainties are assumed, and then dx0 and dy0 cannot be determined. | |
| x1 | Lower left corner (inclusive, FITS convention). | |
| y_1 | Lower left corner (inclusive, FITS convention). | |
| x2 | Upper right corner (inclusive, FITS convention). | |
| y2 | Upper right corner (inclusive, FITS convention). | |
| x0 | (output) x-center of best fit gaussian. | |
| y_0 | (output) y-center of best fit gaussian. | |
| sigmax | (output) x-width of best fit gaussian. Positive on success. | |
| sigmay | (output) y-width of best fit gaussian. Positive on success. | |
| amplitude | (output) Height of the best fit gaussian, relative to the background level. May be NULL. | |
| dx0 | (output) Uncertainty of x0. May be NULL. | |
| dy0 | (output) Uncertainty of y_0. May be NULL. |
uves_fit_gaussian_1d_image().
Definition at line 621 of file uves_utils_cpl.c.
References assure, check, uves_gauss(), and uves_gauss_derivative().
Referenced by test_gaussian_fitting().
1.5.1