00001 #ifndef SINFO_SPECTRUM_OPS_H
00002 #define SINFO_SPECTRUM_OPS_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 #define SPEED_OF_LIGHT 2.99792458e8
00039 #define PLANCK 6.62606876e-34
00040 #define BOLTZMANN 1.3806503e-23
00041
00042
00043
00044
00045
00046 #include <cpl.h>
00047 #include "sinfo_focus.h"
00048 #include "sinfo_recipes.h"
00049 #include "sinfo_new_cube_ops.h"
00050 #include "sinfo_msg.h"
00051
00052
00053
00054
00055
00062 int
00063 sinfo_stectrum_ima2table(
00064 const cpl_image* spc,
00065 const char* filename,
00066 cpl_table** tbl);
00067
00081 Vector *
00082 sinfo_new_cleanmean_rectangle_of_cube_spectra( cpl_imagelist * cube,
00083 int llx,
00084 int lly,
00085 int urx,
00086 int ury,
00087 float lo_reject,
00088 float hi_reject );
00100 Vector *
00101 sinfo_new_cleanmean_circle_of_cube_spectra( cpl_imagelist * cube,
00102 int centerx,
00103 int centery,
00104 int radius,
00105 float lo_reject,
00106 float hi_reject );
00117 cpl_image *
00118 sinfo_new_div_image_by_spectrum( cpl_image * image, cpl_image * spectrum ) ;
00119
00127 void
00128 sinfo_free_svector( Vector **svector );
00129
00137 Vector *
00138 sinfo_new_vector( ulong32 n_elements ) ;
00139
00140
00148 void
00149 sinfo_new_destroy_vector( Vector *sinfo_vector ) ;
00150
00160 cpl_image *
00161 sinfo_new_vector_to_image( Vector * spectrum ) ;
00162
00172 Vector *
00173 sinfo_new_image_to_vector( cpl_image * spectrum ) ;
00174
00175
00187 cpl_image *
00188 sinfo_new_extract_spectrum_from_resampled_flat( cpl_image * resflat,
00189 float loreject,
00190 float hireject ) ;
00191
00202 cpl_image *
00203 sinfo_new_multiply_image_with_spectrum(cpl_image * image,
00204 cpl_image * spectrum ) ;
00205
00246 cpl_image *
00247 sinfo_new_optimal_extraction_from_cube( cpl_imagelist * cube,
00248 int llx,
00249 int lly,
00250 int halfbox_x,
00251 int halfbox_y,
00252 float fwhm_factor,
00253 float backvariance,
00254 float sky,
00255 float gain,
00256 float exptime,
00257 const char* name,
00258 cpl_table** spectrum,
00259 int qc_info,
00260 int* check2) ;
00261
00285 Vector *
00286 sinfo_new_extract_sky_from_cube( cpl_imagelist * cube,
00287 float loReject,
00288 float hiReject,
00289 int * position,
00290 int tolerance,
00291 int posindicator ) ;
00292
00307 Vector *
00308 sinfo_new_sum_rectangle_of_cube_spectra( cpl_imagelist * cube,
00309 int llx,
00310 int lly,
00311 int urx,
00312 int ury ) ;
00313
00325 Vector *
00326 sinfo_new_sum_circle_of_cube_spectra( cpl_imagelist * cube,
00327 int centerx,
00328 int centery,
00329 int radius ) ;
00330
00331
00345 Vector *
00346 sinfo_new_mean_rectangle_of_cube_spectra( cpl_imagelist * cube,
00347 int llx,
00348 int lly,
00349 int urx,
00350 int ury ) ;
00351
00363 Vector *
00364 sinfo_new_mean_circle_of_cube_spectra( cpl_imagelist * cube,
00365 int centerx,
00366 int centery,
00367 int radius ) ;
00368
00379 Vector *
00380 sinfo_new_blackbody_spectrum( char * templateSpec, double temp ) ;
00381
00395 Vector *
00396 sinfo_new_median_rectangle_of_cube_spectra( cpl_imagelist * cube,
00397 int llx,
00398 int lly,
00399 int urx,
00400 int ury ) ;
00401
00413 Vector *
00414 sinfo_new_median_circle_of_cube_spectra( cpl_imagelist * cube,
00415 int centerx,
00416 int centery,
00417 int radius ) ;
00418
00419
00433 Vector *
00434 sinfo_new_clean_mean_rectangle_of_cube_spectra( cpl_imagelist * cube,
00435 int llx,
00436 int lly,
00437 int urx,
00438 int ury,
00439 float lo_reject,
00440 float hi_reject ) ;
00441
00453 Vector *
00454 sinfo_new_clean_mean_circle_of_cube_spectra( cpl_imagelist * cube,
00455 int centerx,
00456 int centery,
00457 int radius,
00458 float lo_reject,
00459 float hi_reject ) ;
00460
00472 float *
00473 sinfo_new_shift_array(float * input,int n_elements,float shift,double * ker ) ;
00474
00475 #endif