00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef HAWKI_DISTORTION_H
00029 #define HAWKI_DISTORTION_H
00030
00031
00032
00033
00034
00035 #include <cpl.h>
00036
00037
00038
00039
00040
00041 typedef struct _hawki_distortion_ hawki_distortion;
00042
00043 struct _hawki_distortion_
00044 {
00045 cpl_image * dist_x;
00046 cpl_image * dist_y;
00047 double x_crval;
00048 double x_cdelt;
00049 double y_crval;
00050 double y_cdelt;
00051 };
00052
00053
00054
00055
00056
00057 hawki_distortion * hawki_distortion_grid_new
00058 (int detector_nx,
00059 int detector_ny,
00060 int grid_size);
00061
00062 void hawki_distortion_delete
00063 (hawki_distortion * distortion);
00064
00065 hawki_distortion * hawki_distortion_load
00066 (const cpl_frame * dist_x,
00067 const cpl_frame * dist_y,
00068 int idet);
00069
00070 int hawki_distortion_get_size_x
00071 (const hawki_distortion * distortion);
00072
00073 int hawki_distortion_get_size_y
00074 (const hawki_distortion * distortion);
00075
00076 int hawki_distortion_correct_alldetectors
00077 (cpl_image ** alldetectors,
00078 const cpl_frame * distortion_x,
00079 const cpl_frame * distortion_y) ;
00080
00081 cpl_image * hawki_distortion_correct_detector
00082 (cpl_image * image,
00083 cpl_image * dist_x,
00084 cpl_image * dist_y);
00085
00086 int hawki_distortion_correct_coords
00087 (const hawki_distortion * distortion,
00088 double x_pos,
00089 double y_pos,
00090 double * x_pos_distcorr,
00091 double * y_pos_distcorr);
00092
00093 int hawki_distortion_inverse_correct_coords
00094 (const hawki_distortion * distortion,
00095 double x_pos,
00096 double y_pos,
00097 double * x_pos_distdecorr,
00098 double * y_pos_distdecorr);
00099
00100 int hawki_distortion_apply_maps
00101 (cpl_imagelist * ilist,
00102 cpl_image ** dist_x,
00103 cpl_image ** dist_y);
00104
00105 int hawki_distortion_create_maps_detector
00106 (const hawki_distortion * distortion,
00107 cpl_image * dist_detector_x,
00108 cpl_image * dist_detector_y);
00109
00110 int hawki_distortion_create_maps
00111 (const hawki_distortion * distortion,
00112 cpl_image ** dist_x,
00113 cpl_image ** dist_y);
00114
00115 hawki_distortion * hawki_distortion_compute_solution
00116 (const cpl_table ** ref_catalogues,
00117 const cpl_bivector * cat_offsets,
00118 const cpl_table * matching_sets,
00119 int ncats,
00120 int detector_nx,
00121 int detector_ny,
00122 int grid_size,
00123 const hawki_distortion * dist_initguess,
00124 double * rms);
00125
00126
00127 #endif