Data Structures | |
| struct | _hawki_distortion_obj_function_args_ |
Functions | |
| int | hawki_distortion_apply_maps (cpl_imagelist *ilist, cpl_image **dist_x, cpl_image **dist_y) |
| Apply the distortion correction. | |
| double | hawki_distortion_compute_rms (const cpl_table **ref_catalogues, const cpl_bivector *cat_offsets, const cpl_table *matching_sets, int ncats, hawki_distortion *distortion) |
| This private function computes the rms, which is the objective function of the minimization algorithm. | |
| int | hawki_distortion_correct_alldetectors (cpl_image **ilist, const cpl_frame *frame_dist_x, const cpl_frame *frame_dist_y) |
| Apply the distortion correction. | |
| int | hawki_distortion_correct_coords (const hawki_distortion *distortion, double x_pos, double y_pos, double *x_pos_distcorr, double *y_pos_distcorr) |
| Apply the distortion correction to one detector position. | |
| cpl_image * | hawki_distortion_correct_detector (cpl_image *image, cpl_image *dist_x, cpl_image *dist_y) |
| Apply the distortion correction to one chip. | |
| void | hawki_distortion_delete (hawki_distortion *distortion) |
| Deallocates a hawki_distortion structure. | |
| double | hawki_distortion_get_deque_stddev (cx_deque *deque) |
| Compute the standard deviation of a deque. | |
| int | hawki_distortion_get_size_x (const hawki_distortion *distortion) |
| Gives the dimension in X of the distortion solution. | |
| int | hawki_distortion_get_size_y (const hawki_distortion *distortion) |
| Gives the dimension in Y of the distortion solution. | |
| hawki_distortion * | hawki_distortion_grid_new (int detector_nx, int detector_ny, int grid_size) |
| Allocate a new distortion solution. | |
| int | hawki_distortion_interpolate_distortion (const hawki_distortion *distortion, double x_pos, double y_pos, double *x_dist, double *y_dist) |
| Interpolates the distortion solution at a given position. | |
| int | hawki_distortion_inverse_correct_coords (const hawki_distortion *distortion, double x_pos, double y_pos, double *x_pos_distinvcorr, double *y_pos_distinvcorr) |
| Apply the inverse distortion correction to one detector position. | |
| hawki_distortion * | hawki_distortion_load (const cpl_frame *dist_x, const cpl_frame *dist_y, int idet) |
| Loads the distortion solution for one detector. | |
| int hawki_distortion_apply_maps | ( | cpl_imagelist * | ilist, | |
| cpl_image ** | dist_x, | |||
| cpl_image ** | dist_y | |||
| ) |
Apply the distortion correction.
| ilist | the input image list (chips 1 2 3 4) | |
| dist | the distortion file |
Definition at line 603 of file hawki_distortion.c.
References hawki_distortion_correct_detector().
| double hawki_distortion_compute_rms | ( | const cpl_table ** | ref_catalogues, | |
| const cpl_bivector * | cat_offsets, | |||
| const cpl_table * | matching_sets, | |||
| int | ncats, | |||
| hawki_distortion * | distortion | |||
| ) |
This private function computes the rms, which is the objective function of the minimization algorithm.
Definition at line 916 of file hawki_distortion.c.
References hawki_distortion_correct_coords(), and hawki_distortion_get_deque_stddev().
| int hawki_distortion_correct_alldetectors | ( | cpl_image ** | ilist, | |
| const cpl_frame * | frame_dist_x, | |||
| const cpl_frame * | frame_dist_y | |||
| ) |
Apply the distortion correction.
| ilist | the input image list (chips 1 2 3 4) | |
| dist | the distortion file |
Definition at line 286 of file hawki_distortion.c.
References hawki_distortion_correct_detector(), hawki_distortion_delete(), and hawki_distortion_load().
| int hawki_distortion_correct_coords | ( | const hawki_distortion * | distortion, | |
| double | x_pos, | |||
| double | y_pos, | |||
| double * | x_pos_distcorr, | |||
| double * | y_pos_distcorr | |||
| ) |
Apply the distortion correction to one detector position.
| distortion | the distortion solution | |
| x_pos | the X position in detector that we want to correct. | |
| y_pos | the Y position in detector that we want to correct. | |
| x_pos_distcorr | the X position in detector corrected from distortion | |
| y_pos_distcorr | the Y position in detector corrected from distortion |
This function will interpolate the distortion solution (given in variable distortion,
Definition at line 422 of file hawki_distortion.c.
References hawki_distortion_interpolate_distortion().
Referenced by hawki_distortion_compute_rms().
| cpl_image* hawki_distortion_correct_detector | ( | cpl_image * | image, | |
| cpl_image * | dist_x, | |||
| cpl_image * | dist_y | |||
| ) |
Apply the distortion correction to one chip.
| image | the input image | |
| dist | the distortion table |
Definition at line 370 of file hawki_distortion.c.
Referenced by hawki_distortion_apply_maps(), and hawki_distortion_correct_alldetectors().
| void hawki_distortion_delete | ( | hawki_distortion * | distortion | ) |
Deallocates a hawki_distortion structure.
| distortion | The distortion to allocate |
Definition at line 162 of file hawki_distortion.c.
Referenced by hawki_distortion_correct_alldetectors().
| double hawki_distortion_get_deque_stddev | ( | cx_deque * | deque | ) |
Compute the standard deviation of a deque.
Definition at line 1133 of file hawki_distortion.c.
Referenced by hawki_distortion_compute_rms().
| int hawki_distortion_get_size_x | ( | const hawki_distortion * | distortion | ) |
Gives the dimension in X of the distortion solution.
| dist | the distortion solution |
Definition at line 251 of file hawki_distortion.c.
| int hawki_distortion_get_size_y | ( | const hawki_distortion * | distortion | ) |
Gives the dimension in Y of the distortion solution.
| dist | the distortion solution |
Definition at line 268 of file hawki_distortion.c.
| hawki_distortion* hawki_distortion_grid_new | ( | int | detector_nx, | |
| int | detector_ny, | |||
| int | grid_size | |||
| ) |
Allocate a new distortion solution.
| detector_nx | The dimensions in X of a HAWK-I detector | |
| detector_nx | The dimensions in Y of a HAWK-I detector | |
| grid_size | The number of points in the distortion grid |
Definition at line 131 of file hawki_distortion.c.
| int hawki_distortion_interpolate_distortion | ( | const hawki_distortion * | distortion, | |
| double | x_pos, | |||
| double | y_pos, | |||
| double * | x_dist, | |||
| double * | y_dist | |||
| ) |
Interpolates the distortion solution at a given position.
| distortion | the distortion solution | |
| x_pos | the X position in detector that we want to correct. | |
| y_pos | the Y position in detector that we want to correct. | |
| x_dist | the distortion in X at position x_pos, y_pos | |
| y_dist | the distortion in Y at position x_pos, y_pos |
This provate function uses the four reference points found in distortion closer to x_pos, y_pos. Then it weights each point with the 3rd power of the distance to the target pixel and uses a linear interpolation.
Definition at line 512 of file hawki_distortion.c.
Referenced by hawki_distortion_correct_coords(), and hawki_distortion_inverse_correct_coords().
| int hawki_distortion_inverse_correct_coords | ( | const hawki_distortion * | distortion, | |
| double | x_pos, | |||
| double | y_pos, | |||
| double * | x_pos_distinvcorr, | |||
| double * | y_pos_distinvcorr | |||
| ) |
Apply the inverse distortion correction to one detector position.
| distortion | the distortion solution | |
| x_pos | the X position in detector that we want to decorrect. | |
| y_pos | the Y position in detector that we want to decorrect. | |
| x_pos_distcorr | the X position in detector decorrected from distortion | |
| y_pos_distcorr | the Y position in detector decorrected from distortion |
This function is the inverse function of hawki_distortion_correct_coords. WARNING: Although this is the "inverse" of hawki_distortion_correct_coords, applying this function to positions delivered by hawki_distortion_correct_coords will not provide the original positions back. We are simply not using the same position to interpolate the distortion table.
Definition at line 466 of file hawki_distortion.c.
References hawki_distortion_interpolate_distortion().
| hawki_distortion* hawki_distortion_load | ( | const cpl_frame * | dist_x, | |
| const cpl_frame * | dist_y, | |||
| int | idet | |||
| ) |
Loads the distortion solution for one detector.
| dist_x | the image with distortion in X | |
| dist_y | the image with distortion in Y | |
| idet | the detector to read. |
Definition at line 181 of file hawki_distortion.c.
References hawki_get_ext_from_detector(), and hawki_load_frame_detector().
Referenced by hawki_distortion_correct_alldetectors().
1.6.1