|
CR2RE Pipeline Reference Manual 1.6.8
|
Functions | |
| cpl_image * | hdrl_image_get_image (hdrl_image *himg) |
| get data as cpl image | |
| const cpl_image * | hdrl_image_get_image_const (const hdrl_image *himg) |
| get data as cpl image | |
| cpl_image * | hdrl_image_get_error (hdrl_image *himg) |
| get error as cpl image | |
| const cpl_image * | hdrl_image_get_error_const (const hdrl_image *himg) |
| get error as cpl image | |
| cpl_mask * | hdrl_image_get_mask (hdrl_image *himg) |
| get cpl bad pixel mask from image | |
| const cpl_mask * | hdrl_image_get_mask_const (const hdrl_image *himg) |
| get cpl bad pixel mask from image | |
| hdrl_image * | hdrl_image_create (const cpl_image *image, const cpl_image *error) |
| create a new hdrl_image from to existing images by copying them | |
| hdrl_image * | hdrl_image_new (cpl_size nx, cpl_size ny) |
| create new zero filled hdrl image | |
| void | hdrl_image_delete (hdrl_image *himg) |
| delete hdrl_image | |
| hdrl_image * | hdrl_image_duplicate (const hdrl_image *himg) |
| copy hdrl_image | |
| cpl_error_code | hdrl_image_reject_from_mask (hdrl_image *self, const cpl_mask *map) |
| set bpm of hdrl_image | |
| cpl_error_code | hdrl_image_reject (hdrl_image *self, cpl_size xpos, cpl_size ypos) |
| mark pixel as bad | |
| int | hdrl_image_is_rejected (hdrl_image *self, cpl_size xpos, cpl_size ypos) |
| return if pixel is marked bad | |
| cpl_size | hdrl_image_count_rejected (const hdrl_image *self) |
| return number of rejected pixels | |
| cpl_error_code | hdrl_image_reject_value (hdrl_image *self, cpl_value mode) |
| Reject pixels with the specified special value(s) | |
| cpl_error_code | hdrl_image_accept (hdrl_image *self, cpl_size xpos, cpl_size ypos) |
| mark pixel as good | |
| cpl_error_code | hdrl_image_accept_all (hdrl_image *self) |
| Accept all pixels in an image. | |
| cpl_size | hdrl_image_get_size_x (const hdrl_image *self) |
| return size of X dimension of image | |
| cpl_size | hdrl_image_get_size_y (const hdrl_image *self) |
| return size of Y dimension of image | |
| hdrl_value | hdrl_image_get_pixel (const hdrl_image *self, cpl_size xpos, cpl_size ypos, int *pis_rejected) |
| get pixel values of hdrl_image | |
| cpl_error_code | hdrl_image_set_pixel (hdrl_image *self, cpl_size xpos, cpl_size ypos, hdrl_value value) |
| set pixel values of hdrl_image | |
| hdrl_image * | hdrl_image_extract (const hdrl_image *self, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury) |
| extract copy of window from image | |
| cpl_error_code | hdrl_image_turn (hdrl_image *self, int rot) |
| Rotate an image by a multiple of 90 degrees clockwise. | |
| cpl_error_code | hdrl_image_copy (hdrl_image *dst, const hdrl_image *src, cpl_size xpos, cpl_size ypos) |
| Copy one image into another. | |
| cpl_error_code | hdrl_image_insert (hdrl_image *self, const cpl_image *image, const cpl_image *error, cpl_size xpos, cpl_size ypos) |
| Copy cpl images into an hdrl image. | |
| cpl_error_code | hdrl_image_dump_structure (const hdrl_image *himg, FILE *stream) |
| Dump structural information of a HDRL image. | |
| cpl_error_code | hdrl_image_dump_window (const hdrl_image *himg, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, FILE *stream) |
| Dump pixel values in a HDRL image. | |
| cpl_error_code | hdrl_image_add_image (hdrl_image *self, const hdrl_image *other) |
| Add two images, store the result in the first image. | |
| hdrl_image * | hdrl_image_add_image_create (const hdrl_image *self, const hdrl_image *other) |
| Add two images. | |
| cpl_error_code | hdrl_image_add_scalar (hdrl_image *self, hdrl_value value) |
| Elementwise addition of a scalar to an image. | |
| cpl_error_code | hdrl_image_sub_image (hdrl_image *self, const hdrl_image *other) |
| Subtract two images, store the result in the first image. | |
| hdrl_image * | hdrl_image_sub_image_create (const hdrl_image *self, const hdrl_image *other) |
| Subtract two images. | |
| cpl_error_code | hdrl_image_sub_scalar (hdrl_image *self, hdrl_value value) |
| Elementwise subtraction of a scalar from an image. | |
| cpl_error_code | hdrl_image_mul_image (hdrl_image *self, const hdrl_image *other) |
| Multiply two images, store the result in the first image. | |
| hdrl_image * | hdrl_image_mul_image_create (const hdrl_image *self, const hdrl_image *other) |
| Multiply two images. | |
| cpl_error_code | hdrl_image_mul_scalar (hdrl_image *self, hdrl_value value) |
| Elementwise multiplication of an image with a scalar. | |
| cpl_error_code | hdrl_image_div_image (hdrl_image *self, const hdrl_image *other) |
| Divide two images, store the result in the first image. | |
| hdrl_image * | hdrl_image_div_image_create (const hdrl_image *self, const hdrl_image *other) |
| Divide two images and return the resulting image. | |
| cpl_error_code | hdrl_image_div_scalar (hdrl_image *self, hdrl_value value) |
| Elementwise division of an image with a scalar. | |
| hdrl_value | hdrl_image_get_mean (const hdrl_image *self) |
| computes mean pixel value and associated error of an image. | |
| hdrl_value | hdrl_image_get_sigclip_mean (const hdrl_image *self, double kappa_low, double kappa_high, int niter) |
| computes the sigma-clipped mean and associated error of an image. | |
| hdrl_value | hdrl_image_get_minmax_mean (const hdrl_image *self, double nlow, double nhigh) |
| computes the minmax rejected mean and the associated error of an image. | |
| hdrl_value | hdrl_image_get_mode (const hdrl_image *self, double histo_min, double histo_max, double bin_size, hdrl_mode_type method, cpl_size error_niter) |
| computes the mode and the associated error of an image. | |
| hdrl_value | hdrl_image_get_median (const hdrl_image *self) |
| computes the median and associated error of an image. | |
| hdrl_value | hdrl_image_get_weighted_mean (const hdrl_image *self) |
| computes the weighted mean and associated error of an image. | |
| double | hdrl_image_get_stdev (const hdrl_image *self) |
| computes the standard deviation of the data of an image | |
| hdrl_value | hdrl_image_get_sum (const hdrl_image *self) |
| computes the sum of all pixel values and the associated error of an image. | |
| hdrl_value | hdrl_image_get_sqsum (const hdrl_image *self) |
| computes the sum of all pixel values and the error of a squared image. | |
| cpl_error_code | hdrl_image_pow_scalar (hdrl_image *self, const hdrl_value exponent) |
| computes the power of an image by a scalar | |
| hdrl_image * | hdrl_image_pow_scalar_create (const hdrl_image *self, const hdrl_value exponent) |
| computes the power of an image by a scalar creating a new image | |
| cpl_error_code | hdrl_image_exp_scalar (hdrl_image *self, const hdrl_value base) |
| computes the exponential of an image by a scalar | |
| hdrl_image * | hdrl_image_exp_scalar_create (const hdrl_image *self, const hdrl_value base) |
| computes the exponential of an image by a scalar creating a new image | |
hdrl_image is a two dimensional array object containing data and its associated errors. It provides a similar api to cpl_image and performs linear error propagation where it makes sense.
| cpl_error_code hdrl_image_accept | ( | hdrl_image * | self, |
| cpl_size | xpos, | ||
| cpl_size | ypos | ||
| ) |
mark pixel as good
| self | image |
| xpos | x coordinate (FITS CONVENTION) |
| ypos | y coordinate (FITS CONVENTION) |
Definition at line 493 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
| cpl_error_code hdrl_image_accept_all | ( | hdrl_image * | self | ) |
Accept all pixels in an image.
| self | input image |
Definition at line 508 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
| cpl_error_code hdrl_image_add_image | ( | hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Add two images, store the result in the first image.
| self | first operand. |
| other | second operand. |
The first input image is modified to contain the result of the operation.
The bad pixel map of the first image becomes the union of the bad pixel maps of the input images.
Possible cpl-error-code set in this function:
Definition at line 59 of file hdrl_image_math.c.
References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), and hdrl_image_get_image_const().
Referenced by hdrl_image_add_image_create(), hdrl_imagelist_add_image(), hdrl_imagelist_add_imagelist(), hdrl_spectrum1D_add_spectrum(), and hdrl_spectrum1D_add_spectrum_create().
| hdrl_image * hdrl_image_add_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Add two images.
| self | first operand |
| other | second operand |
Creates a new image, being the result of the operation, and returns it to the caller. The returned image must be deallocated using hdrl_image_delete().
The bad pixels map of the result is the union of the bad pixels maps of the input images.
Possible cpl-error-code set in this function:
Definition at line 89 of file hdrl_image_math.c.
References hdrl_image_add_image(), hdrl_image_delete(), and hdrl_image_duplicate().
| cpl_error_code hdrl_image_add_scalar | ( | hdrl_image * | self, |
| hdrl_value | value | ||
| ) |
Elementwise addition of a scalar to an image.
| self | Image to be modified in place. |
| value | Number to add |
Modifies the image by adding a number to each of its pixels with error propagation.
Possible cpl-error-code set in this function:
Definition at line 117 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by cr2res_qc_detlin(), hdrl_imagelist_add_scalar(), hdrl_spectrum1D_add_scalar(), and hdrl_spectrum1D_add_scalar_create().
| cpl_error_code hdrl_image_copy | ( | hdrl_image * | dst, |
| const hdrl_image * | src, | ||
| cpl_size | xpos, | ||
| cpl_size | ypos | ||
| ) |
Copy one image into another.
| dst | the image in which im2 is inserted |
| src | the inserted image |
| xpos | the x pixel position in im1 where the lower left pixel of im2 should go (from 1 to the x size of im1) |
| ypos | the y pixel position in im1 where the lower left pixel of im2 should go (from 1 to the y size of im1) |
Definition at line 686 of file hdrl_image.c.
References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), and hdrl_image_get_image_const().
| cpl_size hdrl_image_count_rejected | ( | const hdrl_image * | self | ) |
return number of rejected pixels
| self | image |
Definition at line 461 of file hdrl_image.c.
References hdrl_image_get_image_const().
| hdrl_image * hdrl_image_create | ( | const cpl_image * | image, |
| const cpl_image * | error | ||
| ) |
create a new hdrl_image from to existing images by copying them
| image | data to copy |
| error | errors to copy |
Definition at line 295 of file hdrl_image.c.
Referenced by cr2res_extract_median(), cr2res_extract_sum_tilt(), cr2res_extract_sum_vert(), cr2res_io_load_image(), cr2res_io_save_BPM(), hdrl_flat_compute(), hdrl_imagelist_create(), hdrl_maglim_compute(), and hdrl_overscan_compute().
| void hdrl_image_delete | ( | hdrl_image * | himg | ) |
delete hdrl_image
Definition at line 379 of file hdrl_image.c.
Referenced by cr2res_calib_image(), cr2res_extract_slitdec_curved(), cr2res_extract_traces(), cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), cr2res_io_load_SLIT_MODEL(), cr2res_io_save_BPM(), cr2res_master_flat(), cr2res_qc_detlin(), cr2res_qc_numsat(), cr2res_slit_curv_compute_order_trace(), hdrl_bpm_3d_compute(), hdrl_flat_compute(), hdrl_fringe_correct(), hdrl_image_add_image_create(), hdrl_image_div_image_create(), hdrl_image_exp_scalar_create(), hdrl_image_get_sqsum(), hdrl_image_mul_image_create(), hdrl_image_pow_scalar_create(), hdrl_image_sub_image_create(), hdrl_imagelist_empty(), hdrl_imagelist_set(), hdrl_maglim_compute(), hdrl_overscan_compute_result_delete(), hdrl_overscan_correct_result_delete(), hdrl_spectrum1D_delete(), hdrl_spectrum1D_reject_pixels(), and hdrl_spectrum1Dlist_collapse().
| cpl_error_code hdrl_image_div_image | ( | hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Divide two images, store the result in the first image.
| self | first operand |
| other | second operand |
Possible cpl-error-code set in this function:
Definition at line 273 of file hdrl_image_math.c.
References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), and hdrl_image_get_image_const().
Referenced by cr2res_calib_image(), hdrl_image_div_image_create(), hdrl_imagelist_div_image(), hdrl_imagelist_div_imagelist(), hdrl_spectrum1D_div_spectrum(), and hdrl_spectrum1D_div_spectrum_create().
| hdrl_image * hdrl_image_div_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Divide two images and return the resulting image.
| self | first operand |
| other | second operand |
Possible cpl-error-code set in this function:
Definition at line 302 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_div_image(), and hdrl_image_duplicate().
Referenced by cr2res_master_flat().
| cpl_error_code hdrl_image_div_scalar | ( | hdrl_image * | self, |
| hdrl_value | value | ||
| ) |
Elementwise division of an image with a scalar.
| self | Image to be modified in place. |
| value | Non-zero number to divide with |
Possible cpl-error-code set in this function:
Definition at line 329 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by hdrl_fringe_compute(), hdrl_imagelist_div_scalar(), hdrl_spectrum1D_div_scalar(), and hdrl_spectrum1D_div_scalar_create().
| cpl_error_code hdrl_image_dump_structure | ( | const hdrl_image * | himg, |
| FILE * | stream | ||
| ) |
Dump structural information of a HDRL image.
| himg | Image to dump |
| stream | Output stream, accepts stdout or stderr |
Possible cpl-error-code set in this function:
Definition at line 767 of file hdrl_image.c.
References hdrl_image_get_image_const().
Referenced by hdrl_imagelist_dump_structure().
| cpl_error_code hdrl_image_dump_window | ( | const hdrl_image * | himg, |
| cpl_size | llx, | ||
| cpl_size | lly, | ||
| cpl_size | urx, | ||
| cpl_size | ury, | ||
| FILE * | stream | ||
| ) |
Dump pixel values in a HDRL image.
| himg | Image to dump |
| llx | Lower left x position (FITS convention, 1 for leftmost) |
| lly | Lower left y position (FITS convention, 1 for lowest) |
| urx | Specifies the window position |
| ury | Specifies the window position |
| stream | Output stream, accepts stdout or stderr |
Possible cpl-error-code set in this function:
Definition at line 793 of file hdrl_image.c.
References hdrl_image_get_image_const().
Referenced by hdrl_imagelist_dump_window().
| cpl_error_code hdrl_image_exp_scalar | ( | hdrl_image * | self, |
| const hdrl_value | base | ||
| ) |
computes the exponential of an image by a scalar
| self | input image |
| base | base of the power |
Definition at line 649 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by hdrl_image_exp_scalar_create(), hdrl_spectrum1D_exp_scalar(), and hdrl_spectrum1D_exp_scalar_create().
| hdrl_image * hdrl_image_exp_scalar_create | ( | const hdrl_image * | self, |
| const hdrl_value | base | ||
| ) |
computes the exponential of an image by a scalar creating a new image
| self | input image |
| base | base of the power |
Definition at line 669 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_duplicate(), and hdrl_image_exp_scalar().
| hdrl_image * hdrl_image_extract | ( | const hdrl_image * | self, |
| cpl_size | llx, | ||
| cpl_size | lly, | ||
| cpl_size | urx, | ||
| cpl_size | ury | ||
| ) |
extract copy of window from image
| self | image to extract from |
| llx | lower left x coordinate of window (FITS convention) |
| lly | lower left y coordinate of window (FITS convention) |
| urx | upper right x coordinate of window (FITS convention) |
| ury | upper right y coordinate of window (FITS convention) |
If the coordinates are < 1 the dimension of the image is added to them. So llx = 0 wraps to hdrl_image_get_size_x(self).
Definition at line 625 of file hdrl_image.c.
References hdrl_image_get_error_const(), hdrl_image_get_image_const(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().
| cpl_image * hdrl_image_get_error | ( | hdrl_image * | himg | ) |
get error as cpl image
| himg | hdrl image |
Definition at line 131 of file hdrl_image.c.
Referenced by cr2res_add_shotnoise(), cr2res_detlin_correct(), cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), cr2res_io_load_SLIT_MODEL(), cr2res_qc_detlin_stat(), hdrl_flat_compute(), hdrl_image_accept(), hdrl_image_accept_all(), hdrl_image_add_image(), hdrl_image_add_scalar(), hdrl_image_copy(), hdrl_image_div_image(), hdrl_image_div_scalar(), hdrl_image_exp_scalar(), hdrl_image_get_mask(), hdrl_image_insert(), hdrl_image_mul_image(), hdrl_image_mul_scalar(), hdrl_image_pow_scalar(), hdrl_image_reject(), hdrl_image_reject_from_mask(), hdrl_image_set_pixel(), hdrl_image_sub_image(), hdrl_image_sub_scalar(), hdrl_image_turn(), hdrl_spectrum1D_reject_pixels(), and hdrl_spectrum1Dlist_collapse().
| const cpl_image * hdrl_image_get_error_const | ( | const hdrl_image * | himg | ) |
get error as cpl image
| himg | hdrl image |
Definition at line 144 of file hdrl_image.c.
Referenced by cr2res_detlin_correct(), cr2res_extract2d_trace(), cr2res_extract_median(), cr2res_extract_slitdec_curved(), cr2res_extract_sum_tilt(), cr2res_extract_sum_vert(), hdrl_image_add_image(), hdrl_image_copy(), hdrl_image_div_image(), hdrl_image_duplicate(), hdrl_image_extract(), hdrl_image_get_pixel(), hdrl_image_mul_image(), hdrl_image_sub_image(), hdrl_lacosmic_edgedetect(), hdrl_overscan_correct(), and hdrl_resample_imagelist_to_table().
| cpl_image * hdrl_image_get_image | ( | hdrl_image * | himg | ) |
get data as cpl image
| himg | hdrl image |
Definition at line 105 of file hdrl_image.c.
Referenced by cr2res_add_shotnoise(), cr2res_calib_image(), cr2res_calib_subtract_interorder_column(), cr2res_detlin_correct(), cr2res_extract_slitdec_curved(), cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), cr2res_qc_detlin(), cr2res_qc_detlin_stat(), cr2res_qc_numsat(), cr2res_slit_curv_gen_map(), cr2res_wave_gen_wave_map(), hdrl_bpm_3d_compute(), hdrl_bpm_fit_compute(), hdrl_flat_compute(), hdrl_image_accept(), hdrl_image_accept_all(), hdrl_image_add_image(), hdrl_image_add_scalar(), hdrl_image_copy(), hdrl_image_div_image(), hdrl_image_div_scalar(), hdrl_image_exp_scalar(), hdrl_image_get_mask(), hdrl_image_insert(), hdrl_image_is_rejected(), hdrl_image_mul_image(), hdrl_image_mul_scalar(), hdrl_image_pow_scalar(), hdrl_image_reject(), hdrl_image_reject_from_mask(), hdrl_image_reject_value(), hdrl_image_set_pixel(), hdrl_image_sub_image(), hdrl_image_sub_scalar(), hdrl_image_turn(), hdrl_maglim_compute(), hdrl_spectrum1D_reject_pixels(), and hdrl_spectrum1Dlist_collapse().
| const cpl_image * hdrl_image_get_image_const | ( | const hdrl_image * | himg | ) |
get data as cpl image
| himg | hdrl image |
Definition at line 118 of file hdrl_image.c.
Referenced by cr2res_calib_subtract_interorder_column(), cr2res_detlin_correct(), cr2res_extract2d_trace(), cr2res_extract_median(), cr2res_extract_slitdec_curved(), cr2res_extract_sum_tilt(), cr2res_extract_sum_vert(), cr2res_slit_curv_compute_order_trace(), hdrl_bpm_2d_compute(), hdrl_flat_compute(), hdrl_fringe_compute(), hdrl_fringe_correct(), hdrl_image_add_image(), hdrl_image_copy(), hdrl_image_count_rejected(), hdrl_image_div_image(), hdrl_image_dump_structure(), hdrl_image_dump_window(), hdrl_image_duplicate(), hdrl_image_extract(), hdrl_image_get_mask_const(), hdrl_image_get_pixel(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), hdrl_image_get_stdev(), hdrl_image_mul_image(), hdrl_image_sub_image(), hdrl_lacosmic_edgedetect(), hdrl_maglim_compute(), hdrl_overscan_correct(), hdrl_resample_imagelist_to_table(), and hdrl_spectrum1D_get_wavelength().
| cpl_mask * hdrl_image_get_mask | ( | hdrl_image * | himg | ) |
get cpl bad pixel mask from image
| himg | hdrl image |
Definition at line 157 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by cr2res_calib_image(), cr2res_qc_detlin(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_fringe_compute(), hdrl_fringe_correct(), and hdrl_maglim_compute().
| const cpl_mask * hdrl_image_get_mask_const | ( | const hdrl_image * | himg | ) |
get cpl bad pixel mask from image
| himg | hdrl image |
Definition at line 175 of file hdrl_image.c.
References hdrl_image_get_image_const().
Referenced by hdrl_image_reject_from_mask(), hdrl_lacosmic_edgedetect(), hdrl_overscan_correct(), and hdrl_resample_imagelist_to_table().
| hdrl_value hdrl_image_get_mean | ( | const hdrl_image * | self | ) |
computes mean pixel value and associated error of an image.
| self | input image |
Definition at line 402 of file hdrl_image_math.c.
| hdrl_value hdrl_image_get_median | ( | const hdrl_image * | self | ) |
computes the median and associated error of an image.
| self | input image |
This function computes the median and the associated error of the image. For the error propagation the error is scaled by the sqrt of the statistical efficiency of the median on normal distributed data which is 
Definition at line 501 of file hdrl_image_math.c.
| hdrl_value hdrl_image_get_minmax_mean | ( | const hdrl_image * | self, |
| double | nlow, | ||
| double | nhigh | ||
| ) |
computes the minmax rejected mean and the associated error of an image.
| self | input image |
| nlow | number of low pixels to reject |
| nhigh | number of high pixels to reject |
Definition at line 448 of file hdrl_image_math.c.
| hdrl_value hdrl_image_get_mode | ( | const hdrl_image * | self, |
| double | histo_min, | ||
| double | histo_max, | ||
| double | bin_size, | ||
| hdrl_mode_type | method, | ||
| cpl_size | error_niter | ||
| ) |
computes the mode and the associated error of an image.
| self | input image |
| histo_min | minimum value of low pixels to use |
| histo_max | maximum value of high pixels to be use |
| bin_size | size of the histogram bin |
| method | method to use for the mode computation |
| error_niter | number of iterations to compute the error of the mode |
Definition at line 474 of file hdrl_image_math.c.
Referenced by hdrl_maglim_compute().
| hdrl_value hdrl_image_get_pixel | ( | const hdrl_image * | self, |
| cpl_size | xpos, | ||
| cpl_size | ypos, | ||
| int * | pis_rejected | ||
| ) |
get pixel values of hdrl_image
| self | image |
| xpos | x coordinate (FITS CONVENTION) |
| ypos | y coordinate (FITS CONVENTION) |
| pis_rejected | int pointer to store if pixel is bad, may be NULL |
Definition at line 559 of file hdrl_image.c.
References hdrl_image_get_error_const(), and hdrl_image_get_image_const().
Referenced by cr2res_extract_traces(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist2(), and hdrl_spectrum1D_get_flux_value().
| hdrl_value hdrl_image_get_sigclip_mean | ( | const hdrl_image * | self, |
| double | kappa_low, | ||
| double | kappa_high, | ||
| int | niter | ||
| ) |
computes the sigma-clipped mean and associated error of an image.
| self | input image |
| kappa_low | low sigma bound |
| kappa_high | high sigma bound |
| niter | maximum number of clipping iterators |
Definition at line 425 of file hdrl_image_math.c.
| cpl_size hdrl_image_get_size_x | ( | const hdrl_image * | self | ) |
return size of X dimension of image
| self | image |
Definition at line 525 of file hdrl_image.c.
References hdrl_image_get_image_const().
Referenced by cr2res_calib_subtract_interorder_column(), cr2res_extract_traces(), cr2res_qc_detlin(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist2(), hdrl_fringe_compute(), hdrl_fringe_correct(), hdrl_image_extract(), hdrl_imagelist_get_size_x(), hdrl_imagelist_set(), hdrl_lacosmic_edgedetect(), and hdrl_overscan_correct().
| cpl_size hdrl_image_get_size_y | ( | const hdrl_image * | self | ) |
return size of Y dimension of image
| self | image |
Definition at line 540 of file hdrl_image.c.
References hdrl_image_get_image_const().
Referenced by cr2res_calib_subtract_interorder_column(), cr2res_extract_traces(), cr2res_qc_detlin(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist2(), hdrl_fringe_compute(), hdrl_fringe_correct(), hdrl_image_extract(), hdrl_imagelist_get_size_y(), hdrl_imagelist_set(), hdrl_lacosmic_edgedetect(), and hdrl_overscan_correct().
| hdrl_value hdrl_image_get_sqsum | ( | const hdrl_image * | self | ) |
computes the sum of all pixel values and the error of a squared image.
| self | input image |
Definition at line 585 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_get_sum(), and hdrl_image_pow_scalar_create().
| double hdrl_image_get_stdev | ( | const hdrl_image * | self | ) |
computes the standard deviation of the data of an image
| self | input image |
Definition at line 540 of file hdrl_image_math.c.
References hdrl_image_get_image_const().
Referenced by hdrl_maglim_compute().
| hdrl_value hdrl_image_get_sum | ( | const hdrl_image * | self | ) |
computes the sum of all pixel values and the associated error of an image.
| self | input image |
Definition at line 555 of file hdrl_image_math.c.
Referenced by hdrl_image_get_sqsum().
| hdrl_value hdrl_image_get_weighted_mean | ( | const hdrl_image * | self | ) |
computes the weighted mean and associated error of an image.
| self | input image |
Definition at line 520 of file hdrl_image_math.c.
| cpl_error_code hdrl_image_insert | ( | hdrl_image * | self, |
| const cpl_image * | image, | ||
| const cpl_image * | error, | ||
| cpl_size | xpos, | ||
| cpl_size | ypos | ||
| ) |
Copy cpl images into an hdrl image.
| self | the image in which the cpl images are inserted |
| image | the inserted image |
| error | the inserted error, may be NULL |
| xpos | the x pixel position in im1 where the lower left pixel of im2 should go (from 1 to the x size of im1) |
| ypos | the y pixel position in im1 where the lower left pixel of im2 should go (from 1 to the y size of im1) |
Definition at line 715 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by cr2res_calib_image().
| int hdrl_image_is_rejected | ( | hdrl_image * | self, |
| cpl_size | xpos, | ||
| cpl_size | ypos | ||
| ) |
return if pixel is marked bad
| self | image |
| xpos | x coordinate (FITS CONVENTION) |
| ypos | y coordinate (FITS CONVENTION) |
Definition at line 445 of file hdrl_image.c.
References hdrl_image_get_image().
Referenced by hdrl_fit_polynomial_imagelist(), and hdrl_fit_polynomial_imagelist2().
| cpl_error_code hdrl_image_mul_image | ( | hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Multiply two images, store the result in the first image.
| self | first operand. |
| other | second operand. |
Definition at line 201 of file hdrl_image_math.c.
References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), and hdrl_image_get_image_const().
Referenced by hdrl_image_mul_image_create(), hdrl_imagelist_mul_image(), hdrl_imagelist_mul_imagelist(), hdrl_spectrum1D_mul_spectrum(), and hdrl_spectrum1D_mul_spectrum_create().
| hdrl_image * hdrl_image_mul_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Multiply two images.
| self | first operand |
| other | second operand |
Definition at line 222 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_duplicate(), and hdrl_image_mul_image().
| cpl_error_code hdrl_image_mul_scalar | ( | hdrl_image * | self, |
| hdrl_value | value | ||
| ) |
Elementwise multiplication of an image with a scalar.
| self | Image to be modified in place. |
| value | Number to multiply with |
Definition at line 245 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by cr2res_calib_image(), cr2res_extract_traces(), hdrl_fringe_correct(), hdrl_imagelist_mul_scalar(), hdrl_spectrum1D_mul_scalar(), and hdrl_spectrum1D_mul_scalar_create().
| hdrl_image * hdrl_image_new | ( | cpl_size | nx, |
| cpl_size | ny | ||
| ) |
create new zero filled hdrl image
| nx | size in x |
| ny | size in y |
Definition at line 311 of file hdrl_image.c.
Referenced by cr2res_calib_image(), cr2res_extract_slitdec_curved(), cr2res_qc_detlin(), cr2res_slit_curv_compute_order_trace(), cr2res_slit_curv_gen_map(), cr2res_wave_gen_wave_map(), hdrl_fit_polynomial_imagelist(), and hdrl_fit_polynomial_imagelist2().
| cpl_error_code hdrl_image_pow_scalar | ( | hdrl_image * | self, |
| const hdrl_value | exponent | ||
| ) |
computes the power of an image by a scalar
| self | input image |
| exponent | exponent of the power |
Definition at line 606 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by hdrl_image_pow_scalar_create(), hdrl_imagelist_pow_scalar(), hdrl_spectrum1D_pow_scalar(), and hdrl_spectrum1D_pow_scalar_create().
| hdrl_image * hdrl_image_pow_scalar_create | ( | const hdrl_image * | self, |
| const hdrl_value | exponent | ||
| ) |
computes the power of an image by a scalar creating a new image
| self | input image |
| exponent | exponent of the power |
Definition at line 626 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_duplicate(), and hdrl_image_pow_scalar().
Referenced by hdrl_image_get_sqsum().
| cpl_error_code hdrl_image_reject | ( | hdrl_image * | self, |
| cpl_size | xpos, | ||
| cpl_size | ypos | ||
| ) |
mark pixel as bad
| self | image |
| xpos | x coordinate (FITS CONVENTION) |
| ypos | y coordinate (FITS CONVENTION) |
Definition at line 427 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), and hdrl_spectrum1D_reject_pixels().
| cpl_error_code hdrl_image_reject_from_mask | ( | hdrl_image * | self, |
| const cpl_mask * | map | ||
| ) |
set bpm of hdrl_image
| self | image on which to set bpm |
| map | bpm to set |
Definition at line 407 of file hdrl_image.c.
References hdrl_image_get_error(), hdrl_image_get_image(), and hdrl_image_get_mask_const().
Referenced by cr2res_qc_detlin(), hdrl_fringe_compute(), and hdrl_maglim_compute().
| cpl_error_code hdrl_image_reject_value | ( | hdrl_image * | self, |
| cpl_value | mode | ||
| ) |
Reject pixels with the specified special value(s)
| self | Input image to modify |
| mode | Bit field specifying which special value(s) to reject |
Definition at line 477 of file hdrl_image.c.
References hdrl_image_get_image().
Referenced by cr2res_io_load_MASTER_DARK(), cr2res_io_load_MASTER_FLAT(), and cr2res_qc_detlin().
| cpl_error_code hdrl_image_set_pixel | ( | hdrl_image * | self, |
| cpl_size | xpos, | ||
| cpl_size | ypos, | ||
| hdrl_value | value | ||
| ) |
set pixel values of hdrl_image
| self | image |
| xpos | x coordinate (FITS CONVENTION) |
| ypos | y coordinate (FITS CONVENTION) |
| value | data value to set |
Definition at line 594 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by cr2res_extract_traces(), hdrl_fit_polynomial_imagelist(), and hdrl_fit_polynomial_imagelist2().
| cpl_error_code hdrl_image_sub_image | ( | hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Subtract two images, store the result in the first image.
| self | first operand. |
| other | second operand. |
Definition at line 137 of file hdrl_image_math.c.
References hdrl_image_get_error(), hdrl_image_get_error_const(), hdrl_image_get_image(), and hdrl_image_get_image_const().
Referenced by cr2res_calib_image(), hdrl_fringe_correct(), hdrl_image_sub_image_create(), hdrl_imagelist_sub_image(), hdrl_imagelist_sub_imagelist(), hdrl_spectrum1D_sub_spectrum(), and hdrl_spectrum1D_sub_spectrum_create().
| hdrl_image * hdrl_image_sub_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Subtract two images.
| self | first operand |
| other | second operand |
Definition at line 158 of file hdrl_image_math.c.
References hdrl_image_delete(), hdrl_image_duplicate(), and hdrl_image_sub_image().
Referenced by hdrl_bpm_3d_compute().
| cpl_error_code hdrl_image_sub_scalar | ( | hdrl_image * | self, |
| hdrl_value | value | ||
| ) |
Elementwise subtraction of a scalar from an image.
| self | Image to be modified in place. |
| value | Number to subtract |
Definition at line 181 of file hdrl_image_math.c.
References hdrl_image_get_error(), and hdrl_image_get_image().
Referenced by hdrl_fringe_compute(), hdrl_imagelist_sub_scalar(), hdrl_spectrum1D_sub_scalar(), and hdrl_spectrum1D_sub_scalar_create().
| cpl_error_code hdrl_image_turn | ( | hdrl_image * | self, |
| int | rot | ||
| ) |
Rotate an image by a multiple of 90 degrees clockwise.
| self | The image to rotate in place. |
| rot | The multiple: -1 is a rotation of 90 deg counterclockwise. |
Definition at line 663 of file hdrl_image.c.
References hdrl_image_get_error(), and hdrl_image_get_image().