|
High-Level Data Reduction Library 1.6.0a5
High-Level data reduction routines for ESO pipelines
|
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_wrap (cpl_image *img, cpl_image *err, hdrl_free *destructor, cpl_boolean sync_mask) |
| void | hdrl_image_unwrap (hdrl_image *himg) |
| 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 | |
| hdrl_image * | hdrl_image_new_from_buffer (cpl_size nx, cpl_size ny, hdrl_buffer *buf) |
| 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) |
| cpl_error_code hdrl_image_accept_all | ( | hdrl_image * | self | ) |
Accept all pixels in an image.
| self | input 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:
| 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:
| 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:
| 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) |
| cpl_size hdrl_image_count_rejected | ( | const hdrl_image * | self | ) |
return number of rejected pixels
| self | 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
| image | data to copy |
| error | errors to copy |
| void hdrl_image_delete | ( | hdrl_image * | himg | ) |
delete hdrl_image
| 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:
| 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:
| 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:
| 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:
| 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:
| hdrl_image * hdrl_image_duplicate | ( | const hdrl_image * | himg | ) |
copy hdrl_image
| 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 |
| 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 |
| 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).
| cpl_image * hdrl_image_get_error | ( | hdrl_image * | himg | ) |
get error as cpl image
| himg | hdrl image |
| const cpl_image * hdrl_image_get_error_const | ( | const hdrl_image * | himg | ) |
get error as cpl image
| himg | hdrl image |
| cpl_image * hdrl_image_get_image | ( | hdrl_image * | himg | ) |
get data as cpl image
| himg | hdrl image |
| const cpl_image * hdrl_image_get_image_const | ( | const hdrl_image * | himg | ) |
get data as cpl image
| himg | hdrl image |
| cpl_mask * hdrl_image_get_mask | ( | hdrl_image * | himg | ) |
get cpl bad pixel mask from image
| himg | hdrl image |
| const cpl_mask * hdrl_image_get_mask_const | ( | const hdrl_image * | himg | ) |
get cpl bad pixel mask from image
| himg | hdrl image |
| hdrl_value hdrl_image_get_mean | ( | const hdrl_image * | self | ) |
computes mean pixel value and associated error of an image.
| self | input image |
| 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 
| 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 |
| 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 |
| 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 |
| 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 |
| cpl_size hdrl_image_get_size_x | ( | const hdrl_image * | self | ) |
return size of X dimension of image
| self | image |
| cpl_size hdrl_image_get_size_y | ( | const hdrl_image * | self | ) |
return size of Y dimension of image
| self | 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.
| self | input image |
| double hdrl_image_get_stdev | ( | const hdrl_image * | self | ) |
computes the standard deviation of the data of an image
| self | input 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.
| self | input image |
| hdrl_value hdrl_image_get_weighted_mean | ( | const hdrl_image * | self | ) |
computes the weighted mean and associated error of an image.
| self | input image |
| 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) |
| 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) |
| 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. |
| hdrl_image * hdrl_image_mul_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Multiply two images.
| self | first operand |
| other | second operand |
| 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 |
| 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 |
| hdrl_image * hdrl_image_new_from_buffer | ( | cpl_size | nx, |
| cpl_size | ny, | ||
| hdrl_buffer * | buf | ||
| ) |
| 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 |
| 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 |
| 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) |
| 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 |
| 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 |
| 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 |
| 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. |
| hdrl_image * hdrl_image_sub_image_create | ( | const hdrl_image * | self, |
| const hdrl_image * | other | ||
| ) |
Subtract two images.
| self | first operand |
| other | second operand |
| 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 |
| 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. |
| void hdrl_image_unwrap | ( | hdrl_image * | himg | ) |
| hdrl_image * hdrl_image_wrap | ( | cpl_image * | img, |
| cpl_image * | err, | ||
| hdrl_free * | destructor, | ||
| cpl_boolean | sync_mask | ||
| ) |