HAWKI Pipeline Reference Manual 1.8.12
|
00001 /* $Id: hawki_distortion.h,v 1.13 2012/12/07 14:09:12 cgarcia Exp $ 00002 * 00003 * This file is part of the HAWKI Pipeline 00004 * Copyright (C) 2002,2003 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: cgarcia $ 00023 * $Date: 2012/12/07 14:09:12 $ 00024 * $Revision: 1.13 $ 00025 * $Name: hawki-1_8_12 $ 00026 */ 00027 00028 #ifndef HAWKI_DISTORTION_H 00029 #define HAWKI_DISTORTION_H 00030 00031 /*----------------------------------------------------------------------------- 00032 Includes 00033 -----------------------------------------------------------------------------*/ 00034 00035 #include <cpl.h> 00036 00037 /*----------------------------------------------------------------------------- 00038 Structures and typedefs 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 Prototypes 00055 -----------------------------------------------------------------------------*/ 00056 00057 CPL_BEGIN_DECLS 00058 hawki_distortion * hawki_distortion_grid_new 00059 (int detector_nx, 00060 int detector_ny, 00061 int grid_size); 00062 00063 void hawki_distortion_delete 00064 (hawki_distortion * distortion); 00065 00066 hawki_distortion * hawki_distortion_load 00067 (const cpl_frame * dist_x, 00068 const cpl_frame * dist_y, 00069 int idet); 00070 00071 int hawki_distortion_get_size_x 00072 (const hawki_distortion * distortion); 00073 00074 int hawki_distortion_get_size_y 00075 (const hawki_distortion * distortion); 00076 00077 int hawki_distortion_correct_alldetectors 00078 (cpl_image ** alldetectors, 00079 const cpl_frame * distortion_x, 00080 const cpl_frame * distortion_y) ; 00081 00082 cpl_image * hawki_distortion_correct_detector 00083 (cpl_image * image, 00084 cpl_image * dist_x, 00085 cpl_image * dist_y); 00086 00087 int hawki_distortion_correct_coords 00088 (const hawki_distortion * distortion, 00089 double x_pos, 00090 double y_pos, 00091 double * x_pos_distcorr, 00092 double * y_pos_distcorr); 00093 00094 int hawki_distortion_inverse_correct_coords 00095 (const hawki_distortion * distortion, 00096 double x_pos, 00097 double y_pos, 00098 double * x_pos_distdecorr, 00099 double * y_pos_distdecorr); 00100 00101 int hawki_distortion_apply_maps 00102 (cpl_imagelist * ilist, 00103 cpl_image ** dist_x, 00104 cpl_image ** dist_y); 00105 00106 int hawki_distortion_create_maps_detector 00107 (const hawki_distortion * distortion, 00108 cpl_image * dist_detector_x, 00109 cpl_image * dist_detector_y); 00110 00111 int hawki_distortion_create_maps 00112 (const hawki_distortion * distortion, 00113 cpl_image ** dist_x, 00114 cpl_image ** dist_y); 00115 00116 hawki_distortion * hawki_distortion_compute_solution 00117 (const cpl_table ** ref_catalogues, 00118 const cpl_bivector * cat_offsets, 00119 const cpl_table * matching_sets, 00120 int ncats, 00121 int detector_nx, 00122 int detector_ny, 00123 int grid_size, 00124 const hawki_distortion * dist_initguess, 00125 double * rms); 00126 CPL_END_DECLS 00127 00128 #endif