hawki_distortion.h

00001 /* $Id: hawki_distortion.h,v 1.12 2010/03/12 13:04:44 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: 2010/03/12 13:04:44 $
00024  * $Revision: 1.12 $
00025  * $Name: hawki-1_8_0 $
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 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

Generated on Thu Feb 17 17:13:07 2011 for HAWKI Pipeline Reference Manual by  doxygen 1.4.7