SINFONI Pipeline Reference Manual  2.6.0
sinfo_utl_cube_create.c
1 /* $Id: sinfo_utl_cube_create.c,v 1.6 2013-08-15 11:40:17 amodigli Exp $
2  *
3  * This file is part of the SINFONI Pipeline
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: amodigli $
23  * $Date: 2013-08-15 11:40:17 $
24  * $Revision: 1.6 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 
32 /*-----------------------------------------------------------------------------
33  Includes
34  ----------------------------------------------------------------------------*/
35 
36 
37 /* cpl */
38 #include <cpl.h>
39 
40 /* irplib */
41 #include <irplib_utils.h>
42 
43 #include <sinfo_tpl_utils.h>
44 #include <sinfo_pfits.h>
45 #include <sinfo_tpl_dfs.h>
46 #include <sinfo_msg.h>
47 #include <sinfo_error.h>
48 #include <sinfo_utils_wrappers.h>
49 #include <sinfo_image_ops.h>
50 #include <sinfo_wave_calibration.h>
51 #include <sinfo_pro_save.h>
52 #include <sinfo_raw_types.h>
53 #include <sinfo_pro_types.h>
54 #include <sinfo_coltilt.h>
55 #include <sinfo_utilities_scired.h>
56 /*-----------------------------------------------------------------------------
57  Functions prototypes
58  ----------------------------------------------------------------------------*/
59 
60 static int sinfo_utl_cube_create_create(cpl_plugin *) ;
61 static int sinfo_utl_cube_create_exec(cpl_plugin *) ;
62 static int sinfo_utl_cube_create_destroy(cpl_plugin *) ;
63 
64 static int
65 sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames);
66 
67 /*-----------------------------------------------------------------------------
68  Static variables
69  ----------------------------------------------------------------------------*/
70 
71 static char sinfo_utl_cube_create_description[] =
72  "This recipe perform cubes creation.\n"
73  "The input files are:\n"
74  "A raw frame on tagged as RAW_ON\n"
75  "[optional] A raw frame off RAW_OFF\n"
76  "A wavelength map, tagged as WAVE_MAP\n"
77  "A wavelength map, tagged as WAVE_MAP\n"
78  "A distortion table, tagged as DISTORTION\n"
79  "A slitlets position table, tagged as SLIT_POS\n"
80  "\n";
81 
82 /*-----------------------------------------------------------------------------
83  Functions code
84  ----------------------------------------------------------------------------*/
85 /*---------------------------------------------------------------------------*/
89 /*---------------------------------------------------------------------------*/
90 
92 /*---------------------------------------------------------------------------*/
100 /*---------------------------------------------------------------------------*/
101 int cpl_plugin_get_info(cpl_pluginlist * list)
102 {
103  cpl_recipe * recipe = cpl_calloc(1, sizeof *recipe ) ;
104  cpl_plugin * plugin = &recipe->interface ;
105 
106  cpl_plugin_init(plugin,
107  CPL_PLUGIN_API,
108  SINFONI_BINARY_VERSION,
109  CPL_PLUGIN_TYPE_RECIPE,
110  "sinfo_utl_cube_create",
111  "Generate a cube",
112  sinfo_utl_cube_create_description,
113  "Andrea Modigliani",
114  "Andrea.Modigliani@eso.org",
115  sinfo_get_license(),
116  sinfo_utl_cube_create_create,
117  sinfo_utl_cube_create_exec,
118  sinfo_utl_cube_create_destroy) ;
119 
120  cpl_pluginlist_append(list, plugin) ;
121 
122  return 0;
123 }
124 
125 /*---------------------------------------------------------------------------*/
134 /*---------------------------------------------------------------------------*/
135 static int sinfo_utl_cube_create_create(cpl_plugin * plugin)
136 {
137  cpl_recipe * recipe ;
138  cpl_parameter * p ;
139  cpl_parameterlist * list ;
140 
141  /* Get the recipe out of the plugin */
142  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
143  recipe = (cpl_recipe *)plugin ;
144  else return -1 ;
145  cpl_error_reset();
146  irplib_reset();
147 
148  /* Create the parameters list in the cpl_recipe object */
149  recipe->parameters = cpl_parameterlist_new() ;
150 
151  list=recipe->parameters;
152  /* jitter mode indicator: yes: Auto-Jitter, no: user defined jitter
153  The next three parameters are only used if jitterInd is set to yes,
154  that means in auto-jittering mode!
155  */
156  p = cpl_parameter_new_value("sinfoni.objnod.jitter_index",
157  CPL_TYPE_BOOL,
158  "jitter mode indicator: "
159  "TRUE: Auto-Jitter, "
160  "FALSE: user defined jitter. "
161  "The size_x size_y kernel_type parameters "
162  "are only used if jitterInd is set to yes, "
163  "that means in auto-jittering mode.",
164  "sinfoni.objnod",
165  TRUE);
166 
167  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-jit_ind");
168  cpl_parameterlist_append(list, p);
169 
170 
171  /* Kernel Type */
172  /* the name of the interpolation kernel to shift the single cubes to the
173  correct places inside the big combined cube. That you want to generate
174  using the eclipse routine sinfo_generate_interpolation_kernel()
175  Supported kernels are:
176 
177  NULL: default kernel, currently tanh
178  default: dito
179  tanh: Hyperbolic tangent
180  sinc2: Square sinc
181  lanczos: Lanczos2 kernel
182  hamming: Hamming kernel
183  hann: Hann kernel
184  */
185  p = cpl_parameter_new_enum("sinfoni.objnod.kernel_type",
186  CPL_TYPE_STRING,
187  "Kernel Type:"
188  "the name of the interpolation kernel to shift "
189  "the single cubes to the correct places inside "
190  "the big combined cube",
191  "sinfoni.objnod",
192  "tanh",
193  7,
194  "NULL","default","tanh","sinc2",
195  "lanczos","hamming","hann");
196 
197  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-kernel_typ");
198  cpl_parameterlist_append(list, p);
199 
200  /*Resampling */
201  /* number of coefficients for the polynomial interpolation */
202  p = cpl_parameter_new_value("sinfoni.objnod.n_coeffs",
203  CPL_TYPE_INT,
204  "number of coefficients for the polynomial "
205  "interpolation ",
206  "sinfoni.objnod",
207  3);
208 
209  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-no_coeffs");
210  cpl_parameterlist_append(list, p);
211 
212  /* Cube Creation */
213  /*indicates if the slitlet distances are determined by a north-south-test
214  (yes) or slitlet edge fits (no)
215  */
216  p = cpl_parameter_new_value("sinfoni.objnod.nord_south_index",
217  CPL_TYPE_BOOL,
218  "Nord South Index Switch: "
219  "indicates if the slitlet distances are "
220  "determined by a north-south-test (TRUE) "
221  "or slitlet edge fits (FALSE)",
222  "sinfoni.objnod",
223  TRUE);
224 
225 
226  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-ns_ind");
227  cpl_parameterlist_append(list, p);
228 
229 
230  /* Cube Creation */
231  /*indicates if the slitlet distances are determined by a north-south-test
232  (yes) or slitlet edge fits (no)
233  */
234  p = cpl_parameter_new_value("sinfoni.objnod.flux_cor",
235  CPL_TYPE_BOOL,
236  "Flux correction: ",
237  "sinfoni.objnod",
238  FALSE);
239 
240 
241  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-flux_cor");
242  cpl_parameterlist_append(list, p);
243 
244 
245 
246 
247  /* Fine tuning */
248  /* Method */
249  p = cpl_parameter_new_enum("sinfoni.objnod.fine_tuning_method",
250  CPL_TYPE_STRING,
251  "Fine Tuning Method: "
252  "indicator for the shifting method to use "
253  "(P: polynomial interpolation, "
254  /* " F: FFT, " */
255  " S: cubic spline interpolation)",
256  "sinfoni.objnod",
257  "P",
258  2,
259  "P","S");
260 
261  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-fine_tune_mtd");
262  cpl_parameterlist_append(list, p);
263 
264  p = cpl_parameter_new_value("sinfoni.objnod.order",
265  CPL_TYPE_INT,
266  "Fine Tuning polynomial order: "
267  "order of the polynomial if the polynomial "
268  "interpolation shifting method is used.",
269  "sinfoni.objnod",
270  2);
271 
272  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-order");
273  cpl_parameterlist_append(list, p);
274 
275  /* Fill the parameters list */
276  /* --stropt */
277 
278 
279  /* Return */
280  return 0;
281 }
282 
283 /*---------------------------------------------------------------------------*/
289 /*---------------------------------------------------------------------------*/
290 static int sinfo_utl_cube_create_exec(cpl_plugin * plugin)
291 {
292  cpl_recipe * recipe ;
293  int result=0;
294  cpl_errorstate initial_errorstate = cpl_errorstate_get();
295 
296  /* Get the recipe out of the plugin */
297  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
298  recipe = (cpl_recipe *)plugin ;
299  else return -1 ;
300  sinfo_msg("Welcome to SINFONI Pipeline release %d.%d.%d",
301  SINFONI_MAJOR_VERSION,SINFONI_MINOR_VERSION,SINFONI_MICRO_VERSION);
302 
303  result=sinfo_cube_create(recipe->parameters, recipe->frames) ;
304  if (!cpl_errorstate_is_equal(initial_errorstate)) {
305  /* Dump the error history since recipe execution start.
306  At this point the recipe cannot recover from the error */
307  cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
308  }
309  return result;
310 }
311 
312 /*---------------------------------------------------------------------------*/
318 /*---------------------------------------------------------------------------*/
319 static int sinfo_utl_cube_create_destroy(cpl_plugin * plugin)
320 {
321  cpl_recipe * recipe ;
322 
323  /* Get the recipe out of the plugin */
324  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
325  recipe = (cpl_recipe *)plugin ;
326  else return -1 ;
327 
328  cpl_parameterlist_delete(recipe->parameters) ;
329  return 0 ;
330 }
331 
332 
333 /*---------------------------------------------------------------------------*/
340 /*---------------------------------------------------------------------------*/
341 static int
342 sinfo_cube_create(cpl_parameterlist * parameters, cpl_frameset * frames)
343 {
344 
345  cpl_frame* frm_raw_on=NULL;
346  cpl_frame* frm_raw_off=NULL;
347  cpl_frame* frm_wav_map=NULL;
348  cpl_frame* frm_mflat=NULL;
349  cpl_frame* frm_distortion=NULL;
350  cpl_frame* frm_slit_pos=NULL;
351  cpl_frame* frm_slitlets_distance=NULL;
352 
353  cpl_image* ima_raw_on=NULL;
354  cpl_image* ima_raw_off=NULL;
355  cpl_image* ima_wav_map=NULL;
356  cpl_image* ima_mflat=NULL;
357  cpl_image* ima_mflat_dist=NULL;
358  cpl_image* ima_obj_mflat=NULL;
359  cpl_image* ima_obj_dist=NULL;
360  cpl_image* ima_obj_res=NULL;
361  cpl_image* ima_wav_res=NULL;
362  cpl_image* ima_wav_dif=NULL;
363 
364  cpl_imagelist* cube=NULL;
365  cpl_imagelist* outcube=NULL;
366  cpl_imagelist* outcube2=NULL;
367 
368  //cpl_table* tab_distortion=NULL;
369  //cpl_table* tab_slit_pos=NULL;
370 
371  float mi=0;
372  float ma=0;
373  double dis=0 ;
374  double cwav=0 ;
375  int cpix=0 ;
376  int nx=0;
377  int ny=0;
378  float fcol=0;
379  float* pd=NULL;
380  float* pw=NULL;
381  int i=0;
382  int j=0;
383  float** slit_edges=NULL;
384  float* distances=NULL;
385  float* correct_dist=NULL;
386  char kernel[80];
387  char poly_file[80];
388  char pos_list[80];
389  char dist_list[80];
390 
391 
392  int ns_index=0;
393  int n_coeffs=0;
394  int nrows=0;
395  cpl_parameter* p=NULL;
396  int nslits=32;
397  int flux_cor=0;
398  const char* fine_tuning_method=NULL;
399  int fine_tuning_pol_order=0;
400  float center_x=0;
401  float center_y=0;
402 
403  /* Identify the RAW and CALIB frames in the input frameset */
404  check(sinfo_dfs_set_groups(frames),
405  "Cannot identify RAW and CALIB frames") ;
406 
407  check_nomsg(p=cpl_parameterlist_find(parameters,
408  "sinfoni.objnod.flux_cor"));
409  check_nomsg(flux_cor=cpl_parameter_get_bool(p));
410 
411  check_nomsg(p=cpl_parameterlist_find(parameters,
412  "sinfoni.objnod.kernel_type"));
413  check_nomsg(strcpy(kernel,cpl_parameter_get_string(p)));
414 
415  check_nomsg(p=cpl_parameterlist_find(parameters,"sinfoni.objnod.n_coeffs"));
416  check_nomsg(n_coeffs=cpl_parameter_get_int(p));
417 
418 
419  check_nomsg(p=cpl_parameterlist_find(parameters,
420  "sinfoni.objnod.nord_south_index"));
421  check_nomsg(ns_index=cpl_parameter_get_bool(p));
422 
423 
424  check_nomsg(p=cpl_parameterlist_find(parameters,
425  "sinfoni.objnod.fine_tuning_method"));
426  check_nomsg(fine_tuning_method=cpl_parameter_get_string(p));
427 
428  check_nomsg(p=cpl_parameterlist_find(parameters,
429  "sinfoni.objnod.order"));
430  check_nomsg(fine_tuning_pol_order=cpl_parameter_get_int(p));
431 
432 
433  cknull(frm_raw_on=cpl_frameset_find(frames,RAW_ON),
434  "Missing required input %s",RAW_ON);
435  cknull(frm_raw_off=cpl_frameset_find(frames,RAW_OFF),
436  "Missing required input %s",RAW_OFF);
437  cknull(frm_wav_map=cpl_frameset_find(frames,PRO_WAVE_MAP),
438  "Missing required input %s",PRO_WAVE_MAP);
439  cknull(frm_mflat=cpl_frameset_find(frames,PRO_MASTER_FLAT_LAMP),
440  "Missing required input %s",PRO_WAVE_MAP);
441 
442  check_nomsg(frm_distortion=cpl_frameset_find(frames,PRO_DISTORTION));
443  check_nomsg(frm_slit_pos=cpl_frameset_find(frames,PRO_SLIT_POS));
444  check_nomsg(frm_slitlets_distance=
445  cpl_frameset_find(frames,PRO_SLITLETS_DISTANCE));
446 
447  strcpy(pos_list,cpl_frame_get_filename(frm_slit_pos));
448  strcpy(dist_list,cpl_frame_get_filename(frm_slitlets_distance));
449  strcpy(poly_file,cpl_frame_get_filename(frm_distortion));
450 
451 
452  check_nomsg(ima_raw_on=cpl_image_load(cpl_frame_get_filename(frm_raw_on),
453  CPL_TYPE_FLOAT,0,0));
454 
455  check_nomsg(ima_raw_off=cpl_image_load(cpl_frame_get_filename(frm_raw_off),
456  CPL_TYPE_FLOAT,0,0));
457 
458 
459  check_nomsg(ima_wav_map=cpl_image_load(cpl_frame_get_filename(frm_wav_map),
460  CPL_TYPE_FLOAT,0,0));
461 
462  check_nomsg(ima_mflat=cpl_image_load(cpl_frame_get_filename(frm_mflat),
463  CPL_TYPE_FLOAT,0,0));
464 
465 
466 
467  check_nomsg(cpl_image_subtract(ima_raw_on,ima_raw_off));
468  cpl_image_save(ima_raw_on,"ima_sub.fits", CPL_BPP_IEEE_FLOAT,
469  NULL,CPL_IO_DEFAULT);
470 
471  cknull_nomsg(ima_obj_mflat=sinfo_new_div_images_robust(ima_raw_on,
472  ima_mflat));
473  cpl_image_save(ima_obj_mflat,"ima_obj_mflat.fits", CPL_BPP_IEEE_FLOAT,
474  NULL,CPL_IO_DEFAULT);
475 
476 
477  //The following is not needed
478  cknull_nomsg(ima_mflat_dist=sinfo_new_image_warp_fits(ima_mflat,kernel,
479  poly_file));
480 
481  cpl_image_save(ima_mflat_dist,"ima_mflat_dist.fits", CPL_BPP_IEEE_FLOAT,
482  NULL,CPL_IO_DEFAULT);
483 
484  cknull_nomsg(ima_obj_dist=sinfo_new_image_warp_fits(ima_obj_mflat,
485  kernel,
486  poly_file));
487 
488  cpl_image_save(ima_obj_dist,"ima_obj_dist.fits", CPL_BPP_IEEE_FLOAT,
489  NULL,CPL_IO_DEFAULT);
490 
491  cknull(ima_obj_res = sinfo_new_defined_resampling(ima_obj_dist,
492  ima_wav_map,
493  n_coeffs,
494  &nrows,
495  &dis,
496  &mi,
497  &ma,
498  &cwav,
499  &cpix),
500  " sinfo_definedResampling() failed" ) ;
501 
502 
503 
504  cpl_image_save(ima_obj_res,"ima_obj_res.fits", CPL_BPP_IEEE_FLOAT,
505  NULL,CPL_IO_DEFAULT);
506 
507 
508  //We create an image with the derivatives
509  nx=cpl_image_get_size_x(ima_wav_map);
510  ny=cpl_image_get_size_y(ima_wav_map);
511 
512  check_nomsg(ima_wav_dif=cpl_image_new(nx,ny,CPL_TYPE_FLOAT));
513  pw=cpl_image_get_data(ima_wav_map);
514  pd=cpl_image_get_data(ima_wav_dif);
515 
516 
517  for(i=1;i<nx-1;i++) {
518  for(j=1;j<ny-1;j++) {
519  if(!isnan(pd[nx*j+i])) {
520  pd[nx*j+i]=2.0*dis/(pw[nx*(j+1)+i]-pw[nx*(j-1)+i]);
521  }
522  }
523  if(!isnan(pd[i])) {
524  pd[i]=dis/(pw[nx+i]-pw[i]);
525  }
526  if(!isnan(pd[nx*(ny-1)+i])) {
527  pd[nx*(ny-1)+i]=dis/(pw[nx*(ny-1)+i]-pw[nx*(ny-2)+i]);
528  }
529  }
530 
531 
532  //cpl_image_save(ima_wav_dif,"diff.fits",
533  //CPL_BPP_IEEE_FLOAT,NULL,CPL_IO_DEFAULT);
534 
535 
536 
537  cknull(ima_wav_res = sinfo_new_defined_resampling(ima_wav_dif,
538  ima_wav_map,
539  n_coeffs,
540  &nrows,
541  &dis,
542  &mi,
543  &ma,
544  &cwav,
545  &cpix),
546  " sinfo_definedResampling() failed" ) ;
547 
548  if(flux_cor) {
549  sinfo_msg("Apply flux correction");
550  cpl_image_divide(ima_obj_res,ima_wav_res);
551  }
552 
553 
554  //cpl_image_save(ima_wav_res,"res_diff.fits",
555  //CPL_BPP_IEEE_FLOAT,NULL,CPL_IO_DEFAULT);
556 
557 
558 
559  cpl_image_save(ima_wav_res,"ima_wav_res.fits", CPL_BPP_IEEE_FLOAT,
560  NULL,CPL_IO_DEFAULT);
561 
562 
563  //To rescale in flux we divide the resampled image and
564  //the resampled derivatives. At this point ima_obj_res should have same
565  //flux as input image (im.diff)
566 
567  //ima_obj_res=cpl_image_duplicate(ima_wav_res);
568  //sinfo_free_image(&ima_wav_res);
569  if(flux_cor) {
570  sinfo_msg("Apply flux correction");
571  cpl_image_divide(ima_obj_res,ima_wav_res);
572  }
573 
574 
575 
576 
577  /*---select north-south-test or fitting of slitlet edges--*/
578  if (ns_index == 0) {
579  sinfo_msg("cfg->northsouthInd == 0");
580  cknull(slit_edges=sinfo_read_slitlets_edges(nslits,pos_list),
581  "error reading slitlets edges");
582  } else {
583  sinfo_msg("cfg->northsouthInd != 0");
584  cknull(distances = sinfo_read_distances(nslits,dist_list),
585  "error reading distances");
586  }
587 
588  cknull(correct_dist = (float*) cpl_calloc(nslits, sizeof (float)),
589  " could not allocate memory!") ;
590 
591  sinfo_msg("Create cube object");
592  if (ns_index ==0 ) {
593 
594  cknull(cube = sinfo_new_make_cube_spi(ima_obj_res,slit_edges,
595  correct_dist),
596  "could not construct data cube!") ;
597 
598  } else {
599  cknull(cube = sinfo_new_make_cube_dist(ima_obj_res,fcol,distances,
600  correct_dist),
601  "could not construct a data cube!") ;
602  }
603  sinfo_free_image(&ima_obj_res);
604 
605 
606  cknull(outcube2=sinfo_new_fine_tune(cube,
607  correct_dist,
608  fine_tuning_method,
609  fine_tuning_pol_order,
610  nslits),
611  " could not fine tune the data cube") ;
612 
613  sinfo_msg("Stretch output cube along Y direction");
614  cknull(outcube = sinfo_new_bin_cube(outcube2,1,2,0,63,0,63),
615  "Error binning cube");
616  sinfo_free_imagelist(&cube);
617 
618  ck0(sinfo_pro_save_ims(outcube,frames,frames,"out_cube.fits","CUBE",NULL,
619  "sinfo_utl_cube_create",parameters),
620  "cannot save cube %s", "out_cube.fits");
621 
622 
623  check_nomsg(center_x = cpl_image_get_size_x(
624  cpl_imagelist_get(outcube,0))/2.+0.5) ;
625  check_nomsg(center_y = cpl_image_get_size_y(
626  cpl_imagelist_get(outcube,0))/2.+0.5 );
627 
628  sinfo_new_set_wcs_cube(outcube,"out_cube.fits", cwav, dis,
629  cpix, center_x, center_y);
630 
631 
632  cleanup:
633 
634  if (ns_index ==0 ) {
635  if(slit_edges != NULL) {
636  sinfo_new_destroy_2Dfloatarray(&slit_edges,nslits);
637  }
638  } else {
639  if (distances != NULL ) {
640  sinfo_new_destroy_array(&distances);
641  }
642  }
643 
644 
645 
646 
647  sinfo_free_float(&correct_dist) ;
648  sinfo_free_imagelist(&cube);
649  sinfo_free_imagelist(&outcube);
650  sinfo_free_imagelist(&outcube2);
651  sinfo_free_image(&ima_raw_on);
652  sinfo_free_image(&ima_raw_off);
653  sinfo_free_image(&ima_wav_map);
654  sinfo_free_image(&ima_mflat);
655  sinfo_free_image(&ima_mflat_dist);
656  sinfo_free_image(&ima_obj_res);
657  sinfo_free_image(&ima_obj_mflat);
658  sinfo_free_image(&ima_obj_dist);
659  sinfo_free_image(&ima_obj_res);
660  sinfo_free_image(&ima_wav_res);
661  sinfo_free_image(&ima_wav_dif);
662 
663  return 0 ;
664 
665 }
666 
667 
void irplib_reset(void)
Reset IRPLIB state.
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.