00001 #ifndef SINFO_WAVE_CALIBRATION_H
00002 #define SINFO_WAVE_CALIBRATION_H
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
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <cpl.h>
00042 #include "sinfo_wavecal.h"
00043
00044
00045
00046
00054 FitParams **
00055 sinfo_new_fit_params( int n_params ) ;
00056
00064 void
00065 sinfo_new_destroy_fit_params ( FitParams *** params ) ;
00066
00075 void
00076 sinfo_new_dump_fit_params_to_ascii ( FitParams ** params, const char * filename ) ;
00077
00086 void
00087 sinfo_new_dump_ascii_to_fit_params ( FitParams ** params, char * filename ) ;
00088
00129 int
00130 sinfo_new_find_lines(cpl_image * lineImage,
00131 float * wave_position,
00132 float * wave_intensity,
00133 int n_lines,
00134 int ** row_clean,
00135 float ** wavelength_clean,
00136 float beginWave,
00137 float dispersion1,
00138 float dispersion2,
00139 float mindiff,
00140 int halfWidth,
00141 int * n_found_lines,
00142 float sigma,
00143 int * sum_lines ) ;
00144
00153 int
00154 sinfo_new_read_list( char * listname,
00155 float * lineCenter,
00156 float * lineIntensity ) ;
00157
00187 int
00188 sinfo_new_line_fit (cpl_image * mergedImage,
00189 FitParams * par,
00190 float fwhm,
00191 int lineInd,
00192 int column,
00193 int halfWidth,
00194 int lineRow,
00195 float min_amplitude,
00196 Vector * line,
00197 int * mpar,
00198 float * xdat,
00199 float * wdat ) ;
00200
00225 int
00226 sinfo_new_fit_lines (cpl_image * line_image,
00227 FitParams ** allParams,
00228 float fwhm,
00229 int * n_lines,
00230 int ** row,
00231 float ** wavelength,
00232 int width,
00233 float min_amplitude ) ;
00234
00257 float
00258 sinfo_new_polyfit( FitParams ** par,
00259 int column,
00260 int n_lines,
00261 int n_rows,
00262 float dispersion,
00263 float max_residual,
00264 float * acoefs,
00265 float * dacoefs,
00266 int * n_reject,
00267 int n_fitcoefs ) ;
00268
00285 float
00286 sinfo_new_coefs_cross_fit ( int n_columns,
00287 float * acoefs,
00288 float * dacoefs,
00289 float * bcoefs,
00290 int n_fitcoefs,
00291 float sigma_factor ) ;
00292
00311 cpl_image *
00312 sinfo_new_wave_map(cpl_image * lineImage,
00313 float ** bcoefs,
00314 int n_a_fitcoefs,
00315 int n_b_fitcoefs,
00316 float * wavelength,
00317 float * intensity,
00318 int n_lines,
00319 int magFactor) ;
00320
00365 int
00366 sinfo_new_wavelength_calibration(cpl_image * image,
00367 FitParams ** par ,
00368 float ** bcoefs,
00369 float * wave,
00370 int n_lines,
00371 int ** row_clean,
00372 float ** wavelength_clean,
00373 int * n_found_lines,
00374 float dispersion,
00375 int halfWidth,
00376 float minAmplitude,
00377 float max_residual,
00378 float fwhm,
00379 int n_a_fitcoefs,
00380 int n_b_fitcoefs,
00381 float sigmaFactor,
00382 float pixel_tolerance ) ;
00383
00395 cpl_image *
00396 sinfo_new_convolve_image_by_gauss(cpl_image * lineImage,
00397 int hw ) ;
00398
00438 cpl_image *
00439 sinfo_new_defined_resampling(cpl_image * image,
00440 cpl_image * calimage,
00441 int n_params,
00442 int* n_rows,
00443 double * dispersion,
00444 float * minval,
00445 float * maxval,
00446 double * centralLambda,
00447 int * centralpix ) ;
00448
00449
00450 #endif