|
High-Level Data Reduction Library 1.6.0
High-Level data reduction routines for ESO pipelines
|
Functions | |
| cpl_image * | hdrl_get_spatial_freq (cpl_image *ima, double gausfilt, int mirrorx, int mirrory) |
| Get low spatial frequency componenets from an image using the FFTW. | |
| cpl_image * | hdrl_mime_image_polynomial_bkg (cpl_image *image, int dim_X, int dim_Y, cpl_matrix **coeffs) |
| cpl_error_code | hdrl_mime_compute_polynomial_bkg (const cpl_imagelist *images, cpl_imagelist *bkg_images, int dim_X, int dim_Y, cpl_matrix **coeffs) |
| Fit smooth background for a list of images. | |
| cpl_matrix * | hdrl_mime_legendre_tensors_create (int nx, int ny, int npx, int npy) |
| Create tensor products of Legendre polynomials. | |
| cpl_matrix * | hdrl_mime_matrix_linspace_create (int n, double a, double b) |
| Create equally spaced nodes. | |
| cpl_matrix * | hdrl_mime_legendre_polynomials_create (int npoly, double a, double b, const cpl_matrix *x) |
| Create the Legendre polynomial basis on the interval (a,b). | |
| cpl_matrix * | hdrl_mime_linalg_pairwise_column_tensor_products_create (const cpl_matrix *mat1, const cpl_matrix *mat2) |
| Create selected pairwise tensor products of the columns of two matrices. | |
| cpl_error_code | hdrl_mime_matrix_copy_column (const cpl_matrix *mat1, int j_1, cpl_matrix *mat2, int j_2) |
| Copy a column from one matrix to another matrix. | |
| cpl_matrix * | hdrl_mime_linalg_tensor_products_columns_create (const cpl_matrix *mat1, const cpl_matrix *mat2) |
| Create the tensor products of the columns of two matrices. | |
| cpl_matrix * | hdrl_mime_tensor_weights_create (int nx, int ny) |
| Create tensor product weights. | |
| cpl_error_code | hdrl_mime_matrix_mask_rows (cpl_matrix *mat, const cpl_mask *mask) |
| Fill matrix rows with zeros as indicated by a mask. | |
| cpl_error_code | hdrl_mime_matrix_rescale_rows (const cpl_matrix *mat, const cpl_matrix *d, cpl_matrix *dmat) |
| Multiply the rows of a matrix by given factors. | |
| cpl_matrix * | hdrl_mime_linalg_solve_tikhonov (const cpl_matrix *mat, const cpl_matrix *rhs, double alpha) |
| Solve an overdetermined linear system in the least-squares sense. | |
| cpl_matrix * | hdrl_mime_linalg_normal_equations_create (const cpl_matrix *mat, double alpha) |
| Create the matrix transpose(A) * A + alpha for given A and alpha. | |
| cpl_matrix * | hdrl_mime_matrix_product_left_transpose_create (const cpl_matrix *mat1, const cpl_matrix *mat2) |
| Create the product of the transpose of a matrix with another matrix. | |
| cpl_error_code | hdrl_mime_matrix_product (const cpl_matrix *mat1, const cpl_matrix *mat2, cpl_matrix *product) |
| Fill a matrix with the product of two given matrices. | |
This module contains functions derived from MIME project, adapted to HDRL.
| cpl_image * hdrl_get_spatial_freq | ( | cpl_image * | ima, |
| double | gausfilt, | ||
| int | mirrorx, | ||
| int | mirrory | ||
| ) |
Get low spatial frequency componenets from an image using the FFTW.
Function to calculate the low spatial frequency
| ima | image |
| gausfilt | Gaussian Fourier filter size |
| mirrorx | for mirroring edges (ocfft continuity) |
| mirrory | for mirroring edges (ocfft continuity) |
| cpl_error_code hdrl_mime_compute_polynomial_bkg | ( | const cpl_imagelist * | images, |
| cpl_imagelist * | bkg_images, | ||
| int | dim_X, | ||
| int | dim_Y, | ||
| cpl_matrix ** | coeffs | ||
| ) |
Fit smooth background for a list of images.
| images | List of images. | |
| [out] | bkg_images | Smooth background images. |
| dim_X,dim_Y | dimensions of polynomials in | |
| [out] | coeffs | Polynomial coefficients. |
CPL_ERROR_NONE or the appropriate error code.This function computes smooth background images by fitting polynomial surfaces to the input images. Bad-pixel masks for the images are taken into account.
| cpl_image * hdrl_mime_image_polynomial_bkg | ( | cpl_image * | image, |
| int | dim_X, | ||
| int | dim_Y, | ||
| cpl_matrix ** | coeffs | ||
| ) |
| cpl_matrix * hdrl_mime_legendre_polynomials_create | ( | int | npoly, |
| double | a, | ||
| double | b, | ||
| const cpl_matrix * | x | ||
| ) |
Create the Legendre polynomial basis on the interval (a,b).
| npoly | Number of polynomials. |
| a | Left endpoint of the interval. |
| b | Right endpoint of the interval. |
| x | Nodes, at which the polynomials are evaluated. |
The i-th column contains the values of the i-th polynomial at the given nodes. The polynomials have degrees 0, 1, ..., npoly-1. The nodes must lie on the interval [a, b]. The specific dimensions of the matrix x are not used, only its size.
The returned matrix must be deallocated using cpl_matrix_delete().
| cpl_matrix * hdrl_mime_legendre_tensors_create | ( | int | nx, |
| int | ny, | ||
| int | npx, | ||
| int | npy | ||
| ) |
Create tensor products of Legendre polynomials.
| nx | Number of nodes in the x-direction. |
| ny | Number of x nodes in the y-direction. |
| npx | Number of tensor products of functions of x. |
| npy | Number of tensor products of functions of y. |
The returned matrix must be deallocated using cpl_matrix_delete().
| cpl_matrix * hdrl_mime_linalg_normal_equations_create | ( | const cpl_matrix * | mat, |
| double | alpha | ||
| ) |
Create the matrix transpose(A) * A + alpha for given A and alpha.
| mat | Matrix, |
| alpha | The regularization parameter. |
| cpl_matrix * hdrl_mime_linalg_pairwise_column_tensor_products_create | ( | const cpl_matrix * | mat1, |
| const cpl_matrix * | mat2 | ||
| ) |
Create selected pairwise tensor products of the columns of two matrices.
| mat1 | A matrix, |
| mat2 | A matrix. |
The tensor product of the j1-th and j2-th columns is created iff j1*(nc2-1) + j2*(nc1-1) <= (nc1-1)*(nc2-1). The two matrices may have different dimensions.
| cpl_matrix * hdrl_mime_linalg_solve_tikhonov | ( | const cpl_matrix * | mat, |
| const cpl_matrix * | rhs, | ||
| double | alpha | ||
| ) |
Solve an overdetermined linear system in the least-squares sense.
| mat | A matrix. |
| rhs | A matrix containing right-hand-side vectors. |
| alpha | The regularization parameter of the Tikhonov method. |
Typically, this method is used for overdetermined systems, where the matrix has more rows than columns, but it can also be used for square and underdetermined systems. Several right-hand-sides can be provided. The regularization parameter increases with the noise level.
| cpl_matrix * hdrl_mime_linalg_tensor_products_columns_create | ( | const cpl_matrix * | mat1, |
| const cpl_matrix * | mat2 | ||
| ) |
Create the tensor products of the columns of two matrices.
| mat1 | A matrix, |
| mat2 | A matrix. |
The two matrices must have the same number of columns. The result has dimensions (nr1*nr2) x nc.
| cpl_error_code hdrl_mime_matrix_copy_column | ( | const cpl_matrix * | mat1, |
| int | j_1, | ||
| cpl_matrix * | mat2, | ||
| int | j_2 | ||
| ) |
Copy a column from one matrix to another matrix.
| mat1 | The matrix whose column is copied, | |
| j_1 | The index of the column to be copied, | |
| [in,out] | mat2 | The matrix whose column is overwritten, |
| [in,out] | j_2 | The index of the column to be overwritten. |
CPL_ERROR_NONE or the appropriate error code.Both matrices must have the same number of rows.
| cpl_matrix * hdrl_mime_matrix_linspace_create | ( | int | n, |
| double | a, | ||
| double | b | ||
| ) |
Create equally spaced nodes.
| n | The number of nodes, |
| a | The leftmost node, |
| b | The rightmost node. |
The number of nodes n must be at least 2.
| cpl_error_code hdrl_mime_matrix_mask_rows | ( | cpl_matrix * | mat, |
| const cpl_mask * | mask | ||
| ) |
Fill matrix rows with zeros as indicated by a mask.
| mat | A matrix, |
| mask | A mask flagging rows to be filled with 0.0s, |
CPL_ERROR_NONE or the appropriate error code.The size of mask must be equal to the number of rows of mat. The rows corresponding to CPL_BINARY_1 are set to 0.0.
| cpl_error_code hdrl_mime_matrix_product | ( | const cpl_matrix * | mat1, |
| const cpl_matrix * | mat2, | ||
| cpl_matrix * | product | ||
| ) |
Fill a matrix with the product of two given matrices.
| mat1 | A matrix, | |
| mat2 | A matrix, | |
| [out] | product | The product of the matrices. |
CPL_ERROR_NONE or the appropriate error code.The number of rows of mat1 must be equal to the number of rows of product. The number of columns of mat2 must be equal to the number of columns of product. The number of columns of mat1 must be equal to the number of rows of mat2.
| cpl_matrix * hdrl_mime_matrix_product_left_transpose_create | ( | const cpl_matrix * | mat1, |
| const cpl_matrix * | mat2 | ||
| ) |
Create the product of the transpose of a matrix with another matrix.
| mat1 | A matrix, |
| mat2 | A matrix. |
The two matrices must have the same number of rows. The product matrix must be deallocated with cpl_matrix_delete().
| cpl_error_code hdrl_mime_matrix_rescale_rows | ( | const cpl_matrix * | mat, |
| const cpl_matrix * | d, | ||
| cpl_matrix * | dmat | ||
| ) |
Multiply the rows of a matrix by given factors.
| mat | A matrix, | |
| d | The factors. | |
| [out] | dmat | The matrix with rescaled rows. |
CPL_ERROR_NONE or the appropriate error code.The number of rows must be equal to the size of d. The matrix dmat must be allocated before calling this function.
| cpl_matrix * hdrl_mime_tensor_weights_create | ( | int | nx, |
| int | ny | ||
| ) |
Create tensor product weights.
| nx | Number of nodes in the x-direction, |
| ny | Number of x nodes in the y-direction, |
The returned matrix must be deallocated using cpl_matrix_delete().