[cpl-plugin-sinfo] 16/42: New upstream version 2.3.3
Ole Streicher
olebole-guest at alioth.debian.org
Mon Sep 16 11:16:25 UTC 2013
This is an automated email from the git hooks/post-receive script.
olebole-guest pushed a commit to branch debian
in repository cpl-plugin-sinfo.
commit c40d70f46fd6f88cd06f21c1a3ea8bdc277c3f78
Author: Ole Streicher <debian at liska.ath.cx>
Date: Tue May 7 16:31:55 2013 +0200
New upstream version 2.3.3
---
ChangeLog | 1 +
aclocal.m4 | 12 -
calib/cal/REF_BP_MAP.fits | 1 -
calib/cal/SI_GATM_REF_CORR_HK_025.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_HK_100.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_H_025.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_H_100.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_J_025.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_J_100.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_K_025.fits | Bin 8640 -> 0 bytes
calib/cal/SI_GATM_REF_CORR_K_100.fits | Bin 8640 -> 0 bytes
calib/cal/SLIT_POS_HK_025.fits | 1 -
calib/cal/SLIT_POS_HK_100.fits | 1 -
calib/cal/SLIT_POS_HK_250.fits | 1 -
calib/cal/SLIT_POS_HK_PUPIL.fits | 1 -
calib/cal/SLIT_POS_H_025.fits | 1 -
calib/cal/SLIT_POS_H_100.fits | 3 -
calib/cal/SLIT_POS_H_250.fits | 2 -
calib/cal/SLIT_POS_H_PUPIL.fits | 3 -
calib/cal/SLIT_POS_J_025.fits | 4 -
calib/cal/SLIT_POS_J_100.fits | 5 -
calib/cal/SLIT_POS_J_250.fits | 4 -
calib/cal/SLIT_POS_J_PUPIL.fits | 5 -
calib/cal/SLIT_POS_K_025.fits | 3 -
calib/cal/SLIT_POS_K_100.fits | 5 -
calib/cal/SLIT_POS_K_250.fits | 4 -
calib/cal/SLIT_POS_K_PUPIL.fits | 5 -
calib/cal/argonJ.fits | Bin 8641 -> 0 bytes
calib/cal/atmoexan.fits | 15 -
calib/cal/drs_setup_wave.fits | Bin 20160 -> 0 bytes
calib/cal/drs_setup_wave_oh.fits | Bin 20160 -> 0 bytes
calib/cal/neonK.fits | Bin 8641 -> 0 bytes
calib/cal/xenonHK.fits | Bin 8640 -> 0 bytes
calib/cal/xenonargonH.fits | Bin 14400 -> 0 bytes
calib/gasgano/config/SINFO.prefs | 2 +-
configure | 20 +-
configure.ac | 4 +-
html/files.html | 3 +-
html/group__irplib__calib.html | 10 +-
html/group__irplib__cat.html | 2 +-
html/group__irplib__distortion.html | 2 +-
html/group__irplib__flat.html | 2 +-
html/group__irplib__framelist.html | 46 +-
html/group__irplib__oddeven.html | 2 +-
html/group__irplib__plugin.html | 2 +-
html/group__irplib__polynomial.html | 2 +-
html/group__irplib__ppm.html | 2 +-
html/group__irplib__slitpos.html | 2 +-
html/group__irplib__spectrum.html | 2 +-
html/group__irplib__stdstar.html | 48 +-
html/group__irplib__strehl.html | 2 +-
html/group__irplib__utils.html | 68 +-
html/group__irplib__wavecal.html | 179 +-
html/group__irplib__wcs.html | 2 +-
html/group__irplib__wlxcorr.html | 2 +-
html/group__sinfo__absolute.html | 2 +-
html/group__sinfo__absolute__utils.html | 2 +-
html/group__sinfo__bad__pix__search.html | 2 +-
html/group__sinfo__balance.html | 2 +-
html/group__sinfo__baryvel.html | 2 +-
html/group__sinfo__boltzmann.html | 2 +-
html/group__sinfo__coltilt.html | 2 +-
html/group__sinfo__companion.html | 2 +-
html/group__sinfo__cube__construct.html | 2 +-
html/group__sinfo__dark__cfg.html | 2 +-
html/group__sinfo__detlin.html | 2 +-
html/group__sinfo__dfs.html | 2 +-
html/group__sinfo__distortion.html | 2 +-
html/group__sinfo__dump.html | 2 +-
html/group__sinfo__error.html | 2 +-
html/group__sinfo__finddist__cfg.html | 2 +-
html/group__sinfo__fit.html | 2 +-
html/group__sinfo__flat__cfg.html | 2 +-
html/group__sinfo__flat__ini__file.html | 2 +-
html/group__sinfo__focus.html | 2 +-
html/group__sinfo__function__1d.html | 2 +-
html/group__sinfo__globals.html | 2 +-
html/group__sinfo__image__ops.html | 2 +-
html/group__sinfo__img__noise.html | 2 +-
html/group__sinfo__lamp__cfg.html | 2 +-
html/group__sinfo__lamp__spec__config.html | 2 +-
html/group__sinfo__msg.html | 2 +-
html/group__sinfo__new__bezier.html | 2 +-
html/group__sinfo__new__cube__ops.html | 2 +-
html/group__sinfo__new__resampling.html | 2 +-
html/group__sinfo__new__slit__pos.html | 2 +-
html/group__sinfo__pfits.html | 2 +-
html/group__sinfo__pro__save.html | 2 +-
html/group__sinfo__produc__config.html | 2 +-
html/group__sinfo__qr__companion.html | 2 +-
html/group__sinfo__rec__detlin.html | 2 +-
html/group__sinfo__rec__distortion.html | 2 +-
html/group__sinfo__rec__jitter.html | 2 +-
html/group__sinfo__rec__lingain.html | 2 +-
html/group__sinfo__rec__mdark.html | 2 +-
html/group__sinfo__rec__mflat.html | 2 +-
html/group__sinfo__rec__objnod.html | 2 +-
html/group__sinfo__rec__psf.html | 2 +-
html/group__sinfo__rec__pupil.html | 2 +-
html/group__sinfo__rec__stdstar.html | 2 +-
html/group__sinfo__rec__utils.html | 2 +-
html/group__sinfo__rec__wavecal.html | 2 +-
html/group__sinfo__recipes.html | 2 +-
html/group__sinfo__remove__crh__single.html | 2 +-
html/group__sinfo__shift__images.html | 2 +-
html/group__sinfo__skycor__config.html | 2 +-
html/group__sinfo__spectrum__ops.html | 2 +-
html/group__sinfo__step__distortion.html | 2 +-
html/group__sinfo__step__jitter.html | 2 +-
html/group__sinfo__step__objnod.html | 2 +-
html/group__sinfo__step__psf.html | 2 +-
html/group__sinfo__step__stdstar.html | 2 +-
html/group__sinfo__tilt__cfg.html | 2 +-
html/group__sinfo__time.html | 2 +-
html/group__sinfo__tpl__dfs.html | 2 +-
html/group__sinfo__tpl__utils.html | 2 +-
html/group__sinfo__utilities.html | 2 +-
html/group__sinfo__utils.html | 2 +-
html/group__sinfo__utils__wrappers.html | 2 +-
html/group__sinfo__utl__bp__mask__add.html | 2 +-
html/group__sinfo__utl__cube2ima.html | 2 +-
html/group__sinfo__utl__cube2spectrum.html | 2 +-
html/group__sinfo__utl__cube__arith.html | 2 +-
html/group__sinfo__utl__cube__combine.html | 2 +-
html/group__sinfo__utl__cube__create.html | 2 +-
html/group__sinfo__utl__cube__test.html | 2 +-
html/group__sinfo__utl__eff.html | 2 +-
html/group__sinfo__utl__illumcorr.html | 2 +-
html/group__sinfo__utl__ima__arith.html | 2 +-
html/group__sinfo__utl__ima__cube__ks__test.html | 2 +-
html/group__sinfo__utl__ima__gauss.html | 2 +-
html/group__sinfo__utl__ima__line__corr.html | 2 +-
html/group__sinfo__utl__remove__crh__single.html | 2 +-
html/group__sinfo__utl__skycor.html | 2 +-
html/group__sinfo__utl__skymap.html | 2 +-
...info__utl__spectrum__divide__by__blackbody.html | 2 +-
...p__sinfo__utl__spectrum__wavelength__shift.html | 2 +-
html/group__sinfo__utl__stdstars.html | 2 +-
html/group__sinfo__utl__table__ex.html | 2 +-
html/group__sinfo__utl__table__test.html | 2 +-
html/group__spiffi__general__config.html | 2 +-
html/index.html | 4 +-
html/irplib__calib_8c_source.html | 1042 ++---
html/irplib__calib_8h_source.html | 4 +-
html/irplib__cat_8c_source.html | 4 +-
html/irplib__cat_8h_source.html | 4 +-
html/irplib__distortion_8c_source.html | 14 +-
html/irplib__distortion_8h_source.html | 14 +-
html/irplib__flat_8c_source.html | 4 +-
html/irplib__flat_8h_source.html | 4 +-
html/irplib__framelist_8c_source.html | 1194 ++---
html/irplib__framelist_8h_source.html | 4 +-
html/irplib__hist_8c_source.html | 4 +-
html/irplib__hist_8h_source.html | 4 +-
html/irplib__ksigma__clip_8c_source.html | 4 +-
html/irplib__ksigma__clip_8h_source.html | 4 +-
html/irplib__ksigma__clip__body_8h_source.html | 4 +-
html/irplib__match__cats_8c_source.html | 4 +-
html/irplib__match__cats_8h_source.html | 4 +-
html/irplib__mkmaster_8c_source.html | 300 +-
html/irplib__mkmaster_8h_source.html | 4 +-
html/irplib__oddeven_8c_source.html | 4 +-
html/irplib__oddeven_8h_source.html | 4 +-
html/irplib__plugin_8c_source.html | 4 +-
html/irplib__plugin_8h_source.html | 4 +-
html/irplib__polynomial_8c_source.html | 14 +-
html/irplib__polynomial_8h_source.html | 14 +-
html/irplib__ppm_8c_source.html | 14 +-
html/irplib__ppm_8h_source.html | 4 +-
html/irplib__slitpos_8c_source.html | 4 +-
html/irplib__slitpos_8h_source.html | 4 +-
html/irplib__spectrum_8c_source.html | 4 +-
html/irplib__spectrum_8h_source.html | 4 +-
html/irplib__stdstar_8c_source.html | 1337 +++---
html/irplib__stdstar_8h_source.html | 50 +-
html/irplib__strehl_8c_source.html | 4 +-
html/irplib__strehl_8h_source.html | 4 +-
html/irplib__utils_8c_source.html | 1182 +++--
html/irplib__utils_8h_source.html | 802 ++--
html/irplib__wavecal_8c_source.html | 2729 ++++++------
html/irplib__wavecal_8h_source.html | 174 +-
html/irplib__wavecal__impl_8h_source.html | 14 +-
html/irplib__wcs_8c_source.html | 4 +-
html/irplib__wcs_8h_source.html | 4 +-
html/irplib__wlxcorr_8c_source.html | 1304 +++---
html/irplib__wlxcorr_8h_source.html | 16 +-
html/modules.html | 2 +-
html/recipes_2sinfo__utl__cube2ima_8c_source.html | 4 +-
...cipes_2sinfo__utl__cube2spectrum_8c_source.html | 4 +-
...recipes_2sinfo__utl__cube__arith_8c_source.html | 4 +-
...cipes_2sinfo__utl__cube__combine_8c_source.html | 4 +-
..._spectrum__divide__by__blackbody_8c_source.html | 4 +-
...utl__spectrum__wavelength__shift_8c_source.html | 4 +-
html/sinfo__absolute_8c_source.html | 2 +-
html/sinfo__absolute_8h_source.html | 2 +-
html/sinfo__atmo__disp_8c_source.html | 2 +-
html/sinfo__atmo__disp_8h_source.html | 2 +-
html/sinfo__bad__cfg_8c_source.html | 2 +-
html/sinfo__bad__cfg_8h_source.html | 2 +-
html/sinfo__bad__ini_8h_source.html | 2 +-
html/sinfo__baddist__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__baddist__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__badnorm__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__badnorm__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__badsky__cfg_8c_source.html | 2 +-
html/sinfo__badsky__cfg_8h_source.html | 2 +-
html/sinfo__badsky__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__badsky__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__balance_8c_source.html | 2 +-
html/sinfo__baryvel_8c_source.html | 4 +-
html/sinfo__baryvel_8h_source.html | 4 +-
html/sinfo__boltzmann_8c_source.html | 2 +-
html/sinfo__bp__config_8c_source.html | 4 +-
html/sinfo__bp__config_8h_source.html | 4 +-
html/sinfo__bp__dist__config_8c_source.html | 4 +-
html/sinfo__bp__dist__config_8h_source.html | 4 +-
html/sinfo__bp__lin_8c_source.html | 2 +-
html/sinfo__bp__lin_8h_source.html | 2 +-
html/sinfo__bp__lin__config_8c_source.html | 4 +-
html/sinfo__bp__lin__config_8h_source.html | 4 +-
html/sinfo__bp__noise_8c_source.html | 2 +-
html/sinfo__bp__noise_8h_source.html | 2 +-
html/sinfo__bp__noise__config_8c_source.html | 4 +-
html/sinfo__bp__noise__config_8h_source.html | 4 +-
html/sinfo__bp__norm_8c_source.html | 120 +-
html/sinfo__bp__norm_8h_source.html | 2 +-
html/sinfo__bp__norm__config_8c_source.html | 4 +-
html/sinfo__bp__norm__config_8h_source.html | 4 +-
html/sinfo__bp__sky__config_8c_source.html | 4 +-
html/sinfo__bp__sky__config_8h_source.html | 4 +-
html/sinfo__coltilt_8c_source.html | 2 +-
html/sinfo__coltilt_8h_source.html | 2 +-
html/sinfo__companion_8c_source.html | 2 +-
html/sinfo__compare__tags_8h_source.html | 2 +-
html/sinfo__cpl__size_8h_source.html | 2 +-
html/sinfo__cube__construct_8c_source.html | 4 +-
html/sinfo__cube__construct_8h_source.html | 2 +-
html/sinfo__cubecreate__ini_8h_source.html | 2 +-
html/sinfo__dark__cfg_8c_source.html | 2 +-
html/sinfo__dark__cfg_8h_source.html | 2 +-
html/sinfo__dark__config_8c_source.html | 4 +-
html/sinfo__dark__config_8h_source.html | 4 +-
html/sinfo__dark__ini_8h_source.html | 2 +-
html/sinfo__dark__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__dark__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__define__opt_8h_source.html | 2 +-
html/sinfo__detlin_8c_source.html | 2 +-
html/sinfo__detlin_8h_source.html | 2 +-
html/sinfo__detlin__cfg_8c_source.html | 2 +-
html/sinfo__detlin__cfg_8h_source.html | 2 +-
html/sinfo__detlin__ini_8h_source.html | 2 +-
html/sinfo__detlin__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__detlin__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__detnoise__cfg_8c_source.html | 2 +-
html/sinfo__detnoise__cfg_8h_source.html | 2 +-
html/sinfo__detnoise__ini_8h_source.html | 2 +-
html/sinfo__detnoise__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__detnoise__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__dfs_8c_source.html | 4394 +++++++++----------
html/sinfo__dfs_8h_source.html | 4 +-
html/sinfo__distortion_8c_source.html | 4 +-
html/sinfo__distortion_8h_source.html | 4 +-
html/sinfo__distortion__config_8c_source.html | 4 +-
html/sinfo__distortion__config_8h_source.html | 4 +-
html/sinfo__dump_8c_source.html | 631 +--
html/sinfo__dump_8h_source.html | 4 +-
html/sinfo__error_8h_source.html | 4 +-
html/sinfo__fft__base_8c_source.html | 2 +-
html/sinfo__fft__base_8h_source.html | 2 +-
html/sinfo__file__handling_8c_source.html | 2 +-
html/sinfo__file__handling_8h_source.html | 2 +-
html/sinfo__finddist__cfg_8c_source.html | 2 +-
html/sinfo__finddist__cfg_8h_source.html | 2 +-
html/sinfo__finddist__ini_8h_source.html | 2 +-
html/sinfo__finddist__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__finddist__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__fit_8c_source.html | 2 +-
html/sinfo__fit_8h_source.html | 2 +-
html/sinfo__fit__curve_8c_source.html | 2 +-
html/sinfo__fit__curve_8h_source.html | 2 +-
html/sinfo__flat__cfg_8c_source.html | 2 +-
html/sinfo__flat__cfg_8h_source.html | 2 +-
html/sinfo__flat__ini_8c_source.html | 2 +-
html/sinfo__flat__ini_8h_source.html | 2 +-
html/sinfo__flat__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__flat__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__focus_8c_source.html | 6 +-
html/sinfo__focus_8h_source.html | 2 +-
html/sinfo__focus__cfg_8c_source.html | 2 +-
html/sinfo__focus__cfg_8h_source.html | 2 +-
...fo__focus__determination__config_8c_source.html | 4 +-
...fo__focus__determination__config_8h_source.html | 4 +-
html/sinfo__focus__ini_8h_source.html | 2 +-
html/sinfo__focus__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__focus__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__function__1d_8c_source.html | 2 +-
html/sinfo__function__1d_8h_source.html | 2 +-
html/sinfo__functions_8h_source.html | 4 +-
html/sinfo__general__config_8c_source.html | 4 +-
html/sinfo__general__config_8h_source.html | 4 +-
html/sinfo__globals_8c_source.html | 2 +-
html/sinfo__globals_8h_source.html | 4 +-
html/sinfo__hidden_8h_source.html | 4 +-
html/sinfo__image__ops_8c_source.html | 4 +-
html/sinfo__image__ops_8h_source.html | 2 +-
html/sinfo__img__noise_8c_source.html | 4 +-
html/sinfo__ipow_8c_source.html | 2 +-
html/sinfo__ipow_8h_source.html | 2 +-
html/sinfo__irplib__cpl__wrp_8h_source.html | 4 +-
html/sinfo__key__names_8h_source.html | 4 +-
html/sinfo__lamp__cfg_8c_source.html | 2 +-
html/sinfo__lamp__cfg_8h_source.html | 2 +-
html/sinfo__lamp__flats__config_8c_source.html | 4 +-
html/sinfo__lamp__flats__config_8h_source.html | 4 +-
...nfo__lamp__flats__hidden__config_8c_source.html | 4 +-
...nfo__lamp__flats__hidden__config_8h_source.html | 4 +-
html/sinfo__lamp__ini_8c_source.html | 2 +-
html/sinfo__lamp__ini_8h_source.html | 2 +-
html/sinfo__lamp__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__lamp__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__lamp__spec__config_8c_source.html | 4 +-
html/sinfo__lamp__spec__config_8h_source.html | 4 +-
html/sinfo__local__types_8h_source.html | 2 +-
html/sinfo__matrix_8c_source.html | 2 +-
html/sinfo__matrix_8h_source.html | 2 +-
html/sinfo__median_8c_source.html | 2 +-
html/sinfo__median_8h_source.html | 2 +-
html/sinfo__merge_8c_source.html | 2 +-
html/sinfo__merge_8h_source.html | 2 +-
html/sinfo__msg_8c_source.html | 4 +-
html/sinfo__msg_8h_source.html | 4 +-
html/sinfo__new__add__bp__map_8c_source.html | 2 +-
html/sinfo__new__add__bp__map_8h_source.html | 2 +-
html/sinfo__new__bezier_8c_source.html | 2 +-
html/sinfo__new__bezier_8h_source.html | 2 +-
html/sinfo__new__cube__ops_8c_source.html | 22 +-
html/sinfo__new__cube__ops_8h_source.html | 2 +-
html/sinfo__new__cubes__build_8c_source.html | 2 +-
html/sinfo__new__cubes__build_8h_source.html | 2 +-
html/sinfo__new__cubes__coadd_8c_source.html | 2 +-
html/sinfo__new__cubes__coadd_8h_source.html | 2 +-
html/sinfo__new__dark_8c_source.html | 2 +-
html/sinfo__new__dark_8h_source.html | 2 +-
html/sinfo__new__find__distortions_8c_source.html | 2 +-
html/sinfo__new__find__distortions_8h_source.html | 2 +-
html/sinfo__new__lamp__flats_8c_source.html | 2 +-
html/sinfo__new__lamp__flats_8h_source.html | 2 +-
html/sinfo__new__nst_8c_source.html | 2 +-
html/sinfo__new__nst_8h_source.html | 2 +-
html/sinfo__new__objnod_8c_source.html | 2 +-
html/sinfo__new__objnod_8h_source.html | 2 +-
...o__new__prepare__stacked__frames_8c_source.html | 2 +-
...o__new__prepare__stacked__frames_8h_source.html | 2 +-
html/sinfo__new__psf_8c_source.html | 4561 ++++++++++----------
html/sinfo__new__psf_8h_source.html | 2 +-
html/sinfo__new__resampling_8c_source.html | 2 +-
html/sinfo__new__resampling_8h_source.html | 2 +-
html/sinfo__new__slit__pos_8c_source.html | 2 +-
html/sinfo__new__slit__pos_8h_source.html | 2 +-
html/sinfo__new__stdstar_8c_source.html | 2 +-
html/sinfo__new__stdstar_8h_source.html | 2 +-
html/sinfo__new__wave__cal__slit2_8c_source.html | 2 +-
html/sinfo__new__wave__cal__slit2_8h_source.html | 2 +-
...info__north__south__test__config_8c_source.html | 4 +-
...info__north__south__test__config_8h_source.html | 4 +-
html/sinfo__ns__cfg_8c_source.html | 2 +-
html/sinfo__ns__cfg_8h_source.html | 2 +-
html/sinfo__ns__ini_8h_source.html | 2 +-
html/sinfo__ns__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__ns__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__object__cfg_8c_source.html | 2 +-
html/sinfo__object__cfg_8h_source.html | 2 +-
html/sinfo__object__ini_8h_source.html | 2 +-
html/sinfo__objnod__config_8c_source.html | 4 +-
html/sinfo__objnod__config_8h_source.html | 4 +-
html/sinfo__objnod__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__objnod__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__objspider__config_8c_source.html | 4 +-
html/sinfo__objspider__config_8h_source.html | 4 +-
html/sinfo__objspider__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__objspider__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__pfits_8c_source.html | 4 +-
html/sinfo__pfits_8h_source.html | 4 +-
html/sinfo__pixel__handling_8c_source.html | 2 +-
html/sinfo__pixel__handling_8h_source.html | 2 +-
html/sinfo__poly2d_8c_source.html | 2 +-
html/sinfo__poly2d_8h_source.html | 2 +-
...prepare__stacked__frames__config_8c_source.html | 4 +-
...prepare__stacked__frames__config_8h_source.html | 4 +-
html/sinfo__pro__save_8c_source.html | 2 +-
html/sinfo__pro__save_8h_source.html | 2 +-
html/sinfo__pro__types_8h_source.html | 4 +-
html/sinfo__product__config_8c_source.html | 4 +-
html/sinfo__product__config_8h_source.html | 4 +-
html/sinfo__psf__cfg_8c_source.html | 2 +-
html/sinfo__psf__cfg_8h_source.html | 2 +-
html/sinfo__psf__config_8c_source.html | 4 +-
html/sinfo__psf__config_8h_source.html | 4 +-
html/sinfo__psf__ini_8h_source.html | 2 +-
html/sinfo__psf__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__psf__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__qr_8c_source.html | 4 +-
html/sinfo__raw__types_8h_source.html | 4 +-
html/sinfo__rec__detlin_8c_source.html | 4 +-
html/sinfo__rec__distortion_8c_source.html | 4 +-
html/sinfo__rec__jitter_8c_source.html | 4 +-
html/sinfo__rec__lingain_8c_source.html | 4 +-
html/sinfo__rec__mdark_8c_source.html | 4 +-
html/sinfo__rec__mdark__detmon_8c_source.html | 4 +-
html/sinfo__rec__mflat_8c_source.html | 4 +-
html/sinfo__rec__objnod_8c_source.html | 4 +-
html/sinfo__rec__psf_8c_source.html | 4 +-
html/sinfo__rec__pupil_8c_source.html | 4 +-
html/sinfo__rec__stdstar_8c_source.html | 4 +-
html/sinfo__rec__utils_8c_source.html | 4 +-
html/sinfo__rec__utils_8h_source.html | 4 +-
html/sinfo__rec__wavecal_8c_source.html | 14 +-
html/sinfo__recipes_8c_source.html | 2 +-
html/sinfo__recipes_8h_source.html | 2 +-
html/sinfo__ref__types_8h_source.html | 33 +-
html/sinfo__remove__crh__single_8c_source.html | 2 +-
html/sinfo__remove__crh__single_8h_source.html | 2 +-
html/sinfo__resampling_8c_source.html | 2 +-
html/sinfo__resampling_8h_source.html | 2 +-
html/sinfo__shift__images_8c_source.html | 2 +-
html/sinfo__shift__images_8h_source.html | 2 +-
html/sinfo__skycor_8c_source.html | 4 +-
html/sinfo__skycor_8h_source.html | 4 +-
html/sinfo__skycor__config_8c_source.html | 4 +-
html/sinfo__skycor__config_8h_source.html | 4 +-
html/sinfo__solve__poly__root_8c_source.html | 2 +-
html/sinfo__solve__poly__root_8h_source.html | 2 +-
html/sinfo__spectrum__ops_8c_source.html | 2 +-
html/sinfo__spectrum__ops_8h_source.html | 2 +-
html/sinfo__spiffi__types_8h_source.html | 2 +-
html/sinfo__stack__cfg_8c_source.html | 2 +-
html/sinfo__stack__cfg_8h_source.html | 2 +-
html/sinfo__stack__ini_8h_source.html | 2 +-
html/sinfo__stack__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__stack__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__stacked__hidden__config_8c_source.html | 4 +-
html/sinfo__stacked__hidden__config_8h_source.html | 4 +-
html/sinfo__standard__star__config_8c_source.html | 4 +-
html/sinfo__standard__star__config_8h_source.html | 4 +-
html/sinfo__standstar__cfg_8c_source.html | 2 +-
html/sinfo__standstar__cfg_8h_source.html | 2 +-
html/sinfo__standstar__ini_8h_source.html | 2 +-
html/sinfo__standstar__ini__by__cpl_8c_source.html | 2 +-
html/sinfo__standstar__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__star__index_8c_source.html | 4 +-
html/sinfo__star__index_8h_source.html | 2 +-
html/sinfo__step__distortion_8c_source.html | 4 +-
html/sinfo__step__jitter_8c_source.html | 4 +-
html/sinfo__step__objnod_8c_source.html | 4 +-
html/sinfo__step__psf_8c_source.html | 4 +-
html/sinfo__step__stdstar_8c_source.html | 4 +-
html/sinfo__svd_8c_source.html | 2 +-
html/sinfo__svd_8h_source.html | 2 +-
html/sinfo__tilt__cfg_8c_source.html | 2 +-
html/sinfo__tilt__cfg_8h_source.html | 2 +-
html/sinfo__tilt__ini_8h_source.html | 2 +-
html/sinfo__time_8c_source.html | 4 +-
html/sinfo__time_8h_source.html | 4 +-
html/sinfo__tpl__dfs_8c_source.html | 4 +-
html/sinfo__tpl__dfs_8h_source.html | 4 +-
html/sinfo__tpl__utils_8c_source.html | 4 +-
html/sinfo__tpl__utils_8h_source.html | 4 +-
html/sinfo__utilities_8c_source.html | 2 +-
html/sinfo__utilities_8h_source.html | 4 +-
html/sinfo__utilities__scired_8c_source.html | 2 +-
html/sinfo__utilities__scired_8h_source.html | 2 +-
html/sinfo__utils_8c_source.html | 4 +-
html/sinfo__utils_8h_source.html | 4 +-
html/sinfo__utils__wrappers_8c_source.html | 2 +-
html/sinfo__utils__wrappers_8h_source.html | 2 +-
html/sinfo__utl__bp__mask__add_8c_source.html | 4 +-
html/sinfo__utl__cube2ima_8h_source.html | 4 +-
html/sinfo__utl__cube2spectrum_8h_source.html | 4 +-
html/sinfo__utl__cube__arith_8h_source.html | 4 +-
html/sinfo__utl__cube__combine_8h_source.html | 4 +-
html/sinfo__utl__cube__create_8c_source.html | 4 +-
html/sinfo__utl__cube__test_8c_source.html | 4 +-
html/sinfo__utl__eff_8c_source.html | 2 +-
html/sinfo__utl__efficiency_8c_source.html | 2 +-
html/sinfo__utl__efficiency_8h_source.html | 2 +-
html/sinfo__utl__illumcorr_8c_source.html | 4 +-
html/sinfo__utl__ima__arith_8c_source.html | 4 +-
.../sinfo__utl__ima__cube__ks__test_8c_source.html | 4 +-
html/sinfo__utl__ima__gauss_8c_source.html | 4 +-
html/sinfo__utl__ima__line__corr_8c_source.html | 4 +-
html/sinfo__utl__line__oh__select_8c_source.html | 277 ++
.../sinfo__utl__remove__crh__single_8c_source.html | 4 +-
html/sinfo__utl__seds_8c_source.html | 4 +-
html/sinfo__utl__skycor_8c_source.html | 4 +-
html/sinfo__utl__skymap_8c_source.html | 4 +-
..._spectrum__divide__by__blackbody_8h_source.html | 4 +-
...utl__spectrum__wavelength__shift_8h_source.html | 4 +-
html/sinfo__utl__stdstars_8c_source.html | 6 +-
html/sinfo__utl__table__ex_8c_source.html | 4 +-
html/sinfo__utl__table__test_8c_source.html | 4 +-
html/sinfo__vltPort_8h_source.html | 2 +-
html/sinfo__wave__calibration_8c_source.html | 2 +-
html/sinfo__wave__calibration_8h_source.html | 2 +-
html/sinfo__wavecal_8c_source.html | 2 +-
html/sinfo__wavecal_8h_source.html | 2 +-
html/sinfo__wavecal__cfg_8c_source.html | 2 +-
html/sinfo__wavecal__cfg_8h_source.html | 2 +-
html/sinfo__wavecal__config_8c_source.html | 4 +-
html/sinfo__wavecal__config_8h_source.html | 4 +-
html/sinfo__wavecal__ini_8h_source.html | 2 +-
html/sinfo__wavecal__ini__by__cpl_8c_source.html | 395 +-
html/sinfo__wavecal__ini__by__cpl_8h_source.html | 2 +-
html/sinfo__wcal__functions_8c_source.html | 4 +-
html/sinfo__wcal__functions_8h_source.html | 4 +-
html/sinfoni_2sinfo__utl__cube2ima_8c_source.html | 4 +-
...nfoni_2sinfo__utl__cube2spectrum_8c_source.html | 4 +-
...sinfoni_2sinfo__utl__cube__arith_8c_source.html | 4 +-
...nfoni_2sinfo__utl__cube__combine_8c_source.html | 4 +-
..._spectrum__divide__by__blackbody_8c_source.html | 4 +-
...utl__spectrum__wavelength__shift_8c_source.html | 4 +-
irplib/Makefile.am | 6 +-
irplib/Makefile.in | 6 +-
irplib/irplib_calib.c | 58 +-
irplib/irplib_calib.h | 2 +-
irplib/irplib_cat.c | 2 +-
irplib/irplib_cat.h | 2 +-
irplib/irplib_distortion.c | 12 +-
irplib/irplib_distortion.h | 12 +-
irplib/irplib_flat.c | 2 +-
irplib/irplib_flat.h | 2 +-
irplib/irplib_framelist.c | 24 +-
irplib/irplib_framelist.h | 2 +-
irplib/irplib_hist.c | 2 +-
irplib/irplib_hist.h | 2 +-
irplib/irplib_ksigma_clip.c | 2 +-
irplib/irplib_ksigma_clip.h | 2 +-
irplib/irplib_ksigma_clip_body.h | 2 +-
irplib/irplib_match_cats.c | 2 +-
irplib/irplib_match_cats.h | 2 +-
irplib/irplib_mkmaster.c | 12 +-
irplib/irplib_mkmaster.h | 2 +-
irplib/irplib_oddeven.c | 2 +-
irplib/irplib_oddeven.h | 2 +-
irplib/irplib_plugin.c | 2 +-
irplib/irplib_plugin.h | 2 +-
irplib/irplib_polynomial.c | 12 +-
irplib/irplib_polynomial.h | 12 +-
irplib/irplib_ppm.c | 12 +-
irplib/irplib_ppm.h | 2 +-
irplib/irplib_slitpos.c | 2 +-
irplib/irplib_slitpos.h | 2 +-
irplib/irplib_spectrum.c | 2 +-
irplib/irplib_spectrum.h | 2 +-
irplib/irplib_stdstar.c | 553 +--
irplib/irplib_stdstar.h | 26 +-
irplib/irplib_strehl.c | 2 +-
irplib/irplib_strehl.h | 2 +-
irplib/irplib_utils.c | 122 +-
irplib/irplib_utils.h | 54 +-
irplib/irplib_wavecal.c | 270 +-
irplib/irplib_wavecal.h | 44 +-
irplib/irplib_wavecal_impl.h | 10 +-
irplib/irplib_wcs.c | 2 +-
irplib/irplib_wcs.h | 2 +-
irplib/irplib_wlxcorr.c | 76 +-
irplib/irplib_wlxcorr.h | 14 +-
irplib/tests/Makefile.am | 43 +-
irplib/tests/Makefile.in | 88 +-
irplib/tests/irplib_cat-test.c | 12 +-
irplib/tests/irplib_polynomial-test.c | 16 +-
irplib/tests/irplib_utils-test.c | 12 +-
irplib/tests/irplib_wcs-test.c | 12 +-
irplib/tests/irplib_wlxcorr-test.c | 12 +-
recipes/Makefile.am | 19 +-
recipes/Makefile.in | 62 +-
recipes/sinfo_rec_detlin.c | 2 +-
recipes/sinfo_rec_distortion.c | 2 +-
recipes/sinfo_rec_jitter.c | 2 +-
recipes/sinfo_rec_mdark.c | 2 +-
recipes/sinfo_rec_mflat.c | 2 +-
recipes/sinfo_rec_pupil.c | 2 +-
recipes/sinfo_rec_wavecal.c | 12 +-
recipes/sinfo_utl_bp_mask_add.c | 2 +-
recipes/sinfo_utl_cube2ima.c | 2 +-
recipes/sinfo_utl_cube2spectrum.c | 2 +-
recipes/sinfo_utl_cube_arith.c | 2 +-
recipes/sinfo_utl_cube_combine.c | 2 +-
recipes/sinfo_utl_cube_create.c | 2 +-
recipes/sinfo_utl_eff.c | 299 --
recipes/sinfo_utl_ima_arith.c | 2 +-
recipes/sinfo_utl_ima_line_corr.c | 2 +-
recipes/sinfo_utl_line_oh_select.c | 292 ++
recipes/sinfo_utl_skycor.c | 2 +-
recipes/sinfo_utl_skymap.c | 2 +-
recipes/sinfo_utl_spectrum_divide_by_blackbody.c | 2 +-
recipes/sinfo_utl_spectrum_wavelength_shift.c | 2 +-
recipes/tests/recipe_main.c | 2 +-
regtests/Makefile.am | 2 +-
regtests/tests/Makefile.am | 2 +-
setup | 2 +-
sinfoni/sinfo_baryvel.c | 2 +-
sinfoni/sinfo_baryvel.h | 2 +-
sinfoni/sinfo_bp_config.c | 2 +-
sinfoni/sinfo_bp_config.h | 2 +-
sinfoni/sinfo_bp_dist_config.c | 2 +-
sinfoni/sinfo_bp_dist_config.h | 2 +-
sinfoni/sinfo_bp_lin_config.c | 2 +-
sinfoni/sinfo_bp_lin_config.h | 2 +-
sinfoni/sinfo_bp_noise_config.c | 2 +-
sinfoni/sinfo_bp_noise_config.h | 2 +-
sinfoni/sinfo_bp_norm.c | 8 +-
sinfoni/sinfo_bp_norm_config.c | 2 +-
sinfoni/sinfo_bp_norm_config.h | 2 +-
sinfoni/sinfo_bp_sky_config.c | 2 +-
sinfoni/sinfo_bp_sky_config.h | 2 +-
sinfoni/sinfo_cube_construct.c | 2 +-
sinfoni/sinfo_dark_config.c | 2 +-
sinfoni/sinfo_dark_config.h | 2 +-
sinfoni/sinfo_dfs.c | 22 +-
sinfoni/sinfo_dfs.h | 2 +-
sinfoni/sinfo_distortion.c | 2 +-
sinfoni/sinfo_distortion.h | 2 +-
sinfoni/sinfo_distortion_config.c | 2 +-
sinfoni/sinfo_distortion_config.h | 2 +-
sinfoni/sinfo_dump.c | 81 +-
sinfoni/sinfo_dump.h | 2 +-
sinfoni/sinfo_error.h | 2 +-
sinfoni/sinfo_focus.c | 4 +-
sinfoni/sinfo_focus_determination_config.c | 2 +-
sinfoni/sinfo_focus_determination_config.h | 2 +-
sinfoni/sinfo_functions.h | 2 +-
sinfoni/sinfo_general_config.c | 2 +-
sinfoni/sinfo_general_config.h | 2 +-
sinfoni/sinfo_globals.h | 2 +-
sinfoni/sinfo_hidden.h | 2 +-
sinfoni/sinfo_image_ops.c | 2 +-
sinfoni/sinfo_key_names.h | 2 +-
sinfoni/sinfo_lamp_flats_config.c | 2 +-
sinfoni/sinfo_lamp_flats_config.h | 2 +-
sinfoni/sinfo_lamp_spec_config.c | 2 +-
sinfoni/sinfo_lamp_spec_config.h | 2 +-
sinfoni/sinfo_msg.c | 2 +-
sinfoni/sinfo_msg.h | 2 +-
sinfoni/sinfo_new_cube_ops.c | 20 +-
sinfoni/sinfo_new_psf.c | 3 +-
sinfoni/sinfo_north_south_test_config.c | 2 +-
sinfoni/sinfo_north_south_test_config.h | 2 +-
sinfoni/sinfo_objnod_config.c | 2 +-
sinfoni/sinfo_objnod_config.h | 2 +-
sinfoni/sinfo_objspider_config.c | 2 +-
sinfoni/sinfo_objspider_config.h | 2 +-
sinfoni/sinfo_pfits.c | 2 +-
sinfoni/sinfo_pfits.h | 2 +-
sinfoni/sinfo_prepare_stacked_frames_config.c | 2 +-
sinfoni/sinfo_prepare_stacked_frames_config.h | 2 +-
sinfoni/sinfo_pro_types.h | 2 +-
sinfoni/sinfo_product_config.c | 2 +-
sinfoni/sinfo_product_config.h | 2 +-
sinfoni/sinfo_psf_config.c | 2 +-
sinfoni/sinfo_psf_config.h | 2 +-
sinfoni/sinfo_qr.c | 2 +-
sinfoni/sinfo_raw_types.h | 2 +-
sinfoni/sinfo_rec_utils.c | 2 +-
sinfoni/sinfo_rec_utils.h | 2 +-
sinfoni/sinfo_ref_types.h | 9 +-
sinfoni/sinfo_skycor.c | 2 +-
sinfoni/sinfo_skycor.h | 2 +-
sinfoni/sinfo_skycor_config.c | 2 +-
sinfoni/sinfo_skycor_config.h | 2 +-
sinfoni/sinfo_stacked_hidden_config.c | 2 +-
sinfoni/sinfo_stacked_hidden_config.h | 2 +-
sinfoni/sinfo_standard_star_config.c | 2 +-
sinfoni/sinfo_standard_star_config.h | 2 +-
sinfoni/sinfo_star_index.c | 2 +-
sinfoni/sinfo_time.c | 2 +-
sinfoni/sinfo_time.h | 2 +-
sinfoni/sinfo_tpl_dfs.c | 2 +-
sinfoni/sinfo_tpl_dfs.h | 2 +-
sinfoni/sinfo_tpl_utils.c | 2 +-
sinfoni/sinfo_tpl_utils.h | 2 +-
sinfoni/sinfo_utilities.h | 2 +-
sinfoni/sinfo_utils.c | 2 +-
sinfoni/sinfo_utils.h | 2 +-
sinfoni/sinfo_utl_cube2ima.c | 2 +-
sinfoni/sinfo_utl_cube2ima.h | 2 +-
sinfoni/sinfo_utl_cube2spectrum.c | 2 +-
sinfoni/sinfo_utl_cube2spectrum.h | 2 +-
sinfoni/sinfo_utl_cube_arith.c | 2 +-
sinfoni/sinfo_utl_cube_arith.h | 2 +-
sinfoni/sinfo_utl_cube_combine.c | 2 +-
sinfoni/sinfo_utl_cube_combine.h | 2 +-
sinfoni/sinfo_utl_spectrum_divide_by_blackbody.c | 2 +-
sinfoni/sinfo_utl_spectrum_divide_by_blackbody.h | 2 +-
sinfoni/sinfo_utl_spectrum_wavelength_shift.c | 2 +-
sinfoni/sinfo_utl_spectrum_wavelength_shift.h | 2 +-
sinfoni/sinfo_wavecal_config.c | 2 +-
sinfoni/sinfo_wavecal_config.h | 2 +-
sinfoni/sinfo_wavecal_ini_by_cpl.c | 7 +-
sinfoni/sinfo_wcal_functions.c | 2 +-
sinfoni/sinfo_wcal_functions.h | 2 +-
sinfoni/tests/sinfo_cube_coadd_test.c | 2 +-
sinfoni/tests/sinfo_cube_ops_test.c | 2 +-
sinfoni/tests/sinfo_efficiency_test.c | 29 +-
sinfoni/tests/sinfo_gauss_fit_test.c | 9 +-
sinfoni/tests/sinfo_image_ops_test.c | 2 +-
sinfoni/tests/sinfo_kappa_sigma_test.c | 31 +-
sinfoni/tests/sinfo_line_corr_test.c | 23 +-
sinfoni/tests/sinfo_skycor_test.c | 2 +-
sinfoni/tests/sinfo_star_catalog.c | 48 +-
sinfoni/tests/sinfo_star_index_test.c | 36 +-
sinfoni/tests/sinfo_strehl_test.c | 2 +-
sinfoni/tests/sinfo_table_ops_test.c | 2 +-
sinfoni/tests/test_atmo_disp.c | 6 +-
713 files changed, 12834 insertions(+), 12358 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 616a28a..7720670 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+2.3.3 Added optional reading of REF_LINE_OH
2.3.2 Clean static errors from Jenkins
2.3.1 Updated id for DFO
2.3.0 Added proper CUBE FITS header keys for CASA
diff --git a/aclocal.m4 b/aclocal.m4
index abf663d..fa9dd34 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -434,18 +434,6 @@ fi], [AC_MSG_RESULT(no)])
AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
diff --git a/calib/cal/REF_BP_MAP.fits b/calib/cal/REF_BP_MAP.fits
deleted file mode 100644
index 9dff1f1..0000000
--- a/calib/cal/REF_BP_MAP.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = -32 / No. of bits per pixel NAXIS = 2 / No. of axes in image NAXIS1 = 2048 / No. of pixels NAXIS2 = 2048 / No. of pixels EXTEND = T / FITS extension may be present BLOCKED = [...]
\ No newline at end of file
diff --git a/calib/cal/SI_GATM_REF_CORR_HK_025.fits b/calib/cal/SI_GATM_REF_CORR_HK_025.fits
deleted file mode 100644
index cf6535e..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_HK_025.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_HK_100.fits b/calib/cal/SI_GATM_REF_CORR_HK_100.fits
deleted file mode 100644
index 64819c9..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_HK_100.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_H_025.fits b/calib/cal/SI_GATM_REF_CORR_H_025.fits
deleted file mode 100644
index 4a45c64..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_H_025.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_H_100.fits b/calib/cal/SI_GATM_REF_CORR_H_100.fits
deleted file mode 100644
index 07c68f2..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_H_100.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_J_025.fits b/calib/cal/SI_GATM_REF_CORR_J_025.fits
deleted file mode 100644
index 905c213..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_J_025.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_J_100.fits b/calib/cal/SI_GATM_REF_CORR_J_100.fits
deleted file mode 100644
index fb499f7..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_J_100.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_K_025.fits b/calib/cal/SI_GATM_REF_CORR_K_025.fits
deleted file mode 100644
index bcf304c..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_K_025.fits and /dev/null differ
diff --git a/calib/cal/SI_GATM_REF_CORR_K_100.fits b/calib/cal/SI_GATM_REF_CORR_K_100.fits
deleted file mode 100644
index fddae4b..0000000
Binary files a/calib/cal/SI_GATM_REF_CORR_K_100.fits and /dev/null differ
diff --git a/calib/cal/SLIT_POS_HK_025.fits b/calib/cal/SLIT_POS_HK_025.fits
deleted file mode 100644
index db249cc..0000000
--- a/calib/cal/SLIT_POS_HK_025.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_HK_100.fits b/calib/cal/SLIT_POS_HK_100.fits
deleted file mode 100644
index 3ce0220..0000000
--- a/calib/cal/SLIT_POS_HK_100.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_HK_250.fits b/calib/cal/SLIT_POS_HK_250.fits
deleted file mode 100644
index a600d2b..0000000
--- a/calib/cal/SLIT_POS_HK_250.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_HK_PUPIL.fits b/calib/cal/SLIT_POS_HK_PUPIL.fits
deleted file mode 100644
index 5ff425f..0000000
--- a/calib/cal/SLIT_POS_HK_PUPIL.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_H_025.fits b/calib/cal/SLIT_POS_H_025.fits
deleted file mode 100644
index 32150f8..0000000
--- a/calib/cal/SLIT_POS_H_025.fits
+++ /dev/null
@@ -1 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_H_100.fits b/calib/cal/SLIT_POS_H_100.fits
deleted file mode 100644
index d0ce779..0000000
--- a/calib/cal/SLIT_POS_H_100.fits
+++ /dev/null
@@ -1,3 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
=@ @p;` @t�` @t )@ @x
-� @x f� @|
-f� @|=� @�ݠ @��@ @�@� @��� @� @�
� @�"` @�e� @�s� @��� @�^` @�0 @�� @�� @� ؠ @�� @��` @�� @��` @�a` @��` @�O� @�� @�u� @�2@ @��` @��` @�Y @�Z@ @��� @��� @��@ @�@ @� @��� @��� @�
� @�c@ @�:@ @�i @��� @�(� @�t� @�� @� � @� ` @��:� @��T� @��G` [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_H_250.fits b/calib/cal/SLIT_POS_H_250.fits
deleted file mode 100644
index 437b797..0000000
--- a/calib/cal/SLIT_POS_H_250.fits
+++ /dev/null
@@ -1,2 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
-� @� T� @���� @��� @��5� @��o� @���� @���� @��,� @��)� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_H_PUPIL.fits b/calib/cal/SLIT_POS_H_PUPIL.fits
deleted file mode 100644
index d17cc36..0000000
--- a/calib/cal/SLIT_POS_H_PUPIL.fits
+++ /dev/null
@@ -1,3 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
=@ @p;` @t�` @t )@ @x
-� @x f� @|
-f� @|=� @�ݠ @��@ @�@� @��� @� @�
� @�"` @�e� @�s� @��� @�^` @�0 @�� @�� @� ؠ @�� @��` @�� @��` @�a` @��` @�O� @�� @�u� @�2@ @��` @��` @�Y @�Z@ @��� @��� @��@ @�@ @� @��� @��� @�
� @�c@ @�:@ @�i @��� @�(� @�t� @�� @� � @� ` @��:� @��T� @��G` [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_J_025.fits b/calib/cal/SLIT_POS_J_025.fits
deleted file mode 100644
index 2d8c453..0000000
--- a/calib/cal/SLIT_POS_J_025.fits
+++ /dev/null
@@ -1,4 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
-� @��E @�w� @��A @�� @�� @�
-V @�@� @��` @��� @��` @��� @�7� @��� @��� @��� @��� @�
@�
-
� @��� @��� @��� @��� @�͠ @�` @���� @��� @��
� @�� @�] @�� @��� @�K� @��@ @��� @��� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_J_100.fits b/calib/cal/SLIT_POS_J_100.fits
deleted file mode 100644
index def8683..0000000
--- a/calib/cal/SLIT_POS_J_100.fits
+++ /dev/null
@@ -1,5 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
�� @xr� @|� @|� @�` @� :` @� �@ @�
-� @��@ @��� @�_� @� �� @�'@ @�$� @� �� @�
5� @�Ǡ @� {� @��` @�
-�� @�g @� � @�
9� @�
-�@ @�^� @�I� @�d@ @��� @�� @��� @� *� @� }� @�� @�� @� � @�
-1� @�e� @�
@��� @� �� @��� @�`� @�6` @�
@��� @�w� @�@ @��` @�0@ @��� @��@ @�2� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_J_250.fits b/calib/cal/SLIT_POS_J_250.fits
deleted file mode 100644
index 20f515b..0000000
--- a/calib/cal/SLIT_POS_J_250.fits
+++ /dev/null
@@ -1,4 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
� @x�@ @x�� @|�� @|
� @��� @�� @��` @�z� @�` @��v� @�-� @�� @�� @�f @�y@ @�4� @� � @�@ @��� @� ~@ @�
@ @��` @�
=` @�J� @��� @��` @�
-)@ @��� @�
` @�� @�
� @��� @� �� @��@ @�
� @�t` @� �@ @�
-� @�
�� @��� @�
@�` @�
-�` @�` @�W @��� @��� @�6� @�� @�� @�0@ @� �� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_J_PUPIL.fits b/calib/cal/SLIT_POS_J_PUPIL.fits
deleted file mode 100644
index c375b2d..0000000
--- a/calib/cal/SLIT_POS_J_PUPIL.fits
+++ /dev/null
@@ -1,5 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
�� @xr� @|� @|� @�` @� :` @� �@ @�
-� @��@ @��� @�_� @� �� @�'@ @�$� @� �� @�
5� @�Ǡ @� {� @��` @�
-�� @�g @� � @�
9� @�
-�@ @�^� @�I� @�d@ @��� @�� @��� @� *� @� }� @�� @�� @� � @�
-1� @�e� @�
@��� @� �� @��� @�`� @�6` @�
@��� @�w� @�@ @��` @�0@ @��� @��@ @�2� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_K_025.fits b/calib/cal/SLIT_POS_K_025.fits
deleted file mode 100644
index 935faa4..0000000
--- a/calib/cal/SLIT_POS_K_025.fits
+++ /dev/null
@@ -1,3 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
- � @�v @�
� @��@ @� _@ @�� @�
� @��� @�t@ @� @�` @� �� @�
` @�J� @�
-7 @��� @�
S� @�� @�
�� @� @�
j` @���` @� @� @� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_K_100.fits b/calib/cal/SLIT_POS_K_100.fits
deleted file mode 100644
index d89b61a..0000000
--- a/calib/cal/SLIT_POS_K_100.fits
+++ /dev/null
@@ -1,5 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
�@ @p� @t�� @to� @xQ� @xb @| @|L� @�+� @�
-O @�5@ @�0� @��� @��@ @��` @�
-�@ @�;` @��@ @�Y� @��� @�� @�
>� @��� @� �� @�Z� @�� @� �� @� �� @�� @� � @�} @�m� @� @� �` @��� @� � @�%` @�
-� @��@ @� � @�
@�
-�� @�(� @�� @�a� @�� @� @��@ @�� @�� @��� @��� @��` @� �@ @���� @�,� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_K_250.fits b/calib/cal/SLIT_POS_K_250.fits
deleted file mode 100644
index 11794c2..0000000
--- a/calib/cal/SLIT_POS_K_250.fits
+++ /dev/null
@@ -1,4 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
� @h"�� @p
�@ @p�� @t\� @t�� @x
-r� @x�� @|~� @|ŀ @�� @� �� @�V` @��� @��� @��� @� @� � @��` @� @�A� @��� @�F� @�
�� @�
->� @� �@ @�
� @� � @��� @�D @�� @�� @�� @��� @��� @� �` @�=@ @��@ @�� @�
-; @�h@ @�à @�@ @� D� @��� @��� @�Հ @�*� @�@ @��� @�Z@ @��@ @�) @�(@ @�q@ @�� @� � @��` @�� [...]
\ No newline at end of file
diff --git a/calib/cal/SLIT_POS_K_PUPIL.fits b/calib/cal/SLIT_POS_K_PUPIL.fits
deleted file mode 100644
index 9e1182b..0000000
--- a/calib/cal/SLIT_POS_K_PUPIL.fits
+++ /dev/null
@@ -1,5 +0,0 @@
-SIMPLE = T / Standard FITS format: NOST 100-2.0 BITPIX = 8 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559 [...]
�@ @p� @t�� @to� @xQ� @xb @| @|L� @�+� @�
-O @�5@ @�0� @��� @��@ @��` @�
-�@ @�;` @��@ @�Y� @��� @�� @�
>� @��� @� �� @�Z� @�� @� �� @� �� @�� @� � @�} @�m� @� @� �` @��� @� � @�%` @�
-� @��@ @� � @�
@�
-�� @�(� @�� @�a� @�� @� @��@ @�� @�� @��� @��� @��` @� �@ @���� @�,� @�� [...]
\ No newline at end of file
diff --git a/calib/cal/argonJ.fits b/calib/cal/argonJ.fits
deleted file mode 100644
index 86b4e58..0000000
Binary files a/calib/cal/argonJ.fits and /dev/null differ
diff --git a/calib/cal/atmoexan.fits b/calib/cal/atmoexan.fits
deleted file mode 100644
index 490ef0e..0000000
--- a/calib/cal/atmoexan.fits
+++ /dev/null
@@ -1,15 +0,0 @@
-SIMPLE = T / Standard FITS format BITPIX = -32 / No. of bits per pixel NAXIS = 0 / Empty Prime data matrix EXTEND = T / FITS extension may be present BLOCKED = T / FITS file may be blocked ORIGIN = 'E [...]
-EH ?p��EN@ ?8Q�ET� ?��EZ� ?
�Ea >�Eg@ >��Em� >�p�Es� >���Ez >���E� >�=qE�@ >� E�` >aG�E�� >L��E�� >B�\E�� >.{E�� >#�
-E� >#�
-E� >\)E�@ >
�E�� =�E�� =�G�E� =���E�@ =���E�� =�Q�E�� =��
-E� =�\)E�@ =L��EԀ =#�
-E�� =#�
-E� <�E�@ <�E� <��
-E�� <��
-E� <��
-F <��
-F@ <#�
-F` <#�
-F � <#�
-F
� <#�
-F
@ F�� F�P [...]
\ No newline at end of file
diff --git a/calib/cal/drs_setup_wave.fits b/calib/cal/drs_setup_wave.fits
deleted file mode 100644
index 3bd9548..0000000
Binary files a/calib/cal/drs_setup_wave.fits and /dev/null differ
diff --git a/calib/cal/drs_setup_wave_oh.fits b/calib/cal/drs_setup_wave_oh.fits
deleted file mode 100644
index 7f191af..0000000
Binary files a/calib/cal/drs_setup_wave_oh.fits and /dev/null differ
diff --git a/calib/cal/neonK.fits b/calib/cal/neonK.fits
deleted file mode 100644
index e68dd30..0000000
Binary files a/calib/cal/neonK.fits and /dev/null differ
diff --git a/calib/cal/xenonHK.fits b/calib/cal/xenonHK.fits
deleted file mode 100644
index edda449..0000000
Binary files a/calib/cal/xenonHK.fits and /dev/null differ
diff --git a/calib/cal/xenonargonH.fits b/calib/cal/xenonargonH.fits
deleted file mode 100644
index c232777..0000000
Binary files a/calib/cal/xenonargonH.fits and /dev/null differ
diff --git a/calib/gasgano/config/SINFO.prefs b/calib/gasgano/config/SINFO.prefs
index c70e8ed..2b3f49d 100644
--- a/calib/gasgano/config/SINFO.prefs
+++ b/calib/gasgano/config/SINFO.prefs
@@ -41,7 +41,7 @@ PRINTER_NAME=lp
PRINT_FONT=Monospaced:16
PRINT_ORIENTATION=P
RADEC_CONVERSION=true
-RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.2/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.2/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.2/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.2/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2. [...]
+RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.3/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.3/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.3/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.3.3/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2. [...]
SCRIPTS_DIR=/home/astro4/gasgano/scripts/gas-scripts
SHORTEN_FILES_PATH=false
SHORT_FILENAME=true
diff --git a/configure b/configure
index e865180..5751d58 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for SINFONI Instrument Pipeline 2.3.2.
+# Generated by GNU Autoconf 2.63 for SINFONI Instrument Pipeline 2.3.3.
#
# Report bugs to <amodigli at eso.org>.
#
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='SINFONI Instrument Pipeline'
PACKAGE_TARNAME='sinfo'
-PACKAGE_VERSION='2.3.2'
-PACKAGE_STRING='SINFONI Instrument Pipeline 2.3.2'
+PACKAGE_VERSION='2.3.3'
+PACKAGE_STRING='SINFONI Instrument Pipeline 2.3.3'
PACKAGE_BUGREPORT='amodigli at eso.org'
ac_unique_file="Makefile.am"
@@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures SINFONI Instrument Pipeline 2.3.2 to adapt to many kinds of systems.
+\`configure' configures SINFONI Instrument Pipeline 2.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1601,7 +1601,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.3.2:";;
+ short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.3.3:";;
esac
cat <<\_ACEOF
@@ -1723,7 +1723,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-SINFONI Instrument Pipeline configure 2.3.2
+SINFONI Instrument Pipeline configure 2.3.3
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1737,7 +1737,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by SINFONI Instrument Pipeline $as_me 2.3.2, which was
+It was created by SINFONI Instrument Pipeline $as_me 2.3.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2718,7 +2718,7 @@ fi
# Define the identity of the package.
PACKAGE='sinfo'
- VERSION='2.3.2'
+ VERSION='2.3.3'
cat >>confdefs.h <<_ACEOF
@@ -15443,7 +15443,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by SINFONI Instrument Pipeline $as_me 2.3.2, which was
+This file was extended by SINFONI Instrument Pipeline $as_me 2.3.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15506,7 +15506,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-SINFONI Instrument Pipeline config.status 2.3.2
+SINFONI Instrument Pipeline config.status 2.3.3
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index 8c8a5bd..1c89987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT([SINFONI Instrument Pipeline], [2.3.2], [amodigli at eso.org], [sinfo])
+AC_INIT([SINFONI Instrument Pipeline], [2.3.3], [amodigli at eso.org], [sinfo])
AC_PREREQ([2.59])
@@ -11,7 +11,7 @@ AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
diff --git a/html/files.html b/html/files.html
index 60f1622..dc5bc78 100644
--- a/html/files.html
+++ b/html/files.html
@@ -359,6 +359,7 @@
<tr><td class="indexkey"><b>sinfo_utl_ima_cube_ks_test.c</b> <a href="sinfo__utl__ima__cube__ks__test_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>sinfo_utl_ima_gauss.c</b> <a href="sinfo__utl__ima__gauss_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>sinfo_utl_ima_line_corr.c</b> <a href="sinfo__utl__ima__line__corr_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><b>sinfo_utl_line_oh_select.c</b> <a href="sinfo__utl__line__oh__select_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>sinfo_utl_remove_crh_single.c</b> <a href="sinfo__utl__remove__crh__single_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>sinfo_utl_seds.c</b> <a href="sinfo__utl__seds_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>sinfo_utl_skycor.c</b> <a href="sinfo__utl__skycor_8c_source.html">[code]</a></td><td class="indexvalue"></td></tr>
@@ -388,7 +389,7 @@
<tr><td class="indexkey"><b>sinfo_wcal_functions.h</b> <a href="sinfo__wcal__functions_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__calib.html b/html/group__irplib__calib.html
index 0b81678..f34380e 100644
--- a/html/group__irplib__calib.html
+++ b/html/group__irplib__calib.html
@@ -82,7 +82,7 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to a table containing single gain evaluations </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>: #1 input frames need to have defined FITS keyword EXPTIME #2 input frames need to have defined FITS keyword DIT </dd></dl>
-<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00179">179</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00191">191</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
</div>
</div>
@@ -122,7 +122,7 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to a table containing linearity evaluations </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>: #2 input frames need to have defined FITS keyword EXPTIME #3 input frames need to have defined FITS keyword DIT </dd></dl>
-<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00360">360</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00372">372</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
</div>
</div>
@@ -175,7 +175,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if everything is ok, -1 otherwise </dd></dl>
-<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00481">481</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00493">493</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
</div>
</div>
@@ -228,7 +228,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if everything is ok, -1 otherwise </dd></dl>
-<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00566">566</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__calib_8c_source.html#l00578">578</a> of file <a class="el" href="irplib__calib_8c_source.html">irplib_calib.c</a>.</p>
</div>
</div>
@@ -359,7 +359,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__cat.html b/html/group__irplib__cat.html
index 0ad80e7..3a35a84 100644
--- a/html/group__irplib__cat.html
+++ b/html/group__irplib__cat.html
@@ -245,7 +245,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__distortion.html b/html/group__irplib__distortion.html
index c6ce3a7..bac104a 100644
--- a/html/group__irplib__distortion.html
+++ b/html/group__irplib__distortion.html
@@ -12,7 +12,7 @@
<h1>Distortion correction functions</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__flat.html b/html/group__irplib__flat.html
index ce28993..ff1745a 100644
--- a/html/group__irplib__flat.html
+++ b/html/group__irplib__flat.html
@@ -115,7 +115,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__framelist.html b/html/group__irplib__framelist.html
index dffac52..dfef07c 100644
--- a/html/group__irplib__framelist.html
+++ b/html/group__irplib__framelist.html
@@ -144,7 +144,7 @@
<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00209">209</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00712">irplib_framelist_set()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00714">irplib_framelist_set()</a>.</p>
</div>
</div>
@@ -214,7 +214,7 @@
<div class="fragment"><pre class="fragment"> <a class="code" href="group__irplib__framelist.html#gafed15e9e259ebad923b710f5eb0196ac" title="Verify that a property is present for all frames.">irplib_framelist_contains</a>(myframes, <span class="stringliteral">"ESO INS LAMP ST"</span>, CPL_TYPE_BOOL,
CPL_TRUE, 0.0);
</pre></div>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00907">907</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00909">909</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
@@ -244,7 +244,7 @@
<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00191">191</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00847">irplib_framelist_empty()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00849">irplib_framelist_empty()</a>.</p>
<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00290">irplib_framelist_extract()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00360">irplib_framelist_extract_regexp()</a>.</p>
@@ -275,7 +275,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE or the relevant CPL error code </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00847">847</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00849">849</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00191">irplib_framelist_delete()</a>.</p>
@@ -316,7 +316,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE or the relevant CPL error code </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00751">751</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00753">753</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
@@ -359,7 +359,7 @@
<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00290">290</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00191">irplib_framelist_delete()</a>, <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00712">irplib_framelist_set()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00191">irplib_framelist_delete()</a>, <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00714">irplib_framelist_set()</a>.</p>
</div>
</div>
@@ -408,7 +408,7 @@
<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00360">360</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00191">irplib_framelist_delete()</a>, <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00712">irplib_framelist_set()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00191">irplib_framelist_delete()</a>, <a class="el" href="irplib__framelist_8c_source.html#l00178">irplib_framelist_new()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00714">irplib_framelist_set()</a>.</p>
</div>
</div>
@@ -449,7 +449,7 @@
<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00456">456</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00472">irplib_framelist_get_const()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00473">irplib_framelist_get_const()</a>.</p>
</div>
</div>
@@ -488,7 +488,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The frame or NULL on error </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00472">472</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00473">473</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00456">irplib_framelist_get()</a>.</p>
@@ -530,9 +530,9 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>The propertylist or NULL on error </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The propertylist must first be created, for example with irplib_framelist_load_propertylist(self, pos, ...), otherwise an error occurs. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00528">528</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00529">529</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00550">irplib_framelist_get_propertylist_const()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00552">irplib_framelist_get_propertylist_const()</a>.</p>
</div>
</div>
@@ -572,9 +572,9 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>The propertylist or NULL on error </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The propertylist must first be created, for example with irplib_framelist_load_propertylist(self, pos, ...), otherwise an error occurs. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00550">550</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00552">552</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00528">irplib_framelist_get_propertylist()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00529">irplib_framelist_get_propertylist()</a>.</p>
</div>
</div>
@@ -665,9 +665,9 @@
<dl class="see"><dt><b>See also:</b></dt><dd>cpl_propertylist_load_regexp() </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Use a regexp of ".?" to load all properties. If a propertylist already exists it is deleted and replaced by the new one. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00581">581</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00583">583</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00636">irplib_framelist_load_propertylist_all()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00638">irplib_framelist_load_propertylist_all()</a>.</p>
</div>
</div>
@@ -722,9 +722,9 @@
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005" title="Load the propertylist of the specified frame in the framelist.">irplib_framelist_load_propertylist()</a> </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Use a regexp of "" to load all properties. If a frame already has a propertylist, it is not modified (and no propertylist is loaded for that frame). </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00636">636</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00638">638</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
-<p>References <a class="el" href="irplib__framelist_8c_source.html#l00581">irplib_framelist_load_propertylist()</a>.</p>
+<p>References <a class="el" href="irplib__framelist_8c_source.html#l00583">irplib_framelist_load_propertylist()</a>.</p>
</div>
</div>
@@ -798,7 +798,7 @@
<dl class="note"><dt><b>Note:</b></dt><dd>It is an error to call cpl_frame_delete() on a frame that is inserted in a framelist.</dd></dl>
<p>It is allowed to specify the position equal to the size of the list. This will increment the size of the list. </p>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00712">712</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00714">714</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
<p>Referenced by <a class="el" href="irplib__framelist_8c_source.html#l00209">irplib_framelist_cast()</a>, <a class="el" href="irplib__framelist_8c_source.html#l00290">irplib_framelist_extract()</a>, and <a class="el" href="irplib__framelist_8c_source.html#l00360">irplib_framelist_extract_regexp()</a>.</p>
@@ -846,7 +846,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE or the relevant CPL error code </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00495">495</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00496">496</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
@@ -885,7 +885,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE or the relevant _cpl_error_code_ </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00680">680</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00682">682</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
@@ -932,7 +932,7 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE or the relevant CPL error code</dd></dl>
<p>The specified frame is removed from the framelist and its size is decreased by one. The frame is returned to the caller. The caller may also retrieve the propertylist of the frame by passing a non-NULL pointer. On success this may point to NULL, if a propertylist was not created for the frame. If the caller passes a NULL-pointer for the propertylist, the propertylist is deallocated. </p>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00801">801</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l00803">803</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
@@ -1017,12 +1017,12 @@
<dl class="see"><dt><b>See also:</b></dt><dd>cpl_image_load() </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The returned cpl_imagelist must be deallocated using cpl_imagelist_delete() </dd></dl>
-<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l01050">1050</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__framelist_8c_source.html#l01052">1052</a> of file <a class="el" href="irplib__framelist_8c_source.html">irplib_framelist.c</a>.</p>
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__oddeven.html b/html/group__irplib__oddeven.html
index c29966a..f003ff7 100644
--- a/html/group__irplib__oddeven.html
+++ b/html/group__irplib__oddeven.html
@@ -93,7 +93,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__plugin.html b/html/group__irplib__plugin.html
index 2f79190..76f559c 100644
--- a/html/group__irplib__plugin.html
+++ b/html/group__irplib__plugin.html
@@ -14,7 +14,7 @@
<p>This module provides a macro and a unit test function for <em>irplib_plugin</em>.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "irplib_plugin.h"</span>
</pre></div> </div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__polynomial.html b/html/group__irplib__polynomial.html
index 235c310..e3678fe 100644
--- a/html/group__irplib__polynomial.html
+++ b/html/group__irplib__polynomial.html
@@ -235,7 +235,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__ppm.html b/html/group__irplib__ppm.html
index d4e54fd..05e329c 100644
--- a/html/group__irplib__ppm.html
+++ b/html/group__irplib__ppm.html
@@ -107,7 +107,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__slitpos.html b/html/group__irplib__slitpos.html
index a23c574..4a042e6 100644
--- a/html/group__irplib__slitpos.html
+++ b/html/group__irplib__slitpos.html
@@ -73,7 +73,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__spectrum.html b/html/group__irplib__spectrum.html
index 930c6fe..271c515 100644
--- a/html/group__irplib__spectrum.html
+++ b/html/group__irplib__spectrum.html
@@ -155,7 +155,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__stdstar.html b/html/group__irplib__stdstar.html
index be6978d..9c043ba 100644
--- a/html/group__irplib__stdstar.html
+++ b/html/group__irplib__stdstar.html
@@ -11,8 +11,8 @@
<div class="contents">
<h1>Functions for standard stars</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__stdstar.html#ga1d798cc23ce72891460133af03ee21ba">irplib_stdstar_write_catalogs</a> (cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *pro_type, const char *package_name, const char *ins_name, cpl_table *(*convert_ascii_table)(const char *))</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Write the ASCII catalogs as FITS files. <a href="#ga1d798cc23ce72891460133af03ee21ba"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__stdstar.html#gac18c92be3d3c96ba57804b074a2abb7d">irplib_stdstar_write_catalogs</a> (cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *pro_type, const char *package_name, const char *ins_name, cpl_table *(*convert_ascii_table)(const char *))</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Write the ASCII catalogs as FITS files. <a href="#gac18c92be3d3c96ba57804b074a2abb7d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cpl_table * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1">irplib_stdstar_load_catalog</a> (const char *filename, const char *ext_name)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load the FITS catalog in a table. <a href="#ga1690bd84c24e905e384b8f725bf7aff1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc">irplib_stdstar_check_columns_exist</a> (const cpl_table *catal)</td></tr>
@@ -59,9 +59,9 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE if the table has all the mandatory columns, a proper error code otherwise</dd></dl>
<p>The table is checked for the presence of the mandatory keywords </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00291">291</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00300">300</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00492">irplib_stdstar_find_star()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00501">irplib_stdstar_find_star()</a>.</p>
</div>
</div>
@@ -108,9 +108,9 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>the index of the star in the table or -1 in error case</dd></dl>
<p>Returns the index of the star that is closest to (ra,dec) </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00424">424</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00433">433</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00492">irplib_stdstar_find_star()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00501">irplib_stdstar_find_star()</a>.</p>
</div>
</div>
@@ -216,12 +216,12 @@
</table>
</dd>
</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE if ok, or an appropiate error case otherwise</dd></dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE if ok or else the relevant CPL error code</dd></dl>
<p>The closest star to ra, dec with defined magnitude is search in all the catalogues included in catfile. If catname is "all", all the catalogs are searched at once. The output pointers can be NULL if one is not interested in them. </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00492">492</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00501">501</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>References <a class="el" href="irplib__stdstar_8c_source.html#l00291">irplib_stdstar_check_columns_exist()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00424">irplib_stdstar_find_closest()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00186">irplib_stdstar_load_catalog()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00339">irplib_stdstar_select_stars_dist()</a>, and <a class="el" href="irplib__stdstar_8c_source.html#l00388">irplib_stdstar_select_stars [...]
+<p>References <a class="el" href="irplib__stdstar_8c_source.html#l00300">irplib_stdstar_check_columns_exist()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00433">irplib_stdstar_find_closest()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00195">irplib_stdstar_load_catalog()</a>, <a class="el" href="irplib__stdstar_8c_source.html#l00348">irplib_stdstar_select_stars_dist()</a>, and <a class="el" href="irplib__stdstar_8c_source.html#l00397">irplib_stdstar_select_stars [...]
</div>
</div>
@@ -282,7 +282,7 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated conversion or NULL in error case</dd></dl>
<p>conversion(wave) = (spec * gain * 10^(mag/2.5) * h * c) / (dit * surface * dispersion * wave) </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00600">600</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00609">609</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
</div>
</div>
@@ -328,7 +328,7 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated spectrum or NULL in error case </dd></dl>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00659">659</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00668">668</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
</div>
</div>
@@ -368,7 +368,7 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated SED or NULL in error case</dd></dl>
<p>wavelength in Angstroms SED in </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00762">762</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00773">773</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
</div>
</div>
@@ -409,9 +409,9 @@
<p>The table is loaded from the specified extension. If "all" is specified, all extension with the same columns as the first one are loaded and put together in the returned table.</p>
<p>The returned table must be de allocated with cpl_table_delete(). </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00186">186</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00195">195</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00492">irplib_stdstar_find_star()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00501">irplib_stdstar_find_star()</a>.</p>
</div>
</div>
@@ -465,9 +465,9 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if ok, -1 in error case</dd></dl>
<p>The stars that are within not further than dist from ra,dec are selected in the table. </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00339">339</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00348">348</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00492">irplib_stdstar_find_star()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00501">irplib_stdstar_find_star()</a>.</p>
</div>
</div>
@@ -507,18 +507,18 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if ok, -1 in error case</dd></dl>
<p>The stars whose magnitude in the mag band is known are selected in the table. </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00388">388</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00397">397</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00492">irplib_stdstar_find_star()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__stdstar_8c_source.html#l00501">irplib_stdstar_find_star()</a>.</p>
</div>
</div>
-<a class="anchor" id="ga1d798cc23ce72891460133af03ee21ba"></a><!-- doxytag: member="irplib_stdstar.c::irplib_stdstar_write_catalogs" ref="ga1d798cc23ce72891460133af03ee21ba" args="(cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *pro_type, const char *package_name, const char *ins_name, cpl_table *(*convert_ascii_table)(const char *))" -->
+<a class="anchor" id="gac18c92be3d3c96ba57804b074a2abb7d"></a><!-- doxytag: member="irplib_stdstar.c::irplib_stdstar_write_catalogs" ref="gac18c92be3d3c96ba57804b074a2abb7d" args="(cpl_frameset *set_in, const cpl_frameset *set_raw, const char *recipe_name, const char *pro_cat, const char *pro_type, const char *package_name, const char *ins_name, cpl_table *(*convert_ascii_table)(const char *))" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
- <td class="memname">int irplib_stdstar_write_catalogs </td>
+ <td class="memname">cpl_error_code irplib_stdstar_write_catalogs </td>
<td>(</td>
<td class="paramtype">cpl_frameset * </td>
<td class="paramname"> <em>set_in</em>, </td>
@@ -577,7 +577,7 @@
<p>Write the ASCII catalogs as FITS files. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>set_in</em> </td><td>Input frameset wher the product is registered </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>set_in</em> </td><td>Input frameset where the product is registered </td></tr>
<tr><td valign="top"></td><td valign="top"><em>set_raw</em> </td><td>Set of ASCII catalogs </td></tr>
<tr><td valign="top"></td><td valign="top"><em>recipe_name</em> </td><td>Recipe name </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pro_cat</em> </td><td>PRO.CATG </td></tr>
@@ -588,16 +588,16 @@
</table>
</dd>
</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>0 if ok, -1 in error case</dd></dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE if ok or else the relevant CPL error code</dd></dl>
<p>Every catalog will be written in a different extension, where EXTNAME is the name of the catalog ASCII file name.</p>
<p>The conversion ascii -> cpl_table is done by convert_ascii_table() and should be defined in each instrument </p>
-<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00078">78</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__stdstar_8c_source.html#l00089">89</a> of file <a class="el" href="irplib__stdstar_8c_source.html">irplib_stdstar.c</a>.</p>
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__strehl.html b/html/group__irplib__strehl.html
index 708215f..b5942e2 100644
--- a/html/group__irplib__strehl.html
+++ b/html/group__irplib__strehl.html
@@ -12,7 +12,7 @@
<h1>Functions to compute the Strehl</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__utils.html b/html/group__irplib__utils.html
index 8637cf9..84b0da0 100644
--- a/html/group__irplib__utils.html
+++ b/html/group__irplib__utils.html
@@ -49,8 +49,6 @@ int </td><td class="memItemRight" valign="bottom"><a class="el" href="group
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga804bfc739b5d55f9797ab881b1034ae4"></a><!-- doxytag: member="irplib_utils::irplib_isnan" ref="ga804bfc739b5d55f9797ab881b1034ae4" args="(double value)" -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4">irplib_isnan</a> (double value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">portable isnan <br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__utils.html#ga2dda571b0bbb3f7bf170210b38f95627">irplib_errorstate_warning</a> (unsigned self, unsigned first, unsigned last)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Dump a single CPL error. <a href="#ga2dda571b0bbb3f7bf170210b38f95627"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gac568c70a57ef8610f5fedc9f1943a3a1"></a><!-- doxytag: member="irplib_utils.c::irplib_apertures_find_max_flux" ref="gac568c70a57ef8610f5fedc9f1943a3a1" args="(const cpl_apertures *self, int *ind, int nfind)" -->
@@ -98,7 +96,7 @@ int </td><td class="memItemRight" valign="bottom"><a class="el" href="group
<p>The ind array must be able to hold (at least) nfind integers. On success the first nfind elements of ind point to indices of the aperture object.</p>
<p>To find the single ind of the aperture with the maximum flux use simply: int ind; irplib_apertures_find_max_flux(self, &ind, 1); </p>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01253">1253</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01254">1254</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
</div>
</div>
@@ -137,7 +135,7 @@ int </td><td class="memItemRight" valign="bottom"><a class="el" href="group
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if frame1!=frame2, 1 if frame1==frame2, -1 in error case </dd></dl>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01152">1152</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01153">1153</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
</div>
</div>
@@ -825,7 +823,7 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l00866">866</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
-<p>References <a class="el" href="irplib__utils_8c_source.html#l00357">irplib_dfs_save_table()</a>, and <a class="el" href="irplib__utils_8c_source.html#l00994">irplib_table_read_from_frameset()</a>.</p>
+<p>References <a class="el" href="irplib__utils_8c_source.html#l00357">irplib_dfs_save_table()</a>, and <a class="el" href="irplib__utils_8c_source.html#l00995">irplib_table_read_from_frameset()</a>.</p>
</div>
</div>
@@ -874,7 +872,7 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l00183">183</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01421">irplib_polynomial_find_1d_from_correlation_all()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01496">irplib_polynomial_find_1d_from_correlation_all()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
@@ -973,54 +971,6 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
</div>
</div>
-<a class="anchor" id="ga2dda571b0bbb3f7bf170210b38f95627"></a><!-- doxytag: member="irplib_utils.c::irplib_errorstate_warning" ref="ga2dda571b0bbb3f7bf170210b38f95627" args="(unsigned self, unsigned first, unsigned last)" -->
-<div class="memitem">
-<div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void irplib_errorstate_warning </td>
- <td>(</td>
- <td class="paramtype">unsigned </td>
- <td class="paramname"> <em>self</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned </td>
- <td class="paramname"> <em>first</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned </td>
- <td class="paramname"> <em>last</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
-</div>
-<div class="memdoc">
-
-<p>Dump a single CPL error. </p>
-<dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>self</em> </td><td>The number of the current error to be dumped </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>first</em> </td><td>The number of the first error to be dumped </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>last</em> </td><td>The number of the last error to be dumped </td></tr>
- </table>
- </dd>
-</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>
-<dl class="note"><dt><b>Note:</b></dt><dd>This function differs from cpl_errorstate_dump_one only in message level </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd>cpl_errorstate_dump_one </dd></dl>
-
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01334">1334</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
-
-</div>
-</div>
<a class="anchor" id="ga9fe4dca85dee68061114e26fdc72a134"></a><!-- doxytag: member="irplib_utils.c::irplib_frameset_find_file" ref="ga9fe4dca85dee68061114e26fdc72a134" args="(const cpl_frameset *self, const char *tag)" -->
<div class="memitem">
<div class="memproto">
@@ -1060,7 +1010,7 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
<p>NULL is returned and no error code set if the tag is not found.</p>
<p>If the file is not unique, the name of the first one is returned and with a warning. </p>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01188">1188</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01189">1189</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
</div>
</div>
@@ -1099,7 +1049,7 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The first frame belonging to the given group, or <code>NULL</code> if no such frame was found. The function returns <code>NULL</code> if an error occurs and sets the appropriate error code. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01219">1219</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01220">1220</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
</div>
</div>
@@ -1255,7 +1205,7 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
<p>The function should be called (during initialization) by any application using static memory facilities in IRPLIB.</p>
<p>Currently, this function does nothing. </p>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01139">1139</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l01140">1140</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
</div>
</div>
@@ -1345,14 +1295,14 @@ On success and iff header is non-NULL, it will be emptied and then filled with t
cpl_table_delete(<span class="keyword">self</span>);
</pre></div> </dd></dl>
-<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l00994">994</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__utils_8c_source.html#l00995">995</a> of file <a class="el" href="irplib__utils_8c_source.html">irplib_utils.c</a>.</p>
<p>Referenced by <a class="el" href="irplib__utils_8c_source.html#l00866">irplib_dfs_table_convert()</a>.</p>
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__wavecal.html b/html/group__irplib__wavecal.html
index b0a654c..9f4f948 100644
--- a/html/group__irplib__wavecal.html
+++ b/html/group__irplib__wavecal.html
@@ -15,28 +15,28 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Count the positive Y-entries in a given X-range. <a href="#ga03d7f038adc7e18e7a9071581fa47a25"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb">irplib_polynomial_fit_2d_dispersion</a> (cpl_polynomial *self, const cpl_image *imgwave, int fitdeg, double *presid)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fit a 2D-dispersion from an image of wavelengths. <a href="#ga2dd3251367e2ee8b8bd5ce080e9f31bb"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972">irplib_polynomial_find_1d_from_correlation</a> (cpl_polynomial *self, int maxdeg, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), double pixtol, double pixstep, int hsize, int max [...]
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Modify self by maximizing the cross-correlation. <a href="#gaaa889f20c9483965ff6bab186d4f9972"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974">irplib_vector_fill_line_spectrum</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga44aa21cb1fc1459ab3b360748a737974"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga631e29d63bc65109f458915b5d1c8bb9">irplib_vector_fill_logline_spectrum</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga631e29d63bc65109f458915b5d1c8bb9"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gae8e236a419dedc99eab52690f4a33901">irplib_vector_fill_line_spectrum_fast</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#gae8e236a419dedc99eab52690f4a33901"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gaa0000d5a34e290fc93dfcc936e631eb7">irplib_vector_fill_logline_spectrum_fast</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#gaa0000d5a34e290fc93dfcc936e631eb7"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga7eec8e48f4888aba01b98d9e0dc2acc5">irplib_plot_spectrum_and_model</a> (const cpl_vector *self, const cpl_polynomial *disp1d, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int))</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Plot a 1D spectrum and one from a model. <a href="#ga7eec8e48f4888aba01b98d9e0dc2acc5"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gae027096b411661b9584c72ab3e8e6547">irplib_bivector_find_shift_from_correlation</a> (cpl_bivector *self, const cpl_polynomial *disp, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), int hsize, cpl_boolean doplot, dou [...]
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Find shift(s) that maximizes (locally) the cross-correlation. <a href="#gae027096b411661b9584c72ab3e8e6547"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gabaec991ebc1b856766bf66768c4a6a19">irplib_polynomial_shift_1d_from_correlation</a> (cpl_polynomial *self, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), int hsize, cpl_boolean doplot, double *pxc)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Shift self by the amount that maximizes the cross-correlation. <a href="#gabaec991ebc1b856766bf66768c4a6a19"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33">irplib_vector_fill_line_spectrum_model</a> (cpl_vector *self, cpl_vector *linepix, cpl_vector *erftmp, const cpl_polynomial *disp, const cpl_bivector *lines, double wslit, double wfwhm, double xtrunc, int hsize, cpl_boolean dofast, cpl_boolean dolog, unsigned *pulines)</td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from (arc) lines and a dispersion relation. <a href="#ga0db5e24244f88b41627d5a385af81b33"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga8f49c4927c50a461288e8f19720dff86">irplib_polynomial_find_1d_from_correlation</a> (cpl_polynomial *self, int maxdeg, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), double pixtol, double pixstep, int hsize, int maxite, [...]
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Modify self by maximizing the cross-correlation. <a href="#ga8f49c4927c50a461288e8f19720dff86"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a">irplib_vector_fill_line_spectrum</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga1d49cb7f85fc246c8fdf38625c769f7a"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gad22539bf83d1b08d845ed5f618a4009f">irplib_vector_fill_logline_spectrum</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#gad22539bf83d1b08d845ed5f618a4009f"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga6a463d7816b4164fdd23a4df2805cc95">irplib_vector_fill_line_spectrum_fast</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga6a463d7816b4164fdd23a4df2805cc95"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga75a85320c74d1088eeaeec97974d793c">irplib_vector_fill_logline_spectrum_fast</a> (cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga75a85320c74d1088eeaeec97974d793c"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga7bac402a4e2c60f7646f1e655a66833d">irplib_plot_spectrum_and_model</a> (const cpl_vector *self, const cpl_polynomial *disp1d, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *))</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Plot a 1D spectrum and one from a model. <a href="#ga7bac402a4e2c60f7646f1e655a66833d"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga260740bf1f3fc364b301519eab3249a6">irplib_bivector_find_shift_from_correlation</a> (cpl_bivector *self, const cpl_polynomial *disp, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), int hsize, cpl_boolean doplot, double * [...]
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Find shift(s) that maximizes (locally) the cross-correlation. <a href="#ga260740bf1f3fc364b301519eab3249a6"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#gadf93655e2c7c0d5df23e2e3de66d0b56">irplib_polynomial_shift_1d_from_correlation</a> (cpl_polynomial *self, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), int hsize, cpl_boolean doplot, double *pxc)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Shift self by the amount that maximizes the cross-correlation. <a href="#gadf93655e2c7c0d5df23e2e3de66d0b56"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761">irplib_vector_fill_line_spectrum_model</a> (cpl_vector *self, cpl_vector *linepix, cpl_vector *erftmp, const cpl_polynomial *disp, const cpl_bivector *lines, double wslit, double wfwhm, double xtrunc, int hsize, cpl_boolean dofast, cpl_boolean dolog, cpl_size *pulines)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from (arc) lines and a dispersion relation. <a href="#ga8a65755ca17c9fa0b69ceb128f544761"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f">irplib_erf_antideriv</a> (double x, double sigma)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The antiderivative of erx(x/sigma/sqrt(2)) with respect to x. <a href="#ga2da9c21054a19322705de2d4f48d1d3f"></a><br/></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga0adf260c4d27fc50bc8b4cbcc0264a4e">irplib_polynomial_find_1d_from_correlation_all</a> (cpl_polynomial *self, int maxdeg, const cpl_vector *obs, int nmaxima, int linelim, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), double pixtol, doub [...]
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Modify self by maximizing the cross-correlation across all maxima. <a href="#ga0adf260c4d27fc50bc8b4cbcc0264a4e"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">cpl_error_code </td><td class="memItemRight" valign="bottom"><a class="el" href="group__irplib__wavecal.html#ga7e782bcb7ec0e638a93dba628916a7a8">irplib_polynomial_find_1d_from_correlation_all</a> (cpl_polynomial *self, int maxdeg, const cpl_vector *obs, int nmaxima, int linelim, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), double pixtol, double pi [...]
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Modify self by maximizing the cross-correlation across all maxima. <a href="#ga7e782bcb7ec0e638a93dba628916a7a8"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga03d7f038adc7e18e7a9071581fa47a25"></a><!-- doxytag: member="irplib_wavecal.c::irplib_bivector_count_positive" ref="ga03d7f038adc7e18e7a9071581fa47a25" args="(const cpl_bivector *self, double x_min, double x_max)" -->
@@ -81,11 +81,11 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of matching entries, or negative on error </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00115">115</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00127">127</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
</div>
</div>
-<a class="anchor" id="gae027096b411661b9584c72ab3e8e6547"></a><!-- doxytag: member="irplib_wavecal.c::irplib_bivector_find_shift_from_correlation" ref="gae027096b411661b9584c72ab3e8e6547" args="(cpl_bivector *self, const cpl_polynomial *disp, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), int hsize, cpl_boolean doplot, double *pxc)" -->
+<a class="anchor" id="ga260740bf1f3fc364b301519eab3249a6"></a><!-- doxytag: member="irplib_wavecal.c::irplib_bivector_find_shift_from_correlation" ref="ga260740bf1f3fc364b301519eab3249a6" args="(cpl_bivector *self, const cpl_polynomial *disp, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), int hsize, cpl_boolean doplot, double *pxc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -116,7 +116,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int) </td>
+ <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *) </td>
<td class="paramname"> <em>filler</em>, </td>
</tr>
<tr>
@@ -162,11 +162,12 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>On success, self will be resized to fit the number of shifts.</dd></dl>
-<p>The shifts are listed in order of decreasing cross-correlation. If pxc is non-NULL, *pxc will be set to the cross-correlation at shift 0. </p>
+<p>The shifts are listed in order of decreasing cross-correlation. If pxc is non-NULL, *pxc will be set to the cross-correlation at shift 0.</p>
+<p>The shifts may include the extrema -hsize and hsize. </p>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00704">704</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00759">759</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01421">irplib_polynomial_find_1d_from_correlation_all()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01496">irplib_polynomial_find_1d_from_correlation_all()</a>.</p>
</div>
</div>
@@ -206,13 +207,13 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>The antiderivative </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is even. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l01293">1293</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l01363">1363</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
-<a class="anchor" id="ga7eec8e48f4888aba01b98d9e0dc2acc5"></a><!-- doxytag: member="irplib_wavecal.c::irplib_plot_spectrum_and_model" ref="ga7eec8e48f4888aba01b98d9e0dc2acc5" args="(const cpl_vector *self, const cpl_polynomial *disp1d, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int))" -->
+<a class="anchor" id="ga7bac402a4e2c60f7646f1e655a66833d"></a><!-- doxytag: member="irplib_wavecal.c::irplib_plot_spectrum_and_model" ref="ga7bac402a4e2c60f7646f1e655a66833d" args="(const cpl_vector *self, const cpl_polynomial *disp1d, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *))" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -237,7 +238,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int) </td>
+ <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *) </td>
<td class="paramname"> <em>filler</em></td><td> </td>
</tr>
<tr>
@@ -260,15 +261,15 @@
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a> </dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a> </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00618">618</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00672">672</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01421">irplib_polynomial_find_1d_from_correlation_all()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01496">irplib_polynomial_find_1d_from_correlation_all()</a>.</p>
</div>
</div>
-<a class="anchor" id="gaaa889f20c9483965ff6bab186d4f9972"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_find_1d_from_correlation" ref="gaaa889f20c9483965ff6bab186d4f9972" args="(cpl_polynomial *self, int maxdeg, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), double pixtol, double pixstep, int hsize, int maxite, double *pxc)" -->
+<a class="anchor" id="ga8f49c4927c50a461288e8f19720dff86"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_find_1d_from_correlation" ref="ga8f49c4927c50a461288e8f19720dff86" args="(cpl_polynomial *self, int maxdeg, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), double pixtol, double pixstep, int hsize, int maxite, double *pxc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -299,7 +300,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int) </td>
+ <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *) </td>
<td class="paramname"> <em>filler</em>, </td>
</tr>
<tr>
@@ -360,13 +361,11 @@
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Fails with CPL_ERROR_UNSUPPORTED_MODE if compiled without GSL. self must be increasing in the interval from 1 to the length of obs. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00232">232</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l01421">irplib_polynomial_find_1d_from_correlation_all()</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00244">244</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
</div>
</div>
-<a class="anchor" id="ga0adf260c4d27fc50bc8b4cbcc0264a4e"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_find_1d_from_correlation_all" ref="ga0adf260c4d27fc50bc8b4cbcc0264a4e" args="(cpl_polynomial *self, int maxdeg, const cpl_vector *obs, int nmaxima, int linelim, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), double pixtol, double pixstep, int hsize, int maxite, int maxfail, int maxcont [...]
+<a class="anchor" id="ga7e782bcb7ec0e638a93dba628916a7a8"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_find_1d_from_correlation_all" ref="ga7e782bcb7ec0e638a93dba628916a7a8" args="(cpl_polynomial *self, int maxdeg, const cpl_vector *obs, int nmaxima, int linelim, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), double pixtol, double pixstep, int hsize, int maxite, int maxfail, int maxcont, cpl [...]
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -409,7 +408,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int) </td>
+ <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *) </td>
<td class="paramname"> <em>filler</em>, </td>
</tr>
<tr>
@@ -486,16 +485,16 @@
<tr><td valign="top"></td><td valign="top"><em>maxfail</em> </td><td>Number of retries on failure </td></tr>
<tr><td valign="top"></td><td valign="top"><em>maxcont</em> </td><td>Number of retries on non-convergence </td></tr>
<tr><td valign="top"></td><td valign="top"><em>doplot</em> </td><td>Plot the cross-correlation as a function of pixel shift </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>pxc</em> </td><td>On sucess, *pxc is the cross-correlation </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>pxc</em> </td><td>On success, *pxc is the cross-correlation </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Fails with CPL_ERROR_UNSUPPORTED_MODE if compiled without GSL. self must be increasing in the interval from 1 to the length of obs. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l01421">1421</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l01496">1496</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00704">irplib_bivector_find_shift_from_correlation()</a>, <a class="el" href="irplib__utils_8c_source.html#l00183">irplib_errorstate_dump_debug()</a>, <a class="el" href="irplib__wavecal_8c_source.html#l00618">irplib_plot_spectrum_and_model()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l00232">irplib_polynomial_find_1d_from_correlation()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00759">irplib_bivector_find_shift_from_correlation()</a>, <a class="el" href="irplib__utils_8c_source.html#l00183">irplib_errorstate_dump_debug()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l00672">irplib_plot_spectrum_and_model()</a>.</p>
</div>
</div>
@@ -548,11 +547,11 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00148">148</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00160">160</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
</div>
</div>
-<a class="anchor" id="gabaec991ebc1b856766bf66768c4a6a19"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_shift_1d_from_correlation" ref="gabaec991ebc1b856766bf66768c4a6a19" args="(cpl_polynomial *self, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int), int hsize, cpl_boolean doplot, double *pxc)" -->
+<a class="anchor" id="gadf93655e2c7c0d5df23e2e3de66d0b56"></a><!-- doxytag: member="irplib_wavecal.c::irplib_polynomial_shift_1d_from_correlation" ref="gadf93655e2c7c0d5df23e2e3de66d0b56" args="(cpl_polynomial *self, const cpl_vector *obs, irplib_base_spectrum_model *model, cpl_error_code(*filler)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *), int hsize, cpl_boolean doplot, double *pxc)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -577,7 +576,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *, int) </td>
+ <td class="paramtype">cpl_error_code(*)(cpl_vector *, const cpl_polynomial *, irplib_base_spectrum_model *) </td>
<td class="paramname"> <em>filler</em>, </td>
</tr>
<tr>
@@ -622,11 +621,11 @@
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00870">870</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00936">936</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
</div>
</div>
-<a class="anchor" id="ga44aa21cb1fc1459ab3b360748a737974"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum" ref="ga44aa21cb1fc1459ab3b360748a737974" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)" -->
+<a class="anchor" id="ga1d49cb7f85fc246c8fdf38625c769f7a"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum" ref="ga1d49cb7f85fc246c8fdf38625c769f7a" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -646,13 +645,7 @@
<td class="paramkey"></td>
<td></td>
<td class="paramtype">irplib_base_spectrum_model * </td>
- <td class="paramname"> <em>lsslamp</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>hsize</em></td><td> </td>
+ <td class="paramname"> <em>lsslamp</em></td><td> </td>
</tr>
<tr>
<td></td>
@@ -669,7 +662,6 @@
<tr><td valign="top"></td><td valign="top"><em>self</em> </td><td>Vector to fill with spectrum </td></tr>
<tr><td valign="top"></td><td valign="top"><em>disp</em> </td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>lsslamp</em> </td><td>Pointer to irplib_line_spectrum_model struct </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>hsize</em> </td><td>The 1st intensity in self will be disp(1-hsize), hsize >= 0 </td></tr>
</table>
</dd>
</dl>
@@ -683,17 +675,17 @@
cpl_vector * linepix; <span class="comment">// NULL, or temporary work-space of size</span>
<span class="comment">// equal to the lines bivector</span>
<span class="comment">// - should be uninitialized to zero</span>
- <span class="keywordtype">unsigned</span> cost; <span class="comment">// Will be incremented for each call</span>
- <span class="keywordtype">unsigned</span> xcost; <span class="comment">// Will be incremented for each OK call</span>
+ cpl_size cost; <span class="comment">// Will be incremented for each call</span>
+ cpl_size xcost; <span class="comment">// Will be incremented for each OK call</span>
</pre></div><p>The units of the X-values of the lines is assumed to be the same as that of disp, the units of wslit, wfwhm and xtrunc are assumed to be the same as the input unit of disp(), the units of self will be that of the Y-values of the lines. </p>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00433">433</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00494">494</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
-<a class="anchor" id="gae8e236a419dedc99eab52690f4a33901"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum_fast" ref="gae8e236a419dedc99eab52690f4a33901" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)" -->
+<a class="anchor" id="ga6a463d7816b4164fdd23a4df2805cc95"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum_fast" ref="ga6a463d7816b4164fdd23a4df2805cc95" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -713,13 +705,7 @@
<td class="paramkey"></td>
<td></td>
<td class="paramtype">irplib_base_spectrum_model * </td>
- <td class="paramname"> <em>lsslamp</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>hsize</em></td><td> </td>
+ <td class="paramname"> <em>lsslamp</em></td><td> </td>
</tr>
<tr>
<td></td>
@@ -736,21 +722,20 @@
<tr><td valign="top"></td><td valign="top"><em>self</em> </td><td>Vector to fill with spectrum </td></tr>
<tr><td valign="top"></td><td valign="top"><em>disp</em> </td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>lsslamp</em> </td><td>Pointer to irplib_line_spectrum_model struct </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>hsize</em> </td><td>The 1st intensity in self will be disp(1-hsize), hsize >= 0 </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a></dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a></dd></dl>
<p>Complexity reduced from O(nw) to O(n + w), where n is number of lines and truncation width [pixel] of the line. </p>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00528">528</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00585">585</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
-<a class="anchor" id="ga0db5e24244f88b41627d5a385af81b33"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum_model" ref="ga0db5e24244f88b41627d5a385af81b33" args="(cpl_vector *self, cpl_vector *linepix, cpl_vector *erftmp, const cpl_polynomial *disp, const cpl_bivector *lines, double wslit, double wfwhm, double xtrunc, int hsize, cpl_boolean dofast, cpl_boolean dolog, unsigned *pulines)" -->
+<a class="anchor" id="ga8a65755ca17c9fa0b69ceb128f544761"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_line_spectrum_model" ref="ga8a65755ca17c9fa0b69ceb128f544761" args="(cpl_vector *self, cpl_vector *linepix, cpl_vector *erftmp, const cpl_polynomial *disp, const cpl_bivector *lines, double wslit, double wfwhm, double xtrunc, int hsize, cpl_boolean dofast, cpl_boolean dolog, cpl_size *pulines)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -823,7 +808,7 @@
<tr>
<td class="paramkey"></td>
<td></td>
- <td class="paramtype">unsigned * </td>
+ <td class="paramtype">cpl_size * </td>
<td class="paramname"> <em>pulines</em></td><td> </td>
</tr>
<tr>
@@ -853,18 +838,18 @@
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a> </dd></dl>
-<dl class="note"><dt><b>Note:</b></dt><dd>This function is supposed to be called via <a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a>. </dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a> </dd></dl>
+<dl class="note"><dt><b>Note:</b></dt><dd>This function is supposed to be called via <a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum()</a>. </dd></dl>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00976">976</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l01046">1046</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01293">irplib_erf_antideriv()</a>, and <a class="el" href="irplib__utils_8c_source.html#l00183">irplib_errorstate_dump_debug()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01363">irplib_erf_antideriv()</a>, and <a class="el" href="irplib__utils_8c_source.html#l00183">irplib_errorstate_dump_debug()</a>.</p>
-<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l00433">irplib_vector_fill_line_spectrum()</a>, <a class="el" href="irplib__wavecal_8c_source.html#l00528">irplib_vector_fill_line_spectrum_fast()</a>, <a class="el" href="irplib__wavecal_8c_source.html#l00480">irplib_vector_fill_logline_spectrum()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l00575">irplib_vector_fill_logline_spectrum_fast()</a>.</p>
+<p>Referenced by <a class="el" href="irplib__wavecal_8c_source.html#l00494">irplib_vector_fill_line_spectrum()</a>, <a class="el" href="irplib__wavecal_8c_source.html#l00585">irplib_vector_fill_line_spectrum_fast()</a>, <a class="el" href="irplib__wavecal_8c_source.html#l00539">irplib_vector_fill_logline_spectrum()</a>, and <a class="el" href="irplib__wavecal_8c_source.html#l00630">irplib_vector_fill_logline_spectrum_fast()</a>.</p>
</div>
</div>
-<a class="anchor" id="ga631e29d63bc65109f458915b5d1c8bb9"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_logline_spectrum" ref="ga631e29d63bc65109f458915b5d1c8bb9" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)" -->
+<a class="anchor" id="gad22539bf83d1b08d845ed5f618a4009f"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_logline_spectrum" ref="gad22539bf83d1b08d845ed5f618a4009f" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -884,13 +869,7 @@
<td class="paramkey"></td>
<td></td>
<td class="paramtype">irplib_base_spectrum_model * </td>
- <td class="paramname"> <em>lsslamp</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>hsize</em></td><td> </td>
+ <td class="paramname"> <em>lsslamp</em></td><td> </td>
</tr>
<tr>
<td></td>
@@ -907,22 +886,21 @@
<tr><td valign="top"></td><td valign="top"><em>self</em> </td><td>Vector to fill with spectrum </td></tr>
<tr><td valign="top"></td><td valign="top"><em>disp</em> </td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>lsslamp</em> </td><td>Pointer to irplib_line_spectrum_model struct </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>hsize</em> </td><td>The 1st intensity in self will be disp(1-hsize), hsize >= 0 </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The logarithm is taken on the intensities </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a></dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a></dd></dl>
<p>log(1+I) is used for the (positive) intensities </p>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00480">480</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00539">539</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
-<a class="anchor" id="gaa0000d5a34e290fc93dfcc936e631eb7"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_logline_spectrum_fast" ref="gaa0000d5a34e290fc93dfcc936e631eb7" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp, int hsize)" -->
+<a class="anchor" id="ga75a85320c74d1088eeaeec97974d793c"></a><!-- doxytag: member="irplib_wavecal.c::irplib_vector_fill_logline_spectrum_fast" ref="ga75a85320c74d1088eeaeec97974d793c" args="(cpl_vector *self, const cpl_polynomial *disp, irplib_base_spectrum_model *lsslamp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
@@ -942,13 +920,7 @@
<td class="paramkey"></td>
<td></td>
<td class="paramtype">irplib_base_spectrum_model * </td>
- <td class="paramname"> <em>lsslamp</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>hsize</em></td><td> </td>
+ <td class="paramname"> <em>lsslamp</em></td><td> </td>
</tr>
<tr>
<td></td>
@@ -965,23 +937,22 @@
<tr><td valign="top"></td><td valign="top"><em>self</em> </td><td>Vector to fill with spectrum </td></tr>
<tr><td valign="top"></td><td valign="top"><em>disp</em> </td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>lsslamp</em> </td><td>Pointer to irplib_line_spectrum_model struct </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>hsize</em> </td><td>The 1st intensity in self will be disp(1-hsize), hsize >= 0 </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>CPL_ERROR_NONE on success, otherwise the relevant CPL error code </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The logarithm is taken on the intensities </dd></dl>
-<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#gae8e236a419dedc99eab52690f4a33901" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast()</a></dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__irplib__wavecal.html#ga6a463d7816b4164fdd23a4df2805cc95" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast()</a></dd></dl>
<p>log(1+I) is used for the (positive) intensities </p>
-<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00575">575</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
+<p>Definition at line <a class="el" href="irplib__wavecal_8c_source.html#l00630">630</a> of file <a class="el" href="irplib__wavecal_8c_source.html">irplib_wavecal.c</a>.</p>
-<p>References <a class="el" href="irplib__wavecal_8c_source.html#l00976">irplib_vector_fill_line_spectrum_model()</a>.</p>
+<p>References <a class="el" href="irplib__wavecal_8c_source.html#l01046">irplib_vector_fill_line_spectrum_model()</a>.</p>
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__wcs.html b/html/group__irplib__wcs.html
index bbcf879..06fab36 100644
--- a/html/group__irplib__wcs.html
+++ b/html/group__irplib__wcs.html
@@ -12,7 +12,7 @@
<h1>Functions related to WCS</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__irplib__wlxcorr.html b/html/group__irplib__wlxcorr.html
index f12f103..c577a09 100644
--- a/html/group__irplib__wlxcorr.html
+++ b/html/group__irplib__wlxcorr.html
@@ -14,7 +14,7 @@
<dl class="user"><dt><b>Synopsis:</b></dt><dd><div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "irplib_wlxcorr.h"</span>
</pre></div> </dd></dl>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__absolute.html b/html/group__sinfo__absolute.html
index f099a0f..db5acb1 100644
--- a/html/group__sinfo__absolute.html
+++ b/html/group__sinfo__absolute.html
@@ -12,7 +12,7 @@
<h1>Sinfo_absolute</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__absolute__utils.html b/html/group__sinfo__absolute__utils.html
index ba587b0..3038118 100644
--- a/html/group__sinfo__absolute__utils.html
+++ b/html/group__sinfo__absolute__utils.html
@@ -13,7 +13,7 @@
</table>
<p>of the slitlets out of an emission line frame </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__bad__pix__search.html b/html/group__sinfo__bad__pix__search.html
index dc478b6..7b5463e 100644
--- a/html/group__sinfo__bad__pix__search.html
+++ b/html/group__sinfo__bad__pix__search.html
@@ -144,7 +144,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__balance.html b/html/group__sinfo__balance.html
index dd39e85..86eda18 100644
--- a/html/group__sinfo__balance.html
+++ b/html/group__sinfo__balance.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__baryvel.html b/html/group__sinfo__baryvel.html
index 95ecd50..2f56738 100644
--- a/html/group__sinfo__baryvel.html
+++ b/html/group__sinfo__baryvel.html
@@ -14,7 +14,7 @@
<p>Compute barycentric, heliocentric velocity corrections</p>
<p>The code in this source file is a 1-to-1 translation of MIDAS COMPUT/BARYCOR as defined in /prim/general/src/compxy.for (only the necessary parts were translated). The code is not meant to be particularly readable/maintainable. To understand the computation the best starting point is probably P. Stumpff, A&A Suppl. Ser. 41, pp. 1-8 (1980) </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__boltzmann.html b/html/group__sinfo__boltzmann.html
index b2ffaf7..4dd0a5c 100644
--- a/html/group__sinfo__boltzmann.html
+++ b/html/group__sinfo__boltzmann.html
@@ -443,7 +443,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__coltilt.html b/html/group__sinfo__coltilt.html
index 4c4bf31..e689eb7 100644
--- a/html/group__sinfo__coltilt.html
+++ b/html/group__sinfo__coltilt.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__companion.html b/html/group__sinfo__companion.html
index dd39e85..86eda18 100644
--- a/html/group__sinfo__companion.html
+++ b/html/group__sinfo__companion.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__cube__construct.html b/html/group__sinfo__cube__construct.html
index a2b099a..9b4a8bd 100644
--- a/html/group__sinfo__cube__construct.html
+++ b/html/group__sinfo__cube__construct.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__dark__cfg.html b/html/group__sinfo__dark__cfg.html
index f3530f3..d549889 100644
--- a/html/group__sinfo__dark__cfg.html
+++ b/html/group__sinfo__dark__cfg.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__detlin.html b/html/group__sinfo__detlin.html
index 381c5ca..88e9aaa 100644
--- a/html/group__sinfo__detlin.html
+++ b/html/group__sinfo__detlin.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__dfs.html b/html/group__sinfo__dfs.html
index 5d95b56..5636dad 100644
--- a/html/group__sinfo__dfs.html
+++ b/html/group__sinfo__dfs.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__distortion.html b/html/group__sinfo__distortion.html
index c6ce3a7..bac104a 100644
--- a/html/group__sinfo__distortion.html
+++ b/html/group__sinfo__distortion.html
@@ -12,7 +12,7 @@
<h1>Distortion correction functions</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__dump.html b/html/group__sinfo__dump.html
index a47ad78..6fd0c9e 100644
--- a/html/group__sinfo__dump.html
+++ b/html/group__sinfo__dump.html
@@ -13,7 +13,7 @@
</table>
<p>Functions that enables dumping (using CPL's messaging system) some otherwise non-dumpable CPL objects </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__error.html b/html/group__sinfo__error.html
index fed9bad..252db5a 100644
--- a/html/group__sinfo__error.html
+++ b/html/group__sinfo__error.html
@@ -227,7 +227,7 @@
n = -3;
}
</pre></div> </div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__finddist__cfg.html b/html/group__sinfo__finddist__cfg.html
index 7238758..e0a5e36 100644
--- a/html/group__sinfo__finddist__cfg.html
+++ b/html/group__sinfo__finddist__cfg.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__fit.html b/html/group__sinfo__fit.html
index 40cfa90..5eadac2 100644
--- a/html/group__sinfo__fit.html
+++ b/html/group__sinfo__fit.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__flat__cfg.html b/html/group__sinfo__flat__cfg.html
index d5850a4..4ef0dc9 100644
--- a/html/group__sinfo__flat__cfg.html
+++ b/html/group__sinfo__flat__cfg.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__flat__ini__file.html b/html/group__sinfo__flat__ini__file.html
index d5850a4..4ef0dc9 100644
--- a/html/group__sinfo__flat__ini__file.html
+++ b/html/group__sinfo__flat__ini__file.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__focus.html b/html/group__sinfo__focus.html
index 8957c58..4acc716 100644
--- a/html/group__sinfo__focus.html
+++ b/html/group__sinfo__focus.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__function__1d.html b/html/group__sinfo__function__1d.html
index dda7f8d..3e4286e 100644
--- a/html/group__sinfo__function__1d.html
+++ b/html/group__sinfo__function__1d.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__globals.html b/html/group__sinfo__globals.html
index d3166e6..fa03c46 100644
--- a/html/group__sinfo__globals.html
+++ b/html/group__sinfo__globals.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__image__ops.html b/html/group__sinfo__image__ops.html
index 967de7e..4ce851a 100644
--- a/html/group__sinfo__image__ops.html
+++ b/html/group__sinfo__image__ops.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__img__noise.html b/html/group__sinfo__img__noise.html
index 02f10b0..91e20b8 100644
--- a/html/group__sinfo__img__noise.html
+++ b/html/group__sinfo__img__noise.html
@@ -12,7 +12,7 @@
<h1>Recipe to determine detector noise</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__lamp__cfg.html b/html/group__sinfo__lamp__cfg.html
index 0fcca12..a757be2 100644
--- a/html/group__sinfo__lamp__cfg.html
+++ b/html/group__sinfo__lamp__cfg.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__lamp__spec__config.html b/html/group__sinfo__lamp__spec__config.html
index bfb0ad5..3c19a8a 100644
--- a/html/group__sinfo__lamp__spec__config.html
+++ b/html/group__sinfo__lamp__spec__config.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__msg.html b/html/group__sinfo__msg.html
index 892ee97..404103a 100644
--- a/html/group__sinfo__msg.html
+++ b/html/group__sinfo__msg.html
@@ -544,7 +544,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__new__bezier.html b/html/group__sinfo__new__bezier.html
index cb4fdb9..491ffdf 100644
--- a/html/group__sinfo__new__bezier.html
+++ b/html/group__sinfo__new__bezier.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__new__cube__ops.html b/html/group__sinfo__new__cube__ops.html
index 22d2397..bf1357e 100644
--- a/html/group__sinfo__new__cube__ops.html
+++ b/html/group__sinfo__new__cube__ops.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__new__resampling.html b/html/group__sinfo__new__resampling.html
index 750426d..04f5ae6 100644
--- a/html/group__sinfo__new__resampling.html
+++ b/html/group__sinfo__new__resampling.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__new__slit__pos.html b/html/group__sinfo__new__slit__pos.html
index 6214985..f2169be 100644
--- a/html/group__sinfo__new__slit__pos.html
+++ b/html/group__sinfo__new__slit__pos.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__pfits.html b/html/group__sinfo__pfits.html
index 9673799..6278764 100644
--- a/html/group__sinfo__pfits.html
+++ b/html/group__sinfo__pfits.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__pro__save.html b/html/group__sinfo__pro__save.html
index 3a9af5a..c6a26ed 100644
--- a/html/group__sinfo__pro__save.html
+++ b/html/group__sinfo__pro__save.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__produc__config.html b/html/group__sinfo__produc__config.html
index 5c3b0f5..fd635a2 100644
--- a/html/group__sinfo__produc__config.html
+++ b/html/group__sinfo__produc__config.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__qr__companion.html b/html/group__sinfo__qr__companion.html
index 5cc7de2..a48ace3 100644
--- a/html/group__sinfo__qr__companion.html
+++ b/html/group__sinfo__qr__companion.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__detlin.html b/html/group__sinfo__rec__detlin.html
index 9bcbea3..d66d2f5 100644
--- a/html/group__sinfo__rec__detlin.html
+++ b/html/group__sinfo__rec__detlin.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__distortion.html b/html/group__sinfo__rec__distortion.html
index 93d9c3f..469f93b 100644
--- a/html/group__sinfo__rec__distortion.html
+++ b/html/group__sinfo__rec__distortion.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__jitter.html b/html/group__sinfo__rec__jitter.html
index 5467e85..ae37d1f 100644
--- a/html/group__sinfo__rec__jitter.html
+++ b/html/group__sinfo__rec__jitter.html
@@ -50,7 +50,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__lingain.html b/html/group__sinfo__rec__lingain.html
index 18b7cc0..adb3395 100644
--- a/html/group__sinfo__rec__lingain.html
+++ b/html/group__sinfo__rec__lingain.html
@@ -12,7 +12,7 @@
<h1>Recipe to monitor detector's linearity and gain</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__mdark.html b/html/group__sinfo__rec__mdark.html
index 1998d5a..bd356f3 100644
--- a/html/group__sinfo__rec__mdark.html
+++ b/html/group__sinfo__rec__mdark.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__mflat.html b/html/group__sinfo__rec__mflat.html
index 087edaa..bf47134 100644
--- a/html/group__sinfo__rec__mflat.html
+++ b/html/group__sinfo__rec__mflat.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__objnod.html b/html/group__sinfo__rec__objnod.html
index 414dd7a..bc90886 100644
--- a/html/group__sinfo__rec__objnod.html
+++ b/html/group__sinfo__rec__objnod.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__psf.html b/html/group__sinfo__rec__psf.html
index 6fde724..68007f0 100644
--- a/html/group__sinfo__rec__psf.html
+++ b/html/group__sinfo__rec__psf.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__pupil.html b/html/group__sinfo__rec__pupil.html
index efedbbe..bb13f7c 100644
--- a/html/group__sinfo__rec__pupil.html
+++ b/html/group__sinfo__rec__pupil.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__stdstar.html b/html/group__sinfo__rec__stdstar.html
index a63e714..0e6dfbb 100644
--- a/html/group__sinfo__rec__stdstar.html
+++ b/html/group__sinfo__rec__stdstar.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__utils.html b/html/group__sinfo__rec__utils.html
index dde84b5..0fb64f5 100644
--- a/html/group__sinfo__rec__utils.html
+++ b/html/group__sinfo__rec__utils.html
@@ -12,7 +12,7 @@
<h1>Recipe utilities</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__rec__wavecal.html b/html/group__sinfo__rec__wavecal.html
index 7e58644..6c3481f 100644
--- a/html/group__sinfo__rec__wavecal.html
+++ b/html/group__sinfo__rec__wavecal.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__recipes.html b/html/group__sinfo__recipes.html
index 0ae7627..e92faa4 100644
--- a/html/group__sinfo__recipes.html
+++ b/html/group__sinfo__recipes.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__remove__crh__single.html b/html/group__sinfo__remove__crh__single.html
index ad01cb7..7bb3210 100644
--- a/html/group__sinfo__remove__crh__single.html
+++ b/html/group__sinfo__remove__crh__single.html
@@ -13,7 +13,7 @@
</table>
<p>Suppress Cosmic Rays by analysing on files </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__shift__images.html b/html/group__sinfo__shift__images.html
index 742a564..8ad6445 100644
--- a/html/group__sinfo__shift__images.html
+++ b/html/group__sinfo__shift__images.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__skycor__config.html b/html/group__sinfo__skycor__config.html
index 0103c80..e23ae6b 100644
--- a/html/group__sinfo__skycor__config.html
+++ b/html/group__sinfo__skycor__config.html
@@ -14,7 +14,7 @@
<p>parameters</p>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__spectrum__ops.html b/html/group__sinfo__spectrum__ops.html
index 80cf663..501d6b1 100644
--- a/html/group__sinfo__spectrum__ops.html
+++ b/html/group__sinfo__spectrum__ops.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__step__distortion.html b/html/group__sinfo__step__distortion.html
index c1f78d4..adb58ed 100644
--- a/html/group__sinfo__step__distortion.html
+++ b/html/group__sinfo__step__distortion.html
@@ -12,7 +12,7 @@
<h1>Recipe to compute optical distortions</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__step__jitter.html b/html/group__sinfo__step__jitter.html
index 4e8acfa..778e141 100644
--- a/html/group__sinfo__step__jitter.html
+++ b/html/group__sinfo__step__jitter.html
@@ -12,7 +12,7 @@
<h1>Recipe to reduce science, PSF or telluric standard data</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__step__objnod.html b/html/group__sinfo__step__objnod.html
index d2b9a08..91a643c 100644
--- a/html/group__sinfo__step__objnod.html
+++ b/html/group__sinfo__step__objnod.html
@@ -12,7 +12,7 @@
<h1>Recipe to reduce science data</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__step__psf.html b/html/group__sinfo__step__psf.html
index a46b158..24452ee 100644
--- a/html/group__sinfo__step__psf.html
+++ b/html/group__sinfo__step__psf.html
@@ -12,7 +12,7 @@
<h1>Recipe to reduce PSF data</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__step__stdstar.html b/html/group__sinfo__step__stdstar.html
index a19f7c1..185a4b8 100644
--- a/html/group__sinfo__step__stdstar.html
+++ b/html/group__sinfo__step__stdstar.html
@@ -12,7 +12,7 @@
<h1>Recipe to reduce telluric standard data</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__tilt__cfg.html b/html/group__sinfo__tilt__cfg.html
index e801edd..dfd4d12 100644
--- a/html/group__sinfo__tilt__cfg.html
+++ b/html/group__sinfo__tilt__cfg.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__time.html b/html/group__sinfo__time.html
index 66e4aee..27bb244 100644
--- a/html/group__sinfo__time.html
+++ b/html/group__sinfo__time.html
@@ -13,7 +13,7 @@
</table>
<p>This module contains various utilities to get the current date/time, and possibly format it according to the ISO 8601 format. </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__tpl__dfs.html b/html/group__sinfo__tpl__dfs.html
index a002b70..fd60be9 100644
--- a/html/group__sinfo__tpl__dfs.html
+++ b/html/group__sinfo__tpl__dfs.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__tpl__utils.html b/html/group__sinfo__tpl__utils.html
index 94aaa6f..4a4e986 100644
--- a/html/group__sinfo__tpl__utils.html
+++ b/html/group__sinfo__tpl__utils.html
@@ -12,7 +12,7 @@
<h1>Miscellaneous Utilities</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utilities.html b/html/group__sinfo__utilities.html
index b00efca..041bdd6 100644
--- a/html/group__sinfo__utilities.html
+++ b/html/group__sinfo__utilities.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utils.html b/html/group__sinfo__utils.html
index 2048a32..e56e21c 100644
--- a/html/group__sinfo__utils.html
+++ b/html/group__sinfo__utils.html
@@ -13,7 +13,7 @@
</table>
<p>This module contains various functions that are shared between multiple recipes </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utils__wrappers.html b/html/group__sinfo__utils__wrappers.html
index 3a7116f..7bc298a 100644
--- a/html/group__sinfo__utils__wrappers.html
+++ b/html/group__sinfo__utils__wrappers.html
@@ -13,7 +13,7 @@
</table>
<p>This module contains wrapper functions, convenience functions and simple extensions of CPL functions. </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__bp__mask__add.html b/html/group__sinfo__utl__bp__mask__add.html
index d9c2e1f..f8a67cd 100644
--- a/html/group__sinfo__utl__bp__mask__add.html
+++ b/html/group__sinfo__utl__bp__mask__add.html
@@ -12,7 +12,7 @@
<h1>Recipe to coadd bad pixel masks</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube2ima.html b/html/group__sinfo__utl__cube2ima.html
index adc9848..f950e4f 100644
--- a/html/group__sinfo__utl__cube2ima.html
+++ b/html/group__sinfo__utl__cube2ima.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube2spectrum.html b/html/group__sinfo__utl__cube2spectrum.html
index e9a0bd5..02db0d8 100644
--- a/html/group__sinfo__utl__cube2spectrum.html
+++ b/html/group__sinfo__utl__cube2spectrum.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube__arith.html b/html/group__sinfo__utl__cube__arith.html
index 74c174a..e604ee1 100644
--- a/html/group__sinfo__utl__cube__arith.html
+++ b/html/group__sinfo__utl__cube__arith.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube__combine.html b/html/group__sinfo__utl__cube__combine.html
index f41f954..29b8e90 100644
--- a/html/group__sinfo__utl__cube__combine.html
+++ b/html/group__sinfo__utl__cube__combine.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube__create.html b/html/group__sinfo__utl__cube__create.html
index 7fde6e7..82c1a6b 100644
--- a/html/group__sinfo__utl__cube__create.html
+++ b/html/group__sinfo__utl__cube__create.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__cube__test.html b/html/group__sinfo__utl__cube__test.html
index 12832aa..88ed8fc 100644
--- a/html/group__sinfo__utl__cube__test.html
+++ b/html/group__sinfo__utl__cube__test.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__eff.html b/html/group__sinfo__utl__eff.html
index bbff618..8b8bfd1 100644
--- a/html/group__sinfo__utl__eff.html
+++ b/html/group__sinfo__utl__eff.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__illumcorr.html b/html/group__sinfo__utl__illumcorr.html
index 9bc35d3..b06b547 100644
--- a/html/group__sinfo__utl__illumcorr.html
+++ b/html/group__sinfo__utl__illumcorr.html
@@ -13,7 +13,7 @@
</table>
<p>disomogeneities </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__ima__arith.html b/html/group__sinfo__utl__ima__arith.html
index 0ea2f91..be46f1e 100644
--- a/html/group__sinfo__utl__ima__arith.html
+++ b/html/group__sinfo__utl__ima__arith.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__ima__cube__ks__test.html b/html/group__sinfo__utl__ima__cube__ks__test.html
index cdcbb6d..f8bb626 100644
--- a/html/group__sinfo__utl__ima__cube__ks__test.html
+++ b/html/group__sinfo__utl__ima__cube__ks__test.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__ima__gauss.html b/html/group__sinfo__utl__ima__gauss.html
index c83a148..e5cd7f8 100644
--- a/html/group__sinfo__utl__ima__gauss.html
+++ b/html/group__sinfo__utl__ima__gauss.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__ima__line__corr.html b/html/group__sinfo__utl__ima__line__corr.html
index 69722cc..fba2025 100644
--- a/html/group__sinfo__utl__ima__line__corr.html
+++ b/html/group__sinfo__utl__ima__line__corr.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__remove__crh__single.html b/html/group__sinfo__utl__remove__crh__single.html
index 9a80232..300e143 100644
--- a/html/group__sinfo__utl__remove__crh__single.html
+++ b/html/group__sinfo__utl__remove__crh__single.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__skycor.html b/html/group__sinfo__utl__skycor.html
index b7b9214..798611a 100644
--- a/html/group__sinfo__utl__skycor.html
+++ b/html/group__sinfo__utl__skycor.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__skymap.html b/html/group__sinfo__utl__skymap.html
index 2df0e53..929eca9 100644
--- a/html/group__sinfo__utl__skymap.html
+++ b/html/group__sinfo__utl__skymap.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__spectrum__divide__by__blackbody.html b/html/group__sinfo__utl__spectrum__divide__by__blackbody.html
index 3095eeb..7563216 100644
--- a/html/group__sinfo__utl__spectrum__divide__by__blackbody.html
+++ b/html/group__sinfo__utl__spectrum__divide__by__blackbody.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__spectrum__wavelength__shift.html b/html/group__sinfo__utl__spectrum__wavelength__shift.html
index 71b9415..4fb68a9 100644
--- a/html/group__sinfo__utl__spectrum__wavelength__shift.html
+++ b/html/group__sinfo__utl__spectrum__wavelength__shift.html
@@ -48,7 +48,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__stdstars.html b/html/group__sinfo__utl__stdstars.html
index b878ad2..78661e8 100644
--- a/html/group__sinfo__utl__stdstars.html
+++ b/html/group__sinfo__utl__stdstars.html
@@ -12,7 +12,7 @@
<h1>Recipe to generate standard stars catalogs</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__table__ex.html b/html/group__sinfo__utl__table__ex.html
index 15b6155..f413789 100644
--- a/html/group__sinfo__utl__table__ex.html
+++ b/html/group__sinfo__utl__table__ex.html
@@ -46,7 +46,7 @@
</div>
</div>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__sinfo__utl__table__test.html b/html/group__sinfo__utl__table__test.html
index 029a842..95abc24 100644
--- a/html/group__sinfo__utl__table__test.html
+++ b/html/group__sinfo__utl__table__test.html
@@ -12,7 +12,7 @@
<h1>Utility to test column table shift</h1><table border="0" cellpadding="0" cellspacing="0">
</table>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/group__spiffi__general__config.html b/html/group__spiffi__general__config.html
index 881fc5f..a07545c 100644
--- a/html/group__spiffi__general__config.html
+++ b/html/group__spiffi__general__config.html
@@ -13,7 +13,7 @@
</table>
<p>TBD </p>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/index.html b/html/index.html
index c12a6d3..4f8c63a 100644
--- a/html/index.html
+++ b/html/index.html
@@ -9,14 +9,14 @@
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="contents">
-<h1>SINFONI Pipeline Reference Manual Documentation</h1><h3>2.3.2 </h3><ul> <li><a href="index.html"><span>Main Page</span></a></li>
+<h1>SINFONI Pipeline Reference Manual Documentation</h1><h3>2.3.3 </h3><ul> <li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<ul> <li><a href="files.html"><span>File List</span></a></li>
</ul>
</ul>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__calib_8c_source.html b/html/irplib__calib_8c_source.html
index 5263455..a100a20 100644
--- a/html/irplib__calib_8c_source.html
+++ b/html/irplib__calib_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_calib.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_calib.c,v 1.17 2009/02/17 08:05:25 amodigli Exp $</span>
+<h1>irplib_calib.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_calib.c,v 1.19 2013/03/01 10:26:22 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/02/17 08:05:25 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.17 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/03/01 10:26:22 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.19 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -58,533 +58,545 @@
<a name="l00048"></a>00048 <span class="keywordtype">double</span>* clean_mean,
<a name="l00049"></a>00049 <span class="keywordtype">double</span>* clean_stdev);
<a name="l00050"></a>00050
-<a name="l00051"></a>00051 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_dit(<span class="keyword">const</span> cpl_propertylist * plist);
-<a name="l00052"></a>00052 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_exp_time(<span class="keyword">const</span> cpl_propertylist* plist);
-<a name="l00053"></a>00053 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00057"></a>00057 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00058"></a>00058
-<a name="l00060"></a>00060 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00067"></a>00067 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00068"></a>00068 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_dit(<span class="keyword">const</span> cpl_propertylist * plist)
-<a name="l00069"></a>00069 {
-<a name="l00070"></a>00070 <span class="keywordflow">return</span> cpl_propertylist_get_double(plist,<span class="stringliteral">"ESO DET DIT"</span>);
-<a name="l00071"></a>00071 }
-<a name="l00072"></a>00072
-<a name="l00073"></a>00073 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00051"></a>00051 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00052"></a>00052 <span class="comment"> Defines</span>
+<a name="l00053"></a>00053 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00054"></a>00054
+<a name="l00055"></a>00055 <span class="preprocessor">#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(6, 3, 0)</span>
+<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_FRAMESET_GET cpl_frameset_get_position</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="comment">/* Remove this branch once CPL versions less than 6.3 are no longer supported */</span>
+<a name="l00059"></a>00059 <span class="preprocessor">#define IRPLIB_FRAMESET_GET cpl_frameset_get_frame</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span>
+<a name="l00062"></a>00062
+<a name="l00063"></a>00063 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_dit(<span class="keyword">const</span> cpl_propertylist * plist);
+<a name="l00064"></a>00064 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_exp_time(<span class="keyword">const</span> cpl_propertylist* plist);
+<a name="l00065"></a>00065 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00069"></a>00069 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00070"></a>00070
+<a name="l00072"></a>00072 <span class="comment">/*---------------------------------------------------------------------------*/</span>
<a name="l00079"></a>00079 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00080"></a>00080 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_exp_time(<span class="keyword">const</span> cpl_propertylist* plist)
+<a name="l00080"></a>00080 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_dit(<span class="keyword">const</span> cpl_propertylist * plist)
<a name="l00081"></a>00081 {
-<a name="l00082"></a>00082
-<a name="l00083"></a>00083 <span class="keywordflow">return</span> cpl_propertylist_get_double(plist,<span class="stringliteral">"EXPTIME"</span>);
+<a name="l00082"></a>00082 <span class="keywordflow">return</span> cpl_propertylist_get_double(plist,<span class="stringliteral">"ESO DET DIT"</span>);
+<a name="l00083"></a>00083 }
<a name="l00084"></a>00084
-<a name="l00085"></a>00085 }
-<a name="l00086"></a>00086
-<a name="l00087"></a>00087
-<a name="l00103"></a>00103 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00104"></a>00104 irplib_get_clean_mean_window(cpl_image* img,
-<a name="l00105"></a>00105 <span class="keyword">const</span> <span class="keywordtype">int</span> llx,
-<a name="l00106"></a>00106 <span class="keyword">const</span> <span class="keywordtype">int</span> lly,
-<a name="l00107"></a>00107 <span class="keyword">const</span> <span class="keywordtype">int</span> urx, <span class="keywordtype">int</span> ury,
-<a name="l00108"></a>00108 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa,
-<a name="l00109"></a>00109 <span class="keyword">const</span> <span class="keywordtype">int</span> nclip,
-<a name="l00110"></a>00110 <span class="keywordtype">double</span>* clean_mean,
-<a name="l00111"></a>00111 <span class="keywordtype">double</span>* clean_stdev)
-<a name="l00112"></a>00112 {
-<a name="l00113"></a>00113
-<a name="l00114"></a>00114
-<a name="l00115"></a>00115 <span class="keywordtype">double</span> mean=0;
-<a name="l00116"></a>00116 <span class="keywordtype">double</span> stdev=0;
-<a name="l00117"></a>00117 <span class="keywordtype">double</span> threshold=0;
-<a name="l00118"></a>00118 <span class="keywordtype">double</span> lo_cut=0;
-<a name="l00119"></a>00119 <span class="keywordtype">double</span> hi_cut=0;
-<a name="l00120"></a>00120 cpl_mask* mask=NULL;
-<a name="l00121"></a>00121 cpl_image* tmp=NULL;
-<a name="l00122"></a>00122 cpl_stats* stats=NULL;
-<a name="l00123"></a>00123 <span class="keywordtype">int</span> i=0;
-<a name="l00124"></a>00124
-<a name="l00125"></a>00125 tmp=cpl_image_extract(img,llx,lly,urx,ury);
-<a name="l00126"></a>00126 cpl_image_accept_all(tmp);
-<a name="l00127"></a>00127 <span class="keywordflow">for</span>(i=0;i<nclip;i++) {
-<a name="l00128"></a>00128
-<a name="l00129"></a>00129
-<a name="l00130"></a>00130 cpl_stats_delete(stats);
-<a name="l00131"></a>00131 stats = cpl_stats_new_from_image(tmp, CPL_STATS_MEAN | CPL_STATS_STDEV);
-<a name="l00132"></a>00132 mean = cpl_stats_get_mean(stats);
-<a name="l00133"></a>00133 stdev = cpl_stats_get_stdev(stats);
-<a name="l00134"></a>00134
-<a name="l00135"></a>00135 threshold=kappa*stdev;
-<a name="l00136"></a>00136 lo_cut=mean-threshold;
-<a name="l00137"></a>00137 hi_cut=mean+threshold;
-<a name="l00138"></a>00138
-<a name="l00139"></a>00139 cpl_image_accept_all(tmp);
-<a name="l00140"></a>00140 mask=cpl_mask_threshold_image_create(tmp,lo_cut,hi_cut);
+<a name="l00085"></a>00085 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00091"></a>00091 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00092"></a>00092 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_pfits_get_exp_time(<span class="keyword">const</span> cpl_propertylist* plist)
+<a name="l00093"></a>00093 {
+<a name="l00094"></a>00094
+<a name="l00095"></a>00095 <span class="keywordflow">return</span> cpl_propertylist_get_double(plist,<span class="stringliteral">"EXPTIME"</span>);
+<a name="l00096"></a>00096
+<a name="l00097"></a>00097 }
+<a name="l00098"></a>00098
+<a name="l00099"></a>00099
+<a name="l00115"></a>00115 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00116"></a>00116 irplib_get_clean_mean_window(cpl_image* img,
+<a name="l00117"></a>00117 <span class="keyword">const</span> <span class="keywordtype">int</span> llx,
+<a name="l00118"></a>00118 <span class="keyword">const</span> <span class="keywordtype">int</span> lly,
+<a name="l00119"></a>00119 <span class="keyword">const</span> <span class="keywordtype">int</span> urx, <span class="keywordtype">int</span> ury,
+<a name="l00120"></a>00120 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa,
+<a name="l00121"></a>00121 <span class="keyword">const</span> <span class="keywordtype">int</span> nclip,
+<a name="l00122"></a>00122 <span class="keywordtype">double</span>* clean_mean,
+<a name="l00123"></a>00123 <span class="keywordtype">double</span>* clean_stdev)
+<a name="l00124"></a>00124 {
+<a name="l00125"></a>00125
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 <span class="keywordtype">double</span> mean=0;
+<a name="l00128"></a>00128 <span class="keywordtype">double</span> stdev=0;
+<a name="l00129"></a>00129 <span class="keywordtype">double</span> threshold=0;
+<a name="l00130"></a>00130 <span class="keywordtype">double</span> lo_cut=0;
+<a name="l00131"></a>00131 <span class="keywordtype">double</span> hi_cut=0;
+<a name="l00132"></a>00132 cpl_mask* mask=NULL;
+<a name="l00133"></a>00133 cpl_image* tmp=NULL;
+<a name="l00134"></a>00134 cpl_stats* stats=NULL;
+<a name="l00135"></a>00135 <span class="keywordtype">int</span> i=0;
+<a name="l00136"></a>00136
+<a name="l00137"></a>00137 tmp=cpl_image_extract(img,llx,lly,urx,ury);
+<a name="l00138"></a>00138 cpl_image_accept_all(tmp);
+<a name="l00139"></a>00139 <span class="keywordflow">for</span>(i=0;i<nclip;i++) {
+<a name="l00140"></a>00140
<a name="l00141"></a>00141
-<a name="l00142"></a>00142 cpl_mask_not(mask);
-<a name="l00143"></a>00143 cpl_image_reject_from_mask(tmp,mask);
-<a name="l00144"></a>00144 cpl_mask_delete(mask);
-<a name="l00145"></a>00145
+<a name="l00142"></a>00142 cpl_stats_delete(stats);
+<a name="l00143"></a>00143 stats = cpl_stats_new_from_image(tmp, CPL_STATS_MEAN | CPL_STATS_STDEV);
+<a name="l00144"></a>00144 mean = cpl_stats_get_mean(stats);
+<a name="l00145"></a>00145 stdev = cpl_stats_get_stdev(stats);
<a name="l00146"></a>00146
-<a name="l00147"></a>00147 }
-<a name="l00148"></a>00148 *clean_mean=mean;
-<a name="l00149"></a>00149 *clean_stdev=stdev;
-<a name="l00150"></a>00150 cpl_image_delete(tmp);
-<a name="l00151"></a>00151 cpl_stats_delete(stats);
-<a name="l00152"></a>00152
-<a name="l00153"></a>00153 <span class="keywordflow">return</span> 0;
-<a name="l00154"></a>00154
-<a name="l00155"></a>00155
-<a name="l00156"></a>00156 }
+<a name="l00147"></a>00147 threshold=kappa*stdev;
+<a name="l00148"></a>00148 lo_cut=mean-threshold;
+<a name="l00149"></a>00149 hi_cut=mean+threshold;
+<a name="l00150"></a>00150
+<a name="l00151"></a>00151 cpl_image_accept_all(tmp);
+<a name="l00152"></a>00152 mask=cpl_mask_threshold_image_create(tmp,lo_cut,hi_cut);
+<a name="l00153"></a>00153
+<a name="l00154"></a>00154 cpl_mask_not(mask);
+<a name="l00155"></a>00155 cpl_image_reject_from_mask(tmp,mask);
+<a name="l00156"></a>00156 cpl_mask_delete(mask);
<a name="l00157"></a>00157
<a name="l00158"></a>00158
-<a name="l00159"></a>00159
-<a name="l00160"></a>00160 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00175"></a>00175 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00176"></a>00176
-<a name="l00177"></a>00177
-<a name="l00178"></a>00178 cpl_table*
-<a name="l00179"></a><a class="code" href="group__irplib__calib.html#ga98c9970b59c6b7919f531829f6f5dab9">00179</a> <a class="code" href="group__irplib__calib.html#ga98c9970b59c6b7919f531829f6f5dab9" title="Computes the detector's gain.">irplib_compute_gain</a>(
-<a name="l00180"></a>00180 cpl_frameset* son,
-<a name="l00181"></a>00181 cpl_frameset* sof,
-<a name="l00182"></a>00182 <span class="keywordtype">int</span>* zone,
-<a name="l00183"></a>00183 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa,
-<a name="l00184"></a>00184 <span class="keyword">const</span> <span class="keywordtype">int</span> nclip)
-<a name="l00185"></a>00185 {
-<a name="l00186"></a>00186
-<a name="l00187"></a>00187 cpl_frame* frm=NULL;
+<a name="l00159"></a>00159 }
+<a name="l00160"></a>00160 *clean_mean=mean;
+<a name="l00161"></a>00161 *clean_stdev=stdev;
+<a name="l00162"></a>00162 cpl_image_delete(tmp);
+<a name="l00163"></a>00163 cpl_stats_delete(stats);
+<a name="l00164"></a>00164
+<a name="l00165"></a>00165 <span class="keywordflow">return</span> 0;
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167
+<a name="l00168"></a>00168 }
+<a name="l00169"></a>00169
+<a name="l00170"></a>00170
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00187"></a>00187 <span class="comment">/*---------------------------------------------------------------------------*/</span>
<a name="l00188"></a>00188
-<a name="l00189"></a>00189 cpl_image* img_on1=NULL;
-<a name="l00190"></a>00190 cpl_image* img_on2=NULL;
-<a name="l00191"></a>00191 cpl_image* img_on_dif=NULL;
-<a name="l00192"></a>00192
-<a name="l00193"></a>00193 cpl_image* img_of1=NULL;
-<a name="l00194"></a>00194 cpl_image* img_of2=NULL;
-<a name="l00195"></a>00195 cpl_image* img_of_dif=NULL;
-<a name="l00196"></a>00196
-<a name="l00197"></a>00197 cpl_table* res_tbl=NULL;
-<a name="l00198"></a>00198 cpl_vector* dit_on=NULL;
-<a name="l00199"></a>00199 cpl_vector* dit_of=NULL;
-<a name="l00200"></a>00200 cpl_vector* exptime_on=NULL;
-<a name="l00201"></a>00201 cpl_vector* exptime_of=NULL;
-<a name="l00202"></a>00202 cpl_propertylist* plist=NULL;
-<a name="l00203"></a>00203
-<a name="l00204"></a>00204 <span class="keywordtype">int</span> non=0;
-<a name="l00205"></a>00205 <span class="keywordtype">int</span> nof=0;
-<a name="l00206"></a>00206 <span class="keywordtype">int</span> nfr=0;
-<a name="l00207"></a>00207 <span class="keywordtype">int</span> llx;
-<a name="l00208"></a>00208 <span class="keywordtype">int</span> lly;
-<a name="l00209"></a>00209 <span class="keywordtype">int</span> urx;
-<a name="l00210"></a>00210 <span class="keywordtype">int</span> ury;
-<a name="l00211"></a>00211
-<a name="l00212"></a>00212 <span class="keywordtype">double</span> avg_on1=0;
-<a name="l00213"></a>00213 <span class="keywordtype">double</span> avg_on2=0;
-<a name="l00214"></a>00214 <span class="keywordtype">double</span> avg_of1=0;
-<a name="l00215"></a>00215 <span class="keywordtype">double</span> avg_of2=0;
-<a name="l00216"></a>00216 <span class="keywordtype">double</span> avg_on_dif=0;
-<a name="l00217"></a>00217 <span class="keywordtype">double</span> avg_of_dif=0;
-<a name="l00218"></a>00218 <span class="keywordtype">double</span> std=0;
-<a name="l00219"></a>00219
-<a name="l00220"></a>00220 <span class="keywordtype">double</span> sig_on_dif=0;
-<a name="l00221"></a>00221 <span class="keywordtype">double</span> sig_of_dif=0;
-<a name="l00222"></a>00222 <span class="keywordtype">char</span>* name=NULL;
-<a name="l00223"></a>00223 <span class="keywordtype">int</span> i=0;
-<a name="l00224"></a>00224 <span class="keywordtype">int</span> m=0;
-<a name="l00225"></a>00225
-<a name="l00226"></a>00226 <span class="keywordtype">double</span> gain=0;
-<a name="l00227"></a>00227 <span class="keywordtype">double</span> dit_ref=0;
-<a name="l00228"></a>00228 <span class="keywordtype">double</span> dit_tmp=0;
-<a name="l00229"></a>00229 <span class="keywordtype">double</span> exptime_ref=0;
-<a name="l00230"></a>00230 <span class="keywordtype">double</span> exptime_tmp=0;
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 cpl_table*
+<a name="l00191"></a><a class="code" href="group__irplib__calib.html#ga98c9970b59c6b7919f531829f6f5dab9">00191</a> <a class="code" href="group__irplib__calib.html#ga98c9970b59c6b7919f531829f6f5dab9" title="Computes the detector's gain.">irplib_compute_gain</a>(
+<a name="l00192"></a>00192 cpl_frameset* son,
+<a name="l00193"></a>00193 cpl_frameset* sof,
+<a name="l00194"></a>00194 <span class="keywordtype">int</span>* zone,
+<a name="l00195"></a>00195 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa,
+<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">int</span> nclip)
+<a name="l00197"></a>00197 {
+<a name="l00198"></a>00198
+<a name="l00199"></a>00199 cpl_frame* frm=NULL;
+<a name="l00200"></a>00200
+<a name="l00201"></a>00201 cpl_image* img_on1=NULL;
+<a name="l00202"></a>00202 cpl_image* img_on2=NULL;
+<a name="l00203"></a>00203 cpl_image* img_on_dif=NULL;
+<a name="l00204"></a>00204
+<a name="l00205"></a>00205 cpl_image* img_of1=NULL;
+<a name="l00206"></a>00206 cpl_image* img_of2=NULL;
+<a name="l00207"></a>00207 cpl_image* img_of_dif=NULL;
+<a name="l00208"></a>00208
+<a name="l00209"></a>00209 cpl_table* res_tbl=NULL;
+<a name="l00210"></a>00210 cpl_vector* dit_on=NULL;
+<a name="l00211"></a>00211 cpl_vector* dit_of=NULL;
+<a name="l00212"></a>00212 cpl_vector* exptime_on=NULL;
+<a name="l00213"></a>00213 cpl_vector* exptime_of=NULL;
+<a name="l00214"></a>00214 cpl_propertylist* plist=NULL;
+<a name="l00215"></a>00215
+<a name="l00216"></a>00216 <span class="keywordtype">int</span> non=0;
+<a name="l00217"></a>00217 <span class="keywordtype">int</span> nof=0;
+<a name="l00218"></a>00218 <span class="keywordtype">int</span> nfr=0;
+<a name="l00219"></a>00219 <span class="keywordtype">int</span> llx;
+<a name="l00220"></a>00220 <span class="keywordtype">int</span> lly;
+<a name="l00221"></a>00221 <span class="keywordtype">int</span> urx;
+<a name="l00222"></a>00222 <span class="keywordtype">int</span> ury;
+<a name="l00223"></a>00223
+<a name="l00224"></a>00224 <span class="keywordtype">double</span> avg_on1=0;
+<a name="l00225"></a>00225 <span class="keywordtype">double</span> avg_on2=0;
+<a name="l00226"></a>00226 <span class="keywordtype">double</span> avg_of1=0;
+<a name="l00227"></a>00227 <span class="keywordtype">double</span> avg_of2=0;
+<a name="l00228"></a>00228 <span class="keywordtype">double</span> avg_on_dif=0;
+<a name="l00229"></a>00229 <span class="keywordtype">double</span> avg_of_dif=0;
+<a name="l00230"></a>00230 <span class="keywordtype">double</span> std=0;
<a name="l00231"></a>00231
-<a name="l00232"></a>00232
-<a name="l00233"></a>00233 non = cpl_frameset_get_size(son);
-<a name="l00234"></a>00234 nof = cpl_frameset_get_size(sof);
-<a name="l00235"></a>00235 nfr = (non <= nof) ? non : nof;
-<a name="l00236"></a>00236
-<a name="l00237"></a>00237 dit_on=cpl_vector_new(nfr);
-<a name="l00238"></a>00238 dit_of=cpl_vector_new(nfr);
-<a name="l00239"></a>00239 exptime_on=cpl_vector_new(nfr);
-<a name="l00240"></a>00240 exptime_of=cpl_vector_new(nfr);
-<a name="l00241"></a>00241
-<a name="l00242"></a>00242 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
+<a name="l00232"></a>00232 <span class="keywordtype">double</span> sig_on_dif=0;
+<a name="l00233"></a>00233 <span class="keywordtype">double</span> sig_of_dif=0;
+<a name="l00234"></a>00234 <span class="keyword">const</span> <span class="keywordtype">char</span>* name=NULL;
+<a name="l00235"></a>00235 <span class="keywordtype">int</span> i=0;
+<a name="l00236"></a>00236 <span class="keywordtype">int</span> m=0;
+<a name="l00237"></a>00237
+<a name="l00238"></a>00238 <span class="keywordtype">double</span> gain=0;
+<a name="l00239"></a>00239 <span class="keywordtype">double</span> dit_ref=0;
+<a name="l00240"></a>00240 <span class="keywordtype">double</span> dit_tmp=0;
+<a name="l00241"></a>00241 <span class="keywordtype">double</span> exptime_ref=0;
+<a name="l00242"></a>00242 <span class="keywordtype">double</span> exptime_tmp=0;
<a name="l00243"></a>00243
-<a name="l00244"></a>00244 frm=cpl_frameset_get_frame(son,i);
-<a name="l00245"></a>00245 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00246"></a>00246 plist=cpl_propertylist_load(name,0);
-<a name="l00247"></a>00247 dit_ref=irplib_pfits_get_dit(plist);
-<a name="l00248"></a>00248 exptime_ref=(double)irplib_pfits_get_exp_time(plist);
-<a name="l00249"></a>00249 cpl_propertylist_delete(plist);
-<a name="l00250"></a>00250 cpl_vector_set(dit_on,i,dit_ref);
-<a name="l00251"></a>00251 cpl_vector_set(exptime_on,i,exptime_ref);
-<a name="l00252"></a>00252
-<a name="l00253"></a>00253 frm=cpl_frameset_get_frame(sof,i);
-<a name="l00254"></a>00254 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00255"></a>00255 plist=cpl_propertylist_load(name,0);
-<a name="l00256"></a>00256 dit_ref=irplib_pfits_get_dit(plist);
-<a name="l00257"></a>00257 exptime_ref=(double)irplib_pfits_get_exp_time(plist);
-<a name="l00258"></a>00258 cpl_propertylist_delete(plist);
-<a name="l00259"></a>00259 cpl_vector_set(dit_of,i,dit_ref);
-<a name="l00260"></a>00260 cpl_vector_set(exptime_of,i,exptime_ref);
-<a name="l00261"></a>00261
-<a name="l00262"></a>00262 }
-<a name="l00263"></a>00263
+<a name="l00244"></a>00244
+<a name="l00245"></a>00245 non = cpl_frameset_get_size(son);
+<a name="l00246"></a>00246 nof = cpl_frameset_get_size(sof);
+<a name="l00247"></a>00247 nfr = (non <= nof) ? non : nof;
+<a name="l00248"></a>00248
+<a name="l00249"></a>00249 dit_on=cpl_vector_new(nfr);
+<a name="l00250"></a>00250 dit_of=cpl_vector_new(nfr);
+<a name="l00251"></a>00251 exptime_on=cpl_vector_new(nfr);
+<a name="l00252"></a>00252 exptime_of=cpl_vector_new(nfr);
+<a name="l00253"></a>00253
+<a name="l00254"></a>00254 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
+<a name="l00255"></a>00255
+<a name="l00256"></a>00256 frm=IRPLIB_FRAMESET_GET(son,i);
+<a name="l00257"></a>00257 name=cpl_frame_get_filename(frm);
+<a name="l00258"></a>00258 plist=cpl_propertylist_load(name,0);
+<a name="l00259"></a>00259 dit_ref=irplib_pfits_get_dit(plist);
+<a name="l00260"></a>00260 exptime_ref=(double)irplib_pfits_get_exp_time(plist);
+<a name="l00261"></a>00261 cpl_propertylist_delete(plist);
+<a name="l00262"></a>00262 cpl_vector_set(dit_on,i,dit_ref);
+<a name="l00263"></a>00263 cpl_vector_set(exptime_on,i,exptime_ref);
<a name="l00264"></a>00264
-<a name="l00265"></a>00265 llx=zone[0];
-<a name="l00266"></a>00266 lly=zone[1];
-<a name="l00267"></a>00267 urx=zone[2];
-<a name="l00268"></a>00268 ury=zone[3];
-<a name="l00269"></a>00269
-<a name="l00270"></a>00270
-<a name="l00271"></a>00271
-<a name="l00272"></a>00272 res_tbl=cpl_table_new(nfr);
-<a name="l00273"></a>00273 cpl_table_new_column(res_tbl,<span class="stringliteral">"adu"</span>, CPL_TYPE_DOUBLE);
-<a name="l00274"></a>00274 cpl_table_new_column(res_tbl,<span class="stringliteral">"gain"</span>, CPL_TYPE_DOUBLE);
-<a name="l00275"></a>00275
-<a name="l00276"></a>00276 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
-<a name="l00277"></a>00277 frm=cpl_frameset_get_frame(son,i);
-<a name="l00278"></a>00278 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00279"></a>00279 img_on1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00280"></a>00280
-<a name="l00281"></a>00281 frm=cpl_frameset_get_frame(sof,i);
-<a name="l00282"></a>00282 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00283"></a>00283 img_of1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00284"></a>00284
-<a name="l00285"></a>00285
-<a name="l00286"></a>00286 dit_ref=cpl_vector_get(dit_on,i);
-<a name="l00287"></a>00287 exptime_ref=cpl_vector_get(exptime_on,i);
-<a name="l00288"></a>00288
-<a name="l00289"></a>00289
-<a name="l00290"></a>00290 <span class="keywordflow">for</span>(m=0;m<nfr; m++) {
-<a name="l00291"></a>00291 <span class="keywordflow">if</span>(m != i) {
-<a name="l00292"></a>00292 frm=cpl_frameset_get_frame(son,m);
-<a name="l00293"></a>00293 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00294"></a>00294 dit_tmp=cpl_vector_get(dit_on,m);
-<a name="l00295"></a>00295 exptime_tmp=cpl_vector_get(exptime_on,m);
-<a name="l00296"></a>00296 <span class="keywordflow">if</span>(dit_tmp == dit_ref && exptime_tmp == exptime_ref) {
-<a name="l00297"></a>00297 img_on2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00298"></a>00298 frm=cpl_frameset_get_frame(sof,m);
-<a name="l00299"></a>00299 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00300"></a>00300 img_of2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00301"></a>00301
-<a name="l00302"></a>00302 img_on_dif=cpl_image_subtract_create(img_on1,img_on2);
-<a name="l00303"></a>00303 img_of_dif=cpl_image_subtract_create(img_of1,img_of2);
-<a name="l00304"></a>00304
-<a name="l00305"></a>00305 irplib_get_clean_mean_window(img_on1,llx,lly,urx,ury,kappa,
-<a name="l00306"></a>00306 nclip,&avg_on1,&std);
-<a name="l00307"></a>00307 irplib_get_clean_mean_window(img_on2,llx,lly,urx,ury,kappa,
-<a name="l00308"></a>00308 nclip,&avg_on2,&std);
-<a name="l00309"></a>00309 irplib_get_clean_mean_window(img_of1,llx,lly,urx,ury,kappa,
-<a name="l00310"></a>00310 nclip,&avg_of1,&std);
-<a name="l00311"></a>00311 irplib_get_clean_mean_window(img_of2,llx,lly,urx,ury,kappa,
-<a name="l00312"></a>00312 nclip,&avg_of2,&std);
-<a name="l00313"></a>00313 irplib_get_clean_mean_window(img_on_dif,llx,lly,urx,ury,kappa,
-<a name="l00314"></a>00314 nclip,&avg_on_dif,&sig_on_dif);
-<a name="l00315"></a>00315 irplib_get_clean_mean_window(img_of_dif,llx,lly,urx,ury,kappa,
-<a name="l00316"></a>00316 nclip,&avg_of_dif,&sig_of_dif);
-<a name="l00317"></a>00317
-<a name="l00318"></a>00318 cpl_image_delete(img_on2);
-<a name="l00319"></a>00319 cpl_image_delete(img_of2);
-<a name="l00320"></a>00320 cpl_image_delete(img_on_dif);
-<a name="l00321"></a>00321 cpl_image_delete(img_of_dif);
-<a name="l00322"></a>00322
-<a name="l00323"></a>00323 gain=((avg_on1+avg_on2)-(avg_of1+avg_of2))/
-<a name="l00324"></a>00324 ((sig_on_dif*sig_on_dif)-(sig_of_dif*sig_of_dif));
-<a name="l00325"></a>00325
-<a name="l00326"></a>00326 cpl_table_set_double(res_tbl,<span class="stringliteral">"gain"</span>,m,gain);
-<a name="l00327"></a>00327 cpl_table_set_double(res_tbl,<span class="stringliteral">"adu"</span>,m,
-<a name="l00328"></a>00328 ((avg_on1+avg_on2)/2-(avg_of1+avg_of2)/2));
+<a name="l00265"></a>00265 frm=IRPLIB_FRAMESET_GET(sof,i);
+<a name="l00266"></a>00266 name=cpl_frame_get_filename(frm);
+<a name="l00267"></a>00267 plist=cpl_propertylist_load(name,0);
+<a name="l00268"></a>00268 dit_ref=irplib_pfits_get_dit(plist);
+<a name="l00269"></a>00269 exptime_ref=(double)irplib_pfits_get_exp_time(plist);
+<a name="l00270"></a>00270 cpl_propertylist_delete(plist);
+<a name="l00271"></a>00271 cpl_vector_set(dit_of,i,dit_ref);
+<a name="l00272"></a>00272 cpl_vector_set(exptime_of,i,exptime_ref);
+<a name="l00273"></a>00273
+<a name="l00274"></a>00274 }
+<a name="l00275"></a>00275
+<a name="l00276"></a>00276
+<a name="l00277"></a>00277 llx=zone[0];
+<a name="l00278"></a>00278 lly=zone[1];
+<a name="l00279"></a>00279 urx=zone[2];
+<a name="l00280"></a>00280 ury=zone[3];
+<a name="l00281"></a>00281
+<a name="l00282"></a>00282
+<a name="l00283"></a>00283
+<a name="l00284"></a>00284 res_tbl=cpl_table_new(nfr);
+<a name="l00285"></a>00285 cpl_table_new_column(res_tbl,<span class="stringliteral">"adu"</span>, CPL_TYPE_DOUBLE);
+<a name="l00286"></a>00286 cpl_table_new_column(res_tbl,<span class="stringliteral">"gain"</span>, CPL_TYPE_DOUBLE);
+<a name="l00287"></a>00287
+<a name="l00288"></a>00288 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
+<a name="l00289"></a>00289 frm=IRPLIB_FRAMESET_GET(son,i);
+<a name="l00290"></a>00290 name=cpl_frame_get_filename(frm);
+<a name="l00291"></a>00291 img_on1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00292"></a>00292
+<a name="l00293"></a>00293 frm=IRPLIB_FRAMESET_GET(sof,i);
+<a name="l00294"></a>00294 name=cpl_frame_get_filename(frm);
+<a name="l00295"></a>00295 img_of1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00296"></a>00296
+<a name="l00297"></a>00297
+<a name="l00298"></a>00298 dit_ref=cpl_vector_get(dit_on,i);
+<a name="l00299"></a>00299 exptime_ref=cpl_vector_get(exptime_on,i);
+<a name="l00300"></a>00300
+<a name="l00301"></a>00301
+<a name="l00302"></a>00302 <span class="keywordflow">for</span>(m=0;m<nfr; m++) {
+<a name="l00303"></a>00303 <span class="keywordflow">if</span>(m != i) {
+<a name="l00304"></a>00304 frm=IRPLIB_FRAMESET_GET(son,m);
+<a name="l00305"></a>00305 name=cpl_frame_get_filename(frm);
+<a name="l00306"></a>00306 dit_tmp=cpl_vector_get(dit_on,m);
+<a name="l00307"></a>00307 exptime_tmp=cpl_vector_get(exptime_on,m);
+<a name="l00308"></a>00308 <span class="keywordflow">if</span>(dit_tmp == dit_ref && exptime_tmp == exptime_ref) {
+<a name="l00309"></a>00309 img_on2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00310"></a>00310 frm=IRPLIB_FRAMESET_GET(sof,m);
+<a name="l00311"></a>00311 name=cpl_frame_get_filename(frm);
+<a name="l00312"></a>00312 img_of2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00313"></a>00313
+<a name="l00314"></a>00314 img_on_dif=cpl_image_subtract_create(img_on1,img_on2);
+<a name="l00315"></a>00315 img_of_dif=cpl_image_subtract_create(img_of1,img_of2);
+<a name="l00316"></a>00316
+<a name="l00317"></a>00317 irplib_get_clean_mean_window(img_on1,llx,lly,urx,ury,kappa,
+<a name="l00318"></a>00318 nclip,&avg_on1,&std);
+<a name="l00319"></a>00319 irplib_get_clean_mean_window(img_on2,llx,lly,urx,ury,kappa,
+<a name="l00320"></a>00320 nclip,&avg_on2,&std);
+<a name="l00321"></a>00321 irplib_get_clean_mean_window(img_of1,llx,lly,urx,ury,kappa,
+<a name="l00322"></a>00322 nclip,&avg_of1,&std);
+<a name="l00323"></a>00323 irplib_get_clean_mean_window(img_of2,llx,lly,urx,ury,kappa,
+<a name="l00324"></a>00324 nclip,&avg_of2,&std);
+<a name="l00325"></a>00325 irplib_get_clean_mean_window(img_on_dif,llx,lly,urx,ury,kappa,
+<a name="l00326"></a>00326 nclip,&avg_on_dif,&sig_on_dif);
+<a name="l00327"></a>00327 irplib_get_clean_mean_window(img_of_dif,llx,lly,urx,ury,kappa,
+<a name="l00328"></a>00328 nclip,&avg_of_dif,&sig_of_dif);
<a name="l00329"></a>00329
-<a name="l00330"></a>00330 }
-<a name="l00331"></a>00331 }
-<a name="l00332"></a>00332 }
-<a name="l00333"></a>00333 cpl_image_delete(img_on1);
-<a name="l00334"></a>00334 cpl_image_delete(img_of1);
-<a name="l00335"></a>00335 }
-<a name="l00336"></a>00336
+<a name="l00330"></a>00330 cpl_image_delete(img_on2);
+<a name="l00331"></a>00331 cpl_image_delete(img_of2);
+<a name="l00332"></a>00332 cpl_image_delete(img_on_dif);
+<a name="l00333"></a>00333 cpl_image_delete(img_of_dif);
+<a name="l00334"></a>00334
+<a name="l00335"></a>00335 gain=((avg_on1+avg_on2)-(avg_of1+avg_of2))/
+<a name="l00336"></a>00336 ((sig_on_dif*sig_on_dif)-(sig_of_dif*sig_of_dif));
<a name="l00337"></a>00337
-<a name="l00338"></a>00338 cpl_vector_delete(dit_on);
-<a name="l00339"></a>00339 cpl_vector_delete(dit_of);
-<a name="l00340"></a>00340 cpl_vector_delete(exptime_on);
-<a name="l00341"></a>00341 cpl_vector_delete(exptime_of);
-<a name="l00342"></a>00342
-<a name="l00343"></a>00343 <span class="keywordflow">return</span> res_tbl;
-<a name="l00344"></a>00344
-<a name="l00345"></a>00345 }
-<a name="l00346"></a>00346
-<a name="l00347"></a>00347 <span class="comment">/* --------------------------------------------------------------------------*/</span>
-<a name="l00357"></a>00357 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00338"></a>00338 cpl_table_set_double(res_tbl,<span class="stringliteral">"gain"</span>,m,gain);
+<a name="l00339"></a>00339 cpl_table_set_double(res_tbl,<span class="stringliteral">"adu"</span>,m,
+<a name="l00340"></a>00340 ((avg_on1+avg_on2)/2-(avg_of1+avg_of2)/2));
+<a name="l00341"></a>00341
+<a name="l00342"></a>00342 }
+<a name="l00343"></a>00343 }
+<a name="l00344"></a>00344 }
+<a name="l00345"></a>00345 cpl_image_delete(img_on1);
+<a name="l00346"></a>00346 cpl_image_delete(img_of1);
+<a name="l00347"></a>00347 }
+<a name="l00348"></a>00348
+<a name="l00349"></a>00349
+<a name="l00350"></a>00350 cpl_vector_delete(dit_on);
+<a name="l00351"></a>00351 cpl_vector_delete(dit_of);
+<a name="l00352"></a>00352 cpl_vector_delete(exptime_on);
+<a name="l00353"></a>00353 cpl_vector_delete(exptime_of);
+<a name="l00354"></a>00354
+<a name="l00355"></a>00355 <span class="keywordflow">return</span> res_tbl;
+<a name="l00356"></a>00356
+<a name="l00357"></a>00357 }
<a name="l00358"></a>00358
-<a name="l00359"></a>00359
-<a name="l00360"></a><a class="code" href="group__irplib__calib.html#gadefee4e970a548c25bcbb42797778a2a">00360</a> cpl_table* <a class="code" href="group__irplib__calib.html#gadefee4e970a548c25bcbb42797778a2a" title="Computes the detector's linearity.">irplib_compute_linearity</a>(cpl_frameset* son, cpl_frameset* sof)
-<a name="l00361"></a>00361 {
-<a name="l00362"></a>00362
-<a name="l00363"></a>00363
-<a name="l00364"></a>00364 cpl_frame* frm=NULL;
-<a name="l00365"></a>00365
-<a name="l00366"></a>00366 <span class="keywordtype">int</span>* status=0;
-<a name="l00367"></a>00367 <span class="keywordtype">int</span> non=0;
-<a name="l00368"></a>00368 <span class="keywordtype">int</span> nof=0;
-<a name="l00369"></a>00369 <span class="keywordtype">int</span> nfr=0;
-<a name="l00370"></a>00370 <span class="keywordtype">int</span> i=0;
-<a name="l00371"></a>00371 <span class="keywordtype">double</span> med_on=0;
-<a name="l00372"></a>00372 <span class="keywordtype">double</span> avg_on=0;
-<a name="l00373"></a>00373 <span class="keywordtype">double</span> med_of=0;
-<a name="l00374"></a>00374 <span class="keywordtype">double</span> avg_of=0;
-<a name="l00375"></a>00375 <span class="keywordtype">double</span> med_dit=0;
-<a name="l00376"></a>00376 <span class="keywordtype">double</span> avg_dit=0;
+<a name="l00359"></a>00359 <span class="comment">/* --------------------------------------------------------------------------*/</span>
+<a name="l00369"></a>00369 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00370"></a>00370
+<a name="l00371"></a>00371
+<a name="l00372"></a><a class="code" href="group__irplib__calib.html#gadefee4e970a548c25bcbb42797778a2a">00372</a> cpl_table* <a class="code" href="group__irplib__calib.html#gadefee4e970a548c25bcbb42797778a2a" title="Computes the detector's linearity.">irplib_compute_linearity</a>(cpl_frameset* son, cpl_frameset* sof)
+<a name="l00373"></a>00373 {
+<a name="l00374"></a>00374
+<a name="l00375"></a>00375
+<a name="l00376"></a>00376 cpl_frame* frm=NULL;
<a name="l00377"></a>00377
-<a name="l00378"></a>00378 <span class="keywordtype">double</span> med=0;
-<a name="l00379"></a>00379 <span class="keywordtype">double</span> avg=0;
-<a name="l00380"></a>00380
-<a name="l00381"></a>00381 <span class="keywordtype">char</span>* name=NULL;
-<a name="l00382"></a>00382 cpl_image* img=NULL;
-<a name="l00383"></a>00383 cpl_vector* vec_adl=NULL;
-<a name="l00384"></a>00384 cpl_vector* vec_dit=NULL;
-<a name="l00385"></a>00385 cpl_vector* vec_avg=NULL;
-<a name="l00386"></a>00386 cpl_vector* vec_med=NULL;
-<a name="l00387"></a>00387 cpl_vector* vec_avg_dit=NULL;
-<a name="l00388"></a>00388 cpl_vector* vec_med_dit=NULL;
-<a name="l00389"></a>00389 cpl_propertylist* plist=NULL;
-<a name="l00390"></a>00390
-<a name="l00391"></a>00391 <span class="keywordtype">double</span> dit=0;
-<a name="l00392"></a>00392 cpl_table* lin_tbl=NULL;
-<a name="l00393"></a>00393
-<a name="l00394"></a>00394
-<a name="l00395"></a>00395 non = cpl_frameset_get_size(son);
-<a name="l00396"></a>00396 nof = cpl_frameset_get_size(sof);
-<a name="l00397"></a>00397 nfr = (non <= nof) ? non : nof;
-<a name="l00398"></a>00398
-<a name="l00399"></a>00399 lin_tbl=cpl_table_new(nfr);
-<a name="l00400"></a>00400 cpl_table_new_column(lin_tbl,<span class="stringliteral">"med"</span>, CPL_TYPE_DOUBLE);
-<a name="l00401"></a>00401 cpl_table_new_column(lin_tbl,<span class="stringliteral">"avg"</span>, CPL_TYPE_DOUBLE);
-<a name="l00402"></a>00402 cpl_table_new_column(lin_tbl,<span class="stringliteral">"med_dit"</span>, CPL_TYPE_DOUBLE);
-<a name="l00403"></a>00403 cpl_table_new_column(lin_tbl,<span class="stringliteral">"avg_dit"</span>, CPL_TYPE_DOUBLE);
-<a name="l00404"></a>00404 cpl_table_new_column(lin_tbl,<span class="stringliteral">"dit"</span>, CPL_TYPE_DOUBLE);
-<a name="l00405"></a>00405 vec_med=cpl_vector_new(nfr);
-<a name="l00406"></a>00406 vec_avg=cpl_vector_new(nfr);
-<a name="l00407"></a>00407 vec_med_dit=cpl_vector_new(nfr);
-<a name="l00408"></a>00408 vec_avg_dit=cpl_vector_new(nfr);
-<a name="l00409"></a>00409 vec_dit=cpl_vector_new(nfr);
-<a name="l00410"></a>00410 vec_adl=cpl_vector_new(nfr);
-<a name="l00411"></a>00411 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
-<a name="l00412"></a>00412 frm=cpl_frameset_get_frame(son,i);
-<a name="l00413"></a>00413 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00414"></a>00414 img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00415"></a>00415 med_on=cpl_image_get_median(img);
-<a name="l00416"></a>00416 avg_on=cpl_image_get_mean(img);
-<a name="l00417"></a>00417 cpl_image_delete(img);
-<a name="l00418"></a>00418
-<a name="l00419"></a>00419 frm=cpl_frameset_get_frame(sof,i);
-<a name="l00420"></a>00420 name=(<span class="keywordtype">char</span>*)cpl_frame_get_filename(frm);
-<a name="l00421"></a>00421 img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
-<a name="l00422"></a>00422 med_of=cpl_image_get_median(img);
-<a name="l00423"></a>00423 avg_of=cpl_image_get_mean(img);
-<a name="l00424"></a>00424 cpl_image_delete(img);
-<a name="l00425"></a>00425 med=med_on-med_of;
-<a name="l00426"></a>00426 avg=avg_on-avg_of;
-<a name="l00427"></a>00427 plist=cpl_propertylist_load(name,0);
-<a name="l00428"></a>00428 dit=(double)irplib_pfits_get_dit(plist);
-<a name="l00429"></a>00429 cpl_propertylist_delete(plist);
-<a name="l00430"></a>00430 avg_dit=avg/dit;
-<a name="l00431"></a>00431 med_dit=med/dit;
-<a name="l00432"></a>00432
-<a name="l00433"></a>00433 cpl_vector_set(vec_dit,i,dit);
-<a name="l00434"></a>00434 cpl_vector_set(vec_avg,i,avg);
-<a name="l00435"></a>00435 cpl_vector_set(vec_med,i,med);
-<a name="l00436"></a>00436 cpl_vector_set(vec_avg_dit,i,avg_dit);
-<a name="l00437"></a>00437 cpl_vector_set(vec_med_dit,i,med_dit);
-<a name="l00438"></a>00438
-<a name="l00439"></a>00439
-<a name="l00440"></a>00440 cpl_table_set_double(lin_tbl,<span class="stringliteral">"dit"</span>,i,dit);
-<a name="l00441"></a>00441 cpl_table_set_double(lin_tbl,<span class="stringliteral">"med"</span>,i,med);
-<a name="l00442"></a>00442 cpl_table_set_double(lin_tbl,<span class="stringliteral">"avg"</span>,i,avg);
-<a name="l00443"></a>00443 cpl_table_set_double(lin_tbl,<span class="stringliteral">"med_dit"</span>,i,med_dit);
-<a name="l00444"></a>00444 cpl_table_set_double(lin_tbl,<span class="stringliteral">"avg_dit"</span>,i,avg_dit);
-<a name="l00445"></a>00445
-<a name="l00446"></a>00446 }
-<a name="l00447"></a>00447 cpl_table_new_column(lin_tbl,<span class="stringliteral">"adl"</span>, CPL_TYPE_DOUBLE);
-<a name="l00448"></a>00448 med_dit=cpl_vector_get_mean(vec_med_dit);
-<a name="l00449"></a>00449 avg_dit=cpl_vector_get_mean(vec_avg_dit);
+<a name="l00378"></a>00378 <span class="keywordtype">int</span>* status=0;
+<a name="l00379"></a>00379 <span class="keywordtype">int</span> non=0;
+<a name="l00380"></a>00380 <span class="keywordtype">int</span> nof=0;
+<a name="l00381"></a>00381 <span class="keywordtype">int</span> nfr=0;
+<a name="l00382"></a>00382 <span class="keywordtype">int</span> i=0;
+<a name="l00383"></a>00383 <span class="keywordtype">double</span> med_on=0;
+<a name="l00384"></a>00384 <span class="keywordtype">double</span> avg_on=0;
+<a name="l00385"></a>00385 <span class="keywordtype">double</span> med_of=0;
+<a name="l00386"></a>00386 <span class="keywordtype">double</span> avg_of=0;
+<a name="l00387"></a>00387 <span class="keywordtype">double</span> med_dit=0;
+<a name="l00388"></a>00388 <span class="keywordtype">double</span> avg_dit=0;
+<a name="l00389"></a>00389
+<a name="l00390"></a>00390 <span class="keywordtype">double</span> med=0;
+<a name="l00391"></a>00391 <span class="keywordtype">double</span> avg=0;
+<a name="l00392"></a>00392
+<a name="l00393"></a>00393 <span class="keyword">const</span> <span class="keywordtype">char</span>* name=NULL;
+<a name="l00394"></a>00394 cpl_image* img=NULL;
+<a name="l00395"></a>00395 cpl_vector* vec_adl=NULL;
+<a name="l00396"></a>00396 cpl_vector* vec_dit=NULL;
+<a name="l00397"></a>00397 cpl_vector* vec_avg=NULL;
+<a name="l00398"></a>00398 cpl_vector* vec_med=NULL;
+<a name="l00399"></a>00399 cpl_vector* vec_avg_dit=NULL;
+<a name="l00400"></a>00400 cpl_vector* vec_med_dit=NULL;
+<a name="l00401"></a>00401 cpl_propertylist* plist=NULL;
+<a name="l00402"></a>00402
+<a name="l00403"></a>00403 <span class="keywordtype">double</span> dit=0;
+<a name="l00404"></a>00404 cpl_table* lin_tbl=NULL;
+<a name="l00405"></a>00405
+<a name="l00406"></a>00406
+<a name="l00407"></a>00407 non = cpl_frameset_get_size(son);
+<a name="l00408"></a>00408 nof = cpl_frameset_get_size(sof);
+<a name="l00409"></a>00409 nfr = (non <= nof) ? non : nof;
+<a name="l00410"></a>00410
+<a name="l00411"></a>00411 lin_tbl=cpl_table_new(nfr);
+<a name="l00412"></a>00412 cpl_table_new_column(lin_tbl,<span class="stringliteral">"med"</span>, CPL_TYPE_DOUBLE);
+<a name="l00413"></a>00413 cpl_table_new_column(lin_tbl,<span class="stringliteral">"avg"</span>, CPL_TYPE_DOUBLE);
+<a name="l00414"></a>00414 cpl_table_new_column(lin_tbl,<span class="stringliteral">"med_dit"</span>, CPL_TYPE_DOUBLE);
+<a name="l00415"></a>00415 cpl_table_new_column(lin_tbl,<span class="stringliteral">"avg_dit"</span>, CPL_TYPE_DOUBLE);
+<a name="l00416"></a>00416 cpl_table_new_column(lin_tbl,<span class="stringliteral">"dit"</span>, CPL_TYPE_DOUBLE);
+<a name="l00417"></a>00417 vec_med=cpl_vector_new(nfr);
+<a name="l00418"></a>00418 vec_avg=cpl_vector_new(nfr);
+<a name="l00419"></a>00419 vec_med_dit=cpl_vector_new(nfr);
+<a name="l00420"></a>00420 vec_avg_dit=cpl_vector_new(nfr);
+<a name="l00421"></a>00421 vec_dit=cpl_vector_new(nfr);
+<a name="l00422"></a>00422 vec_adl=cpl_vector_new(nfr);
+<a name="l00423"></a>00423 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
+<a name="l00424"></a>00424 frm=IRPLIB_FRAMESET_GET(son,i);
+<a name="l00425"></a>00425 name=cpl_frame_get_filename(frm);
+<a name="l00426"></a>00426 img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00427"></a>00427 med_on=cpl_image_get_median(img);
+<a name="l00428"></a>00428 avg_on=cpl_image_get_mean(img);
+<a name="l00429"></a>00429 cpl_image_delete(img);
+<a name="l00430"></a>00430
+<a name="l00431"></a>00431 frm=IRPLIB_FRAMESET_GET(sof,i);
+<a name="l00432"></a>00432 name=cpl_frame_get_filename(frm);
+<a name="l00433"></a>00433 img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
+<a name="l00434"></a>00434 med_of=cpl_image_get_median(img);
+<a name="l00435"></a>00435 avg_of=cpl_image_get_mean(img);
+<a name="l00436"></a>00436 cpl_image_delete(img);
+<a name="l00437"></a>00437 med=med_on-med_of;
+<a name="l00438"></a>00438 avg=avg_on-avg_of;
+<a name="l00439"></a>00439 plist=cpl_propertylist_load(name,0);
+<a name="l00440"></a>00440 dit=(double)irplib_pfits_get_dit(plist);
+<a name="l00441"></a>00441 cpl_propertylist_delete(plist);
+<a name="l00442"></a>00442 avg_dit=avg/dit;
+<a name="l00443"></a>00443 med_dit=med/dit;
+<a name="l00444"></a>00444
+<a name="l00445"></a>00445 cpl_vector_set(vec_dit,i,dit);
+<a name="l00446"></a>00446 cpl_vector_set(vec_avg,i,avg);
+<a name="l00447"></a>00447 cpl_vector_set(vec_med,i,med);
+<a name="l00448"></a>00448 cpl_vector_set(vec_avg_dit,i,avg_dit);
+<a name="l00449"></a>00449 cpl_vector_set(vec_med_dit,i,med_dit);
<a name="l00450"></a>00450
-<a name="l00451"></a>00451 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
-<a name="l00452"></a>00452 dit = cpl_table_get_double(lin_tbl,<span class="stringliteral">"dit"</span>,i,status);
-<a name="l00453"></a>00453 cpl_vector_set(vec_adl,i,dit*med_dit);
-<a name="l00454"></a>00454 cpl_table_set_double(lin_tbl,<span class="stringliteral">"adl"</span>,i,dit*med_dit);
-<a name="l00455"></a>00455 }
-<a name="l00456"></a>00456
-<a name="l00457"></a>00457
-<a name="l00458"></a>00458 cpl_vector_delete(vec_dit);
-<a name="l00459"></a>00459 cpl_vector_delete(vec_adl);
-<a name="l00460"></a>00460 cpl_vector_delete(vec_avg);
-<a name="l00461"></a>00461 cpl_vector_delete(vec_med);
-<a name="l00462"></a>00462 cpl_vector_delete(vec_avg_dit);
-<a name="l00463"></a>00463 cpl_vector_delete(vec_med_dit);
-<a name="l00464"></a>00464
-<a name="l00465"></a>00465
-<a name="l00466"></a>00466 <span class="keywordflow">return</span> lin_tbl;
-<a name="l00467"></a>00467
-<a name="l00468"></a>00468 }
-<a name="l00469"></a>00469
-<a name="l00470"></a>00470
-<a name="l00471"></a>00471 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00480"></a>00480 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00481"></a><a class="code" href="group__irplib__calib.html#gae9b762625dbd2c31c1b59cfd8c15fd90">00481</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__calib.html#gae9b762625dbd2c31c1b59cfd8c15fd90" title="Apply the detector linearity correction.">irplib_detlin_correct</a>(
-<a name="l00482"></a>00482 cpl_imagelist * ilist,
-<a name="l00483"></a>00483 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_a,
-<a name="l00484"></a>00484 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_b,
-<a name="l00485"></a>00485 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_c)
-<a name="l00486"></a>00486 {
-<a name="l00487"></a>00487 cpl_image * ima ;
-<a name="l00488"></a>00488 cpl_image * imb ;
-<a name="l00489"></a>00489 cpl_image * imc ;
-<a name="l00490"></a>00490 <span class="keywordtype">float</span> * pima ;
-<a name="l00491"></a>00491 <span class="keywordtype">float</span> * pimb ;
-<a name="l00492"></a>00492 <span class="keywordtype">float</span> * pimc ;
-<a name="l00493"></a>00493 <span class="keywordtype">float</span> * pdata ;
-<a name="l00494"></a>00494 <span class="keywordtype">int</span> nx, ny, ni ;
-<a name="l00495"></a>00495 <span class="keywordtype">double</span> coeff_1, coeff_2, val ;
-<a name="l00496"></a>00496 <span class="keywordtype">int</span> i, j ;
-<a name="l00497"></a>00497
-<a name="l00498"></a>00498 <span class="comment">/* Test entries */</span>
-<a name="l00499"></a>00499 <span class="keywordflow">if</span> (!ilist || !detlin_a || !detlin_b || !detlin_c) <span class="keywordflow">return</span> -1 ;
-<a name="l00500"></a>00500
-<a name="l00501"></a>00501 <span class="comment">/* Load the 3 coeffs images */</span>
-<a name="l00502"></a>00502 ima = cpl_image_load(detlin_a, CPL_TYPE_FLOAT, 0, 0) ;
-<a name="l00503"></a>00503 imb = cpl_image_load(detlin_b, CPL_TYPE_FLOAT, 0, 0) ;
-<a name="l00504"></a>00504 imc = cpl_image_load(detlin_c, CPL_TYPE_FLOAT, 0, 0) ;
-<a name="l00505"></a>00505 <span class="keywordflow">if</span> (!ima || !imb || !imc) {
-<a name="l00506"></a>00506 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the detlin images"</span>) ;
-<a name="l00507"></a>00507 <span class="keywordflow">if</span> (ima) cpl_image_delete(ima) ;
-<a name="l00508"></a>00508 <span class="keywordflow">if</span> (imb) cpl_image_delete(imb) ;
-<a name="l00509"></a>00509 <span class="keywordflow">if</span> (imc) cpl_image_delete(imc) ;
-<a name="l00510"></a>00510 <span class="keywordflow">return</span> -1 ;
-<a name="l00511"></a>00511 }
-<a name="l00512"></a>00512 pima = cpl_image_get_data_float(ima) ;
-<a name="l00513"></a>00513 pimb = cpl_image_get_data_float(imb) ;
-<a name="l00514"></a>00514 pimc = cpl_image_get_data_float(imc) ;
-<a name="l00515"></a>00515
-<a name="l00516"></a>00516 <span class="comment">/* Test sizes */</span>
-<a name="l00517"></a>00517 nx = cpl_image_get_size_x(cpl_imagelist_get(ilist, 0)) ;
-<a name="l00518"></a>00518 ny = cpl_image_get_size_y(cpl_imagelist_get(ilist, 0)) ;
-<a name="l00519"></a>00519 ni = cpl_imagelist_get_size(ilist) ;
-<a name="l00520"></a>00520 <span class="keywordflow">if</span> ((cpl_image_get_size_x(ima) != nx) ||
-<a name="l00521"></a>00521 (cpl_image_get_size_x(imb) != nx) ||
-<a name="l00522"></a>00522 (cpl_image_get_size_x(imc) != nx) ||
-<a name="l00523"></a>00523 (cpl_image_get_size_y(ima) != ny) ||
-<a name="l00524"></a>00524 (cpl_image_get_size_y(imb) != ny) ||
-<a name="l00525"></a>00525 (cpl_image_get_size_y(imc) != ny)) {
-<a name="l00526"></a>00526 cpl_msg_error(cpl_func, <span class="stringliteral">"Incompatible sizes"</span>) ;
-<a name="l00527"></a>00527 cpl_image_delete(ima) ;
-<a name="l00528"></a>00528 cpl_image_delete(imb) ;
-<a name="l00529"></a>00529 cpl_image_delete(imc) ;
-<a name="l00530"></a>00530 <span class="keywordflow">return</span> -1 ;
-<a name="l00531"></a>00531 }
-<a name="l00532"></a>00532
-<a name="l00533"></a>00533 <span class="comment">/* Loop on pixels */</span>
-<a name="l00534"></a>00534 <span class="keywordflow">for</span> (i=0 ; i<nx*ny ; i++) {
-<a name="l00535"></a>00535 <span class="comment">/* Compute the coefficients */</span>
-<a name="l00536"></a>00536 <span class="keywordflow">if</span> (fabs(pima[i]) < 1e-30) {
-<a name="l00537"></a>00537 coeff_1 = coeff_2 = (double)0.0 ;
-<a name="l00538"></a>00538 } <span class="keywordflow">else</span> {
-<a name="l00539"></a>00539 coeff_1 = (double)pimb[i] / (<span class="keywordtype">double</span>)pima[i] ;
-<a name="l00540"></a>00540 coeff_2 = (double)pimc[i] / (<span class="keywordtype">double</span>)pima[i] ;
-<a name="l00541"></a>00541 }
-<a name="l00542"></a>00542 <span class="comment">/* Correct this pixel in each plane */</span>
-<a name="l00543"></a>00543 <span class="keywordflow">for</span> (j=0 ; j<ni ; j++) {
-<a name="l00544"></a>00544 pdata = cpl_image_get_data_float(cpl_imagelist_get(ilist, j)) ;
-<a name="l00545"></a>00545 val = (double)pdata[i] ;
-<a name="l00546"></a>00546 pdata[i]=(float)(val+coeff_1*val*val+coeff_2*val*val*val) ;
-<a name="l00547"></a>00547 }
-<a name="l00548"></a>00548 }
-<a name="l00549"></a>00549 <span class="comment">/* Free and return */</span>
-<a name="l00550"></a>00550 cpl_image_delete(ima) ;
-<a name="l00551"></a>00551 cpl_image_delete(imb) ;
-<a name="l00552"></a>00552 cpl_image_delete(imc) ;
-<a name="l00553"></a>00553 <span class="keywordflow">return</span> 0 ;
-<a name="l00554"></a>00554 }
-<a name="l00555"></a>00555
-<a name="l00556"></a>00556 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00565"></a>00565 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00566"></a><a class="code" href="group__irplib__calib.html#gae650a3e54e1aff329b1b5ee356bcdbde">00566</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__calib.html#gae650a3e54e1aff329b1b5ee356bcdbde" title="Apply the calibration to the frames.">irplib_flat_dark_bpm_calib</a>(
-<a name="l00567"></a>00567 cpl_imagelist * ilist,
-<a name="l00568"></a>00568 <span class="keyword">const</span> <span class="keywordtype">char</span> * flat,
-<a name="l00569"></a>00569 <span class="keyword">const</span> <span class="keywordtype">char</span> * dark,
-<a name="l00570"></a>00570 <span class="keyword">const</span> <span class="keywordtype">char</span> * bpm)
-<a name="l00571"></a>00571 {
-<a name="l00572"></a>00572 cpl_image * dark_image ;
-<a name="l00573"></a>00573 cpl_image * flat_image ;
-<a name="l00574"></a>00574 cpl_mask * bpm_im_bin ;
-<a name="l00575"></a>00575 cpl_image * bpm_im_int ;
-<a name="l00576"></a>00576 <span class="keywordtype">int</span> i ;
-<a name="l00577"></a>00577
-<a name="l00578"></a>00578 <span class="comment">/* Test entries */</span>
-<a name="l00579"></a>00579 <span class="keywordflow">if</span> (ilist == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00580"></a>00580
-<a name="l00581"></a>00581 <span class="comment">/* Dark correction */</span>
-<a name="l00582"></a>00582 <span class="keywordflow">if</span> (dark != NULL) {
-<a name="l00583"></a>00583 cpl_msg_info(cpl_func, <span class="stringliteral">"Subtract the dark to the images"</span>) ;
-<a name="l00584"></a>00584 <span class="comment">/* Load the dark image */</span>
-<a name="l00585"></a>00585 <span class="keywordflow">if</span> ((dark_image = cpl_image_load(dark, CPL_TYPE_FLOAT, 0, 0)) == NULL) {
-<a name="l00586"></a>00586 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the dark %s"</span>, dark) ;
-<a name="l00587"></a>00587 <span class="keywordflow">return</span> -1 ;
-<a name="l00588"></a>00588 }
-<a name="l00589"></a>00589 <span class="comment">/* Apply the dark correction to the images */</span>
-<a name="l00590"></a>00590 <span class="keywordflow">if</span> (cpl_imagelist_subtract_image(ilist, dark_image)!=CPL_ERROR_NONE) {
-<a name="l00591"></a>00591 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot apply the dark to the images"</span>) ;
-<a name="l00592"></a>00592 cpl_image_delete(dark_image) ;
-<a name="l00593"></a>00593 <span class="keywordflow">return</span> -1 ;
-<a name="l00594"></a>00594 }
-<a name="l00595"></a>00595 cpl_image_delete(dark_image) ;
-<a name="l00596"></a>00596 }
-<a name="l00597"></a>00597
-<a name="l00598"></a>00598 <span class="comment">/* Flat-field correction */</span>
-<a name="l00599"></a>00599 <span class="keywordflow">if</span> (flat != NULL) {
-<a name="l00600"></a>00600 cpl_msg_info(cpl_func, <span class="stringliteral">"Divide the images by the flatfield"</span>) ;
-<a name="l00601"></a>00601 <span class="comment">/* Load the flat image */</span>
-<a name="l00602"></a>00602 <span class="keywordflow">if</span> ((flat_image = cpl_image_load(flat, CPL_TYPE_FLOAT, 0, 0)) == NULL) {
-<a name="l00603"></a>00603 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the flat field %s"</span>, flat) ;
-<a name="l00604"></a>00604 <span class="keywordflow">return</span> -1 ;
-<a name="l00605"></a>00605 }
-<a name="l00606"></a>00606 <span class="comment">/* Apply the flatfield correction to the images */</span>
-<a name="l00607"></a>00607 <span class="keywordflow">if</span> (cpl_imagelist_divide_image(ilist, flat_image)!=CPL_ERROR_NONE) {
-<a name="l00608"></a>00608 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot apply the flatfield to the images"</span>) ;
-<a name="l00609"></a>00609 cpl_image_delete(flat_image) ;
-<a name="l00610"></a>00610 <span class="keywordflow">return</span> -1 ;
-<a name="l00611"></a>00611 }
-<a name="l00612"></a>00612 cpl_image_delete(flat_image) ;
-<a name="l00613"></a>00613 }
-<a name="l00614"></a>00614
-<a name="l00615"></a>00615 <span class="comment">/* Correct the bad pixels if requested */</span>
-<a name="l00616"></a>00616 <span class="keywordflow">if</span> (bpm != NULL) {
-<a name="l00617"></a>00617 cpl_msg_info(cpl_func, <span class="stringliteral">"Correct the bad pixels in the images"</span>) ;
-<a name="l00618"></a>00618 <span class="comment">/* Load the bad pixels image */</span>
-<a name="l00619"></a>00619 <span class="keywordflow">if</span> ((bpm_im_int = cpl_image_load(bpm, CPL_TYPE_INT, 0, 0)) == NULL) {
-<a name="l00620"></a>00620 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the bad pixel map %s"</span>, bpm) ;
-<a name="l00621"></a>00621 <span class="keywordflow">return</span> -1 ;
-<a name="l00622"></a>00622 }
-<a name="l00623"></a>00623 <span class="comment">/* Convert the map from integer to binary */</span>
-<a name="l00624"></a>00624 bpm_im_bin = cpl_mask_threshold_image_create(bpm_im_int, -0.5, 0.5) ;
-<a name="l00625"></a>00625 cpl_mask_not(bpm_im_bin) ;
-<a name="l00626"></a>00626 cpl_image_delete(bpm_im_int) ;
-<a name="l00627"></a>00627 <span class="comment">/* Apply the bad pixels cleaning */</span>
-<a name="l00628"></a>00628 <span class="keywordflow">for</span> (i=0 ; i<cpl_imagelist_get_size(ilist) ; i++) {
-<a name="l00629"></a>00629 cpl_image_reject_from_mask(cpl_imagelist_get(ilist, i), bpm_im_bin);
-<a name="l00630"></a>00630 <span class="keywordflow">if</span> (cpl_detector_interpolate_rejected(
-<a name="l00631"></a>00631 cpl_imagelist_get(ilist, i)) != CPL_ERROR_NONE) {
-<a name="l00632"></a>00632 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot clean the bad pixels in obj %d"</span>,
-<a name="l00633"></a>00633 i+1);
-<a name="l00634"></a>00634 cpl_mask_delete(bpm_im_bin) ;
-<a name="l00635"></a>00635 <span class="keywordflow">return</span> -1 ;
-<a name="l00636"></a>00636 }
-<a name="l00637"></a>00637 }
-<a name="l00638"></a>00638 cpl_mask_delete(bpm_im_bin) ;
-<a name="l00639"></a>00639 }
-<a name="l00640"></a>00640
-<a name="l00641"></a>00641 <span class="comment">/* Return */</span>
-<a name="l00642"></a>00642 <span class="keywordflow">return</span> 0 ;
-<a name="l00643"></a>00643 }
-<a name="l00644"></a>00644
+<a name="l00451"></a>00451
+<a name="l00452"></a>00452 cpl_table_set_double(lin_tbl,<span class="stringliteral">"dit"</span>,i,dit);
+<a name="l00453"></a>00453 cpl_table_set_double(lin_tbl,<span class="stringliteral">"med"</span>,i,med);
+<a name="l00454"></a>00454 cpl_table_set_double(lin_tbl,<span class="stringliteral">"avg"</span>,i,avg);
+<a name="l00455"></a>00455 cpl_table_set_double(lin_tbl,<span class="stringliteral">"med_dit"</span>,i,med_dit);
+<a name="l00456"></a>00456 cpl_table_set_double(lin_tbl,<span class="stringliteral">"avg_dit"</span>,i,avg_dit);
+<a name="l00457"></a>00457
+<a name="l00458"></a>00458 }
+<a name="l00459"></a>00459 cpl_table_new_column(lin_tbl,<span class="stringliteral">"adl"</span>, CPL_TYPE_DOUBLE);
+<a name="l00460"></a>00460 med_dit=cpl_vector_get_mean(vec_med_dit);
+<a name="l00461"></a>00461 avg_dit=cpl_vector_get_mean(vec_avg_dit);
+<a name="l00462"></a>00462
+<a name="l00463"></a>00463 <span class="keywordflow">for</span>(i=0;i<nfr;i++) {
+<a name="l00464"></a>00464 dit = cpl_table_get_double(lin_tbl,<span class="stringliteral">"dit"</span>,i,status);
+<a name="l00465"></a>00465 cpl_vector_set(vec_adl,i,dit*med_dit);
+<a name="l00466"></a>00466 cpl_table_set_double(lin_tbl,<span class="stringliteral">"adl"</span>,i,dit*med_dit);
+<a name="l00467"></a>00467 }
+<a name="l00468"></a>00468
+<a name="l00469"></a>00469
+<a name="l00470"></a>00470 cpl_vector_delete(vec_dit);
+<a name="l00471"></a>00471 cpl_vector_delete(vec_adl);
+<a name="l00472"></a>00472 cpl_vector_delete(vec_avg);
+<a name="l00473"></a>00473 cpl_vector_delete(vec_med);
+<a name="l00474"></a>00474 cpl_vector_delete(vec_avg_dit);
+<a name="l00475"></a>00475 cpl_vector_delete(vec_med_dit);
+<a name="l00476"></a>00476
+<a name="l00477"></a>00477
+<a name="l00478"></a>00478 <span class="keywordflow">return</span> lin_tbl;
+<a name="l00479"></a>00479
+<a name="l00480"></a>00480 }
+<a name="l00481"></a>00481
+<a name="l00482"></a>00482
+<a name="l00483"></a>00483 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00492"></a>00492 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00493"></a><a class="code" href="group__irplib__calib.html#gae9b762625dbd2c31c1b59cfd8c15fd90">00493</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__calib.html#gae9b762625dbd2c31c1b59cfd8c15fd90" title="Apply the detector linearity correction.">irplib_detlin_correct</a>(
+<a name="l00494"></a>00494 cpl_imagelist * ilist,
+<a name="l00495"></a>00495 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_a,
+<a name="l00496"></a>00496 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_b,
+<a name="l00497"></a>00497 <span class="keyword">const</span> <span class="keywordtype">char</span> * detlin_c)
+<a name="l00498"></a>00498 {
+<a name="l00499"></a>00499 cpl_image * ima ;
+<a name="l00500"></a>00500 cpl_image * imb ;
+<a name="l00501"></a>00501 cpl_image * imc ;
+<a name="l00502"></a>00502 <span class="keywordtype">float</span> * pima ;
+<a name="l00503"></a>00503 <span class="keywordtype">float</span> * pimb ;
+<a name="l00504"></a>00504 <span class="keywordtype">float</span> * pimc ;
+<a name="l00505"></a>00505 <span class="keywordtype">float</span> * pdata ;
+<a name="l00506"></a>00506 <span class="keywordtype">int</span> nx, ny, ni ;
+<a name="l00507"></a>00507 <span class="keywordtype">double</span> coeff_1, coeff_2, val ;
+<a name="l00508"></a>00508 <span class="keywordtype">int</span> i, j ;
+<a name="l00509"></a>00509
+<a name="l00510"></a>00510 <span class="comment">/* Test entries */</span>
+<a name="l00511"></a>00511 <span class="keywordflow">if</span> (!ilist || !detlin_a || !detlin_b || !detlin_c) <span class="keywordflow">return</span> -1 ;
+<a name="l00512"></a>00512
+<a name="l00513"></a>00513 <span class="comment">/* Load the 3 coeffs images */</span>
+<a name="l00514"></a>00514 ima = cpl_image_load(detlin_a, CPL_TYPE_FLOAT, 0, 0) ;
+<a name="l00515"></a>00515 imb = cpl_image_load(detlin_b, CPL_TYPE_FLOAT, 0, 0) ;
+<a name="l00516"></a>00516 imc = cpl_image_load(detlin_c, CPL_TYPE_FLOAT, 0, 0) ;
+<a name="l00517"></a>00517 <span class="keywordflow">if</span> (!ima || !imb || !imc) {
+<a name="l00518"></a>00518 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the detlin images"</span>) ;
+<a name="l00519"></a>00519 <span class="keywordflow">if</span> (ima) cpl_image_delete(ima) ;
+<a name="l00520"></a>00520 <span class="keywordflow">if</span> (imb) cpl_image_delete(imb) ;
+<a name="l00521"></a>00521 <span class="keywordflow">if</span> (imc) cpl_image_delete(imc) ;
+<a name="l00522"></a>00522 <span class="keywordflow">return</span> -1 ;
+<a name="l00523"></a>00523 }
+<a name="l00524"></a>00524 pima = cpl_image_get_data_float(ima) ;
+<a name="l00525"></a>00525 pimb = cpl_image_get_data_float(imb) ;
+<a name="l00526"></a>00526 pimc = cpl_image_get_data_float(imc) ;
+<a name="l00527"></a>00527
+<a name="l00528"></a>00528 <span class="comment">/* Test sizes */</span>
+<a name="l00529"></a>00529 nx = cpl_image_get_size_x(cpl_imagelist_get(ilist, 0)) ;
+<a name="l00530"></a>00530 ny = cpl_image_get_size_y(cpl_imagelist_get(ilist, 0)) ;
+<a name="l00531"></a>00531 ni = cpl_imagelist_get_size(ilist) ;
+<a name="l00532"></a>00532 <span class="keywordflow">if</span> ((cpl_image_get_size_x(ima) != nx) ||
+<a name="l00533"></a>00533 (cpl_image_get_size_x(imb) != nx) ||
+<a name="l00534"></a>00534 (cpl_image_get_size_x(imc) != nx) ||
+<a name="l00535"></a>00535 (cpl_image_get_size_y(ima) != ny) ||
+<a name="l00536"></a>00536 (cpl_image_get_size_y(imb) != ny) ||
+<a name="l00537"></a>00537 (cpl_image_get_size_y(imc) != ny)) {
+<a name="l00538"></a>00538 cpl_msg_error(cpl_func, <span class="stringliteral">"Incompatible sizes"</span>) ;
+<a name="l00539"></a>00539 cpl_image_delete(ima) ;
+<a name="l00540"></a>00540 cpl_image_delete(imb) ;
+<a name="l00541"></a>00541 cpl_image_delete(imc) ;
+<a name="l00542"></a>00542 <span class="keywordflow">return</span> -1 ;
+<a name="l00543"></a>00543 }
+<a name="l00544"></a>00544
+<a name="l00545"></a>00545 <span class="comment">/* Loop on pixels */</span>
+<a name="l00546"></a>00546 <span class="keywordflow">for</span> (i=0 ; i<nx*ny ; i++) {
+<a name="l00547"></a>00547 <span class="comment">/* Compute the coefficients */</span>
+<a name="l00548"></a>00548 <span class="keywordflow">if</span> (fabs(pima[i]) < 1e-30) {
+<a name="l00549"></a>00549 coeff_1 = coeff_2 = (double)0.0 ;
+<a name="l00550"></a>00550 } <span class="keywordflow">else</span> {
+<a name="l00551"></a>00551 coeff_1 = (double)pimb[i] / (<span class="keywordtype">double</span>)pima[i] ;
+<a name="l00552"></a>00552 coeff_2 = (double)pimc[i] / (<span class="keywordtype">double</span>)pima[i] ;
+<a name="l00553"></a>00553 }
+<a name="l00554"></a>00554 <span class="comment">/* Correct this pixel in each plane */</span>
+<a name="l00555"></a>00555 <span class="keywordflow">for</span> (j=0 ; j<ni ; j++) {
+<a name="l00556"></a>00556 pdata = cpl_image_get_data_float(cpl_imagelist_get(ilist, j)) ;
+<a name="l00557"></a>00557 val = (double)pdata[i] ;
+<a name="l00558"></a>00558 pdata[i]=(float)(val+coeff_1*val*val+coeff_2*val*val*val) ;
+<a name="l00559"></a>00559 }
+<a name="l00560"></a>00560 }
+<a name="l00561"></a>00561 <span class="comment">/* Free and return */</span>
+<a name="l00562"></a>00562 cpl_image_delete(ima) ;
+<a name="l00563"></a>00563 cpl_image_delete(imb) ;
+<a name="l00564"></a>00564 cpl_image_delete(imc) ;
+<a name="l00565"></a>00565 <span class="keywordflow">return</span> 0 ;
+<a name="l00566"></a>00566 }
+<a name="l00567"></a>00567
+<a name="l00568"></a>00568 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00577"></a>00577 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00578"></a><a class="code" href="group__irplib__calib.html#gae650a3e54e1aff329b1b5ee356bcdbde">00578</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__calib.html#gae650a3e54e1aff329b1b5ee356bcdbde" title="Apply the calibration to the frames.">irplib_flat_dark_bpm_calib</a>(
+<a name="l00579"></a>00579 cpl_imagelist * ilist,
+<a name="l00580"></a>00580 <span class="keyword">const</span> <span class="keywordtype">char</span> * flat,
+<a name="l00581"></a>00581 <span class="keyword">const</span> <span class="keywordtype">char</span> * dark,
+<a name="l00582"></a>00582 <span class="keyword">const</span> <span class="keywordtype">char</span> * bpm)
+<a name="l00583"></a>00583 {
+<a name="l00584"></a>00584 cpl_image * dark_image ;
+<a name="l00585"></a>00585 cpl_image * flat_image ;
+<a name="l00586"></a>00586 cpl_mask * bpm_im_bin ;
+<a name="l00587"></a>00587 cpl_image * bpm_im_int ;
+<a name="l00588"></a>00588 <span class="keywordtype">int</span> i ;
+<a name="l00589"></a>00589
+<a name="l00590"></a>00590 <span class="comment">/* Test entries */</span>
+<a name="l00591"></a>00591 <span class="keywordflow">if</span> (ilist == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l00592"></a>00592
+<a name="l00593"></a>00593 <span class="comment">/* Dark correction */</span>
+<a name="l00594"></a>00594 <span class="keywordflow">if</span> (dark != NULL) {
+<a name="l00595"></a>00595 cpl_msg_info(cpl_func, <span class="stringliteral">"Subtract the dark to the images"</span>) ;
+<a name="l00596"></a>00596 <span class="comment">/* Load the dark image */</span>
+<a name="l00597"></a>00597 <span class="keywordflow">if</span> ((dark_image = cpl_image_load(dark, CPL_TYPE_FLOAT, 0, 0)) == NULL) {
+<a name="l00598"></a>00598 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the dark %s"</span>, dark) ;
+<a name="l00599"></a>00599 <span class="keywordflow">return</span> -1 ;
+<a name="l00600"></a>00600 }
+<a name="l00601"></a>00601 <span class="comment">/* Apply the dark correction to the images */</span>
+<a name="l00602"></a>00602 <span class="keywordflow">if</span> (cpl_imagelist_subtract_image(ilist, dark_image)!=CPL_ERROR_NONE) {
+<a name="l00603"></a>00603 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot apply the dark to the images"</span>) ;
+<a name="l00604"></a>00604 cpl_image_delete(dark_image) ;
+<a name="l00605"></a>00605 <span class="keywordflow">return</span> -1 ;
+<a name="l00606"></a>00606 }
+<a name="l00607"></a>00607 cpl_image_delete(dark_image) ;
+<a name="l00608"></a>00608 }
+<a name="l00609"></a>00609
+<a name="l00610"></a>00610 <span class="comment">/* Flat-field correction */</span>
+<a name="l00611"></a>00611 <span class="keywordflow">if</span> (flat != NULL) {
+<a name="l00612"></a>00612 cpl_msg_info(cpl_func, <span class="stringliteral">"Divide the images by the flatfield"</span>) ;
+<a name="l00613"></a>00613 <span class="comment">/* Load the flat image */</span>
+<a name="l00614"></a>00614 <span class="keywordflow">if</span> ((flat_image = cpl_image_load(flat, CPL_TYPE_FLOAT, 0, 0)) == NULL) {
+<a name="l00615"></a>00615 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the flat field %s"</span>, flat) ;
+<a name="l00616"></a>00616 <span class="keywordflow">return</span> -1 ;
+<a name="l00617"></a>00617 }
+<a name="l00618"></a>00618 <span class="comment">/* Apply the flatfield correction to the images */</span>
+<a name="l00619"></a>00619 <span class="keywordflow">if</span> (cpl_imagelist_divide_image(ilist, flat_image)!=CPL_ERROR_NONE) {
+<a name="l00620"></a>00620 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot apply the flatfield to the images"</span>) ;
+<a name="l00621"></a>00621 cpl_image_delete(flat_image) ;
+<a name="l00622"></a>00622 <span class="keywordflow">return</span> -1 ;
+<a name="l00623"></a>00623 }
+<a name="l00624"></a>00624 cpl_image_delete(flat_image) ;
+<a name="l00625"></a>00625 }
+<a name="l00626"></a>00626
+<a name="l00627"></a>00627 <span class="comment">/* Correct the bad pixels if requested */</span>
+<a name="l00628"></a>00628 <span class="keywordflow">if</span> (bpm != NULL) {
+<a name="l00629"></a>00629 cpl_msg_info(cpl_func, <span class="stringliteral">"Correct the bad pixels in the images"</span>) ;
+<a name="l00630"></a>00630 <span class="comment">/* Load the bad pixels image */</span>
+<a name="l00631"></a>00631 <span class="keywordflow">if</span> ((bpm_im_int = cpl_image_load(bpm, CPL_TYPE_INT, 0, 0)) == NULL) {
+<a name="l00632"></a>00632 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the bad pixel map %s"</span>, bpm) ;
+<a name="l00633"></a>00633 <span class="keywordflow">return</span> -1 ;
+<a name="l00634"></a>00634 }
+<a name="l00635"></a>00635 <span class="comment">/* Convert the map from integer to binary */</span>
+<a name="l00636"></a>00636 bpm_im_bin = cpl_mask_threshold_image_create(bpm_im_int, -0.5, 0.5) ;
+<a name="l00637"></a>00637 cpl_mask_not(bpm_im_bin) ;
+<a name="l00638"></a>00638 cpl_image_delete(bpm_im_int) ;
+<a name="l00639"></a>00639 <span class="comment">/* Apply the bad pixels cleaning */</span>
+<a name="l00640"></a>00640 <span class="keywordflow">for</span> (i=0 ; i<cpl_imagelist_get_size(ilist) ; i++) {
+<a name="l00641"></a>00641 cpl_image_reject_from_mask(cpl_imagelist_get(ilist, i), bpm_im_bin);
+<a name="l00642"></a>00642 <span class="keywordflow">if</span> (cpl_detector_interpolate_rejected(
+<a name="l00643"></a>00643 cpl_imagelist_get(ilist, i)) != CPL_ERROR_NONE) {
+<a name="l00644"></a>00644 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot clean the bad pixels in obj %d"</span>,
+<a name="l00645"></a>00645 i+1);
+<a name="l00646"></a>00646 cpl_mask_delete(bpm_im_bin) ;
+<a name="l00647"></a>00647 <span class="keywordflow">return</span> -1 ;
+<a name="l00648"></a>00648 }
+<a name="l00649"></a>00649 }
+<a name="l00650"></a>00650 cpl_mask_delete(bpm_im_bin) ;
+<a name="l00651"></a>00651 }
+<a name="l00652"></a>00652
+<a name="l00653"></a>00653 <span class="comment">/* Return */</span>
+<a name="l00654"></a>00654 <span class="keywordflow">return</span> 0 ;
+<a name="l00655"></a>00655 }
+<a name="l00656"></a>00656
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__calib_8h_source.html b/html/irplib__calib_8h_source.html
index 21a3b0b..2c4733c 100644
--- a/html/irplib__calib_8h_source.html
+++ b/html/irplib__calib_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/02/12 10:34:51 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_CALIB_H</span>
@@ -58,7 +58,7 @@
<a name="l00048"></a>00048
<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__cat_8c_source.html b/html/irplib__cat_8c_source.html
index b70a268..293be42 100644
--- a/html/irplib__cat_8c_source.html
+++ b/html/irplib__cat_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/12/01 12:34:25 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -408,7 +408,7 @@
<a name="l00466"></a>00466 <span class="keywordflow">return</span>(out);
<a name="l00467"></a>00467 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__cat_8h_source.html b/html/irplib__cat_8h_source.html
index 35efbcc..f301c2b 100644
--- a/html/irplib__cat_8h_source.html
+++ b/html/irplib__cat_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/12/16 14:49:52 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_CAT_H</span>
@@ -66,7 +66,7 @@
<a name="l00056"></a>00056
<a name="l00057"></a>00057 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__distortion_8c_source.html b/html/irplib__distortion_8c_source.html
index 8c501fe..85bab8d 100644
--- a/html/irplib__distortion_8c_source.html
+++ b/html/irplib__distortion_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_distortion.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_distortion.c,v 1.51 2012/02/03 15:08:14 llundin Exp $</span>
+<h1>irplib_distortion.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_distortion.c,v 1.52 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/02/03 15:08:14 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.51 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.52 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -1260,7 +1260,7 @@
<a name="l01397"></a>01397 }
<a name="l01398"></a>01398
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__distortion_8h_source.html b/html/irplib__distortion_8h_source.html
index 6beefb1..934f7df 100644
--- a/html/irplib__distortion_8h_source.html
+++ b/html/irplib__distortion_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_distortion.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_distortion.h,v 1.5 2006/07/26 14:47:34 yjung Exp $</span>
+<h1>irplib_distortion.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_distortion.h,v 1.6 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/07/26 14:47:34 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_DISTORTION_H</span>
@@ -53,7 +53,7 @@
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__flat_8c_source.html b/html/irplib__flat_8c_source.html
index 0e0af4b..981e17f 100644
--- a/html/irplib__flat_8c_source.html
+++ b/html/irplib__flat_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/08/07 12:15:41 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.15 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -335,7 +335,7 @@
<a name="l00401"></a>00401
<a name="l00402"></a>00402
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__flat_8h_source.html b/html/irplib__flat_8h_source.html
index e427401..4c5355c 100644
--- a/html/irplib__flat_8h_source.html
+++ b/html/irplib__flat_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2005/09/15 11:47:16 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_FLAT_H</span>
@@ -49,7 +49,7 @@
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__framelist_8c_source.html b/html/irplib__framelist_8c_source.html
index 0a10fb0..925ff5e 100644
--- a/html/irplib__framelist_8c_source.html
+++ b/html/irplib__framelist_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_framelist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_framelist.c,v 1.29 2012/02/03 13:55:14 llundin Exp $</span>
+<h1>irplib_framelist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_framelist.c,v 1.30 2013/02/27 16:05:13 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package </span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/02/03 13:55:14 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.29 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/02/27 16:05:13 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.30 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028
@@ -45,16 +45,16 @@
<a name="l00035"></a>00035 <span class="comment"> Includes</span>
<a name="l00036"></a>00036 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00037"></a>00037
-<a name="l00038"></a>00038 <span class="preprocessor">#include <stdio.h></span>
-<a name="l00039"></a>00039 <span class="preprocessor">#include <string.h></span>
-<a name="l00040"></a>00040 <span class="preprocessor">#include <sys/types.h></span>
-<a name="l00041"></a>00041 <span class="preprocessor">#include <regex.h></span>
-<a name="l00042"></a>00042 <span class="preprocessor">#include <math.h></span>
-<a name="l00043"></a>00043 <span class="preprocessor">#include <assert.h></span>
-<a name="l00044"></a>00044
-<a name="l00045"></a>00045 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00046"></a>00046
-<a name="l00047"></a>00047 <span class="preprocessor">#include "irplib_framelist.h"</span>
+<a name="l00038"></a>00038 <span class="preprocessor">#include "irplib_framelist.h"</span>
+<a name="l00039"></a>00039 <span class="preprocessor">#include "irplib_utils.h"</span>
+<a name="l00040"></a>00040 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00041"></a>00041
+<a name="l00042"></a>00042 <span class="preprocessor">#include <stdio.h></span>
+<a name="l00043"></a>00043 <span class="preprocessor">#include <string.h></span>
+<a name="l00044"></a>00044 <span class="preprocessor">#include <sys/types.h></span>
+<a name="l00045"></a>00045 <span class="preprocessor">#include <regex.h></span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include <math.h></span>
+<a name="l00047"></a>00047 <span class="preprocessor">#include <assert.h></span>
<a name="l00048"></a>00048
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="comment">/*-----------------------------------------------------------------------------</span>
@@ -325,644 +325,646 @@
<a name="l00455"></a>00455 <span class="comment">/*----------------------------------------------------------------------------*/</span>
<a name="l00456"></a><a class="code" href="group__irplib__framelist.html#gaba8797bbb8394f5574cd88b2f1984387">00456</a> cpl_frame * <a class="code" href="group__irplib__framelist.html#gaba8797bbb8394f5574cd88b2f1984387" title="Get the specified frame from the framelist.">irplib_framelist_get</a>(irplib_framelist * <span class="keyword">self</span>, <span class="keywordtype">int</span> pos)
<a name="l00457"></a>00457 {
-<a name="l00458"></a>00458 <span class="keywordflow">return</span> (cpl_frame *)<a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f" title="Get the specified frame from the framelist.">irplib_framelist_get_const</a>(<span class="keyword">self</span>, pos);
-<a name="l00459"></a>00459
-<a name="l00460"></a>00460 }
-<a name="l00461"></a>00461
+<a name="l00458"></a>00458 IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
+<a name="l00459"></a>00459 <span class="keywordflow">return</span> (cpl_frame *)<a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f" title="Get the specified frame from the framelist.">irplib_framelist_get_const</a>(<span class="keyword">self</span>, pos);
+<a name="l00460"></a>00460 IRPLIB_DIAG_PRAGMA_POP;
+<a name="l00461"></a>00461 }
<a name="l00462"></a>00462
-<a name="l00463"></a>00463 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00471"></a>00471 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00472"></a><a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f">00472</a> <span class="keyword">const</span> cpl_frame * <a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f" title="Get the specified frame from the framelist.">irplib_framelist_get_const</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
-<a name="l00473"></a>00473 <span class="keywordtype">int</span> pos)
-<a name="l00474"></a>00474 {
-<a name="l00475"></a>00475
-<a name="l00476"></a>00476 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
-<a name="l00477"></a>00477 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
-<a name="l00478"></a>00478 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
-<a name="l00479"></a>00479
-<a name="l00480"></a>00480 <span class="keywordflow">return</span> <span class="keyword">self</span>->frame[pos];
-<a name="l00481"></a>00481
-<a name="l00482"></a>00482 }
-<a name="l00483"></a>00483
+<a name="l00463"></a>00463
+<a name="l00464"></a>00464 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00472"></a>00472 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00473"></a><a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f">00473</a> <span class="keyword">const</span> cpl_frame * <a class="code" href="group__irplib__framelist.html#ga93d8f903729ea4b6fcb3eca85935716f" title="Get the specified frame from the framelist.">irplib_framelist_get_const</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
+<a name="l00474"></a>00474 <span class="keywordtype">int</span> pos)
+<a name="l00475"></a>00475 {
+<a name="l00476"></a>00476
+<a name="l00477"></a>00477 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
+<a name="l00478"></a>00478 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
+<a name="l00479"></a>00479 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
+<a name="l00480"></a>00480
+<a name="l00481"></a>00481 <span class="keywordflow">return</span> <span class="keyword">self</span>->frame[pos];
+<a name="l00482"></a>00482
+<a name="l00483"></a>00483 }
<a name="l00484"></a>00484
-<a name="l00485"></a>00485 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00494"></a>00494 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00495"></a><a class="code" href="group__irplib__framelist.html#gada2c2e3f530a6dff763402eefceb5600">00495</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gada2c2e3f530a6dff763402eefceb5600" title="Duplicate a propertylist to the specified position in the framelist.">irplib_framelist_set_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
-<a name="l00496"></a>00496 <span class="keywordtype">int</span> pos,
-<a name="l00497"></a>00497 <span class="keyword">const</span> cpl_propertylist * list)
-<a name="l00498"></a>00498 {
-<a name="l00499"></a>00499
-<a name="l00500"></a>00500 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00501"></a>00501 cpl_ensure_code(list != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00502"></a>00502 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00503"></a>00503 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l00504"></a>00504
-<a name="l00505"></a>00505 cpl_propertylist_delete(self->propertylist[pos]);
-<a name="l00506"></a>00506
-<a name="l00507"></a>00507 <span class="keyword">self</span>->propertylist[pos] = cpl_propertylist_duplicate(list);
-<a name="l00508"></a>00508
-<a name="l00509"></a>00509 cpl_ensure_code(self->propertylist[pos] != NULL, cpl_error_get_code());
-<a name="l00510"></a>00510
-<a name="l00511"></a>00511 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00512"></a>00512
-<a name="l00513"></a>00513 }
-<a name="l00514"></a>00514
+<a name="l00485"></a>00485
+<a name="l00486"></a>00486 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00495"></a>00495 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00496"></a><a class="code" href="group__irplib__framelist.html#gada2c2e3f530a6dff763402eefceb5600">00496</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gada2c2e3f530a6dff763402eefceb5600" title="Duplicate a propertylist to the specified position in the framelist.">irplib_framelist_set_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
+<a name="l00497"></a>00497 <span class="keywordtype">int</span> pos,
+<a name="l00498"></a>00498 <span class="keyword">const</span> cpl_propertylist * list)
+<a name="l00499"></a>00499 {
+<a name="l00500"></a>00500
+<a name="l00501"></a>00501 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00502"></a>00502 cpl_ensure_code(list != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00503"></a>00503 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00504"></a>00504 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l00505"></a>00505
+<a name="l00506"></a>00506 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00507"></a>00507
+<a name="l00508"></a>00508 <span class="keyword">self</span>->propertylist[pos] = cpl_propertylist_duplicate(list);
+<a name="l00509"></a>00509
+<a name="l00510"></a>00510 cpl_ensure_code(self->propertylist[pos] != NULL, cpl_error_get_code());
+<a name="l00511"></a>00511
+<a name="l00512"></a>00512 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00513"></a>00513
+<a name="l00514"></a>00514 }
<a name="l00515"></a>00515
-<a name="l00516"></a>00516 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00527"></a>00527 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00528"></a><a class="code" href="group__irplib__framelist.html#gab4858b1e9164f3a6cffcf40270f89032">00528</a> cpl_propertylist * <a class="code" href="group__irplib__framelist.html#gab4858b1e9164f3a6cffcf40270f89032" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
-<a name="l00529"></a>00529 <span class="keywordtype">int</span> pos)
-<a name="l00530"></a>00530 {
-<a name="l00531"></a>00531
-<a name="l00532"></a>00532 <span class="keywordflow">return</span> (cpl_propertylist *)<a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist_const</a>(<span class="keyword">self</span>,
-<a name="l00533"></a>00533 pos);
-<a name="l00534"></a>00534
-<a name="l00535"></a>00535 }
-<a name="l00536"></a>00536
-<a name="l00537"></a>00537
-<a name="l00538"></a>00538 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00549"></a>00549 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00550"></a><a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c">00550</a> <span class="keyword">const</span> cpl_propertylist * <a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist_const</a>(
-<a name="l00551"></a>00551 <span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
-<a name="l00552"></a>00552 <span class="keywordtype">int</span> pos)
-<a name="l00553"></a>00553 {
-<a name="l00554"></a>00554 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
-<a name="l00555"></a>00555 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
-<a name="l00556"></a>00556 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
-<a name="l00557"></a>00557
-<a name="l00558"></a>00558 cpl_ensure(self->propertylist[pos] != NULL,
-<a name="l00559"></a>00559 CPL_ERROR_DATA_NOT_FOUND, NULL);
-<a name="l00560"></a>00560
-<a name="l00561"></a>00561 <span class="keywordflow">return</span> <span class="keyword">self</span>->propertylist[pos];
+<a name="l00516"></a>00516
+<a name="l00517"></a>00517 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00528"></a>00528 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00529"></a><a class="code" href="group__irplib__framelist.html#gab4858b1e9164f3a6cffcf40270f89032">00529</a> cpl_propertylist * <a class="code" href="group__irplib__framelist.html#gab4858b1e9164f3a6cffcf40270f89032" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
+<a name="l00530"></a>00530 <span class="keywordtype">int</span> pos)
+<a name="l00531"></a>00531 {
+<a name="l00532"></a>00532
+<a name="l00533"></a>00533 IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
+<a name="l00534"></a>00534 <span class="keywordflow">return</span> (cpl_propertylist *)<a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist_const</a>(<span class="keyword">self</span>,
+<a name="l00535"></a>00535 pos);
+<a name="l00536"></a>00536 IRPLIB_DIAG_PRAGMA_POP;
+<a name="l00537"></a>00537 }
+<a name="l00538"></a>00538
+<a name="l00539"></a>00539
+<a name="l00540"></a>00540 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00551"></a>00551 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00552"></a><a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c">00552</a> <span class="keyword">const</span> cpl_propertylist * <a class="code" href="group__irplib__framelist.html#ga7700dadcf17db5b86409e6cef233af4c" title="Get the propertylist of the specified frame in the framelist.">irplib_framelist_get_propertylist_const</a>(
+<a name="l00553"></a>00553 <span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
+<a name="l00554"></a>00554 <span class="keywordtype">int</span> pos)
+<a name="l00555"></a>00555 {
+<a name="l00556"></a>00556 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
+<a name="l00557"></a>00557 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
+<a name="l00558"></a>00558 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
+<a name="l00559"></a>00559
+<a name="l00560"></a>00560 cpl_ensure(self->propertylist[pos] != NULL,
+<a name="l00561"></a>00561 CPL_ERROR_DATA_NOT_FOUND, NULL);
<a name="l00562"></a>00562
-<a name="l00563"></a>00563 }
+<a name="l00563"></a>00563 <span class="keywordflow">return</span> <span class="keyword">self</span>->propertylist[pos];
<a name="l00564"></a>00564
-<a name="l00565"></a>00565
-<a name="l00566"></a>00566 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00580"></a>00580 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00581"></a><a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005">00581</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005" title="Load the propertylist of the specified frame in the framelist.">irplib_framelist_load_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
-<a name="l00582"></a>00582 <span class="keywordtype">int</span> pos, <span class="keywordtype">int</span> ind,
-<a name="l00583"></a>00583 <span class="keyword">const</span> <span class="keywordtype">char</span> * regexp,
-<a name="l00584"></a>00584 cpl_boolean invert)
-<a name="l00585"></a>00585 {
-<a name="l00586"></a>00586
-<a name="l00587"></a>00587 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename;
+<a name="l00565"></a>00565 }
+<a name="l00566"></a>00566
+<a name="l00567"></a>00567
+<a name="l00568"></a>00568 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00582"></a>00582 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00583"></a><a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005">00583</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005" title="Load the propertylist of the specified frame in the framelist.">irplib_framelist_load_propertylist</a>(irplib_framelist * <span class="keyword">self</span>,
+<a name="l00584"></a>00584 <span class="keywordtype">int</span> pos, <span class="keywordtype">int</span> ind,
+<a name="l00585"></a>00585 <span class="keyword">const</span> <span class="keywordtype">char</span> * regexp,
+<a name="l00586"></a>00586 cpl_boolean invert)
+<a name="l00587"></a>00587 {
<a name="l00588"></a>00588
-<a name="l00589"></a>00589
-<a name="l00590"></a>00590 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00591"></a>00591 cpl_ensure_code(regexp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00592"></a>00592 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00593"></a>00593 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l00594"></a>00594
-<a name="l00595"></a>00595 filename = cpl_frame_get_filename(self->frame[pos]);
+<a name="l00589"></a>00589 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename;
+<a name="l00590"></a>00590
+<a name="l00591"></a>00591
+<a name="l00592"></a>00592 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00593"></a>00593 cpl_ensure_code(regexp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00594"></a>00594 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00595"></a>00595 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
<a name="l00596"></a>00596
-<a name="l00597"></a>00597 cpl_ensure_code(filename != NULL, cpl_error_get_code());
+<a name="l00597"></a>00597 filename = cpl_frame_get_filename(self->frame[pos]);
<a name="l00598"></a>00598
-<a name="l00599"></a>00599 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00599"></a>00599 cpl_ensure_code(filename != NULL, cpl_error_get_code());
<a name="l00600"></a>00600
-<a name="l00601"></a>00601 <span class="keyword">self</span>->propertylist[pos] = cpl_propertylist_load_regexp(filename, ind,
-<a name="l00602"></a>00602 regexp,
-<a name="l00603"></a>00603 invert ? 1 : 0);
-<a name="l00604"></a>00604
-<a name="l00605"></a>00605 <span class="keywordflow">if</span> (self->propertylist[pos] == NULL) {
-<a name="l00606"></a>00606 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l00607"></a>00607 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(), <span class="stringliteral">"Could "</span>
-<a name="l00608"></a>00608 <span class="stringliteral">"not load FITS header from '%s' using "</span>
-<a name="l00609"></a>00609 <span class="stringliteral">"regexp '%s'"</span>, filename, regexp);
-<a name="l00610"></a>00610 <span class="preprocessor">#else</span>
-<a name="l00611"></a>00611 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l00612"></a>00612 <span class="stringliteral">"Could not load FITS header"</span>);
-<a name="l00613"></a>00613 <span class="preprocessor">#endif</span>
-<a name="l00614"></a>00614 <span class="preprocessor"></span> }
-<a name="l00615"></a>00615
-<a name="l00616"></a>00616 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00601"></a>00601 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00602"></a>00602
+<a name="l00603"></a>00603 <span class="keyword">self</span>->propertylist[pos] = cpl_propertylist_load_regexp(filename, ind,
+<a name="l00604"></a>00604 regexp,
+<a name="l00605"></a>00605 invert ? 1 : 0);
+<a name="l00606"></a>00606
+<a name="l00607"></a>00607 <span class="keywordflow">if</span> (self->propertylist[pos] == NULL) {
+<a name="l00608"></a>00608 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l00609"></a>00609 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(), <span class="stringliteral">"Could "</span>
+<a name="l00610"></a>00610 <span class="stringliteral">"not load FITS header from '%s' using "</span>
+<a name="l00611"></a>00611 <span class="stringliteral">"regexp '%s'"</span>, filename, regexp);
+<a name="l00612"></a>00612 <span class="preprocessor">#else</span>
+<a name="l00613"></a>00613 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l00614"></a>00614 <span class="stringliteral">"Could not load FITS header"</span>);
+<a name="l00615"></a>00615 <span class="preprocessor">#endif</span>
+<a name="l00616"></a>00616 <span class="preprocessor"></span> }
<a name="l00617"></a>00617
-<a name="l00618"></a>00618 }
+<a name="l00618"></a>00618 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00619"></a>00619
-<a name="l00620"></a>00620
-<a name="l00621"></a>00621 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00635"></a>00635 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00636"></a><a class="code" href="group__irplib__framelist.html#gaf9204681e0b6aa2d952c974dcbd8729d">00636</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gaf9204681e0b6aa2d952c974dcbd8729d" title="Load the propertylists of all frames in the framelist.">irplib_framelist_load_propertylist_all</a>(irplib_framelist * <span class="keyword">self</span>,
-<a name="l00637"></a>00637 <span class="keywordtype">int</span> ind,
-<a name="l00638"></a>00638 <span class="keyword">const</span> <span class="keywordtype">char</span> * regexp,
-<a name="l00639"></a>00639 cpl_boolean invert)
-<a name="l00640"></a>00640 {
-<a name="l00641"></a>00641
-<a name="l00642"></a>00642 <span class="keywordtype">int</span> nprops = 0;
-<a name="l00643"></a>00643 <span class="keywordtype">int</span> nfiles = 0;
-<a name="l00644"></a>00644 <span class="keywordtype">int</span> i;
-<a name="l00645"></a>00645
-<a name="l00646"></a>00646 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00647"></a>00647 cpl_ensure_code(regexp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00648"></a>00648
-<a name="l00649"></a>00649 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++) {
-<a name="l00650"></a>00650 <span class="keywordflow">if</span> (self->propertylist[i] == NULL)
-<a name="l00651"></a>00651 cpl_ensure_code(!<a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005" title="Load the propertylist of the specified frame in the framelist.">irplib_framelist_load_propertylist</a>(<span class="keyword">self</span>, i,
-<a name="l00652"></a>00652 ind,
-<a name="l00653"></a>00653 regexp,
-<a name="l00654"></a>00654 invert),
-<a name="l00655"></a>00655 cpl_error_get_code());
-<a name="l00656"></a>00656 <span class="comment">/* Counting just for diagnostics - this actually causes</span>
-<a name="l00657"></a>00657 <span class="comment"> the whole list to be reiterated :-( */</span>
-<a name="l00658"></a>00658 nprops += cpl_propertylist_get_size(self->propertylist[i]);
-<a name="l00659"></a>00659 nfiles++;
-<a name="l00660"></a>00660 }
-<a name="l00661"></a>00661
-<a name="l00662"></a>00662 cpl_msg_info(cpl_func, <span class="stringliteral">"List of %d frames has %d properties"</span>, nfiles,
-<a name="l00663"></a>00663 nprops);
-<a name="l00664"></a>00664
-<a name="l00665"></a>00665 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00620"></a>00620 }
+<a name="l00621"></a>00621
+<a name="l00622"></a>00622
+<a name="l00623"></a>00623 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00637"></a>00637 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00638"></a><a class="code" href="group__irplib__framelist.html#gaf9204681e0b6aa2d952c974dcbd8729d">00638</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gaf9204681e0b6aa2d952c974dcbd8729d" title="Load the propertylists of all frames in the framelist.">irplib_framelist_load_propertylist_all</a>(irplib_framelist * <span class="keyword">self</span>,
+<a name="l00639"></a>00639 <span class="keywordtype">int</span> ind,
+<a name="l00640"></a>00640 <span class="keyword">const</span> <span class="keywordtype">char</span> * regexp,
+<a name="l00641"></a>00641 cpl_boolean invert)
+<a name="l00642"></a>00642 {
+<a name="l00643"></a>00643
+<a name="l00644"></a>00644 <span class="keywordtype">int</span> nprops = 0;
+<a name="l00645"></a>00645 <span class="keywordtype">int</span> nfiles = 0;
+<a name="l00646"></a>00646 <span class="keywordtype">int</span> i;
+<a name="l00647"></a>00647
+<a name="l00648"></a>00648 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00649"></a>00649 cpl_ensure_code(regexp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00650"></a>00650
+<a name="l00651"></a>00651 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++) {
+<a name="l00652"></a>00652 <span class="keywordflow">if</span> (self->propertylist[i] == NULL)
+<a name="l00653"></a>00653 cpl_ensure_code(!<a class="code" href="group__irplib__framelist.html#ga6ce5701e84915514975d09e0100c6005" title="Load the propertylist of the specified frame in the framelist.">irplib_framelist_load_propertylist</a>(<span class="keyword">self</span>, i,
+<a name="l00654"></a>00654 ind,
+<a name="l00655"></a>00655 regexp,
+<a name="l00656"></a>00656 invert),
+<a name="l00657"></a>00657 cpl_error_get_code());
+<a name="l00658"></a>00658 <span class="comment">/* Counting just for diagnostics - this actually causes</span>
+<a name="l00659"></a>00659 <span class="comment"> the whole list to be reiterated :-( */</span>
+<a name="l00660"></a>00660 nprops += cpl_propertylist_get_size(self->propertylist[i]);
+<a name="l00661"></a>00661 nfiles++;
+<a name="l00662"></a>00662 }
+<a name="l00663"></a>00663
+<a name="l00664"></a>00664 cpl_msg_info(cpl_func, <span class="stringliteral">"List of %d frames has %d properties"</span>, nfiles,
+<a name="l00665"></a>00665 nprops);
<a name="l00666"></a>00666
-<a name="l00667"></a>00667 }
+<a name="l00667"></a>00667 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00668"></a>00668
-<a name="l00669"></a>00669
+<a name="l00669"></a>00669 }
<a name="l00670"></a>00670
-<a name="l00671"></a>00671 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00679"></a>00679 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00680"></a><a class="code" href="group__irplib__framelist.html#gab11bb60e44dea926cd50ee80c7fbbd14">00680</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gab11bb60e44dea926cd50ee80c7fbbd14" title="Set the tag of all frames in the list.">irplib_framelist_set_tag_all</a>(irplib_framelist * <span class="keyword">self</span>,
-<a name="l00681"></a>00681 <span class="keyword">const</span> <span class="keywordtype">char</span> * tag)
-<a name="l00682"></a>00682 {
-<a name="l00683"></a>00683
-<a name="l00684"></a>00684 <span class="keywordtype">int</span> i;
+<a name="l00671"></a>00671
+<a name="l00672"></a>00672
+<a name="l00673"></a>00673 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00681"></a>00681 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00682"></a><a class="code" href="group__irplib__framelist.html#gab11bb60e44dea926cd50ee80c7fbbd14">00682</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gab11bb60e44dea926cd50ee80c7fbbd14" title="Set the tag of all frames in the list.">irplib_framelist_set_tag_all</a>(irplib_framelist * <span class="keyword">self</span>,
+<a name="l00683"></a>00683 <span class="keyword">const</span> <span class="keywordtype">char</span> * tag)
+<a name="l00684"></a>00684 {
<a name="l00685"></a>00685
-<a name="l00686"></a>00686 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00687"></a>00687 cpl_ensure_code(tag != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00688"></a>00688
-<a name="l00689"></a>00689 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++)
-<a name="l00690"></a>00690 cpl_ensure_code(!cpl_frame_set_tag(self->frame[i], tag),
-<a name="l00691"></a>00691 cpl_error_get_code());
-<a name="l00692"></a>00692
-<a name="l00693"></a>00693 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00694"></a>00694 }
-<a name="l00695"></a>00695
-<a name="l00696"></a>00696
-<a name="l00697"></a>00697 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00711"></a>00711 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00712"></a><a class="code" href="group__irplib__framelist.html#ga37e730f5627b4a0c7a81014f62421879">00712</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#ga37e730f5627b4a0c7a81014f62421879" title="Add a frame to a framelist.">irplib_framelist_set</a>(irplib_framelist * <span class="keyword">self</span>, cpl_frame * frame,
-<a name="l00713"></a>00713 <span class="keywordtype">int</span> pos)
-<a name="l00714"></a>00714 {
-<a name="l00715"></a>00715
-<a name="l00716"></a>00716 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00717"></a>00717 cpl_ensure_code(frame != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00718"></a>00718 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00719"></a>00719
-<a name="l00720"></a>00720 <span class="keywordflow">if</span> (pos == self->size) {
+<a name="l00686"></a>00686 <span class="keywordtype">int</span> i;
+<a name="l00687"></a>00687
+<a name="l00688"></a>00688 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00689"></a>00689 cpl_ensure_code(tag != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00690"></a>00690
+<a name="l00691"></a>00691 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++)
+<a name="l00692"></a>00692 cpl_ensure_code(!cpl_frame_set_tag(self->frame[i], tag),
+<a name="l00693"></a>00693 cpl_error_get_code());
+<a name="l00694"></a>00694
+<a name="l00695"></a>00695 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00696"></a>00696 }
+<a name="l00697"></a>00697
+<a name="l00698"></a>00698
+<a name="l00699"></a>00699 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00713"></a>00713 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00714"></a><a class="code" href="group__irplib__framelist.html#ga37e730f5627b4a0c7a81014f62421879">00714</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#ga37e730f5627b4a0c7a81014f62421879" title="Add a frame to a framelist.">irplib_framelist_set</a>(irplib_framelist * <span class="keyword">self</span>, cpl_frame * frame,
+<a name="l00715"></a>00715 <span class="keywordtype">int</span> pos)
+<a name="l00716"></a>00716 {
+<a name="l00717"></a>00717
+<a name="l00718"></a>00718 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00719"></a>00719 cpl_ensure_code(frame != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00720"></a>00720 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
<a name="l00721"></a>00721
-<a name="l00722"></a>00722 <span class="keyword">self</span>->size++;
+<a name="l00722"></a>00722 <span class="keywordflow">if</span> (pos == self->size) {
<a name="l00723"></a>00723
-<a name="l00724"></a>00724 irplib_framelist_set_size(<span class="keyword">self</span>);
+<a name="l00724"></a>00724 <span class="keyword">self</span>->size++;
<a name="l00725"></a>00725
-<a name="l00726"></a>00726 } <span class="keywordflow">else</span> {
+<a name="l00726"></a>00726 irplib_framelist_set_size(<span class="keyword">self</span>);
<a name="l00727"></a>00727
-<a name="l00728"></a>00728 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l00728"></a>00728 } <span class="keywordflow">else</span> {
<a name="l00729"></a>00729
-<a name="l00730"></a>00730 cpl_frame_delete(self->frame[pos]);
-<a name="l00731"></a>00731 cpl_propertylist_delete(self->propertylist[pos]);
-<a name="l00732"></a>00732 }
-<a name="l00733"></a>00733
-<a name="l00734"></a>00734 <span class="keyword">self</span>->frame[pos] = frame;
-<a name="l00735"></a>00735 <span class="keyword">self</span>->propertylist[pos] = NULL;
-<a name="l00736"></a>00736
-<a name="l00737"></a>00737 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00730"></a>00730 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l00731"></a>00731
+<a name="l00732"></a>00732 cpl_frame_delete(self->frame[pos]);
+<a name="l00733"></a>00733 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00734"></a>00734 }
+<a name="l00735"></a>00735
+<a name="l00736"></a>00736 <span class="keyword">self</span>->frame[pos] = frame;
+<a name="l00737"></a>00737 <span class="keyword">self</span>->propertylist[pos] = NULL;
<a name="l00738"></a>00738
-<a name="l00739"></a>00739 }
+<a name="l00739"></a>00739 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00740"></a>00740
-<a name="l00741"></a>00741 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00750"></a>00750 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00751"></a><a class="code" href="group__irplib__framelist.html#gac66ea3ad4fc98c171f8b840229fe54ce">00751</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gac66ea3ad4fc98c171f8b840229fe54ce" title="Erase a frame from a framelist and delete it and its propertylist.">irplib_framelist_erase</a>(irplib_framelist * <span class="keyword">self</span>, <span class="keywordtype">int</span> pos)
-<a name="l00752"></a>00752 {
-<a name="l00753"></a>00753
-<a name="l00754"></a>00754 <span class="keywordtype">int</span> i;
+<a name="l00741"></a>00741 }
+<a name="l00742"></a>00742
+<a name="l00743"></a>00743 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00752"></a>00752 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00753"></a><a class="code" href="group__irplib__framelist.html#gac66ea3ad4fc98c171f8b840229fe54ce">00753</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gac66ea3ad4fc98c171f8b840229fe54ce" title="Erase a frame from a framelist and delete it and its propertylist.">irplib_framelist_erase</a>(irplib_framelist * <span class="keyword">self</span>, <span class="keywordtype">int</span> pos)
+<a name="l00754"></a>00754 {
<a name="l00755"></a>00755
-<a name="l00756"></a>00756 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00757"></a>00757 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00758"></a>00758 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l00759"></a>00759
-<a name="l00760"></a>00760
-<a name="l00761"></a>00761 <span class="comment">/* Delete the specified frame and its propertylist */</span>
-<a name="l00762"></a>00762 cpl_frame_delete(self->frame[pos]);
-<a name="l00763"></a>00763 cpl_propertylist_delete(self->propertylist[pos]);
-<a name="l00764"></a>00764
-<a name="l00765"></a>00765 <span class="comment">/* Move following frames down one position */</span>
-<a name="l00766"></a>00766 <span class="keywordflow">for</span> (i = pos+1; i < <span class="keyword">self</span>->size; i++) {
-<a name="l00767"></a>00767
-<a name="l00768"></a>00768 <span class="keyword">self</span>->frame[i-1] = <span class="keyword">self</span>->frame[i];
+<a name="l00756"></a>00756 <span class="keywordtype">int</span> i;
+<a name="l00757"></a>00757
+<a name="l00758"></a>00758 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00759"></a>00759 cpl_ensure_code(pos >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00760"></a>00760 cpl_ensure_code(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l00761"></a>00761
+<a name="l00762"></a>00762
+<a name="l00763"></a>00763 <span class="comment">/* Delete the specified frame and its propertylist */</span>
+<a name="l00764"></a>00764 cpl_frame_delete(self->frame[pos]);
+<a name="l00765"></a>00765 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00766"></a>00766
+<a name="l00767"></a>00767 <span class="comment">/* Move following frames down one position */</span>
+<a name="l00768"></a>00768 <span class="keywordflow">for</span> (i = pos+1; i < <span class="keyword">self</span>->size; i++) {
<a name="l00769"></a>00769
-<a name="l00770"></a>00770 <span class="keyword">self</span>->propertylist[i-1] = <span class="keyword">self</span>->propertylist[i];
+<a name="l00770"></a>00770 <span class="keyword">self</span>->frame[i-1] = <span class="keyword">self</span>->frame[i];
<a name="l00771"></a>00771
-<a name="l00772"></a>00772 }
+<a name="l00772"></a>00772 <span class="keyword">self</span>->propertylist[i-1] = <span class="keyword">self</span>->propertylist[i];
<a name="l00773"></a>00773
-<a name="l00774"></a>00774 <span class="keyword">self</span>->size--;
+<a name="l00774"></a>00774 }
<a name="l00775"></a>00775
-<a name="l00776"></a>00776 irplib_framelist_set_size(<span class="keyword">self</span>);
+<a name="l00776"></a>00776 <span class="keyword">self</span>->size--;
<a name="l00777"></a>00777
-<a name="l00778"></a>00778 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00778"></a>00778 irplib_framelist_set_size(<span class="keyword">self</span>);
<a name="l00779"></a>00779
-<a name="l00780"></a>00780 }
+<a name="l00780"></a>00780 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00781"></a>00781
-<a name="l00782"></a>00782
+<a name="l00782"></a>00782 }
<a name="l00783"></a>00783
-<a name="l00784"></a>00784 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00800"></a>00800 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00801"></a><a class="code" href="group__irplib__framelist.html#ga771f14f97f80a9bd7176d323999c9bce">00801</a> cpl_frame * <a class="code" href="group__irplib__framelist.html#ga771f14f97f80a9bd7176d323999c9bce" title="Erase a frame from a framelist and return it to the caller.">irplib_framelist_unset</a>(irplib_framelist * <span class="keyword">self</span>, <span class="keywordtype">int</span> pos,
-<a name="l00802"></a>00802 cpl_propertylist ** plist)
-<a name="l00803"></a>00803
-<a name="l00804"></a>00804 {
-<a name="l00805"></a>00805 cpl_frame * frame;
-<a name="l00806"></a>00806 <span class="keywordtype">int</span> i;
-<a name="l00807"></a>00807
-<a name="l00808"></a>00808
-<a name="l00809"></a>00809 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
-<a name="l00810"></a>00810 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
-<a name="l00811"></a>00811 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
-<a name="l00812"></a>00812
-<a name="l00813"></a>00813 <span class="comment">/* Get the specified frame and its propertylist */</span>
-<a name="l00814"></a>00814 frame = <span class="keyword">self</span>->frame[pos];
-<a name="l00815"></a>00815
-<a name="l00816"></a>00816 <span class="keywordflow">if</span> (plist != NULL)
-<a name="l00817"></a>00817 *plist = <span class="keyword">self</span>->propertylist[pos];
-<a name="l00818"></a>00818 <span class="keywordflow">else</span>
-<a name="l00819"></a>00819 cpl_propertylist_delete(self->propertylist[pos]);
-<a name="l00820"></a>00820
-<a name="l00821"></a>00821
-<a name="l00822"></a>00822 <span class="comment">/* Move following frames down one position */</span>
-<a name="l00823"></a>00823 <span class="keywordflow">for</span> (i = pos+1; i < <span class="keyword">self</span>->size; i++) {
-<a name="l00824"></a>00824
-<a name="l00825"></a>00825 <span class="keyword">self</span>->frame[i-1] = <span class="keyword">self</span>->frame[i];
+<a name="l00784"></a>00784
+<a name="l00785"></a>00785
+<a name="l00786"></a>00786 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00802"></a>00802 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00803"></a><a class="code" href="group__irplib__framelist.html#ga771f14f97f80a9bd7176d323999c9bce">00803</a> cpl_frame * <a class="code" href="group__irplib__framelist.html#ga771f14f97f80a9bd7176d323999c9bce" title="Erase a frame from a framelist and return it to the caller.">irplib_framelist_unset</a>(irplib_framelist * <span class="keyword">self</span>, <span class="keywordtype">int</span> pos,
+<a name="l00804"></a>00804 cpl_propertylist ** plist)
+<a name="l00805"></a>00805
+<a name="l00806"></a>00806 {
+<a name="l00807"></a>00807 cpl_frame * frame;
+<a name="l00808"></a>00808 <span class="keywordtype">int</span> i;
+<a name="l00809"></a>00809
+<a name="l00810"></a>00810
+<a name="l00811"></a>00811 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
+<a name="l00812"></a>00812 cpl_ensure(pos >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
+<a name="l00813"></a>00813 cpl_ensure(pos < self->size, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
+<a name="l00814"></a>00814
+<a name="l00815"></a>00815 <span class="comment">/* Get the specified frame and its propertylist */</span>
+<a name="l00816"></a>00816 frame = <span class="keyword">self</span>->frame[pos];
+<a name="l00817"></a>00817
+<a name="l00818"></a>00818 <span class="keywordflow">if</span> (plist != NULL)
+<a name="l00819"></a>00819 *plist = <span class="keyword">self</span>->propertylist[pos];
+<a name="l00820"></a>00820 <span class="keywordflow">else</span>
+<a name="l00821"></a>00821 cpl_propertylist_delete(self->propertylist[pos]);
+<a name="l00822"></a>00822
+<a name="l00823"></a>00823
+<a name="l00824"></a>00824 <span class="comment">/* Move following frames down one position */</span>
+<a name="l00825"></a>00825 <span class="keywordflow">for</span> (i = pos+1; i < <span class="keyword">self</span>->size; i++) {
<a name="l00826"></a>00826
-<a name="l00827"></a>00827 <span class="keyword">self</span>->propertylist[i-1] = <span class="keyword">self</span>->propertylist[i];
+<a name="l00827"></a>00827 <span class="keyword">self</span>->frame[i-1] = <span class="keyword">self</span>->frame[i];
<a name="l00828"></a>00828
-<a name="l00829"></a>00829 }
+<a name="l00829"></a>00829 <span class="keyword">self</span>->propertylist[i-1] = <span class="keyword">self</span>->propertylist[i];
<a name="l00830"></a>00830
-<a name="l00831"></a>00831 <span class="keyword">self</span>->size--;
+<a name="l00831"></a>00831 }
<a name="l00832"></a>00832
-<a name="l00833"></a>00833 irplib_framelist_set_size(<span class="keyword">self</span>);
+<a name="l00833"></a>00833 <span class="keyword">self</span>->size--;
<a name="l00834"></a>00834
-<a name="l00835"></a>00835 <span class="keywordflow">return</span> frame;
+<a name="l00835"></a>00835 irplib_framelist_set_size(<span class="keyword">self</span>);
<a name="l00836"></a>00836
-<a name="l00837"></a>00837 }
+<a name="l00837"></a>00837 <span class="keywordflow">return</span> frame;
<a name="l00838"></a>00838
-<a name="l00839"></a>00839 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00846"></a>00846 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00847"></a><a class="code" href="group__irplib__framelist.html#ga900ea254d9b2a2e4e3957360bbae4deb">00847</a> <span class="keywordtype">void</span> <a class="code" href="group__irplib__framelist.html#ga900ea254d9b2a2e4e3957360bbae4deb" title="Erase all frames from a framelist.">irplib_framelist_empty</a>(irplib_framelist * <span class="keyword">self</span>)
-<a name="l00848"></a>00848 {
-<a name="l00849"></a>00849
-<a name="l00850"></a>00850 <span class="keywordflow">if</span> (<span class="keyword">self</span> != NULL) {
+<a name="l00839"></a>00839 }
+<a name="l00840"></a>00840
+<a name="l00841"></a>00841 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00848"></a>00848 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00849"></a><a class="code" href="group__irplib__framelist.html#ga900ea254d9b2a2e4e3957360bbae4deb">00849</a> <span class="keywordtype">void</span> <a class="code" href="group__irplib__framelist.html#ga900ea254d9b2a2e4e3957360bbae4deb" title="Erase all frames from a framelist.">irplib_framelist_empty</a>(irplib_framelist * <span class="keyword">self</span>)
+<a name="l00850"></a>00850 {
<a name="l00851"></a>00851
-<a name="l00852"></a>00852 <span class="comment">/* Deallocate all frames and their propertylists */</span>
-<a name="l00853"></a>00853 <span class="keywordflow">while</span> (self->size > 0) {
-<a name="l00854"></a>00854 <span class="keyword">self</span>->size--;
-<a name="l00855"></a>00855 cpl_frame_delete(self->frame[self->size]);
-<a name="l00856"></a>00856 cpl_propertylist_delete(self->propertylist[self->size]);
-<a name="l00857"></a>00857
-<a name="l00858"></a>00858 }
-<a name="l00859"></a>00859
-<a name="l00860"></a>00860 <span class="comment">/* Deallocate the arrays */</span>
-<a name="l00861"></a>00861 irplib_framelist_set_size(<span class="keyword">self</span>);
-<a name="l00862"></a>00862
-<a name="l00863"></a>00863 }
-<a name="l00864"></a>00864 }
-<a name="l00865"></a>00865
-<a name="l00866"></a>00866
+<a name="l00852"></a>00852 <span class="keywordflow">if</span> (<span class="keyword">self</span> != NULL) {
+<a name="l00853"></a>00853
+<a name="l00854"></a>00854 <span class="comment">/* Deallocate all frames and their propertylists */</span>
+<a name="l00855"></a>00855 <span class="keywordflow">while</span> (self->size > 0) {
+<a name="l00856"></a>00856 <span class="keyword">self</span>->size--;
+<a name="l00857"></a>00857 cpl_frame_delete(self->frame[self->size]);
+<a name="l00858"></a>00858 cpl_propertylist_delete(self->propertylist[self->size]);
+<a name="l00859"></a>00859
+<a name="l00860"></a>00860 }
+<a name="l00861"></a>00861
+<a name="l00862"></a>00862 <span class="comment">/* Deallocate the arrays */</span>
+<a name="l00863"></a>00863 irplib_framelist_set_size(<span class="keyword">self</span>);
+<a name="l00864"></a>00864
+<a name="l00865"></a>00865 }
+<a name="l00866"></a>00866 }
<a name="l00867"></a>00867
-<a name="l00868"></a>00868 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00906"></a>00906 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00907"></a><a class="code" href="group__irplib__framelist.html#gafed15e9e259ebad923b710f5eb0196ac">00907</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gafed15e9e259ebad923b710f5eb0196ac" title="Verify that a property is present for all frames.">irplib_framelist_contains</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
-<a name="l00908"></a>00908 <span class="keyword">const</span> <span class="keywordtype">char</span> * key, cpl_type type,
-<a name="l00909"></a>00909 cpl_boolean is_equal, <span class="keywordtype">double</span> fp_tol)
-<a name="l00910"></a>00910 {
-<a name="l00911"></a>00911
-<a name="l00912"></a>00912 <span class="keywordtype">char</span> * value_0;
-<a name="l00913"></a>00913 <span class="keywordtype">char</span> * value_i;
-<a name="l00914"></a>00914 cpl_type type_0 = CPL_TYPE_INVALID;
-<a name="l00915"></a>00915 <span class="keywordtype">int</span> i, ifirst = -1; <span class="comment">/* First non-NULL propertylist */</span>
-<a name="l00916"></a>00916
-<a name="l00917"></a>00917
-<a name="l00918"></a>00918 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00919"></a>00919 cpl_ensure_code(key != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00920"></a>00920 cpl_ensure_code(fp_tol >= 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00921"></a>00921
-<a name="l00922"></a>00922 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++) {
-<a name="l00923"></a>00923 cpl_type type_i;
-<a name="l00924"></a>00924
-<a name="l00925"></a>00925
-<a name="l00926"></a>00926 <span class="keywordflow">if</span> (self->propertylist[i] == NULL) <span class="keywordflow">continue</span>;
-<a name="l00927"></a>00927 <span class="keywordflow">if</span> (ifirst < 0) ifirst = i;
-<a name="l00928"></a>00928
-<a name="l00929"></a>00929 type_i = cpl_propertylist_get_type(self->propertylist[i], key);
+<a name="l00868"></a>00868
+<a name="l00869"></a>00869
+<a name="l00870"></a>00870 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00908"></a>00908 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00909"></a><a class="code" href="group__irplib__framelist.html#gafed15e9e259ebad923b710f5eb0196ac">00909</a> cpl_error_code <a class="code" href="group__irplib__framelist.html#gafed15e9e259ebad923b710f5eb0196ac" title="Verify that a property is present for all frames.">irplib_framelist_contains</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
+<a name="l00910"></a>00910 <span class="keyword">const</span> <span class="keywordtype">char</span> * key, cpl_type type,
+<a name="l00911"></a>00911 cpl_boolean is_equal, <span class="keywordtype">double</span> fp_tol)
+<a name="l00912"></a>00912 {
+<a name="l00913"></a>00913
+<a name="l00914"></a>00914 <span class="keywordtype">char</span> * value_0;
+<a name="l00915"></a>00915 <span class="keywordtype">char</span> * value_i;
+<a name="l00916"></a>00916 cpl_type type_0 = CPL_TYPE_INVALID;
+<a name="l00917"></a>00917 <span class="keywordtype">int</span> i, ifirst = -1; <span class="comment">/* First non-NULL propertylist */</span>
+<a name="l00918"></a>00918
+<a name="l00919"></a>00919
+<a name="l00920"></a>00920 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00921"></a>00921 cpl_ensure_code(key != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00922"></a>00922 cpl_ensure_code(fp_tol >= 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00923"></a>00923
+<a name="l00924"></a>00924 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++) {
+<a name="l00925"></a>00925 cpl_type type_i;
+<a name="l00926"></a>00926
+<a name="l00927"></a>00927
+<a name="l00928"></a>00928 <span class="keywordflow">if</span> (self->propertylist[i] == NULL) <span class="keywordflow">continue</span>;
+<a name="l00929"></a>00929 <span class="keywordflow">if</span> (ifirst < 0) ifirst = i;
<a name="l00930"></a>00930
-<a name="l00931"></a>00931 <span class="keywordflow">if</span> (type_i == CPL_TYPE_INVALID) {
-<a name="l00932"></a>00932 <span class="keywordflow">if</span> (type == CPL_TYPE_INVALID)
-<a name="l00933"></a>00933 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l00934"></a>00934 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(), <span class="stringliteral">"FITS "</span>
-<a name="l00935"></a>00935 <span class="stringliteral">"key '%s' is missing from file %s"</span>, key,
-<a name="l00936"></a>00936 cpl_frame_get_filename(self->frame[i]));
-<a name="l00937"></a>00937 <span class="keywordflow">else</span>
-<a name="l00938"></a>00938 cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l00939"></a>00939 <span class="stringliteral">"FITS key '%s' [%s] is missing from file "</span>
-<a name="l00940"></a>00940 <span class="stringliteral">"%s"</span>, key, cpl_type_get_name(type),
-<a name="l00941"></a>00941 cpl_frame_get_filename(self->frame[i]));
-<a name="l00942"></a>00942 <span class="preprocessor">#else</span>
-<a name="l00943"></a>00943 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l00944"></a>00944 <span class="stringliteral">"A FITS key is missing from a file"</span>);
-<a name="l00945"></a>00945 <span class="keywordflow">else</span>
-<a name="l00946"></a>00946 cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l00947"></a>00947 <span class="stringliteral">"A FITS key is missing from a file"</span>);
-<a name="l00948"></a>00948 <span class="preprocessor">#endif</span>
-<a name="l00949"></a>00949 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00950"></a>00950 }
-<a name="l00951"></a>00951
-<a name="l00952"></a>00952 <span class="keywordflow">if</span> (type != CPL_TYPE_INVALID && type_i != type) {
-<a name="l00953"></a>00953 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l00954"></a>00954 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_INVALID_TYPE,
-<a name="l00955"></a>00955 <span class="stringliteral">"FITS key '%s' has type %s instead of "</span>
-<a name="l00956"></a>00956 <span class="stringliteral">"%s in file %s"</span>, key,
-<a name="l00957"></a>00957 cpl_type_get_name(type_i),
-<a name="l00958"></a>00958 cpl_type_get_name(type),
-<a name="l00959"></a>00959 cpl_frame_get_filename(self->frame[i]));
-<a name="l00960"></a>00960 <span class="preprocessor">#else</span>
-<a name="l00961"></a>00961 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_INVALID_TYPE,
-<a name="l00962"></a>00962 <span class="stringliteral">"A FITS key had an unexpected type"</span>);
-<a name="l00963"></a>00963 <span class="preprocessor">#endif</span>
-<a name="l00964"></a>00964 <span class="preprocessor"></span>
-<a name="l00965"></a>00965 }
-<a name="l00966"></a>00966
-<a name="l00967"></a>00967 <span class="keywordflow">if</span> (!is_equal) <span class="keywordflow">continue</span>;
+<a name="l00931"></a>00931 type_i = cpl_propertylist_get_type(self->propertylist[i], key);
+<a name="l00932"></a>00932
+<a name="l00933"></a>00933 <span class="keywordflow">if</span> (type_i == CPL_TYPE_INVALID) {
+<a name="l00934"></a>00934 <span class="keywordflow">if</span> (type == CPL_TYPE_INVALID)
+<a name="l00935"></a>00935 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l00936"></a>00936 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(), <span class="stringliteral">"FITS "</span>
+<a name="l00937"></a>00937 <span class="stringliteral">"key '%s' is missing from file %s"</span>, key,
+<a name="l00938"></a>00938 cpl_frame_get_filename(self->frame[i]));
+<a name="l00939"></a>00939 <span class="keywordflow">else</span>
+<a name="l00940"></a>00940 cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l00941"></a>00941 <span class="stringliteral">"FITS key '%s' [%s] is missing from file "</span>
+<a name="l00942"></a>00942 <span class="stringliteral">"%s"</span>, key, cpl_type_get_name(type),
+<a name="l00943"></a>00943 cpl_frame_get_filename(self->frame[i]));
+<a name="l00944"></a>00944 <span class="preprocessor">#else</span>
+<a name="l00945"></a>00945 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l00946"></a>00946 <span class="stringliteral">"A FITS key is missing from a file"</span>);
+<a name="l00947"></a>00947 <span class="keywordflow">else</span>
+<a name="l00948"></a>00948 cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l00949"></a>00949 <span class="stringliteral">"A FITS key is missing from a file"</span>);
+<a name="l00950"></a>00950 <span class="preprocessor">#endif</span>
+<a name="l00951"></a>00951 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00952"></a>00952 }
+<a name="l00953"></a>00953
+<a name="l00954"></a>00954 <span class="keywordflow">if</span> (type != CPL_TYPE_INVALID && type_i != type) {
+<a name="l00955"></a>00955 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l00956"></a>00956 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_INVALID_TYPE,
+<a name="l00957"></a>00957 <span class="stringliteral">"FITS key '%s' has type %s instead of "</span>
+<a name="l00958"></a>00958 <span class="stringliteral">"%s in file %s"</span>, key,
+<a name="l00959"></a>00959 cpl_type_get_name(type_i),
+<a name="l00960"></a>00960 cpl_type_get_name(type),
+<a name="l00961"></a>00961 cpl_frame_get_filename(self->frame[i]));
+<a name="l00962"></a>00962 <span class="preprocessor">#else</span>
+<a name="l00963"></a>00963 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_INVALID_TYPE,
+<a name="l00964"></a>00964 <span class="stringliteral">"A FITS key had an unexpected type"</span>);
+<a name="l00965"></a>00965 <span class="preprocessor">#endif</span>
+<a name="l00966"></a>00966 <span class="preprocessor"></span>
+<a name="l00967"></a>00967 }
<a name="l00968"></a>00968
-<a name="l00969"></a>00969 <span class="keywordflow">if</span> (type_0 == CPL_TYPE_INVALID) {
-<a name="l00970"></a>00970 type_0 = type_i;
-<a name="l00971"></a>00971 <span class="keywordflow">continue</span>;
-<a name="l00972"></a>00972 }
-<a name="l00973"></a>00973
-<a name="l00974"></a>00974 <span class="keywordflow">if</span> (type_i != type_0) {
-<a name="l00975"></a>00975 assert( type == CPL_TYPE_INVALID );
-<a name="l00976"></a>00976 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l00977"></a>00977 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH,
-<a name="l00978"></a>00978 <span class="stringliteral">"FITS key '%s' has different types "</span>
-<a name="l00979"></a>00979 <span class="stringliteral">"(%s <=> %s) in files %s and %s"</span>, key,
-<a name="l00980"></a>00980 cpl_type_get_name(type_0),
-<a name="l00981"></a>00981 cpl_type_get_name(type_i),
-<a name="l00982"></a>00982 cpl_frame_get_filename(self->frame[0]),
-<a name="l00983"></a>00983 cpl_frame_get_filename(self->frame[i]));
-<a name="l00984"></a>00984 <span class="preprocessor">#else</span>
-<a name="l00985"></a>00985 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH,
-<a name="l00986"></a>00986 <span class="stringliteral">"A FITS key has different types in "</span>
-<a name="l00987"></a>00987 <span class="stringliteral">"two files"</span>);
-<a name="l00988"></a>00988 <span class="preprocessor">#endif</span>
-<a name="l00989"></a>00989 <span class="preprocessor"></span> }
-<a name="l00990"></a>00990
-<a name="l00991"></a>00991 <span class="keywordflow">if</span> (irplib_property_equal(self->propertylist[ifirst],
-<a name="l00992"></a>00992 self->propertylist[i],
-<a name="l00993"></a>00993 key, type_0, fp_tol, &value_0, &value_i))
-<a name="l00994"></a>00994 <span class="keywordflow">continue</span>;
-<a name="l00995"></a>00995
-<a name="l00996"></a>00996 <span class="keywordflow">if</span> ((type_0 == CPL_TYPE_FLOAT || type_0 == CPL_TYPE_DOUBLE)
-<a name="l00997"></a>00997 && fp_tol > 0.0) {
-<a name="l00998"></a>00998 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l00999"></a>00999 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"FITS"</span>
-<a name="l01000"></a>01000 <span class="stringliteral">" key '%s' [%s] has values that differ by "</span>
-<a name="l01001"></a>01001 <span class="stringliteral">"more than %g (%s <=> %s) in files %s and %s"</span>,
-<a name="l01002"></a>01002 key, cpl_type_get_name(type_0), fp_tol,
-<a name="l01003"></a>01003 value_0, value_i,
-<a name="l01004"></a>01004 cpl_frame_get_filename(self->frame[0]),
-<a name="l01005"></a>01005 cpl_frame_get_filename(self->frame[i]));
-<a name="l01006"></a>01006 <span class="preprocessor">#else</span>
-<a name="l01007"></a>01007 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"A "</span>
-<a name="l01008"></a>01008 <span class="stringliteral">"FITS key has values that differ by more "</span>
-<a name="l01009"></a>01009 <span class="stringliteral">"than the allowed tolerance in two file"</span>);
-<a name="l01010"></a>01010 <span class="preprocessor">#endif</span>
-<a name="l01011"></a>01011 <span class="preprocessor"></span> } <span class="keywordflow">else</span> {
-<a name="l01012"></a>01012 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01013"></a>01013 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT,
-<a name="l01014"></a>01014 <span class="stringliteral">"FITS key '%s' [%s] has different values "</span>
-<a name="l01015"></a>01015 <span class="stringliteral">"(%s <=> %s) in files %s and %s"</span>, key,
-<a name="l01016"></a>01016 cpl_type_get_name(type_0),
-<a name="l01017"></a>01017 value_0, value_i,
-<a name="l01018"></a>01018 cpl_frame_get_filename(self->frame[0]),
-<a name="l01019"></a>01019 cpl_frame_get_filename(self->frame[i]));
-<a name="l01020"></a>01020 <span class="preprocessor">#else</span>
-<a name="l01021"></a>01021 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"A "</span>
-<a name="l01022"></a>01022 <span class="stringliteral">"FITS key has different values in two files"</span>);
-<a name="l01023"></a>01023 <span class="preprocessor">#endif</span>
-<a name="l01024"></a>01024 <span class="preprocessor"></span> }
-<a name="l01025"></a>01025 cpl_free(value_0);
-<a name="l01026"></a>01026 cpl_free(value_i);
-<a name="l01027"></a>01027
-<a name="l01028"></a>01028 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01029"></a>01029 }
-<a name="l01030"></a>01030
-<a name="l01031"></a>01031 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00969"></a>00969 <span class="keywordflow">if</span> (!is_equal) <span class="keywordflow">continue</span>;
+<a name="l00970"></a>00970
+<a name="l00971"></a>00971 <span class="keywordflow">if</span> (type_0 == CPL_TYPE_INVALID) {
+<a name="l00972"></a>00972 type_0 = type_i;
+<a name="l00973"></a>00973 <span class="keywordflow">continue</span>;
+<a name="l00974"></a>00974 }
+<a name="l00975"></a>00975
+<a name="l00976"></a>00976 <span class="keywordflow">if</span> (type_i != type_0) {
+<a name="l00977"></a>00977 assert( type == CPL_TYPE_INVALID );
+<a name="l00978"></a>00978 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l00979"></a>00979 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH,
+<a name="l00980"></a>00980 <span class="stringliteral">"FITS key '%s' has different types "</span>
+<a name="l00981"></a>00981 <span class="stringliteral">"(%s <=> %s) in files %s and %s"</span>, key,
+<a name="l00982"></a>00982 cpl_type_get_name(type_0),
+<a name="l00983"></a>00983 cpl_type_get_name(type_i),
+<a name="l00984"></a>00984 cpl_frame_get_filename(self->frame[0]),
+<a name="l00985"></a>00985 cpl_frame_get_filename(self->frame[i]));
+<a name="l00986"></a>00986 <span class="preprocessor">#else</span>
+<a name="l00987"></a>00987 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_TYPE_MISMATCH,
+<a name="l00988"></a>00988 <span class="stringliteral">"A FITS key has different types in "</span>
+<a name="l00989"></a>00989 <span class="stringliteral">"two files"</span>);
+<a name="l00990"></a>00990 <span class="preprocessor">#endif</span>
+<a name="l00991"></a>00991 <span class="preprocessor"></span> }
+<a name="l00992"></a>00992
+<a name="l00993"></a>00993 <span class="keywordflow">if</span> (irplib_property_equal(self->propertylist[ifirst],
+<a name="l00994"></a>00994 self->propertylist[i],
+<a name="l00995"></a>00995 key, type_0, fp_tol, &value_0, &value_i))
+<a name="l00996"></a>00996 <span class="keywordflow">continue</span>;
+<a name="l00997"></a>00997
+<a name="l00998"></a>00998 <span class="keywordflow">if</span> ((type_0 == CPL_TYPE_FLOAT || type_0 == CPL_TYPE_DOUBLE)
+<a name="l00999"></a>00999 && fp_tol > 0.0) {
+<a name="l01000"></a>01000 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01001"></a>01001 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"FITS"</span>
+<a name="l01002"></a>01002 <span class="stringliteral">" key '%s' [%s] has values that differ by "</span>
+<a name="l01003"></a>01003 <span class="stringliteral">"more than %g (%s <=> %s) in files %s and %s"</span>,
+<a name="l01004"></a>01004 key, cpl_type_get_name(type_0), fp_tol,
+<a name="l01005"></a>01005 value_0, value_i,
+<a name="l01006"></a>01006 cpl_frame_get_filename(self->frame[0]),
+<a name="l01007"></a>01007 cpl_frame_get_filename(self->frame[i]));
+<a name="l01008"></a>01008 <span class="preprocessor">#else</span>
+<a name="l01009"></a>01009 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"A "</span>
+<a name="l01010"></a>01010 <span class="stringliteral">"FITS key has values that differ by more "</span>
+<a name="l01011"></a>01011 <span class="stringliteral">"than the allowed tolerance in two file"</span>);
+<a name="l01012"></a>01012 <span class="preprocessor">#endif</span>
+<a name="l01013"></a>01013 <span class="preprocessor"></span> } <span class="keywordflow">else</span> {
+<a name="l01014"></a>01014 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01015"></a>01015 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT,
+<a name="l01016"></a>01016 <span class="stringliteral">"FITS key '%s' [%s] has different values "</span>
+<a name="l01017"></a>01017 <span class="stringliteral">"(%s <=> %s) in files %s and %s"</span>, key,
+<a name="l01018"></a>01018 cpl_type_get_name(type_0),
+<a name="l01019"></a>01019 value_0, value_i,
+<a name="l01020"></a>01020 cpl_frame_get_filename(self->frame[0]),
+<a name="l01021"></a>01021 cpl_frame_get_filename(self->frame[i]));
+<a name="l01022"></a>01022 <span class="preprocessor">#else</span>
+<a name="l01023"></a>01023 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_INCOMPATIBLE_INPUT, <span class="stringliteral">"A "</span>
+<a name="l01024"></a>01024 <span class="stringliteral">"FITS key has different values in two files"</span>);
+<a name="l01025"></a>01025 <span class="preprocessor">#endif</span>
+<a name="l01026"></a>01026 <span class="preprocessor"></span> }
+<a name="l01027"></a>01027 cpl_free(value_0);
+<a name="l01028"></a>01028 cpl_free(value_i);
+<a name="l01029"></a>01029
+<a name="l01030"></a>01030 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01031"></a>01031 }
<a name="l01032"></a>01032
-<a name="l01033"></a>01033 }
+<a name="l01033"></a>01033 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l01034"></a>01034
-<a name="l01035"></a>01035
-<a name="l01036"></a>01036 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01049"></a>01049 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01050"></a><a class="code" href="group__irplib__framelist.html#ga0ff6c5e3b778c607544ca04ca3fb9e94">01050</a> cpl_imagelist * <a class="code" href="group__irplib__framelist.html#ga0ff6c5e3b778c607544ca04ca3fb9e94" title="Load an imagelist from a framelist.">irplib_imagelist_load_framelist</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
-<a name="l01051"></a>01051 cpl_type pixeltype,
-<a name="l01052"></a>01052 <span class="keywordtype">int</span> planenum,
-<a name="l01053"></a>01053 <span class="keywordtype">int</span> extnum)
-<a name="l01054"></a>01054 {
-<a name="l01055"></a>01055
-<a name="l01056"></a>01056 cpl_imagelist * list = NULL;
-<a name="l01057"></a>01057 cpl_image * image = NULL;
-<a name="l01058"></a>01058 <span class="keywordtype">int</span> i;
-<a name="l01059"></a>01059
-<a name="l01060"></a>01060
-<a name="l01061"></a>01061 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
-<a name="l01062"></a>01062 cpl_ensure(extnum >= 0, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
-<a name="l01063"></a>01063 cpl_ensure(planenum >= 0, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
-<a name="l01064"></a>01064
-<a name="l01065"></a>01065 list = cpl_imagelist_new();
+<a name="l01035"></a>01035 }
+<a name="l01036"></a>01036
+<a name="l01037"></a>01037
+<a name="l01038"></a>01038 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01051"></a>01051 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01052"></a><a class="code" href="group__irplib__framelist.html#ga0ff6c5e3b778c607544ca04ca3fb9e94">01052</a> cpl_imagelist * <a class="code" href="group__irplib__framelist.html#ga0ff6c5e3b778c607544ca04ca3fb9e94" title="Load an imagelist from a framelist.">irplib_imagelist_load_framelist</a>(<span class="keyword">const</span> irplib_framelist * <span class="keyword">self</span>,
+<a name="l01053"></a>01053 cpl_type pixeltype,
+<a name="l01054"></a>01054 <span class="keywordtype">int</span> planenum,
+<a name="l01055"></a>01055 <span class="keywordtype">int</span> extnum)
+<a name="l01056"></a>01056 {
+<a name="l01057"></a>01057
+<a name="l01058"></a>01058 cpl_imagelist * list = NULL;
+<a name="l01059"></a>01059 cpl_image * image = NULL;
+<a name="l01060"></a>01060 <span class="keywordtype">int</span> i;
+<a name="l01061"></a>01061
+<a name="l01062"></a>01062
+<a name="l01063"></a>01063 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
+<a name="l01064"></a>01064 cpl_ensure(extnum >= 0, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
+<a name="l01065"></a>01065 cpl_ensure(planenum >= 0, CPL_ERROR_ACCESS_OUT_OF_RANGE, NULL);
<a name="l01066"></a>01066
-<a name="l01067"></a>01067 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++, image = NULL) {
-<a name="l01068"></a>01068 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename = cpl_frame_get_filename(self->frame[i]);
-<a name="l01069"></a>01069 cpl_error_code error;
-<a name="l01070"></a>01070
-<a name="l01071"></a>01071 <span class="keywordflow">if</span> (filename == NULL) <span class="keywordflow">break</span>;
+<a name="l01067"></a>01067 list = cpl_imagelist_new();
+<a name="l01068"></a>01068
+<a name="l01069"></a>01069 <span class="keywordflow">for</span> (i=0; i < <span class="keyword">self</span>->size; i++, image = NULL) {
+<a name="l01070"></a>01070 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename = cpl_frame_get_filename(self->frame[i]);
+<a name="l01071"></a>01071 cpl_error_code error;
<a name="l01072"></a>01072
-<a name="l01073"></a>01073 image = cpl_image_load(filename, pixeltype, planenum, extnum);
-<a name="l01074"></a>01074 <span class="keywordflow">if</span> (image == NULL) {
-<a name="l01075"></a>01075 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01076"></a>01076 <span class="preprocessor"></span> (void)cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01077"></a>01077 <span class="stringliteral">"Could not load FITS-image from plane "</span>
-<a name="l01078"></a>01078 <span class="stringliteral">"%d in extension %d in file %s"</span>,
-<a name="l01079"></a>01079 planenum, extnum, filename);
-<a name="l01080"></a>01080 <span class="preprocessor">#else</span>
-<a name="l01081"></a>01081 <span class="preprocessor"></span> (void)cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01082"></a>01082 <span class="stringliteral">"Could not load FITS-image"</span>);
-<a name="l01083"></a>01083 <span class="preprocessor">#endif</span>
-<a name="l01084"></a>01084 <span class="preprocessor"></span> <span class="keywordflow">break</span>;
-<a name="l01085"></a>01085 }
-<a name="l01086"></a>01086
-<a name="l01087"></a>01087 error = cpl_imagelist_set(list, image, i);
-<a name="l01088"></a>01088 assert(error == CPL_ERROR_NONE);
-<a name="l01089"></a>01089 }
-<a name="l01090"></a>01090
-<a name="l01091"></a>01091 cpl_image_delete(image);
-<a name="l01092"></a>01092
-<a name="l01093"></a>01093 <span class="keywordflow">if</span> (cpl_imagelist_get_size(list) != self->size) {
-<a name="l01094"></a>01094 cpl_imagelist_delete(list);
-<a name="l01095"></a>01095 list = NULL;
-<a name="l01096"></a>01096 assert(cpl_error_get_code() != CPL_ERROR_NONE);
-<a name="l01097"></a>01097 }
-<a name="l01098"></a>01098
-<a name="l01099"></a>01099 <span class="keywordflow">return</span> list;
+<a name="l01073"></a>01073 <span class="keywordflow">if</span> (filename == NULL) <span class="keywordflow">break</span>;
+<a name="l01074"></a>01074
+<a name="l01075"></a>01075 image = cpl_image_load(filename, pixeltype, planenum, extnum);
+<a name="l01076"></a>01076 <span class="keywordflow">if</span> (image == NULL) {
+<a name="l01077"></a>01077 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01078"></a>01078 <span class="preprocessor"></span> (void)cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01079"></a>01079 <span class="stringliteral">"Could not load FITS-image from plane "</span>
+<a name="l01080"></a>01080 <span class="stringliteral">"%d in extension %d in file %s"</span>,
+<a name="l01081"></a>01081 planenum, extnum, filename);
+<a name="l01082"></a>01082 <span class="preprocessor">#else</span>
+<a name="l01083"></a>01083 <span class="preprocessor"></span> (void)cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01084"></a>01084 <span class="stringliteral">"Could not load FITS-image"</span>);
+<a name="l01085"></a>01085 <span class="preprocessor">#endif</span>
+<a name="l01086"></a>01086 <span class="preprocessor"></span> <span class="keywordflow">break</span>;
+<a name="l01087"></a>01087 }
+<a name="l01088"></a>01088
+<a name="l01089"></a>01089 error = cpl_imagelist_set(list, image, i);
+<a name="l01090"></a>01090 assert(error == CPL_ERROR_NONE);
+<a name="l01091"></a>01091 }
+<a name="l01092"></a>01092
+<a name="l01093"></a>01093 cpl_image_delete(image);
+<a name="l01094"></a>01094
+<a name="l01095"></a>01095 <span class="keywordflow">if</span> (cpl_imagelist_get_size(list) != self->size) {
+<a name="l01096"></a>01096 cpl_imagelist_delete(list);
+<a name="l01097"></a>01097 list = NULL;
+<a name="l01098"></a>01098 assert(cpl_error_get_code() != CPL_ERROR_NONE);
+<a name="l01099"></a>01099 }
<a name="l01100"></a>01100
-<a name="l01101"></a>01101 }
+<a name="l01101"></a>01101 <span class="keywordflow">return</span> list;
<a name="l01102"></a>01102
-<a name="l01103"></a>01103
-<a name="l01107"></a>01107 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01119"></a>01119 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01120"></a>01120 <span class="keyword">static</span> <span class="keywordtype">void</span> irplib_framelist_set_size(irplib_framelist * <span class="keyword">self</span>)
-<a name="l01121"></a>01121 {
-<a name="l01122"></a>01122
-<a name="l01123"></a>01123
-<a name="l01124"></a>01124 assert( <span class="keyword">self</span> != NULL);
+<a name="l01103"></a>01103 }
+<a name="l01104"></a>01104
+<a name="l01105"></a>01105
+<a name="l01109"></a>01109 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01121"></a>01121 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01122"></a>01122 <span class="keyword">static</span> <span class="keywordtype">void</span> irplib_framelist_set_size(irplib_framelist * <span class="keyword">self</span>)
+<a name="l01123"></a>01123 {
+<a name="l01124"></a>01124
<a name="l01125"></a>01125
-<a name="l01126"></a>01126 <span class="keywordflow">if</span> (self->size == 0) {
-<a name="l01127"></a>01127 <span class="comment">/* The list has been emptied */</span>
-<a name="l01128"></a>01128 cpl_free(self->frame);
-<a name="l01129"></a>01129 cpl_free(self->propertylist);
-<a name="l01130"></a>01130 <span class="keyword">self</span>->frame = NULL;
-<a name="l01131"></a>01131 <span class="keyword">self</span>->propertylist = NULL;
-<a name="l01132"></a>01132 } <span class="keywordflow">else</span> {
-<a name="l01133"></a>01133 <span class="comment">/* Update the size of the arrays */</span>
-<a name="l01134"></a>01134
-<a name="l01135"></a>01135 <span class="keyword">self</span>->frame = cpl_realloc(self->frame, self->size * <span class="keyword">sizeof</span>(cpl_frame*));
-<a name="l01136"></a>01136 <span class="keyword">self</span>->propertylist =
-<a name="l01137"></a>01137 cpl_realloc(self->propertylist,
-<a name="l01138"></a>01138 self->size * <span class="keyword">sizeof</span>(cpl_propertylist*));
-<a name="l01139"></a>01139 }
-<a name="l01140"></a>01140
-<a name="l01141"></a>01141 }
+<a name="l01126"></a>01126 assert( <span class="keyword">self</span> != NULL);
+<a name="l01127"></a>01127
+<a name="l01128"></a>01128 <span class="keywordflow">if</span> (self->size == 0) {
+<a name="l01129"></a>01129 <span class="comment">/* The list has been emptied */</span>
+<a name="l01130"></a>01130 cpl_free(self->frame);
+<a name="l01131"></a>01131 cpl_free(self->propertylist);
+<a name="l01132"></a>01132 <span class="keyword">self</span>->frame = NULL;
+<a name="l01133"></a>01133 <span class="keyword">self</span>->propertylist = NULL;
+<a name="l01134"></a>01134 } <span class="keywordflow">else</span> {
+<a name="l01135"></a>01135 <span class="comment">/* Update the size of the arrays */</span>
+<a name="l01136"></a>01136
+<a name="l01137"></a>01137 <span class="keyword">self</span>->frame = cpl_realloc(self->frame, self->size * <span class="keyword">sizeof</span>(cpl_frame*));
+<a name="l01138"></a>01138 <span class="keyword">self</span>->propertylist =
+<a name="l01139"></a>01139 cpl_realloc(self->propertylist,
+<a name="l01140"></a>01140 self->size * <span class="keyword">sizeof</span>(cpl_propertylist*));
+<a name="l01141"></a>01141 }
<a name="l01142"></a>01142
-<a name="l01143"></a>01143 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01167"></a>01167 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01168"></a>01168 <span class="keyword">static</span> cpl_boolean irplib_property_equal(<span class="keyword">const</span> cpl_propertylist * <span class="keyword">self</span>,
-<a name="l01169"></a>01169 <span class="keyword">const</span> cpl_propertylist * other,
-<a name="l01170"></a>01170 <span class="keyword">const</span> <span class="keywordtype">char</span> * key, cpl_type type,
-<a name="l01171"></a>01171 <span class="keywordtype">double</span> fp_tol,
-<a name="l01172"></a>01172 <span class="keywordtype">char</span> ** sstring, <span class="keywordtype">char</span> ** ostring)
-<a name="l01173"></a>01173 {
-<a name="l01174"></a>01174
-<a name="l01175"></a>01175 cpl_boolean equal;
+<a name="l01143"></a>01143 }
+<a name="l01144"></a>01144
+<a name="l01145"></a>01145 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01169"></a>01169 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01170"></a>01170 <span class="keyword">static</span> cpl_boolean irplib_property_equal(<span class="keyword">const</span> cpl_propertylist * <span class="keyword">self</span>,
+<a name="l01171"></a>01171 <span class="keyword">const</span> cpl_propertylist * other,
+<a name="l01172"></a>01172 <span class="keyword">const</span> <span class="keywordtype">char</span> * key, cpl_type type,
+<a name="l01173"></a>01173 <span class="keywordtype">double</span> fp_tol,
+<a name="l01174"></a>01174 <span class="keywordtype">char</span> ** sstring, <span class="keywordtype">char</span> ** ostring)
+<a name="l01175"></a>01175 {
<a name="l01176"></a>01176
-<a name="l01177"></a>01177
-<a name="l01178"></a>01178 assert(<span class="keyword">self</span> != NULL);
-<a name="l01179"></a>01179 assert(other != NULL);
-<a name="l01180"></a>01180 assert(key != NULL);
-<a name="l01181"></a>01181 assert(sstring != NULL);
-<a name="l01182"></a>01182 assert(ostring != NULL);
-<a name="l01183"></a>01183
-<a name="l01184"></a>01184 <span class="comment">/* FIXME: disable for better performance also with debugging */</span>
-<a name="l01185"></a>01185 assert(cpl_propertylist_get_type(other, key) == type);
-<a name="l01186"></a>01186 assert(fp_tol >= 0.0);
-<a name="l01187"></a>01187
-<a name="l01188"></a>01188 <span class="keywordflow">if</span> (<span class="keyword">self</span> == other) <span class="keywordflow">return</span> CPL_TRUE;
+<a name="l01177"></a>01177 cpl_boolean equal;
+<a name="l01178"></a>01178
+<a name="l01179"></a>01179
+<a name="l01180"></a>01180 assert(<span class="keyword">self</span> != NULL);
+<a name="l01181"></a>01181 assert(other != NULL);
+<a name="l01182"></a>01182 assert(key != NULL);
+<a name="l01183"></a>01183 assert(sstring != NULL);
+<a name="l01184"></a>01184 assert(ostring != NULL);
+<a name="l01185"></a>01185
+<a name="l01186"></a>01186 <span class="comment">/* FIXME: disable for better performance also with debugging */</span>
+<a name="l01187"></a>01187 assert(cpl_propertylist_get_type(other, key) == type);
+<a name="l01188"></a>01188 assert(fp_tol >= 0.0);
<a name="l01189"></a>01189
-<a name="l01190"></a>01190 <span class="keywordflow">switch</span> (type) {
+<a name="l01190"></a>01190 <span class="keywordflow">if</span> (<span class="keyword">self</span> == other) <span class="keywordflow">return</span> CPL_TRUE;
<a name="l01191"></a>01191
-<a name="l01192"></a>01192 <span class="keywordflow">case</span> CPL_TYPE_CHAR: {
-<a name="l01193"></a>01193 <span class="keyword">const</span> <span class="keywordtype">char</span> svalue = cpl_propertylist_get_char(<span class="keyword">self</span>, key);
-<a name="l01194"></a>01194 <span class="keyword">const</span> <span class="keywordtype">char</span> ovalue = cpl_propertylist_get_char(other, key);
-<a name="l01195"></a>01195
-<a name="l01196"></a>01196 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
-<a name="l01197"></a>01197 <span class="keywordflow">if</span> (!equal) {
-<a name="l01198"></a>01198 *sstring = cpl_sprintf(<span class="stringliteral">"%c"</span>, svalue);
-<a name="l01199"></a>01199 *ostring = cpl_sprintf(<span class="stringliteral">"%c"</span>, ovalue);
-<a name="l01200"></a>01200 }
-<a name="l01201"></a>01201 <span class="keywordflow">break</span>;
-<a name="l01202"></a>01202 }
-<a name="l01203"></a>01203
-<a name="l01204"></a>01204 <span class="keywordflow">case</span> CPL_TYPE_BOOL: {
-<a name="l01205"></a>01205 <span class="keyword">const</span> <span class="keywordtype">int</span> svalue = cpl_propertylist_get_bool(<span class="keyword">self</span>, key);
-<a name="l01206"></a>01206 <span class="keyword">const</span> <span class="keywordtype">int</span> ovalue = cpl_propertylist_get_bool(other, key);
-<a name="l01207"></a>01207
-<a name="l01208"></a>01208 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
-<a name="l01209"></a>01209 <span class="keywordflow">if</span> (!equal) {
-<a name="l01210"></a>01210 *sstring = cpl_strdup(svalue == 0 ? <span class="stringliteral">"F"</span> : <span class="stringliteral">"T"</span>);
-<a name="l01211"></a>01211 *ostring = cpl_strdup(ovalue == 0 ? <span class="stringliteral">"F"</span> : <span class="stringliteral">"T"</span>);
-<a name="l01212"></a>01212 }
-<a name="l01213"></a>01213 <span class="keywordflow">break</span>;
-<a name="l01214"></a>01214 }
-<a name="l01215"></a>01215
-<a name="l01216"></a>01216 <span class="keywordflow">case</span> CPL_TYPE_INT: {
-<a name="l01217"></a>01217 <span class="keyword">const</span> <span class="keywordtype">int</span> svalue = cpl_propertylist_get_int(<span class="keyword">self</span>, key);
-<a name="l01218"></a>01218 <span class="keyword">const</span> <span class="keywordtype">int</span> ovalue = cpl_propertylist_get_int(other, key);
-<a name="l01219"></a>01219
-<a name="l01220"></a>01220 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
-<a name="l01221"></a>01221 <span class="keywordflow">if</span> (!equal) {
-<a name="l01222"></a>01222 *sstring = cpl_sprintf(<span class="stringliteral">"%d"</span>, svalue);
-<a name="l01223"></a>01223 *ostring = cpl_sprintf(<span class="stringliteral">"%d"</span>, ovalue);
-<a name="l01224"></a>01224 }
-<a name="l01225"></a>01225 <span class="keywordflow">break</span>;
-<a name="l01226"></a>01226 }
-<a name="l01227"></a>01227
-<a name="l01228"></a>01228 <span class="keywordflow">case</span> CPL_TYPE_LONG: {
-<a name="l01229"></a>01229 <span class="keyword">const</span> <span class="keywordtype">long</span> svalue = cpl_propertylist_get_long(<span class="keyword">self</span>, key);
-<a name="l01230"></a>01230 <span class="keyword">const</span> <span class="keywordtype">long</span> ovalue = cpl_propertylist_get_long(other, key);
-<a name="l01231"></a>01231
-<a name="l01232"></a>01232 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
-<a name="l01233"></a>01233 <span class="keywordflow">if</span> (!equal) {
-<a name="l01234"></a>01234 *sstring = cpl_sprintf(<span class="stringliteral">"%ld"</span>, svalue);
-<a name="l01235"></a>01235 *ostring = cpl_sprintf(<span class="stringliteral">"%ld"</span>, ovalue);
-<a name="l01236"></a>01236 }
-<a name="l01237"></a>01237 <span class="keywordflow">break</span>;
-<a name="l01238"></a>01238 }
-<a name="l01239"></a>01239
-<a name="l01240"></a>01240 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: {
-<a name="l01241"></a>01241 <span class="keyword">const</span> <span class="keywordtype">double</span> svalue = (double)cpl_propertylist_get_float(<span class="keyword">self</span>, key);
-<a name="l01242"></a>01242 <span class="keyword">const</span> <span class="keywordtype">double</span> ovalue = (double)cpl_propertylist_get_float(other, key);
-<a name="l01243"></a>01243
-<a name="l01244"></a>01244 equal = (fabs(svalue - ovalue) <= fp_tol) ? CPL_TRUE : CPL_FALSE;
-<a name="l01245"></a>01245 <span class="keywordflow">if</span> (!equal) {
-<a name="l01246"></a>01246 *sstring = cpl_sprintf(<span class="stringliteral">"%f"</span>, svalue);
-<a name="l01247"></a>01247 *ostring = cpl_sprintf(<span class="stringliteral">"%f"</span>, ovalue);
-<a name="l01248"></a>01248 }
-<a name="l01249"></a>01249 <span class="keywordflow">break</span>;
-<a name="l01250"></a>01250 }
-<a name="l01251"></a>01251
-<a name="l01252"></a>01252 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: {
-<a name="l01253"></a>01253 <span class="keyword">const</span> <span class="keywordtype">double</span> svalue = cpl_propertylist_get_double(<span class="keyword">self</span>, key);
-<a name="l01254"></a>01254 <span class="keyword">const</span> <span class="keywordtype">double</span> ovalue = cpl_propertylist_get_double(other, key);
-<a name="l01255"></a>01255
-<a name="l01256"></a>01256 equal = (fabs(svalue - ovalue) <= fp_tol) ? CPL_TRUE : CPL_FALSE;
-<a name="l01257"></a>01257 <span class="keywordflow">if</span> (!equal) {
-<a name="l01258"></a>01258 *sstring = cpl_sprintf(<span class="stringliteral">"%g"</span>, svalue);
-<a name="l01259"></a>01259 *ostring = cpl_sprintf(<span class="stringliteral">"%g"</span>, ovalue);
-<a name="l01260"></a>01260 }
-<a name="l01261"></a>01261 <span class="keywordflow">break</span>;
-<a name="l01262"></a>01262 }
-<a name="l01263"></a>01263 <span class="keywordflow">case</span> CPL_TYPE_STRING: {
-<a name="l01264"></a>01264 <span class="keyword">const</span> <span class="keywordtype">char</span> * svalue = cpl_propertylist_get_string(<span class="keyword">self</span>, key);
-<a name="l01265"></a>01265 <span class="keyword">const</span> <span class="keywordtype">char</span> * ovalue = cpl_propertylist_get_string(other, key);
-<a name="l01266"></a>01266
-<a name="l01267"></a>01267 equal = strcmp(svalue, ovalue) == 0 ? CPL_TRUE : CPL_FALSE;
-<a name="l01268"></a>01268 <span class="keywordflow">if</span> (!equal) {
-<a name="l01269"></a>01269 *sstring = cpl_strdup(svalue);
-<a name="l01270"></a>01270 *ostring = cpl_strdup(ovalue);
-<a name="l01271"></a>01271 }
-<a name="l01272"></a>01272 <span class="keywordflow">break</span>;
-<a name="l01273"></a>01273 }
-<a name="l01274"></a>01274 <span class="keywordflow">default</span>:
-<a name="l01275"></a>01275 <span class="comment">/* Unknown property type */</span>
-<a name="l01276"></a>01276 assert( 0 );
-<a name="l01277"></a>01277
-<a name="l01278"></a>01278 equal = CPL_FALSE; <span class="comment">/* In case of -DNDEBUG */</span>
+<a name="l01192"></a>01192 <span class="keywordflow">switch</span> (type) {
+<a name="l01193"></a>01193
+<a name="l01194"></a>01194 <span class="keywordflow">case</span> CPL_TYPE_CHAR: {
+<a name="l01195"></a>01195 <span class="keyword">const</span> <span class="keywordtype">char</span> svalue = cpl_propertylist_get_char(<span class="keyword">self</span>, key);
+<a name="l01196"></a>01196 <span class="keyword">const</span> <span class="keywordtype">char</span> ovalue = cpl_propertylist_get_char(other, key);
+<a name="l01197"></a>01197
+<a name="l01198"></a>01198 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
+<a name="l01199"></a>01199 <span class="keywordflow">if</span> (!equal) {
+<a name="l01200"></a>01200 *sstring = cpl_sprintf(<span class="stringliteral">"%c"</span>, svalue);
+<a name="l01201"></a>01201 *ostring = cpl_sprintf(<span class="stringliteral">"%c"</span>, ovalue);
+<a name="l01202"></a>01202 }
+<a name="l01203"></a>01203 <span class="keywordflow">break</span>;
+<a name="l01204"></a>01204 }
+<a name="l01205"></a>01205
+<a name="l01206"></a>01206 <span class="keywordflow">case</span> CPL_TYPE_BOOL: {
+<a name="l01207"></a>01207 <span class="keyword">const</span> <span class="keywordtype">int</span> svalue = cpl_propertylist_get_bool(<span class="keyword">self</span>, key);
+<a name="l01208"></a>01208 <span class="keyword">const</span> <span class="keywordtype">int</span> ovalue = cpl_propertylist_get_bool(other, key);
+<a name="l01209"></a>01209
+<a name="l01210"></a>01210 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
+<a name="l01211"></a>01211 <span class="keywordflow">if</span> (!equal) {
+<a name="l01212"></a>01212 *sstring = cpl_strdup(svalue == 0 ? <span class="stringliteral">"F"</span> : <span class="stringliteral">"T"</span>);
+<a name="l01213"></a>01213 *ostring = cpl_strdup(ovalue == 0 ? <span class="stringliteral">"F"</span> : <span class="stringliteral">"T"</span>);
+<a name="l01214"></a>01214 }
+<a name="l01215"></a>01215 <span class="keywordflow">break</span>;
+<a name="l01216"></a>01216 }
+<a name="l01217"></a>01217
+<a name="l01218"></a>01218 <span class="keywordflow">case</span> CPL_TYPE_INT: {
+<a name="l01219"></a>01219 <span class="keyword">const</span> <span class="keywordtype">int</span> svalue = cpl_propertylist_get_int(<span class="keyword">self</span>, key);
+<a name="l01220"></a>01220 <span class="keyword">const</span> <span class="keywordtype">int</span> ovalue = cpl_propertylist_get_int(other, key);
+<a name="l01221"></a>01221
+<a name="l01222"></a>01222 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
+<a name="l01223"></a>01223 <span class="keywordflow">if</span> (!equal) {
+<a name="l01224"></a>01224 *sstring = cpl_sprintf(<span class="stringliteral">"%d"</span>, svalue);
+<a name="l01225"></a>01225 *ostring = cpl_sprintf(<span class="stringliteral">"%d"</span>, ovalue);
+<a name="l01226"></a>01226 }
+<a name="l01227"></a>01227 <span class="keywordflow">break</span>;
+<a name="l01228"></a>01228 }
+<a name="l01229"></a>01229
+<a name="l01230"></a>01230 <span class="keywordflow">case</span> CPL_TYPE_LONG: {
+<a name="l01231"></a>01231 <span class="keyword">const</span> <span class="keywordtype">long</span> svalue = cpl_propertylist_get_long(<span class="keyword">self</span>, key);
+<a name="l01232"></a>01232 <span class="keyword">const</span> <span class="keywordtype">long</span> ovalue = cpl_propertylist_get_long(other, key);
+<a name="l01233"></a>01233
+<a name="l01234"></a>01234 equal = svalue == ovalue ? CPL_TRUE : CPL_FALSE;
+<a name="l01235"></a>01235 <span class="keywordflow">if</span> (!equal) {
+<a name="l01236"></a>01236 *sstring = cpl_sprintf(<span class="stringliteral">"%ld"</span>, svalue);
+<a name="l01237"></a>01237 *ostring = cpl_sprintf(<span class="stringliteral">"%ld"</span>, ovalue);
+<a name="l01238"></a>01238 }
+<a name="l01239"></a>01239 <span class="keywordflow">break</span>;
+<a name="l01240"></a>01240 }
+<a name="l01241"></a>01241
+<a name="l01242"></a>01242 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: {
+<a name="l01243"></a>01243 <span class="keyword">const</span> <span class="keywordtype">double</span> svalue = (double)cpl_propertylist_get_float(<span class="keyword">self</span>, key);
+<a name="l01244"></a>01244 <span class="keyword">const</span> <span class="keywordtype">double</span> ovalue = (double)cpl_propertylist_get_float(other, key);
+<a name="l01245"></a>01245
+<a name="l01246"></a>01246 equal = (fabs(svalue - ovalue) <= fp_tol) ? CPL_TRUE : CPL_FALSE;
+<a name="l01247"></a>01247 <span class="keywordflow">if</span> (!equal) {
+<a name="l01248"></a>01248 *sstring = cpl_sprintf(<span class="stringliteral">"%f"</span>, svalue);
+<a name="l01249"></a>01249 *ostring = cpl_sprintf(<span class="stringliteral">"%f"</span>, ovalue);
+<a name="l01250"></a>01250 }
+<a name="l01251"></a>01251 <span class="keywordflow">break</span>;
+<a name="l01252"></a>01252 }
+<a name="l01253"></a>01253
+<a name="l01254"></a>01254 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: {
+<a name="l01255"></a>01255 <span class="keyword">const</span> <span class="keywordtype">double</span> svalue = cpl_propertylist_get_double(<span class="keyword">self</span>, key);
+<a name="l01256"></a>01256 <span class="keyword">const</span> <span class="keywordtype">double</span> ovalue = cpl_propertylist_get_double(other, key);
+<a name="l01257"></a>01257
+<a name="l01258"></a>01258 equal = (fabs(svalue - ovalue) <= fp_tol) ? CPL_TRUE : CPL_FALSE;
+<a name="l01259"></a>01259 <span class="keywordflow">if</span> (!equal) {
+<a name="l01260"></a>01260 *sstring = cpl_sprintf(<span class="stringliteral">"%g"</span>, svalue);
+<a name="l01261"></a>01261 *ostring = cpl_sprintf(<span class="stringliteral">"%g"</span>, ovalue);
+<a name="l01262"></a>01262 }
+<a name="l01263"></a>01263 <span class="keywordflow">break</span>;
+<a name="l01264"></a>01264 }
+<a name="l01265"></a>01265 <span class="keywordflow">case</span> CPL_TYPE_STRING: {
+<a name="l01266"></a>01266 <span class="keyword">const</span> <span class="keywordtype">char</span> * svalue = cpl_propertylist_get_string(<span class="keyword">self</span>, key);
+<a name="l01267"></a>01267 <span class="keyword">const</span> <span class="keywordtype">char</span> * ovalue = cpl_propertylist_get_string(other, key);
+<a name="l01268"></a>01268
+<a name="l01269"></a>01269 equal = strcmp(svalue, ovalue) == 0 ? CPL_TRUE : CPL_FALSE;
+<a name="l01270"></a>01270 <span class="keywordflow">if</span> (!equal) {
+<a name="l01271"></a>01271 *sstring = cpl_strdup(svalue);
+<a name="l01272"></a>01272 *ostring = cpl_strdup(ovalue);
+<a name="l01273"></a>01273 }
+<a name="l01274"></a>01274 <span class="keywordflow">break</span>;
+<a name="l01275"></a>01275 }
+<a name="l01276"></a>01276 <span class="keywordflow">default</span>:
+<a name="l01277"></a>01277 <span class="comment">/* Unknown property type */</span>
+<a name="l01278"></a>01278 assert( 0 );
<a name="l01279"></a>01279
-<a name="l01280"></a>01280 }
+<a name="l01280"></a>01280 equal = CPL_FALSE; <span class="comment">/* In case of -DNDEBUG */</span>
<a name="l01281"></a>01281
-<a name="l01282"></a>01282 <span class="keywordflow">if</span> (!equal) {
-<a name="l01283"></a>01283 assert( *sstring != NULL );
-<a name="l01284"></a>01284 assert( *ostring != NULL );
-<a name="l01285"></a>01285 }
-<a name="l01286"></a>01286
-<a name="l01287"></a>01287 <span class="keywordflow">return</span> equal;
+<a name="l01282"></a>01282 }
+<a name="l01283"></a>01283
+<a name="l01284"></a>01284 <span class="keywordflow">if</span> (!equal) {
+<a name="l01285"></a>01285 assert( *sstring != NULL );
+<a name="l01286"></a>01286 assert( *ostring != NULL );
+<a name="l01287"></a>01287 }
<a name="l01288"></a>01288
-<a name="l01289"></a>01289 }
+<a name="l01289"></a>01289 <span class="keywordflow">return</span> equal;
+<a name="l01290"></a>01290
+<a name="l01291"></a>01291 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__framelist_8h_source.html b/html/irplib__framelist_8h_source.html
index 15dde46..0c3ce46 100644
--- a/html/irplib__framelist_8h_source.html
+++ b/html/irplib__framelist_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/11/20 10:24:47 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_FRAMELIST_H</span>
@@ -116,7 +116,7 @@
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__hist_8c_source.html b/html/irplib__hist_8c_source.html
index 2717f7c..ee6341c 100644
--- a/html/irplib__hist_8c_source.html
+++ b/html/irplib__hist_8c_source.html
@@ -34,7 +34,7 @@
<a name="l00024"></a>00024 <span class="comment"> * $Id: irplib_hist.c,v 1.7 2009/10/15 14:02:18 kmirny Exp $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Date: 2009/10/15 14:02:18 $</span>
<a name="l00026"></a>00026 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00027"></a>00027 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00027"></a>00027 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00028"></a>00028 <span class="comment"> */</span>
<a name="l00029"></a>00029
<a name="l00030"></a>00030 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -359,7 +359,7 @@
<a name="l00349"></a>00349 <span class="keywordflow">return</span> cpl_error_get_code();
<a name="l00350"></a>00350 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__hist_8h_source.html b/html/irplib__hist_8h_source.html
index 18660c3..dd4a767 100644
--- a/html/irplib__hist_8h_source.html
+++ b/html/irplib__hist_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: lbilbao $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/09/07 14:23:50 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_HIST_H</span>
@@ -102,7 +102,7 @@
<a name="l00092"></a>00092 <span class="preprocessor">#endif </span><span class="comment">/* IRPLIB_HIST_H */</span>
<a name="l00093"></a>00093
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__ksigma__clip_8c_source.html b/html/irplib__ksigma__clip_8c_source.html
index fc09d41..0d0df63 100644
--- a/html/irplib__ksigma__clip_8c_source.html
+++ b/html/irplib__ksigma__clip_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/02 13:18:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -216,7 +216,7 @@
<a name="l00257"></a>00257 <span class="preprocessor">#undef CPL_TYPE</span>
<a name="l00258"></a>00258 <span class="preprocessor"></span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__ksigma__clip_8h_source.html b/html/irplib__ksigma__clip_8h_source.html
index 94007b5..f8e73eb 100644
--- a/html/irplib__ksigma__clip_8h_source.html
+++ b/html/irplib__ksigma__clip_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/02 13:18:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_KSIGMA_CLIP_H</span>
@@ -61,7 +61,7 @@
<a name="l00051"></a>00051
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__ksigma__clip__body_8h_source.html b/html/irplib__ksigma__clip__body_8h_source.html
index a0bb956..bad7bcd 100644
--- a/html/irplib__ksigma__clip__body_8h_source.html
+++ b/html/irplib__ksigma__clip__body_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/02 13:18:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#define TYPE_ADD(a) CONCAT2X(a, CPL_TYPE)</span>
@@ -116,7 +116,7 @@
<a name="l00106"></a>00106 <span class="keywordflow">return</span> cpl_error_get_code();
<a name="l00107"></a>00107 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__match__cats_8c_source.html b/html/irplib__match__cats_8c_source.html
index 36cca8f..104ea3d 100644
--- a/html/irplib__match__cats_8c_source.html
+++ b/html/irplib__match__cats_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/12/18 10:44:48 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -194,7 +194,7 @@
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__match__cats_8h_source.html b/html/irplib__match__cats_8h_source.html
index b9742fe..5998857 100644
--- a/html/irplib__match__cats_8h_source.html
+++ b/html/irplib__match__cats_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/12/18 10:44:48 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_MATCH_CATS_H</span>
@@ -55,7 +55,7 @@
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__mkmaster_8c_source.html b/html/irplib__mkmaster_8c_source.html
index db32378..c8a688f 100644
--- a/html/irplib__mkmaster_8c_source.html
+++ b/html/irplib__mkmaster_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_mkmaster.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_mkmaster.c,v 1.5 2012/01/12 14:29:41 amodigli Exp $</span>
+<h1>irplib_mkmaster.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_mkmaster.c,v 1.6 2013/02/27 16:00:51 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 14:29:41 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/02/27 16:00:51 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -331,152 +331,154 @@
<a name="l00401"></a>00401 <span class="comment">/* UVES specific stuff: may be this function should not be put in irplib</span>
<a name="l00402"></a>00402 <span class="comment"> irplib_mdark_region_qc(current_dark, parameters, raw_images, recipe_id,qclog);</span>
<a name="l00403"></a>00403 <span class="comment"> */</span>
-<a name="l00404"></a>00404 }
-<a name="l00405"></a>00405 }
-<a name="l00406"></a>00406 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00407"></a>00407 }
-<a name="l00408"></a>00408
-<a name="l00409"></a>00409 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l00419"></a>00419 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l00420"></a>00420 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00421"></a>00421 irplib_head_get_exptime(<span class="keyword">const</span> cpl_propertylist * plist) {
-<a name="l00422"></a>00422 <span class="keywordtype">double</span> result = 0; <span class="comment">/* Conversion from electrons to ADUs */</span>
-<a name="l00423"></a>00423
-<a name="l00424"></a>00424 result=cpl_propertylist_get_double(plist, <span class="stringliteral">"EXPTIME"</span>);
-<a name="l00425"></a>00425 cpl_ensure_code(result >= 0, CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00426"></a>00426
-<a name="l00427"></a>00427 <span class="keywordflow">return</span> result;
-<a name="l00428"></a>00428 }
-<a name="l00429"></a>00429
-<a name="l00430"></a>00430 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l00438"></a>00438 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l00439"></a>00439 <span class="keyword">static</span> cpl_error_code
-<a name="l00440"></a>00440 irplib_head_set_exptime(cpl_propertylist *plist, <span class="keywordtype">double</span> exptime)
-<a name="l00441"></a>00441 {
-<a name="l00442"></a>00442 cpl_propertylist_update_double(plist, <span class="stringliteral">"EXPTIME"</span>, exptime);
-<a name="l00443"></a>00443 cpl_propertylist_set_comment(plist, <span class="stringliteral">"EXPTIME"</span>, <span class="stringliteral">"Total integration time"</span>);
-<a name="l00444"></a>00444
-<a name="l00445"></a>00445 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00446"></a>00446 }
-<a name="l00447"></a>00447
-<a name="l00448"></a>00448 <span class="keyword">static</span> cpl_imagelist*
-<a name="l00449"></a>00449 irplib_mkmaster_dark_fill_imagelist(<span class="keyword">const</span> cpl_imagelist* raw_images,
-<a name="l00450"></a>00450 cpl_propertylist** raw_headers, <span class="keyword">const</span> cpl_image* master_bias,
-<a name="l00451"></a>00451 <span class="keywordtype">double</span>* mean_exptime) {
-<a name="l00452"></a>00452 <span class="comment">/* First process each input image and store the results in a</span>
-<a name="l00453"></a>00453 <span class="comment"> new image list */</span>
-<a name="l00454"></a>00454
-<a name="l00455"></a>00455 cpl_imagelist* preproc_images = NULL;
-<a name="l00456"></a>00456 <span class="keywordtype">int</span> i = 0;
-<a name="l00457"></a>00457 cpl_image* current_dark = NULL;
-<a name="l00458"></a>00458 <span class="keywordtype">double</span> min_exptime = 0;
-<a name="l00459"></a>00459 <span class="keywordtype">double</span> max_exptime = 0;
-<a name="l00460"></a>00460
-<a name="l00461"></a>00461 preproc_images = cpl_imagelist_new();
-<a name="l00462"></a>00462 <span class="keywordflow">for</span> (i = 0; i < cpl_imagelist_get_size(raw_images); i++) {
-<a name="l00463"></a>00463 <span class="keywordtype">double</span> exposure_time = 0.0;
-<a name="l00464"></a>00464 <span class="keyword">const</span> cpl_propertylist *current_header;
-<a name="l00465"></a>00465
-<a name="l00466"></a>00466 current_dark = cpl_image_duplicate(cpl_imagelist_get_const(raw_images, i));
-<a name="l00467"></a>00467 current_header = raw_headers[i];
-<a name="l00468"></a>00468
-<a name="l00469"></a>00469 <span class="comment">/* Subtract master bias */</span>
-<a name="l00470"></a>00470 <span class="keywordflow">if</span> (master_bias != NULL) {
-<a name="l00471"></a>00471 cpl_msg_info(cpl_func, <span class="stringliteral">"Subtracting master bias"</span>);
-<a name="l00472"></a>00472 cpl_image_subtract(current_dark, master_bias);
-<a name="l00473"></a>00473 } <span class="keywordflow">else</span> {
-<a name="l00474"></a>00474 cpl_msg_info(cpl_func, <span class="stringliteral">"Skipping bias subtraction"</span>);
-<a name="l00475"></a>00475 }
-<a name="l00476"></a>00476
-<a name="l00477"></a>00477 exposure_time = irplib_head_get_exptime(current_header);
+<a name="l00404"></a>00404 <span class="comment">/* FIXME: still safe if irplib_mdark_region_qc is commented in? */</span>
+<a name="l00405"></a>00405 cpl_image_delete(current_dark);
+<a name="l00406"></a>00406 }
+<a name="l00407"></a>00407 }
+<a name="l00408"></a>00408 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00409"></a>00409 }
+<a name="l00410"></a>00410
+<a name="l00411"></a>00411 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l00421"></a>00421 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l00422"></a>00422 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00423"></a>00423 irplib_head_get_exptime(<span class="keyword">const</span> cpl_propertylist * plist) {
+<a name="l00424"></a>00424 <span class="keywordtype">double</span> result = 0; <span class="comment">/* Conversion from electrons to ADUs */</span>
+<a name="l00425"></a>00425
+<a name="l00426"></a>00426 result=cpl_propertylist_get_double(plist, <span class="stringliteral">"EXPTIME"</span>);
+<a name="l00427"></a>00427 cpl_ensure_code(result >= 0, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00428"></a>00428
+<a name="l00429"></a>00429 <span class="keywordflow">return</span> result;
+<a name="l00430"></a>00430 }
+<a name="l00431"></a>00431
+<a name="l00432"></a>00432 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l00440"></a>00440 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l00441"></a>00441 <span class="keyword">static</span> cpl_error_code
+<a name="l00442"></a>00442 irplib_head_set_exptime(cpl_propertylist *plist, <span class="keywordtype">double</span> exptime)
+<a name="l00443"></a>00443 {
+<a name="l00444"></a>00444 cpl_propertylist_update_double(plist, <span class="stringliteral">"EXPTIME"</span>, exptime);
+<a name="l00445"></a>00445 cpl_propertylist_set_comment(plist, <span class="stringliteral">"EXPTIME"</span>, <span class="stringliteral">"Total integration time"</span>);
+<a name="l00446"></a>00446
+<a name="l00447"></a>00447 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00448"></a>00448 }
+<a name="l00449"></a>00449
+<a name="l00450"></a>00450 <span class="keyword">static</span> cpl_imagelist*
+<a name="l00451"></a>00451 irplib_mkmaster_dark_fill_imagelist(<span class="keyword">const</span> cpl_imagelist* raw_images,
+<a name="l00452"></a>00452 cpl_propertylist** raw_headers, <span class="keyword">const</span> cpl_image* master_bias,
+<a name="l00453"></a>00453 <span class="keywordtype">double</span>* mean_exptime) {
+<a name="l00454"></a>00454 <span class="comment">/* First process each input image and store the results in a</span>
+<a name="l00455"></a>00455 <span class="comment"> new image list */</span>
+<a name="l00456"></a>00456
+<a name="l00457"></a>00457 cpl_imagelist* preproc_images = NULL;
+<a name="l00458"></a>00458 <span class="keywordtype">int</span> i = 0;
+<a name="l00459"></a>00459 cpl_image* current_dark = NULL;
+<a name="l00460"></a>00460 <span class="keywordtype">double</span> min_exptime = 0;
+<a name="l00461"></a>00461 <span class="keywordtype">double</span> max_exptime = 0;
+<a name="l00462"></a>00462
+<a name="l00463"></a>00463 preproc_images = cpl_imagelist_new();
+<a name="l00464"></a>00464 <span class="keywordflow">for</span> (i = 0; i < cpl_imagelist_get_size(raw_images); i++) {
+<a name="l00465"></a>00465 <span class="keywordtype">double</span> exposure_time = 0.0;
+<a name="l00466"></a>00466 <span class="keyword">const</span> cpl_propertylist *current_header;
+<a name="l00467"></a>00467
+<a name="l00468"></a>00468 current_dark = cpl_image_duplicate(cpl_imagelist_get_const(raw_images, i));
+<a name="l00469"></a>00469 current_header = raw_headers[i];
+<a name="l00470"></a>00470
+<a name="l00471"></a>00471 <span class="comment">/* Subtract master bias */</span>
+<a name="l00472"></a>00472 <span class="keywordflow">if</span> (master_bias != NULL) {
+<a name="l00473"></a>00473 cpl_msg_info(cpl_func, <span class="stringliteral">"Subtracting master bias"</span>);
+<a name="l00474"></a>00474 cpl_image_subtract(current_dark, master_bias);
+<a name="l00475"></a>00475 } <span class="keywordflow">else</span> {
+<a name="l00476"></a>00476 cpl_msg_info(cpl_func, <span class="stringliteral">"Skipping bias subtraction"</span>);
+<a name="l00477"></a>00477 }
<a name="l00478"></a>00478
-<a name="l00479"></a>00479 <span class="comment">/* Initialize/update min/max exposure time*/</span>
-<a name="l00480"></a>00480 <span class="keywordflow">if</span> (i == 0 || exposure_time < min_exptime) {
-<a name="l00481"></a>00481 min_exptime = exposure_time;
-<a name="l00482"></a>00482 }
-<a name="l00483"></a>00483 <span class="keywordflow">if</span> (i == 0 || exposure_time > max_exptime) {
-<a name="l00484"></a>00484 max_exptime = exposure_time;
-<a name="l00485"></a>00485 }
-<a name="l00486"></a>00486
-<a name="l00487"></a>00487 <span class="comment">/* Do not normalize to unit exposure time */</span>
-<a name="l00488"></a>00488 <span class="comment">/* If this is uncommented, then remember to also calculate the</span>
-<a name="l00489"></a>00489 <span class="comment"> correct master dark exposure time below.</span>
-<a name="l00490"></a>00490 <span class="comment"> irplib_msg("Normalizing from %f s to unit exposure time", exposure_time);</span>
-<a name="l00491"></a>00491 <span class="comment"> check( cpl_image_divide_scalar(current_dark, exposure_time),</span>
-<a name="l00492"></a>00492 <span class="comment"> "Error normalizing dark frame"); */</span>
-<a name="l00493"></a>00493
-<a name="l00494"></a>00494 <span class="comment">/* Append to imagelist */</span>
-<a name="l00495"></a>00495 cpl_imagelist_set(preproc_images, current_dark, i);
-<a name="l00496"></a>00496
-<a name="l00497"></a>00497 <span class="comment">/* Don't deallocate the image. It will be deallocated when</span>
-<a name="l00498"></a>00498 <span class="comment"> the image list is deallocated */</span>
-<a name="l00499"></a>00499 current_dark = NULL;
-<a name="l00500"></a>00500 }
-<a name="l00501"></a>00501
-<a name="l00502"></a>00502
-<a name="l00503"></a>00503 <span class="comment">/* Check exposure times */</span>
-<a name="l00504"></a>00504 cpl_msg_info(cpl_func,
-<a name="l00505"></a>00505 <span class="stringliteral">"Exposure times range from %e s to %e s (%e %% variation)"</span>, min_exptime,
-<a name="l00506"></a>00506 max_exptime, 100 * (max_exptime - min_exptime) / min_exptime);
-<a name="l00507"></a>00507
-<a name="l00508"></a>00508 <span class="keywordflow">if</span> ((max_exptime - min_exptime) / min_exptime > .001) {
-<a name="l00509"></a>00509 cpl_msg_warning(cpl_func, <span class="stringliteral">"Exposure times differ by %e %%"</span>,
-<a name="l00510"></a>00510 100 * (max_exptime - min_exptime) / min_exptime);
-<a name="l00511"></a>00511 }
-<a name="l00512"></a>00512
-<a name="l00513"></a>00513 <span class="comment">/* compute correct exposure time */</span>
-<a name="l00514"></a>00514 *mean_exptime=0.5 * (max_exptime + min_exptime);
-<a name="l00515"></a>00515 <span class="keywordflow">return</span> preproc_images;
-<a name="l00516"></a>00516 }
-<a name="l00517"></a>00517
-<a name="l00518"></a>00518
-<a name="l00519"></a>00519 cpl_image *
-<a name="l00520"></a>00520 irplib_mdark_process_chip(<span class="keyword">const</span> cpl_imagelist *raw_images,
-<a name="l00521"></a>00521 cpl_propertylist **raw_headers, <span class="keyword">const</span> cpl_image *master_bias,
-<a name="l00522"></a>00522 cpl_propertylist *mdark_header, <span class="keyword">const</span> cpl_parameterlist *parameters,
-<a name="l00523"></a>00523 <span class="keyword">const</span> <span class="keywordtype">char</span>* recipe_id, cpl_table* qclog, <span class="keyword">const</span> <span class="keywordtype">int</span> do_qc,
-<a name="l00524"></a>00524 <span class="keyword">const</span> <span class="keywordtype">char</span>* STACK_METHOD, <span class="keyword">const</span> <span class="keywordtype">double</span> STACK_KLOW, <span class="keyword">const</span> <span class="keywordtype">double</span> STACK_KHIGH,
-<a name="l00525"></a>00525 <span class="keyword">const</span> <span class="keywordtype">int</span> STACK_NITER,
-<a name="l00526"></a>00526 <span class="keyword">const</span> <span class="keywordtype">int</span> pr_num_x, <span class="keyword">const</span> <span class="keywordtype">int</span> pr_num_y,
-<a name="l00527"></a>00527 <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sx, <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sy) {
-<a name="l00528"></a>00528 cpl_image *master_dark = NULL; <span class="comment">/* Result */</span>
-<a name="l00529"></a>00529 cpl_image *current_dark = NULL;
-<a name="l00530"></a>00530 cpl_imagelist *preproc_images = NULL;
-<a name="l00531"></a>00531 <span class="keywordtype">double</span> mean_exptime = 0;
-<a name="l00532"></a>00532
-<a name="l00533"></a>00533 <span class="comment">/* First process each input image and store the results in a</span>
-<a name="l00534"></a>00534 <span class="comment"> new image list */</span>
-<a name="l00535"></a>00535 preproc_images = irplib_mkmaster_dark_fill_imagelist(raw_images, raw_headers,
-<a name="l00536"></a>00536 master_bias, &mean_exptime);
-<a name="l00537"></a>00537 <span class="keywordflow">if</span> (do_qc) {
-<a name="l00538"></a>00538 <span class="comment">/* Here we should compute QC but a a better way to log it is TBD */</span>
-<a name="l00539"></a>00539 irplib_mkmaster_dark_qc(raw_images, preproc_images, parameters, pr_num_x,
-<a name="l00540"></a>00540 pr_num_y, pr_box_sx, pr_box_sy, recipe_id, qclog);
-<a name="l00541"></a>00541
-<a name="l00542"></a>00542 }
-<a name="l00543"></a>00543 <span class="comment">/* Get median stack of input darks */</span>
-<a name="l00544"></a>00544 <span class="keywordflow">if</span> (strcmp(STACK_METHOD, <span class="stringliteral">"MEDIAN"</span>) == 0) {
-<a name="l00545"></a>00545 cpl_msg_info(cpl_func, <span class="stringliteral">"Calculating stack median"</span>);
-<a name="l00546"></a>00546 master_dark = cpl_imagelist_collapse_median_create(preproc_images);
-<a name="l00547"></a>00547 } <span class="keywordflow">else</span> {
-<a name="l00548"></a>00548 cpl_msg_info(cpl_func, <span class="stringliteral">"Calculating stack mean"</span>);
-<a name="l00549"></a>00549 master_dark = irplib_imagelist_ksigma_stack(preproc_images, STACK_KLOW,
-<a name="l00550"></a>00550 STACK_KHIGH, STACK_NITER);
-<a name="l00551"></a>00551
-<a name="l00552"></a>00552 }
-<a name="l00553"></a>00553 irplib_head_set_exptime(mdark_header, mean_exptime );
-<a name="l00554"></a>00554
-<a name="l00555"></a>00555 cpl_image_delete(current_dark);
-<a name="l00556"></a>00556 cpl_imagelist_delete(preproc_images);
-<a name="l00557"></a>00557 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l00558"></a>00558 cpl_image_delete(master_dark);
-<a name="l00559"></a>00559 }
-<a name="l00560"></a>00560
-<a name="l00561"></a>00561 <span class="keywordflow">return</span> master_dark;
-<a name="l00562"></a>00562 }
-<a name="l00563"></a>00563
+<a name="l00479"></a>00479 exposure_time = irplib_head_get_exptime(current_header);
+<a name="l00480"></a>00480
+<a name="l00481"></a>00481 <span class="comment">/* Initialize/update min/max exposure time*/</span>
+<a name="l00482"></a>00482 <span class="keywordflow">if</span> (i == 0 || exposure_time < min_exptime) {
+<a name="l00483"></a>00483 min_exptime = exposure_time;
+<a name="l00484"></a>00484 }
+<a name="l00485"></a>00485 <span class="keywordflow">if</span> (i == 0 || exposure_time > max_exptime) {
+<a name="l00486"></a>00486 max_exptime = exposure_time;
+<a name="l00487"></a>00487 }
+<a name="l00488"></a>00488
+<a name="l00489"></a>00489 <span class="comment">/* Do not normalize to unit exposure time */</span>
+<a name="l00490"></a>00490 <span class="comment">/* If this is uncommented, then remember to also calculate the</span>
+<a name="l00491"></a>00491 <span class="comment"> correct master dark exposure time below.</span>
+<a name="l00492"></a>00492 <span class="comment"> irplib_msg("Normalizing from %f s to unit exposure time", exposure_time);</span>
+<a name="l00493"></a>00493 <span class="comment"> check( cpl_image_divide_scalar(current_dark, exposure_time),</span>
+<a name="l00494"></a>00494 <span class="comment"> "Error normalizing dark frame"); */</span>
+<a name="l00495"></a>00495
+<a name="l00496"></a>00496 <span class="comment">/* Append to imagelist */</span>
+<a name="l00497"></a>00497 cpl_imagelist_set(preproc_images, current_dark, i);
+<a name="l00498"></a>00498
+<a name="l00499"></a>00499 <span class="comment">/* Don't deallocate the image. It will be deallocated when</span>
+<a name="l00500"></a>00500 <span class="comment"> the image list is deallocated */</span>
+<a name="l00501"></a>00501 current_dark = NULL;
+<a name="l00502"></a>00502 }
+<a name="l00503"></a>00503
+<a name="l00504"></a>00504
+<a name="l00505"></a>00505 <span class="comment">/* Check exposure times */</span>
+<a name="l00506"></a>00506 cpl_msg_info(cpl_func,
+<a name="l00507"></a>00507 <span class="stringliteral">"Exposure times range from %e s to %e s (%e %% variation)"</span>, min_exptime,
+<a name="l00508"></a>00508 max_exptime, 100 * (max_exptime - min_exptime) / min_exptime);
+<a name="l00509"></a>00509
+<a name="l00510"></a>00510 <span class="keywordflow">if</span> ((max_exptime - min_exptime) / min_exptime > .001) {
+<a name="l00511"></a>00511 cpl_msg_warning(cpl_func, <span class="stringliteral">"Exposure times differ by %e %%"</span>,
+<a name="l00512"></a>00512 100 * (max_exptime - min_exptime) / min_exptime);
+<a name="l00513"></a>00513 }
+<a name="l00514"></a>00514
+<a name="l00515"></a>00515 <span class="comment">/* compute correct exposure time */</span>
+<a name="l00516"></a>00516 *mean_exptime=0.5 * (max_exptime + min_exptime);
+<a name="l00517"></a>00517 <span class="keywordflow">return</span> preproc_images;
+<a name="l00518"></a>00518 }
+<a name="l00519"></a>00519
+<a name="l00520"></a>00520
+<a name="l00521"></a>00521 cpl_image *
+<a name="l00522"></a>00522 irplib_mdark_process_chip(<span class="keyword">const</span> cpl_imagelist *raw_images,
+<a name="l00523"></a>00523 cpl_propertylist **raw_headers, <span class="keyword">const</span> cpl_image *master_bias,
+<a name="l00524"></a>00524 cpl_propertylist *mdark_header, <span class="keyword">const</span> cpl_parameterlist *parameters,
+<a name="l00525"></a>00525 <span class="keyword">const</span> <span class="keywordtype">char</span>* recipe_id, cpl_table* qclog, <span class="keyword">const</span> <span class="keywordtype">int</span> do_qc,
+<a name="l00526"></a>00526 <span class="keyword">const</span> <span class="keywordtype">char</span>* STACK_METHOD, <span class="keyword">const</span> <span class="keywordtype">double</span> STACK_KLOW, <span class="keyword">const</span> <span class="keywordtype">double</span> STACK_KHIGH,
+<a name="l00527"></a>00527 <span class="keyword">const</span> <span class="keywordtype">int</span> STACK_NITER,
+<a name="l00528"></a>00528 <span class="keyword">const</span> <span class="keywordtype">int</span> pr_num_x, <span class="keyword">const</span> <span class="keywordtype">int</span> pr_num_y,
+<a name="l00529"></a>00529 <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sx, <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sy) {
+<a name="l00530"></a>00530 cpl_image *master_dark = NULL; <span class="comment">/* Result */</span>
+<a name="l00531"></a>00531 cpl_image *current_dark = NULL;
+<a name="l00532"></a>00532 cpl_imagelist *preproc_images = NULL;
+<a name="l00533"></a>00533 <span class="keywordtype">double</span> mean_exptime = 0;
+<a name="l00534"></a>00534
+<a name="l00535"></a>00535 <span class="comment">/* First process each input image and store the results in a</span>
+<a name="l00536"></a>00536 <span class="comment"> new image list */</span>
+<a name="l00537"></a>00537 preproc_images = irplib_mkmaster_dark_fill_imagelist(raw_images, raw_headers,
+<a name="l00538"></a>00538 master_bias, &mean_exptime);
+<a name="l00539"></a>00539 <span class="keywordflow">if</span> (do_qc) {
+<a name="l00540"></a>00540 <span class="comment">/* Here we should compute QC but a a better way to log it is TBD */</span>
+<a name="l00541"></a>00541 irplib_mkmaster_dark_qc(raw_images, preproc_images, parameters, pr_num_x,
+<a name="l00542"></a>00542 pr_num_y, pr_box_sx, pr_box_sy, recipe_id, qclog);
+<a name="l00543"></a>00543
+<a name="l00544"></a>00544 }
+<a name="l00545"></a>00545 <span class="comment">/* Get median stack of input darks */</span>
+<a name="l00546"></a>00546 <span class="keywordflow">if</span> (strcmp(STACK_METHOD, <span class="stringliteral">"MEDIAN"</span>) == 0) {
+<a name="l00547"></a>00547 cpl_msg_info(cpl_func, <span class="stringliteral">"Calculating stack median"</span>);
+<a name="l00548"></a>00548 master_dark = cpl_imagelist_collapse_median_create(preproc_images);
+<a name="l00549"></a>00549 } <span class="keywordflow">else</span> {
+<a name="l00550"></a>00550 cpl_msg_info(cpl_func, <span class="stringliteral">"Calculating stack mean"</span>);
+<a name="l00551"></a>00551 master_dark = irplib_imagelist_ksigma_stack(preproc_images, STACK_KLOW,
+<a name="l00552"></a>00552 STACK_KHIGH, STACK_NITER);
+<a name="l00553"></a>00553
+<a name="l00554"></a>00554 }
+<a name="l00555"></a>00555 irplib_head_set_exptime(mdark_header, mean_exptime );
+<a name="l00556"></a>00556
+<a name="l00557"></a>00557 cpl_image_delete(current_dark);
+<a name="l00558"></a>00558 cpl_imagelist_delete(preproc_images);
+<a name="l00559"></a>00559 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l00560"></a>00560 cpl_image_delete(master_dark);
+<a name="l00561"></a>00561 }
+<a name="l00562"></a>00562
+<a name="l00563"></a>00563 <span class="keywordflow">return</span> master_dark;
+<a name="l00564"></a>00564 }
+<a name="l00565"></a>00565
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__mkmaster_8h_source.html b/html/irplib__mkmaster_8h_source.html
index 841c8b4..76ac260 100644
--- a/html/irplib__mkmaster_8h_source.html
+++ b/html/irplib__mkmaster_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/02 13:17:25 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_MKMASTER_H</span>
@@ -62,7 +62,7 @@
<a name="l00052"></a>00052 <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sx, <span class="keyword">const</span> <span class="keywordtype">int</span> pr_box_sy);
<a name="l00053"></a>00053 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__oddeven_8c_source.html b/html/irplib__oddeven_8c_source.html
index 148993b..eddab67 100644
--- a/html/irplib__oddeven_8c_source.html
+++ b/html/irplib__oddeven_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 11:50:41 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.9 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -306,7 +306,7 @@
<a name="l00337"></a>00337 <span class="keywordflow">return</span> cube_out ;
<a name="l00338"></a>00338 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__oddeven_8h_source.html b/html/irplib__oddeven_8h_source.html
index d8a0516..5fbdfc3 100644
--- a/html/irplib__oddeven_8h_source.html
+++ b/html/irplib__oddeven_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/06 20:46:04 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_ODDEVEN_H</span>
@@ -49,7 +49,7 @@
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__plugin_8c_source.html b/html/irplib__plugin_8c_source.html
index 72d917d..07f15ec 100644
--- a/html/irplib__plugin_8c_source.html
+++ b/html/irplib__plugin_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/02/03 14:19:06 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.39 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/*-----------------------------------------------------------------------------</span>
@@ -1033,7 +1033,7 @@
<a name="l01266"></a>01266 }
<a name="l01267"></a>01267 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__plugin_8h_source.html b/html/irplib__plugin_8h_source.html
index a3d6f05..d4b5de5 100644
--- a/html/irplib__plugin_8h_source.html
+++ b/html/irplib__plugin_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/11 08:03:37 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.23 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_PLUGIN_H</span>
@@ -102,7 +102,7 @@
<a name="l00092"></a>00092
<a name="l00093"></a>00093 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__polynomial_8c_source.html b/html/irplib__polynomial_8c_source.html
index b9104b4..66b2ccf 100644
--- a/html/irplib__polynomial_8c_source.html
+++ b/html/irplib__polynomial_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_polynomial.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_polynomial.c,v 1.34 2012/02/03 14:54:06 llundin Exp $</span>
+<h1>irplib_polynomial.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_polynomial.c,v 1.35 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the ESO Common Pipeline Library</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2001-2004 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/02/03 14:54:06 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.34 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.35 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -1244,7 +1244,7 @@
<a name="l01485"></a>01485 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l01486"></a>01486 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__polynomial_8h_source.html b/html/irplib__polynomial_8h_source.html
index 497c71e..60db9c3 100644
--- a/html/irplib__polynomial_8h_source.html
+++ b/html/irplib__polynomial_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_polynomial.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_polynomial.h,v 1.9 2012/01/12 10:40:21 llundin Exp $</span>
+<h1>irplib_polynomial.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_polynomial.h,v 1.10 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the ESO Common Pipeline Library</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2007 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 10:40:21 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.9 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_POLYNOMIAL_H</span>
@@ -79,7 +79,7 @@
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__ppm_8c_source.html b/html/irplib__ppm_8c_source.html
index 1d95d32..3dee2dc 100644
--- a/html/irplib__ppm_8c_source.html
+++ b/html/irplib__ppm_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_ppm.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_ppm.c,v 1.30 2011/11/23 13:58:45 yjung Exp $</span>
+<h1>irplib_ppm.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_ppm.c,v 1.31 2012/06/11 07:24:09 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/23 13:58:45 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.30 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/06/11 07:24:09 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.31 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -409,7 +409,7 @@
<a name="l00440"></a>00440 <span class="keywordflow">while</span> ((max = cpl_vector_get_max(spec_loc)) > threshold) {
<a name="l00441"></a>00441 <span class="comment">/* Find the max position */</span>
<a name="l00442"></a>00442 max_ind = 0 ;
-<a name="l00443"></a>00443 <span class="keywordflow">while</span> (pspec_loc[max_ind]<max && max_ind<spec_loc_sz) max_ind++ ;
+<a name="l00443"></a>00443 <span class="keywordflow">while</span> (max_ind < spec_loc_sz && pspec_loc[max_ind] < max) max_ind++ ;
<a name="l00444"></a>00444 <span class="keywordflow">if</span> (max_ind == spec_loc_sz) {
<a name="l00445"></a>00445 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot find maximum"</span>) ;
<a name="l00446"></a>00446 cpl_vector_delete(spec_loc) ;
@@ -462,7 +462,7 @@
<a name="l00493"></a>00493
<a name="l00494"></a>00494 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__ppm_8h_source.html b/html/irplib__ppm_8h_source.html
index ebead8a..d4eb5cb 100644
--- a/html/irplib__ppm_8h_source.html
+++ b/html/irplib__ppm_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/07/23 09:27:07 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_PPM_H</span>
@@ -49,7 +49,7 @@
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__slitpos_8c_source.html b/html/irplib__slitpos_8c_source.html
index 757055e..d9d0a32 100644
--- a/html/irplib__slitpos_8c_source.html
+++ b/html/irplib__slitpos_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/23 13:58:45 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.30 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -503,7 +503,7 @@
<a name="l00567"></a>00567
<a name="l00568"></a>00568
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__slitpos_8h_source.html b/html/irplib__slitpos_8h_source.html
index a06609e..8449098 100644
--- a/html/irplib__slitpos_8h_source.html
+++ b/html/irplib__slitpos_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/11/29 13:22:59 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_SLITPOS_H</span>
@@ -48,7 +48,7 @@
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__spectrum_8c_source.html b/html/irplib__spectrum_8c_source.html
index 446457d..ebd0ced 100644
--- a/html/irplib__spectrum_8c_source.html
+++ b/html/irplib__spectrum_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 11:50:41 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.29 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -562,7 +562,7 @@
<a name="l00605"></a>00605 <span class="keywordflow">return</span> 0 ;
<a name="l00606"></a>00606 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__spectrum_8h_source.html b/html/irplib__spectrum_8h_source.html
index e85faf9..73051e0 100644
--- a/html/irplib__spectrum_8h_source.html
+++ b/html/irplib__spectrum_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: yjung $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/07/30 12:38:37 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_SPECTRUM_H</span>
@@ -68,7 +68,7 @@
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__stdstar_8c_source.html b/html/irplib__stdstar_8c_source.html
index 3e3912b..e6036fa 100644
--- a/html/irplib__stdstar_8c_source.html
+++ b/html/irplib__stdstar_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_stdstar.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_stdstar.c,v 1.41 2012/05/04 13:58:12 cgarcia Exp $</span>
+<h1>irplib_stdstar.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_stdstar.c,v 1.45 2013/03/01 10:27:07 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/04 13:58:12 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.41 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/03/01 10:27:07 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.45 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -43,676 +43,687 @@
<a name="l00033"></a>00033 <span class="comment"> Includes</span>
<a name="l00034"></a>00034 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00035"></a>00035
-<a name="l00036"></a>00036 <span class="preprocessor">#include <string.h></span>
-<a name="l00037"></a>00037 <span class="preprocessor">#include <math.h></span>
-<a name="l00038"></a>00038 <span class="preprocessor">#include <float.h></span>
-<a name="l00039"></a>00039
-<a name="l00040"></a>00040 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00041"></a>00041
-<a name="l00042"></a>00042 <span class="preprocessor">#include "irplib_stdstar.h"</span>
-<a name="l00043"></a>00043 <span class="preprocessor">#include "irplib_utils.h"</span>
-<a name="l00044"></a>00044 <span class="preprocessor">#include "irplib_wcs.h"</span>
-<a name="l00045"></a>00045
-<a name="l00046"></a>00046
-<a name="l00047"></a>00047 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00051"></a>00051 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00054"></a>00054 <span class="comment">/*-----------------------------------------------------------------------------</span>
-<a name="l00055"></a>00055 <span class="comment"> Functions code</span>
-<a name="l00056"></a>00056 <span class="comment"> -----------------------------------------------------------------------------*/</span>
-<a name="l00057"></a>00057
-<a name="l00058"></a>00058 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00077"></a>00077 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00078"></a><a class="code" href="group__irplib__stdstar.html#ga1d798cc23ce72891460133af03ee21ba">00078</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga1d798cc23ce72891460133af03ee21ba" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(
-<a name="l00079"></a>00079 cpl_frameset * set_in,
-<a name="l00080"></a>00080 <span class="keyword">const</span> cpl_frameset * set_raw,
-<a name="l00081"></a>00081 <span class="keyword">const</span> <span class="keywordtype">char</span> * recipe_name,
-<a name="l00082"></a>00082 <span class="keyword">const</span> <span class="keywordtype">char</span> * pro_cat,
-<a name="l00083"></a>00083 <span class="keyword">const</span> <span class="keywordtype">char</span> * pro_type,
-<a name="l00084"></a>00084 <span class="keyword">const</span> <span class="keywordtype">char</span> * package_name,
-<a name="l00085"></a>00085 <span class="keyword">const</span> <span class="keywordtype">char</span> * ins_name,
-<a name="l00086"></a>00086 cpl_table * (*convert_ascii_table)(<span class="keyword">const</span> <span class="keywordtype">char</span> *))
-<a name="l00087"></a>00087 {
-<a name="l00088"></a>00088 cpl_table * out ;
-<a name="l00089"></a>00089 cpl_propertylist * plist ;
-<a name="l00090"></a>00090 cpl_propertylist * plist_ext ;
-<a name="l00091"></a>00091 cpl_parameterlist * parlist ;
-<a name="l00092"></a>00092 <span class="keyword">const</span> <span class="keywordtype">char</span> * cat_name ;
-<a name="l00093"></a>00093 <span class="keywordtype">char</span> * out_name ;
-<a name="l00094"></a>00094 <span class="keywordtype">int</span> nb_catalogs ;
-<a name="l00095"></a>00095 <span class="keyword">const</span> cpl_frame * cur_frame ;
-<a name="l00096"></a>00096 <span class="keywordtype">int</span> i ;
-<a name="l00097"></a>00097
-<a name="l00098"></a>00098 <span class="comment">/* Check entries */</span>
-<a name="l00099"></a>00099 <span class="keywordflow">if</span> (set_in == NULL) <span class="keywordflow">return</span> CPL_ERROR_NULL_INPUT;
-<a name="l00100"></a>00100 <span class="keywordflow">if</span> (set_raw == NULL) <span class="keywordflow">return</span> CPL_ERROR_NULL_INPUT;
-<a name="l00101"></a>00101 <span class="keywordflow">if</span> (recipe_name == NULL) <span class="keywordflow">return</span> CPL_ERROR_NULL_INPUT;
-<a name="l00102"></a>00102 <span class="keywordflow">if</span> (pro_cat == NULL) <span class="keywordflow">return</span> CPL_ERROR_NULL_INPUT;
-<a name="l00103"></a>00103 <span class="keywordflow">if</span> (ins_name == NULL) <span class="keywordflow">return</span> CPL_ERROR_NULL_INPUT;
+<a name="l00036"></a>00036 <span class="preprocessor">#include "irplib_stdstar.h"</span>
+<a name="l00037"></a>00037 <span class="preprocessor">#include "irplib_utils.h"</span>
+<a name="l00038"></a>00038 <span class="preprocessor">#include "irplib_wcs.h"</span>
+<a name="l00039"></a>00039 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00040"></a>00040
+<a name="l00041"></a>00041 <span class="preprocessor">#include <string.h></span>
+<a name="l00042"></a>00042 <span class="preprocessor">#include <math.h></span>
+<a name="l00043"></a>00043 <span class="preprocessor">#include <float.h></span>
+<a name="l00044"></a>00044
+<a name="l00045"></a>00045 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00046"></a>00046 <span class="comment"> Defines</span>
+<a name="l00047"></a>00047 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="preprocessor">#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(6, 3, 0)</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_FRAMESET_GET_CONST cpl_frameset_get_position_const</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="comment">/* Remove this branch once CPL versions less than 6.3 are no longer supported */</span>
+<a name="l00053"></a>00053 <span class="preprocessor">#define IRPLIB_FRAMESET_GET_CONST cpl_frameset_get_frame_const</span>
+<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
+<a name="l00056"></a>00056
+<a name="l00057"></a>00057 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00061"></a>00061 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00064"></a>00064 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00065"></a>00065 <span class="comment"> Functions code</span>
+<a name="l00066"></a>00066 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00067"></a>00067
+<a name="l00068"></a>00068 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00087"></a>00087 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00088"></a>00088 cpl_error_code
+<a name="l00089"></a><a class="code" href="group__irplib__stdstar.html#gac18c92be3d3c96ba57804b074a2abb7d">00089</a> <a class="code" href="group__irplib__stdstar.html#gac18c92be3d3c96ba57804b074a2abb7d" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(cpl_frameset * set_in,
+<a name="l00090"></a>00090 <span class="keyword">const</span> cpl_frameset * set_raw,
+<a name="l00091"></a>00091 <span class="keyword">const</span> <span class="keywordtype">char</span> * recipe_name,
+<a name="l00092"></a>00092 <span class="keyword">const</span> <span class="keywordtype">char</span> * pro_cat,
+<a name="l00093"></a>00093 <span class="keyword">const</span> <span class="keywordtype">char</span> * pro_type,
+<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">char</span> * package_name,
+<a name="l00095"></a>00095 <span class="keyword">const</span> <span class="keywordtype">char</span> * ins_name,
+<a name="l00096"></a>00096 cpl_table * (*convert_ascii_table)(<span class="keyword">const</span> <span class="keywordtype">char</span> *))
+<a name="l00097"></a>00097 {
+<a name="l00098"></a>00098 <span class="comment">/* Number of catalogs */</span>
+<a name="l00099"></a>00099 <span class="keyword">const</span> cpl_size nb_catalogs = cpl_frameset_get_size(set_raw);
+<a name="l00100"></a>00100 cpl_propertylist * plist_ext;
+<a name="l00101"></a>00101 <span class="keywordtype">char</span> * out_name;
+<a name="l00102"></a>00102 cpl_error_code error = CPL_ERROR_NONE;
+<a name="l00103"></a>00103 cpl_size i;
<a name="l00104"></a>00104
-<a name="l00105"></a>00105 <span class="comment">/* Define the file name */</span>
-<a name="l00106"></a>00106 out_name = cpl_sprintf(<span class="stringliteral">"%s.fits"</span>, recipe_name) ;
-<a name="l00107"></a>00107
-<a name="l00108"></a>00108 <span class="comment">/* Number of catalogs */</span>
-<a name="l00109"></a>00109 nb_catalogs = cpl_frameset_get_size(set_raw) ;
-<a name="l00110"></a>00110
-<a name="l00111"></a>00111 <span class="comment">/* Get the catalog name */</span>
-<a name="l00112"></a>00112 cur_frame = cpl_frameset_get_frame_const(set_raw, 0) ;
-<a name="l00113"></a>00113 cat_name = cpl_frame_get_filename(cur_frame) ;
-<a name="l00114"></a>00114
-<a name="l00115"></a>00115 <span class="comment">/* Create the output table */</span>
-<a name="l00116"></a>00116 <span class="keywordflow">if</span> ((out = convert_ascii_table(cat_name)) == NULL) {
-<a name="l00117"></a>00117 cpl_free(out_name) ;
-<a name="l00118"></a>00118 <span class="keywordflow">return</span> CPL_ERROR_UNSPECIFIED;
-<a name="l00119"></a>00119 }
-<a name="l00120"></a>00120
-<a name="l00121"></a>00121 <span class="comment">/* Some keywords */</span>
-<a name="l00122"></a>00122 plist = cpl_propertylist_new() ;
-<a name="l00123"></a>00123 cpl_propertylist_append_string(plist, <span class="stringliteral">"INSTRUME"</span>, ins_name) ;
-<a name="l00124"></a>00124 cpl_propertylist_append_string(plist, CPL_DFS_PRO_CATG, pro_cat) ;
-<a name="l00125"></a>00125 <span class="keywordflow">if</span> (pro_type != NULL) {
-<a name="l00126"></a>00126 cpl_propertylist_append_string(plist, CPL_DFS_PRO_TYPE, pro_type) ;
-<a name="l00127"></a>00127 }
-<a name="l00128"></a>00128 plist_ext = cpl_propertylist_new() ;
-<a name="l00129"></a>00129 cpl_propertylist_append_string(plist_ext, <span class="stringliteral">"EXTNAME"</span>, cat_name) ;
-<a name="l00130"></a>00130
-<a name="l00131"></a>00131 <span class="comment">/* Write the table */</span>
-<a name="l00132"></a>00132 parlist = cpl_parameterlist_new() ;
-<a name="l00133"></a>00133 cpl_dfs_save_table(set_in,
-<a name="l00134"></a>00134 NULL,
-<a name="l00135"></a>00135 parlist,
-<a name="l00136"></a>00136 set_raw,
-<a name="l00137"></a>00137 NULL,
-<a name="l00138"></a>00138 out,
-<a name="l00139"></a>00139 plist_ext,
-<a name="l00140"></a>00140 recipe_name,
-<a name="l00141"></a>00141 plist,
-<a name="l00142"></a>00142 NULL,
-<a name="l00143"></a>00143 package_name,
-<a name="l00144"></a>00144 out_name) ;
-<a name="l00145"></a>00145 cpl_parameterlist_delete(parlist) ;
-<a name="l00146"></a>00146 cpl_propertylist_delete(plist) ;
-<a name="l00147"></a>00147 cpl_propertylist_delete(plist_ext) ;
-<a name="l00148"></a>00148 cpl_table_delete(out) ;
-<a name="l00149"></a>00149
-<a name="l00150"></a>00150 <span class="comment">/* Append the next catalogs */</span>
-<a name="l00151"></a>00151 <span class="keywordflow">for</span> (i=1 ; i<nb_catalogs ; i++) {
-<a name="l00152"></a>00152 <span class="comment">/* Get the catalog name */</span>
-<a name="l00153"></a>00153 cur_frame = cpl_frameset_get_frame_const(set_raw, i) ;
-<a name="l00154"></a>00154 cat_name = cpl_frame_get_filename(cur_frame) ;
-<a name="l00155"></a>00155
-<a name="l00156"></a>00156 <span class="comment">/* Create the output table */</span>
-<a name="l00157"></a>00157 <span class="keywordflow">if</span> ((out = convert_ascii_table(cat_name)) == NULL) {
-<a name="l00158"></a>00158 cpl_free(out_name) ;
-<a name="l00159"></a>00159 <span class="keywordflow">return</span> CPL_ERROR_UNSPECIFIED;
-<a name="l00160"></a>00160 }
-<a name="l00161"></a>00161
-<a name="l00162"></a>00162 plist_ext = cpl_propertylist_new() ;
-<a name="l00163"></a>00163 cpl_propertylist_append_string(plist_ext, <span class="stringliteral">"EXTNAME"</span>, cat_name) ;
-<a name="l00164"></a>00164 cpl_table_save(out, NULL, plist_ext, out_name, CPL_IO_EXTEND) ;
-<a name="l00165"></a>00165 cpl_table_delete(out) ;
-<a name="l00166"></a>00166 cpl_propertylist_delete(plist_ext) ;
-<a name="l00167"></a>00167 }
-<a name="l00168"></a>00168 cpl_free(out_name) ;
-<a name="l00169"></a>00169 <span class="keywordflow">return</span> 0 ;
-<a name="l00170"></a>00170 }
-<a name="l00171"></a>00171
-<a name="l00172"></a>00172 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00185"></a>00185 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00186"></a><a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1">00186</a> cpl_table * <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(
-<a name="l00187"></a>00187 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename,
-<a name="l00188"></a>00188 <span class="keyword">const</span> <span class="keywordtype">char</span> * ext_name)
-<a name="l00189"></a>00189 {
-<a name="l00190"></a>00190 <span class="keywordtype">int</span> next ;
-<a name="l00191"></a>00191 cpl_propertylist * plist ;
-<a name="l00192"></a>00192 <span class="keyword">const</span> <span class="keywordtype">char</span> * cur_name ;
-<a name="l00193"></a>00193 cpl_table * out ;
-<a name="l00194"></a>00194 cpl_table * out_cur ;
-<a name="l00195"></a>00195 cpl_frame * cur_frame ;
-<a name="l00196"></a>00196 <span class="keywordtype">int</span> i ;
-<a name="l00197"></a>00197
-<a name="l00198"></a>00198 <span class="comment">/* Check entries */</span>
-<a name="l00199"></a>00199 <span class="keywordflow">if</span> (filename == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00200"></a>00200 <span class="keywordflow">if</span> (ext_name == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00201"></a>00201
-<a name="l00202"></a>00202 <span class="comment">/* Initialise */</span>
-<a name="l00203"></a>00203 out = NULL ;
-<a name="l00204"></a>00204
-<a name="l00205"></a>00205 <span class="comment">/* Get the number of extensions in the catalog */</span>
-<a name="l00206"></a>00206 cur_frame = cpl_frame_new() ;
-<a name="l00207"></a>00207 cpl_frame_set_filename(cur_frame, filename) ;
-<a name="l00208"></a>00208 next = cpl_frame_get_nextensions(cur_frame) ;
-<a name="l00209"></a>00209 cpl_frame_delete(cur_frame) ;
-<a name="l00210"></a>00210
-<a name="l00211"></a>00211 <span class="comment">/* Loop on the extentions */</span>
-<a name="l00212"></a>00212 <span class="keywordflow">for</span> (i=0 ; i<next ; i++) {
-<a name="l00213"></a>00213 <span class="comment">/* Check the name of the current extension */</span>
-<a name="l00214"></a>00214 <span class="keywordflow">if</span> ((plist = cpl_propertylist_load_regexp(filename, i+1, <span class="stringliteral">"EXTNAME"</span>,
-<a name="l00215"></a>00215 0)) == NULL) {
-<a name="l00216"></a>00216 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load header of %d th extension"</span>,
-<a name="l00217"></a>00217 i+1);
-<a name="l00218"></a>00218 <span class="keywordflow">return</span> NULL ;
-<a name="l00219"></a>00219 }
-<a name="l00220"></a>00220 cur_name = cpl_propertylist_get_string(plist, <span class="stringliteral">"EXTNAME"</span>) ;
-<a name="l00221"></a>00221
-<a name="l00222"></a>00222 <span class="comment">/* Check the current extension */</span>
-<a name="l00223"></a>00223 <span class="keywordflow">if</span> (!strcmp(cur_name, ext_name)) {
-<a name="l00224"></a>00224 <span class="comment">/* Load the table */</span>
-<a name="l00225"></a>00225 <span class="keywordflow">if</span> (out == NULL) {
-<a name="l00226"></a>00226 out = cpl_table_load(filename, i+1, 1) ;
-<a name="l00227"></a>00227 cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
-<a name="l00228"></a>00228 cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
-<a name="l00229"></a>00229 0, cpl_table_get_nrow(out),
-<a name="l00230"></a>00230 cur_name);
-<a name="l00231"></a>00231 <span class="keywordflow">if</span> (out == NULL) {
-<a name="l00232"></a>00232 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1) ;
-<a name="l00233"></a>00233 cpl_propertylist_delete(plist) ;
-<a name="l00234"></a>00234 <span class="keywordflow">return</span> NULL ;
-<a name="l00235"></a>00235 }
-<a name="l00236"></a>00236 }
-<a name="l00237"></a>00237 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!strcmp(ext_name, <span class="stringliteral">"all"</span>)) {
-<a name="l00238"></a>00238 <span class="comment">/* Load the table and append it */</span>
-<a name="l00239"></a>00239 <span class="keywordflow">if</span> (i==0) {
-<a name="l00240"></a>00240 <span class="comment">/* Load the first table */</span>
-<a name="l00241"></a>00241 out = cpl_table_load(filename, i+1, 1) ;
-<a name="l00242"></a>00242 cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
-<a name="l00243"></a>00243 cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
-<a name="l00244"></a>00244 0, cpl_table_get_nrow(out),
-<a name="l00245"></a>00245 cur_name);
-<a name="l00246"></a>00246 <span class="keywordflow">if</span> (out == NULL) {
-<a name="l00247"></a>00247 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1) ;
-<a name="l00248"></a>00248 cpl_propertylist_delete(plist) ;
-<a name="l00249"></a>00249 <span class="keywordflow">return</span> NULL ;
-<a name="l00250"></a>00250 }
-<a name="l00251"></a>00251 } <span class="keywordflow">else</span> {
-<a name="l00252"></a>00252 <span class="comment">/* Load the current table */</span>
-<a name="l00253"></a>00253 out_cur = cpl_table_load(filename, i+1, 1) ;
-<a name="l00254"></a>00254 <span class="keywordflow">if</span> (out_cur == NULL) {
-<a name="l00255"></a>00255 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1) ;
-<a name="l00256"></a>00256 cpl_table_delete(out) ;
-<a name="l00257"></a>00257 cpl_propertylist_delete(plist) ;
-<a name="l00258"></a>00258 <span class="keywordflow">return</span> NULL ;
+<a name="l00105"></a>00105 <span class="comment">/* Check entries */</span>
+<a name="l00106"></a>00106 <span class="keywordflow">if</span> (set_in == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00107"></a>00107 <span class="keywordflow">if</span> (set_raw == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00108"></a>00108 <span class="keywordflow">if</span> (recipe_name == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00109"></a>00109 <span class="keywordflow">if</span> (pro_cat == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00110"></a>00110 <span class="keywordflow">if</span> (ins_name == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00111"></a>00111 <span class="keywordflow">if</span> (convert_ascii_table == NULL) <span class="keywordflow">return</span>
+<a name="l00112"></a>00112 cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00113"></a>00113
+<a name="l00114"></a>00114 <span class="comment">/* Define the file name */</span>
+<a name="l00115"></a>00115 out_name = cpl_sprintf(<span class="stringliteral">"%s"</span> CPL_DFS_FITS, recipe_name);
+<a name="l00116"></a>00116
+<a name="l00117"></a>00117 plist_ext = cpl_propertylist_new();
+<a name="l00118"></a>00118
+<a name="l00119"></a>00119 <span class="comment">/* Process the catalogs */</span>
+<a name="l00120"></a>00120 <span class="keywordflow">for</span> (i = 0; i < nb_catalogs; i++) {
+<a name="l00121"></a>00121 <span class="comment">/* Get the catalog name */</span>
+<a name="l00122"></a>00122 <span class="keyword">const</span> cpl_frame * cur_frame = IRPLIB_FRAMESET_GET_CONST(set_raw, i);
+<a name="l00123"></a>00123 <span class="keyword">const</span> <span class="keywordtype">char</span> * cat_name = cpl_frame_get_filename(cur_frame);
+<a name="l00124"></a>00124
+<a name="l00125"></a>00125 cpl_table * out = convert_ascii_table(cat_name);
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 <span class="comment">/* Create the output table */</span>
+<a name="l00128"></a>00128 <span class="keywordflow">if</span> (out == NULL) {
+<a name="l00129"></a>00129 error = cpl_error_get_code() ? cpl_error_set_where(cpl_func)
+<a name="l00130"></a>00130 : cpl_error_set(cpl_func, CPL_ERROR_UNSPECIFIED);
+<a name="l00131"></a>00131 <span class="keywordflow">break</span>;
+<a name="l00132"></a>00132 }
+<a name="l00133"></a>00133
+<a name="l00134"></a>00134 <span class="keywordflow">if</span> (cpl_table_get_nrow(out) == 0) {
+<a name="l00135"></a>00135 cpl_table_delete(out);
+<a name="l00136"></a>00136 error = cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+<a name="l00137"></a>00137 <span class="stringliteral">"Empty catalogue %d in '%s'"</span>,
+<a name="l00138"></a>00138 (<span class="keywordtype">int</span>)i+1, cat_name);
+<a name="l00139"></a>00139 <span class="keywordflow">break</span>;
+<a name="l00140"></a>00140 }
+<a name="l00141"></a>00141
+<a name="l00142"></a>00142 cpl_propertylist_update_string(plist_ext, <span class="stringliteral">"EXTNAME"</span>, cat_name);
+<a name="l00143"></a>00143
+<a name="l00144"></a>00144 <span class="comment">/* Write the table */</span>
+<a name="l00145"></a>00145 <span class="keywordflow">if</span> (i == 0) {
+<a name="l00146"></a>00146 cpl_parameterlist * parlist = cpl_parameterlist_new();
+<a name="l00147"></a>00147 cpl_propertylist * plist = cpl_propertylist_new();
+<a name="l00148"></a>00148
+<a name="l00149"></a>00149 <span class="comment">/* Mandatory keywords */</span>
+<a name="l00150"></a>00150 cpl_propertylist_append_string(plist, <span class="stringliteral">"INSTRUME"</span>, ins_name);
+<a name="l00151"></a>00151 cpl_propertylist_append_string(plist, CPL_DFS_PRO_CATG, pro_cat);
+<a name="l00152"></a>00152 <span class="keywordflow">if</span> (pro_type != NULL) {
+<a name="l00153"></a>00153 cpl_propertylist_append_string(plist, CPL_DFS_PRO_TYPE,
+<a name="l00154"></a>00154 pro_type);
+<a name="l00155"></a>00155 }
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157 error = cpl_dfs_save_table(set_in, NULL, parlist, set_raw, NULL,
+<a name="l00158"></a>00158 out, plist_ext, recipe_name, plist,
+<a name="l00159"></a>00159 NULL, package_name, out_name);
+<a name="l00160"></a>00160 cpl_parameterlist_delete(parlist);
+<a name="l00161"></a>00161 cpl_propertylist_delete(plist);
+<a name="l00162"></a>00162 } <span class="keywordflow">else</span> {
+<a name="l00163"></a>00163 error = cpl_table_save(out, NULL, plist_ext, out_name,
+<a name="l00164"></a>00164 CPL_IO_EXTEND);
+<a name="l00165"></a>00165 }
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167 cpl_table_delete(out);
+<a name="l00168"></a>00168
+<a name="l00169"></a>00169 <span class="keywordflow">if</span> (error) {
+<a name="l00170"></a>00170 (void)cpl_error_set_where(cpl_func);
+<a name="l00171"></a>00171 <span class="keywordflow">break</span>;
+<a name="l00172"></a>00172 }
+<a name="l00173"></a>00173 }
+<a name="l00174"></a>00174
+<a name="l00175"></a>00175 cpl_propertylist_delete(plist_ext);
+<a name="l00176"></a>00176 cpl_free(out_name);
+<a name="l00177"></a>00177
+<a name="l00178"></a>00178 <span class="keywordflow">return</span> error;
+<a name="l00179"></a>00179 }
+<a name="l00180"></a>00180
+<a name="l00181"></a>00181 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00194"></a>00194 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00195"></a><a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1">00195</a> cpl_table * <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(
+<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">char</span> * filename,
+<a name="l00197"></a>00197 <span class="keyword">const</span> <span class="keywordtype">char</span> * ext_name)
+<a name="l00198"></a>00198 {
+<a name="l00199"></a>00199 <span class="keywordtype">int</span> next;
+<a name="l00200"></a>00200 cpl_propertylist * plist;
+<a name="l00201"></a>00201 <span class="keyword">const</span> <span class="keywordtype">char</span> * cur_name;
+<a name="l00202"></a>00202 cpl_table * out;
+<a name="l00203"></a>00203 cpl_table * out_cur;
+<a name="l00204"></a>00204 cpl_frame * cur_frame;
+<a name="l00205"></a>00205 <span class="keywordtype">int</span> i;
+<a name="l00206"></a>00206
+<a name="l00207"></a>00207 <span class="comment">/* Check entries */</span>
+<a name="l00208"></a>00208 <span class="keywordflow">if</span> (filename == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00209"></a>00209 <span class="keywordflow">if</span> (ext_name == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00210"></a>00210
+<a name="l00211"></a>00211 <span class="comment">/* Initialise */</span>
+<a name="l00212"></a>00212 out = NULL;
+<a name="l00213"></a>00213
+<a name="l00214"></a>00214 <span class="comment">/* Get the number of extensions in the catalog */</span>
+<a name="l00215"></a>00215 cur_frame = cpl_frame_new();
+<a name="l00216"></a>00216 cpl_frame_set_filename(cur_frame, filename);
+<a name="l00217"></a>00217 next = cpl_frame_get_nextensions(cur_frame);
+<a name="l00218"></a>00218 cpl_frame_delete(cur_frame);
+<a name="l00219"></a>00219
+<a name="l00220"></a>00220 <span class="comment">/* Loop on the extentions */</span>
+<a name="l00221"></a>00221 <span class="keywordflow">for</span> (i=0; i<next; i++) {
+<a name="l00222"></a>00222 <span class="comment">/* Check the name of the current extension */</span>
+<a name="l00223"></a>00223 <span class="keywordflow">if</span> ((plist = cpl_propertylist_load_regexp(filename, i+1, <span class="stringliteral">"EXTNAME"</span>,
+<a name="l00224"></a>00224 0)) == NULL) {
+<a name="l00225"></a>00225 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load header of %d th extension"</span>,
+<a name="l00226"></a>00226 i+1);
+<a name="l00227"></a>00227 <span class="keywordflow">return</span> NULL;
+<a name="l00228"></a>00228 }
+<a name="l00229"></a>00229 cur_name = cpl_propertylist_get_string(plist, <span class="stringliteral">"EXTNAME"</span>);
+<a name="l00230"></a>00230
+<a name="l00231"></a>00231 <span class="comment">/* Check the current extension */</span>
+<a name="l00232"></a>00232 <span class="keywordflow">if</span> (!strcmp(cur_name, ext_name)) {
+<a name="l00233"></a>00233 <span class="comment">/* Load the table */</span>
+<a name="l00234"></a>00234 <span class="keywordflow">if</span> (out == NULL) {
+<a name="l00235"></a>00235 out = cpl_table_load(filename, i+1, 1);
+<a name="l00236"></a>00236 cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
+<a name="l00237"></a>00237 cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
+<a name="l00238"></a>00238 0, cpl_table_get_nrow(out),
+<a name="l00239"></a>00239 cur_name);
+<a name="l00240"></a>00240 <span class="keywordflow">if</span> (out == NULL) {
+<a name="l00241"></a>00241 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1);
+<a name="l00242"></a>00242 cpl_propertylist_delete(plist);
+<a name="l00243"></a>00243 <span class="keywordflow">return</span> NULL;
+<a name="l00244"></a>00244 }
+<a name="l00245"></a>00245 }
+<a name="l00246"></a>00246 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!strcmp(ext_name, <span class="stringliteral">"all"</span>)) {
+<a name="l00247"></a>00247 <span class="comment">/* Load the table and append it */</span>
+<a name="l00248"></a>00248 <span class="keywordflow">if</span> (i==0) {
+<a name="l00249"></a>00249 <span class="comment">/* Load the first table */</span>
+<a name="l00250"></a>00250 out = cpl_table_load(filename, i+1, 1);
+<a name="l00251"></a>00251 cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
+<a name="l00252"></a>00252 cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
+<a name="l00253"></a>00253 0, cpl_table_get_nrow(out),
+<a name="l00254"></a>00254 cur_name);
+<a name="l00255"></a>00255 <span class="keywordflow">if</span> (out == NULL) {
+<a name="l00256"></a>00256 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1);
+<a name="l00257"></a>00257 cpl_propertylist_delete(plist);
+<a name="l00258"></a>00258 <span class="keywordflow">return</span> NULL;
<a name="l00259"></a>00259 }
-<a name="l00260"></a>00260 cpl_table_new_column(out_cur, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
-<a name="l00261"></a>00261 cpl_table_fill_column_window_string(out_cur, IRPLIB_STDSTAR_CAT_COL,
-<a name="l00262"></a>00262 0, cpl_table_get_nrow(out_cur),
-<a name="l00263"></a>00263 cur_name);
-<a name="l00264"></a>00264 <span class="comment">/* Append the table */</span>
-<a name="l00265"></a>00265 <span class="keywordflow">if</span> (cpl_table_insert(out, out_cur,
-<a name="l00266"></a>00266 cpl_table_get_nrow(out)) != CPL_ERROR_NONE) {
-<a name="l00267"></a>00267 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot merge table %d"</span>, i+1) ;
-<a name="l00268"></a>00268 cpl_table_delete(out) ;
-<a name="l00269"></a>00269 cpl_table_delete(out_cur) ;
-<a name="l00270"></a>00270 cpl_propertylist_delete(plist) ;
-<a name="l00271"></a>00271 <span class="keywordflow">return</span> NULL ;
-<a name="l00272"></a>00272 }
-<a name="l00273"></a>00273 cpl_table_delete(out_cur) ;
-<a name="l00274"></a>00274 }
-<a name="l00275"></a>00275 }
-<a name="l00276"></a>00276 cpl_propertylist_delete(plist) ;
-<a name="l00277"></a>00277 }
-<a name="l00278"></a>00278 <span class="keywordflow">return</span> out ;
-<a name="l00279"></a>00279 }
-<a name="l00280"></a>00280
-<a name="l00281"></a>00281 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00260"></a>00260 } <span class="keywordflow">else</span> {
+<a name="l00261"></a>00261 <span class="comment">/* Load the current table */</span>
+<a name="l00262"></a>00262 out_cur = cpl_table_load(filename, i+1, 1);
+<a name="l00263"></a>00263 <span class="keywordflow">if</span> (out_cur == NULL) {
+<a name="l00264"></a>00264 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load extension %d"</span>, i+1);
+<a name="l00265"></a>00265 cpl_table_delete(out);
+<a name="l00266"></a>00266 cpl_propertylist_delete(plist);
+<a name="l00267"></a>00267 <span class="keywordflow">return</span> NULL;
+<a name="l00268"></a>00268 }
+<a name="l00269"></a>00269 cpl_table_new_column(out_cur, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
+<a name="l00270"></a>00270 cpl_table_fill_column_window_string(out_cur, IRPLIB_STDSTAR_CAT_COL,
+<a name="l00271"></a>00271 0, cpl_table_get_nrow(out_cur),
+<a name="l00272"></a>00272 cur_name);
+<a name="l00273"></a>00273 <span class="comment">/* Append the table */</span>
+<a name="l00274"></a>00274 <span class="keywordflow">if</span> (cpl_table_insert(out, out_cur,
+<a name="l00275"></a>00275 cpl_table_get_nrow(out)) != CPL_ERROR_NONE) {
+<a name="l00276"></a>00276 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot merge table %d"</span>, i+1);
+<a name="l00277"></a>00277 cpl_table_delete(out);
+<a name="l00278"></a>00278 cpl_table_delete(out_cur);
+<a name="l00279"></a>00279 cpl_propertylist_delete(plist);
+<a name="l00280"></a>00280 <span class="keywordflow">return</span> NULL;
+<a name="l00281"></a>00281 }
+<a name="l00282"></a>00282 cpl_table_delete(out_cur);
+<a name="l00283"></a>00283 }
+<a name="l00284"></a>00284 }
+<a name="l00285"></a>00285 cpl_propertylist_delete(plist);
+<a name="l00286"></a>00286 }
+<a name="l00287"></a>00287 <span class="keywordflow">return</span> out;
+<a name="l00288"></a>00288 }
+<a name="l00289"></a>00289
<a name="l00290"></a>00290 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00291"></a><a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc">00291</a> cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(
-<a name="l00292"></a>00292 <span class="keyword">const</span> cpl_table * catal)
-<a name="l00293"></a>00293 {
-<a name="l00294"></a>00294 <span class="comment">/* Check for all the mandatory columns */</span>
-<a name="l00295"></a>00295 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_STAR_COL)) {
-<a name="l00296"></a>00296 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00297"></a>00297 <span class="stringliteral">"Missing column: %s"</span>,
-<a name="l00298"></a>00298 IRPLIB_STDSTAR_STAR_COL);
-<a name="l00299"></a>00299 }
-<a name="l00300"></a>00300 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_TYPE_COL)) {
-<a name="l00301"></a>00301 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00302"></a>00302 <span class="stringliteral">"Missing column: %s"</span>,
-<a name="l00303"></a>00303 IRPLIB_STDSTAR_TYPE_COL);
-<a name="l00304"></a>00304 }
-<a name="l00305"></a>00305 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_CAT_COL)) {
-<a name="l00306"></a>00306 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
-<a name="l00307"></a>00307 CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00308"></a>00308 <span class="stringliteral">"Missing column: %s"</span>,
-<a name="l00309"></a>00309 IRPLIB_STDSTAR_CAT_COL);
-<a name="l00310"></a>00310 }
-<a name="l00311"></a>00311 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_RA_COL)) {
-<a name="l00312"></a>00312 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
-<a name="l00313"></a>00313 CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00314"></a>00314 <span class="stringliteral">"Missing column: %s"</span>,
-<a name="l00315"></a>00315 IRPLIB_STDSTAR_RA_COL);
-<a name="l00316"></a>00316 }
-<a name="l00317"></a>00317 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_DEC_COL)) {
-<a name="l00318"></a>00318 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
-<a name="l00319"></a>00319 CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00320"></a>00320 <span class="stringliteral">"Missing column: %s"</span>,
-<a name="l00321"></a>00321 IRPLIB_STDSTAR_DEC_COL);
-<a name="l00322"></a>00322 }
-<a name="l00323"></a>00323 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00324"></a>00324 }
-<a name="l00325"></a>00325
-<a name="l00326"></a>00326 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00338"></a>00338 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00339"></a><a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8">00339</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(
-<a name="l00340"></a>00340 cpl_table * cat,
-<a name="l00341"></a>00341 <span class="keywordtype">double</span> ra,
-<a name="l00342"></a>00342 <span class="keywordtype">double</span> dec,
-<a name="l00343"></a>00343 <span class="keywordtype">double</span> dist)
-<a name="l00344"></a>00344 {
-<a name="l00345"></a>00345 <span class="keywordtype">double</span> distance ;
-<a name="l00346"></a>00346 <span class="keywordtype">int</span> nrows ;
-<a name="l00347"></a>00347 <span class="keywordtype">int</span> i ;
-<a name="l00348"></a>00348
-<a name="l00349"></a>00349 <span class="comment">/* Check entries */</span>
-<a name="l00350"></a>00350 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1;
-<a name="l00351"></a>00351
-<a name="l00352"></a>00352 <span class="comment">/* Get the number of selected rows */</span>
-<a name="l00353"></a>00353 nrows = cpl_table_get_nrow(cat) ;
-<a name="l00354"></a>00354
-<a name="l00355"></a>00355 <span class="comment">/* Check if the columns are there */</span>
-<a name="l00356"></a>00356 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
-<a name="l00357"></a>00357 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_RA_COL) ;
-<a name="l00358"></a>00358 <span class="keywordflow">return</span> -1 ;
-<a name="l00359"></a>00359 }
-<a name="l00360"></a>00360 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
-<a name="l00361"></a>00361 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_DEC_COL) ;
-<a name="l00362"></a>00362 <span class="keywordflow">return</span> -1 ;
-<a name="l00363"></a>00363 }
-<a name="l00364"></a>00364
-<a name="l00365"></a>00365 <span class="comment">/* Compute distances of the selected rows */</span>
-<a name="l00366"></a>00366 <span class="keywordflow">for</span> (i=0 ; i<nrows ; i++) {
-<a name="l00367"></a>00367 <span class="keywordflow">if</span> (cpl_table_is_selected(cat, i)) {
-<a name="l00368"></a>00368 <span class="comment">/* The row is selected - compute the distance */</span>
-<a name="l00369"></a>00369 distance = irplib_wcs_great_circle_dist(ra, dec,
-<a name="l00370"></a>00370 cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
-<a name="l00371"></a>00371 cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
-<a name="l00372"></a>00372 <span class="keywordflow">if</span> (distance > dist) cpl_table_unselect_row(cat, i) ;
-<a name="l00373"></a>00373 }
-<a name="l00374"></a>00374 }
-<a name="l00375"></a>00375 <span class="keywordflow">return</span> 0;
-<a name="l00376"></a>00376 }
-<a name="l00377"></a>00377
-<a name="l00378"></a>00378 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00299"></a>00299 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00300"></a><a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc">00300</a> cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(
+<a name="l00301"></a>00301 <span class="keyword">const</span> cpl_table * catal)
+<a name="l00302"></a>00302 {
+<a name="l00303"></a>00303 <span class="comment">/* Check for all the mandatory columns */</span>
+<a name="l00304"></a>00304 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_STAR_COL)) {
+<a name="l00305"></a>00305 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00306"></a>00306 <span class="stringliteral">"Missing column: %s"</span>,
+<a name="l00307"></a>00307 IRPLIB_STDSTAR_STAR_COL);
+<a name="l00308"></a>00308 }
+<a name="l00309"></a>00309 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_TYPE_COL)) {
+<a name="l00310"></a>00310 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00311"></a>00311 <span class="stringliteral">"Missing column: %s"</span>,
+<a name="l00312"></a>00312 IRPLIB_STDSTAR_TYPE_COL);
+<a name="l00313"></a>00313 }
+<a name="l00314"></a>00314 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_CAT_COL)) {
+<a name="l00315"></a>00315 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
+<a name="l00316"></a>00316 CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00317"></a>00317 <span class="stringliteral">"Missing column: %s"</span>,
+<a name="l00318"></a>00318 IRPLIB_STDSTAR_CAT_COL);
+<a name="l00319"></a>00319 }
+<a name="l00320"></a>00320 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_RA_COL)) {
+<a name="l00321"></a>00321 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
+<a name="l00322"></a>00322 CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00323"></a>00323 <span class="stringliteral">"Missing column: %s"</span>,
+<a name="l00324"></a>00324 IRPLIB_STDSTAR_RA_COL);
+<a name="l00325"></a>00325 }
+<a name="l00326"></a>00326 <span class="keywordflow">if</span> (!cpl_table_has_column(catal, IRPLIB_STDSTAR_DEC_COL)) {
+<a name="l00327"></a>00327 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func,
+<a name="l00328"></a>00328 CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00329"></a>00329 <span class="stringliteral">"Missing column: %s"</span>,
+<a name="l00330"></a>00330 IRPLIB_STDSTAR_DEC_COL);
+<a name="l00331"></a>00331 }
+<a name="l00332"></a>00332 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00333"></a>00333 }
+<a name="l00334"></a>00334
+<a name="l00335"></a>00335 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00347"></a>00347 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00348"></a><a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8">00348</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(
+<a name="l00349"></a>00349 cpl_table * cat,
+<a name="l00350"></a>00350 <span class="keywordtype">double</span> ra,
+<a name="l00351"></a>00351 <span class="keywordtype">double</span> dec,
+<a name="l00352"></a>00352 <span class="keywordtype">double</span> dist)
+<a name="l00353"></a>00353 {
+<a name="l00354"></a>00354 <span class="keywordtype">double</span> distance;
+<a name="l00355"></a>00355 <span class="keywordtype">int</span> nrows;
+<a name="l00356"></a>00356 <span class="keywordtype">int</span> i;
+<a name="l00357"></a>00357
+<a name="l00358"></a>00358 <span class="comment">/* Check entries */</span>
+<a name="l00359"></a>00359 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1;
+<a name="l00360"></a>00360
+<a name="l00361"></a>00361 <span class="comment">/* Get the number of selected rows */</span>
+<a name="l00362"></a>00362 nrows = cpl_table_get_nrow(cat);
+<a name="l00363"></a>00363
+<a name="l00364"></a>00364 <span class="comment">/* Check if the columns are there */</span>
+<a name="l00365"></a>00365 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
+<a name="l00366"></a>00366 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_RA_COL);
+<a name="l00367"></a>00367 <span class="keywordflow">return</span> -1;
+<a name="l00368"></a>00368 }
+<a name="l00369"></a>00369 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
+<a name="l00370"></a>00370 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_DEC_COL);
+<a name="l00371"></a>00371 <span class="keywordflow">return</span> -1;
+<a name="l00372"></a>00372 }
+<a name="l00373"></a>00373
+<a name="l00374"></a>00374 <span class="comment">/* Compute distances of the selected rows */</span>
+<a name="l00375"></a>00375 <span class="keywordflow">for</span> (i=0; i<nrows; i++) {
+<a name="l00376"></a>00376 <span class="keywordflow">if</span> (cpl_table_is_selected(cat, i)) {
+<a name="l00377"></a>00377 <span class="comment">/* The row is selected - compute the distance */</span>
+<a name="l00378"></a>00378 distance = irplib_wcs_great_circle_dist(ra, dec,
+<a name="l00379"></a>00379 cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
+<a name="l00380"></a>00380 cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
+<a name="l00381"></a>00381 <span class="keywordflow">if</span> (distance > dist) cpl_table_unselect_row(cat, i);
+<a name="l00382"></a>00382 }
+<a name="l00383"></a>00383 }
+<a name="l00384"></a>00384 <span class="keywordflow">return</span> 0;
+<a name="l00385"></a>00385 }
+<a name="l00386"></a>00386
<a name="l00387"></a>00387 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00388"></a><a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab">00388</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(
-<a name="l00389"></a>00389 cpl_table * cat,
-<a name="l00390"></a>00390 <span class="keyword">const</span> <span class="keywordtype">char</span> * mag_colname)
-<a name="l00391"></a>00391 {
-<a name="l00392"></a>00392 <span class="comment">/* Check entries */</span>
-<a name="l00393"></a>00393 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00394"></a>00394 <span class="keywordflow">if</span> (mag_colname == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00395"></a>00395
-<a name="l00396"></a>00396 <span class="comment">/* Check that the table has the mag column */</span>
-<a name="l00397"></a>00397 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, mag_colname)) {
-<a name="l00398"></a>00398 cpl_msg_error(cpl_func, <span class="stringliteral">"Column %s does not exist in the catalog"</span>,
-<a name="l00399"></a>00399 mag_colname) ;
-<a name="l00400"></a>00400 <span class="keywordflow">return</span> -1 ;
-<a name="l00401"></a>00401 }
-<a name="l00402"></a>00402
-<a name="l00403"></a>00403 <span class="comment">/* Apply the selection */</span>
-<a name="l00404"></a>00404 <span class="keywordflow">if</span> (cpl_table_and_selected_double(cat, mag_colname, CPL_NOT_GREATER_THAN,
-<a name="l00405"></a>00405 98.0) <= 0) {
-<a name="l00406"></a>00406 cpl_msg_error(cpl_func, <span class="stringliteral">"Column %s does not exist in the catalog"</span>,
-<a name="l00407"></a>00407 mag_colname) ;
-<a name="l00408"></a>00408 <span class="keywordflow">return</span> -1 ;
-<a name="l00409"></a>00409 }
-<a name="l00410"></a>00410 <span class="keywordflow">return</span> 0 ;
-<a name="l00411"></a>00411 }
-<a name="l00412"></a>00412
-<a name="l00413"></a>00413 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00423"></a>00423 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00424"></a><a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5">00424</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(
-<a name="l00425"></a>00425 <span class="keyword">const</span> cpl_table * cat,
-<a name="l00426"></a>00426 <span class="keywordtype">double</span> ra,
-<a name="l00427"></a>00427 <span class="keywordtype">double</span> dec)
-<a name="l00428"></a>00428 {
-<a name="l00429"></a>00429 <span class="keywordtype">double</span> min_dist, distance ;
-<a name="l00430"></a>00430 <span class="keywordtype">int</span> nrows ;
-<a name="l00431"></a>00431 <span class="keywordtype">int</span> ind ;
-<a name="l00432"></a>00432 <span class="keywordtype">int</span> i ;
-<a name="l00433"></a>00433
-<a name="l00434"></a>00434 <span class="comment">/* Check entries */</span>
-<a name="l00435"></a>00435 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00436"></a>00436
-<a name="l00437"></a>00437 <span class="comment">/* Initialize */</span>
-<a name="l00438"></a>00438 min_dist = 1000.0 ;
-<a name="l00439"></a>00439 ind = -1 ;
-<a name="l00440"></a>00440
-<a name="l00441"></a>00441 <span class="comment">/* Get the number of selected rows */</span>
-<a name="l00442"></a>00442 nrows = cpl_table_get_nrow(cat) ;
-<a name="l00443"></a>00443
-<a name="l00444"></a>00444 <span class="comment">/* Check if the columns are there */</span>
-<a name="l00445"></a>00445 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
-<a name="l00446"></a>00446 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_RA_COL) ;
-<a name="l00447"></a>00447 <span class="keywordflow">return</span> -1 ;
-<a name="l00448"></a>00448 }
-<a name="l00449"></a>00449 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
-<a name="l00450"></a>00450 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_DEC_COL) ;
-<a name="l00451"></a>00451 <span class="keywordflow">return</span> -1 ;
-<a name="l00452"></a>00452 }
-<a name="l00453"></a>00453
-<a name="l00454"></a>00454 <span class="comment">/* Compute distances of the selected rows */</span>
-<a name="l00455"></a>00455 <span class="keywordflow">for</span> (i=0 ; i<nrows ; i++) {
-<a name="l00456"></a>00456 <span class="keywordflow">if</span> (cpl_table_is_selected(cat, i)) {
-<a name="l00457"></a>00457 <span class="comment">/* The row is selected - compute the distance */</span>
-<a name="l00458"></a>00458 distance = irplib_wcs_great_circle_dist(ra, dec,
-<a name="l00459"></a>00459 cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
-<a name="l00460"></a>00460 cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
-<a name="l00461"></a>00461 <span class="keywordflow">if</span> (distance <= min_dist) {
-<a name="l00462"></a>00462 min_dist = distance ;
-<a name="l00463"></a>00463 ind = i ;
-<a name="l00464"></a>00464 }
-<a name="l00465"></a>00465 }
-<a name="l00466"></a>00466 }
-<a name="l00467"></a>00467 <span class="keywordflow">return</span> ind ;
-<a name="l00468"></a>00468 }
-<a name="l00469"></a>00469
-<a name="l00470"></a>00470 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00491"></a>00491 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00492"></a><a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027">00492</a> cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027" title="Find the closest star to ra, dec in the catalog.">irplib_stdstar_find_star</a>(
-<a name="l00493"></a>00493 <span class="keyword">const</span> <span class="keywordtype">char</span> * catfile,
-<a name="l00494"></a>00494 <span class="keywordtype">double</span> ra,
-<a name="l00495"></a>00495 <span class="keywordtype">double</span> dec,
-<a name="l00496"></a>00496 <span class="keyword">const</span> <span class="keywordtype">char</span> * band,
-<a name="l00497"></a>00497 <span class="keyword">const</span> <span class="keywordtype">char</span> * catname,
-<a name="l00498"></a>00498 <span class="keywordtype">double</span> * mag,
-<a name="l00499"></a>00499 <span class="keywordtype">char</span> ** name,
-<a name="l00500"></a>00500 <span class="keywordtype">char</span> ** type,
-<a name="l00501"></a>00501 <span class="keywordtype">char</span> ** usedcatname,
-<a name="l00502"></a>00502 <span class="keywordtype">double</span> * star_ra,
-<a name="l00503"></a>00503 <span class="keywordtype">double</span> * star_dec,
-<a name="l00504"></a>00504 <span class="keywordtype">double</span> dist_am)
-<a name="l00505"></a>00505 {
-<a name="l00506"></a>00506 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l00507"></a>00507 cpl_table * catal ;
-<a name="l00508"></a>00508 <span class="keyword">const</span> <span class="keywordtype">double</span> dist = dist_am / 60.0 ;
-<a name="l00509"></a>00509 <span class="keywordtype">int</span> ind ;
-<a name="l00510"></a>00510
-<a name="l00511"></a>00511 <span class="comment">/* Check entries */</span>
-<a name="l00512"></a>00512 <span class="keywordflow">if</span> (catfile == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
-<a name="l00513"></a>00513 <span class="keywordflow">if</span> (band == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
-<a name="l00514"></a>00514 <span class="keywordflow">if</span> (catname == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
-<a name="l00515"></a>00515
-<a name="l00516"></a>00516 <span class="comment">/* Load the catalog */</span>
-<a name="l00517"></a>00517 <span class="keywordflow">if</span> ((catal = <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(catfile, catname)) == NULL) {
-<a name="l00518"></a>00518 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_NOT_FOUND,
-<a name="l00519"></a>00519 <span class="stringliteral">"Cannot load the catalog %s from %s"</span>,
-<a name="l00520"></a>00520 catname, catfile);
-<a name="l00521"></a>00521 }
-<a name="l00522"></a>00522
-<a name="l00523"></a>00523 <span class="comment">/* Check the columns are present */</span>
-<a name="l00524"></a>00524 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(catal) != CPL_ERROR_NONE) {
-<a name="l00525"></a>00525 cpl_table_delete(catal);
-<a name="l00526"></a>00526 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
-<a name="l00527"></a>00527 }
-<a name="l00528"></a>00528
-<a name="l00529"></a>00529 <span class="comment">/* Select stars with known magnitude */</span>
-<a name="l00530"></a>00530 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(catal, band) == -1) {
-<a name="l00531"></a>00531 cpl_table_delete(catal) ;
-<a name="l00532"></a>00532 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00533"></a>00533 <span class="stringliteral">"Cannot select stars in that band"</span>);
-<a name="l00534"></a>00534 }
-<a name="l00535"></a>00535
-<a name="l00536"></a>00536 <span class="comment">/* Select stars within a given distance */</span>
-<a name="l00537"></a>00537 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(catal, ra, dec, dist) == -1) {
-<a name="l00538"></a>00538 cpl_table_delete(catal) ;
-<a name="l00539"></a>00539 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00540"></a>00540 <span class="stringliteral">"Cannot select close stars"</span>);
-<a name="l00541"></a>00541 }
-<a name="l00542"></a>00542
-<a name="l00543"></a>00543 <span class="comment">/* Take the closest */</span>
-<a name="l00544"></a>00544 <span class="keywordflow">if</span> ((ind=<a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(catal, ra, dec)) < 0) {
-<a name="l00545"></a>00545 cpl_table_delete(catal) ;
-<a name="l00546"></a>00546 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00547"></a>00547 <span class="stringliteral">"Cannot get the closest star with "</span>
-<a name="l00548"></a>00548 <span class="stringliteral">"known %s magnitude"</span>,band);
-<a name="l00549"></a>00549 }
-<a name="l00550"></a>00550
-<a name="l00551"></a>00551 <span class="keywordflow">if</span>(mag != NULL)
-<a name="l00552"></a>00552 *mag = cpl_table_get_double(catal, band, ind, NULL) ;
-<a name="l00553"></a>00553
-<a name="l00554"></a>00554 <span class="keywordflow">if</span>(name != NULL)
-<a name="l00555"></a>00555 {
-<a name="l00556"></a>00556 *name = cpl_strdup(cpl_table_get_string(catal,
-<a name="l00557"></a>00557 IRPLIB_STDSTAR_STAR_COL, ind));
-<a name="l00558"></a>00558
-<a name="l00559"></a>00559 }
-<a name="l00560"></a>00560 <span class="keywordflow">if</span>(type != NULL)
-<a name="l00561"></a>00561 {
-<a name="l00562"></a>00562 *type = cpl_strdup(cpl_table_get_string(catal, IRPLIB_STDSTAR_TYPE_COL,
-<a name="l00563"></a>00563 ind));
-<a name="l00564"></a>00564 }
-<a name="l00565"></a>00565 <span class="keywordflow">if</span>(usedcatname != NULL)
-<a name="l00566"></a>00566 {
-<a name="l00567"></a>00567 <span class="keywordflow">if</span>(strcmp(catname, <span class="stringliteral">"all"</span>))
-<a name="l00568"></a>00568 *usedcatname = cpl_strdup(catname);
-<a name="l00569"></a>00569 <span class="keywordflow">else</span>
-<a name="l00570"></a>00570 {
-<a name="l00571"></a>00571 *usedcatname = cpl_strdup(cpl_table_get_string
-<a name="l00572"></a>00572 (catal, IRPLIB_STDSTAR_CAT_COL, ind));
-<a name="l00573"></a>00573 }
-<a name="l00574"></a>00574 }
-<a name="l00575"></a>00575 <span class="keywordflow">if</span>(star_ra != NULL)
-<a name="l00576"></a>00576 *star_ra = cpl_table_get_double(catal, IRPLIB_STDSTAR_RA_COL, ind, NULL);
-<a name="l00577"></a>00577 <span class="keywordflow">if</span>(star_dec != NULL)
-<a name="l00578"></a>00578 *star_dec = cpl_table_get_double(catal, IRPLIB_STDSTAR_DEC_COL, ind, NULL);
-<a name="l00579"></a>00579
-<a name="l00580"></a>00580 <span class="comment">/* Free and return */</span>
-<a name="l00581"></a>00581 cpl_table_delete(catal);
-<a name="l00582"></a>00582 <span class="keywordflow">return</span> cpl_errorstate_is_equal(prestate) ? CPL_ERROR_NONE
-<a name="l00583"></a>00583 : cpl_error_set_where(cpl_func);
-<a name="l00584"></a>00584 }
-<a name="l00585"></a>00585
-<a name="l00586"></a>00586 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00599"></a>00599 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00600"></a><a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba">00600</a> cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba" title="Get the conversion.">irplib_stdstar_get_conversion</a>(
-<a name="l00601"></a>00601 <span class="keyword">const</span> cpl_bivector * spec,
-<a name="l00602"></a>00602 <span class="keywordtype">double</span> dit,
-<a name="l00603"></a>00603 <span class="keywordtype">double</span> surface,
-<a name="l00604"></a>00604 <span class="keywordtype">double</span> gain,
-<a name="l00605"></a>00605 <span class="keywordtype">double</span> mag)
-<a name="l00606"></a>00606 {
-<a name="l00607"></a>00607 <span class="keywordtype">double</span> h = 6.62e-27 ;
-<a name="l00608"></a>00608 <span class="keywordtype">double</span> c = 3e18 ;
-<a name="l00609"></a>00609 <span class="keyword">const</span> cpl_vector * wave ;
-<a name="l00610"></a>00610 <span class="keyword">const</span> cpl_vector * extr ;
-<a name="l00611"></a>00611 cpl_vector * out ;
-<a name="l00612"></a>00612 <span class="keywordtype">double</span> factor ;
-<a name="l00613"></a>00613
-<a name="l00614"></a>00614 <span class="comment">/* Test entries */</span>
-<a name="l00615"></a>00615 <span class="keywordflow">if</span> (spec == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00616"></a>00616 <span class="keywordflow">if</span> (dit <= 0.0) <span class="keywordflow">return</span> NULL ;
-<a name="l00617"></a>00617
-<a name="l00618"></a>00618 <span class="comment">/* Get the extracted spectrum */</span>
-<a name="l00619"></a>00619 wave = cpl_bivector_get_x_const(spec) ;
-<a name="l00620"></a>00620 extr = cpl_bivector_get_y_const(spec) ;
-<a name="l00621"></a>00621
-<a name="l00622"></a>00622 <span class="comment">/* Get the spectrum */</span>
-<a name="l00623"></a>00623 out = cpl_vector_duplicate(extr) ;
-<a name="l00624"></a>00624
-<a name="l00625"></a>00625 <span class="comment">/* Divide by DIT */</span>
-<a name="l00626"></a>00626 cpl_vector_divide_scalar(out, dit) ;
-<a name="l00627"></a>00627
-<a name="l00628"></a>00628 <span class="comment">/* Divide by the surface */</span>
-<a name="l00629"></a>00629 cpl_vector_divide_scalar(out, surface) ;
+<a name="l00396"></a>00396 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00397"></a><a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab">00397</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(
+<a name="l00398"></a>00398 cpl_table * cat,
+<a name="l00399"></a>00399 <span class="keyword">const</span> <span class="keywordtype">char</span> * mag_colname)
+<a name="l00400"></a>00400 {
+<a name="l00401"></a>00401 <span class="comment">/* Check entries */</span>
+<a name="l00402"></a>00402 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1;
+<a name="l00403"></a>00403 <span class="keywordflow">if</span> (mag_colname == NULL) <span class="keywordflow">return</span> -1;
+<a name="l00404"></a>00404
+<a name="l00405"></a>00405 <span class="comment">/* Check that the table has the mag column */</span>
+<a name="l00406"></a>00406 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, mag_colname)) {
+<a name="l00407"></a>00407 cpl_msg_error(cpl_func, <span class="stringliteral">"Column %s does not exist in the catalog"</span>,
+<a name="l00408"></a>00408 mag_colname);
+<a name="l00409"></a>00409 <span class="keywordflow">return</span> -1;
+<a name="l00410"></a>00410 }
+<a name="l00411"></a>00411
+<a name="l00412"></a>00412 <span class="comment">/* Apply the selection */</span>
+<a name="l00413"></a>00413 <span class="keywordflow">if</span> (cpl_table_and_selected_double(cat, mag_colname, CPL_NOT_GREATER_THAN,
+<a name="l00414"></a>00414 98.0) <= 0) {
+<a name="l00415"></a>00415 cpl_msg_error(cpl_func, <span class="stringliteral">"Column %s does not exist in the catalog"</span>,
+<a name="l00416"></a>00416 mag_colname);
+<a name="l00417"></a>00417 <span class="keywordflow">return</span> -1;
+<a name="l00418"></a>00418 }
+<a name="l00419"></a>00419 <span class="keywordflow">return</span> 0;
+<a name="l00420"></a>00420 }
+<a name="l00421"></a>00421
+<a name="l00422"></a>00422 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00432"></a>00432 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00433"></a><a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5">00433</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(
+<a name="l00434"></a>00434 <span class="keyword">const</span> cpl_table * cat,
+<a name="l00435"></a>00435 <span class="keywordtype">double</span> ra,
+<a name="l00436"></a>00436 <span class="keywordtype">double</span> dec)
+<a name="l00437"></a>00437 {
+<a name="l00438"></a>00438 <span class="keywordtype">double</span> min_dist, distance;
+<a name="l00439"></a>00439 <span class="keywordtype">int</span> nrows;
+<a name="l00440"></a>00440 <span class="keywordtype">int</span> ind;
+<a name="l00441"></a>00441 <span class="keywordtype">int</span> i;
+<a name="l00442"></a>00442
+<a name="l00443"></a>00443 <span class="comment">/* Check entries */</span>
+<a name="l00444"></a>00444 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1;
+<a name="l00445"></a>00445
+<a name="l00446"></a>00446 <span class="comment">/* Initialize */</span>
+<a name="l00447"></a>00447 min_dist = 1000.0;
+<a name="l00448"></a>00448 ind = -1;
+<a name="l00449"></a>00449
+<a name="l00450"></a>00450 <span class="comment">/* Get the number of selected rows */</span>
+<a name="l00451"></a>00451 nrows = cpl_table_get_nrow(cat);
+<a name="l00452"></a>00452
+<a name="l00453"></a>00453 <span class="comment">/* Check if the columns are there */</span>
+<a name="l00454"></a>00454 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
+<a name="l00455"></a>00455 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_RA_COL);
+<a name="l00456"></a>00456 <span class="keywordflow">return</span> -1;
+<a name="l00457"></a>00457 }
+<a name="l00458"></a>00458 <span class="keywordflow">if</span> (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
+<a name="l00459"></a>00459 cpl_msg_error(cpl_func, <span class="stringliteral">"Missing %s column"</span>, IRPLIB_STDSTAR_DEC_COL);
+<a name="l00460"></a>00460 <span class="keywordflow">return</span> -1;
+<a name="l00461"></a>00461 }
+<a name="l00462"></a>00462
+<a name="l00463"></a>00463 <span class="comment">/* Compute distances of the selected rows */</span>
+<a name="l00464"></a>00464 <span class="keywordflow">for</span> (i=0; i<nrows; i++) {
+<a name="l00465"></a>00465 <span class="keywordflow">if</span> (cpl_table_is_selected(cat, i)) {
+<a name="l00466"></a>00466 <span class="comment">/* The row is selected - compute the distance */</span>
+<a name="l00467"></a>00467 distance = irplib_wcs_great_circle_dist(ra, dec,
+<a name="l00468"></a>00468 cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
+<a name="l00469"></a>00469 cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
+<a name="l00470"></a>00470 <span class="keywordflow">if</span> (distance <= min_dist) {
+<a name="l00471"></a>00471 min_dist = distance;
+<a name="l00472"></a>00472 ind = i;
+<a name="l00473"></a>00473 }
+<a name="l00474"></a>00474 }
+<a name="l00475"></a>00475 }
+<a name="l00476"></a>00476 <span class="keywordflow">return</span> ind;
+<a name="l00477"></a>00477 }
+<a name="l00478"></a>00478
+<a name="l00479"></a>00479 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00500"></a>00500 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00501"></a><a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027">00501</a> cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027" title="Find the closest star to ra, dec in the catalog.">irplib_stdstar_find_star</a>(
+<a name="l00502"></a>00502 <span class="keyword">const</span> <span class="keywordtype">char</span> * catfile,
+<a name="l00503"></a>00503 <span class="keywordtype">double</span> ra,
+<a name="l00504"></a>00504 <span class="keywordtype">double</span> dec,
+<a name="l00505"></a>00505 <span class="keyword">const</span> <span class="keywordtype">char</span> * band,
+<a name="l00506"></a>00506 <span class="keyword">const</span> <span class="keywordtype">char</span> * catname,
+<a name="l00507"></a>00507 <span class="keywordtype">double</span> * mag,
+<a name="l00508"></a>00508 <span class="keywordtype">char</span> ** name,
+<a name="l00509"></a>00509 <span class="keywordtype">char</span> ** type,
+<a name="l00510"></a>00510 <span class="keywordtype">char</span> ** usedcatname,
+<a name="l00511"></a>00511 <span class="keywordtype">double</span> * star_ra,
+<a name="l00512"></a>00512 <span class="keywordtype">double</span> * star_dec,
+<a name="l00513"></a>00513 <span class="keywordtype">double</span> dist_am)
+<a name="l00514"></a>00514 {
+<a name="l00515"></a>00515 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l00516"></a>00516 cpl_table * catal;
+<a name="l00517"></a>00517 <span class="keyword">const</span> <span class="keywordtype">double</span> dist = dist_am / 60.0;
+<a name="l00518"></a>00518 <span class="keywordtype">int</span> ind;
+<a name="l00519"></a>00519
+<a name="l00520"></a>00520 <span class="comment">/* Check entries */</span>
+<a name="l00521"></a>00521 <span class="keywordflow">if</span> (catfile == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00522"></a>00522 <span class="keywordflow">if</span> (band == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00523"></a>00523 <span class="keywordflow">if</span> (catname == NULL) <span class="keywordflow">return</span> cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+<a name="l00524"></a>00524
+<a name="l00525"></a>00525 <span class="comment">/* Load the catalog */</span>
+<a name="l00526"></a>00526 <span class="keywordflow">if</span> ((catal = <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(catfile, catname)) == NULL) {
+<a name="l00527"></a>00527 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_NOT_FOUND,
+<a name="l00528"></a>00528 <span class="stringliteral">"Cannot load the catalog %s from %s"</span>,
+<a name="l00529"></a>00529 catname, catfile);
+<a name="l00530"></a>00530 }
+<a name="l00531"></a>00531
+<a name="l00532"></a>00532 <span class="comment">/* Check the columns are present */</span>
+<a name="l00533"></a>00533 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(catal) != CPL_ERROR_NONE) {
+<a name="l00534"></a>00534 cpl_table_delete(catal);
+<a name="l00535"></a>00535 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
+<a name="l00536"></a>00536 }
+<a name="l00537"></a>00537
+<a name="l00538"></a>00538 <span class="comment">/* Select stars with known magnitude */</span>
+<a name="l00539"></a>00539 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(catal, band) == -1) {
+<a name="l00540"></a>00540 cpl_table_delete(catal);
+<a name="l00541"></a>00541 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00542"></a>00542 <span class="stringliteral">"Cannot select stars in that band"</span>);
+<a name="l00543"></a>00543 }
+<a name="l00544"></a>00544
+<a name="l00545"></a>00545 <span class="comment">/* Select stars within a given distance */</span>
+<a name="l00546"></a>00546 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(catal, ra, dec, dist) == -1) {
+<a name="l00547"></a>00547 cpl_table_delete(catal);
+<a name="l00548"></a>00548 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00549"></a>00549 <span class="stringliteral">"Cannot select close stars"</span>);
+<a name="l00550"></a>00550 }
+<a name="l00551"></a>00551
+<a name="l00552"></a>00552 <span class="comment">/* Take the closest */</span>
+<a name="l00553"></a>00553 <span class="keywordflow">if</span> ((ind=<a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(catal, ra, dec)) < 0) {
+<a name="l00554"></a>00554 cpl_table_delete(catal);
+<a name="l00555"></a>00555 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00556"></a>00556 <span class="stringliteral">"Cannot get the closest star with "</span>
+<a name="l00557"></a>00557 <span class="stringliteral">"known %s magnitude"</span>,band);
+<a name="l00558"></a>00558 }
+<a name="l00559"></a>00559
+<a name="l00560"></a>00560 <span class="keywordflow">if</span>(mag != NULL)
+<a name="l00561"></a>00561 *mag = cpl_table_get_double(catal, band, ind, NULL);
+<a name="l00562"></a>00562
+<a name="l00563"></a>00563 <span class="keywordflow">if</span>(name != NULL)
+<a name="l00564"></a>00564 {
+<a name="l00565"></a>00565 *name = cpl_strdup(cpl_table_get_string(catal,
+<a name="l00566"></a>00566 IRPLIB_STDSTAR_STAR_COL, ind));
+<a name="l00567"></a>00567
+<a name="l00568"></a>00568 }
+<a name="l00569"></a>00569 <span class="keywordflow">if</span>(type != NULL)
+<a name="l00570"></a>00570 {
+<a name="l00571"></a>00571 *type = cpl_strdup(cpl_table_get_string(catal, IRPLIB_STDSTAR_TYPE_COL,
+<a name="l00572"></a>00572 ind));
+<a name="l00573"></a>00573 }
+<a name="l00574"></a>00574 <span class="keywordflow">if</span>(usedcatname != NULL)
+<a name="l00575"></a>00575 {
+<a name="l00576"></a>00576 <span class="keywordflow">if</span>(strcmp(catname, <span class="stringliteral">"all"</span>))
+<a name="l00577"></a>00577 *usedcatname = cpl_strdup(catname);
+<a name="l00578"></a>00578 <span class="keywordflow">else</span>
+<a name="l00579"></a>00579 {
+<a name="l00580"></a>00580 *usedcatname = cpl_strdup(cpl_table_get_string
+<a name="l00581"></a>00581 (catal, IRPLIB_STDSTAR_CAT_COL, ind));
+<a name="l00582"></a>00582 }
+<a name="l00583"></a>00583 }
+<a name="l00584"></a>00584 <span class="keywordflow">if</span>(star_ra != NULL)
+<a name="l00585"></a>00585 *star_ra = cpl_table_get_double(catal, IRPLIB_STDSTAR_RA_COL, ind, NULL);
+<a name="l00586"></a>00586 <span class="keywordflow">if</span>(star_dec != NULL)
+<a name="l00587"></a>00587 *star_dec = cpl_table_get_double(catal, IRPLIB_STDSTAR_DEC_COL, ind, NULL);
+<a name="l00588"></a>00588
+<a name="l00589"></a>00589 <span class="comment">/* Free and return */</span>
+<a name="l00590"></a>00590 cpl_table_delete(catal);
+<a name="l00591"></a>00591 <span class="keywordflow">return</span> cpl_errorstate_is_equal(prestate) ? CPL_ERROR_NONE
+<a name="l00592"></a>00592 : cpl_error_set_where(cpl_func);
+<a name="l00593"></a>00593 }
+<a name="l00594"></a>00594
+<a name="l00595"></a>00595 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00608"></a>00608 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00609"></a><a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba">00609</a> cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba" title="Get the conversion.">irplib_stdstar_get_conversion</a>(
+<a name="l00610"></a>00610 <span class="keyword">const</span> cpl_bivector * spec,
+<a name="l00611"></a>00611 <span class="keywordtype">double</span> dit,
+<a name="l00612"></a>00612 <span class="keywordtype">double</span> surface,
+<a name="l00613"></a>00613 <span class="keywordtype">double</span> gain,
+<a name="l00614"></a>00614 <span class="keywordtype">double</span> mag)
+<a name="l00615"></a>00615 {
+<a name="l00616"></a>00616 <span class="keywordtype">double</span> h = 6.62e-27;
+<a name="l00617"></a>00617 <span class="keywordtype">double</span> c = 3e18;
+<a name="l00618"></a>00618 <span class="keyword">const</span> cpl_vector * wave;
+<a name="l00619"></a>00619 <span class="keyword">const</span> cpl_vector * extr;
+<a name="l00620"></a>00620 cpl_vector * out;
+<a name="l00621"></a>00621 <span class="keywordtype">double</span> factor;
+<a name="l00622"></a>00622
+<a name="l00623"></a>00623 <span class="comment">/* Test entries */</span>
+<a name="l00624"></a>00624 <span class="keywordflow">if</span> (spec == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00625"></a>00625 <span class="keywordflow">if</span> (dit <= 0.0) <span class="keywordflow">return</span> NULL;
+<a name="l00626"></a>00626
+<a name="l00627"></a>00627 <span class="comment">/* Get the extracted spectrum */</span>
+<a name="l00628"></a>00628 wave = cpl_bivector_get_x_const(spec);
+<a name="l00629"></a>00629 extr = cpl_bivector_get_y_const(spec);
<a name="l00630"></a>00630
-<a name="l00631"></a>00631 <span class="comment">/* Multiply by the gain */</span>
-<a name="l00632"></a>00632 cpl_vector_multiply_scalar(out, gain) ;
+<a name="l00631"></a>00631 <span class="comment">/* Get the spectrum */</span>
+<a name="l00632"></a>00632 out = cpl_vector_duplicate(extr);
<a name="l00633"></a>00633
-<a name="l00634"></a>00634 <span class="comment">/* Multiply by the difference magnitude */</span>
-<a name="l00635"></a>00635 factor = pow(10, mag/2.5) ;
-<a name="l00636"></a>00636 cpl_vector_multiply_scalar(out, factor) ;
-<a name="l00637"></a>00637
-<a name="l00638"></a>00638 <span class="comment">/* Divide by the dispersion */</span>
-<a name="l00639"></a>00639 factor = (cpl_vector_get(wave, cpl_vector_get_size(wave)-1) -
-<a name="l00640"></a>00640 cpl_vector_get(wave, 0)) / cpl_vector_get_size(wave) ;
-<a name="l00641"></a>00641 cpl_vector_divide_scalar(out, factor) ;
+<a name="l00634"></a>00634 <span class="comment">/* Divide by DIT */</span>
+<a name="l00635"></a>00635 cpl_vector_divide_scalar(out, dit);
+<a name="l00636"></a>00636
+<a name="l00637"></a>00637 <span class="comment">/* Divide by the surface */</span>
+<a name="l00638"></a>00638 cpl_vector_divide_scalar(out, surface);
+<a name="l00639"></a>00639
+<a name="l00640"></a>00640 <span class="comment">/* Multiply by the gain */</span>
+<a name="l00641"></a>00641 cpl_vector_multiply_scalar(out, gain);
<a name="l00642"></a>00642
-<a name="l00643"></a>00643 <span class="comment">/* Multiply by the energy of the photon */</span>
-<a name="l00644"></a>00644 cpl_vector_multiply_scalar(out, h*c) ;
-<a name="l00645"></a>00645 cpl_vector_divide(out, wave) ;
+<a name="l00643"></a>00643 <span class="comment">/* Multiply by the difference magnitude */</span>
+<a name="l00644"></a>00644 factor = pow(10, mag/2.5);
+<a name="l00645"></a>00645 cpl_vector_multiply_scalar(out, factor);
<a name="l00646"></a>00646
-<a name="l00647"></a>00647 <span class="keywordflow">return</span> out ;
-<a name="l00648"></a>00648 }
-<a name="l00649"></a>00649
-<a name="l00650"></a>00650 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00658"></a>00658 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00659"></a><a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab">00659</a> cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab" title="Get the 0 magnitude spectrum.">irplib_stdstar_get_mag_zero</a>(
-<a name="l00660"></a>00660 <span class="keyword">const</span> cpl_bivector * sed,
-<a name="l00661"></a>00661 <span class="keyword">const</span> cpl_vector * waves,
-<a name="l00662"></a>00662 <span class="keywordtype">double</span> cent_wl)
-<a name="l00663"></a>00663 {
-<a name="l00664"></a>00664 <span class="keywordtype">double</span> wmin, wmax, wstep ;
-<a name="l00665"></a>00665 <span class="keywordtype">int</span> nb_sed ;
-<a name="l00666"></a>00666 <span class="keyword">const</span> <span class="keywordtype">double</span> * sed_x ;
-<a name="l00667"></a>00667 <span class="keyword">const</span> <span class="keywordtype">double</span> * sed_y ;
-<a name="l00668"></a>00668 cpl_bivector * sed_loc ;
-<a name="l00669"></a>00669 <span class="keywordtype">double</span> * sed_loc_x ;
-<a name="l00670"></a>00670 <span class="keywordtype">double</span> * sed_loc_y ;
-<a name="l00671"></a>00671 cpl_vector * out ;
-<a name="l00672"></a>00672 cpl_bivector * out_biv ;
-<a name="l00673"></a>00673 <span class="keywordtype">double</span> f0_jan, f0_erg, cent_val ;
-<a name="l00674"></a>00674 <span class="keywordtype">int</span> i ;
-<a name="l00675"></a>00675
-<a name="l00676"></a>00676 <span class="comment">/* Test entries */</span>
-<a name="l00677"></a>00677 <span class="keywordflow">if</span> (sed == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00678"></a>00678 <span class="keywordflow">if</span> (waves == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00679"></a>00679
-<a name="l00680"></a>00680 <span class="comment">/* Initialise */</span>
-<a name="l00681"></a>00681 nb_sed = cpl_bivector_get_size(sed) ;
-<a name="l00682"></a>00682 sed_x = cpl_bivector_get_x_data_const(sed) ;
-<a name="l00683"></a>00683 sed_y = cpl_bivector_get_y_data_const(sed) ;
-<a name="l00684"></a>00684 wstep = sed_x[1] - sed_x[0] ;
-<a name="l00685"></a>00685 wmin = cpl_vector_get(waves, 0) ;
-<a name="l00686"></a>00686 wmax = cpl_vector_get(waves, cpl_vector_get_size(waves)-1) ;
-<a name="l00687"></a>00687
-<a name="l00688"></a>00688 <span class="comment">/* Expand sed with 0 to have it bigger than the required wavelengths */</span>
-<a name="l00689"></a>00689 sed_loc = cpl_bivector_new(nb_sed + 4) ;
-<a name="l00690"></a>00690 sed_loc_x = cpl_bivector_get_x_data(sed_loc) ;
-<a name="l00691"></a>00691 sed_loc_y = cpl_bivector_get_y_data(sed_loc) ;
-<a name="l00692"></a>00692 <span class="keywordflow">for</span> (i=0 ; i<nb_sed ; i++) {
-<a name="l00693"></a>00693 sed_loc_x[i+2] = sed_x[i] ;
-<a name="l00694"></a>00694 sed_loc_y[i+2] = sed_y[i] ;
-<a name="l00695"></a>00695 }
+<a name="l00647"></a>00647 <span class="comment">/* Divide by the dispersion */</span>
+<a name="l00648"></a>00648 factor = (cpl_vector_get(wave, cpl_vector_get_size(wave)-1) -
+<a name="l00649"></a>00649 cpl_vector_get(wave, 0)) / cpl_vector_get_size(wave);
+<a name="l00650"></a>00650 cpl_vector_divide_scalar(out, factor);
+<a name="l00651"></a>00651
+<a name="l00652"></a>00652 <span class="comment">/* Multiply by the energy of the photon */</span>
+<a name="l00653"></a>00653 cpl_vector_multiply_scalar(out, h*c);
+<a name="l00654"></a>00654 cpl_vector_divide(out, wave);
+<a name="l00655"></a>00655
+<a name="l00656"></a>00656 <span class="keywordflow">return</span> out;
+<a name="l00657"></a>00657 }
+<a name="l00658"></a>00658
+<a name="l00659"></a>00659 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00667"></a>00667 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00668"></a><a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab">00668</a> cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab" title="Get the 0 magnitude spectrum.">irplib_stdstar_get_mag_zero</a>(
+<a name="l00669"></a>00669 <span class="keyword">const</span> cpl_bivector * sed,
+<a name="l00670"></a>00670 <span class="keyword">const</span> cpl_vector * waves,
+<a name="l00671"></a>00671 <span class="keywordtype">double</span> cent_wl)
+<a name="l00672"></a>00672 {
+<a name="l00673"></a>00673 <span class="keywordtype">double</span> wmin, wmax, wstep;
+<a name="l00674"></a>00674 <span class="keywordtype">int</span> nb_sed;
+<a name="l00675"></a>00675 <span class="keyword">const</span> <span class="keywordtype">double</span> * sed_x;
+<a name="l00676"></a>00676 <span class="keyword">const</span> <span class="keywordtype">double</span> * sed_y;
+<a name="l00677"></a>00677 cpl_bivector * sed_loc;
+<a name="l00678"></a>00678 <span class="keywordtype">double</span> * sed_loc_x;
+<a name="l00679"></a>00679 <span class="keywordtype">double</span> * sed_loc_y;
+<a name="l00680"></a>00680 cpl_vector * out;
+<a name="l00681"></a>00681 cpl_bivector * out_biv;
+<a name="l00682"></a>00682 <span class="keywordtype">double</span> f0_jan, f0_erg, cent_val;
+<a name="l00683"></a>00683 <span class="keywordtype">int</span> i;
+<a name="l00684"></a>00684
+<a name="l00685"></a>00685 <span class="comment">/* Test entries */</span>
+<a name="l00686"></a>00686 <span class="keywordflow">if</span> (sed == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00687"></a>00687 <span class="keywordflow">if</span> (waves == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00688"></a>00688
+<a name="l00689"></a>00689 <span class="comment">/* Initialise */</span>
+<a name="l00690"></a>00690 nb_sed = cpl_bivector_get_size(sed);
+<a name="l00691"></a>00691 sed_x = cpl_bivector_get_x_data_const(sed);
+<a name="l00692"></a>00692 sed_y = cpl_bivector_get_y_data_const(sed);
+<a name="l00693"></a>00693 wstep = sed_x[1] - sed_x[0];
+<a name="l00694"></a>00694 wmin = cpl_vector_get(waves, 0);
+<a name="l00695"></a>00695 wmax = cpl_vector_get(waves, cpl_vector_get_size(waves)-1);
<a name="l00696"></a>00696
-<a name="l00697"></a>00697 <span class="comment">/* Low bound */</span>
-<a name="l00698"></a>00698 sed_loc_x[1] = sed_loc_x[2] - wstep ;
-<a name="l00699"></a>00699 <span class="keywordflow">if</span> (sed_loc_x[2] < wmin) {
-<a name="l00700"></a>00700 sed_loc_x[0] = sed_loc_x[1] - wstep ;
-<a name="l00701"></a>00701 } <span class="keywordflow">else</span> {
-<a name="l00702"></a>00702 sed_loc_x[0] = wmin - wstep ;
-<a name="l00703"></a>00703 }
-<a name="l00704"></a>00704 sed_loc_y[0] = 1e-20 ;
-<a name="l00705"></a>00705 sed_loc_y[1] = 1e-20 ;
-<a name="l00706"></a>00706
-<a name="l00707"></a>00707 <span class="comment">/* High bound */</span>
-<a name="l00708"></a>00708 sed_loc_x[nb_sed+2] = sed_loc_x[nb_sed+1] + wstep ;
-<a name="l00709"></a>00709 <span class="keywordflow">if</span> (sed_loc_x[nb_sed+1] > wmax) {
-<a name="l00710"></a>00710 sed_loc_x[nb_sed+3] = sed_loc_x[nb_sed+2] + wstep ;
-<a name="l00711"></a>00711 } <span class="keywordflow">else</span> {
-<a name="l00712"></a>00712 sed_loc_x[nb_sed+3] = wmax + wstep ;
-<a name="l00713"></a>00713 }
-<a name="l00714"></a>00714 sed_loc_y[nb_sed+2] = 1e-20 ;
-<a name="l00715"></a>00715 sed_loc_y[nb_sed+3] = 1e-20 ;
-<a name="l00716"></a>00716
-<a name="l00717"></a>00717 <span class="comment">/* Create the output bivector */</span>
-<a name="l00718"></a>00718 out = cpl_vector_duplicate(waves) ;
-<a name="l00719"></a>00719 out_biv = cpl_bivector_wrap_vectors((cpl_vector*)waves, out) ;
-<a name="l00720"></a>00720
-<a name="l00721"></a>00721 <span class="comment">/* Interpolate */</span>
-<a name="l00722"></a>00722 <span class="keywordflow">if</span> (cpl_bivector_interpolate_linear(out_biv, sed_loc) != CPL_ERROR_NONE) {
-<a name="l00723"></a>00723 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot interpolate the wavelength"</span>) ;
-<a name="l00724"></a>00724 cpl_bivector_unwrap_vectors(out_biv) ;
-<a name="l00725"></a>00725 cpl_vector_delete(out) ;
-<a name="l00726"></a>00726 cpl_bivector_delete(sed_loc) ;
-<a name="l00727"></a>00727 <span class="keywordflow">return</span> NULL ;
-<a name="l00728"></a>00728 }
-<a name="l00729"></a>00729 cpl_bivector_unwrap_vectors(out_biv) ;
-<a name="l00730"></a>00730 cpl_bivector_delete(sed_loc) ;
-<a name="l00731"></a>00731
-<a name="l00732"></a>00732 <span class="comment">/* Compute f0_jan */</span>
-<a name="l00733"></a>00733 f0_jan = 5513.15 / ( pow(cent_wl,3) * (exp(1.2848/cent_wl)-1) ) ;
-<a name="l00734"></a>00734
-<a name="l00735"></a>00735 <span class="comment">/* Convert f0 Jansky -> ergs/s/cm^2/Angstrom */</span>
-<a name="l00736"></a>00736 f0_erg = f0_jan * 1e-26 * 1e7 * 3e18 / (1e4 * cent_wl*cent_wl*1e4*1e4) ;
-<a name="l00737"></a>00737
-<a name="l00738"></a>00738 <span class="comment">/* Scale out so that the central value is f0 */</span>
-<a name="l00739"></a>00739 cent_val = cpl_vector_get(out, cpl_vector_get_size(out)/2) ;
-<a name="l00740"></a>00740 <span class="keywordflow">if</span> (cent_val <= 0.0) {
-<a name="l00741"></a>00741 cpl_msg_error(cpl_func, <span class="stringliteral">"Negative or 0 central value"</span>) ;
-<a name="l00742"></a>00742 cpl_vector_delete(out) ;
-<a name="l00743"></a>00743 <span class="keywordflow">return</span> NULL ;
-<a name="l00744"></a>00744 }
-<a name="l00745"></a>00745 cpl_vector_multiply_scalar(out, f0_erg/cent_val) ;
-<a name="l00746"></a>00746
-<a name="l00747"></a>00747 <span class="comment">/* Return */</span>
-<a name="l00748"></a>00748 <span class="keywordflow">return</span> out ;
-<a name="l00749"></a>00749 }
-<a name="l00750"></a>00750
-<a name="l00751"></a>00751 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00761"></a>00761 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00762"></a><a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea">00762</a> cpl_bivector * <a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea" title="Get the SED.">irplib_stdstar_get_sed</a>(
-<a name="l00763"></a>00763 <span class="keyword">const</span> <span class="keywordtype">char</span> * seds_file,
-<a name="l00764"></a>00764 <span class="keyword">const</span> <span class="keywordtype">char</span> * sptype)
-<a name="l00765"></a>00765 {
-<a name="l00766"></a>00766 cpl_table * seds ;
-<a name="l00767"></a>00767 cpl_bivector * out ;
-<a name="l00768"></a>00768 cpl_vector * wave ;
-<a name="l00769"></a>00769 cpl_vector * sed ;
-<a name="l00770"></a>00770 cpl_bivector * tmp ;
-<a name="l00771"></a>00771 <span class="keywordtype">int</span> nlines ;
-<a name="l00772"></a>00772
-<a name="l00773"></a>00773 <span class="comment">/* Test entries */</span>
-<a name="l00774"></a>00774 <span class="keywordflow">if</span> (seds_file == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00775"></a>00775 <span class="keywordflow">if</span> (sptype == NULL) <span class="keywordflow">return</span> NULL ;
-<a name="l00776"></a>00776
-<a name="l00777"></a>00777 <span class="comment">/* Load the table */</span>
-<a name="l00778"></a>00778 <span class="keywordflow">if</span> ((seds = cpl_table_load(seds_file, 1, 0)) == NULL) {
-<a name="l00779"></a>00779 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the table"</span>) ;
-<a name="l00780"></a>00780 <span class="keywordflow">return</span> NULL ;
-<a name="l00781"></a>00781 }
-<a name="l00782"></a>00782
-<a name="l00783"></a>00783 <span class="comment">/* Check if the column is there */</span>
-<a name="l00784"></a>00784 <span class="keywordflow">if</span> (!cpl_table_has_column(seds, sptype)) {
-<a name="l00785"></a>00785 cpl_msg_error(cpl_func, <span class="stringliteral">"SED of the requested star not available"</span>) ;
-<a name="l00786"></a>00786 cpl_table_delete(seds) ;
-<a name="l00787"></a>00787 <span class="keywordflow">return</span> NULL ;
-<a name="l00788"></a>00788 }
-<a name="l00789"></a>00789
-<a name="l00790"></a>00790 <span class="comment">/* Get the nb lines */</span>
-<a name="l00791"></a>00791 nlines = cpl_table_get_nrow(seds) ;
-<a name="l00792"></a>00792
-<a name="l00793"></a>00793 <span class="comment">/* Get the wavelength as a vector */</span>
-<a name="l00794"></a>00794 <span class="keywordflow">if</span> ((wave = cpl_vector_wrap(nlines,
-<a name="l00795"></a>00795 cpl_table_get_data_double(seds, <span class="stringliteral">"Wavelength"</span>))) == NULL) {
-<a name="l00796"></a>00796 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot get the Wavelength column"</span>) ;
-<a name="l00797"></a>00797 cpl_table_delete(seds) ;
-<a name="l00798"></a>00798 <span class="keywordflow">return</span> NULL ;
+<a name="l00697"></a>00697 <span class="comment">/* Expand sed with 0 to have it bigger than the required wavelengths */</span>
+<a name="l00698"></a>00698 sed_loc = cpl_bivector_new(nb_sed + 4);
+<a name="l00699"></a>00699 sed_loc_x = cpl_bivector_get_x_data(sed_loc);
+<a name="l00700"></a>00700 sed_loc_y = cpl_bivector_get_y_data(sed_loc);
+<a name="l00701"></a>00701 <span class="keywordflow">for</span> (i=0; i<nb_sed; i++) {
+<a name="l00702"></a>00702 sed_loc_x[i+2] = sed_x[i];
+<a name="l00703"></a>00703 sed_loc_y[i+2] = sed_y[i];
+<a name="l00704"></a>00704 }
+<a name="l00705"></a>00705
+<a name="l00706"></a>00706 <span class="comment">/* Low bound */</span>
+<a name="l00707"></a>00707 sed_loc_x[1] = sed_loc_x[2] - wstep;
+<a name="l00708"></a>00708 <span class="keywordflow">if</span> (sed_loc_x[2] < wmin) {
+<a name="l00709"></a>00709 sed_loc_x[0] = sed_loc_x[1] - wstep;
+<a name="l00710"></a>00710 } <span class="keywordflow">else</span> {
+<a name="l00711"></a>00711 sed_loc_x[0] = wmin - wstep;
+<a name="l00712"></a>00712 }
+<a name="l00713"></a>00713 sed_loc_y[0] = 1e-20;
+<a name="l00714"></a>00714 sed_loc_y[1] = 1e-20;
+<a name="l00715"></a>00715
+<a name="l00716"></a>00716 <span class="comment">/* High bound */</span>
+<a name="l00717"></a>00717 sed_loc_x[nb_sed+2] = sed_loc_x[nb_sed+1] + wstep;
+<a name="l00718"></a>00718 <span class="keywordflow">if</span> (sed_loc_x[nb_sed+1] > wmax) {
+<a name="l00719"></a>00719 sed_loc_x[nb_sed+3] = sed_loc_x[nb_sed+2] + wstep;
+<a name="l00720"></a>00720 } <span class="keywordflow">else</span> {
+<a name="l00721"></a>00721 sed_loc_x[nb_sed+3] = wmax + wstep;
+<a name="l00722"></a>00722 }
+<a name="l00723"></a>00723 sed_loc_y[nb_sed+2] = 1e-20;
+<a name="l00724"></a>00724 sed_loc_y[nb_sed+3] = 1e-20;
+<a name="l00725"></a>00725
+<a name="l00726"></a>00726 <span class="comment">/* Create the output bivector */</span>
+<a name="l00727"></a>00727 out = cpl_vector_duplicate(waves);
+<a name="l00728"></a>00728 IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
+<a name="l00729"></a>00729 <span class="comment">/* the X entry (waves) is not modified by cpl_bivector_interpolate_linear */</span>
+<a name="l00730"></a>00730 out_biv = cpl_bivector_wrap_vectors((cpl_vector*)waves, out);
+<a name="l00731"></a>00731 IRPLIB_DIAG_PRAGMA_POP;
+<a name="l00732"></a>00732 <span class="comment">/* Interpolate */</span>
+<a name="l00733"></a>00733 <span class="keywordflow">if</span> (cpl_bivector_interpolate_linear(out_biv, sed_loc) != CPL_ERROR_NONE) {
+<a name="l00734"></a>00734 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot interpolate the wavelength"</span>);
+<a name="l00735"></a>00735 cpl_bivector_unwrap_vectors(out_biv);
+<a name="l00736"></a>00736 cpl_vector_delete(out);
+<a name="l00737"></a>00737 cpl_bivector_delete(sed_loc);
+<a name="l00738"></a>00738 <span class="keywordflow">return</span> NULL;
+<a name="l00739"></a>00739 }
+<a name="l00740"></a>00740 cpl_bivector_unwrap_vectors(out_biv);
+<a name="l00741"></a>00741 cpl_bivector_delete(sed_loc);
+<a name="l00742"></a>00742
+<a name="l00743"></a>00743 <span class="comment">/* Compute f0_jan */</span>
+<a name="l00744"></a>00744 f0_jan = 5513.15 / ( pow(cent_wl,3) * (exp(1.2848/cent_wl)-1) );
+<a name="l00745"></a>00745
+<a name="l00746"></a>00746 <span class="comment">/* Convert f0 Jansky -> ergs/s/cm^2/Angstrom */</span>
+<a name="l00747"></a>00747 f0_erg = f0_jan * 1e-26 * 1e7 * 3e18 / (1e4 * cent_wl*cent_wl*1e4*1e4);
+<a name="l00748"></a>00748
+<a name="l00749"></a>00749 <span class="comment">/* Scale out so that the central value is f0 */</span>
+<a name="l00750"></a>00750 cent_val = cpl_vector_get(out, cpl_vector_get_size(out)/2);
+<a name="l00751"></a>00751 <span class="keywordflow">if</span> (cent_val <= 0.0) {
+<a name="l00752"></a>00752 cpl_msg_error(cpl_func, <span class="stringliteral">"Negative or 0 central value"</span>);
+<a name="l00753"></a>00753 cpl_vector_delete(out);
+<a name="l00754"></a>00754 <span class="keywordflow">return</span> NULL;
+<a name="l00755"></a>00755 }
+<a name="l00756"></a>00756 cpl_vector_multiply_scalar(out, f0_erg/cent_val);
+<a name="l00757"></a>00757
+<a name="l00758"></a>00758 <span class="comment">/* Return */</span>
+<a name="l00759"></a>00759 <span class="keywordflow">return</span> out;
+<a name="l00760"></a>00760 }
+<a name="l00761"></a>00761
+<a name="l00762"></a>00762 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00772"></a>00772 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00773"></a><a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea">00773</a> cpl_bivector * <a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea" title="Get the SED.">irplib_stdstar_get_sed</a>(
+<a name="l00774"></a>00774 <span class="keyword">const</span> <span class="keywordtype">char</span> * seds_file,
+<a name="l00775"></a>00775 <span class="keyword">const</span> <span class="keywordtype">char</span> * sptype)
+<a name="l00776"></a>00776 {
+<a name="l00777"></a>00777 cpl_table * seds;
+<a name="l00778"></a>00778 cpl_bivector * out;
+<a name="l00779"></a>00779 cpl_vector * wave;
+<a name="l00780"></a>00780 cpl_vector * sed;
+<a name="l00781"></a>00781 cpl_bivector * tmp;
+<a name="l00782"></a>00782 <span class="keywordtype">int</span> nlines;
+<a name="l00783"></a>00783
+<a name="l00784"></a>00784 <span class="comment">/* Test entries */</span>
+<a name="l00785"></a>00785 <span class="keywordflow">if</span> (seds_file == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00786"></a>00786 <span class="keywordflow">if</span> (sptype == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l00787"></a>00787
+<a name="l00788"></a>00788 <span class="comment">/* Load the table */</span>
+<a name="l00789"></a>00789 <span class="keywordflow">if</span> ((seds = cpl_table_load(seds_file, 1, 0)) == NULL) {
+<a name="l00790"></a>00790 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot load the table"</span>);
+<a name="l00791"></a>00791 <span class="keywordflow">return</span> NULL;
+<a name="l00792"></a>00792 }
+<a name="l00793"></a>00793
+<a name="l00794"></a>00794 <span class="comment">/* Check if the column is there */</span>
+<a name="l00795"></a>00795 <span class="keywordflow">if</span> (!cpl_table_has_column(seds, sptype)) {
+<a name="l00796"></a>00796 cpl_msg_error(cpl_func, <span class="stringliteral">"SED of the requested star not available"</span>);
+<a name="l00797"></a>00797 cpl_table_delete(seds);
+<a name="l00798"></a>00798 <span class="keywordflow">return</span> NULL;
<a name="l00799"></a>00799 }
<a name="l00800"></a>00800
-<a name="l00801"></a>00801 <span class="comment">/* Get the SED as a vector */</span>
-<a name="l00802"></a>00802 <span class="keywordflow">if</span> ((sed = cpl_vector_wrap(nlines,
-<a name="l00803"></a>00803 cpl_table_get_data_double(seds, sptype))) == NULL) {
-<a name="l00804"></a>00804 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot get the SED column"</span>) ;
-<a name="l00805"></a>00805 cpl_table_delete(seds) ;
-<a name="l00806"></a>00806 cpl_vector_unwrap(wave) ;
-<a name="l00807"></a>00807 <span class="keywordflow">return</span> NULL ;
-<a name="l00808"></a>00808 }
-<a name="l00809"></a>00809 tmp = cpl_bivector_wrap_vectors(wave, sed) ;
-<a name="l00810"></a>00810
-<a name="l00811"></a>00811 <span class="comment">/* Create the output bivector */</span>
-<a name="l00812"></a>00812 out = cpl_bivector_duplicate(tmp) ;
-<a name="l00813"></a>00813
-<a name="l00814"></a>00814 <span class="comment">/* Free */</span>
-<a name="l00815"></a>00815 cpl_bivector_unwrap_vectors(tmp) ;
-<a name="l00816"></a>00816 cpl_vector_unwrap(wave) ;
-<a name="l00817"></a>00817 cpl_vector_unwrap(sed) ;
-<a name="l00818"></a>00818 cpl_table_delete(seds) ;
-<a name="l00819"></a>00819
-<a name="l00820"></a>00820 <span class="comment">/* Return */</span>
-<a name="l00821"></a>00821 <span class="keywordflow">return</span> out ;
-<a name="l00822"></a>00822 }
+<a name="l00801"></a>00801 <span class="comment">/* Get the nb lines */</span>
+<a name="l00802"></a>00802 nlines = cpl_table_get_nrow(seds);
+<a name="l00803"></a>00803
+<a name="l00804"></a>00804 <span class="comment">/* Get the wavelength as a vector */</span>
+<a name="l00805"></a>00805 <span class="keywordflow">if</span> ((wave = cpl_vector_wrap(nlines,
+<a name="l00806"></a>00806 cpl_table_get_data_double(seds, <span class="stringliteral">"Wavelength"</span>))) == NULL) {
+<a name="l00807"></a>00807 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot get the Wavelength column"</span>);
+<a name="l00808"></a>00808 cpl_table_delete(seds);
+<a name="l00809"></a>00809 <span class="keywordflow">return</span> NULL;
+<a name="l00810"></a>00810 }
+<a name="l00811"></a>00811
+<a name="l00812"></a>00812 <span class="comment">/* Get the SED as a vector */</span>
+<a name="l00813"></a>00813 <span class="keywordflow">if</span> ((sed = cpl_vector_wrap(nlines,
+<a name="l00814"></a>00814 cpl_table_get_data_double(seds, sptype))) == NULL) {
+<a name="l00815"></a>00815 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot get the SED column"</span>);
+<a name="l00816"></a>00816 cpl_table_delete(seds);
+<a name="l00817"></a>00817 cpl_vector_unwrap(wave);
+<a name="l00818"></a>00818 <span class="keywordflow">return</span> NULL;
+<a name="l00819"></a>00819 }
+<a name="l00820"></a>00820 tmp = cpl_bivector_wrap_vectors(wave, sed);
+<a name="l00821"></a>00821
+<a name="l00822"></a>00822 <span class="comment">/* Create the output bivector */</span>
+<a name="l00823"></a>00823 out = cpl_bivector_duplicate(tmp);
+<a name="l00824"></a>00824
+<a name="l00825"></a>00825 <span class="comment">/* Free */</span>
+<a name="l00826"></a>00826 cpl_bivector_unwrap_vectors(tmp);
+<a name="l00827"></a>00827 cpl_vector_unwrap(wave);
+<a name="l00828"></a>00828 cpl_vector_unwrap(sed);
+<a name="l00829"></a>00829 cpl_table_delete(seds);
+<a name="l00830"></a>00830
+<a name="l00831"></a>00831 <span class="comment">/* Return */</span>
+<a name="l00832"></a>00832 <span class="keywordflow">return</span> out;
+<a name="l00833"></a>00833 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__stdstar_8h_source.html b/html/irplib__stdstar_8h_source.html
index 7cb390c..1413e85 100644
--- a/html/irplib__stdstar_8h_source.html
+++ b/html/irplib__stdstar_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_stdstar.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_stdstar.h,v 1.15 2011/12/14 08:53:04 cgarcia Exp $</span>
+<h1>irplib_stdstar.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_stdstar.h,v 1.16 2013/02/27 10:37:52 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: cgarcia $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/12/14 08:53:04 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.15 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/02/27 10:37:52 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.16 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_STDSTAR_H</span>
@@ -68,26 +68,28 @@
<a name="l00058"></a>00058 <span class="comment"> Function prototypes</span>
<a name="l00059"></a>00059 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00060"></a>00060
-<a name="l00061"></a>00061 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga1d798cc23ce72891460133af03ee21ba" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(cpl_frameset *, <span class="keyword">const</span> cpl_frameset *,
-<a name="l00062"></a>00062 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00063"></a>00063 <span class="keyword">const</span> <span class="keywordtype">char</span> *, cpl_table * (*convert_ascii_table)(<span class="keyword">const</span> <span class="keywordtype">char</span> *)) ;
-<a name="l00064"></a>00064 cpl_table * <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *) ;
-<a name="l00065"></a>00065 cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(<span class="keyword">const</span> cpl_table *);
-<a name="l00066"></a>00066 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(cpl_table *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>) ;
-<a name="l00067"></a>00067 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *) ;
-<a name="l00068"></a>00068 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(<span class="keyword">const</span> cpl_table *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>) ;
-<a name="l00069"></a>00069 cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027" title="Find the closest star to ra, dec in the catalog.">irplib_stdstar_find_star</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00070"></a>00070 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">double</span> *, <span class="keywordtype">char</span> **, <span class="keywordtype">char</span> **, <span class="keywordtype">char</span> **,
-<a name="l00071"></a>00071 <span class="keywordtype">double</span> *, <span class="keywordtype">double</span> * , <span class="keywordtype">double</span>);
-<a name="l00072"></a>00072 cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba" title="Get the conversion.">irplib_stdstar_get_conversion</a>(<span class="keyword">const</span> cpl_bivector *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
-<a name="l00073"></a>00073 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
-<a name="l00074"></a>00074 cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab" title="Get the 0 magnitude spectrum.">irplib_stdstar_get_mag_zero</a>(<span class="keyword">const</span> cpl_bivector *,
-<a name="l00075"></a>00075 <span class="keyword">const</span> cpl_vector *, <span class="keywordtype">double</span>);
-<a name="l00076"></a>00076 cpl_bivector * <a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea" title="Get the SED.">irplib_stdstar_get_sed</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00077"></a>00077
-<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
+<a name="l00061"></a>00061 cpl_error_code
+<a name="l00062"></a>00062 <a class="code" href="group__irplib__stdstar.html#gac18c92be3d3c96ba57804b074a2abb7d" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(cpl_frameset *, <span class="keyword">const</span> cpl_frameset *,
+<a name="l00063"></a>00063 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00064"></a>00064 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00065"></a>00065 cpl_table * (*)(<span class="keyword">const</span> <span class="keywordtype">char</span> *));
+<a name="l00066"></a>00066 cpl_table * <a class="code" href="group__irplib__stdstar.html#ga1690bd84c24e905e384b8f725bf7aff1" title="Load the FITS catalog in a table.">irplib_stdstar_load_catalog</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00067"></a>00067 cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga2dbe2031bf6d669778dca42f6c343efc" title="Check that the table has the relevant columns of a stdstar table.">irplib_stdstar_check_columns_exist</a>(<span class="keyword">const</span> cpl_table *);
+<a name="l00068"></a>00068 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga080e06303f3f83a91959ac01381dc4e8" title="Select the stars that are within a given distance.">irplib_stdstar_select_stars_dist</a>(cpl_table *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
+<a name="l00069"></a>00069 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga28316d8f0619bdbd0040b1f56799e7ab" title="Select the stars that have a known magnitude.">irplib_stdstar_select_stars_mag</a>(cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00070"></a>00070 <span class="keywordtype">int</span> <a class="code" href="group__irplib__stdstar.html#ga36b4c90fd548dd0c00afe97b17a558e5" title="Find the closest star.">irplib_stdstar_find_closest</a>(<span class="keyword">const</span> cpl_table *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
+<a name="l00071"></a>00071 cpl_error_code <a class="code" href="group__irplib__stdstar.html#ga4d69ae957de04b1769ac225f12834027" title="Find the closest star to ra, dec in the catalog.">irplib_stdstar_find_star</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00072"></a>00072 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">double</span> *, <span class="keywordtype">char</span> **, <span class="keywordtype">char</span> **, <span class="keywordtype">char</span> **,
+<a name="l00073"></a>00073 <span class="keywordtype">double</span> *, <span class="keywordtype">double</span> * , <span class="keywordtype">double</span>);
+<a name="l00074"></a>00074 cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga93b46d8ac857a0d0fdc781b56a91a8ba" title="Get the conversion.">irplib_stdstar_get_conversion</a>(<span class="keyword">const</span> cpl_bivector *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
+<a name="l00075"></a>00075 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
+<a name="l00076"></a>00076 cpl_vector * <a class="code" href="group__irplib__stdstar.html#ga6e68e6a9d0bbb41ef717234b9f289dab" title="Get the 0 magnitude spectrum.">irplib_stdstar_get_mag_zero</a>(<span class="keyword">const</span> cpl_bivector *,
+<a name="l00077"></a>00077 <span class="keyword">const</span> cpl_vector *, <span class="keywordtype">double</span>);
+<a name="l00078"></a>00078 cpl_bivector * <a class="code" href="group__irplib__stdstar.html#gabbad67ff18cb901914caa9e864969dea" title="Get the SED.">irplib_stdstar_get_sed</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00079"></a>00079
+<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__strehl_8c_source.html b/html/irplib__strehl_8c_source.html
index 5e8f0c7..8595df7 100644
--- a/html/irplib__strehl_8c_source.html
+++ b/html/irplib__strehl_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/11/18 21:37:48 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.43 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -670,7 +670,7 @@
<a name="l00805"></a>00805 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00806"></a>00806 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__strehl_8h_source.html b/html/irplib__strehl_8h_source.html
index 0c93fac..155c3c2 100644
--- a/html/irplib__strehl_8h_source.html
+++ b/html/irplib__strehl_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: kmirny $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/06/29 14:32:53 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.12 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_STREHL_H</span>
@@ -84,7 +84,7 @@
<a name="l00074"></a>00074 <span class="keywordtype">double</span>, <span class="keywordtype">double</span> *);
<a name="l00075"></a>00075 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__utils_8c_source.html b/html/irplib__utils_8c_source.html
index 360b01d..46ed771 100644
--- a/html/irplib__utils_8c_source.html
+++ b/html/irplib__utils_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_utils.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_utils.c,v 1.78 2012/05/08 13:56:09 llundin Exp $</span>
+<h1>irplib_utils.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_utils.c,v 1.82 2013/02/27 16:00:29 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/08 13:56:09 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.78 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/02/27 16:00:29 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.82 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -42,15 +42,15 @@
<a name="l00032"></a>00032 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00033"></a>00033 <span class="comment"> Includes</span>
<a name="l00034"></a>00034 <span class="comment"> -----------------------------------------------------------------------------*/</span>
-<a name="l00035"></a>00035
-<a name="l00036"></a>00036 <span class="preprocessor">#include <math.h></span>
-<a name="l00037"></a>00037
-<a name="l00038"></a>00038 <span class="preprocessor">#include <string.h></span>
-<a name="l00039"></a>00039 <span class="preprocessor">#include <assert.h></span>
-<a name="l00040"></a>00040
-<a name="l00041"></a>00041 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00042"></a>00042
-<a name="l00043"></a>00043 <span class="preprocessor">#include "irplib_utils.h"</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#include "irplib_utils.h"</span>
+<a name="l00036"></a>00036
+<a name="l00037"></a>00037 <span class="preprocessor">#include <math.h></span>
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="preprocessor">#include <string.h></span>
+<a name="l00040"></a>00040 <span class="preprocessor">#include <assert.h></span>
+<a name="l00041"></a>00041
+<a name="l00042"></a>00042 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00043"></a>00043
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00046"></a>00046 <span class="comment"> Defines</span>
@@ -645,617 +645,575 @@
<a name="l00891"></a>00891 cpl_propertylist * applist = NULL;
<a name="l00892"></a>00892 cpl_errorstate prestate = cpl_errorstate_get();
<a name="l00893"></a>00893 cpl_error_code error;
-<a name="l00894"></a>00894
-<a name="l00895"></a>00895 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00896"></a>00896 cpl_ensure_code(allframes != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00897"></a>00897 cpl_ensure_code(useframes != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00898"></a>00898 cpl_ensure_code(procatg != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00899"></a>00899 cpl_ensure_code(parlist != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00900"></a>00900 cpl_ensure_code(recipe_name != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00901"></a>00901 cpl_ensure_code(instrume != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00902"></a>00902 cpl_ensure_code(pipe_id != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00903"></a>00903
-<a name="l00904"></a>00904 cpl_ensure_code(!<a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(<span class="keyword">self</span>, useframes,
-<a name="l00905"></a>00905 maxlinelen,
-<a name="l00906"></a>00906 commentchar,
-<a name="l00907"></a>00907 parlist,
-<a name="l00908"></a>00908 table_set_row),
-<a name="l00909"></a>00909 cpl_error_get_code());
-<a name="l00910"></a>00910
-<a name="l00911"></a>00911 <span class="keywordflow">if</span> (table_check != NULL && (table_check(<span class="keyword">self</span>, useframes, parlist) ||
-<a name="l00912"></a>00912 !cpl_errorstate_is_equal(prestate))) {
-<a name="l00913"></a>00913 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l00914"></a>00914 <span class="stringliteral">"Consistency check of table failed"</span>);
-<a name="l00915"></a>00915 }
-<a name="l00916"></a>00916
-<a name="l00917"></a>00917 filename = product_name != NULL
-<a name="l00918"></a>00918 ? product_name : cpl_sprintf(<span class="stringliteral">"%s"</span> CPL_DFS_FITS, recipe_name);
-<a name="l00919"></a>00919
-<a name="l00920"></a>00920 applist = mainlist == NULL
-<a name="l00921"></a>00921 ? cpl_propertylist_new() : cpl_propertylist_duplicate(mainlist);
-<a name="l00922"></a>00922
-<a name="l00923"></a>00923 error = cpl_propertylist_update_string(applist, <span class="stringliteral">"INSTRUME"</span>, instrume);
-<a name="l00924"></a>00924
-<a name="l00925"></a>00925 <span class="keywordflow">if</span> (!error)
-<a name="l00926"></a>00926 error = <a class="code" href="group__irplib__utils.html#ga62a91f8630af11164547c168660b2ade" title="Save a table as a DFS-compliant pipeline product.">irplib_dfs_save_table</a>(allframes, parlist, useframes, <span class="keyword">self</span>,
-<a name="l00927"></a>00927 extlist, recipe_name, procatg, applist,
-<a name="l00928"></a>00928 remregexp, pipe_id, filename);
-<a name="l00929"></a>00929
-<a name="l00930"></a>00930 cpl_propertylist_delete(applist);
-<a name="l00931"></a>00931 <span class="keywordflow">if</span> (filename != product_name) cpl_free((<span class="keywordtype">char</span>*)filename);
-<a name="l00932"></a>00932
-<a name="l00933"></a>00933 <span class="comment">/* Propagate the error, if any */</span>
-<a name="l00934"></a>00934 cpl_ensure_code(!error, error);
-<a name="l00935"></a>00935
-<a name="l00936"></a>00936 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00937"></a>00937
-<a name="l00938"></a>00938 }
-<a name="l00939"></a>00939
+<a name="l00894"></a>00894 <span class="keywordtype">char</span> * fallback_filename = NULL;
+<a name="l00895"></a>00895
+<a name="l00896"></a>00896 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00897"></a>00897 cpl_ensure_code(allframes != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00898"></a>00898 cpl_ensure_code(useframes != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00899"></a>00899 cpl_ensure_code(procatg != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00900"></a>00900 cpl_ensure_code(parlist != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00901"></a>00901 cpl_ensure_code(recipe_name != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00902"></a>00902 cpl_ensure_code(instrume != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00903"></a>00903 cpl_ensure_code(pipe_id != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00904"></a>00904
+<a name="l00905"></a>00905 cpl_ensure_code(!<a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(<span class="keyword">self</span>, useframes,
+<a name="l00906"></a>00906 maxlinelen,
+<a name="l00907"></a>00907 commentchar,
+<a name="l00908"></a>00908 parlist,
+<a name="l00909"></a>00909 table_set_row),
+<a name="l00910"></a>00910 cpl_error_get_code());
+<a name="l00911"></a>00911
+<a name="l00912"></a>00912 <span class="keywordflow">if</span> (table_check != NULL && (table_check(<span class="keyword">self</span>, useframes, parlist) ||
+<a name="l00913"></a>00913 !cpl_errorstate_is_equal(prestate))) {
+<a name="l00914"></a>00914 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l00915"></a>00915 <span class="stringliteral">"Consistency check of table failed"</span>);
+<a name="l00916"></a>00916 }
+<a name="l00917"></a>00917
+<a name="l00918"></a>00918 fallback_filename = cpl_sprintf(<span class="stringliteral">"%s"</span> CPL_DFS_FITS, recipe_name);
+<a name="l00919"></a>00919 filename = product_name != NULL ? product_name : fallback_filename;
+<a name="l00920"></a>00920
+<a name="l00921"></a>00921 applist = mainlist == NULL
+<a name="l00922"></a>00922 ? cpl_propertylist_new() : cpl_propertylist_duplicate(mainlist);
+<a name="l00923"></a>00923
+<a name="l00924"></a>00924 error = cpl_propertylist_update_string(applist, <span class="stringliteral">"INSTRUME"</span>, instrume);
+<a name="l00925"></a>00925
+<a name="l00926"></a>00926 <span class="keywordflow">if</span> (!error)
+<a name="l00927"></a>00927 error = <a class="code" href="group__irplib__utils.html#ga62a91f8630af11164547c168660b2ade" title="Save a table as a DFS-compliant pipeline product.">irplib_dfs_save_table</a>(allframes, parlist, useframes, <span class="keyword">self</span>,
+<a name="l00928"></a>00928 extlist, recipe_name, procatg, applist,
+<a name="l00929"></a>00929 remregexp, pipe_id, filename);
+<a name="l00930"></a>00930
+<a name="l00931"></a>00931 cpl_propertylist_delete(applist);
+<a name="l00932"></a>00932 cpl_free(fallback_filename);
+<a name="l00933"></a>00933
+<a name="l00934"></a>00934 <span class="comment">/* Propagate the error, if any */</span>
+<a name="l00935"></a>00935 cpl_ensure_code(!error, error);
+<a name="l00936"></a>00936
+<a name="l00937"></a>00937 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00938"></a>00938
+<a name="l00939"></a>00939 }
<a name="l00940"></a>00940
<a name="l00941"></a>00941
-<a name="l00942"></a>00942 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00991"></a>00991 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00992"></a>00992
-<a name="l00993"></a>00993 cpl_error_code
-<a name="l00994"></a><a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d">00994</a> <a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(cpl_table * <span class="keyword">self</span>,
-<a name="l00995"></a>00995 <span class="keyword">const</span> cpl_frameset * useframes,
-<a name="l00996"></a>00996 <span class="keywordtype">int</span> maxlinelen,
-<a name="l00997"></a>00997 <span class="keywordtype">char</span> commentchar,
-<a name="l00998"></a>00998 <span class="keyword">const</span> cpl_parameterlist * parlist,
-<a name="l00999"></a>00999 cpl_boolean (*table_set_row)
-<a name="l01000"></a>01000 (cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>,
-<a name="l01001"></a>01001 <span class="keyword">const</span> cpl_frame *,
-<a name="l01002"></a>01002 <span class="keyword">const</span> cpl_parameterlist *))
-<a name="l01003"></a>01003 {
-<a name="l01004"></a>01004
-<a name="l01005"></a>01005 <span class="keyword">const</span> cpl_frame * rawframe;
-<a name="l01006"></a>01006 <span class="keywordtype">char</span> * linebuffer = NULL;
-<a name="l01007"></a>01007 FILE * stream = NULL;
-<a name="l01008"></a>01008 <span class="keywordtype">int</span> nfiles = 0;
-<a name="l01009"></a>01009 <span class="keywordtype">int</span> nrow = cpl_table_get_nrow(<span class="keyword">self</span>);
-<a name="l01010"></a>01010 <span class="keywordtype">int</span> irow = 0;
-<a name="l01011"></a>01011 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l01012"></a>01012
-<a name="l01013"></a>01013 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01014"></a>01014 cpl_ensure_code(useframes != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01015"></a>01015 cpl_ensure_code(maxlinelen > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01016"></a>01016 cpl_ensure_code(parlist != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01017"></a>01017 cpl_ensure_code(table_set_row != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01018"></a>01018
-<a name="l01019"></a>01019 linebuffer = cpl_malloc(maxlinelen);
-<a name="l01020"></a>01020
-<a name="l01021"></a>01021 <span class="keywordflow">for</span> (rawframe = cpl_frameset_get_first_const(useframes);
-<a name="l01022"></a>01022 rawframe != NULL;
-<a name="l01023"></a>01023 rawframe = cpl_frameset_get_next_const(useframes), nfiles++) {
-<a name="l01024"></a>01024
-<a name="l01025"></a>01025 <span class="keyword">const</span> <span class="keywordtype">char</span> * rawfile = cpl_frame_get_filename(rawframe);
-<a name="l01026"></a>01026 <span class="keyword">const</span> <span class="keywordtype">char</span> * done; <span class="comment">/* Indicate when the reading is done */</span>
-<a name="l01027"></a>01027 <span class="keyword">const</span> <span class="keywordtype">int</span> irowpre = irow;
-<a name="l01028"></a>01028 <span class="keywordtype">int</span> iirow = 0;
-<a name="l01029"></a>01029 <span class="keywordtype">int</span> ierror;
-<a name="l01030"></a>01030
-<a name="l01031"></a>01031 <span class="keywordflow">if</span> (rawfile == NULL) <span class="keywordflow">break</span>; <span class="comment">/* Should not happen... */</span>
-<a name="l01032"></a>01032
-<a name="l01033"></a>01033 stream = fopen(rawfile, <span class="stringliteral">"r"</span>);
-<a name="l01034"></a>01034
-<a name="l01035"></a>01035 <span class="keywordflow">if</span> (stream == NULL) {
-<a name="l01036"></a>01036 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01037"></a>01037 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_IO, <span class="stringliteral">"Could not "</span>
-<a name="l01038"></a>01038 <span class="stringliteral">"open %s for reading"</span>, rawfile);
-<a name="l01039"></a>01039 <span class="preprocessor">#else</span>
-<a name="l01040"></a>01040 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_IO, <span class="stringliteral">"Could not "</span>
-<a name="l01041"></a>01041 <span class="stringliteral">"open file for reading"</span>);
-<a name="l01042"></a>01042 <span class="preprocessor">#endif</span>
-<a name="l01043"></a>01043 <span class="preprocessor"></span> <span class="keywordflow">break</span>;
-<a name="l01044"></a>01044 }
-<a name="l01045"></a>01045
-<a name="l01046"></a>01046 <span class="keywordflow">for</span> (;(done = fgets(linebuffer, maxlinelen, stream)) != NULL; iirow++) {
-<a name="l01047"></a>01047
-<a name="l01048"></a>01048 <span class="keywordflow">if</span> (linebuffer[0] != commentchar) {
-<a name="l01049"></a>01049 cpl_boolean didset;
-<a name="l01050"></a>01050 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01051"></a>01051 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">int</span> prerow = irow;
-<a name="l01052"></a>01052 <span class="preprocessor">#endif</span>
-<a name="l01053"></a>01053 <span class="preprocessor"></span>
-<a name="l01054"></a>01054 <span class="keywordflow">if</span> (irow == nrow) {
-<a name="l01055"></a>01055 nrow += nrow ? nrow : 1;
-<a name="l01056"></a>01056 <span class="keywordflow">if</span> (cpl_table_set_size(<span class="keyword">self</span>, nrow)) <span class="keywordflow">break</span>;
-<a name="l01057"></a>01057 }
-<a name="l01058"></a>01058
-<a name="l01059"></a>01059 didset = table_set_row(<span class="keyword">self</span>, linebuffer, irow, rawframe,
-<a name="l01060"></a>01060 parlist);
-<a name="l01061"></a>01061 <span class="keywordflow">if</span> (didset) irow++;
-<a name="l01062"></a>01062
-<a name="l01063"></a>01063 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
-<a name="l01064"></a>01064 <span class="keywordflow">if</span> (didset)
-<a name="l01065"></a>01065 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01066"></a>01066 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01067"></a>01067 <span class="stringliteral">"Failed to set table row %d "</span>
-<a name="l01068"></a>01068 <span class="stringliteral">"using line %d from %d. file %s"</span>,
-<a name="l01069"></a>01069 1+prerow, iirow+1,
-<a name="l01070"></a>01070 nfiles+1, rawfile);
-<a name="l01071"></a>01071 <span class="keywordflow">else</span>
-<a name="l01072"></a>01072 cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01073"></a>01073 <span class="stringliteral">"Failure with line %d from %d. "</span>
-<a name="l01074"></a>01074 <span class="stringliteral">"file %s"</span>, iirow+1,
-<a name="l01075"></a>01075 nfiles+1, rawfile);
-<a name="l01076"></a>01076 <span class="preprocessor">#else</span>
-<a name="l01077"></a>01077 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01078"></a>01078 <span class="stringliteral">"Failed to set table row"</span>
-<a name="l01079"></a>01079 <span class="stringliteral">"using catalogue line"</span>);
-<a name="l01080"></a>01080 <span class="keywordflow">else</span>
-<a name="l01081"></a>01081 cpl_error_set_message(cpl_func, cpl_error_get_code(),
-<a name="l01082"></a>01082 <span class="stringliteral">"Failure with catalogue line"</span>);
-<a name="l01083"></a>01083 <span class="preprocessor">#endif</span>
-<a name="l01084"></a>01084 <span class="preprocessor"></span>
-<a name="l01085"></a>01085 <span class="keywordflow">break</span>;
-<a name="l01086"></a>01086 }
-<a name="l01087"></a>01087 }
-<a name="l01088"></a>01088 }
-<a name="l01089"></a>01089 <span class="keywordflow">if</span> (done != NULL) <span class="keywordflow">break</span>;
-<a name="l01090"></a>01090
-<a name="l01091"></a>01091 ierror = fclose(stream);
-<a name="l01092"></a>01092 stream = NULL;
-<a name="l01093"></a>01093 <span class="keywordflow">if</span> (ierror) <span class="keywordflow">break</span>;
-<a name="l01094"></a>01094
+<a name="l00942"></a>00942
+<a name="l00943"></a>00943 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00992"></a>00992 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00993"></a>00993
+<a name="l00994"></a>00994 cpl_error_code
+<a name="l00995"></a><a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d">00995</a> <a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(cpl_table * <span class="keyword">self</span>,
+<a name="l00996"></a>00996 <span class="keyword">const</span> cpl_frameset * useframes,
+<a name="l00997"></a>00997 <span class="keywordtype">int</span> maxlinelen,
+<a name="l00998"></a>00998 <span class="keywordtype">char</span> commentchar,
+<a name="l00999"></a>00999 <span class="keyword">const</span> cpl_parameterlist * parlist,
+<a name="l01000"></a>01000 cpl_boolean (*table_set_row)
+<a name="l01001"></a>01001 (cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>,
+<a name="l01002"></a>01002 <span class="keyword">const</span> cpl_frame *,
+<a name="l01003"></a>01003 <span class="keyword">const</span> cpl_parameterlist *))
+<a name="l01004"></a>01004 {
+<a name="l01005"></a>01005
+<a name="l01006"></a>01006 <span class="keyword">const</span> cpl_frame * rawframe;
+<a name="l01007"></a>01007 <span class="keywordtype">char</span> * linebuffer = NULL;
+<a name="l01008"></a>01008 FILE * stream = NULL;
+<a name="l01009"></a>01009 <span class="keywordtype">int</span> nfiles = 0;
+<a name="l01010"></a>01010 <span class="keywordtype">int</span> nrow = cpl_table_get_nrow(<span class="keyword">self</span>);
+<a name="l01011"></a>01011 <span class="keywordtype">int</span> irow = 0;
+<a name="l01012"></a>01012 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l01013"></a>01013
+<a name="l01014"></a>01014 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01015"></a>01015 cpl_ensure_code(useframes != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01016"></a>01016 cpl_ensure_code(maxlinelen > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01017"></a>01017 cpl_ensure_code(parlist != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01018"></a>01018 cpl_ensure_code(table_set_row != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01019"></a>01019
+<a name="l01020"></a>01020 linebuffer = cpl_malloc(maxlinelen);
+<a name="l01021"></a>01021
+<a name="l01022"></a>01022 <span class="keywordflow">for</span> (rawframe = cpl_frameset_get_first_const(useframes);
+<a name="l01023"></a>01023 rawframe != NULL;
+<a name="l01024"></a>01024 rawframe = cpl_frameset_get_next_const(useframes), nfiles++) {
+<a name="l01025"></a>01025
+<a name="l01026"></a>01026 <span class="keyword">const</span> <span class="keywordtype">char</span> * rawfile = cpl_frame_get_filename(rawframe);
+<a name="l01027"></a>01027 <span class="keyword">const</span> <span class="keywordtype">char</span> * done; <span class="comment">/* Indicate when the reading is done */</span>
+<a name="l01028"></a>01028 <span class="keyword">const</span> <span class="keywordtype">int</span> irowpre = irow;
+<a name="l01029"></a>01029 <span class="keywordtype">int</span> iirow = 0;
+<a name="l01030"></a>01030 <span class="keywordtype">int</span> ierror;
+<a name="l01031"></a>01031
+<a name="l01032"></a>01032 <span class="keywordflow">if</span> (rawfile == NULL) <span class="keywordflow">break</span>; <span class="comment">/* Should not happen... */</span>
+<a name="l01033"></a>01033
+<a name="l01034"></a>01034 stream = fopen(rawfile, <span class="stringliteral">"r"</span>);
+<a name="l01035"></a>01035
+<a name="l01036"></a>01036 <span class="keywordflow">if</span> (stream == NULL) {
+<a name="l01037"></a>01037 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01038"></a>01038 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_IO, <span class="stringliteral">"Could not "</span>
+<a name="l01039"></a>01039 <span class="stringliteral">"open %s for reading"</span>, rawfile);
+<a name="l01040"></a>01040 <span class="preprocessor">#else</span>
+<a name="l01041"></a>01041 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, CPL_ERROR_FILE_IO, <span class="stringliteral">"Could not "</span>
+<a name="l01042"></a>01042 <span class="stringliteral">"open file for reading"</span>);
+<a name="l01043"></a>01043 <span class="preprocessor">#endif</span>
+<a name="l01044"></a>01044 <span class="preprocessor"></span> <span class="keywordflow">break</span>;
+<a name="l01045"></a>01045 }
+<a name="l01046"></a>01046
+<a name="l01047"></a>01047 <span class="keywordflow">for</span> (;(done = fgets(linebuffer, maxlinelen, stream)) != NULL; iirow++) {
+<a name="l01048"></a>01048
+<a name="l01049"></a>01049 <span class="keywordflow">if</span> (linebuffer[0] != commentchar) {
+<a name="l01050"></a>01050 cpl_boolean didset;
+<a name="l01051"></a>01051 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01052"></a>01052 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">int</span> prerow = irow;
+<a name="l01053"></a>01053 <span class="preprocessor">#endif</span>
+<a name="l01054"></a>01054 <span class="preprocessor"></span>
+<a name="l01055"></a>01055 <span class="keywordflow">if</span> (irow == nrow) {
+<a name="l01056"></a>01056 nrow += nrow ? nrow : 1;
+<a name="l01057"></a>01057 <span class="keywordflow">if</span> (cpl_table_set_size(<span class="keyword">self</span>, nrow)) <span class="keywordflow">break</span>;
+<a name="l01058"></a>01058 }
+<a name="l01059"></a>01059
+<a name="l01060"></a>01060 didset = table_set_row(<span class="keyword">self</span>, linebuffer, irow, rawframe,
+<a name="l01061"></a>01061 parlist);
+<a name="l01062"></a>01062 <span class="keywordflow">if</span> (didset) irow++;
+<a name="l01063"></a>01063
+<a name="l01064"></a>01064 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
+<a name="l01065"></a>01065 <span class="keywordflow">if</span> (didset)
+<a name="l01066"></a>01066 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01067"></a>01067 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01068"></a>01068 <span class="stringliteral">"Failed to set table row %d "</span>
+<a name="l01069"></a>01069 <span class="stringliteral">"using line %d from %d. file %s"</span>,
+<a name="l01070"></a>01070 1+prerow, iirow+1,
+<a name="l01071"></a>01071 nfiles+1, rawfile);
+<a name="l01072"></a>01072 <span class="keywordflow">else</span>
+<a name="l01073"></a>01073 cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01074"></a>01074 <span class="stringliteral">"Failure with line %d from %d. "</span>
+<a name="l01075"></a>01075 <span class="stringliteral">"file %s"</span>, iirow+1,
+<a name="l01076"></a>01076 nfiles+1, rawfile);
+<a name="l01077"></a>01077 <span class="preprocessor">#else</span>
+<a name="l01078"></a>01078 <span class="preprocessor"></span> cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01079"></a>01079 <span class="stringliteral">"Failed to set table row"</span>
+<a name="l01080"></a>01080 <span class="stringliteral">"using catalogue line"</span>);
+<a name="l01081"></a>01081 <span class="keywordflow">else</span>
+<a name="l01082"></a>01082 cpl_error_set_message(cpl_func, cpl_error_get_code(),
+<a name="l01083"></a>01083 <span class="stringliteral">"Failure with catalogue line"</span>);
+<a name="l01084"></a>01084 <span class="preprocessor">#endif</span>
+<a name="l01085"></a>01085 <span class="preprocessor"></span>
+<a name="l01086"></a>01086 <span class="keywordflow">break</span>;
+<a name="l01087"></a>01087 }
+<a name="l01088"></a>01088 }
+<a name="l01089"></a>01089 }
+<a name="l01090"></a>01090 <span class="keywordflow">if</span> (done != NULL) <span class="keywordflow">break</span>;
+<a name="l01091"></a>01091
+<a name="l01092"></a>01092 ierror = fclose(stream);
+<a name="l01093"></a>01093 stream = NULL;
+<a name="l01094"></a>01094 <span class="keywordflow">if</span> (ierror) <span class="keywordflow">break</span>;
<a name="l01095"></a>01095
-<a name="l01096"></a>01096 <span class="keywordflow">if</span> (irow == irowpre)
-<a name="l01097"></a>01097 cpl_msg_warning(cpl_func, <span class="stringliteral">"No usable lines in the %d. file: %s"</span>,
-<a name="l01098"></a>01098 1+nfiles, rawfile);
-<a name="l01099"></a>01099 }
-<a name="l01100"></a>01100
-<a name="l01101"></a>01101 cpl_free(linebuffer);
-<a name="l01102"></a>01102 <span class="keywordflow">if</span> (stream != NULL) fclose(stream);
-<a name="l01103"></a>01103
-<a name="l01104"></a>01104 <span class="comment">/* Check for premature end */</span>
-<a name="l01105"></a>01105 cpl_ensure_code(rawframe == NULL, cpl_error_get_code());
-<a name="l01106"></a>01106
-<a name="l01107"></a>01107 <span class="keywordflow">if</span> (irow == 0) {
-<a name="l01108"></a>01108 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
-<a name="l01109"></a>01109 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
-<a name="l01110"></a>01110 <span class="stringliteral">"No usable lines in the %d input "</span>
-<a name="l01111"></a>01111 <span class="stringliteral">"frame(s)"</span>, nfiles);
-<a name="l01112"></a>01112 <span class="preprocessor">#else</span>
-<a name="l01113"></a>01113 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
-<a name="l01114"></a>01114 <span class="stringliteral">"No usable lines in the input frame(s)"</span>);
-<a name="l01115"></a>01115 <span class="preprocessor">#endif</span>
-<a name="l01116"></a>01116 <span class="preprocessor"></span> }
-<a name="l01117"></a>01117
-<a name="l01118"></a>01118 <span class="comment">/* Resize the table to the actual number of rows set */</span>
-<a name="l01119"></a>01119 cpl_ensure_code(!cpl_table_set_size(<span class="keyword">self</span>, irow), cpl_error_get_code());
-<a name="l01120"></a>01120
-<a name="l01121"></a>01121 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01122"></a>01122 }
-<a name="l01123"></a>01123
+<a name="l01096"></a>01096
+<a name="l01097"></a>01097 <span class="keywordflow">if</span> (irow == irowpre)
+<a name="l01098"></a>01098 cpl_msg_warning(cpl_func, <span class="stringliteral">"No usable lines in the %d. file: %s"</span>,
+<a name="l01099"></a>01099 1+nfiles, rawfile);
+<a name="l01100"></a>01100 }
+<a name="l01101"></a>01101
+<a name="l01102"></a>01102 cpl_free(linebuffer);
+<a name="l01103"></a>01103 <span class="keywordflow">if</span> (stream != NULL) fclose(stream);
+<a name="l01104"></a>01104
+<a name="l01105"></a>01105 <span class="comment">/* Check for premature end */</span>
+<a name="l01106"></a>01106 cpl_ensure_code(rawframe == NULL, cpl_error_get_code());
+<a name="l01107"></a>01107
+<a name="l01108"></a>01108 <span class="keywordflow">if</span> (irow == 0) {
+<a name="l01109"></a>01109 <span class="preprocessor">#if defined CPL_HAVE_VA_ARGS && CPL_HAVE_VA_ARGS != 0</span>
+<a name="l01110"></a>01110 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+<a name="l01111"></a>01111 <span class="stringliteral">"No usable lines in the %d input "</span>
+<a name="l01112"></a>01112 <span class="stringliteral">"frame(s)"</span>, nfiles);
+<a name="l01113"></a>01113 <span class="preprocessor">#else</span>
+<a name="l01114"></a>01114 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+<a name="l01115"></a>01115 <span class="stringliteral">"No usable lines in the input frame(s)"</span>);
+<a name="l01116"></a>01116 <span class="preprocessor">#endif</span>
+<a name="l01117"></a>01117 <span class="preprocessor"></span> }
+<a name="l01118"></a>01118
+<a name="l01119"></a>01119 <span class="comment">/* Resize the table to the actual number of rows set */</span>
+<a name="l01120"></a>01120 cpl_ensure_code(!cpl_table_set_size(<span class="keyword">self</span>, irow), cpl_error_get_code());
+<a name="l01121"></a>01121
+<a name="l01122"></a>01122 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01123"></a>01123 }
<a name="l01124"></a>01124
<a name="l01125"></a>01125
-<a name="l01126"></a>01126 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01138"></a>01138 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01139"></a><a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e">01139</a> <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e" title="Reset IRPLIB state.">irplib_reset</a>(<span class="keywordtype">void</span>)
-<a name="l01140"></a>01140 {
-<a name="l01141"></a>01141 <span class="keywordflow">return</span>;
-<a name="l01142"></a>01142 }
-<a name="l01143"></a>01143
-<a name="l01144"></a>01144 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01151"></a>01151 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01152"></a><a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde">01152</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde" title="Comparison function to identify different input frames.">irplib_compare_tags</a>(
-<a name="l01153"></a>01153 cpl_frame * frame1,
-<a name="l01154"></a>01154 cpl_frame * frame2)
-<a name="l01155"></a>01155 {
-<a name="l01156"></a>01156 <span class="keywordtype">char</span> * v1 ;
-<a name="l01157"></a>01157 <span class="keywordtype">char</span> * v2 ;
-<a name="l01158"></a>01158
-<a name="l01159"></a>01159 <span class="comment">/* Test entries */</span>
-<a name="l01160"></a>01160 <span class="keywordflow">if</span> (frame1==NULL || frame2==NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01161"></a>01161
-<a name="l01162"></a>01162 <span class="comment">/* Get the tags */</span>
-<a name="l01163"></a>01163 <span class="keywordflow">if</span> ((v1 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame1)) == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01164"></a>01164 <span class="keywordflow">if</span> ((v2 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame2)) == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01165"></a>01165
-<a name="l01166"></a>01166 <span class="comment">/* Compare the tags */</span>
-<a name="l01167"></a>01167 <span class="keywordflow">if</span> (strcmp(v1, v2)) <span class="keywordflow">return</span> 0 ;
-<a name="l01168"></a>01168 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 1 ;
-<a name="l01169"></a>01169 }
-<a name="l01170"></a>01170
-<a name="l01171"></a>01171 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01187"></a>01187 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01188"></a><a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134">01188</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134" title="Find the filename with the given tag in a frame set.">irplib_frameset_find_file</a>(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
-<a name="l01189"></a>01189 <span class="keyword">const</span> <span class="keywordtype">char</span> * tag)
-<a name="l01190"></a>01190 {
-<a name="l01191"></a>01191 <span class="keyword">const</span> cpl_frame * frame = cpl_frameset_find_const(<span class="keyword">self</span>, tag);
-<a name="l01192"></a>01192
+<a name="l01126"></a>01126
+<a name="l01127"></a>01127 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01139"></a>01139 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01140"></a><a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e">01140</a> <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e" title="Reset IRPLIB state.">irplib_reset</a>(<span class="keywordtype">void</span>)
+<a name="l01141"></a>01141 {
+<a name="l01142"></a>01142 <span class="keywordflow">return</span>;
+<a name="l01143"></a>01143 }
+<a name="l01144"></a>01144
+<a name="l01145"></a>01145 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01152"></a>01152 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01153"></a><a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde">01153</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde" title="Comparison function to identify different input frames.">irplib_compare_tags</a>(
+<a name="l01154"></a>01154 cpl_frame * frame1,
+<a name="l01155"></a>01155 cpl_frame * frame2)
+<a name="l01156"></a>01156 {
+<a name="l01157"></a>01157 <span class="keyword">const</span> <span class="keywordtype">char</span> * v1 ;
+<a name="l01158"></a>01158 <span class="keyword">const</span> <span class="keywordtype">char</span> * v2 ;
+<a name="l01159"></a>01159
+<a name="l01160"></a>01160 <span class="comment">/* Test entries */</span>
+<a name="l01161"></a>01161 <span class="keywordflow">if</span> (frame1==NULL || frame2==NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01162"></a>01162
+<a name="l01163"></a>01163 <span class="comment">/* Get the tags */</span>
+<a name="l01164"></a>01164 <span class="keywordflow">if</span> ((v1 = cpl_frame_get_tag(frame1)) == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01165"></a>01165 <span class="keywordflow">if</span> ((v2 = cpl_frame_get_tag(frame2)) == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01166"></a>01166
+<a name="l01167"></a>01167 <span class="comment">/* Compare the tags */</span>
+<a name="l01168"></a>01168 <span class="keywordflow">if</span> (strcmp(v1, v2)) <span class="keywordflow">return</span> 0 ;
+<a name="l01169"></a>01169 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 1 ;
+<a name="l01170"></a>01170 }
+<a name="l01171"></a>01171
+<a name="l01172"></a>01172 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01188"></a>01188 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01189"></a><a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134">01189</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134" title="Find the filename with the given tag in a frame set.">irplib_frameset_find_file</a>(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
+<a name="l01190"></a>01190 <span class="keyword">const</span> <span class="keywordtype">char</span> * tag)
+<a name="l01191"></a>01191 {
+<a name="l01192"></a>01192 <span class="keyword">const</span> cpl_frame * frame = cpl_frameset_find_const(<span class="keyword">self</span>, tag);
<a name="l01193"></a>01193
-<a name="l01194"></a>01194 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01195"></a>01195
-<a name="l01196"></a>01196 <span class="keywordflow">if</span> (frame == NULL) <span class="keywordflow">return</span> NULL;
-<a name="l01197"></a>01197
-<a name="l01198"></a>01198 <span class="keywordflow">if</span> (cpl_frameset_find_const(<span class="keyword">self</span>, NULL))
-<a name="l01199"></a>01199 cpl_msg_warning(cpl_func,
-<a name="l01200"></a>01200 <span class="stringliteral">"Frameset has more than one file with tag: %s"</span>,
-<a name="l01201"></a>01201 tag);
-<a name="l01202"></a>01202
-<a name="l01203"></a>01203 <span class="keywordflow">return</span> cpl_frame_get_filename(frame);
-<a name="l01204"></a>01204
-<a name="l01205"></a>01205 }
-<a name="l01206"></a>01206
-<a name="l01207"></a>01207 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01217"></a>01217 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01218"></a>01218 <span class="keyword">const</span>
-<a name="l01219"></a><a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68">01219</a> cpl_frame * <a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68" title="Find the first frame belonging to the given group.">irplib_frameset_get_first_from_group</a>(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
-<a name="l01220"></a>01220 cpl_frame_group group)
-<a name="l01221"></a>01221 {
-<a name="l01222"></a>01222 <span class="keyword">const</span> cpl_frame * frame;
-<a name="l01223"></a>01223
-<a name="l01224"></a>01224 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
-<a name="l01225"></a>01225
-<a name="l01226"></a>01226 <span class="keywordflow">for</span> (frame = cpl_frameset_get_first_const(<span class="keyword">self</span>); frame != NULL ;
-<a name="l01227"></a>01227 frame = cpl_frameset_get_next_const(<span class="keyword">self</span>)) {
-<a name="l01228"></a>01228 <span class="keywordflow">if</span> (cpl_frame_get_group(frame) == group) <span class="keywordflow">break</span>;
-<a name="l01229"></a>01229 }
-<a name="l01230"></a>01230 <span class="keywordflow">return</span> frame;
-<a name="l01231"></a>01231 }
-<a name="l01232"></a>01232
-<a name="l01233"></a>01233 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01252"></a>01252 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01253"></a><a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1">01253</a> cpl_error_code <a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1" title="Find the aperture(s) with the greatest flux.">irplib_apertures_find_max_flux</a>(<span class="keyword">const</span> cpl_apertures * <span class="keyword">self</span>,
-<a name="l01254"></a>01254 <span class="keywordtype">int</span> * ind, <span class="keywordtype">int</span> nfind)
-<a name="l01255"></a>01255 {
-<a name="l01256"></a>01256 <span class="keyword">const</span> <span class="keywordtype">int</span> nsize = cpl_apertures_get_size(<span class="keyword">self</span>);
-<a name="l01257"></a>01257 <span class="keywordtype">int</span> ifind;
-<a name="l01258"></a>01258
+<a name="l01194"></a>01194
+<a name="l01195"></a>01195 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01196"></a>01196
+<a name="l01197"></a>01197 <span class="keywordflow">if</span> (frame == NULL) <span class="keywordflow">return</span> NULL;
+<a name="l01198"></a>01198
+<a name="l01199"></a>01199 <span class="keywordflow">if</span> (cpl_frameset_find_const(<span class="keyword">self</span>, NULL))
+<a name="l01200"></a>01200 cpl_msg_warning(cpl_func,
+<a name="l01201"></a>01201 <span class="stringliteral">"Frameset has more than one file with tag: %s"</span>,
+<a name="l01202"></a>01202 tag);
+<a name="l01203"></a>01203
+<a name="l01204"></a>01204 <span class="keywordflow">return</span> cpl_frame_get_filename(frame);
+<a name="l01205"></a>01205
+<a name="l01206"></a>01206 }
+<a name="l01207"></a>01207
+<a name="l01208"></a>01208 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01218"></a>01218 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01219"></a>01219 <span class="keyword">const</span>
+<a name="l01220"></a><a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68">01220</a> cpl_frame * <a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68" title="Find the first frame belonging to the given group.">irplib_frameset_get_first_from_group</a>(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
+<a name="l01221"></a>01221 cpl_frame_group group)
+<a name="l01222"></a>01222 {
+<a name="l01223"></a>01223 <span class="keyword">const</span> cpl_frame * frame;
+<a name="l01224"></a>01224
+<a name="l01225"></a>01225 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, NULL);
+<a name="l01226"></a>01226
+<a name="l01227"></a>01227 <span class="keywordflow">for</span> (frame = cpl_frameset_get_first_const(<span class="keyword">self</span>); frame != NULL ;
+<a name="l01228"></a>01228 frame = cpl_frameset_get_next_const(<span class="keyword">self</span>)) {
+<a name="l01229"></a>01229 <span class="keywordflow">if</span> (cpl_frame_get_group(frame) == group) <span class="keywordflow">break</span>;
+<a name="l01230"></a>01230 }
+<a name="l01231"></a>01231 <span class="keywordflow">return</span> frame;
+<a name="l01232"></a>01232 }
+<a name="l01233"></a>01233
+<a name="l01234"></a>01234 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01253"></a>01253 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01254"></a><a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1">01254</a> cpl_error_code <a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1" title="Find the aperture(s) with the greatest flux.">irplib_apertures_find_max_flux</a>(<span class="keyword">const</span> cpl_apertures * <span class="keyword">self</span>,
+<a name="l01255"></a>01255 <span class="keywordtype">int</span> * ind, <span class="keywordtype">int</span> nfind)
+<a name="l01256"></a>01256 {
+<a name="l01257"></a>01257 <span class="keyword">const</span> <span class="keywordtype">int</span> nsize = cpl_apertures_get_size(<span class="keyword">self</span>);
+<a name="l01258"></a>01258 <span class="keywordtype">int</span> ifind;
<a name="l01259"></a>01259
-<a name="l01260"></a>01260 cpl_ensure_code(nsize > 0, cpl_error_get_code());
-<a name="l01261"></a>01261 cpl_ensure_code(ind, CPL_ERROR_NULL_INPUT);
-<a name="l01262"></a>01262 cpl_ensure_code(nfind > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01263"></a>01263 cpl_ensure_code(nfind <= nsize, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01264"></a>01264
-<a name="l01265"></a>01265 <span class="keywordflow">for</span> (ifind=0; ifind < nfind; ifind++) {
-<a name="l01266"></a>01266 <span class="keywordtype">double</span> maxflux = -1;
-<a name="l01267"></a>01267 <span class="keywordtype">int</span> maxind = -1;
-<a name="l01268"></a>01268 <span class="keywordtype">int</span> i;
-<a name="l01269"></a>01269 <span class="keywordflow">for</span> (i=1; i <= nsize; i++) {
-<a name="l01270"></a>01270 <span class="keywordtype">int</span> k;
-<a name="l01271"></a>01271
-<a name="l01272"></a>01272 <span class="comment">/* The flux has to be the highest among those not already found */</span>
-<a name="l01273"></a>01273 <span class="keywordflow">for</span> (k=0; k < ifind; k++) <span class="keywordflow">if</span> (ind[k] == i) <span class="keywordflow">break</span>;
-<a name="l01274"></a>01274
-<a name="l01275"></a>01275 <span class="keywordflow">if</span> (k == ifind) {
-<a name="l01276"></a>01276 <span class="comment">/* i has not been inserted into ind */</span>
-<a name="l01277"></a>01277 <span class="keyword">const</span> <span class="keywordtype">double</span> flux = cpl_apertures_get_flux(<span class="keyword">self</span>, i);
-<a name="l01278"></a>01278
-<a name="l01279"></a>01279 <span class="keywordflow">if</span> (maxind < 0 || flux > maxflux) {
-<a name="l01280"></a>01280 maxind = i;
-<a name="l01281"></a>01281 maxflux = flux;
-<a name="l01282"></a>01282 }
-<a name="l01283"></a>01283 }
-<a name="l01284"></a>01284 }
-<a name="l01285"></a>01285 ind[ifind] = maxind;
-<a name="l01286"></a>01286 }
-<a name="l01287"></a>01287
-<a name="l01288"></a>01288 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01289"></a>01289
-<a name="l01290"></a>01290 }
-<a name="l01291"></a>01291
-<a name="l01292"></a>01292 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01296"></a>01296 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01297"></a><a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f">01297</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f" title="portable isinf">irplib_isinf</a>(<span class="keywordtype">double</span> value)
-<a name="l01298"></a>01298 {
-<a name="l01299"></a>01299 <span class="preprocessor">#if defined HAVE_ISINF && HAVE_ISINF</span>
-<a name="l01300"></a>01300 <span class="preprocessor"></span> <span class="keywordflow">return</span> isinf(value);
-<a name="l01301"></a>01301 <span class="preprocessor">#else</span>
-<a name="l01302"></a>01302 <span class="preprocessor"></span> <span class="keywordflow">return</span> value != 0 && value == 2 * value;
-<a name="l01303"></a>01303 <span class="preprocessor">#endif</span>
-<a name="l01304"></a>01304 <span class="preprocessor"></span>}
-<a name="l01305"></a>01305
-<a name="l01306"></a>01306 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01310"></a>01310 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01311"></a><a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4">01311</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(<span class="keywordtype">double</span> value)
-<a name="l01312"></a>01312 {
-<a name="l01313"></a>01313 <span class="preprocessor">#if defined HAVE_ISNAN && HAVE_ISNAN</span>
-<a name="l01314"></a>01314 <span class="preprocessor"></span> <span class="keywordflow">return</span> isnan(value);
-<a name="l01315"></a>01315 <span class="preprocessor">#else</span>
-<a name="l01316"></a>01316 <span class="preprocessor"></span> <span class="keywordflow">return</span> value != value;
-<a name="l01317"></a>01317 <span class="preprocessor">#endif</span>
-<a name="l01318"></a>01318 <span class="preprocessor"></span>}
-<a name="l01319"></a>01319
+<a name="l01260"></a>01260
+<a name="l01261"></a>01261 cpl_ensure_code(nsize > 0, cpl_error_get_code());
+<a name="l01262"></a>01262 cpl_ensure_code(ind, CPL_ERROR_NULL_INPUT);
+<a name="l01263"></a>01263 cpl_ensure_code(nfind > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01264"></a>01264 cpl_ensure_code(nfind <= nsize, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01265"></a>01265
+<a name="l01266"></a>01266 <span class="keywordflow">for</span> (ifind=0; ifind < nfind; ifind++) {
+<a name="l01267"></a>01267 <span class="keywordtype">double</span> maxflux = -1;
+<a name="l01268"></a>01268 <span class="keywordtype">int</span> maxind = -1;
+<a name="l01269"></a>01269 <span class="keywordtype">int</span> i;
+<a name="l01270"></a>01270 <span class="keywordflow">for</span> (i=1; i <= nsize; i++) {
+<a name="l01271"></a>01271 <span class="keywordtype">int</span> k;
+<a name="l01272"></a>01272
+<a name="l01273"></a>01273 <span class="comment">/* The flux has to be the highest among those not already found */</span>
+<a name="l01274"></a>01274 <span class="keywordflow">for</span> (k=0; k < ifind; k++) <span class="keywordflow">if</span> (ind[k] == i) <span class="keywordflow">break</span>;
+<a name="l01275"></a>01275
+<a name="l01276"></a>01276 <span class="keywordflow">if</span> (k == ifind) {
+<a name="l01277"></a>01277 <span class="comment">/* i has not been inserted into ind */</span>
+<a name="l01278"></a>01278 <span class="keyword">const</span> <span class="keywordtype">double</span> flux = cpl_apertures_get_flux(<span class="keyword">self</span>, i);
+<a name="l01279"></a>01279
+<a name="l01280"></a>01280 <span class="keywordflow">if</span> (maxind < 0 || flux > maxflux) {
+<a name="l01281"></a>01281 maxind = i;
+<a name="l01282"></a>01282 maxflux = flux;
+<a name="l01283"></a>01283 }
+<a name="l01284"></a>01284 }
+<a name="l01285"></a>01285 }
+<a name="l01286"></a>01286 ind[ifind] = maxind;
+<a name="l01287"></a>01287 }
+<a name="l01288"></a>01288
+<a name="l01289"></a>01289 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01290"></a>01290
+<a name="l01291"></a>01291 }
+<a name="l01292"></a>01292
+<a name="l01293"></a>01293 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01297"></a>01297 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01298"></a><a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f">01298</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f" title="portable isinf">irplib_isinf</a>(<span class="keywordtype">double</span> value)
+<a name="l01299"></a>01299 {
+<a name="l01300"></a>01300 <span class="preprocessor">#if defined HAVE_ISINF && HAVE_ISINF</span>
+<a name="l01301"></a>01301 <span class="preprocessor"></span> <span class="keywordflow">return</span> isinf(value);
+<a name="l01302"></a>01302 <span class="preprocessor">#else</span>
+<a name="l01303"></a>01303 <span class="preprocessor"></span> <span class="keywordflow">return</span> value != 0 && value == 2 * value;
+<a name="l01304"></a>01304 <span class="preprocessor">#endif</span>
+<a name="l01305"></a>01305 <span class="preprocessor"></span>}
+<a name="l01306"></a>01306
+<a name="l01307"></a>01307 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01311"></a>01311 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01312"></a><a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4">01312</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(<span class="keywordtype">double</span> value)
+<a name="l01313"></a>01313 {
+<a name="l01314"></a>01314 <span class="preprocessor">#if defined HAVE_ISNAN && HAVE_ISNAN</span>
+<a name="l01315"></a>01315 <span class="preprocessor"></span> <span class="keywordflow">return</span> isnan(value);
+<a name="l01316"></a>01316 <span class="preprocessor">#else</span>
+<a name="l01317"></a>01317 <span class="preprocessor"></span> <span class="keywordflow">return</span> value != value;
+<a name="l01318"></a>01318 <span class="preprocessor">#endif</span>
+<a name="l01319"></a>01319 <span class="preprocessor"></span>}
<a name="l01320"></a>01320
-<a name="l01321"></a>01321
-<a name="l01322"></a>01322 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01333"></a>01333 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01334"></a><a class="code" href="group__irplib__utils.html#ga2dda571b0bbb3f7bf170210b38f95627">01334</a> <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga2dda571b0bbb3f7bf170210b38f95627" title="Dump a single CPL error.">irplib_errorstate_warning</a>(<span class="keywordtype">unsigned</span> <span class="keyword">self</span>, <span class="keywordtype">unsigned</span> first, <span class="keywordtype">unsigned</span> last)
-<a name="l01335"></a>01335 {
-<a name="l01336"></a>01336
-<a name="l01337"></a>01337 <span class="keyword">const</span> cpl_boolean is_reverse = first > last ? CPL_TRUE : CPL_FALSE;
-<a name="l01338"></a>01338 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> newest = is_reverse ? first : last;
-<a name="l01339"></a>01339 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> oldest = is_reverse ? last : first;
-<a name="l01340"></a>01340 <span class="keyword">const</span> <span class="keywordtype">char</span> * revmsg = is_reverse ? <span class="stringliteral">" in reverse order"</span> : <span class="stringliteral">""</span>;
-<a name="l01341"></a>01341
+<a name="l01325"></a>01325 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01336"></a>01336 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01337"></a>01337 <span class="keyword">inline</span> <span class="keyword">static</span>
+<a name="l01338"></a>01338 <span class="keywordtype">double</span> irplib_data_get_double(<span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">self</span>, cpl_type type, <span class="keywordtype">int</span> i)
+<a name="l01339"></a>01339 {
+<a name="l01340"></a>01340
+<a name="l01341"></a>01341 <span class="keywordtype">double</span> value;
<a name="l01342"></a>01342
-<a name="l01343"></a>01343 assert( oldest <= <span class="keyword">self</span> );
-<a name="l01344"></a>01344 assert( newest >= <span class="keyword">self</span> );
-<a name="l01345"></a>01345
-<a name="l01346"></a>01346 <span class="keywordflow">if</span> (newest == 0) {
-<a name="l01347"></a>01347 cpl_msg_info(cpl_func, <span class="stringliteral">"No error(s) to dump"</span>);
-<a name="l01348"></a>01348 assert( oldest == 0);
-<a name="l01349"></a>01349 } <span class="keywordflow">else</span> {
-<a name="l01350"></a>01350 assert( oldest > 0);
-<a name="l01351"></a>01351 assert( newest >= oldest);
-<a name="l01352"></a>01352 <span class="keywordflow">if</span> (<span class="keyword">self</span> == first) {
-<a name="l01353"></a>01353 <span class="keywordflow">if</span> (oldest == 1) {
-<a name="l01354"></a>01354 cpl_msg_warning(cpl_func, <span class="stringliteral">"Dumping all %u error(s)%s:"</span>, newest,
-<a name="l01355"></a>01355 revmsg);
-<a name="l01356"></a>01356 } <span class="keywordflow">else</span> {
-<a name="l01357"></a>01357 cpl_msg_warning(cpl_func, <span class="stringliteral">"Dumping the %u most recent error(s) "</span>
-<a name="l01358"></a>01358 <span class="stringliteral">"out of a total of %u errors%s:"</span>,
-<a name="l01359"></a>01359 newest - oldest + 1, newest, revmsg);
-<a name="l01360"></a>01360 }
-<a name="l01361"></a>01361 cpl_msg_indent_more();
+<a name="l01343"></a>01343
+<a name="l01344"></a>01344 <span class="keywordflow">switch</span> (type) {
+<a name="l01345"></a>01345 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
+<a name="l01346"></a>01346 {
+<a name="l01347"></a>01347 <span class="keyword">const</span> <span class="keywordtype">float</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">float</span>*)<span class="keyword">self</span>;
+<a name="l01348"></a>01348 value = (double)pself[i];
+<a name="l01349"></a>01349 <span class="keywordflow">break</span>;
+<a name="l01350"></a>01350 }
+<a name="l01351"></a>01351 <span class="keywordflow">case</span> CPL_TYPE_INT:
+<a name="l01352"></a>01352 {
+<a name="l01353"></a>01353 <span class="keyword">const</span> <span class="keywordtype">int</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">int</span>*)<span class="keyword">self</span>;
+<a name="l01354"></a>01354 value = (double)pself[i];
+<a name="l01355"></a>01355 <span class="keywordflow">break</span>;
+<a name="l01356"></a>01356 }
+<a name="l01357"></a>01357 <span class="keywordflow">default</span>: <span class="comment">/* case CPL_TYPE_DOUBLE */</span>
+<a name="l01358"></a>01358 {
+<a name="l01359"></a>01359 <span class="keyword">const</span> <span class="keywordtype">double</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">double</span>*)<span class="keyword">self</span>;
+<a name="l01360"></a>01360 value = pself[i];
+<a name="l01361"></a>01361 <span class="keywordflow">break</span>;
<a name="l01362"></a>01362 }
-<a name="l01363"></a>01363
-<a name="l01364"></a>01364 cpl_msg_warning(cpl_func, <span class="stringliteral">"[%u/%u] '%s' (%u) at %s"</span>, <span class="keyword">self</span>, newest,
-<a name="l01365"></a>01365 cpl_error_get_message(), cpl_error_get_code(),
-<a name="l01366"></a>01366 cpl_error_get_where());
-<a name="l01367"></a>01367
-<a name="l01368"></a>01368 <span class="keywordflow">if</span> (<span class="keyword">self</span> == last) cpl_msg_indent_less();
-<a name="l01369"></a>01369 }
-<a name="l01370"></a>01370 }
-<a name="l01371"></a>01371
-<a name="l01372"></a>01372
-<a name="l01377"></a>01377 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01388"></a>01388 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01389"></a>01389 <span class="keyword">inline</span> <span class="keyword">static</span>
-<a name="l01390"></a>01390 <span class="keywordtype">double</span> irplib_data_get_double(<span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">self</span>, cpl_type type, <span class="keywordtype">int</span> i)
-<a name="l01391"></a>01391 {
-<a name="l01392"></a>01392
-<a name="l01393"></a>01393 <span class="keywordtype">double</span> value;
-<a name="l01394"></a>01394
-<a name="l01395"></a>01395
-<a name="l01396"></a>01396 <span class="keywordflow">switch</span> (type) {
-<a name="l01397"></a>01397 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
-<a name="l01398"></a>01398 {
-<a name="l01399"></a>01399 <span class="keyword">const</span> <span class="keywordtype">float</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">float</span>*)<span class="keyword">self</span>;
-<a name="l01400"></a>01400 value = (double)pself[i];
-<a name="l01401"></a>01401 <span class="keywordflow">break</span>;
-<a name="l01402"></a>01402 }
-<a name="l01403"></a>01403 <span class="keywordflow">case</span> CPL_TYPE_INT:
-<a name="l01404"></a>01404 {
-<a name="l01405"></a>01405 <span class="keyword">const</span> <span class="keywordtype">int</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">int</span>*)<span class="keyword">self</span>;
-<a name="l01406"></a>01406 value = (double)pself[i];
-<a name="l01407"></a>01407 <span class="keywordflow">break</span>;
-<a name="l01408"></a>01408 }
-<a name="l01409"></a>01409 <span class="keywordflow">default</span>: <span class="comment">/* case CPL_TYPE_DOUBLE */</span>
-<a name="l01410"></a>01410 {
-<a name="l01411"></a>01411 <span class="keyword">const</span> <span class="keywordtype">double</span> * pself = (<span class="keyword">const</span> <span class="keywordtype">double</span>*)<span class="keyword">self</span>;
-<a name="l01412"></a>01412 value = pself[i];
-<a name="l01413"></a>01413 <span class="keywordflow">break</span>;
-<a name="l01414"></a>01414 }
-<a name="l01415"></a>01415 }
-<a name="l01416"></a>01416
-<a name="l01417"></a>01417 <span class="keywordflow">return</span> value;
-<a name="l01418"></a>01418
-<a name="l01419"></a>01419 }
-<a name="l01420"></a>01420
-<a name="l01421"></a>01421
-<a name="l01422"></a>01422 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01433"></a>01433 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01434"></a>01434 <span class="keyword">inline</span> <span class="keyword">static</span>
-<a name="l01435"></a>01435 <span class="keywordtype">void</span> irplib_data_set_double(<span class="keywordtype">void</span> * <span class="keyword">self</span>, cpl_type type, <span class="keywordtype">int</span> i, <span class="keywordtype">double</span> value)
-<a name="l01436"></a>01436 {
-<a name="l01437"></a>01437
-<a name="l01438"></a>01438 <span class="keywordflow">switch</span> (type) {
-<a name="l01439"></a>01439 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
-<a name="l01440"></a>01440 {
-<a name="l01441"></a>01441 <span class="keywordtype">float</span> * pself = (<span class="keywordtype">float</span>*)<span class="keyword">self</span>;
-<a name="l01442"></a>01442 pself[i] = (float)value;
-<a name="l01443"></a>01443 <span class="keywordflow">break</span>;
-<a name="l01444"></a>01444 }
-<a name="l01445"></a>01445 <span class="keywordflow">case</span> CPL_TYPE_INT:
-<a name="l01446"></a>01446 {
-<a name="l01447"></a>01447 <span class="keywordtype">int</span> * pself = (<span class="keywordtype">int</span>*)<span class="keyword">self</span>;
-<a name="l01448"></a>01448 pself[i] = (int)value;
-<a name="l01449"></a>01449 <span class="keywordflow">break</span>;
-<a name="l01450"></a>01450 }
-<a name="l01451"></a>01451 <span class="keywordflow">default</span>: <span class="comment">/* case CPL_TYPE_DOUBLE */</span>
-<a name="l01452"></a>01452 {
-<a name="l01453"></a>01453 <span class="keywordtype">double</span> * pself = (<span class="keywordtype">double</span>*)<span class="keyword">self</span>;
-<a name="l01454"></a>01454 pself[i] = value;
-<a name="l01455"></a>01455 <span class="keywordflow">break</span>;
-<a name="l01456"></a>01456 }
-<a name="l01457"></a>01457 }
-<a name="l01458"></a>01458 }
-<a name="l01459"></a>01459
-<a name="l01460"></a>01460
-<a name="l01461"></a>01461
+<a name="l01363"></a>01363 }
+<a name="l01364"></a>01364
+<a name="l01365"></a>01365 <span class="keywordflow">return</span> value;
+<a name="l01366"></a>01366
+<a name="l01367"></a>01367 }
+<a name="l01368"></a>01368
+<a name="l01369"></a>01369
+<a name="l01370"></a>01370 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01381"></a>01381 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01382"></a>01382 <span class="keyword">inline</span> <span class="keyword">static</span>
+<a name="l01383"></a>01383 <span class="keywordtype">void</span> irplib_data_set_double(<span class="keywordtype">void</span> * <span class="keyword">self</span>, cpl_type type, <span class="keywordtype">int</span> i, <span class="keywordtype">double</span> value)
+<a name="l01384"></a>01384 {
+<a name="l01385"></a>01385
+<a name="l01386"></a>01386 <span class="keywordflow">switch</span> (type) {
+<a name="l01387"></a>01387 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
+<a name="l01388"></a>01388 {
+<a name="l01389"></a>01389 <span class="keywordtype">float</span> * pself = (<span class="keywordtype">float</span>*)<span class="keyword">self</span>;
+<a name="l01390"></a>01390 pself[i] = (float)value;
+<a name="l01391"></a>01391 <span class="keywordflow">break</span>;
+<a name="l01392"></a>01392 }
+<a name="l01393"></a>01393 <span class="keywordflow">case</span> CPL_TYPE_INT:
+<a name="l01394"></a>01394 {
+<a name="l01395"></a>01395 <span class="keywordtype">int</span> * pself = (<span class="keywordtype">int</span>*)<span class="keyword">self</span>;
+<a name="l01396"></a>01396 pself[i] = (int)value;
+<a name="l01397"></a>01397 <span class="keywordflow">break</span>;
+<a name="l01398"></a>01398 }
+<a name="l01399"></a>01399 <span class="keywordflow">default</span>: <span class="comment">/* case CPL_TYPE_DOUBLE */</span>
+<a name="l01400"></a>01400 {
+<a name="l01401"></a>01401 <span class="keywordtype">double</span> * pself = (<span class="keywordtype">double</span>*)<span class="keyword">self</span>;
+<a name="l01402"></a>01402 pself[i] = value;
+<a name="l01403"></a>01403 <span class="keywordflow">break</span>;
+<a name="l01404"></a>01404 }
+<a name="l01405"></a>01405 }
+<a name="l01406"></a>01406 }
+<a name="l01407"></a>01407
+<a name="l01408"></a>01408
+<a name="l01409"></a>01409
+<a name="l01410"></a>01410
+<a name="l01411"></a>01411
+<a name="l01412"></a>01412 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01423"></a>01423 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01424"></a>01424 <span class="keyword">static</span>
+<a name="l01425"></a>01425 <span class="keywordtype">void</span> irplib_errorstate_dump_one_level(<span class="keywordtype">void</span> (*messenger)(<span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l01426"></a>01426 <span class="keyword">const</span> <span class="keywordtype">char</span> *, ...),
+<a name="l01427"></a>01427 <span class="keywordtype">unsigned</span> <span class="keyword">self</span>, <span class="keywordtype">unsigned</span> first,
+<a name="l01428"></a>01428 <span class="keywordtype">unsigned</span> last)
+<a name="l01429"></a>01429 {
+<a name="l01430"></a>01430
+<a name="l01431"></a>01431 <span class="keyword">const</span> cpl_boolean is_reverse = first > last ? CPL_TRUE : CPL_FALSE;
+<a name="l01432"></a>01432 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> newest = is_reverse ? first : last;
+<a name="l01433"></a>01433 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> oldest = is_reverse ? last : first;
+<a name="l01434"></a>01434 <span class="keyword">const</span> <span class="keywordtype">char</span> * revmsg = is_reverse ? <span class="stringliteral">" in reverse order"</span> : <span class="stringliteral">""</span>;
+<a name="l01435"></a>01435
+<a name="l01436"></a>01436
+<a name="l01437"></a>01437 <span class="comment">/*</span>
+<a name="l01438"></a>01438 <span class="comment"> cx_assert( messenger != NULL );</span>
+<a name="l01439"></a>01439 <span class="comment"> cx_assert( oldest <= self );</span>
+<a name="l01440"></a>01440 <span class="comment"> cx_assert( newest >= self );</span>
+<a name="l01441"></a>01441 <span class="comment"> */</span>
+<a name="l01442"></a>01442
+<a name="l01443"></a>01443 <span class="keywordflow">if</span> (newest == 0) {
+<a name="l01444"></a>01444 messenger(cpl_func, <span class="stringliteral">"No error(s) to dump"</span>);
+<a name="l01445"></a>01445 <span class="comment">/* cx_assert( oldest == 0); */</span>
+<a name="l01446"></a>01446 } <span class="keywordflow">else</span> {
+<a name="l01447"></a>01447 <span class="comment">/*</span>
+<a name="l01448"></a>01448 <span class="comment"> cx_assert( oldest > 0);</span>
+<a name="l01449"></a>01449 <span class="comment"> cx_assert( newest >= oldest);</span>
+<a name="l01450"></a>01450 <span class="comment"> */</span>
+<a name="l01451"></a>01451 <span class="keywordflow">if</span> (<span class="keyword">self</span> == first) {
+<a name="l01452"></a>01452 <span class="keywordflow">if</span> (oldest == 1) {
+<a name="l01453"></a>01453 messenger(cpl_func, <span class="stringliteral">"Dumping all %u error(s)%s:"</span>, newest,
+<a name="l01454"></a>01454 revmsg);
+<a name="l01455"></a>01455 } <span class="keywordflow">else</span> {
+<a name="l01456"></a>01456 messenger(cpl_func, <span class="stringliteral">"Dumping the %u most recent error(s) "</span>
+<a name="l01457"></a>01457 <span class="stringliteral">"out of a total of %u errors%s:"</span>,
+<a name="l01458"></a>01458 newest - oldest + 1, newest, revmsg);
+<a name="l01459"></a>01459 }
+<a name="l01460"></a>01460 cpl_msg_indent_more();
+<a name="l01461"></a>01461 }
<a name="l01462"></a>01462
-<a name="l01463"></a>01463
-<a name="l01464"></a>01464 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01475"></a>01475 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01476"></a>01476 <span class="keyword">static</span>
-<a name="l01477"></a>01477 <span class="keywordtype">void</span> irplib_errorstate_dump_one_level(<span class="keywordtype">void</span> (*messenger)(<span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l01478"></a>01478 <span class="keyword">const</span> <span class="keywordtype">char</span> *, ...),
-<a name="l01479"></a>01479 <span class="keywordtype">unsigned</span> <span class="keyword">self</span>, <span class="keywordtype">unsigned</span> first,
-<a name="l01480"></a>01480 <span class="keywordtype">unsigned</span> last)
-<a name="l01481"></a>01481 {
-<a name="l01482"></a>01482
-<a name="l01483"></a>01483 <span class="keyword">const</span> cpl_boolean is_reverse = first > last ? CPL_TRUE : CPL_FALSE;
-<a name="l01484"></a>01484 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> newest = is_reverse ? first : last;
-<a name="l01485"></a>01485 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> oldest = is_reverse ? last : first;
-<a name="l01486"></a>01486 <span class="keyword">const</span> <span class="keywordtype">char</span> * revmsg = is_reverse ? <span class="stringliteral">" in reverse order"</span> : <span class="stringliteral">""</span>;
+<a name="l01463"></a>01463 messenger(cpl_func, <span class="stringliteral">"[%u/%u] '%s' (%u) at %s"</span>, <span class="keyword">self</span>, newest,
+<a name="l01464"></a>01464 cpl_error_get_message(), cpl_error_get_code(),
+<a name="l01465"></a>01465 cpl_error_get_where());
+<a name="l01466"></a>01466
+<a name="l01467"></a>01467 <span class="keywordflow">if</span> (<span class="keyword">self</span> == last) cpl_msg_indent_less();
+<a name="l01468"></a>01468 }
+<a name="l01469"></a>01469 }
+<a name="l01470"></a>01470
+<a name="l01471"></a>01471 cpl_polynomial * irplib_polynomial_fit_1d_create_chiq(
+<a name="l01472"></a>01472 <span class="keyword">const</span> cpl_vector * x_pos,
+<a name="l01473"></a>01473 <span class="keyword">const</span> cpl_vector * values,
+<a name="l01474"></a>01474 <span class="keywordtype">int</span> degree,
+<a name="l01475"></a>01475 <span class="keywordtype">double</span> * rechisq
+<a name="l01476"></a>01476 )
+<a name="l01477"></a>01477 {
+<a name="l01478"></a>01478 <span class="keywordflow">return</span> irplib_polynomial_fit_1d_create_common(x_pos, values, degree, NULL, rechisq);
+<a name="l01479"></a>01479 }
+<a name="l01480"></a>01480 cpl_polynomial * irplib_polynomial_fit_1d_create(
+<a name="l01481"></a>01481 <span class="keyword">const</span> cpl_vector * x_pos,
+<a name="l01482"></a>01482 <span class="keyword">const</span> cpl_vector * values,
+<a name="l01483"></a>01483 <span class="keywordtype">int</span> degree,
+<a name="l01484"></a>01484 <span class="keywordtype">double</span> * mse
+<a name="l01485"></a>01485 )
+<a name="l01486"></a>01486 {
<a name="l01487"></a>01487
-<a name="l01488"></a>01488
-<a name="l01489"></a>01489 <span class="comment">/*</span>
-<a name="l01490"></a>01490 <span class="comment"> cx_assert( messenger != NULL );</span>
-<a name="l01491"></a>01491 <span class="comment"> cx_assert( oldest <= self );</span>
-<a name="l01492"></a>01492 <span class="comment"> cx_assert( newest >= self );</span>
-<a name="l01493"></a>01493 <span class="comment"> */</span>
-<a name="l01494"></a>01494
-<a name="l01495"></a>01495 <span class="keywordflow">if</span> (newest == 0) {
-<a name="l01496"></a>01496 messenger(cpl_func, <span class="stringliteral">"No error(s) to dump"</span>);
-<a name="l01497"></a>01497 <span class="comment">/* cx_assert( oldest == 0); */</span>
-<a name="l01498"></a>01498 } <span class="keywordflow">else</span> {
-<a name="l01499"></a>01499 <span class="comment">/*</span>
-<a name="l01500"></a>01500 <span class="comment"> cx_assert( oldest > 0);</span>
-<a name="l01501"></a>01501 <span class="comment"> cx_assert( newest >= oldest);</span>
-<a name="l01502"></a>01502 <span class="comment"> */</span>
-<a name="l01503"></a>01503 <span class="keywordflow">if</span> (<span class="keyword">self</span> == first) {
-<a name="l01504"></a>01504 <span class="keywordflow">if</span> (oldest == 1) {
-<a name="l01505"></a>01505 messenger(cpl_func, <span class="stringliteral">"Dumping all %u error(s)%s:"</span>, newest,
-<a name="l01506"></a>01506 revmsg);
-<a name="l01507"></a>01507 } <span class="keywordflow">else</span> {
-<a name="l01508"></a>01508 messenger(cpl_func, <span class="stringliteral">"Dumping the %u most recent error(s) "</span>
-<a name="l01509"></a>01509 <span class="stringliteral">"out of a total of %u errors%s:"</span>,
-<a name="l01510"></a>01510 newest - oldest + 1, newest, revmsg);
-<a name="l01511"></a>01511 }
-<a name="l01512"></a>01512 cpl_msg_indent_more();
-<a name="l01513"></a>01513 }
-<a name="l01514"></a>01514
-<a name="l01515"></a>01515 messenger(cpl_func, <span class="stringliteral">"[%u/%u] '%s' (%u) at %s"</span>, <span class="keyword">self</span>, newest,
-<a name="l01516"></a>01516 cpl_error_get_message(), cpl_error_get_code(),
-<a name="l01517"></a>01517 cpl_error_get_where());
-<a name="l01518"></a>01518
-<a name="l01519"></a>01519 <span class="keywordflow">if</span> (<span class="keyword">self</span> == last) cpl_msg_indent_less();
-<a name="l01520"></a>01520 }
-<a name="l01521"></a>01521 }
-<a name="l01522"></a>01522
-<a name="l01523"></a>01523 cpl_polynomial * irplib_polynomial_fit_1d_create_chiq(
-<a name="l01524"></a>01524 <span class="keyword">const</span> cpl_vector * x_pos,
-<a name="l01525"></a>01525 <span class="keyword">const</span> cpl_vector * values,
-<a name="l01526"></a>01526 <span class="keywordtype">int</span> degree,
-<a name="l01527"></a>01527 <span class="keywordtype">double</span> * rechisq
-<a name="l01528"></a>01528 )
-<a name="l01529"></a>01529 {
-<a name="l01530"></a>01530 <span class="keywordflow">return</span> irplib_polynomial_fit_1d_create_common(x_pos, values, degree, NULL, rechisq);
-<a name="l01531"></a>01531 }
-<a name="l01532"></a>01532 cpl_polynomial * irplib_polynomial_fit_1d_create(
-<a name="l01533"></a>01533 <span class="keyword">const</span> cpl_vector * x_pos,
-<a name="l01534"></a>01534 <span class="keyword">const</span> cpl_vector * values,
-<a name="l01535"></a>01535 <span class="keywordtype">int</span> degree,
-<a name="l01536"></a>01536 <span class="keywordtype">double</span> * mse
-<a name="l01537"></a>01537 )
-<a name="l01538"></a>01538 {
-<a name="l01539"></a>01539
-<a name="l01540"></a>01540 <span class="keywordflow">return</span> irplib_polynomial_fit_1d_create_common(x_pos, values, degree, mse, NULL);
-<a name="l01541"></a>01541 }
-<a name="l01542"></a>01542 <span class="keyword">static</span> cpl_polynomial * irplib_polynomial_fit_1d_create_common(
-<a name="l01543"></a>01543 <span class="keyword">const</span> cpl_vector * x_pos,
-<a name="l01544"></a>01544 <span class="keyword">const</span> cpl_vector * values,
-<a name="l01545"></a>01545 <span class="keywordtype">int</span> degree,
-<a name="l01546"></a>01546 <span class="keywordtype">double</span> * mse,
-<a name="l01547"></a>01547 <span class="keywordtype">double</span> * rechisq
-<a name="l01548"></a>01548 )
-<a name="l01549"></a>01549 {
-<a name="l01550"></a>01550 cpl_polynomial * fit1d = NULL;
-<a name="l01551"></a>01551 cpl_size loc_degree = (cpl_size)degree ;
-<a name="l01552"></a>01552 <span class="keywordtype">int</span> x_size = 0;
-<a name="l01553"></a>01553 fit1d = cpl_polynomial_new(1);
-<a name="l01554"></a>01554 x_size = cpl_vector_get_size(x_pos);
-<a name="l01555"></a>01555 <span class="keywordflow">if</span>(fit1d != NULL && x_size > 1)
-<a name="l01556"></a>01556 {
-<a name="l01557"></a>01557 cpl_matrix * samppos = NULL;
-<a name="l01558"></a>01558 cpl_vector * fitresidual = NULL;
-<a name="l01559"></a>01559 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01560"></a>01560 samppos = cpl_matrix_wrap(1, x_size,
-<a name="l01561"></a>01561 (<span class="keywordtype">double</span>*)cpl_vector_get_data_const(x_pos));
-<a name="l01562"></a>01562 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01563"></a>01563 fitresidual = cpl_vector_new(x_size);
-<a name="l01564"></a>01564 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01565"></a>01565 cpl_polynomial_fit(fit1d, samppos, NULL, values, NULL,
-<a name="l01566"></a>01566 CPL_FALSE, NULL, &loc_degree);
-<a name="l01567"></a>01567 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01568"></a>01568 cpl_vector_fill_polynomial_fit_residual(fitresidual, values, NULL, fit1d,
-<a name="l01569"></a>01569 samppos, rechisq);
-<a name="l01570"></a>01570 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
-<a name="l01571"></a>01571 <span class="keywordflow">if</span> (mse)
-<a name="l01572"></a>01572 {
-<a name="l01573"></a>01573 *mse = cpl_vector_product(fitresidual, fitresidual)
-<a name="l01574"></a>01574 / cpl_vector_get_size(fitresidual);
-<a name="l01575"></a>01575 }
-<a name="l01576"></a>01576 cpl_matrix_unwrap(samppos);
-<a name="l01577"></a>01577 cpl_vector_delete(fitresidual);
-<a name="l01578"></a>01578 }
-<a name="l01579"></a>01579 <span class="keywordflow">return</span> fit1d;
-<a name="l01580"></a>01580 }
-<a name="l01581"></a>01581
-<a name="l01582"></a>01582 <span class="keyword">static</span> <span class="keywordtype">void</span> quicksort(<span class="keywordtype">int</span>* iindex, <span class="keywordtype">double</span>* exptime, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> right)
-<a name="l01583"></a>01583 {
-<a name="l01584"></a>01584 <span class="keywordtype">int</span> i = left;
-<a name="l01585"></a>01585 <span class="keywordtype">int</span> j = right;
-<a name="l01586"></a>01586 <span class="keywordtype">int</span> pivot = (i + j) / 2;
-<a name="l01587"></a>01587 <span class="keywordtype">double</span> index_value = exptime[pivot];
-<a name="l01588"></a>01588 <span class="keywordflow">do</span>
-<a name="l01589"></a>01589 {
-<a name="l01590"></a>01590 <span class="keywordflow">while</span>(exptime[i] < index_value) i++;
-<a name="l01591"></a>01591 <span class="keywordflow">while</span>(exptime[j] > index_value) j--;
-<a name="l01592"></a>01592 <span class="keywordflow">if</span> (i <= j)
-<a name="l01593"></a>01593 {
-<a name="l01594"></a>01594 <span class="keywordflow">if</span>(i < j)
-<a name="l01595"></a>01595 {
-<a name="l01596"></a>01596 <span class="keywordtype">int</span> tmp = iindex[i];
-<a name="l01597"></a>01597 <span class="keywordtype">double</span> dtmp = exptime[i];
-<a name="l01598"></a>01598 iindex[i]=iindex[j];
-<a name="l01599"></a>01599 iindex[j]=tmp;
-<a name="l01600"></a>01600 exptime[i] = exptime[j];
-<a name="l01601"></a>01601 exptime[j] = dtmp;
-<a name="l01602"></a>01602 }
-<a name="l01603"></a>01603 i++;
-<a name="l01604"></a>01604 j--;
-<a name="l01605"></a>01605 }
-<a name="l01606"></a>01606 } <span class="keywordflow">while</span> (i <= j);
-<a name="l01607"></a>01607
-<a name="l01608"></a>01608 <span class="keywordflow">if</span> (i < right)
-<a name="l01609"></a>01609 {
-<a name="l01610"></a>01610 quicksort(iindex, exptime, i, right);
-<a name="l01611"></a>01611 }
-<a name="l01612"></a>01612 <span class="keywordflow">if</span> (left < j)
-<a name="l01613"></a>01613 {
-<a name="l01614"></a>01614 quicksort(iindex, exptime,left, j);
-<a name="l01615"></a>01615 }
-<a name="l01616"></a>01616 }
-<a name="l01617"></a>01617 cpl_error_code irplib_frameset_sort(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>, <span class="keywordtype">int</span>* iindex, <span class="keywordtype">double</span>* exptime)
-<a name="l01618"></a>01618 {
-<a name="l01619"></a>01619 <span class="keywordtype">int</span> sz = 0;
-<a name="l01620"></a>01620 <span class="keywordtype">int</span> i = 0;
-<a name="l01621"></a>01621 <span class="keyword">const</span> cpl_frame* tmp_frame = 0;
-<a name="l01622"></a>01622 cpl_error_code error = CPL_ERROR_NONE;
-<a name="l01623"></a>01623 sz = cpl_frameset_get_size(<span class="keyword">self</span>);
-<a name="l01624"></a>01624
-<a name="l01625"></a>01625 <span class="comment">/* 1. get an array of frames */</span>
-<a name="l01626"></a>01626 tmp_frame = cpl_frameset_get_first_const(<span class="keyword">self</span>);
-<a name="l01627"></a>01627 <span class="keywordflow">while</span>(tmp_frame)
-<a name="l01628"></a>01628 {
-<a name="l01629"></a>01629 exptime[i] = frame_get_exptime(tmp_frame);
-<a name="l01630"></a>01630 iindex[i] = i;
-<a name="l01631"></a>01631 tmp_frame = cpl_frameset_get_next_const(<span class="keyword">self</span>);
-<a name="l01632"></a>01632 i++;
-<a name="l01633"></a>01633 }
-<a name="l01634"></a>01634 <span class="comment">/* 2.sort */</span>
-<a name="l01635"></a>01635 quicksort(iindex, exptime, 0, sz - 1);
-<a name="l01636"></a>01636
-<a name="l01637"></a>01637 <span class="keywordflow">return</span> error;
-<a name="l01638"></a>01638 }
-<a name="l01639"></a>01639
-<a name="l01640"></a>01640 <span class="keyword">static</span> <span class="keywordtype">double</span> frame_get_exptime(<span class="keyword">const</span> cpl_frame * pframe)
-<a name="l01641"></a>01641 {
-<a name="l01642"></a>01642 cpl_propertylist *plist = 0;
-<a name="l01643"></a>01643 <span class="keywordtype">double</span> dval = 0;
-<a name="l01644"></a>01644
-<a name="l01645"></a>01645 plist = cpl_propertylist_load(cpl_frame_get_filename(pframe),0);
-<a name="l01646"></a>01646 <span class="keywordflow">if</span>(plist)
-<a name="l01647"></a>01647 {
-<a name="l01648"></a>01648 cpl_error_code err = CPL_ERROR_NONE;
-<a name="l01649"></a>01649 dval = cpl_propertylist_get_double(plist, <span class="stringliteral">"EXPTIME"</span>);
-<a name="l01650"></a>01650 err = cpl_error_get_code();
-<a name="l01651"></a>01651 <span class="keywordflow">if</span> (err != CPL_ERROR_NONE)
-<a name="l01652"></a>01652 {
-<a name="l01653"></a>01653 cpl_msg_error(cpl_func, <span class="stringliteral">"error during reading EXPTIME key from the frame [%s]"</span>, cpl_frame_get_filename(pframe));
-<a name="l01654"></a>01654 }
-<a name="l01655"></a>01655 }
-<a name="l01656"></a>01656 <span class="comment">/* Free and return */</span>
-<a name="l01657"></a>01657 cpl_propertylist_delete(plist);
-<a name="l01658"></a>01658 <span class="keywordflow">return</span> dval;
-<a name="l01659"></a>01659 }
+<a name="l01488"></a>01488 <span class="keywordflow">return</span> irplib_polynomial_fit_1d_create_common(x_pos, values, degree, mse, NULL);
+<a name="l01489"></a>01489 }
+<a name="l01490"></a>01490 <span class="keyword">static</span> cpl_polynomial * irplib_polynomial_fit_1d_create_common(
+<a name="l01491"></a>01491 <span class="keyword">const</span> cpl_vector * x_pos,
+<a name="l01492"></a>01492 <span class="keyword">const</span> cpl_vector * values,
+<a name="l01493"></a>01493 <span class="keywordtype">int</span> degree,
+<a name="l01494"></a>01494 <span class="keywordtype">double</span> * mse,
+<a name="l01495"></a>01495 <span class="keywordtype">double</span> * rechisq
+<a name="l01496"></a>01496 )
+<a name="l01497"></a>01497 {
+<a name="l01498"></a>01498 cpl_polynomial * fit1d = NULL;
+<a name="l01499"></a>01499 cpl_size loc_degree = (cpl_size)degree ;
+<a name="l01500"></a>01500 <span class="keywordtype">int</span> x_size = 0;
+<a name="l01501"></a>01501 fit1d = cpl_polynomial_new(1);
+<a name="l01502"></a>01502 x_size = cpl_vector_get_size(x_pos);
+<a name="l01503"></a>01503 <span class="keywordflow">if</span>(fit1d != NULL && x_size > 1)
+<a name="l01504"></a>01504 {
+<a name="l01505"></a>01505 cpl_matrix * samppos = NULL;
+<a name="l01506"></a>01506 cpl_vector * fitresidual = NULL;
+<a name="l01507"></a>01507 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01508"></a>01508 samppos = cpl_matrix_wrap(1, x_size,
+<a name="l01509"></a>01509 (<span class="keywordtype">double</span>*)cpl_vector_get_data_const(x_pos));
+<a name="l01510"></a>01510 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01511"></a>01511 fitresidual = cpl_vector_new(x_size);
+<a name="l01512"></a>01512 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01513"></a>01513 cpl_polynomial_fit(fit1d, samppos, NULL, values, NULL,
+<a name="l01514"></a>01514 CPL_FALSE, NULL, &loc_degree);
+<a name="l01515"></a>01515 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01516"></a>01516 cpl_vector_fill_polynomial_fit_residual(fitresidual, values, NULL,
+<a name="l01517"></a>01517 fit1d, samppos, rechisq);
+<a name="l01518"></a>01518 cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+<a name="l01519"></a>01519 <span class="keywordflow">if</span> (mse)
+<a name="l01520"></a>01520 {
+<a name="l01521"></a>01521 *mse = cpl_vector_product(fitresidual, fitresidual)
+<a name="l01522"></a>01522 / cpl_vector_get_size(fitresidual);
+<a name="l01523"></a>01523 }
+<a name="l01524"></a>01524 cpl_matrix_unwrap(samppos);
+<a name="l01525"></a>01525 cpl_vector_delete(fitresidual);
+<a name="l01526"></a>01526 }
+<a name="l01527"></a>01527 <span class="keywordflow">return</span> fit1d;
+<a name="l01528"></a>01528 }
+<a name="l01529"></a>01529
+<a name="l01530"></a>01530 <span class="keyword">static</span> <span class="keywordtype">void</span> quicksort(<span class="keywordtype">int</span>* iindex, <span class="keywordtype">double</span>* exptime, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> right)
+<a name="l01531"></a>01531 {
+<a name="l01532"></a>01532 <span class="keywordtype">int</span> i = left;
+<a name="l01533"></a>01533 <span class="keywordtype">int</span> j = right;
+<a name="l01534"></a>01534 <span class="keywordtype">int</span> pivot = (i + j) / 2;
+<a name="l01535"></a>01535 <span class="keywordtype">double</span> index_value = exptime[pivot];
+<a name="l01536"></a>01536 <span class="keywordflow">do</span>
+<a name="l01537"></a>01537 {
+<a name="l01538"></a>01538 <span class="keywordflow">while</span>(exptime[i] < index_value) i++;
+<a name="l01539"></a>01539 <span class="keywordflow">while</span>(exptime[j] > index_value) j--;
+<a name="l01540"></a>01540 <span class="keywordflow">if</span> (i <= j)
+<a name="l01541"></a>01541 {
+<a name="l01542"></a>01542 <span class="keywordflow">if</span>(i < j)
+<a name="l01543"></a>01543 {
+<a name="l01544"></a>01544 <span class="keywordtype">int</span> tmp = iindex[i];
+<a name="l01545"></a>01545 <span class="keywordtype">double</span> dtmp = exptime[i];
+<a name="l01546"></a>01546 iindex[i]=iindex[j];
+<a name="l01547"></a>01547 iindex[j]=tmp;
+<a name="l01548"></a>01548 exptime[i] = exptime[j];
+<a name="l01549"></a>01549 exptime[j] = dtmp;
+<a name="l01550"></a>01550 }
+<a name="l01551"></a>01551 i++;
+<a name="l01552"></a>01552 j--;
+<a name="l01553"></a>01553 }
+<a name="l01554"></a>01554 } <span class="keywordflow">while</span> (i <= j);
+<a name="l01555"></a>01555
+<a name="l01556"></a>01556 <span class="keywordflow">if</span> (i < right)
+<a name="l01557"></a>01557 {
+<a name="l01558"></a>01558 quicksort(iindex, exptime, i, right);
+<a name="l01559"></a>01559 }
+<a name="l01560"></a>01560 <span class="keywordflow">if</span> (left < j)
+<a name="l01561"></a>01561 {
+<a name="l01562"></a>01562 quicksort(iindex, exptime,left, j);
+<a name="l01563"></a>01563 }
+<a name="l01564"></a>01564 }
+<a name="l01565"></a>01565 cpl_error_code irplib_frameset_sort(<span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>, <span class="keywordtype">int</span>* iindex, <span class="keywordtype">double</span>* exptime)
+<a name="l01566"></a>01566 {
+<a name="l01567"></a>01567 <span class="keywordtype">int</span> sz = 0;
+<a name="l01568"></a>01568 <span class="keywordtype">int</span> i = 0;
+<a name="l01569"></a>01569 <span class="keyword">const</span> cpl_frame* tmp_frame = 0;
+<a name="l01570"></a>01570 cpl_error_code error = CPL_ERROR_NONE;
+<a name="l01571"></a>01571 sz = cpl_frameset_get_size(<span class="keyword">self</span>);
+<a name="l01572"></a>01572
+<a name="l01573"></a>01573 <span class="comment">/* 1. get an array of frames */</span>
+<a name="l01574"></a>01574 tmp_frame = cpl_frameset_get_first_const(<span class="keyword">self</span>);
+<a name="l01575"></a>01575 <span class="keywordflow">while</span>(tmp_frame)
+<a name="l01576"></a>01576 {
+<a name="l01577"></a>01577 exptime[i] = frame_get_exptime(tmp_frame);
+<a name="l01578"></a>01578 iindex[i] = i;
+<a name="l01579"></a>01579 tmp_frame = cpl_frameset_get_next_const(<span class="keyword">self</span>);
+<a name="l01580"></a>01580 i++;
+<a name="l01581"></a>01581 }
+<a name="l01582"></a>01582 <span class="comment">/* 2.sort */</span>
+<a name="l01583"></a>01583 quicksort(iindex, exptime, 0, sz - 1);
+<a name="l01584"></a>01584
+<a name="l01585"></a>01585 <span class="keywordflow">return</span> error;
+<a name="l01586"></a>01586 }
+<a name="l01587"></a>01587
+<a name="l01588"></a>01588 <span class="keyword">static</span> <span class="keywordtype">double</span> frame_get_exptime(<span class="keyword">const</span> cpl_frame * pframe)
+<a name="l01589"></a>01589 {
+<a name="l01590"></a>01590 cpl_propertylist *plist = 0;
+<a name="l01591"></a>01591 <span class="keywordtype">double</span> dval = 0;
+<a name="l01592"></a>01592
+<a name="l01593"></a>01593 plist = cpl_propertylist_load(cpl_frame_get_filename(pframe),0);
+<a name="l01594"></a>01594 <span class="keywordflow">if</span>(plist)
+<a name="l01595"></a>01595 {
+<a name="l01596"></a>01596 cpl_error_code err = CPL_ERROR_NONE;
+<a name="l01597"></a>01597 dval = cpl_propertylist_get_double(plist, <span class="stringliteral">"EXPTIME"</span>);
+<a name="l01598"></a>01598 err = cpl_error_get_code();
+<a name="l01599"></a>01599 <span class="keywordflow">if</span> (err != CPL_ERROR_NONE)
+<a name="l01600"></a>01600 {
+<a name="l01601"></a>01601 cpl_msg_error(cpl_func, <span class="stringliteral">"error during reading EXPTIME key from the frame [%s]"</span>, cpl_frame_get_filename(pframe));
+<a name="l01602"></a>01602 }
+<a name="l01603"></a>01603 }
+<a name="l01604"></a>01604 <span class="comment">/* Free and return */</span>
+<a name="l01605"></a>01605 cpl_propertylist_delete(plist);
+<a name="l01606"></a>01606 <span class="keywordflow">return</span> dval;
+<a name="l01607"></a>01607 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__utils_8h_source.html b/html/irplib__utils_8h_source.html
index 4f64c44..92193e8 100644
--- a/html/irplib__utils_8h_source.html
+++ b/html/irplib__utils_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_utils.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_utils.h,v 1.55 2011/06/01 06:47:56 llundin Exp $</span>
+<h1>irplib_utils.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_utils.h,v 1.57 2013/02/27 16:02:02 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the irplib package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,404 +29,426 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/06/01 06:47:56 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.55 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/02/27 16:02:02 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.57 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> * $Log: irplib_utils.h,v $</span>
-<a name="l00027"></a>00027 <span class="comment"> * Revision 1.55 2011/06/01 06:47:56 llundin</span>
-<a name="l00028"></a>00028 <span class="comment"> * skip_if_lt(): Fix previous edits switch of A and B in error message</span>
+<a name="l00027"></a>00027 <span class="comment"> * Revision 1.57 2013/02/27 16:02:02 jtaylor</span>
+<a name="l00028"></a>00028 <span class="comment"> * add diagnostic pragma macros</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
-<a name="l00030"></a>00030 <span class="comment"> * Revision 1.54 2011/05/26 08:08:56 llundin</span>
-<a name="l00031"></a>00031 <span class="comment"> * skip_if_lt(): Support printf-style error message, name-space protect temporary variables</span>
+<a name="l00030"></a>00030 <span class="comment"> * Revision 1.56 2012/08/06 06:14:18 llundin</span>
+<a name="l00031"></a>00031 <span class="comment"> * irplib_errorstate_warning(): Replaced by cpl_errorstate_dump_one_warning() from CPL 6.X</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
-<a name="l00033"></a>00033 <span class="comment"> * Revision 1.53 2011/05/09 07:51:18 llundin</span>
-<a name="l00034"></a>00034 <span class="comment"> * irplib_dfs_save_image_(): Modified from cpl_dfs_save_image(). irplib_dfs_save_image(): Use irplib_dfs_save_image_()</span>
+<a name="l00033"></a>00033 <span class="comment"> * Revision 1.55 2011/06/01 06:47:56 llundin</span>
+<a name="l00034"></a>00034 <span class="comment"> * skip_if_lt(): Fix previous edits switch of A and B in error message</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
-<a name="l00036"></a>00036 <span class="comment"> * Revision 1.52 2010/03/23 07:57:59 kmirny</span>
-<a name="l00037"></a>00037 <span class="comment"> * DFS08552, Documentation for irplib_frameset_sort</span>
+<a name="l00036"></a>00036 <span class="comment"> * Revision 1.54 2011/05/26 08:08:56 llundin</span>
+<a name="l00037"></a>00037 <span class="comment"> * skip_if_lt(): Support printf-style error message, name-space protect temporary variables</span>
<a name="l00038"></a>00038 <span class="comment"> *</span>
-<a name="l00039"></a>00039 <span class="comment"> * Revision 1.51 2009/12/16 14:59:30 cgarcia</span>
-<a name="l00040"></a>00040 <span class="comment"> * Avoid name clash with index function</span>
+<a name="l00039"></a>00039 <span class="comment"> * Revision 1.53 2011/05/09 07:51:18 llundin</span>
+<a name="l00040"></a>00040 <span class="comment"> * irplib_dfs_save_image_(): Modified from cpl_dfs_save_image(). irplib_dfs_save_image(): Use irplib_dfs_save_image_()</span>
<a name="l00041"></a>00041 <span class="comment"> *</span>
-<a name="l00042"></a>00042 <span class="comment"> * Revision 1.50 2009/08/17 15:10:16 kmirny</span>
-<a name="l00043"></a>00043 <span class="comment"> *</span>
-<a name="l00044"></a>00044 <span class="comment"> * DFS07454 DFS07437</span>
-<a name="l00045"></a>00045 <span class="comment"> *</span>
-<a name="l00046"></a>00046 <span class="comment"> */</span>
-<a name="l00047"></a>00047
-<a name="l00048"></a>00048 <span class="preprocessor">#ifndef IRPLIB_UTILS_H</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_UTILS_H</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>
-<a name="l00051"></a>00051 <span class="comment">/*-----------------------------------------------------------------------------</span>
-<a name="l00052"></a>00052 <span class="comment"> Includes</span>
-<a name="l00053"></a>00053 <span class="comment"> -----------------------------------------------------------------------------*/</span>
-<a name="l00054"></a>00054
-<a name="l00055"></a>00055 <span class="preprocessor">#include <stdarg.h></span>
-<a name="l00056"></a>00056
-<a name="l00057"></a>00057 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00058"></a>00058
-<a name="l00059"></a>00059 <span class="comment">/*-----------------------------------------------------------------------------</span>
-<a name="l00060"></a>00060 <span class="comment"> Define</span>
-<a name="l00061"></a>00061 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00042"></a>00042 <span class="comment"> * Revision 1.52 2010/03/23 07:57:59 kmirny</span>
+<a name="l00043"></a>00043 <span class="comment"> * DFS08552, Documentation for irplib_frameset_sort</span>
+<a name="l00044"></a>00044 <span class="comment"> *</span>
+<a name="l00045"></a>00045 <span class="comment"> * Revision 1.51 2009/12/16 14:59:30 cgarcia</span>
+<a name="l00046"></a>00046 <span class="comment"> * Avoid name clash with index function</span>
+<a name="l00047"></a>00047 <span class="comment"> *</span>
+<a name="l00048"></a>00048 <span class="comment"> * Revision 1.50 2009/08/17 15:10:16 kmirny</span>
+<a name="l00049"></a>00049 <span class="comment"> *</span>
+<a name="l00050"></a>00050 <span class="comment"> * DFS07454 DFS07437</span>
+<a name="l00051"></a>00051 <span class="comment"> *</span>
+<a name="l00052"></a>00052 <span class="comment"> */</span>
+<a name="l00053"></a>00053
+<a name="l00054"></a>00054 <span class="preprocessor">#ifndef IRPLIB_UTILS_H</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_UTILS_H</span>
+<a name="l00056"></a>00056 <span class="preprocessor"></span>
+<a name="l00057"></a>00057 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00058"></a>00058 <span class="comment"> Includes</span>
+<a name="l00059"></a>00059 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00060"></a>00060
+<a name="l00061"></a>00061 <span class="preprocessor">#include <cpl.h></span>
<a name="l00062"></a>00062
-<a name="l00063"></a>00063 <span class="preprocessor">#define IRPLIB_XSTRINGIFY(TOSTRING) #TOSTRING</span>
-<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_STRINGIFY(TOSTRING) IRPLIB_XSTRINGIFY(TOSTRING)</span>
-<a name="l00065"></a>00065 <span class="preprocessor"></span>
-<a name="l00066"></a>00066 <span class="comment">/* FIXME: Remove when no longer used by any irplib-based pipelines */</span>
-<a name="l00067"></a>00067 <span class="comment">/* Useful for debugging */</span>
-<a name="l00068"></a>00068 <span class="preprocessor">#define irplib_trace() do if (cpl_error_get_code()) { \</span>
-<a name="l00069"></a>00069 <span class="preprocessor"> cpl_msg_debug(cpl_func, __FILE__ " at line %d: ERROR '%s' at %s", \</span>
-<a name="l00070"></a>00070 <span class="preprocessor"> __LINE__, cpl_error_get_message(), cpl_error_get_where()); \</span>
-<a name="l00071"></a>00071 <span class="preprocessor"> } else { \</span>
-<a name="l00072"></a>00072 <span class="preprocessor"> cpl_msg_debug(cpl_func, __FILE__ " at line %d: OK", __LINE__); \</span>
-<a name="l00073"></a>00073 <span class="preprocessor"> } while (0)</span>
-<a name="l00074"></a>00074 <span class="preprocessor"></span>
-<a name="l00075"></a>00075 <span class="preprocessor">#define irplib_error_recover(ESTATE, ...) \</span>
-<a name="l00076"></a>00076 <span class="preprocessor"> do if (!cpl_errorstate_is_equal(ESTATE)) { \</span>
-<a name="l00077"></a>00077 <span class="preprocessor"> cpl_msg_warning(cpl_func, __VA_ARGS__); \</span>
-<a name="l00078"></a>00078 <span class="preprocessor"> cpl_msg_indent_more(); \</span>
-<a name="l00079"></a>00079 <span class="preprocessor"> cpl_errorstate_dump(ESTATE, CPL_FALSE, irplib_errorstate_warning); \</span>
-<a name="l00080"></a>00080 <span class="preprocessor"> cpl_msg_indent_less(); \</span>
-<a name="l00081"></a>00081 <span class="preprocessor"> cpl_errorstate_set(ESTATE); \</span>
-<a name="l00082"></a>00082 <span class="preprocessor"> } while (0)</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span>
-<a name="l00084"></a>00084
-<a name="l00085"></a>00085
-<a name="l00086"></a>00086 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00087"></a>00087 <span class="comment">/*</span>
-<a name="l00088"></a>00088 <span class="comment"> @brief Declare a function suitable for use with irplib_dfs_table_convert()</span>
-<a name="l00089"></a>00089 <span class="comment"> @param table_set_row The name of the function to declare</span>
-<a name="l00090"></a>00090 <span class="comment"> @see irplib_dfs_table_convert(), irplib_table_read_from_frameset()</span>
-<a name="l00091"></a>00091 <span class="comment"></span>
-<a name="l00092"></a>00092 <span class="comment">*/</span>
-<a name="l00093"></a>00093 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00094"></a>00094 <span class="preprocessor">#define IRPLIB_UTIL_SET_ROW(table_set_row) \</span>
-<a name="l00095"></a>00095 <span class="preprocessor"> cpl_boolean table_set_row(cpl_table *, \</span>
-<a name="l00096"></a>00096 <span class="preprocessor"> const char *, \</span>
-<a name="l00097"></a>00097 <span class="preprocessor"> int, \</span>
-<a name="l00098"></a>00098 <span class="preprocessor"> const cpl_frame *, \</span>
-<a name="l00099"></a>00099 <span class="preprocessor"> const cpl_parameterlist *)</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span>
-<a name="l00101"></a>00101
-<a name="l00102"></a>00102 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00103"></a>00103 <span class="comment">/*</span>
-<a name="l00104"></a>00104 <span class="comment"> @brief Declare a function suitable for use with irplib_dfs_table_convert()</span>
-<a name="l00105"></a>00105 <span class="comment"> @param table_check The name of the function to declare</span>
-<a name="l00106"></a>00106 <span class="comment"> @see irplib_dfs_table_convert()</span>
-<a name="l00107"></a>00107 <span class="comment"></span>
-<a name="l00108"></a>00108 <span class="comment">*/</span>
-<a name="l00109"></a>00109 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00110"></a>00110 <span class="preprocessor">#define IRPLIB_UTIL_CHECK(table_check) \</span>
-<a name="l00111"></a>00111 <span class="preprocessor"> cpl_error_code table_check(cpl_table *, \</span>
-<a name="l00112"></a>00112 <span class="preprocessor"> const cpl_frameset *, \</span>
-<a name="l00113"></a>00113 <span class="preprocessor"> const cpl_parameterlist *)</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span>
-<a name="l00115"></a>00115
-<a name="l00116"></a>00116 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00117"></a>00117 <span class="comment">/*</span>
-<a name="l00118"></a>00118 <span class="comment"> @brief Conditional skip to the (unqiue) return point of the function</span>
-<a name="l00119"></a>00119 <span class="comment"> @param CONDITION The condition to check</span>
-<a name="l00120"></a>00120 <span class="comment"> @see cpl_error_ensure()</span>
-<a name="l00121"></a>00121 <span class="comment"></span>
-<a name="l00122"></a>00122 <span class="comment"> skip_if() takes one argument, which is a logical expression.</span>
-<a name="l00123"></a>00123 <span class="comment"> If the logical expression is false skip_if() takes no action and</span>
-<a name="l00124"></a>00124 <span class="comment"> program execution continues.</span>
-<a name="l00125"></a>00125 <span class="comment"> If the logical expression is true this indicates an error. In this case</span>
-<a name="l00126"></a>00126 <span class="comment"> skip_if() will set the location of the error to the point where it</span>
-<a name="l00127"></a>00127 <span class="comment"> was invoked in the recipe code (unless the error location is already in the</span>
-<a name="l00128"></a>00128 <span class="comment"> recipe code). If no error code had been set, then skip_if() will set one.</span>
-<a name="l00129"></a>00129 <span class="comment"> Finally, skip_if() causes program execution to skip to the macro 'end_skip'.</span>
-<a name="l00130"></a>00130 <span class="comment"> The macro end_skip is located towards the end of the function, after</span>
-<a name="l00131"></a>00131 <span class="comment"> which all resource deallocation and the function return is located.</span>
-<a name="l00132"></a>00132 <span class="comment"></span>
-<a name="l00133"></a>00133 <span class="comment"> The use of skip_if() assumes the following coding practice:</span>
-<a name="l00134"></a>00134 <span class="comment"> 1) Pointers used for dynamically allocated memory that they "own" shall always</span>
-<a name="l00135"></a>00135 <span class="comment"> point to either NULL or to allocated memory (including CPL-objects).</span>
-<a name="l00136"></a>00136 <span class="comment"> 2) Such pointers may not be reused to point to memory whose deallocation</span>
-<a name="l00137"></a>00137 <span class="comment"> requires calls to different functions.</span>
-<a name="l00138"></a>00138 <span class="comment"> 3) Pointers of type FILE should be set NULL when not pointing to an open</span>
-<a name="l00139"></a>00139 <span class="comment"> stream and their closing calls (fclose(), freopen(), etc.) following the</span>
-<a name="l00140"></a>00140 <span class="comment"> 'end_skip' should be guarded against such NULL pointers.</span>
-<a name="l00141"></a>00141 <span class="comment"></span>
-<a name="l00142"></a>00142 <span class="comment"> Error checking with skip_if() is encouraged due to the following advantages:</span>
-<a name="l00143"></a>00143 <span class="comment"> 1) It ensures that a CPL-error code is set.</span>
-<a name="l00144"></a>00144 <span class="comment"> 2) It ensures that the location of the error in the _recipe_ code is noted.</span>
-<a name="l00145"></a>00145 <span class="comment"> 3) The error checking may be confined to a single concise line.</span>
-<a name="l00146"></a>00146 <span class="comment"> 4) It is not necessary to replicate memory deallocation for every error</span>
-<a name="l00147"></a>00147 <span class="comment"> condition.</span>
-<a name="l00148"></a>00148 <span class="comment"> 5) If more extensive error reporting/handling is required it is not precluded</span>
-<a name="l00149"></a>00149 <span class="comment"> by the use of skip_if().</span>
-<a name="l00150"></a>00150 <span class="comment"> 6) It allows for a single point of function return.</span>
-<a name="l00151"></a>00151 <span class="comment"> 7) It allows for optional, uniformly formatted debugging/tracing information</span>
-<a name="l00152"></a>00152 <span class="comment"> at each macro invocation.</span>
-<a name="l00153"></a>00153 <span class="comment"></span>
-<a name="l00154"></a>00154 <span class="comment"> The implementation of skip_if() uses a goto/label construction.</span>
-<a name="l00155"></a>00155 <span class="comment"> According to Kerningham & Ritchie, The C Programming Language, 2nd edition,</span>
-<a name="l00156"></a>00156 <span class="comment"> Section 3.8:</span>
-<a name="l00157"></a>00157 <span class="comment"> "This organization is handy if the error-handling code is non-trivial,</span>
-<a name="l00158"></a>00158 <span class="comment"> and if errors can occur in several places."</span>
-<a name="l00159"></a>00159 <span class="comment"></span>
-<a name="l00160"></a>00160 <span class="comment"> The use of goto for any other purpose should be avoided.</span>
-<a name="l00161"></a>00161 <span class="comment"></span>
-<a name="l00162"></a>00162 <span class="comment">*/</span>
-<a name="l00163"></a>00163 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00164"></a>00164 <span class="preprocessor">#define skip_if(CONDITION) \</span>
-<a name="l00165"></a>00165 <span class="preprocessor"> do { \</span>
-<a name="l00166"></a>00166 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
-<a name="l00167"></a>00167 <span class="preprocessor"> goto cleanup, "Propagating a pre-existing error"); \</span>
-<a name="l00168"></a>00168 <span class="preprocessor"> cpl_error_ensure(!(CONDITION), cpl_error_get_code(), \</span>
-<a name="l00169"></a>00169 <span class="preprocessor"> goto cleanup, "Propagating error");\</span>
-<a name="l00170"></a>00170 <span class="preprocessor"> } while (0)</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span>
-<a name="l00172"></a>00172 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00173"></a>00173 <span class="comment">/*</span>
-<a name="l00174"></a>00174 <span class="comment"> @brief Skip if A < B</span>
-<a name="l00175"></a>00175 <span class="comment"> @param A The 1st double to compare</span>
-<a name="l00176"></a>00176 <span class="comment"> @param B The 2nd double to compare</span>
-<a name="l00177"></a>00177 <span class="comment"> @param MSG A printf-style error message, 1st arg should be a string literal</span>
-<a name="l00178"></a>00178 <span class="comment"> @see skip_if()</span>
-<a name="l00179"></a>00179 <span class="comment"> @note A and B are evaluated exactly once</span>
-<a name="l00180"></a>00180 <span class="comment"></span>
-<a name="l00181"></a>00181 <span class="comment"> If no CPL error is set, sets CPL_ERROR_DATA_NOT_FOUND on failure</span>
-<a name="l00182"></a>00182 <span class="comment">*/</span>
-<a name="l00183"></a>00183 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00184"></a>00184 <span class="preprocessor">#define skip_if_lt(A, B, ...) \</span>
-<a name="l00185"></a>00185 <span class="preprocessor"> do { \</span>
-<a name="l00186"></a>00186 <span class="preprocessor"> </span><span class="comment">/* Name-space protected one-time only evaluation */</span> \
-<a name="l00187"></a>00187 const double irplib_utils_a = (double)(A); \
-<a name="l00188"></a>00188 const double irplib_utils_b = (double)(B); \
-<a name="l00189"></a>00189 \
-<a name="l00190"></a>00190 cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \
-<a name="l00191"></a>00191 goto cleanup, "Propagating a pre-existing error"); \
-<a name="l00192"></a>00192 if (irplib_utils_a < irplib_utils_b) { \
-<a name="l00193"></a>00193 char * irplib_utils_msg = cpl_sprintf(__VA_ARGS__); \
-<a name="l00194"></a>00194 (void)cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND, \
-<a name="l00195"></a>00195 "Need at least %g (not %g) %s", \
-<a name="l00196"></a>00196 irplib_utils_b, irplib_utils_a, \
-<a name="l00197"></a>00197 irplib_utils_msg); \
-<a name="l00198"></a>00198 cpl_free(irplib_utils_msg); \
-<a name="l00199"></a>00199 goto cleanup; \
-<a name="l00200"></a>00200 } \
-<a name="l00201"></a>00201 } while (0)
-<a name="l00202"></a>00202
-<a name="l00203"></a>00203 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00204"></a>00204 <span class="comment">/*</span>
-<a name="l00205"></a>00205 <span class="comment"> @brief Conditional skip on coding bug</span>
-<a name="l00206"></a>00206 <span class="comment"> @param CONDITION The condition to check</span>
-<a name="l00207"></a>00207 <span class="comment"> @see skip_if()</span>
-<a name="l00208"></a>00208 <span class="comment"> @note unlike assert() this check cannot be disabled</span>
-<a name="l00209"></a>00209 <span class="comment"> */</span>
-<a name="l00210"></a>00210 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00211"></a>00211 <span class="preprocessor">#define bug_if(CONDITION) \</span>
-<a name="l00212"></a>00212 <span class="preprocessor"> do { \</span>
-<a name="l00213"></a>00213 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
-<a name="l00214"></a>00214 <span class="preprocessor"> goto cleanup, "Propagating an unexpected error, " \</span>
-<a name="l00215"></a>00215 <span class="preprocessor"> "please report to " PACKAGE_BUGREPORT); \</span>
-<a name="l00216"></a>00216 <span class="preprocessor"> cpl_error_ensure(!(CONDITION), CPL_ERROR_UNSPECIFIED, \</span>
-<a name="l00217"></a>00217 <span class="preprocessor"> goto cleanup, "Internal error, please report to " \</span>
-<a name="l00218"></a>00218 <span class="preprocessor"> PACKAGE_BUGREPORT); \</span>
-<a name="l00219"></a>00219 <span class="preprocessor"> } while (0)</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span>
-<a name="l00221"></a>00221 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00222"></a>00222 <span class="comment">/*</span>
-<a name="l00223"></a>00223 <span class="comment"> @brief Conditional skip with error creation</span>
-<a name="l00224"></a>00224 <span class="comment"> @param CONDITION The condition to check</span>
-<a name="l00225"></a>00225 <span class="comment"> @param ERROR The error code to set</span>
-<a name="l00226"></a>00226 <span class="comment"> @param MSG A printf-style error message. As a matter of</span>
-<a name="l00227"></a>00227 <span class="comment"> user-friendliness the message should mention any</span>
-<a name="l00228"></a>00228 <span class="comment"> value that caused the @em CONDITION to fail.</span>
-<a name="l00229"></a>00229 <span class="comment"> @see skip_if()</span>
-<a name="l00230"></a>00230 <span class="comment"> @note unlike assert() this check cannot be disabled</span>
-<a name="l00231"></a>00231 <span class="comment"> */</span>
-<a name="l00232"></a>00232 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00233"></a>00233 <span class="preprocessor">#define error_if(CONDITION, ERROR, ...) \</span>
-<a name="l00234"></a>00234 <span class="preprocessor"> cpl_error_ensure(cpl_error_get_code() == CPL_ERROR_NONE && \</span>
-<a name="l00235"></a>00235 <span class="preprocessor"> !(CONDITION), ERROR, goto cleanup, __VA_ARGS__)</span>
-<a name="l00236"></a>00236 <span class="preprocessor"></span>
-<a name="l00237"></a>00237 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00238"></a>00238 <span class="comment">/*</span>
-<a name="l00239"></a>00239 <span class="comment"> @brief Propagate a preexisting error, if any</span>
-<a name="l00240"></a>00240 <span class="comment"> @param MSG A printf-style error message.</span>
-<a name="l00241"></a>00241 <span class="comment"> @see skip_if()</span>
-<a name="l00242"></a>00242 <span class="comment"> */</span>
-<a name="l00243"></a>00243 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00244"></a>00244 <span class="preprocessor">#define any_if(...) \</span>
-<a name="l00245"></a>00245 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
-<a name="l00246"></a>00246 <span class="preprocessor"> goto cleanup, __VA_ARGS__)</span>
-<a name="l00247"></a>00247 <span class="preprocessor"></span>
-<a name="l00248"></a>00248 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00249"></a>00249 <span class="comment">/*</span>
-<a name="l00250"></a>00250 <span class="comment"> @brief Define the single point of resource deallocation and return</span>
-<a name="l00251"></a>00251 <span class="comment"> @see skip_if()</span>
-<a name="l00252"></a>00252 <span class="comment"> @note end_skip should be used exactly once in functions that use skip_if() etc</span>
-<a name="l00253"></a>00253 <span class="comment">*/</span>
-<a name="l00254"></a>00254 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00255"></a>00255 <span class="preprocessor">#define end_skip \</span>
-<a name="l00256"></a>00256 <span class="preprocessor"> do { \</span>
-<a name="l00257"></a>00257 <span class="preprocessor"> cleanup: \</span>
-<a name="l00258"></a>00258 <span class="preprocessor"> if (cpl_error_get_code()) \</span>
-<a name="l00259"></a>00259 <span class="preprocessor"> cpl_msg_debug(cpl_func, "Cleanup in " __FILE__ " line %u with " \</span>
-<a name="l00260"></a>00260 <span class="preprocessor"> "error '%s' at %s", __LINE__, \</span>
-<a name="l00261"></a>00261 <span class="preprocessor"> cpl_error_get_message(), cpl_error_get_where()); \</span>
-<a name="l00262"></a>00262 <span class="preprocessor"> else \</span>
-<a name="l00263"></a>00263 <span class="preprocessor"> cpl_msg_debug(cpl_func, "Cleanup in " __FILE__ " line %u", \</span>
-<a name="l00264"></a>00264 <span class="preprocessor"> __LINE__); \</span>
-<a name="l00265"></a>00265 <span class="preprocessor"> } while (0)</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span>
-<a name="l00267"></a>00267
-<a name="l00268"></a>00268 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00280"></a>00280 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00281"></a>00281 <span class="preprocessor">#define irplib_ensure(CONDITION, ec, ...) \</span>
-<a name="l00282"></a>00282 <span class="preprocessor"> cpl_error_ensure(CONDITION, ec, goto cleanup, __VA_ARGS__)</span>
-<a name="l00283"></a>00283 <span class="preprocessor"></span>
-<a name="l00284"></a>00284 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00314"></a>00314 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00315"></a>00315
-<a name="l00316"></a>00316 <span class="preprocessor">#define irplib_check(COMMAND, ...) \</span>
-<a name="l00317"></a>00317 <span class="preprocessor"> do { \</span>
-<a name="l00318"></a>00318 <span class="preprocessor"> cpl_errorstate irplib_check_prestate = cpl_errorstate_get(); \</span>
-<a name="l00319"></a>00319 <span class="preprocessor"> skip_if(0); \</span>
-<a name="l00320"></a>00320 <span class="preprocessor"> COMMAND; \</span>
-<a name="l00321"></a>00321 <span class="preprocessor"> irplib_trace(); \</span>
-<a name="l00322"></a>00322 <span class="preprocessor"> irplib_ensure(cpl_errorstate_is_equal(irplib_check_prestate), \</span>
-<a name="l00323"></a>00323 <span class="preprocessor"> cpl_error_get_code(), __VA_ARGS__); \</span>
-<a name="l00324"></a>00324 <span class="preprocessor"> irplib_trace(); \</span>
-<a name="l00325"></a>00325 <span class="preprocessor"> } while (0)</span>
-<a name="l00326"></a>00326 <span class="preprocessor"></span>
-<a name="l00327"></a>00327 <span class="comment">/*-----------------------------------------------------------------------------</span>
-<a name="l00328"></a>00328 <span class="comment"> Function prototypes</span>
-<a name="l00329"></a>00329 <span class="comment"> -----------------------------------------------------------------------------*/</span>
-<a name="l00330"></a>00330
-<a name="l00331"></a>00331 cpl_error_code <a class="code" href="group__irplib__utils.html#ga346842d722834a2e6221ff2d86314b7e" title="Save an image as a DFS-compliant pipeline product.">irplib_dfs_save_image</a>(cpl_frameset *,
-<a name="l00332"></a>00332 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00333"></a>00333 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00334"></a>00334 <span class="keyword">const</span> cpl_image *,
-<a name="l00335"></a>00335 cpl_type_bpp ,
-<a name="l00336"></a>00336 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00337"></a>00337 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00338"></a>00338 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00339"></a>00339 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00340"></a>00340 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00341"></a>00341 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00342"></a>00342
-<a name="l00343"></a>00343
-<a name="l00344"></a>00344 cpl_error_code <a class="code" href="group__irplib__utils.html#ga4dc12f321e7aeb5e67ff19f815bfd7b7" title="Save a propertylist as a DFS-compliant pipeline product.">irplib_dfs_save_propertylist</a>(cpl_frameset *,
-<a name="l00345"></a>00345 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00346"></a>00346 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00347"></a>00347 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00348"></a>00348 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00349"></a>00349 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00350"></a>00350 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00351"></a>00351 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00352"></a>00352 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00353"></a>00353
-<a name="l00354"></a>00354 cpl_error_code <a class="code" href="group__irplib__utils.html#ga66f7adc9e165b4e934e3d57a700f55c1" title="Save an imagelist as a DFS-compliant pipeline product.">irplib_dfs_save_imagelist</a>(cpl_frameset *,
-<a name="l00355"></a>00355 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00356"></a>00356 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00357"></a>00357 <span class="keyword">const</span> cpl_imagelist *,
-<a name="l00358"></a>00358 cpl_type_bpp ,
-<a name="l00359"></a>00359 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00360"></a>00360 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00361"></a>00361 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00362"></a>00362 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00363"></a>00363 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00364"></a>00364 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00365"></a>00365
-<a name="l00366"></a>00366 cpl_error_code <a class="code" href="group__irplib__utils.html#ga62a91f8630af11164547c168660b2ade" title="Save a table as a DFS-compliant pipeline product.">irplib_dfs_save_table</a>(cpl_frameset *,
-<a name="l00367"></a>00367 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00368"></a>00368 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00369"></a>00369 <span class="keyword">const</span> cpl_table *,
-<a name="l00370"></a>00370 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00371"></a>00371 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00372"></a>00372 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00373"></a>00373 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00374"></a>00374 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00375"></a>00375 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00376"></a>00376 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00063"></a>00063 <span class="preprocessor">#include <stdarg.h></span>
+<a name="l00064"></a>00064
+<a name="l00065"></a>00065 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00066"></a>00066 <span class="comment"> Define</span>
+<a name="l00067"></a>00067 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00068"></a>00068
+<a name="l00069"></a>00069 <span class="preprocessor">#define IRPLIB_XSTRINGIFY(TOSTRING) #TOSTRING</span>
+<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_STRINGIFY(TOSTRING) IRPLIB_XSTRINGIFY(TOSTRING)</span>
+<a name="l00071"></a>00071 <span class="preprocessor"></span>
+<a name="l00072"></a>00072
+<a name="l00073"></a>00073 <span class="preprocessor">#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)</span>
+<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_PUSH_IGN(x) \</span>
+<a name="l00075"></a>00075 <span class="preprocessor"> _Pragma("GCC diagnostic push") \</span>
+<a name="l00076"></a>00076 <span class="preprocessor"> _Pragma(IRPLIB_STRINGIFY(GCC diagnostic ignored #x))</span>
+<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_PUSH_ERR(x) \</span>
+<a name="l00078"></a>00078 <span class="preprocessor"> _Pragma("GCC diagnostic push") \</span>
+<a name="l00079"></a>00079 <span class="preprocessor"> _Pragma(IRPLIB_STRINGIFY(GCC diagnostic error #x))</span>
+<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_POP \</span>
+<a name="l00081"></a>00081 <span class="preprocessor"> _Pragma("GCC diagnostic pop")</span>
+<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_PUSH_IGN(x)</span>
+<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_PUSH_ERR(x)</span>
+<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define IRPLIB_DIAG_PRAGMA_POP</span>
+<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00087"></a>00087 <span class="preprocessor"></span>
+<a name="l00088"></a>00088
+<a name="l00089"></a>00089 <span class="comment">/* FIXME: Remove when no longer used by any irplib-based pipelines */</span>
+<a name="l00090"></a>00090 <span class="comment">/* Useful for debugging */</span>
+<a name="l00091"></a>00091 <span class="preprocessor">#define irplib_trace() do if (cpl_error_get_code()) { \</span>
+<a name="l00092"></a>00092 <span class="preprocessor"> cpl_msg_debug(cpl_func, __FILE__ " at line %d: ERROR '%s' at %s", \</span>
+<a name="l00093"></a>00093 <span class="preprocessor"> __LINE__, cpl_error_get_message(), cpl_error_get_where()); \</span>
+<a name="l00094"></a>00094 <span class="preprocessor"> } else { \</span>
+<a name="l00095"></a>00095 <span class="preprocessor"> cpl_msg_debug(cpl_func, __FILE__ " at line %d: OK", __LINE__); \</span>
+<a name="l00096"></a>00096 <span class="preprocessor"> } while (0)</span>
+<a name="l00097"></a>00097 <span class="preprocessor"></span>
+<a name="l00098"></a>00098 <span class="preprocessor">#define irplib_error_recover(ESTATE, ...) \</span>
+<a name="l00099"></a>00099 <span class="preprocessor"> do if (!cpl_errorstate_is_equal(ESTATE)) { \</span>
+<a name="l00100"></a>00100 <span class="preprocessor"> cpl_msg_warning(cpl_func, __VA_ARGS__); \</span>
+<a name="l00101"></a>00101 <span class="preprocessor"> cpl_msg_indent_more(); \</span>
+<a name="l00102"></a>00102 <span class="preprocessor"> cpl_errorstate_dump(ESTATE, CPL_FALSE, \</span>
+<a name="l00103"></a>00103 <span class="preprocessor"> cpl_errorstate_dump_one_warning); \</span>
+<a name="l00104"></a>00104 <span class="preprocessor"> cpl_msg_indent_less(); \</span>
+<a name="l00105"></a>00105 <span class="preprocessor"> cpl_errorstate_set(ESTATE); \</span>
+<a name="l00106"></a>00106 <span class="preprocessor"> } while (0)</span>
+<a name="l00107"></a>00107 <span class="preprocessor"></span>
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109
+<a name="l00110"></a>00110 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00111"></a>00111 <span class="comment">/*</span>
+<a name="l00112"></a>00112 <span class="comment"> @brief Declare a function suitable for use with irplib_dfs_table_convert()</span>
+<a name="l00113"></a>00113 <span class="comment"> @param table_set_row The name of the function to declare</span>
+<a name="l00114"></a>00114 <span class="comment"> @see irplib_dfs_table_convert(), irplib_table_read_from_frameset()</span>
+<a name="l00115"></a>00115 <span class="comment"></span>
+<a name="l00116"></a>00116 <span class="comment">*/</span>
+<a name="l00117"></a>00117 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00118"></a>00118 <span class="preprocessor">#define IRPLIB_UTIL_SET_ROW(table_set_row) \</span>
+<a name="l00119"></a>00119 <span class="preprocessor"> cpl_boolean table_set_row(cpl_table *, \</span>
+<a name="l00120"></a>00120 <span class="preprocessor"> const char *, \</span>
+<a name="l00121"></a>00121 <span class="preprocessor"> int, \</span>
+<a name="l00122"></a>00122 <span class="preprocessor"> const cpl_frame *, \</span>
+<a name="l00123"></a>00123 <span class="preprocessor"> const cpl_parameterlist *)</span>
+<a name="l00124"></a>00124 <span class="preprocessor"></span>
+<a name="l00125"></a>00125
+<a name="l00126"></a>00126 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00127"></a>00127 <span class="comment">/*</span>
+<a name="l00128"></a>00128 <span class="comment"> @brief Declare a function suitable for use with irplib_dfs_table_convert()</span>
+<a name="l00129"></a>00129 <span class="comment"> @param table_check The name of the function to declare</span>
+<a name="l00130"></a>00130 <span class="comment"> @see irplib_dfs_table_convert()</span>
+<a name="l00131"></a>00131 <span class="comment"></span>
+<a name="l00132"></a>00132 <span class="comment">*/</span>
+<a name="l00133"></a>00133 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00134"></a>00134 <span class="preprocessor">#define IRPLIB_UTIL_CHECK(table_check) \</span>
+<a name="l00135"></a>00135 <span class="preprocessor"> cpl_error_code table_check(cpl_table *, \</span>
+<a name="l00136"></a>00136 <span class="preprocessor"> const cpl_frameset *, \</span>
+<a name="l00137"></a>00137 <span class="preprocessor"> const cpl_parameterlist *)</span>
+<a name="l00138"></a>00138 <span class="preprocessor"></span>
+<a name="l00139"></a>00139
+<a name="l00140"></a>00140 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00141"></a>00141 <span class="comment">/*</span>
+<a name="l00142"></a>00142 <span class="comment"> @brief Conditional skip to the (unqiue) return point of the function</span>
+<a name="l00143"></a>00143 <span class="comment"> @param CONDITION The condition to check</span>
+<a name="l00144"></a>00144 <span class="comment"> @see cpl_error_ensure()</span>
+<a name="l00145"></a>00145 <span class="comment"></span>
+<a name="l00146"></a>00146 <span class="comment"> skip_if() takes one argument, which is a logical expression.</span>
+<a name="l00147"></a>00147 <span class="comment"> If the logical expression is false skip_if() takes no action and</span>
+<a name="l00148"></a>00148 <span class="comment"> program execution continues.</span>
+<a name="l00149"></a>00149 <span class="comment"> If the logical expression is true this indicates an error. In this case</span>
+<a name="l00150"></a>00150 <span class="comment"> skip_if() will set the location of the error to the point where it</span>
+<a name="l00151"></a>00151 <span class="comment"> was invoked in the recipe code (unless the error location is already in the</span>
+<a name="l00152"></a>00152 <span class="comment"> recipe code). If no error code had been set, then skip_if() will set one.</span>
+<a name="l00153"></a>00153 <span class="comment"> Finally, skip_if() causes program execution to skip to the macro 'end_skip'.</span>
+<a name="l00154"></a>00154 <span class="comment"> The macro end_skip is located towards the end of the function, after</span>
+<a name="l00155"></a>00155 <span class="comment"> which all resource deallocation and the function return is located.</span>
+<a name="l00156"></a>00156 <span class="comment"></span>
+<a name="l00157"></a>00157 <span class="comment"> The use of skip_if() assumes the following coding practice:</span>
+<a name="l00158"></a>00158 <span class="comment"> 1) Pointers used for dynamically allocated memory that they "own" shall always</span>
+<a name="l00159"></a>00159 <span class="comment"> point to either NULL or to allocated memory (including CPL-objects).</span>
+<a name="l00160"></a>00160 <span class="comment"> 2) Such pointers may not be reused to point to memory whose deallocation</span>
+<a name="l00161"></a>00161 <span class="comment"> requires calls to different functions.</span>
+<a name="l00162"></a>00162 <span class="comment"> 3) Pointers of type FILE should be set NULL when not pointing to an open</span>
+<a name="l00163"></a>00163 <span class="comment"> stream and their closing calls (fclose(), freopen(), etc.) following the</span>
+<a name="l00164"></a>00164 <span class="comment"> 'end_skip' should be guarded against such NULL pointers.</span>
+<a name="l00165"></a>00165 <span class="comment"></span>
+<a name="l00166"></a>00166 <span class="comment"> Error checking with skip_if() is encouraged due to the following advantages:</span>
+<a name="l00167"></a>00167 <span class="comment"> 1) It ensures that a CPL-error code is set.</span>
+<a name="l00168"></a>00168 <span class="comment"> 2) It ensures that the location of the error in the _recipe_ code is noted.</span>
+<a name="l00169"></a>00169 <span class="comment"> 3) The error checking may be confined to a single concise line.</span>
+<a name="l00170"></a>00170 <span class="comment"> 4) It is not necessary to replicate memory deallocation for every error</span>
+<a name="l00171"></a>00171 <span class="comment"> condition.</span>
+<a name="l00172"></a>00172 <span class="comment"> 5) If more extensive error reporting/handling is required it is not precluded</span>
+<a name="l00173"></a>00173 <span class="comment"> by the use of skip_if().</span>
+<a name="l00174"></a>00174 <span class="comment"> 6) It allows for a single point of function return.</span>
+<a name="l00175"></a>00175 <span class="comment"> 7) It allows for optional, uniformly formatted debugging/tracing information</span>
+<a name="l00176"></a>00176 <span class="comment"> at each macro invocation.</span>
+<a name="l00177"></a>00177 <span class="comment"></span>
+<a name="l00178"></a>00178 <span class="comment"> The implementation of skip_if() uses a goto/label construction.</span>
+<a name="l00179"></a>00179 <span class="comment"> According to Kerningham & Ritchie, The C Programming Language, 2nd edition,</span>
+<a name="l00180"></a>00180 <span class="comment"> Section 3.8:</span>
+<a name="l00181"></a>00181 <span class="comment"> "This organization is handy if the error-handling code is non-trivial,</span>
+<a name="l00182"></a>00182 <span class="comment"> and if errors can occur in several places."</span>
+<a name="l00183"></a>00183 <span class="comment"></span>
+<a name="l00184"></a>00184 <span class="comment"> The use of goto for any other purpose should be avoided.</span>
+<a name="l00185"></a>00185 <span class="comment"></span>
+<a name="l00186"></a>00186 <span class="comment">*/</span>
+<a name="l00187"></a>00187 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00188"></a>00188 <span class="preprocessor">#define skip_if(CONDITION) \</span>
+<a name="l00189"></a>00189 <span class="preprocessor"> do { \</span>
+<a name="l00190"></a>00190 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
+<a name="l00191"></a>00191 <span class="preprocessor"> goto cleanup, "Propagating a pre-existing error"); \</span>
+<a name="l00192"></a>00192 <span class="preprocessor"> cpl_error_ensure(!(CONDITION), cpl_error_get_code(), \</span>
+<a name="l00193"></a>00193 <span class="preprocessor"> goto cleanup, "Propagating error");\</span>
+<a name="l00194"></a>00194 <span class="preprocessor"> } while (0)</span>
+<a name="l00195"></a>00195 <span class="preprocessor"></span>
+<a name="l00196"></a>00196 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00197"></a>00197 <span class="comment">/*</span>
+<a name="l00198"></a>00198 <span class="comment"> @brief Skip if A < B</span>
+<a name="l00199"></a>00199 <span class="comment"> @param A The 1st double to compare</span>
+<a name="l00200"></a>00200 <span class="comment"> @param B The 2nd double to compare</span>
+<a name="l00201"></a>00201 <span class="comment"> @param MSG A printf-style error message, 1st arg should be a string literal</span>
+<a name="l00202"></a>00202 <span class="comment"> @see skip_if()</span>
+<a name="l00203"></a>00203 <span class="comment"> @note A and B are evaluated exactly once</span>
+<a name="l00204"></a>00204 <span class="comment"></span>
+<a name="l00205"></a>00205 <span class="comment"> If no CPL error is set, sets CPL_ERROR_DATA_NOT_FOUND on failure</span>
+<a name="l00206"></a>00206 <span class="comment">*/</span>
+<a name="l00207"></a>00207 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00208"></a>00208 <span class="preprocessor">#define skip_if_lt(A, B, ...) \</span>
+<a name="l00209"></a>00209 <span class="preprocessor"> do { \</span>
+<a name="l00210"></a>00210 <span class="preprocessor"> </span><span class="comment">/* Name-space protected one-time only evaluation */</span> \
+<a name="l00211"></a>00211 const double irplib_utils_a = (double)(A); \
+<a name="l00212"></a>00212 const double irplib_utils_b = (double)(B); \
+<a name="l00213"></a>00213 \
+<a name="l00214"></a>00214 cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \
+<a name="l00215"></a>00215 goto cleanup, "Propagating a pre-existing error"); \
+<a name="l00216"></a>00216 if (irplib_utils_a < irplib_utils_b) { \
+<a name="l00217"></a>00217 char * irplib_utils_msg = cpl_sprintf(__VA_ARGS__); \
+<a name="l00218"></a>00218 (void)cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND, \
+<a name="l00219"></a>00219 "Need at least %g (not %g) %s", \
+<a name="l00220"></a>00220 irplib_utils_b, irplib_utils_a, \
+<a name="l00221"></a>00221 irplib_utils_msg); \
+<a name="l00222"></a>00222 cpl_free(irplib_utils_msg); \
+<a name="l00223"></a>00223 goto cleanup; \
+<a name="l00224"></a>00224 } \
+<a name="l00225"></a>00225 } while (0)
+<a name="l00226"></a>00226
+<a name="l00227"></a>00227 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00228"></a>00228 <span class="comment">/*</span>
+<a name="l00229"></a>00229 <span class="comment"> @brief Conditional skip on coding bug</span>
+<a name="l00230"></a>00230 <span class="comment"> @param CONDITION The condition to check</span>
+<a name="l00231"></a>00231 <span class="comment"> @see skip_if()</span>
+<a name="l00232"></a>00232 <span class="comment"> @note unlike assert() this check cannot be disabled</span>
+<a name="l00233"></a>00233 <span class="comment"> */</span>
+<a name="l00234"></a>00234 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00235"></a>00235 <span class="preprocessor">#define bug_if(CONDITION) \</span>
+<a name="l00236"></a>00236 <span class="preprocessor"> do { \</span>
+<a name="l00237"></a>00237 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
+<a name="l00238"></a>00238 <span class="preprocessor"> goto cleanup, "Propagating an unexpected error, " \</span>
+<a name="l00239"></a>00239 <span class="preprocessor"> "please report to " PACKAGE_BUGREPORT); \</span>
+<a name="l00240"></a>00240 <span class="preprocessor"> cpl_error_ensure(!(CONDITION), CPL_ERROR_UNSPECIFIED, \</span>
+<a name="l00241"></a>00241 <span class="preprocessor"> goto cleanup, "Internal error, please report to " \</span>
+<a name="l00242"></a>00242 <span class="preprocessor"> PACKAGE_BUGREPORT); \</span>
+<a name="l00243"></a>00243 <span class="preprocessor"> } while (0)</span>
+<a name="l00244"></a>00244 <span class="preprocessor"></span>
+<a name="l00245"></a>00245 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00246"></a>00246 <span class="comment">/*</span>
+<a name="l00247"></a>00247 <span class="comment"> @brief Conditional skip with error creation</span>
+<a name="l00248"></a>00248 <span class="comment"> @param CONDITION The condition to check</span>
+<a name="l00249"></a>00249 <span class="comment"> @param ERROR The error code to set</span>
+<a name="l00250"></a>00250 <span class="comment"> @param MSG A printf-style error message. As a matter of</span>
+<a name="l00251"></a>00251 <span class="comment"> user-friendliness the message should mention any</span>
+<a name="l00252"></a>00252 <span class="comment"> value that caused the @em CONDITION to fail.</span>
+<a name="l00253"></a>00253 <span class="comment"> @see skip_if()</span>
+<a name="l00254"></a>00254 <span class="comment"> @note unlike assert() this check cannot be disabled</span>
+<a name="l00255"></a>00255 <span class="comment"> */</span>
+<a name="l00256"></a>00256 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00257"></a>00257 <span class="preprocessor">#define error_if(CONDITION, ERROR, ...) \</span>
+<a name="l00258"></a>00258 <span class="preprocessor"> cpl_error_ensure(cpl_error_get_code() == CPL_ERROR_NONE && \</span>
+<a name="l00259"></a>00259 <span class="preprocessor"> !(CONDITION), ERROR, goto cleanup, __VA_ARGS__)</span>
+<a name="l00260"></a>00260 <span class="preprocessor"></span>
+<a name="l00261"></a>00261 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00262"></a>00262 <span class="comment">/*</span>
+<a name="l00263"></a>00263 <span class="comment"> @brief Propagate a preexisting error, if any</span>
+<a name="l00264"></a>00264 <span class="comment"> @param MSG A printf-style error message.</span>
+<a name="l00265"></a>00265 <span class="comment"> @see skip_if()</span>
+<a name="l00266"></a>00266 <span class="comment"> */</span>
+<a name="l00267"></a>00267 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00268"></a>00268 <span class="preprocessor">#define any_if(...) \</span>
+<a name="l00269"></a>00269 <span class="preprocessor"> cpl_error_ensure(!cpl_error_get_code(), cpl_error_get_code(), \</span>
+<a name="l00270"></a>00270 <span class="preprocessor"> goto cleanup, __VA_ARGS__)</span>
+<a name="l00271"></a>00271 <span class="preprocessor"></span>
+<a name="l00272"></a>00272 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00273"></a>00273 <span class="comment">/*</span>
+<a name="l00274"></a>00274 <span class="comment"> @brief Define the single point of resource deallocation and return</span>
+<a name="l00275"></a>00275 <span class="comment"> @see skip_if()</span>
+<a name="l00276"></a>00276 <span class="comment"> @note end_skip should be used exactly once in functions that use skip_if() etc</span>
+<a name="l00277"></a>00277 <span class="comment">*/</span>
+<a name="l00278"></a>00278 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00279"></a>00279 <span class="preprocessor">#define end_skip \</span>
+<a name="l00280"></a>00280 <span class="preprocessor"> do { \</span>
+<a name="l00281"></a>00281 <span class="preprocessor"> cleanup: \</span>
+<a name="l00282"></a>00282 <span class="preprocessor"> if (cpl_error_get_code()) \</span>
+<a name="l00283"></a>00283 <span class="preprocessor"> cpl_msg_debug(cpl_func, "Cleanup in " __FILE__ " line %u with " \</span>
+<a name="l00284"></a>00284 <span class="preprocessor"> "error '%s' at %s", __LINE__, \</span>
+<a name="l00285"></a>00285 <span class="preprocessor"> cpl_error_get_message(), cpl_error_get_where()); \</span>
+<a name="l00286"></a>00286 <span class="preprocessor"> else \</span>
+<a name="l00287"></a>00287 <span class="preprocessor"> cpl_msg_debug(cpl_func, "Cleanup in " __FILE__ " line %u", \</span>
+<a name="l00288"></a>00288 <span class="preprocessor"> __LINE__); \</span>
+<a name="l00289"></a>00289 <span class="preprocessor"> } while (0)</span>
+<a name="l00290"></a>00290 <span class="preprocessor"></span>
+<a name="l00291"></a>00291
+<a name="l00292"></a>00292 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00304"></a>00304 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00305"></a>00305 <span class="preprocessor">#define irplib_ensure(CONDITION, ec, ...) \</span>
+<a name="l00306"></a>00306 <span class="preprocessor"> cpl_error_ensure(CONDITION, ec, goto cleanup, __VA_ARGS__)</span>
+<a name="l00307"></a>00307 <span class="preprocessor"></span>
+<a name="l00308"></a>00308 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00338"></a>00338 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00339"></a>00339
+<a name="l00340"></a>00340 <span class="preprocessor">#define irplib_check(COMMAND, ...) \</span>
+<a name="l00341"></a>00341 <span class="preprocessor"> do { \</span>
+<a name="l00342"></a>00342 <span class="preprocessor"> cpl_errorstate irplib_check_prestate = cpl_errorstate_get(); \</span>
+<a name="l00343"></a>00343 <span class="preprocessor"> skip_if(0); \</span>
+<a name="l00344"></a>00344 <span class="preprocessor"> COMMAND; \</span>
+<a name="l00345"></a>00345 <span class="preprocessor"> irplib_trace(); \</span>
+<a name="l00346"></a>00346 <span class="preprocessor"> irplib_ensure(cpl_errorstate_is_equal(irplib_check_prestate), \</span>
+<a name="l00347"></a>00347 <span class="preprocessor"> cpl_error_get_code(), __VA_ARGS__); \</span>
+<a name="l00348"></a>00348 <span class="preprocessor"> irplib_trace(); \</span>
+<a name="l00349"></a>00349 <span class="preprocessor"> } while (0)</span>
+<a name="l00350"></a>00350 <span class="preprocessor"></span>
+<a name="l00351"></a>00351 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00352"></a>00352 <span class="comment"> Function prototypes</span>
+<a name="l00353"></a>00353 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00354"></a>00354
+<a name="l00355"></a>00355 cpl_error_code <a class="code" href="group__irplib__utils.html#ga346842d722834a2e6221ff2d86314b7e" title="Save an image as a DFS-compliant pipeline product.">irplib_dfs_save_image</a>(cpl_frameset *,
+<a name="l00356"></a>00356 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00357"></a>00357 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00358"></a>00358 <span class="keyword">const</span> cpl_image *,
+<a name="l00359"></a>00359 cpl_type_bpp ,
+<a name="l00360"></a>00360 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00361"></a>00361 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00362"></a>00362 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00363"></a>00363 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00364"></a>00364 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00365"></a>00365 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00366"></a>00366
+<a name="l00367"></a>00367
+<a name="l00368"></a>00368 cpl_error_code <a class="code" href="group__irplib__utils.html#ga4dc12f321e7aeb5e67ff19f815bfd7b7" title="Save a propertylist as a DFS-compliant pipeline product.">irplib_dfs_save_propertylist</a>(cpl_frameset *,
+<a name="l00369"></a>00369 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00370"></a>00370 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00371"></a>00371 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00372"></a>00372 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00373"></a>00373 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00374"></a>00374 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00375"></a>00375 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00376"></a>00376 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
<a name="l00377"></a>00377
-<a name="l00378"></a>00378 cpl_error_code <a class="code" href="group__irplib__utils.html#ga1fd7c2f4c00014049b0bf4bf6814b451" title="Save an image as a DFS-compliant pipeline product.">irplib_dfs_save_image_</a>(cpl_frameset *,
-<a name="l00379"></a>00379 cpl_propertylist *,
-<a name="l00380"></a>00380 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00381"></a>00381 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00382"></a>00382 <span class="keyword">const</span> cpl_frame *,
-<a name="l00383"></a>00383 <span class="keyword">const</span> cpl_image *,
-<a name="l00384"></a>00384 cpl_type ,
-<a name="l00385"></a>00385 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00386"></a>00386 <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00387"></a>00387 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00388"></a>00388 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00389"></a>00389 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00390"></a>00390
-<a name="l00391"></a>00391 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e" title="Reset IRPLIB state.">irplib_reset</a>(<span class="keywordtype">void</span>);
-<a name="l00392"></a>00392 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde" title="Comparison function to identify different input frames.">irplib_compare_tags</a>(cpl_frame *, cpl_frame *);
-<a name="l00393"></a>00393 <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134" title="Find the filename with the given tag in a frame set.">irplib_frameset_find_file</a>(<span class="keyword">const</span> cpl_frameset *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00394"></a>00394 <span class="keyword">const</span> cpl_frame * <a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68" title="Find the first frame belonging to the given group.">irplib_frameset_get_first_from_group</a>(<span class="keyword">const</span> cpl_frameset *,
-<a name="l00395"></a>00395 cpl_frame_group);
-<a name="l00396"></a>00396
-<a name="l00397"></a>00397 cpl_error_code <a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1" title="Find the aperture(s) with the greatest flux.">irplib_apertures_find_max_flux</a>(<span class="keyword">const</span> cpl_apertures *, <span class="keywordtype">int</span> *,
-<a name="l00398"></a>00398 <span class="keywordtype">int</span>);
-<a name="l00399"></a>00399
-<a name="l00400"></a>00400 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f" title="portable isinf">irplib_isinf</a>(<span class="keywordtype">double</span> value);
-<a name="l00401"></a>00401 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(<span class="keywordtype">double</span> value);
-<a name="l00402"></a>00402
-<a name="l00403"></a>00403 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga2dda571b0bbb3f7bf170210b38f95627" title="Dump a single CPL error.">irplib_errorstate_warning</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
-<a name="l00404"></a>00404
-<a name="l00405"></a>00405 cpl_error_code
-<a name="l00406"></a>00406 <a class="code" href="group__irplib__utils.html#ga3d1a791b5dc870770611c7dbf60d02df" title="Create a DFS product with one table from one or more (ASCII) file(s).">irplib_dfs_table_convert</a>(cpl_table *, cpl_frameset *, <span class="keyword">const</span> cpl_frameset *,
-<a name="l00407"></a>00407 <span class="keywordtype">int</span>, <span class="keywordtype">char</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00408"></a>00408 <span class="keyword">const</span> cpl_parameterlist *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00409"></a>00409 <span class="keyword">const</span> cpl_propertylist *, <span class="keyword">const</span> cpl_propertylist *,
-<a name="l00410"></a>00410 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00411"></a>00411 cpl_boolean (*)(cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>,
-<a name="l00412"></a>00412 <span class="keyword">const</span> cpl_frame *,
-<a name="l00413"></a>00413 <span class="keyword">const</span> cpl_parameterlist *),
-<a name="l00414"></a>00414 cpl_error_code (*)(cpl_table *,
-<a name="l00415"></a>00415 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00416"></a>00416 <span class="keyword">const</span> cpl_parameterlist *));
-<a name="l00417"></a>00417
-<a name="l00418"></a>00418 cpl_error_code <a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(cpl_table *,
-<a name="l00419"></a>00419 <span class="keyword">const</span> cpl_frameset *,
-<a name="l00420"></a>00420 <span class="keywordtype">int</span>,
-<a name="l00421"></a>00421 <span class="keywordtype">char</span>,
-<a name="l00422"></a>00422 <span class="keyword">const</span> cpl_parameterlist *,
-<a name="l00423"></a>00423 cpl_boolean (*)
-<a name="l00424"></a>00424 (cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
-<a name="l00425"></a>00425 <span class="keywordtype">int</span>, <span class="keyword">const</span> cpl_frame *,
-<a name="l00426"></a>00426 <span class="keyword">const</span> cpl_parameterlist *));
-<a name="l00427"></a>00427
-<a name="l00428"></a>00428 cpl_error_code <a class="code" href="group__irplib__utils.html#ga832676f36ecd647b77f4bb373b2d1954" title="Split the values in an image in three according to two thresholds.">irplib_image_split</a>(<span class="keyword">const</span> cpl_image *,
-<a name="l00429"></a>00429 cpl_image *, cpl_image *, cpl_image *,
-<a name="l00430"></a>00430 <span class="keywordtype">double</span>, cpl_boolean,
-<a name="l00431"></a>00431 <span class="keywordtype">double</span>, cpl_boolean,
-<a name="l00432"></a>00432 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
-<a name="l00433"></a>00433 cpl_boolean, cpl_boolean, cpl_boolean);
-<a name="l00434"></a>00434
-<a name="l00435"></a>00435 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga6b29dac884b62ab52f43dd670d4d8386" title="Dump a single CPL error at the CPL warning level.">irplib_errorstate_dump_warning</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
-<a name="l00436"></a>00436 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga901ff52a1c9dcdfcf2d2632d31064bdb" title="Dump a single CPL error at the CPL info level.">irplib_errorstate_dump_info</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
-<a name="l00437"></a>00437 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
-<a name="l00438"></a>00438 <span class="comment">/* wrapper for replace deprecated function cpl_polynomial_fit_1d_create*/</span>
-<a name="l00439"></a>00439 cpl_polynomial * irplib_polynomial_fit_1d_create(
-<a name="l00440"></a>00440 <span class="keyword">const</span> cpl_vector * x_pos,
-<a name="l00441"></a>00441 <span class="keyword">const</span> cpl_vector * values,
-<a name="l00442"></a>00442 <span class="keywordtype">int</span> degree,
-<a name="l00443"></a>00443 <span class="keywordtype">double</span> * mse
-<a name="l00444"></a>00444 );
-<a name="l00445"></a>00445 cpl_polynomial * irplib_polynomial_fit_1d_create_chiq(
-<a name="l00446"></a>00446 <span class="keyword">const</span> cpl_vector * x_pos,
-<a name="l00447"></a>00447 <span class="keyword">const</span> cpl_vector * values,
-<a name="l00448"></a>00448 <span class="keywordtype">int</span> degree,
-<a name="l00449"></a>00449 <span class="keywordtype">double</span> * rechiq
-<a name="l00450"></a>00450 );
-<a name="l00451"></a>00451 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00459"></a>00459 cpl_error_code irplib_frameset_sort(
-<a name="l00460"></a>00460 <span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
-<a name="l00461"></a>00461 <span class="keywordtype">int</span>* iindex,
-<a name="l00462"></a>00462 <span class="keywordtype">double</span>* exptime);
-<a name="l00463"></a>00463
-<a name="l00464"></a>00464 <span class="preprocessor">#endif</span>
+<a name="l00378"></a>00378 cpl_error_code <a class="code" href="group__irplib__utils.html#ga66f7adc9e165b4e934e3d57a700f55c1" title="Save an imagelist as a DFS-compliant pipeline product.">irplib_dfs_save_imagelist</a>(cpl_frameset *,
+<a name="l00379"></a>00379 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00380"></a>00380 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00381"></a>00381 <span class="keyword">const</span> cpl_imagelist *,
+<a name="l00382"></a>00382 cpl_type_bpp ,
+<a name="l00383"></a>00383 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00384"></a>00384 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00385"></a>00385 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00386"></a>00386 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00387"></a>00387 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00388"></a>00388 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00389"></a>00389
+<a name="l00390"></a>00390 cpl_error_code <a class="code" href="group__irplib__utils.html#ga62a91f8630af11164547c168660b2ade" title="Save a table as a DFS-compliant pipeline product.">irplib_dfs_save_table</a>(cpl_frameset *,
+<a name="l00391"></a>00391 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00392"></a>00392 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00393"></a>00393 <span class="keyword">const</span> cpl_table *,
+<a name="l00394"></a>00394 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00395"></a>00395 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00396"></a>00396 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00397"></a>00397 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00398"></a>00398 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00399"></a>00399 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00400"></a>00400 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00401"></a>00401
+<a name="l00402"></a>00402 cpl_error_code <a class="code" href="group__irplib__utils.html#ga1fd7c2f4c00014049b0bf4bf6814b451" title="Save an image as a DFS-compliant pipeline product.">irplib_dfs_save_image_</a>(cpl_frameset *,
+<a name="l00403"></a>00403 cpl_propertylist *,
+<a name="l00404"></a>00404 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00405"></a>00405 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00406"></a>00406 <span class="keyword">const</span> cpl_frame *,
+<a name="l00407"></a>00407 <span class="keyword">const</span> cpl_image *,
+<a name="l00408"></a>00408 cpl_type ,
+<a name="l00409"></a>00409 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00410"></a>00410 <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00411"></a>00411 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00412"></a>00412 <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00413"></a>00413 <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00414"></a>00414
+<a name="l00415"></a>00415 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#gaf9d392144014e2363054bc3f83c8e47e" title="Reset IRPLIB state.">irplib_reset</a>(<span class="keywordtype">void</span>);
+<a name="l00416"></a>00416 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#gae13f0d6b24ade506a99ac9c4bb09efde" title="Comparison function to identify different input frames.">irplib_compare_tags</a>(cpl_frame *, cpl_frame *);
+<a name="l00417"></a>00417 <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="group__irplib__utils.html#ga9fe4dca85dee68061114e26fdc72a134" title="Find the filename with the given tag in a frame set.">irplib_frameset_find_file</a>(<span class="keyword">const</span> cpl_frameset *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
+<a name="l00418"></a>00418 <span class="keyword">const</span> cpl_frame * <a class="code" href="group__irplib__utils.html#ga5b20a00f315410b49b1db1dd2417fe68" title="Find the first frame belonging to the given group.">irplib_frameset_get_first_from_group</a>(<span class="keyword">const</span> cpl_frameset *,
+<a name="l00419"></a>00419 cpl_frame_group);
+<a name="l00420"></a>00420
+<a name="l00421"></a>00421 cpl_error_code <a class="code" href="group__irplib__utils.html#gac568c70a57ef8610f5fedc9f1943a3a1" title="Find the aperture(s) with the greatest flux.">irplib_apertures_find_max_flux</a>(<span class="keyword">const</span> cpl_apertures *, <span class="keywordtype">int</span> *,
+<a name="l00422"></a>00422 <span class="keywordtype">int</span>);
+<a name="l00423"></a>00423
+<a name="l00424"></a>00424 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga09a11edf52efa78ddafce0bb4fa3b71f" title="portable isinf">irplib_isinf</a>(<span class="keywordtype">double</span> value);
+<a name="l00425"></a>00425 <span class="keywordtype">int</span> <a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(<span class="keywordtype">double</span> value);
+<a name="l00426"></a>00426
+<a name="l00427"></a>00427 cpl_error_code
+<a name="l00428"></a>00428 <a class="code" href="group__irplib__utils.html#ga3d1a791b5dc870770611c7dbf60d02df" title="Create a DFS product with one table from one or more (ASCII) file(s).">irplib_dfs_table_convert</a>(cpl_table *, cpl_frameset *, <span class="keyword">const</span> cpl_frameset *,
+<a name="l00429"></a>00429 <span class="keywordtype">int</span>, <span class="keywordtype">char</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00430"></a>00430 <span class="keyword">const</span> cpl_parameterlist *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00431"></a>00431 <span class="keyword">const</span> cpl_propertylist *, <span class="keyword">const</span> cpl_propertylist *,
+<a name="l00432"></a>00432 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00433"></a>00433 cpl_boolean (*)(cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>,
+<a name="l00434"></a>00434 <span class="keyword">const</span> cpl_frame *,
+<a name="l00435"></a>00435 <span class="keyword">const</span> cpl_parameterlist *),
+<a name="l00436"></a>00436 cpl_error_code (*)(cpl_table *,
+<a name="l00437"></a>00437 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00438"></a>00438 <span class="keyword">const</span> cpl_parameterlist *));
+<a name="l00439"></a>00439
+<a name="l00440"></a>00440 cpl_error_code <a class="code" href="group__irplib__utils.html#ga59a68df1795523d4f7653875bd9fc01d" title="Set the rows of a table with data from one or more (ASCII) files.">irplib_table_read_from_frameset</a>(cpl_table *,
+<a name="l00441"></a>00441 <span class="keyword">const</span> cpl_frameset *,
+<a name="l00442"></a>00442 <span class="keywordtype">int</span>,
+<a name="l00443"></a>00443 <span class="keywordtype">char</span>,
+<a name="l00444"></a>00444 <span class="keyword">const</span> cpl_parameterlist *,
+<a name="l00445"></a>00445 cpl_boolean (*)
+<a name="l00446"></a>00446 (cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *,
+<a name="l00447"></a>00447 <span class="keywordtype">int</span>, <span class="keyword">const</span> cpl_frame *,
+<a name="l00448"></a>00448 <span class="keyword">const</span> cpl_parameterlist *));
+<a name="l00449"></a>00449
+<a name="l00450"></a>00450 cpl_error_code <a class="code" href="group__irplib__utils.html#ga832676f36ecd647b77f4bb373b2d1954" title="Split the values in an image in three according to two thresholds.">irplib_image_split</a>(<span class="keyword">const</span> cpl_image *,
+<a name="l00451"></a>00451 cpl_image *, cpl_image *, cpl_image *,
+<a name="l00452"></a>00452 <span class="keywordtype">double</span>, cpl_boolean,
+<a name="l00453"></a>00453 <span class="keywordtype">double</span>, cpl_boolean,
+<a name="l00454"></a>00454 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
+<a name="l00455"></a>00455 cpl_boolean, cpl_boolean, cpl_boolean);
+<a name="l00456"></a>00456
+<a name="l00457"></a>00457 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga6b29dac884b62ab52f43dd670d4d8386" title="Dump a single CPL error at the CPL warning level.">irplib_errorstate_dump_warning</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
+<a name="l00458"></a>00458 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga901ff52a1c9dcdfcf2d2632d31064bdb" title="Dump a single CPL error at the CPL info level.">irplib_errorstate_dump_info</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
+<a name="l00459"></a>00459 <span class="keywordtype">void</span> <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>(<span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>, <span class="keywordtype">unsigned</span>);
+<a name="l00460"></a>00460 <span class="comment">/* wrapper for replace deprecated function cpl_polynomial_fit_1d_create*/</span>
+<a name="l00461"></a>00461 cpl_polynomial * irplib_polynomial_fit_1d_create(
+<a name="l00462"></a>00462 <span class="keyword">const</span> cpl_vector * x_pos,
+<a name="l00463"></a>00463 <span class="keyword">const</span> cpl_vector * values,
+<a name="l00464"></a>00464 <span class="keywordtype">int</span> degree,
+<a name="l00465"></a>00465 <span class="keywordtype">double</span> * mse
+<a name="l00466"></a>00466 );
+<a name="l00467"></a>00467 cpl_polynomial * irplib_polynomial_fit_1d_create_chiq(
+<a name="l00468"></a>00468 <span class="keyword">const</span> cpl_vector * x_pos,
+<a name="l00469"></a>00469 <span class="keyword">const</span> cpl_vector * values,
+<a name="l00470"></a>00470 <span class="keywordtype">int</span> degree,
+<a name="l00471"></a>00471 <span class="keywordtype">double</span> * rechiq
+<a name="l00472"></a>00472 );
+<a name="l00473"></a>00473 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00481"></a>00481 cpl_error_code irplib_frameset_sort(
+<a name="l00482"></a>00482 <span class="keyword">const</span> cpl_frameset * <span class="keyword">self</span>,
+<a name="l00483"></a>00483 <span class="keywordtype">int</span>* iindex,
+<a name="l00484"></a>00484 <span class="keywordtype">double</span>* exptime);
+<a name="l00485"></a>00485
+<a name="l00486"></a>00486 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wavecal_8c_source.html b/html/irplib__wavecal_8c_source.html
index d53958c..2e1e5ab 100644
--- a/html/irplib__wavecal_8c_source.html
+++ b/html/irplib__wavecal_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_wavecal.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal.c,v 1.46 2012/03/02 09:01:04 amodigli Exp $</span>
+<h1>irplib_wavecal.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal.c,v 1.52 2012/08/03 21:05:32 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the IRPLIB Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/02 09:01:04 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.46 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/08/03 21:05:32 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.52 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -75,7 +75,7 @@
<a name="l00065"></a>00065 cpl_vector * spectrum;
<a name="l00066"></a>00066 irplib_base_spectrum_model * param;
<a name="l00067"></a>00067 cpl_error_code (* filler)(cpl_vector *, <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00068"></a>00068 irplib_base_spectrum_model *, int);
+<a name="l00068"></a>00068 irplib_base_spectrum_model *);
<a name="l00069"></a>00069 cpl_vector * vxc;
<a name="l00070"></a>00070 <span class="keywordtype">double</span> xc;
<a name="l00071"></a>00071 <span class="keywordtype">int</span> maxxc;
@@ -104,1356 +104,1441 @@
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">double</span> irplib_gsl_correlation(<span class="keyword">const</span> gsl_vector *, <span class="keywordtype">void</span> *);
<a name="l00095"></a>00095 <span class="preprocessor">#endif</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
-<a name="l00097"></a>00097 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00101"></a>00101 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00102"></a>00102
-<a name="l00106"></a>00106 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00114"></a>00114 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00115"></a><a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25">00115</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25" title="Count the positive Y-entries in a given X-range.">irplib_bivector_count_positive</a>(<span class="keyword">const</span> cpl_bivector * <span class="keyword">self</span>,
-<a name="l00116"></a>00116 <span class="keywordtype">double</span> x_min,
-<a name="l00117"></a>00117 <span class="keywordtype">double</span> x_max)
-<a name="l00118"></a>00118 {
-<a name="l00119"></a>00119
-<a name="l00120"></a>00120 <span class="keyword">const</span> <span class="keywordtype">int</span> nself = cpl_bivector_get_size(<span class="keyword">self</span>);
-<a name="l00121"></a>00121 <span class="keyword">const</span> <span class="keywordtype">double</span> * px = cpl_bivector_get_x_data_const(<span class="keyword">self</span>);
-<a name="l00122"></a>00122 <span class="keyword">const</span> <span class="keywordtype">double</span> * py = cpl_bivector_get_y_data_const(<span class="keyword">self</span>);
-<a name="l00123"></a>00123 <span class="keywordtype">int</span> npos = 0;
-<a name="l00124"></a>00124 <span class="keywordtype">int</span> i = 0;
-<a name="l00125"></a>00125
-<a name="l00126"></a>00126 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, -1);
-<a name="l00127"></a>00127 cpl_ensure(x_min <= x_max, CPL_ERROR_ILLEGAL_INPUT, -2);
-<a name="l00128"></a>00128
-<a name="l00129"></a>00129 <span class="comment">/* FIXME: Use cpl_vector_find() */</span>
-<a name="l00130"></a>00130 <span class="keywordflow">while</span> (i < nself && px[i] < x_min) i++;
-<a name="l00131"></a>00131 <span class="keywordflow">while</span> (i < nself && px[i] < x_max)
-<a name="l00132"></a>00132 <span class="keywordflow">if</span> (py[i++] > 0) npos++;
-<a name="l00133"></a>00133
-<a name="l00134"></a>00134 <span class="keywordflow">return</span> npos;
-<a name="l00135"></a>00135 }
-<a name="l00136"></a>00136
-<a name="l00137"></a>00137 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00147"></a>00147 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00148"></a><a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb">00148</a> cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb" title="Fit a 2D-dispersion from an image of wavelengths.">irplib_polynomial_fit_2d_dispersion</a>(cpl_polynomial * <span class="keyword">self</span>,
-<a name="l00149"></a>00149 <span class="keyword">const</span> cpl_image * imgwave,
-<a name="l00150"></a>00150 <span class="keywordtype">int</span> fitdeg, <span class="keywordtype">double</span> * presid)
-<a name="l00151"></a>00151 {
-<a name="l00152"></a>00152
-<a name="l00153"></a>00153 <span class="keyword">const</span> <span class="keywordtype">int</span> nx = cpl_image_get_size_x(imgwave);
-<a name="l00154"></a>00154 <span class="keyword">const</span> <span class="keywordtype">int</span> ny = cpl_image_get_size_y(imgwave);
-<a name="l00155"></a>00155 <span class="keyword">const</span> <span class="keywordtype">int</span> nbad = cpl_image_count_rejected(imgwave);
-<a name="l00156"></a>00156 <span class="keyword">const</span> <span class="keywordtype">int</span> nsamp = nx * ny - nbad;
-<a name="l00157"></a>00157 cpl_matrix * xy_pos;
-<a name="l00158"></a>00158 <span class="keywordtype">double</span> * xdata;
-<a name="l00159"></a>00159 <span class="keywordtype">double</span> * ydata;
-<a name="l00160"></a>00160 cpl_vector * wlen;
-<a name="l00161"></a>00161 <span class="keywordtype">double</span> * dwlen;
-<a name="l00162"></a>00162 <span class="keyword">const</span> cpl_size nfitdeg = (cpl_size)fitdeg;
-<a name="l00163"></a>00163 <span class="keywordtype">int</span> i, j;
-<a name="l00164"></a>00164 <span class="keywordtype">int</span> k = 0;
-<a name="l00165"></a>00165
-<a name="l00166"></a>00166 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00167"></a>00167 cpl_ensure_code(imgwave != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00168"></a>00168 cpl_ensure_code(presid != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00169"></a>00169 cpl_ensure_code(fitdeg > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00170"></a>00170
-<a name="l00171"></a>00171 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 2,
-<a name="l00172"></a>00172 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00173"></a>00173
-<a name="l00174"></a>00174 xy_pos = cpl_matrix_new(2, nsamp);
-<a name="l00175"></a>00175 xdata = cpl_matrix_get_data(xy_pos);
-<a name="l00176"></a>00176 ydata = xdata + nsamp;
+<a name="l00097"></a>00097 <span class="keyword">static</span> cpl_error_code
+<a name="l00098"></a>00098 irplib_polynomial_find_1d_from_correlation_(cpl_polynomial *, <span class="keywordtype">int</span>,
+<a name="l00099"></a>00099 <span class="keyword">const</span> cpl_vector *,
+<a name="l00100"></a>00100 irplib_base_spectrum_model *,
+<a name="l00101"></a>00101 cpl_error_code (*)
+<a name="l00102"></a>00102 (cpl_vector *,
+<a name="l00103"></a>00103 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00104"></a>00104 irplib_base_spectrum_model *),
+<a name="l00105"></a>00105 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>,
+<a name="l00106"></a>00106 <span class="keywordtype">double</span> *, cpl_boolean *);
+<a name="l00107"></a>00107
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00113"></a>00113 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00114"></a>00114
+<a name="l00118"></a>00118 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00126"></a>00126 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00127"></a><a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25">00127</a> <span class="keywordtype">int</span> <a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25" title="Count the positive Y-entries in a given X-range.">irplib_bivector_count_positive</a>(<span class="keyword">const</span> cpl_bivector * <span class="keyword">self</span>,
+<a name="l00128"></a>00128 <span class="keywordtype">double</span> x_min,
+<a name="l00129"></a>00129 <span class="keywordtype">double</span> x_max)
+<a name="l00130"></a>00130 {
+<a name="l00131"></a>00131
+<a name="l00132"></a>00132 <span class="keyword">const</span> <span class="keywordtype">int</span> nself = cpl_bivector_get_size(<span class="keyword">self</span>);
+<a name="l00133"></a>00133 <span class="keyword">const</span> <span class="keywordtype">double</span> * px = cpl_bivector_get_x_data_const(<span class="keyword">self</span>);
+<a name="l00134"></a>00134 <span class="keyword">const</span> <span class="keywordtype">double</span> * py = cpl_bivector_get_y_data_const(<span class="keyword">self</span>);
+<a name="l00135"></a>00135 <span class="keywordtype">int</span> npos = 0;
+<a name="l00136"></a>00136 <span class="keywordtype">int</span> i = 0;
+<a name="l00137"></a>00137
+<a name="l00138"></a>00138 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, -1);
+<a name="l00139"></a>00139 cpl_ensure(x_min <= x_max, CPL_ERROR_ILLEGAL_INPUT, -2);
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 <span class="comment">/* FIXME: Use cpl_vector_find() */</span>
+<a name="l00142"></a>00142 <span class="keywordflow">while</span> (i < nself && px[i] < x_min) i++;
+<a name="l00143"></a>00143 <span class="keywordflow">while</span> (i < nself && px[i] < x_max)
+<a name="l00144"></a>00144 <span class="keywordflow">if</span> (py[i++] > 0) npos++;
+<a name="l00145"></a>00145
+<a name="l00146"></a>00146 <span class="keywordflow">return</span> npos;
+<a name="l00147"></a>00147 }
+<a name="l00148"></a>00148
+<a name="l00149"></a>00149 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00159"></a>00159 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00160"></a><a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb">00160</a> cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb" title="Fit a 2D-dispersion from an image of wavelengths.">irplib_polynomial_fit_2d_dispersion</a>(cpl_polynomial * <span class="keyword">self</span>,
+<a name="l00161"></a>00161 <span class="keyword">const</span> cpl_image * imgwave,
+<a name="l00162"></a>00162 <span class="keywordtype">int</span> fitdeg, <span class="keywordtype">double</span> * presid)
+<a name="l00163"></a>00163 {
+<a name="l00164"></a>00164
+<a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">int</span> nx = cpl_image_get_size_x(imgwave);
+<a name="l00166"></a>00166 <span class="keyword">const</span> <span class="keywordtype">int</span> ny = cpl_image_get_size_y(imgwave);
+<a name="l00167"></a>00167 <span class="keyword">const</span> <span class="keywordtype">int</span> nbad = cpl_image_count_rejected(imgwave);
+<a name="l00168"></a>00168 <span class="keyword">const</span> <span class="keywordtype">int</span> nsamp = nx * ny - nbad;
+<a name="l00169"></a>00169 cpl_matrix * xy_pos;
+<a name="l00170"></a>00170 <span class="keywordtype">double</span> * xdata;
+<a name="l00171"></a>00171 <span class="keywordtype">double</span> * ydata;
+<a name="l00172"></a>00172 cpl_vector * wlen;
+<a name="l00173"></a>00173 <span class="keywordtype">double</span> * dwlen;
+<a name="l00174"></a>00174 <span class="keyword">const</span> cpl_size nfitdeg = (cpl_size)fitdeg;
+<a name="l00175"></a>00175 <span class="keywordtype">int</span> i, j;
+<a name="l00176"></a>00176 <span class="keywordtype">int</span> k = 0;
<a name="l00177"></a>00177
-<a name="l00178"></a>00178 dwlen = (<span class="keywordtype">double</span>*)cpl_malloc(nsamp * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
-<a name="l00179"></a>00179 wlen = cpl_vector_wrap(nsamp, dwlen);
-<a name="l00180"></a>00180
-<a name="l00181"></a>00181 <span class="keywordflow">for</span> (i=1; i <= nx; i++) {
-<a name="l00182"></a>00182 <span class="keywordflow">for</span> (j=1; j <= ny; j++) {
-<a name="l00183"></a>00183 <span class="keywordtype">int</span> is_bad;
-<a name="l00184"></a>00184 <span class="keyword">const</span> <span class="keywordtype">double</span> value = cpl_image_get(imgwave, i, j, &is_bad);
-<a name="l00185"></a>00185 <span class="keywordflow">if</span> (!is_bad) {
-<a name="l00186"></a>00186 xdata[k] = i;
-<a name="l00187"></a>00187 ydata[k] = j;
-<a name="l00188"></a>00188 dwlen[k] = value;
-<a name="l00189"></a>00189 k++;
-<a name="l00190"></a>00190 }
-<a name="l00191"></a>00191 }
-<a name="l00192"></a>00192 }
-<a name="l00193"></a>00193
-<a name="l00194"></a>00194 cpl_msg_info(cpl_func, <span class="stringliteral">"Fitting 2D polynomial to %d X %d image, ignoring "</span>
-<a name="l00195"></a>00195 <span class="stringliteral">"%d poorly calibrated pixels"</span>, nx, ny, nbad);
-<a name="l00196"></a>00196
-<a name="l00197"></a>00197 <span class="keywordflow">if</span> (cpl_polynomial_fit(<span class="keyword">self</span>, xy_pos, NULL, wlen, NULL, CPL_FALSE, NULL,
-<a name="l00198"></a>00198 &nfitdeg) == CPL_ERROR_NONE && presid != NULL) {
-<a name="l00199"></a>00199 cpl_vector_fill_polynomial_fit_residual(wlen, wlen, NULL, <span class="keyword">self</span>, xy_pos,
-<a name="l00200"></a>00200 NULL);
-<a name="l00201"></a>00201 *presid = cpl_vector_product(wlen, wlen)/nsamp;
-<a name="l00202"></a>00202 }
-<a name="l00203"></a>00203 cpl_matrix_delete(xy_pos);
-<a name="l00204"></a>00204 cpl_vector_delete(wlen);
+<a name="l00178"></a>00178 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00179"></a>00179 cpl_ensure_code(imgwave != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00180"></a>00180 cpl_ensure_code(presid != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00181"></a>00181 cpl_ensure_code(fitdeg > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00182"></a>00182
+<a name="l00183"></a>00183 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 2,
+<a name="l00184"></a>00184 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00185"></a>00185
+<a name="l00186"></a>00186 xy_pos = cpl_matrix_new(2, nsamp);
+<a name="l00187"></a>00187 xdata = cpl_matrix_get_data(xy_pos);
+<a name="l00188"></a>00188 ydata = xdata + nsamp;
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 dwlen = (<span class="keywordtype">double</span>*)cpl_malloc(nsamp * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
+<a name="l00191"></a>00191 wlen = cpl_vector_wrap(nsamp, dwlen);
+<a name="l00192"></a>00192
+<a name="l00193"></a>00193 <span class="keywordflow">for</span> (i=1; i <= nx; i++) {
+<a name="l00194"></a>00194 <span class="keywordflow">for</span> (j=1; j <= ny; j++) {
+<a name="l00195"></a>00195 <span class="keywordtype">int</span> is_bad;
+<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">double</span> value = cpl_image_get(imgwave, i, j, &is_bad);
+<a name="l00197"></a>00197 <span class="keywordflow">if</span> (!is_bad) {
+<a name="l00198"></a>00198 xdata[k] = i;
+<a name="l00199"></a>00199 ydata[k] = j;
+<a name="l00200"></a>00200 dwlen[k] = value;
+<a name="l00201"></a>00201 k++;
+<a name="l00202"></a>00202 }
+<a name="l00203"></a>00203 }
+<a name="l00204"></a>00204 }
<a name="l00205"></a>00205
-<a name="l00206"></a>00206 cpl_ensure_code(k == nsamp, CPL_ERROR_UNSPECIFIED);
-<a name="l00207"></a>00207
-<a name="l00208"></a>00208 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00209"></a>00209 }
-<a name="l00210"></a>00210
-<a name="l00211"></a>00211
-<a name="l00212"></a>00212 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00230"></a>00230 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00231"></a>00231 cpl_error_code
-<a name="l00232"></a><a class="code" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972">00232</a> <a class="code" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>(cpl_polynomial * <span class="keyword">self</span>,
-<a name="l00233"></a>00233 <span class="keywordtype">int</span> maxdeg,
-<a name="l00234"></a>00234 <span class="keyword">const</span> cpl_vector * obs,
-<a name="l00235"></a>00235 irplib_base_spectrum_model * model,
-<a name="l00236"></a>00236 cpl_error_code (* filler)
-<a name="l00237"></a>00237 (cpl_vector *,
-<a name="l00238"></a>00238 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00239"></a>00239 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00240"></a>00240 <span class="keywordtype">double</span> pixtol,
-<a name="l00241"></a>00241 <span class="keywordtype">double</span> pixstep,
-<a name="l00242"></a>00242 <span class="keywordtype">int</span> hsize,
-<a name="l00243"></a>00243 <span class="keywordtype">int</span> maxite,
-<a name="l00244"></a>00244 <span class="keywordtype">double</span> * pxc)
-<a name="l00245"></a>00245 {
-<a name="l00246"></a>00246
-<a name="l00247"></a>00247 <span class="preprocessor">#ifdef HAVE_GSL</span>
-<a name="l00248"></a>00248 <span class="preprocessor"></span> <span class="keyword">const</span> gsl_multimin_fminimizer_type * T = gsl_multimin_fminimizer_nmsimplex;
-<a name="l00249"></a>00249 gsl_multimin_fminimizer * minimizer;
-<a name="l00250"></a>00250 gsl_multimin_function my_func;
-<a name="l00251"></a>00251 irplib_multimin data;
-<a name="l00252"></a>00252 gsl_vector * dispgsl;
-<a name="l00253"></a>00253 gsl_vector * stepsize;
-<a name="l00254"></a>00254 gsl_vector * dispprev;
-<a name="l00255"></a>00255 <span class="keywordtype">int</span> status = GSL_CONTINUE;
-<a name="l00256"></a>00256 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
-<a name="l00257"></a>00257 <span class="keyword">const</span> cpl_size nfit = maxdeg + 1;
-<a name="l00258"></a>00258 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l00259"></a>00259 <span class="comment">/* Convert pixel step to wavelength step on detector center */</span>
-<a name="l00260"></a>00260 <span class="keyword">const</span> <span class="keywordtype">double</span> wlstep =
-<a name="l00261"></a>00261 cpl_polynomial_eval_1d_diff(<span class="keyword">self</span>, 0.5 * (nobs + pixstep),
-<a name="l00262"></a>00262 0.5 * (nobs - pixstep), NULL);
-<a name="l00263"></a>00263 <span class="keywordtype">double</span> wlstepi = wlstep;
-<a name="l00264"></a>00264 <span class="keywordtype">double</span> size;
-<a name="l00265"></a>00265 <span class="keywordtype">int</span> iter;
-<a name="l00266"></a>00266 cpl_size i;
+<a name="l00206"></a>00206 cpl_msg_info(cpl_func, <span class="stringliteral">"Fitting 2D polynomial to %d X %d image, ignoring "</span>
+<a name="l00207"></a>00207 <span class="stringliteral">"%d poorly calibrated pixels"</span>, nx, ny, nbad);
+<a name="l00208"></a>00208
+<a name="l00209"></a>00209 <span class="keywordflow">if</span> (cpl_polynomial_fit(<span class="keyword">self</span>, xy_pos, NULL, wlen, NULL, CPL_FALSE, NULL,
+<a name="l00210"></a>00210 &nfitdeg) == CPL_ERROR_NONE && presid != NULL) {
+<a name="l00211"></a>00211 cpl_vector_fill_polynomial_fit_residual(wlen, wlen, NULL, <span class="keyword">self</span>, xy_pos,
+<a name="l00212"></a>00212 NULL);
+<a name="l00213"></a>00213 *presid = cpl_vector_product(wlen, wlen)/nsamp;
+<a name="l00214"></a>00214 }
+<a name="l00215"></a>00215 cpl_matrix_delete(xy_pos);
+<a name="l00216"></a>00216 cpl_vector_delete(wlen);
+<a name="l00217"></a>00217
+<a name="l00218"></a>00218 cpl_ensure_code(k == nsamp, CPL_ERROR_UNSPECIFIED);
+<a name="l00219"></a>00219
+<a name="l00220"></a>00220 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00221"></a>00221 }
+<a name="l00222"></a>00222
+<a name="l00223"></a>00223
+<a name="l00224"></a>00224 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00242"></a>00242 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00243"></a>00243 cpl_error_code
+<a name="l00244"></a><a class="code" href="group__irplib__wavecal.html#ga8f49c4927c50a461288e8f19720dff86">00244</a> <a class="code" href="group__irplib__wavecal.html#ga8f49c4927c50a461288e8f19720dff86" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>(cpl_polynomial * <span class="keyword">self</span>,
+<a name="l00245"></a>00245 <span class="keywordtype">int</span> maxdeg,
+<a name="l00246"></a>00246 <span class="keyword">const</span> cpl_vector * obs,
+<a name="l00247"></a>00247 irplib_base_spectrum_model * model,
+<a name="l00248"></a>00248 cpl_error_code (* filler)
+<a name="l00249"></a>00249 (cpl_vector *,
+<a name="l00250"></a>00250 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00251"></a>00251 irplib_base_spectrum_model *),
+<a name="l00252"></a>00252 <span class="keywordtype">double</span> pixtol,
+<a name="l00253"></a>00253 <span class="keywordtype">double</span> pixstep,
+<a name="l00254"></a>00254 <span class="keywordtype">int</span> hsize,
+<a name="l00255"></a>00255 <span class="keywordtype">int</span> maxite,
+<a name="l00256"></a>00256 <span class="keywordtype">double</span> * pxc)
+<a name="l00257"></a>00257 {
+<a name="l00258"></a>00258 cpl_boolean restart = CPL_FALSE;
+<a name="l00259"></a>00259 <span class="keyword">const</span> cpl_error_code error = irplib_polynomial_find_1d_from_correlation_
+<a name="l00260"></a>00260 (<span class="keyword">self</span>, maxdeg, obs, model, filler, pixtol, pixstep, hsize, maxite, pxc,
+<a name="l00261"></a>00261 &restart);
+<a name="l00262"></a>00262
+<a name="l00263"></a>00263 <span class="keywordflow">return</span> error ? cpl_error_set_where(cpl_func) :
+<a name="l00264"></a>00264 (restart ? cpl_error_set(cpl_func, CPL_ERROR_CONTINUE)
+<a name="l00265"></a>00265 : CPL_ERROR_NONE);
+<a name="l00266"></a>00266 }
<a name="l00267"></a>00267
-<a name="l00268"></a>00268 <span class="preprocessor">#endif</span>
-<a name="l00269"></a>00269 <span class="preprocessor"></span>
-<a name="l00270"></a>00270 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00271"></a>00271 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00272"></a>00272 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00273"></a>00273 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00274"></a>00274 cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00275"></a>00275
-<a name="l00276"></a>00276 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 1,
-<a name="l00277"></a>00277 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00278"></a>00278
-<a name="l00279"></a>00279 cpl_ensure_code(cpl_polynomial_get_degree(<span class="keyword">self</span>) > 0,
-<a name="l00280"></a>00280 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00281"></a>00281
-<a name="l00282"></a>00282 cpl_ensure_code(maxdeg >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00283"></a>00283 cpl_ensure_code(pixtol > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00284"></a>00284 cpl_ensure_code(pixstep > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00285"></a>00285 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00286"></a>00286 cpl_ensure_code(maxite >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00287"></a>00287
-<a name="l00288"></a>00288 <span class="preprocessor">#ifndef HAVE_GSL</span>
-<a name="l00289"></a>00289 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE,
-<a name="l00290"></a>00290 <span class="stringliteral">"GSL is not available"</span>);
-<a name="l00291"></a>00291 <span class="preprocessor">#else</span>
-<a name="l00292"></a>00292 <span class="preprocessor"></span>
-<a name="l00293"></a>00293 minimizer = gsl_multimin_fminimizer_alloc(T, (<span class="keywordtype">size_t</span>)nfit);
-<a name="l00294"></a>00294
-<a name="l00295"></a>00295 cpl_ensure_code(minimizer != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00296"></a>00296
-<a name="l00297"></a>00297 dispgsl = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
-<a name="l00298"></a>00298 stepsize = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
-<a name="l00299"></a>00299 dispprev = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
-<a name="l00300"></a>00300
-<a name="l00301"></a>00301 <span class="keywordflow">for</span> (i=0; i < nfit; i++) {
-<a name="l00302"></a>00302 <span class="keyword">const</span> <span class="keywordtype">double</span> value = cpl_polynomial_get_coeff(<span class="keyword">self</span>, &i);
-<a name="l00303"></a>00303 gsl_vector_set(dispgsl, (<span class="keywordtype">size_t</span>)i, value);
-<a name="l00304"></a>00304 gsl_vector_set(stepsize, (<span class="keywordtype">size_t</span>)i, wlstepi);
-<a name="l00305"></a>00305 wlstepi /= (double)nobs;
-<a name="l00306"></a>00306 }
-<a name="l00307"></a>00307
-<a name="l00308"></a>00308 my_func.n = nfit;
-<a name="l00309"></a>00309 my_func.f = &irplib_gsl_correlation;
-<a name="l00310"></a>00310 my_func.params = (<span class="keywordtype">void</span> *)(&data);
-<a name="l00311"></a>00311
-<a name="l00312"></a>00312 data.observed = obs;
-<a name="l00313"></a>00313 data.disp1d = <span class="keyword">self</span>;
-<a name="l00314"></a>00314 data.spectrum = cpl_vector_new(nobs + 2 * hsize);
-<a name="l00315"></a>00315 data.vxc = cpl_vector_new(1 + 2 * hsize);
-<a name="l00316"></a>00316 data.param = model;
-<a name="l00317"></a>00317 data.filler = filler;
-<a name="l00318"></a>00318 data.maxxc = 0; <span class="comment">/* Output */</span>
-<a name="l00319"></a>00319 data.ishift = 0; <span class="comment">/* Output */</span>
-<a name="l00320"></a>00320 data.mxc = -1.0; <span class="comment">/* Output */</span>
-<a name="l00321"></a>00321 data.mdisp = NULL; <span class="comment">/* Output */</span>
-<a name="l00322"></a>00322
-<a name="l00323"></a>00323 gsl_multimin_fminimizer_set (minimizer, &my_func, dispgsl, stepsize);
-<a name="l00324"></a>00324
-<a name="l00325"></a>00325 <span class="keywordflow">for</span> (iter = 0; status == GSL_CONTINUE && iter < maxite; iter++) {
-<a name="l00326"></a>00326
-<a name="l00327"></a>00327 <span class="keyword">const</span> <span class="keywordtype">double</span> fprev = minimizer->fval;
-<a name="l00328"></a>00328
-<a name="l00329"></a>00329 gsl_vector_memcpy(dispprev, minimizer->x);
-<a name="l00330"></a>00330 status = gsl_multimin_fminimizer_iterate(minimizer);
-<a name="l00331"></a>00331
-<a name="l00332"></a>00332 <span class="keywordflow">if</span> (status || !cpl_errorstate_is_equal(prestate)) <span class="keywordflow">break</span>;
-<a name="l00333"></a>00333
-<a name="l00334"></a>00334 size = gsl_multimin_fminimizer_size (minimizer);
-<a name="l00335"></a>00335 status = gsl_multimin_test_size (size, pixtol);
-<a name="l00336"></a>00336
-<a name="l00337"></a>00337 <span class="keywordflow">if</span> (status == GSL_SUCCESS) {
-<a name="l00338"></a>00338 cpl_msg_debug(cpl_func, <span class="stringliteral">"converged to minimum at"</span>);
-<a name="l00339"></a>00339
-<a name="l00340"></a>00340 <span class="keywordflow">if</span> (nfit == 0) {
-<a name="l00341"></a>00341 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g df() = %g size = %g"</span>,
-<a name="l00342"></a>00342 iter,
-<a name="l00343"></a>00343 gsl_vector_get (minimizer->x, 0)
-<a name="l00344"></a>00344 - gsl_vector_get (dispprev, 0),
-<a name="l00345"></a>00345 minimizer->fval - fprev, size);
-<a name="l00346"></a>00346 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (nfit == 1) {
-<a name="l00347"></a>00347 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g %g df() = %g size = %g"</span>,
-<a name="l00348"></a>00348 iter,
-<a name="l00349"></a>00349 gsl_vector_get (minimizer->x, 0)
-<a name="l00350"></a>00350 - gsl_vector_get (dispprev, 0),
-<a name="l00351"></a>00351 gsl_vector_get (minimizer->x, 1)
-<a name="l00352"></a>00352 - gsl_vector_get (dispprev, 1),
-<a name="l00353"></a>00353 minimizer->fval - fprev, size);
-<a name="l00354"></a>00354 } <span class="keywordflow">else</span> {
-<a name="l00355"></a>00355 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g %g %g df() = %g size = %g"</span>,
-<a name="l00356"></a>00356 iter,
-<a name="l00357"></a>00357 gsl_vector_get (minimizer->x, 0)
-<a name="l00358"></a>00358 - gsl_vector_get (dispprev, 0),
-<a name="l00359"></a>00359 gsl_vector_get (minimizer->x, 1)
-<a name="l00360"></a>00360 - gsl_vector_get (dispprev, 1),
-<a name="l00361"></a>00361 gsl_vector_get (minimizer->x, 2)
-<a name="l00362"></a>00362 - gsl_vector_get (dispprev, 2),
-<a name="l00363"></a>00363 minimizer->fval - fprev, size);
-<a name="l00364"></a>00364 }
-<a name="l00365"></a>00365 }
-<a name="l00366"></a>00366 }
-<a name="l00367"></a>00367
-<a name="l00368"></a>00368 <span class="keywordflow">if</span> (status == GSL_SUCCESS && cpl_errorstate_is_equal(prestate)) {
-<a name="l00369"></a>00369 <span class="keywordflow">if</span> (data.mxc > -minimizer->fval) {
-<a name="l00370"></a>00370 *pxc = data.mxc;
-<a name="l00371"></a>00371 cpl_msg_warning(cpl_func, <span class="stringliteral">"Local maximum: %g(%d) > %g"</span>,
-<a name="l00372"></a>00372 data.mxc, data.ishift, -minimizer->fval);
-<a name="l00373"></a>00373 cpl_polynomial_shift_1d(data.mdisp, 0, (<span class="keywordtype">double</span>)data.ishift);
-<a name="l00374"></a>00374 cpl_polynomial_copy(<span class="keyword">self</span>, data.mdisp);
-<a name="l00375"></a>00375 status = GSL_CONTINUE;
-<a name="l00376"></a>00376 } <span class="keywordflow">else</span> {
-<a name="l00377"></a>00377 *pxc = -minimizer->fval;
-<a name="l00378"></a>00378 <span class="keywordflow">for</span> (i=0; i < nfit; i++) {
-<a name="l00379"></a>00379 <span class="keyword">const</span> <span class="keywordtype">double</span> value = gsl_vector_get(minimizer->x, i);
-<a name="l00380"></a>00380 cpl_polynomial_set_coeff(<span class="keyword">self</span>, &i, value);
-<a name="l00381"></a>00381 }
-<a name="l00382"></a>00382 }
-<a name="l00383"></a>00383 }
+<a name="l00268"></a>00268 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00289"></a>00289 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00290"></a>00290 <span class="keyword">static</span> cpl_error_code
+<a name="l00291"></a>00291 irplib_polynomial_find_1d_from_correlation_(cpl_polynomial * <span class="keyword">self</span>,
+<a name="l00292"></a>00292 <span class="keywordtype">int</span> maxdeg,
+<a name="l00293"></a>00293 <span class="keyword">const</span> cpl_vector * obs,
+<a name="l00294"></a>00294 irplib_base_spectrum_model * model,
+<a name="l00295"></a>00295 cpl_error_code (* filler)
+<a name="l00296"></a>00296 (cpl_vector *,
+<a name="l00297"></a>00297 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00298"></a>00298 irplib_base_spectrum_model *),
+<a name="l00299"></a>00299 <span class="keywordtype">double</span> pixtol,
+<a name="l00300"></a>00300 <span class="keywordtype">double</span> pixstep,
+<a name="l00301"></a>00301 <span class="keywordtype">int</span> hsize,
+<a name="l00302"></a>00302 <span class="keywordtype">int</span> maxite,
+<a name="l00303"></a>00303 <span class="keywordtype">double</span> * pxc,
+<a name="l00304"></a>00304 cpl_boolean * prestart)
+<a name="l00305"></a>00305 {
+<a name="l00306"></a>00306
+<a name="l00307"></a>00307 <span class="preprocessor">#ifdef HAVE_GSL</span>
+<a name="l00308"></a>00308 <span class="preprocessor"></span> <span class="keyword">const</span> gsl_multimin_fminimizer_type * T = gsl_multimin_fminimizer_nmsimplex;
+<a name="l00309"></a>00309 gsl_multimin_fminimizer * minimizer;
+<a name="l00310"></a>00310 gsl_multimin_function my_func;
+<a name="l00311"></a>00311 irplib_multimin data;
+<a name="l00312"></a>00312 gsl_vector * dispgsl;
+<a name="l00313"></a>00313 gsl_vector * stepsize;
+<a name="l00314"></a>00314 gsl_vector * dispprev;
+<a name="l00315"></a>00315 <span class="keywordtype">int</span> status = GSL_CONTINUE;
+<a name="l00316"></a>00316 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
+<a name="l00317"></a>00317 <span class="keyword">const</span> cpl_size nfit = maxdeg + 1;
+<a name="l00318"></a>00318 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l00319"></a>00319 <span class="comment">/* Convert pixel step to wavelength step on detector center */</span>
+<a name="l00320"></a>00320 <span class="keyword">const</span> <span class="keywordtype">double</span> wlstep =
+<a name="l00321"></a>00321 cpl_polynomial_eval_1d_diff(<span class="keyword">self</span>, 0.5 * (nobs + pixstep),
+<a name="l00322"></a>00322 0.5 * (nobs - pixstep), NULL);
+<a name="l00323"></a>00323 <span class="keywordtype">double</span> wlstepi = wlstep;
+<a name="l00324"></a>00324 <span class="keywordtype">double</span> size;
+<a name="l00325"></a>00325 <span class="keywordtype">int</span> iter;
+<a name="l00326"></a>00326 cpl_size i;
+<a name="l00327"></a>00327
+<a name="l00328"></a>00328 <span class="preprocessor">#endif</span>
+<a name="l00329"></a>00329 <span class="preprocessor"></span>
+<a name="l00330"></a>00330 cpl_ensure_code(prestart != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00331"></a>00331 *prestart = CPL_FALSE;
+<a name="l00332"></a>00332 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00333"></a>00333 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00334"></a>00334 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00335"></a>00335 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00336"></a>00336 cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00337"></a>00337
+<a name="l00338"></a>00338 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 1,
+<a name="l00339"></a>00339 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00340"></a>00340
+<a name="l00341"></a>00341 cpl_ensure_code(cpl_polynomial_get_degree(<span class="keyword">self</span>) > 0,
+<a name="l00342"></a>00342 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00343"></a>00343
+<a name="l00344"></a>00344 cpl_ensure_code(maxdeg >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00345"></a>00345 cpl_ensure_code(pixtol > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00346"></a>00346 cpl_ensure_code(pixstep > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00347"></a>00347 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00348"></a>00348 cpl_ensure_code(maxite >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00349"></a>00349
+<a name="l00350"></a>00350 <span class="preprocessor">#ifndef HAVE_GSL</span>
+<a name="l00351"></a>00351 <span class="preprocessor"></span> <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE,
+<a name="l00352"></a>00352 <span class="stringliteral">"GSL is not available"</span>);
+<a name="l00353"></a>00353 <span class="preprocessor">#else</span>
+<a name="l00354"></a>00354 <span class="preprocessor"></span>
+<a name="l00355"></a>00355 minimizer = gsl_multimin_fminimizer_alloc(T, (<span class="keywordtype">size_t</span>)nfit);
+<a name="l00356"></a>00356
+<a name="l00357"></a>00357 cpl_ensure_code(minimizer != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00358"></a>00358
+<a name="l00359"></a>00359 dispgsl = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
+<a name="l00360"></a>00360 stepsize = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
+<a name="l00361"></a>00361 dispprev = gsl_vector_alloc((<span class="keywordtype">size_t</span>)nfit);
+<a name="l00362"></a>00362
+<a name="l00363"></a>00363 <span class="keywordflow">for</span> (i=0; i < nfit; i++) {
+<a name="l00364"></a>00364 <span class="keyword">const</span> <span class="keywordtype">double</span> value = cpl_polynomial_get_coeff(<span class="keyword">self</span>, &i);
+<a name="l00365"></a>00365 gsl_vector_set(dispgsl, (<span class="keywordtype">size_t</span>)i, value);
+<a name="l00366"></a>00366 gsl_vector_set(stepsize, (<span class="keywordtype">size_t</span>)i, wlstepi);
+<a name="l00367"></a>00367 wlstepi /= (double)nobs;
+<a name="l00368"></a>00368 }
+<a name="l00369"></a>00369
+<a name="l00370"></a>00370 my_func.n = nfit;
+<a name="l00371"></a>00371 my_func.f = &irplib_gsl_correlation;
+<a name="l00372"></a>00372 my_func.params = (<span class="keywordtype">void</span> *)(&data);
+<a name="l00373"></a>00373
+<a name="l00374"></a>00374 data.observed = obs;
+<a name="l00375"></a>00375 data.disp1d = <span class="keyword">self</span>;
+<a name="l00376"></a>00376 data.spectrum = cpl_vector_new(nobs + 2 * hsize);
+<a name="l00377"></a>00377 data.vxc = cpl_vector_new(1 + 2 * hsize);
+<a name="l00378"></a>00378 data.param = model;
+<a name="l00379"></a>00379 data.filler = filler;
+<a name="l00380"></a>00380 data.maxxc = 0; <span class="comment">/* Output */</span>
+<a name="l00381"></a>00381 data.ishift = 0; <span class="comment">/* Output */</span>
+<a name="l00382"></a>00382 data.mxc = -1.0; <span class="comment">/* Output */</span>
+<a name="l00383"></a>00383 data.mdisp = NULL; <span class="comment">/* Output */</span>
<a name="l00384"></a>00384
-<a name="l00385"></a>00385 cpl_vector_delete(data.spectrum);
-<a name="l00386"></a>00386 cpl_vector_delete(data.vxc);
-<a name="l00387"></a>00387 cpl_polynomial_delete(data.mdisp);
-<a name="l00388"></a>00388 gsl_multimin_fminimizer_free(minimizer);
-<a name="l00389"></a>00389 gsl_vector_free(dispgsl);
-<a name="l00390"></a>00390 gsl_vector_free(dispprev);
-<a name="l00391"></a>00391 gsl_vector_free(stepsize);
-<a name="l00392"></a>00392
-<a name="l00393"></a>00393 cpl_ensure_code(status != GSL_CONTINUE, CPL_ERROR_CONTINUE);
-<a name="l00394"></a>00394 cpl_ensure_code(status == GSL_SUCCESS, CPL_ERROR_DATA_NOT_FOUND);
-<a name="l00395"></a>00395 cpl_ensure_code(cpl_errorstate_is_equal(prestate), cpl_error_get_code());
-<a name="l00396"></a>00396
-<a name="l00397"></a>00397 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00398"></a>00398 <span class="preprocessor">#endif</span>
-<a name="l00399"></a>00399 <span class="preprocessor"></span>}
-<a name="l00400"></a>00400
+<a name="l00385"></a>00385 gsl_multimin_fminimizer_set (minimizer, &my_func, dispgsl, stepsize);
+<a name="l00386"></a>00386
+<a name="l00387"></a>00387 <span class="keywordflow">for</span> (iter = 0; status == GSL_CONTINUE && iter < maxite; iter++) {
+<a name="l00388"></a>00388
+<a name="l00389"></a>00389 <span class="keyword">const</span> <span class="keywordtype">double</span> fprev = minimizer->fval;
+<a name="l00390"></a>00390
+<a name="l00391"></a>00391 gsl_vector_memcpy(dispprev, minimizer->x);
+<a name="l00392"></a>00392 status = gsl_multimin_fminimizer_iterate(minimizer);
+<a name="l00393"></a>00393
+<a name="l00394"></a>00394 <span class="keywordflow">if</span> (status || !cpl_errorstate_is_equal(prestate)) <span class="keywordflow">break</span>;
+<a name="l00395"></a>00395
+<a name="l00396"></a>00396 size = gsl_multimin_fminimizer_size (minimizer);
+<a name="l00397"></a>00397 status = gsl_multimin_test_size (size, pixtol);
+<a name="l00398"></a>00398
+<a name="l00399"></a>00399 <span class="keywordflow">if</span> (status == GSL_SUCCESS) {
+<a name="l00400"></a>00400 cpl_msg_debug(cpl_func, <span class="stringliteral">"converged to minimum at"</span>);
<a name="l00401"></a>00401
-<a name="l00402"></a>00402 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00431"></a>00431 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00432"></a>00432 cpl_error_code
-<a name="l00433"></a><a class="code" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974">00433</a> <a class="code" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a>(cpl_vector * <span class="keyword">self</span>,
-<a name="l00434"></a>00434 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00435"></a>00435 irplib_base_spectrum_model * lsslamp,
-<a name="l00436"></a>00436 <span class="keywordtype">int</span> hsize)
-<a name="l00437"></a>00437 {
-<a name="l00438"></a>00438
-<a name="l00439"></a>00439 irplib_line_spectrum_model * arclamp
-<a name="l00440"></a>00440 = (irplib_line_spectrum_model *)lsslamp;
-<a name="l00441"></a>00441 cpl_error_code error;
-<a name="l00442"></a>00442
-<a name="l00443"></a>00443 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00444"></a>00444
-<a name="l00445"></a>00445 arclamp->cost++;
+<a name="l00402"></a>00402 <span class="keywordflow">if</span> (nfit == 0) {
+<a name="l00403"></a>00403 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g df() = %g size = %g"</span>,
+<a name="l00404"></a>00404 iter,
+<a name="l00405"></a>00405 gsl_vector_get (minimizer->x, 0)
+<a name="l00406"></a>00406 - gsl_vector_get (dispprev, 0),
+<a name="l00407"></a>00407 minimizer->fval - fprev, size);
+<a name="l00408"></a>00408 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (nfit == 1) {
+<a name="l00409"></a>00409 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g %g df() = %g size = %g"</span>,
+<a name="l00410"></a>00410 iter,
+<a name="l00411"></a>00411 gsl_vector_get (minimizer->x, 0)
+<a name="l00412"></a>00412 - gsl_vector_get (dispprev, 0),
+<a name="l00413"></a>00413 gsl_vector_get (minimizer->x, 1)
+<a name="l00414"></a>00414 - gsl_vector_get (dispprev, 1),
+<a name="l00415"></a>00415 minimizer->fval - fprev, size);
+<a name="l00416"></a>00416 } <span class="keywordflow">else</span> {
+<a name="l00417"></a>00417 cpl_msg_debug(cpl_func, <span class="stringliteral">"%5d %g %g %g df() = %g size = %g"</span>,
+<a name="l00418"></a>00418 iter,
+<a name="l00419"></a>00419 gsl_vector_get (minimizer->x, 0)
+<a name="l00420"></a>00420 - gsl_vector_get (dispprev, 0),
+<a name="l00421"></a>00421 gsl_vector_get (minimizer->x, 1)
+<a name="l00422"></a>00422 - gsl_vector_get (dispprev, 1),
+<a name="l00423"></a>00423 gsl_vector_get (minimizer->x, 2)
+<a name="l00424"></a>00424 - gsl_vector_get (dispprev, 2),
+<a name="l00425"></a>00425 minimizer->fval - fprev, size);
+<a name="l00426"></a>00426 }
+<a name="l00427"></a>00427 }
+<a name="l00428"></a>00428 }
+<a name="l00429"></a>00429
+<a name="l00430"></a>00430 <span class="keywordflow">if</span> (status == GSL_SUCCESS && cpl_errorstate_is_equal(prestate)) {
+<a name="l00431"></a>00431 <span class="keywordflow">if</span> (data.mxc > -minimizer->fval) {
+<a name="l00432"></a>00432 *pxc = data.mxc;
+<a name="l00433"></a>00433 cpl_msg_warning(cpl_func, <span class="stringliteral">"Local maximum: %g(%d) > %g"</span>,
+<a name="l00434"></a>00434 data.mxc, data.ishift, -minimizer->fval);
+<a name="l00435"></a>00435 cpl_polynomial_shift_1d(data.mdisp, 0, (<span class="keywordtype">double</span>)data.ishift);
+<a name="l00436"></a>00436 cpl_polynomial_copy(<span class="keyword">self</span>, data.mdisp);
+<a name="l00437"></a>00437 *prestart = CPL_TRUE;
+<a name="l00438"></a>00438 } <span class="keywordflow">else</span> {
+<a name="l00439"></a>00439 *pxc = -minimizer->fval;
+<a name="l00440"></a>00440 <span class="keywordflow">for</span> (i=0; i < nfit; i++) {
+<a name="l00441"></a>00441 <span class="keyword">const</span> <span class="keywordtype">double</span> value = gsl_vector_get(minimizer->x, i);
+<a name="l00442"></a>00442 cpl_polynomial_set_coeff(<span class="keyword">self</span>, &i, value);
+<a name="l00443"></a>00443 }
+<a name="l00444"></a>00444 }
+<a name="l00445"></a>00445 }
<a name="l00446"></a>00446
-<a name="l00447"></a>00447 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
-<a name="l00448"></a>00448 arclamp->linepix,
-<a name="l00449"></a>00449 arclamp->erftmp,
-<a name="l00450"></a>00450 disp,
-<a name="l00451"></a>00451 arclamp->lines,
-<a name="l00452"></a>00452 arclamp->wslit,
-<a name="l00453"></a>00453 arclamp->wfwhm,
-<a name="l00454"></a>00454 arclamp->xtrunc,
-<a name="l00455"></a>00455 hsize, CPL_FALSE, CPL_FALSE,
-<a name="l00456"></a>00456 &(arclamp->ulines));
-<a name="l00457"></a>00457 cpl_ensure_code(!error, error);
+<a name="l00447"></a>00447 cpl_vector_delete(data.spectrum);
+<a name="l00448"></a>00448 cpl_vector_delete(data.vxc);
+<a name="l00449"></a>00449 cpl_polynomial_delete(data.mdisp);
+<a name="l00450"></a>00450 gsl_multimin_fminimizer_free(minimizer);
+<a name="l00451"></a>00451 gsl_vector_free(dispgsl);
+<a name="l00452"></a>00452 gsl_vector_free(dispprev);
+<a name="l00453"></a>00453 gsl_vector_free(stepsize);
+<a name="l00454"></a>00454
+<a name="l00455"></a>00455 cpl_ensure_code(status != GSL_CONTINUE, CPL_ERROR_CONTINUE);
+<a name="l00456"></a>00456 cpl_ensure_code(status == GSL_SUCCESS, CPL_ERROR_DATA_NOT_FOUND);
+<a name="l00457"></a>00457 cpl_ensure_code(cpl_errorstate_is_equal(prestate), cpl_error_get_code());
<a name="l00458"></a>00458
-<a name="l00459"></a>00459 arclamp->xcost++;
-<a name="l00460"></a>00460
-<a name="l00461"></a>00461 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00462"></a>00462 }
+<a name="l00459"></a>00459 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00460"></a>00460 <span class="preprocessor">#endif</span>
+<a name="l00461"></a>00461 <span class="preprocessor"></span>}
+<a name="l00462"></a>00462
<a name="l00463"></a>00463
<a name="l00464"></a>00464 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00478"></a>00478 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00479"></a>00479 cpl_error_code
-<a name="l00480"></a><a class="code" href="group__irplib__wavecal.html#ga631e29d63bc65109f458915b5d1c8bb9">00480</a> <a class="code" href="group__irplib__wavecal.html#ga631e29d63bc65109f458915b5d1c8bb9" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum</a>(cpl_vector * <span class="keyword">self</span>,
-<a name="l00481"></a>00481 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00482"></a>00482 irplib_base_spectrum_model * lsslamp,
-<a name="l00483"></a>00483 <span class="keywordtype">int</span> hsize)
-<a name="l00484"></a>00484 {
-<a name="l00485"></a>00485
-<a name="l00486"></a>00486 irplib_line_spectrum_model * arclamp
-<a name="l00487"></a>00487 = (irplib_line_spectrum_model *)lsslamp;
-<a name="l00488"></a>00488 cpl_error_code error;
-<a name="l00489"></a>00489
-<a name="l00490"></a>00490 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00491"></a>00491
-<a name="l00492"></a>00492 arclamp->cost++;
-<a name="l00493"></a>00493
-<a name="l00494"></a>00494 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
-<a name="l00495"></a>00495 arclamp->linepix,
-<a name="l00496"></a>00496 arclamp->erftmp,
-<a name="l00497"></a>00497 disp,
-<a name="l00498"></a>00498 arclamp->lines,
-<a name="l00499"></a>00499 arclamp->wslit,
-<a name="l00500"></a>00500 arclamp->wfwhm,
-<a name="l00501"></a>00501 arclamp->xtrunc,
-<a name="l00502"></a>00502 hsize, CPL_FALSE, CPL_TRUE,
-<a name="l00503"></a>00503 &(arclamp->ulines));
-<a name="l00504"></a>00504 cpl_ensure_code(!error, error);
-<a name="l00505"></a>00505
-<a name="l00506"></a>00506 arclamp->xcost++;
-<a name="l00507"></a>00507
-<a name="l00508"></a>00508 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00509"></a>00509 }
-<a name="l00510"></a>00510
-<a name="l00511"></a>00511
-<a name="l00512"></a>00512 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00526"></a>00526 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00527"></a>00527 cpl_error_code
-<a name="l00528"></a><a class="code" href="group__irplib__wavecal.html#gae8e236a419dedc99eab52690f4a33901">00528</a> <a class="code" href="group__irplib__wavecal.html#gae8e236a419dedc99eab52690f4a33901" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast</a>(cpl_vector * <span class="keyword">self</span>,
-<a name="l00529"></a>00529 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00530"></a>00530 irplib_base_spectrum_model * lsslamp,
-<a name="l00531"></a>00531 <span class="keywordtype">int</span> hsize)
-<a name="l00532"></a>00532 {
-<a name="l00533"></a>00533
-<a name="l00534"></a>00534 irplib_line_spectrum_model * arclamp
-<a name="l00535"></a>00535 = (irplib_line_spectrum_model *)lsslamp;
-<a name="l00536"></a>00536 cpl_error_code error;
-<a name="l00537"></a>00537
-<a name="l00538"></a>00538 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00539"></a>00539
-<a name="l00540"></a>00540 arclamp->cost++;
-<a name="l00541"></a>00541
-<a name="l00542"></a>00542 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
-<a name="l00543"></a>00543 arclamp->linepix,
-<a name="l00544"></a>00544 arclamp->erftmp,
-<a name="l00545"></a>00545 disp,
-<a name="l00546"></a>00546 arclamp->lines,
-<a name="l00547"></a>00547 arclamp->wslit,
-<a name="l00548"></a>00548 arclamp->wfwhm,
-<a name="l00549"></a>00549 arclamp->xtrunc,
-<a name="l00550"></a>00550 hsize, CPL_TRUE, CPL_FALSE,
-<a name="l00551"></a>00551 &(arclamp->ulines));
-<a name="l00552"></a>00552 cpl_ensure_code(!error, error);
-<a name="l00553"></a>00553
-<a name="l00554"></a>00554 arclamp->xcost++;
-<a name="l00555"></a>00555
-<a name="l00556"></a>00556 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00557"></a>00557 }
-<a name="l00558"></a>00558
-<a name="l00559"></a>00559 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00573"></a>00573 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00574"></a>00574 cpl_error_code
-<a name="l00575"></a><a class="code" href="group__irplib__wavecal.html#gaa0000d5a34e290fc93dfcc936e631eb7">00575</a> <a class="code" href="group__irplib__wavecal.html#gaa0000d5a34e290fc93dfcc936e631eb7" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum_fast</a>(cpl_vector * <span class="keyword">self</span>,
-<a name="l00576"></a>00576 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00577"></a>00577 irplib_base_spectrum_model * lsslamp,
-<a name="l00578"></a>00578 <span class="keywordtype">int</span> hsize)
-<a name="l00579"></a>00579 {
-<a name="l00580"></a>00580
-<a name="l00581"></a>00581 irplib_line_spectrum_model * arclamp
-<a name="l00582"></a>00582 = (irplib_line_spectrum_model *)lsslamp;
-<a name="l00583"></a>00583 cpl_error_code error;
-<a name="l00584"></a>00584
-<a name="l00585"></a>00585 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00586"></a>00586
-<a name="l00587"></a>00587 arclamp->cost++;
-<a name="l00588"></a>00588
-<a name="l00589"></a>00589 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
-<a name="l00590"></a>00590 arclamp->linepix,
-<a name="l00591"></a>00591 arclamp->erftmp,
-<a name="l00592"></a>00592 disp,
-<a name="l00593"></a>00593 arclamp->lines,
-<a name="l00594"></a>00594 arclamp->wslit,
-<a name="l00595"></a>00595 arclamp->wfwhm,
-<a name="l00596"></a>00596 arclamp->xtrunc,
-<a name="l00597"></a>00597 hsize, CPL_TRUE, CPL_TRUE,
-<a name="l00598"></a>00598 &(arclamp->ulines));
-<a name="l00599"></a>00599 cpl_ensure_code(!error, error);
-<a name="l00600"></a>00600
-<a name="l00601"></a>00601 arclamp->xcost++;
-<a name="l00602"></a>00602
-<a name="l00603"></a>00603 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00604"></a>00604 }
-<a name="l00605"></a>00605
-<a name="l00606"></a>00606 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00617"></a>00617 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00618"></a><a class="code" href="group__irplib__wavecal.html#ga7eec8e48f4888aba01b98d9e0dc2acc5">00618</a> cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga7eec8e48f4888aba01b98d9e0dc2acc5" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(<span class="keyword">const</span> cpl_vector * <span class="keyword">self</span>,
-<a name="l00619"></a>00619 <span class="keyword">const</span> cpl_polynomial * disp1d,
-<a name="l00620"></a>00620 irplib_base_spectrum_model * model,
-<a name="l00621"></a>00621 cpl_error_code (* filler)
-<a name="l00622"></a>00622 (cpl_vector *,
-<a name="l00623"></a>00623 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00624"></a>00624 irplib_base_spectrum_model *,
-<a name="l00625"></a>00625 <span class="keywordtype">int</span>))
-<a name="l00626"></a>00626 {
-<a name="l00627"></a>00627
-<a name="l00628"></a>00628 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l00629"></a>00629 cpl_vector * wl;
-<a name="l00630"></a>00630 cpl_vector * spectrum;
-<a name="l00631"></a>00631 cpl_vector * vxc;
-<a name="l00632"></a>00632 <span class="keyword">const</span> <span class="keywordtype">int</span> len = cpl_vector_get_size(<span class="keyword">self</span>);
-<a name="l00633"></a>00633 <span class="keywordtype">double</span> maxval, xc;
-<a name="l00634"></a>00634 <span class="keywordtype">int</span> ixc;
-<a name="l00635"></a>00635 <span class="keywordtype">int</span> error = 0;
-<a name="l00636"></a>00636
-<a name="l00637"></a>00637 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00638"></a>00638 cpl_ensure_code(disp1d != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00639"></a>00639 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00640"></a>00640 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00641"></a>00641
-<a name="l00642"></a>00642 cpl_ensure_code(cpl_polynomial_get_dimension(disp1d) == 1,
-<a name="l00643"></a>00643 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00644"></a>00644
-<a name="l00645"></a>00645 cpl_ensure_code(cpl_polynomial_get_degree(disp1d) > 0,
-<a name="l00646"></a>00646 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00647"></a>00647
-<a name="l00648"></a>00648 wl = cpl_vector_new(len);
-<a name="l00649"></a>00649 spectrum = cpl_vector_new(len);
-<a name="l00650"></a>00650 vxc = cpl_vector_new(1);
-<a name="l00651"></a>00651
-<a name="l00652"></a>00652 error |= (int)cpl_vector_fill_polynomial(wl, disp1d, 1.0, 1.0);
-<a name="l00653"></a>00653 error |= filler(spectrum, disp1d, model, 0);
+<a name="l00492"></a>00492 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00493"></a>00493 cpl_error_code
+<a name="l00494"></a><a class="code" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a">00494</a> <a class="code" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a>(cpl_vector * <span class="keyword">self</span>,
+<a name="l00495"></a>00495 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l00496"></a>00496 irplib_base_spectrum_model * lsslamp)
+<a name="l00497"></a>00497 {
+<a name="l00498"></a>00498
+<a name="l00499"></a>00499 irplib_line_spectrum_model * arclamp
+<a name="l00500"></a>00500 = (irplib_line_spectrum_model *)lsslamp;
+<a name="l00501"></a>00501 cpl_error_code error;
+<a name="l00502"></a>00502
+<a name="l00503"></a>00503 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00504"></a>00504
+<a name="l00505"></a>00505 arclamp->cost++;
+<a name="l00506"></a>00506
+<a name="l00507"></a>00507 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
+<a name="l00508"></a>00508 arclamp->linepix,
+<a name="l00509"></a>00509 arclamp->erftmp,
+<a name="l00510"></a>00510 disp,
+<a name="l00511"></a>00511 arclamp->lines,
+<a name="l00512"></a>00512 arclamp->wslit,
+<a name="l00513"></a>00513 arclamp->wfwhm,
+<a name="l00514"></a>00514 arclamp->xtrunc,
+<a name="l00515"></a>00515 0, CPL_FALSE, CPL_FALSE,
+<a name="l00516"></a>00516 &(arclamp->ulines));
+<a name="l00517"></a>00517 cpl_ensure_code(!error, error);
+<a name="l00518"></a>00518
+<a name="l00519"></a>00519 arclamp->xcost++;
+<a name="l00520"></a>00520
+<a name="l00521"></a>00521 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00522"></a>00522 }
+<a name="l00523"></a>00523
+<a name="l00524"></a>00524 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00537"></a>00537 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00538"></a>00538 cpl_error_code
+<a name="l00539"></a><a class="code" href="group__irplib__wavecal.html#gad22539bf83d1b08d845ed5f618a4009f">00539</a> <a class="code" href="group__irplib__wavecal.html#gad22539bf83d1b08d845ed5f618a4009f" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum</a>(cpl_vector * <span class="keyword">self</span>,
+<a name="l00540"></a>00540 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l00541"></a>00541 irplib_base_spectrum_model * lsslamp)
+<a name="l00542"></a>00542 {
+<a name="l00543"></a>00543
+<a name="l00544"></a>00544 irplib_line_spectrum_model * arclamp
+<a name="l00545"></a>00545 = (irplib_line_spectrum_model *)lsslamp;
+<a name="l00546"></a>00546 cpl_error_code error;
+<a name="l00547"></a>00547
+<a name="l00548"></a>00548 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00549"></a>00549
+<a name="l00550"></a>00550 arclamp->cost++;
+<a name="l00551"></a>00551
+<a name="l00552"></a>00552 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
+<a name="l00553"></a>00553 arclamp->linepix,
+<a name="l00554"></a>00554 arclamp->erftmp,
+<a name="l00555"></a>00555 disp,
+<a name="l00556"></a>00556 arclamp->lines,
+<a name="l00557"></a>00557 arclamp->wslit,
+<a name="l00558"></a>00558 arclamp->wfwhm,
+<a name="l00559"></a>00559 arclamp->xtrunc,
+<a name="l00560"></a>00560 0, CPL_FALSE, CPL_TRUE,
+<a name="l00561"></a>00561 &(arclamp->ulines));
+<a name="l00562"></a>00562 cpl_ensure_code(!error, error);
+<a name="l00563"></a>00563
+<a name="l00564"></a>00564 arclamp->xcost++;
+<a name="l00565"></a>00565
+<a name="l00566"></a>00566 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00567"></a>00567 }
+<a name="l00568"></a>00568
+<a name="l00569"></a>00569
+<a name="l00570"></a>00570 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00583"></a>00583 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00584"></a>00584 cpl_error_code
+<a name="l00585"></a><a class="code" href="group__irplib__wavecal.html#ga6a463d7816b4164fdd23a4df2805cc95">00585</a> <a class="code" href="group__irplib__wavecal.html#ga6a463d7816b4164fdd23a4df2805cc95" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast</a>(cpl_vector * <span class="keyword">self</span>,
+<a name="l00586"></a>00586 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l00587"></a>00587 irplib_base_spectrum_model * lsslamp)
+<a name="l00588"></a>00588 {
+<a name="l00589"></a>00589
+<a name="l00590"></a>00590 irplib_line_spectrum_model * arclamp
+<a name="l00591"></a>00591 = (irplib_line_spectrum_model *)lsslamp;
+<a name="l00592"></a>00592 cpl_error_code error;
+<a name="l00593"></a>00593
+<a name="l00594"></a>00594 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00595"></a>00595
+<a name="l00596"></a>00596 arclamp->cost++;
+<a name="l00597"></a>00597
+<a name="l00598"></a>00598 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
+<a name="l00599"></a>00599 arclamp->linepix,
+<a name="l00600"></a>00600 arclamp->erftmp,
+<a name="l00601"></a>00601 disp,
+<a name="l00602"></a>00602 arclamp->lines,
+<a name="l00603"></a>00603 arclamp->wslit,
+<a name="l00604"></a>00604 arclamp->wfwhm,
+<a name="l00605"></a>00605 arclamp->xtrunc,
+<a name="l00606"></a>00606 0, CPL_TRUE, CPL_FALSE,
+<a name="l00607"></a>00607 &(arclamp->ulines));
+<a name="l00608"></a>00608 cpl_ensure_code(!error, error);
+<a name="l00609"></a>00609
+<a name="l00610"></a>00610 arclamp->xcost++;
+<a name="l00611"></a>00611
+<a name="l00612"></a>00612 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00613"></a>00613 }
+<a name="l00614"></a>00614
+<a name="l00615"></a>00615 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00628"></a>00628 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00629"></a>00629 cpl_error_code
+<a name="l00630"></a><a class="code" href="group__irplib__wavecal.html#ga75a85320c74d1088eeaeec97974d793c">00630</a> <a class="code" href="group__irplib__wavecal.html#ga75a85320c74d1088eeaeec97974d793c" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum_fast</a>(cpl_vector * <span class="keyword">self</span>,
+<a name="l00631"></a>00631 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l00632"></a>00632 irplib_base_spectrum_model * lsslamp)
+<a name="l00633"></a>00633 {
+<a name="l00634"></a>00634
+<a name="l00635"></a>00635 irplib_line_spectrum_model * arclamp
+<a name="l00636"></a>00636 = (irplib_line_spectrum_model *)lsslamp;
+<a name="l00637"></a>00637 cpl_error_code error;
+<a name="l00638"></a>00638
+<a name="l00639"></a>00639 cpl_ensure_code(arclamp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00640"></a>00640
+<a name="l00641"></a>00641 arclamp->cost++;
+<a name="l00642"></a>00642
+<a name="l00643"></a>00643 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(<span class="keyword">self</span>,
+<a name="l00644"></a>00644 arclamp->linepix,
+<a name="l00645"></a>00645 arclamp->erftmp,
+<a name="l00646"></a>00646 disp,
+<a name="l00647"></a>00647 arclamp->lines,
+<a name="l00648"></a>00648 arclamp->wslit,
+<a name="l00649"></a>00649 arclamp->wfwhm,
+<a name="l00650"></a>00650 arclamp->xtrunc,
+<a name="l00651"></a>00651 0, CPL_TRUE, CPL_TRUE,
+<a name="l00652"></a>00652 &(arclamp->ulines));
+<a name="l00653"></a>00653 cpl_ensure_code(!error, error);
<a name="l00654"></a>00654
-<a name="l00655"></a>00655 ixc = cpl_vector_correlate(vxc, <span class="keyword">self</span>, spectrum);
-<a name="l00656"></a>00656 xc = cpl_vector_get(vxc, ixc);
-<a name="l00657"></a>00657
-<a name="l00658"></a>00658 maxval = cpl_vector_get_max(spectrum);
-<a name="l00659"></a>00659 <span class="keywordflow">if</span> (maxval != 0.0)
-<a name="l00660"></a>00660 error |= cpl_vector_multiply_scalar(spectrum,
-<a name="l00661"></a>00661 cpl_vector_get_max(<span class="keyword">self</span>)/maxval);
-<a name="l00662"></a>00662 <span class="keywordflow">if</span> (!error) {
-<a name="l00663"></a>00663 <span class="keyword">const</span> cpl_vector * spair[] = {wl, <span class="keyword">self</span>, spectrum};
-<a name="l00664"></a>00664 <span class="keywordtype">char</span> * pre = cpl_sprintf(<span class="stringliteral">"set grid;set xlabel 'Wavelength (%g -> %g)'; "</span>
-<a name="l00665"></a>00665 <span class="stringliteral">"set ylabel 'Intensity';"</span>, cpl_vector_get(wl, 0),
-<a name="l00666"></a>00666 cpl_vector_get(wl, len-1));
-<a name="l00667"></a>00667 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Observed and modelled spectra (%d pixel "</span>
-<a name="l00668"></a>00668 <span class="stringliteral">"XC=%g) ' w linespoints"</span>, len, xc);
-<a name="l00669"></a>00669
-<a name="l00670"></a>00670 (void)cpl_plot_vectors(pre, title, <span class="stringliteral">""</span>, spair, 3);
-<a name="l00671"></a>00671 cpl_free(pre);
-<a name="l00672"></a>00672 cpl_free(title);
-<a name="l00673"></a>00673 }
-<a name="l00674"></a>00674
-<a name="l00675"></a>00675 cpl_vector_delete(wl);
-<a name="l00676"></a>00676 cpl_vector_delete(spectrum);
-<a name="l00677"></a>00677 cpl_vector_delete(vxc);
-<a name="l00678"></a>00678
-<a name="l00679"></a>00679 cpl_errorstate_set(prestate);
+<a name="l00655"></a>00655 arclamp->xcost++;
+<a name="l00656"></a>00656
+<a name="l00657"></a>00657 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00658"></a>00658 }
+<a name="l00659"></a>00659
+<a name="l00660"></a>00660 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00671"></a>00671 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00672"></a><a class="code" href="group__irplib__wavecal.html#ga7bac402a4e2c60f7646f1e655a66833d">00672</a> cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga7bac402a4e2c60f7646f1e655a66833d" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(<span class="keyword">const</span> cpl_vector * <span class="keyword">self</span>,
+<a name="l00673"></a>00673 <span class="keyword">const</span> cpl_polynomial * disp1d,
+<a name="l00674"></a>00674 irplib_base_spectrum_model * model,
+<a name="l00675"></a>00675 cpl_error_code (* filler)
+<a name="l00676"></a>00676 (cpl_vector *,
+<a name="l00677"></a>00677 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00678"></a>00678 irplib_base_spectrum_model *))
+<a name="l00679"></a>00679 {
<a name="l00680"></a>00680
-<a name="l00681"></a>00681 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00682"></a>00682 }
-<a name="l00683"></a>00683
-<a name="l00684"></a>00684 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00702"></a>00702 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00703"></a>00703 cpl_error_code
-<a name="l00704"></a><a class="code" href="group__irplib__wavecal.html#gae027096b411661b9584c72ab3e8e6547">00704</a> <a class="code" href="group__irplib__wavecal.html#gae027096b411661b9584c72ab3e8e6547" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(cpl_bivector * <span class="keyword">self</span>,
-<a name="l00705"></a>00705 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00706"></a>00706 <span class="keyword">const</span> cpl_vector * obs,
-<a name="l00707"></a>00707 irplib_base_spectrum_model * model,
-<a name="l00708"></a>00708 cpl_error_code (*filler)
-<a name="l00709"></a>00709 (cpl_vector *,
-<a name="l00710"></a>00710 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00711"></a>00711 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00712"></a>00712 <span class="keywordtype">int</span> hsize,
-<a name="l00713"></a>00713 cpl_boolean doplot,
-<a name="l00714"></a>00714 <span class="keywordtype">double</span> *pxc)
-<a name="l00715"></a>00715 {
-<a name="l00716"></a>00716
-<a name="l00717"></a>00717 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
-<a name="l00718"></a>00718 <span class="keyword">const</span> <span class="keywordtype">int</span> nmodel = 2 * hsize + nobs;
-<a name="l00719"></a>00719 cpl_vector * xself = cpl_bivector_get_x(<span class="keyword">self</span>);
-<a name="l00720"></a>00720 cpl_vector * yself = cpl_bivector_get_y(<span class="keyword">self</span>);
-<a name="l00721"></a>00721 cpl_vector * mspec1d;
-<a name="l00722"></a>00722 cpl_vector * xcorr;
-<a name="l00723"></a>00723 cpl_error_code error = CPL_ERROR_NONE;
-<a name="l00724"></a>00724 <span class="keywordtype">double</span> xcprev, xcnext;
-<a name="l00725"></a>00725 <span class="keywordtype">int</span> ixc, imax = 0;
-<a name="l00726"></a>00726 <span class="keywordtype">int</span> i;
+<a name="l00681"></a>00681 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l00682"></a>00682 cpl_vector * wl;
+<a name="l00683"></a>00683 cpl_vector * spectrum;
+<a name="l00684"></a>00684 cpl_vector * vxc;
+<a name="l00685"></a>00685 <span class="keyword">const</span> <span class="keywordtype">int</span> len = cpl_vector_get_size(<span class="keyword">self</span>);
+<a name="l00686"></a>00686 <span class="keywordtype">double</span> maxval, xc;
+<a name="l00687"></a>00687 <span class="keywordtype">int</span> ixc;
+<a name="l00688"></a>00688 <span class="keywordtype">int</span> error = 0;
+<a name="l00689"></a>00689
+<a name="l00690"></a>00690 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00691"></a>00691 cpl_ensure_code(disp1d != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00692"></a>00692 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00693"></a>00693 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00694"></a>00694
+<a name="l00695"></a>00695 cpl_ensure_code(cpl_polynomial_get_dimension(disp1d) == 1,
+<a name="l00696"></a>00696 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00697"></a>00697
+<a name="l00698"></a>00698 cpl_ensure_code(cpl_polynomial_get_degree(disp1d) > 0,
+<a name="l00699"></a>00699 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00700"></a>00700
+<a name="l00701"></a>00701 wl = cpl_vector_new(len);
+<a name="l00702"></a>00702 spectrum = cpl_vector_new(len);
+<a name="l00703"></a>00703 vxc = cpl_vector_new(1);
+<a name="l00704"></a>00704
+<a name="l00705"></a>00705 error |= (int)cpl_vector_fill_polynomial(wl, disp1d, 1.0, 1.0);
+<a name="l00706"></a>00706 error |= filler(spectrum, disp1d, model);
+<a name="l00707"></a>00707
+<a name="l00708"></a>00708 ixc = cpl_vector_correlate(vxc, <span class="keyword">self</span>, spectrum);
+<a name="l00709"></a>00709 xc = cpl_vector_get(vxc, ixc);
+<a name="l00710"></a>00710
+<a name="l00711"></a>00711 maxval = cpl_vector_get_max(spectrum);
+<a name="l00712"></a>00712 <span class="keywordflow">if</span> (maxval != 0.0)
+<a name="l00713"></a>00713 error |= cpl_vector_multiply_scalar(spectrum,
+<a name="l00714"></a>00714 cpl_vector_get_max(<span class="keyword">self</span>)/maxval);
+<a name="l00715"></a>00715 <span class="keywordflow">if</span> (!error) {
+<a name="l00716"></a>00716 <span class="keyword">const</span> cpl_vector * spair[] = {wl, <span class="keyword">self</span>, spectrum};
+<a name="l00717"></a>00717 <span class="keywordtype">char</span> * pre = cpl_sprintf(<span class="stringliteral">"set grid;set xlabel 'Wavelength (%g -> %g)'; "</span>
+<a name="l00718"></a>00718 <span class="stringliteral">"set ylabel 'Intensity';"</span>, cpl_vector_get(wl, 0),
+<a name="l00719"></a>00719 cpl_vector_get(wl, len-1));
+<a name="l00720"></a>00720 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Observed and modelled spectra (%d pixel "</span>
+<a name="l00721"></a>00721 <span class="stringliteral">"XC=%g) ' w linespoints"</span>, len, xc);
+<a name="l00722"></a>00722
+<a name="l00723"></a>00723 (void)cpl_plot_vectors(pre, title, <span class="stringliteral">""</span>, spair, 3);
+<a name="l00724"></a>00724 cpl_free(pre);
+<a name="l00725"></a>00725 cpl_free(title);
+<a name="l00726"></a>00726 }
<a name="l00727"></a>00727
-<a name="l00728"></a>00728 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00729"></a>00729 cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00730"></a>00730 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00731"></a>00731 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00732"></a>00732 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00733"></a>00733 cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00734"></a>00734
-<a name="l00735"></a>00735 mspec1d = cpl_vector_new(nmodel);
+<a name="l00728"></a>00728 cpl_vector_delete(wl);
+<a name="l00729"></a>00729 cpl_vector_delete(spectrum);
+<a name="l00730"></a>00730 cpl_vector_delete(vxc);
+<a name="l00731"></a>00731
+<a name="l00732"></a>00732 cpl_errorstate_set(prestate);
+<a name="l00733"></a>00733
+<a name="l00734"></a>00734 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00735"></a>00735 }
<a name="l00736"></a>00736
-<a name="l00737"></a>00737 <span class="keywordflow">if</span> (filler(mspec1d, disp, model, hsize)) {
-<a name="l00738"></a>00738 cpl_vector_delete(mspec1d);
-<a name="l00739"></a>00739 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
-<a name="l00740"></a>00740 }
-<a name="l00741"></a>00741
-<a name="l00742"></a>00742 <span class="comment">/* Should not be able to fail now */</span>
-<a name="l00743"></a>00743 xcorr = cpl_vector_new(1 + 2 * hsize);
-<a name="l00744"></a>00744 ixc = cpl_vector_correlate(xcorr, mspec1d, obs);
-<a name="l00745"></a>00745
-<a name="l00746"></a>00746 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
-<a name="l00747"></a>00747 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
-<a name="l00748"></a>00748 irplib_polynomial_dump_corr_step(disp, xcorr, <span class="stringliteral">"Shift"</span>);
-<a name="l00749"></a>00749 <span class="preprocessor">#endif</span>
-<a name="l00750"></a>00750 <span class="preprocessor"></span>
-<a name="l00751"></a>00751 cpl_vector_delete(mspec1d);
-<a name="l00752"></a>00752
-<a name="l00753"></a>00753 <span class="comment">/* Find local maxima. */</span>
-<a name="l00754"></a>00754 <span class="comment">/* FIXME(?): Also include stationary points */</span>
-<a name="l00755"></a>00755 i = 0;
-<a name="l00756"></a>00756 xcprev = cpl_vector_get(xcorr, i);
-<a name="l00757"></a>00757 xcnext = cpl_vector_get(xcorr, i+1);
-<a name="l00758"></a>00758
-<a name="l00759"></a>00759 <span class="keywordflow">if</span> (xcprev >= xcnext) {
-<a name="l00760"></a>00760 <span class="comment">/* 1st data point is an extreme */</span>
-<a name="l00761"></a>00761 <span class="comment">/* FIXME: This could also be an error, recoverable by caller by</span>
-<a name="l00762"></a>00762 <span class="comment"> increasing hsize */</span>
-<a name="l00763"></a>00763 imax++;
-<a name="l00764"></a>00764
-<a name="l00765"></a>00765 cpl_vector_set(xself, 0, i - hsize);
-<a name="l00766"></a>00766 cpl_vector_set(yself, 0, xcprev);
-<a name="l00767"></a>00767
-<a name="l00768"></a>00768 }
-<a name="l00769"></a>00769
-<a name="l00770"></a>00770 <span class="keywordflow">for</span> (i = 1; i < 2 * hsize; i++) {
-<a name="l00771"></a>00771 <span class="keyword">const</span> <span class="keywordtype">double</span> xc = xcnext;
-<a name="l00772"></a>00772 xcnext = cpl_vector_get(xcorr, i+1);
-<a name="l00773"></a>00773 <span class="keywordflow">if</span> (xc >= xcprev && xc >= xcnext) {
-<a name="l00774"></a>00774 <span class="comment">/* Found (local) maximum at shift i - hsize */</span>
-<a name="l00775"></a>00775 <span class="keywordtype">int</span> j;
-<a name="l00776"></a>00776
-<a name="l00777"></a>00777 imax++;
-<a name="l00778"></a>00778
-<a name="l00779"></a>00779 <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) < imax) {
-<a name="l00780"></a>00780 cpl_vector_set_size(xself, imax);
-<a name="l00781"></a>00781 cpl_vector_set_size(yself, imax);
-<a name="l00782"></a>00782 }
+<a name="l00737"></a>00737 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00757"></a>00757 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00758"></a>00758 cpl_error_code
+<a name="l00759"></a><a class="code" href="group__irplib__wavecal.html#ga260740bf1f3fc364b301519eab3249a6">00759</a> <a class="code" href="group__irplib__wavecal.html#ga260740bf1f3fc364b301519eab3249a6" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(cpl_bivector * <span class="keyword">self</span>,
+<a name="l00760"></a>00760 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l00761"></a>00761 <span class="keyword">const</span> cpl_vector * obs,
+<a name="l00762"></a>00762 irplib_base_spectrum_model * model,
+<a name="l00763"></a>00763 cpl_error_code (*filler)
+<a name="l00764"></a>00764 (cpl_vector *,
+<a name="l00765"></a>00765 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00766"></a>00766 irplib_base_spectrum_model *),
+<a name="l00767"></a>00767 <span class="keywordtype">int</span> hsize,
+<a name="l00768"></a>00768 cpl_boolean doplot,
+<a name="l00769"></a>00769 <span class="keywordtype">double</span> *pxc)
+<a name="l00770"></a>00770 {
+<a name="l00771"></a>00771
+<a name="l00772"></a>00772 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
+<a name="l00773"></a>00773 <span class="keyword">const</span> <span class="keywordtype">int</span> nmodel = 2 * hsize + nobs;
+<a name="l00774"></a>00774 cpl_polynomial * shdisp;
+<a name="l00775"></a>00775 cpl_vector * xself = cpl_bivector_get_x(<span class="keyword">self</span>);
+<a name="l00776"></a>00776 cpl_vector * yself = cpl_bivector_get_y(<span class="keyword">self</span>);
+<a name="l00777"></a>00777 cpl_vector * mspec1d;
+<a name="l00778"></a>00778 cpl_vector * xcorr;
+<a name="l00779"></a>00779 cpl_error_code error = CPL_ERROR_NONE;
+<a name="l00780"></a>00780 <span class="keywordtype">double</span> xcprev, xcnext;
+<a name="l00781"></a>00781 <span class="keywordtype">int</span> ixc, imax = 0;
+<a name="l00782"></a>00782 <span class="keywordtype">int</span> i;
<a name="l00783"></a>00783
-<a name="l00784"></a>00784 <span class="keywordflow">for</span> (j = imax-1; j > 0; j--) {
-<a name="l00785"></a>00785 <span class="keywordflow">if</span> (xc <= cpl_vector_get(yself, j-1)) <span class="keywordflow">break</span>;
-<a name="l00786"></a>00786 cpl_vector_set(xself, j, cpl_vector_get(xself, j-1));
-<a name="l00787"></a>00787 cpl_vector_set(yself, j, cpl_vector_get(yself, j-1));
-<a name="l00788"></a>00788 }
-<a name="l00789"></a>00789 cpl_vector_set(xself, j, i - hsize);
-<a name="l00790"></a>00790 cpl_vector_set(yself, j, xc);
-<a name="l00791"></a>00791 }
-<a name="l00792"></a>00792 xcprev = xc;
-<a name="l00793"></a>00793 }
-<a name="l00794"></a>00794
-<a name="l00795"></a>00795 <span class="comment">/* assert( i == 2 * hsize ); */</span>
-<a name="l00796"></a>00796
-<a name="l00797"></a>00797 <span class="keywordflow">if</span> (xcnext >= xcprev) {
-<a name="l00798"></a>00798 <span class="comment">/* Last data point is an extreme */</span>
-<a name="l00799"></a>00799 <span class="comment">/* FIXME: This could also be an error, recoverable by caller by</span>
-<a name="l00800"></a>00800 <span class="comment"> increasing hsize */</span>
-<a name="l00801"></a>00801 <span class="keywordtype">int</span> j;
-<a name="l00802"></a>00802
-<a name="l00803"></a>00803 imax++;
-<a name="l00804"></a>00804
-<a name="l00805"></a>00805 <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) < imax) {
-<a name="l00806"></a>00806 cpl_vector_set_size(xself, imax);
-<a name="l00807"></a>00807 cpl_vector_set_size(yself, imax);
-<a name="l00808"></a>00808 }
+<a name="l00784"></a>00784 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00785"></a>00785 cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00786"></a>00786 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00787"></a>00787 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00788"></a>00788 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00789"></a>00789 cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00790"></a>00790
+<a name="l00791"></a>00791 shdisp = cpl_polynomial_duplicate(disp);
+<a name="l00792"></a>00792
+<a name="l00793"></a>00793 <span class="comment">/* Shift reference by -hsize so filler can be used without offset */</span>
+<a name="l00794"></a>00794 <span class="keywordflow">if</span> (cpl_polynomial_shift_1d(shdisp, 0, -hsize)) {
+<a name="l00795"></a>00795 cpl_polynomial_delete(shdisp);
+<a name="l00796"></a>00796 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
+<a name="l00797"></a>00797 }
+<a name="l00798"></a>00798
+<a name="l00799"></a>00799 mspec1d = cpl_vector_new(nmodel);
+<a name="l00800"></a>00800
+<a name="l00801"></a>00801 <span class="keywordflow">if</span> (filler(mspec1d, shdisp, model)) {
+<a name="l00802"></a>00802 cpl_vector_delete(mspec1d);
+<a name="l00803"></a>00803 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
+<a name="l00804"></a>00804 }
+<a name="l00805"></a>00805
+<a name="l00806"></a>00806 <span class="comment">/* Should not be able to fail now */</span>
+<a name="l00807"></a>00807 xcorr = cpl_vector_new(1 + 2 * hsize);
+<a name="l00808"></a>00808 ixc = cpl_vector_correlate(xcorr, mspec1d, obs);
<a name="l00809"></a>00809
-<a name="l00810"></a>00810 <span class="keywordflow">for</span> (j = imax-1; j > 0; j--) {
-<a name="l00811"></a>00811 <span class="keywordflow">if</span> (xcnext <= cpl_vector_get(yself, j-1)) <span class="keywordflow">break</span>;
-<a name="l00812"></a>00812 cpl_vector_set(xself, j, cpl_vector_get(xself, j-1));
-<a name="l00813"></a>00813 cpl_vector_set(yself, j, cpl_vector_get(yself, j-1));
-<a name="l00814"></a>00814 }
-<a name="l00815"></a>00815 cpl_vector_set(xself, j, i - hsize);
-<a name="l00816"></a>00816 cpl_vector_set(yself, j, xcnext);
+<a name="l00810"></a>00810 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
+<a name="l00811"></a>00811 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
+<a name="l00812"></a>00812 irplib_polynomial_dump_corr_step(shdisp, xcorr, <span class="stringliteral">"Shift"</span>);
+<a name="l00813"></a>00813 <span class="preprocessor">#endif</span>
+<a name="l00814"></a>00814 <span class="preprocessor"></span>
+<a name="l00815"></a>00815 cpl_vector_delete(mspec1d);
+<a name="l00816"></a>00816 cpl_polynomial_delete(shdisp);
<a name="l00817"></a>00817
-<a name="l00818"></a>00818 }
-<a name="l00819"></a>00819
-<a name="l00820"></a>00820 <span class="keywordflow">if</span> (doplot) {
-<a name="l00821"></a>00821 cpl_vector * xvals = cpl_vector_new(1 + 2 * hsize);
-<a name="l00822"></a>00822 cpl_bivector * bcorr = cpl_bivector_wrap_vectors(xvals, xcorr);
-<a name="l00823"></a>00823 <span class="keywordtype">double</span> x = (double)-hsize;
-<a name="l00824"></a>00824 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Cross-correlation of shifted %d-pixel "</span>
-<a name="l00825"></a>00825 <span class="stringliteral">"spectrum (XCmax=%g at %d)' w linespoints"</span>,
-<a name="l00826"></a>00826 nobs, cpl_vector_get(xcorr, ixc),
-<a name="l00827"></a>00827 ixc - hsize);
-<a name="l00828"></a>00828
-<a name="l00829"></a>00829 <span class="keywordflow">for</span> (i = 0; i < 1 + 2 * hsize; i++, x += 1.0) {
-<a name="l00830"></a>00830 cpl_vector_set(xvals, i, x);
-<a name="l00831"></a>00831 }
+<a name="l00818"></a>00818 <span class="comment">/* Find local maxima. */</span>
+<a name="l00819"></a>00819 <span class="comment">/* FIXME(?): Also include stationary points */</span>
+<a name="l00820"></a>00820 i = 0;
+<a name="l00821"></a>00821 xcprev = cpl_vector_get(xcorr, i);
+<a name="l00822"></a>00822 xcnext = cpl_vector_get(xcorr, i+1);
+<a name="l00823"></a>00823
+<a name="l00824"></a>00824 <span class="keywordflow">if</span> (xcprev >= xcnext) {
+<a name="l00825"></a>00825 <span class="comment">/* 1st data point is an extreme */</span>
+<a name="l00826"></a>00826 <span class="comment">/* FIXME: This could also be an error, recoverable by caller by</span>
+<a name="l00827"></a>00827 <span class="comment"> increasing hsize */</span>
+<a name="l00828"></a>00828 imax++;
+<a name="l00829"></a>00829
+<a name="l00830"></a>00830 cpl_vector_set(xself, 0, i - hsize);
+<a name="l00831"></a>00831 cpl_vector_set(yself, 0, xcprev);
<a name="l00832"></a>00832
-<a name="l00833"></a>00833 cpl_plot_bivector(<span class="stringliteral">"set grid;set xlabel 'Offset [pixel]';"</span>, title,
-<a name="l00834"></a>00834 <span class="stringliteral">""</span>, bcorr);
-<a name="l00835"></a>00835 cpl_bivector_unwrap_vectors(bcorr);
-<a name="l00836"></a>00836 cpl_vector_delete(xvals);
-<a name="l00837"></a>00837 cpl_free(title);
-<a name="l00838"></a>00838 }
-<a name="l00839"></a>00839
-<a name="l00840"></a>00840 <span class="keywordflow">if</span> (pxc != NULL) *pxc = cpl_vector_get(xcorr, hsize);
+<a name="l00833"></a>00833 }
+<a name="l00834"></a>00834
+<a name="l00835"></a>00835 <span class="keywordflow">for</span> (i = 1; i < 2 * hsize; i++) {
+<a name="l00836"></a>00836 <span class="keyword">const</span> <span class="keywordtype">double</span> xc = xcnext;
+<a name="l00837"></a>00837 xcnext = cpl_vector_get(xcorr, i+1);
+<a name="l00838"></a>00838 <span class="keywordflow">if</span> (xc >= xcprev && xc >= xcnext) {
+<a name="l00839"></a>00839 <span class="comment">/* Found (local) maximum at shift i - hsize */</span>
+<a name="l00840"></a>00840 <span class="keywordtype">int</span> j;
<a name="l00841"></a>00841
-<a name="l00842"></a>00842 cpl_vector_delete(xcorr);
+<a name="l00842"></a>00842 imax++;
<a name="l00843"></a>00843
-<a name="l00844"></a>00844 <span class="keywordflow">if</span> (imax < 1) {
-<a name="l00845"></a>00845 error = CPL_ERROR_DATA_NOT_FOUND;
-<a name="l00846"></a>00846 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) > imax) {
-<a name="l00847"></a>00847 cpl_vector_set_size(xself, imax);
-<a name="l00848"></a>00848 cpl_vector_set_size(yself, imax);
-<a name="l00849"></a>00849 }
-<a name="l00850"></a>00850
-<a name="l00851"></a>00851 <span class="comment">/* Propagate error, if any */</span>
-<a name="l00852"></a>00852 <span class="keywordflow">return</span> cpl_error_set(cpl_func, error);
-<a name="l00853"></a>00853 }
-<a name="l00854"></a>00854
-<a name="l00855"></a>00855 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00868"></a>00868 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00869"></a>00869 cpl_error_code
-<a name="l00870"></a><a class="code" href="group__irplib__wavecal.html#gabaec991ebc1b856766bf66768c4a6a19">00870</a> <a class="code" href="group__irplib__wavecal.html#gabaec991ebc1b856766bf66768c4a6a19" title="Shift self by the amount that maximizes the cross-correlation.">irplib_polynomial_shift_1d_from_correlation</a>(cpl_polynomial * <span class="keyword">self</span>,
-<a name="l00871"></a>00871 <span class="keyword">const</span> cpl_vector * obs,
-<a name="l00872"></a>00872 irplib_base_spectrum_model * model,
-<a name="l00873"></a>00873 cpl_error_code (*filler)
-<a name="l00874"></a>00874 (cpl_vector *,
-<a name="l00875"></a>00875 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00876"></a>00876 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00877"></a>00877 <span class="keywordtype">int</span> hsize,
-<a name="l00878"></a>00878 cpl_boolean doplot,
-<a name="l00879"></a>00879 <span class="keywordtype">double</span> * pxc)
-<a name="l00880"></a>00880 {
-<a name="l00881"></a>00881
-<a name="l00882"></a>00882 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
-<a name="l00883"></a>00883 <span class="keyword">const</span> <span class="keywordtype">int</span> nmodel = 2 * hsize + nobs;
-<a name="l00884"></a>00884 cpl_vector * mspec1d;
-<a name="l00885"></a>00885 cpl_vector * xcorr;
-<a name="l00886"></a>00886 cpl_error_code error;
-<a name="l00887"></a>00887 <span class="keywordtype">int</span> ixc, xxc;
-<a name="l00888"></a>00888 <span class="keywordtype">double</span> xc;
-<a name="l00889"></a>00889
-<a name="l00890"></a>00890 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00891"></a>00891 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00892"></a>00892 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00893"></a>00893 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00894"></a>00894 cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00895"></a>00895
-<a name="l00896"></a>00896 mspec1d = cpl_vector_new(nmodel);
-<a name="l00897"></a>00897
-<a name="l00898"></a>00898 <span class="keywordflow">if</span> (filler(mspec1d, <span class="keyword">self</span>, model, hsize)) {
-<a name="l00899"></a>00899 cpl_vector_delete(mspec1d);
-<a name="l00900"></a>00900 cpl_ensure_code(0, cpl_error_get_code());
-<a name="l00901"></a>00901 }
-<a name="l00902"></a>00902
-<a name="l00903"></a>00903 <span class="comment">/* Should not be able to fail now */</span>
-<a name="l00904"></a>00904 xcorr = cpl_vector_new(1 + 2 * hsize);
-<a name="l00905"></a>00905 ixc = cpl_vector_correlate(xcorr, mspec1d, obs);
-<a name="l00906"></a>00906
-<a name="l00907"></a>00907 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
-<a name="l00908"></a>00908 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
-<a name="l00909"></a>00909 irplib_polynomial_dump_corr_step(<span class="keyword">self</span>, xcorr, <span class="stringliteral">"Shift"</span>);
-<a name="l00910"></a>00910 <span class="preprocessor">#endif</span>
-<a name="l00911"></a>00911 <span class="preprocessor"></span>
-<a name="l00912"></a>00912 cpl_vector_delete(mspec1d);
-<a name="l00913"></a>00913
-<a name="l00914"></a>00914 xxc = ixc - hsize;
-<a name="l00915"></a>00915
-<a name="l00916"></a>00916 error = cpl_polynomial_shift_1d(<span class="keyword">self</span>, 0, (<span class="keywordtype">double</span>)xxc);
-<a name="l00917"></a>00917
-<a name="l00918"></a>00918 xc = cpl_vector_get(xcorr, ixc);
-<a name="l00919"></a>00919
-<a name="l00920"></a>00920 cpl_msg_info(cpl_func, <span class="stringliteral">"Shifting %d pixels (%g < %g)"</span>, xxc,
-<a name="l00921"></a>00921 cpl_vector_get(xcorr, hsize), xc);
-<a name="l00922"></a>00922
-<a name="l00923"></a>00923 <span class="keywordflow">if</span> (doplot) {
-<a name="l00924"></a>00924 cpl_vector * xvals = cpl_vector_new(1 + 2 * hsize);
-<a name="l00925"></a>00925 cpl_bivector * bcorr = cpl_bivector_wrap_vectors(xvals, xcorr);
-<a name="l00926"></a>00926 <span class="keywordtype">int</span> i;
-<a name="l00927"></a>00927 <span class="keywordtype">double</span> x = (double)-hsize;
-<a name="l00928"></a>00928 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Cross-correlation of shifted %d-pixel "</span>
-<a name="l00929"></a>00929 <span class="stringliteral">"spectrum (XCmax=%g at %d)' w linespoints"</span>,
-<a name="l00930"></a>00930 nobs, cpl_vector_get(xcorr, ixc), xxc);
-<a name="l00931"></a>00931
-<a name="l00932"></a>00932 <span class="keywordflow">for</span> (i = 0; i < 1 + 2 * hsize; i++, x += 1.0) {
-<a name="l00933"></a>00933 cpl_vector_set(xvals, i, x);
-<a name="l00934"></a>00934 }
-<a name="l00935"></a>00935
-<a name="l00936"></a>00936 cpl_plot_bivector(<span class="stringliteral">"set grid;set xlabel 'Offset [pixel]';"</span>, title,
-<a name="l00937"></a>00937 <span class="stringliteral">""</span>, bcorr);
-<a name="l00938"></a>00938 cpl_bivector_unwrap_vectors(bcorr);
-<a name="l00939"></a>00939 cpl_vector_delete(xvals);
-<a name="l00940"></a>00940 cpl_free(title);
-<a name="l00941"></a>00941 }
-<a name="l00942"></a>00942
-<a name="l00943"></a>00943 cpl_vector_delete(xcorr);
-<a name="l00944"></a>00944
-<a name="l00945"></a>00945 cpl_ensure_code(!error, error);
-<a name="l00946"></a>00946
-<a name="l00947"></a>00947 <span class="keywordflow">if</span> (pxc != NULL) *pxc = xc;
-<a name="l00948"></a>00948
-<a name="l00949"></a>00949 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00950"></a>00950
-<a name="l00951"></a>00951 }
-<a name="l00952"></a>00952
-<a name="l00953"></a>00953
-<a name="l00954"></a>00954 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00974"></a>00974 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00975"></a>00975 cpl_error_code
-<a name="l00976"></a><a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33">00976</a> <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(cpl_vector * <span class="keyword">self</span>,
-<a name="l00977"></a>00977 cpl_vector * linepix,
-<a name="l00978"></a>00978 cpl_vector * erftmp,
-<a name="l00979"></a>00979 <span class="keyword">const</span> cpl_polynomial * disp,
-<a name="l00980"></a>00980 <span class="keyword">const</span> cpl_bivector * lines,
-<a name="l00981"></a>00981 <span class="keywordtype">double</span> wslit,
-<a name="l00982"></a>00982 <span class="keywordtype">double</span> wfwhm,
-<a name="l00983"></a>00983 <span class="keywordtype">double</span> xtrunc,
-<a name="l00984"></a>00984 <span class="keywordtype">int</span> hsize,
-<a name="l00985"></a>00985 cpl_boolean dofast,
-<a name="l00986"></a>00986 cpl_boolean dolog,
-<a name="l00987"></a>00987 <span class="keywordtype">unsigned</span> * pulines)
-<a name="l00988"></a>00988 {
+<a name="l00844"></a>00844 <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) < imax) {
+<a name="l00845"></a>00845 cpl_vector_set_size(xself, imax);
+<a name="l00846"></a>00846 cpl_vector_set_size(yself, imax);
+<a name="l00847"></a>00847 }
+<a name="l00848"></a>00848
+<a name="l00849"></a>00849 <span class="keywordflow">for</span> (j = imax-1; j > 0; j--) {
+<a name="l00850"></a>00850 <span class="keywordflow">if</span> (xc <= cpl_vector_get(yself, j-1)) <span class="keywordflow">break</span>;
+<a name="l00851"></a>00851 cpl_vector_set(xself, j, cpl_vector_get(xself, j-1));
+<a name="l00852"></a>00852 cpl_vector_set(yself, j, cpl_vector_get(yself, j-1));
+<a name="l00853"></a>00853 }
+<a name="l00854"></a>00854 cpl_vector_set(xself, j, i - hsize);
+<a name="l00855"></a>00855 cpl_vector_set(yself, j, xc);
+<a name="l00856"></a>00856 }
+<a name="l00857"></a>00857 xcprev = xc;
+<a name="l00858"></a>00858 }
+<a name="l00859"></a>00859
+<a name="l00860"></a>00860 <span class="comment">/* assert( i == 2 * hsize ); */</span>
+<a name="l00861"></a>00861
+<a name="l00862"></a>00862 <span class="keywordflow">if</span> (xcnext >= xcprev) {
+<a name="l00863"></a>00863 <span class="comment">/* Last data point is an extreme */</span>
+<a name="l00864"></a>00864 <span class="comment">/* FIXME: This could also be an error, recoverable by caller by</span>
+<a name="l00865"></a>00865 <span class="comment"> increasing hsize */</span>
+<a name="l00866"></a>00866 <span class="keywordtype">int</span> j;
+<a name="l00867"></a>00867
+<a name="l00868"></a>00868 imax++;
+<a name="l00869"></a>00869
+<a name="l00870"></a>00870 <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) < imax) {
+<a name="l00871"></a>00871 cpl_vector_set_size(xself, imax);
+<a name="l00872"></a>00872 cpl_vector_set_size(yself, imax);
+<a name="l00873"></a>00873 }
+<a name="l00874"></a>00874
+<a name="l00875"></a>00875 <span class="keywordflow">for</span> (j = imax-1; j > 0; j--) {
+<a name="l00876"></a>00876 <span class="keywordflow">if</span> (xcnext <= cpl_vector_get(yself, j-1)) <span class="keywordflow">break</span>;
+<a name="l00877"></a>00877 cpl_vector_set(xself, j, cpl_vector_get(xself, j-1));
+<a name="l00878"></a>00878 cpl_vector_set(yself, j, cpl_vector_get(yself, j-1));
+<a name="l00879"></a>00879 }
+<a name="l00880"></a>00880 cpl_vector_set(xself, j, i - hsize);
+<a name="l00881"></a>00881 cpl_vector_set(yself, j, xcnext);
+<a name="l00882"></a>00882
+<a name="l00883"></a>00883 }
+<a name="l00884"></a>00884
+<a name="l00885"></a>00885 <span class="keywordflow">if</span> (doplot) {
+<a name="l00886"></a>00886 <span class="comment">/* Vector of -hsize, 1-hsize, 2-hsize, ..., 0, ..., hsize */</span>
+<a name="l00887"></a>00887 cpl_vector * xvals = cpl_vector_new(1 + 2 * hsize);
+<a name="l00888"></a>00888 cpl_bivector * bcorr = cpl_bivector_wrap_vectors(xvals, xcorr);
+<a name="l00889"></a>00889 <span class="keywordtype">double</span> x = (double)-hsize;
+<a name="l00890"></a>00890 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Cross-correlation of shifted %d-pixel "</span>
+<a name="l00891"></a>00891 <span class="stringliteral">"spectrum (XCmax=%g at %d)' w linespoints"</span>,
+<a name="l00892"></a>00892 nobs, cpl_vector_get(xcorr, ixc),
+<a name="l00893"></a>00893 ixc - hsize);
+<a name="l00894"></a>00894
+<a name="l00895"></a>00895 <span class="keywordflow">for</span> (i = 0; i < 1 + 2 * hsize; i++, x += 1.0) {
+<a name="l00896"></a>00896 cpl_vector_set(xvals, i, x);
+<a name="l00897"></a>00897 }
+<a name="l00898"></a>00898
+<a name="l00899"></a>00899 cpl_plot_bivector(<span class="stringliteral">"set grid;set xlabel 'Offset [pixel]';"</span>, title,
+<a name="l00900"></a>00900 <span class="stringliteral">""</span>, bcorr);
+<a name="l00901"></a>00901 cpl_bivector_unwrap_vectors(bcorr);
+<a name="l00902"></a>00902 cpl_vector_delete(xvals);
+<a name="l00903"></a>00903 cpl_free(title);
+<a name="l00904"></a>00904 }
+<a name="l00905"></a>00905
+<a name="l00906"></a>00906 <span class="keywordflow">if</span> (pxc != NULL) *pxc = cpl_vector_get(xcorr, hsize);
+<a name="l00907"></a>00907
+<a name="l00908"></a>00908 cpl_vector_delete(xcorr);
+<a name="l00909"></a>00909
+<a name="l00910"></a>00910 <span class="keywordflow">if</span> (imax < 1) {
+<a name="l00911"></a>00911 error = CPL_ERROR_DATA_NOT_FOUND;
+<a name="l00912"></a>00912 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cpl_bivector_get_size(<span class="keyword">self</span>) > imax) {
+<a name="l00913"></a>00913 cpl_vector_set_size(xself, imax);
+<a name="l00914"></a>00914 cpl_vector_set_size(yself, imax);
+<a name="l00915"></a>00915 }
+<a name="l00916"></a>00916
+<a name="l00917"></a>00917 <span class="comment">/* Propagate error, if any */</span>
+<a name="l00918"></a>00918 <span class="keywordflow">return</span> cpl_error_set(cpl_func, error);
+<a name="l00919"></a>00919 }
+<a name="l00920"></a>00920
+<a name="l00921"></a>00921 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00934"></a>00934 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00935"></a>00935 cpl_error_code
+<a name="l00936"></a><a class="code" href="group__irplib__wavecal.html#gadf93655e2c7c0d5df23e2e3de66d0b56">00936</a> <a class="code" href="group__irplib__wavecal.html#gadf93655e2c7c0d5df23e2e3de66d0b56" title="Shift self by the amount that maximizes the cross-correlation.">irplib_polynomial_shift_1d_from_correlation</a>(cpl_polynomial * <span class="keyword">self</span>,
+<a name="l00937"></a>00937 <span class="keyword">const</span> cpl_vector * obs,
+<a name="l00938"></a>00938 irplib_base_spectrum_model * model,
+<a name="l00939"></a>00939 cpl_error_code (*filler)
+<a name="l00940"></a>00940 (cpl_vector *,
+<a name="l00941"></a>00941 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00942"></a>00942 irplib_base_spectrum_model *),
+<a name="l00943"></a>00943 <span class="keywordtype">int</span> hsize,
+<a name="l00944"></a>00944 cpl_boolean doplot,
+<a name="l00945"></a>00945 <span class="keywordtype">double</span> * pxc)
+<a name="l00946"></a>00946 {
+<a name="l00947"></a>00947
+<a name="l00948"></a>00948 <span class="keyword">const</span> <span class="keywordtype">int</span> nobs = cpl_vector_get_size(obs);
+<a name="l00949"></a>00949 <span class="keyword">const</span> <span class="keywordtype">int</span> nmodel = 2 * hsize + nobs;
+<a name="l00950"></a>00950 cpl_vector * mspec1d;
+<a name="l00951"></a>00951 cpl_vector * xcorr;
+<a name="l00952"></a>00952 cpl_error_code error;
+<a name="l00953"></a>00953 <span class="keywordtype">int</span> ixc, xxc;
+<a name="l00954"></a>00954 <span class="keywordtype">double</span> xc;
+<a name="l00955"></a>00955
+<a name="l00956"></a>00956 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00957"></a>00957 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00958"></a>00958 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00959"></a>00959 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00960"></a>00960 cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00961"></a>00961
+<a name="l00962"></a>00962 <span class="comment">/* Shift reference by -hsize so filler can be used without offset */</span>
+<a name="l00963"></a>00963 cpl_ensure_code(!cpl_polynomial_shift_1d(<span class="keyword">self</span>, 0, -hsize),
+<a name="l00964"></a>00964 cpl_error_get_code());
+<a name="l00965"></a>00965
+<a name="l00966"></a>00966 mspec1d = cpl_vector_new(nmodel);
+<a name="l00967"></a>00967
+<a name="l00968"></a>00968 <span class="keywordflow">if</span> (filler(mspec1d, <span class="keyword">self</span>, model)) {
+<a name="l00969"></a>00969 cpl_vector_delete(mspec1d);
+<a name="l00970"></a>00970 cpl_ensure_code(0, cpl_error_get_code());
+<a name="l00971"></a>00971 }
+<a name="l00972"></a>00972
+<a name="l00973"></a>00973 <span class="comment">/* Should not be able to fail now */</span>
+<a name="l00974"></a>00974 xcorr = cpl_vector_new(1 + 2 * hsize);
+<a name="l00975"></a>00975 ixc = cpl_vector_correlate(xcorr, mspec1d, obs);
+<a name="l00976"></a>00976
+<a name="l00977"></a>00977 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
+<a name="l00978"></a>00978 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
+<a name="l00979"></a>00979 irplib_polynomial_dump_corr_step(<span class="keyword">self</span>, xcorr, <span class="stringliteral">"Shift"</span>);
+<a name="l00980"></a>00980 <span class="preprocessor">#endif</span>
+<a name="l00981"></a>00981 <span class="preprocessor"></span>
+<a name="l00982"></a>00982 cpl_vector_delete(mspec1d);
+<a name="l00983"></a>00983
+<a name="l00984"></a>00984 error = cpl_polynomial_shift_1d(<span class="keyword">self</span>, 0, (<span class="keywordtype">double</span>)ixc);
+<a name="l00985"></a>00985
+<a name="l00986"></a>00986 xc = cpl_vector_get(xcorr, ixc);
+<a name="l00987"></a>00987
+<a name="l00988"></a>00988 xxc = ixc - hsize; <span class="comment">/* The effect of the two shifts */</span>
<a name="l00989"></a>00989
-<a name="l00990"></a>00990 cpl_errorstate prestate;
-<a name="l00991"></a>00991 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = wfwhm * CPL_MATH_SIG_FWHM;
-<a name="l00992"></a>00992 <span class="keyword">const</span> cpl_vector * xlines = cpl_bivector_get_x_const(lines);
-<a name="l00993"></a>00993 <span class="keyword">const</span> <span class="keywordtype">double</span> * dxlines = cpl_vector_get_data_const(xlines);
-<a name="l00994"></a>00994 <span class="keyword">const</span> <span class="keywordtype">double</span> * dylines = cpl_bivector_get_y_data_const(lines);
-<a name="l00995"></a>00995 <span class="keywordtype">double</span> * plinepix
-<a name="l00996"></a>00996 = linepix ? cpl_vector_get_data(linepix) : NULL;
-<a name="l00997"></a>00997 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_vector_get_size(xlines);
-<a name="l00998"></a>00998 <span class="keyword">const</span> <span class="keywordtype">int</span> nself = cpl_vector_get_size(<span class="keyword">self</span>);
-<a name="l00999"></a>00999 <span class="keywordtype">double</span> * dself = cpl_vector_get_data(<span class="keyword">self</span>);
-<a name="l01000"></a>01000 cpl_polynomial * dispi;
-<a name="l01001"></a>01001 <span class="keywordtype">double</span> * profile = NULL;
-<a name="l01002"></a>01002 <span class="keyword">const</span> cpl_size i0 = 0;
-<a name="l01003"></a>01003 <span class="keyword">const</span> <span class="keywordtype">double</span> p0 = cpl_polynomial_get_coeff(disp, &i0);
-<a name="l01004"></a>01004 <span class="keywordtype">double</span> wl;
-<a name="l01005"></a>01005 <span class="keywordtype">double</span> xpos = (double)(1-hsize)-xtrunc;
-<a name="l01006"></a>01006 <span class="keyword">const</span> <span class="keywordtype">double</span> xmax = (double)(nself-hsize)+xtrunc;
-<a name="l01007"></a>01007 <span class="keywordtype">double</span> xderiv, xextreme;
-<a name="l01008"></a>01008 cpl_error_code error = CPL_ERROR_NONE;
-<a name="l01009"></a>01009 <span class="keywordtype">int</span> iline;
-<a name="l01010"></a>01010 <span class="keywordtype">unsigned</span> ulines = 0;
-<a name="l01011"></a>01011
-<a name="l01012"></a>01012 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01013"></a>01013 cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01014"></a>01014 cpl_ensure_code(lines != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01015"></a>01015
-<a name="l01016"></a>01016 cpl_ensure_code(wslit > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01017"></a>01017 cpl_ensure_code(wfwhm > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01018"></a>01018 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01019"></a>01019 cpl_ensure_code(xtrunc > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01020"></a>01020 cpl_ensure_code(nself > 2 * hsize, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01021"></a>01021
-<a name="l01022"></a>01022 cpl_ensure_code(cpl_polynomial_get_dimension(disp) == 1,
-<a name="l01023"></a>01023 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01024"></a>01024 cpl_ensure_code(cpl_polynomial_get_degree(disp) > 0,
-<a name="l01025"></a>01025 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01026"></a>01026
-<a name="l01027"></a>01027 <span class="comment">/* The smallest wavelength contributing to the spectrum. */</span>
-<a name="l01028"></a>01028 wl = cpl_polynomial_eval_1d(disp, xpos, &xderiv);
-<a name="l01029"></a>01029
-<a name="l01030"></a>01030 <span class="keywordflow">if</span> (wl <= 0.0) <span class="keywordflow">return</span>
-<a name="l01031"></a>01031 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT, __FILE__,
-<a name="l01032"></a>01032 __LINE__, <span class="stringliteral">"Non-positive wavelength at x=%g: "</span>
-<a name="l01033"></a>01033 <span class="stringliteral">"P(x)=%g, P'(x)=%g"</span>, xpos, wl, xderiv);
-<a name="l01034"></a>01034
-<a name="l01035"></a>01035 <span class="keywordflow">if</span> (xderiv <= 0.0) <span class="keywordflow">return</span>
-<a name="l01036"></a>01036 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT, __FILE__,
-<a name="l01037"></a>01037 __LINE__, <span class="stringliteral">"Non-increasing dispersion at "</span>
-<a name="l01038"></a>01038 <span class="stringliteral">"x=%g: P'(x)=%g, P(x)=%g"</span>, xpos, xderiv, wl);
-<a name="l01039"></a>01039
-<a name="l01040"></a>01040 <span class="comment">/* Find the 1st line */</span>
-<a name="l01041"></a>01041 iline = cpl_vector_find(xlines, wl);
-<a name="l01042"></a>01042
-<a name="l01043"></a>01043 <span class="comment">/* The first line must be at least at wl */</span>
-<a name="l01044"></a>01044 <span class="keywordflow">if</span> (dxlines[iline] < wl) iline++;
-<a name="l01045"></a>01045
-<a name="l01046"></a>01046 <span class="keywordflow">if</span> (iline >= nlines) <span class="keywordflow">return</span>
-<a name="l01047"></a>01047 cpl_error_set_message_macro(cpl_func, CPL_ERROR_DATA_NOT_FOUND, __FILE__,
-<a name="l01048"></a>01048 __LINE__, <span class="stringliteral">"The %d-line catalogue has only "</span>
-<a name="l01049"></a>01049 <span class="stringliteral">"lines below P(%g)=%g > %g"</span>, nlines, xpos,
-<a name="l01050"></a>01050 wl, dxlines[nlines-1]);
-<a name="l01051"></a>01051
-<a name="l01052"></a>01052 memset(dself, 0, nself * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
-<a name="l01053"></a>01053
-<a name="l01054"></a>01054 dispi = cpl_polynomial_duplicate(disp);
-<a name="l01055"></a>01055
-<a name="l01056"></a>01056 <span class="comment">/* Verify monotony of dispersion */</span>
-<a name="l01057"></a>01057 cpl_polynomial_derivative(dispi, 0);
-<a name="l01058"></a>01058
-<a name="l01059"></a>01059 prestate = cpl_errorstate_get();
-<a name="l01060"></a>01060
-<a name="l01061"></a>01061 <span class="keywordflow">if</span> (cpl_polynomial_solve_1d(dispi, 0.5*(nlines+1), &xextreme, 1)) {
-<a name="l01062"></a>01062 cpl_errorstate_set(prestate);
-<a name="l01063"></a>01063 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (xpos < xextreme && xextreme < xmax) {
-<a name="l01064"></a>01064 cpl_polynomial_delete(dispi);
-<a name="l01065"></a>01065 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l01066"></a>01066 __FILE__, __LINE__, <span class="stringliteral">"Non-monotone "</span>
-<a name="l01067"></a>01067 <span class="stringliteral">"dispersion at x=%g: P'(x)=0, "</span>
-<a name="l01068"></a>01068 <span class="stringliteral">"P(x)=%g"</span>, xextreme,
-<a name="l01069"></a>01069 cpl_polynomial_eval_1d(disp, xextreme,
-<a name="l01070"></a>01070 NULL));
-<a name="l01071"></a>01071 }
-<a name="l01072"></a>01072
-<a name="l01073"></a>01073 <span class="keywordflow">if</span> (dofast) {
-<a name="l01074"></a>01074 <span class="keyword">const</span> <span class="keywordtype">int</span> npix = 1+(int)xtrunc;
-<a name="l01075"></a>01075
-<a name="l01076"></a>01076 <span class="keywordflow">if</span> (erftmp != NULL && cpl_vector_get_size(erftmp) == npix &&
-<a name="l01077"></a>01077 cpl_vector_get(erftmp, 0) > 0.0) {
-<a name="l01078"></a>01078 profile = cpl_vector_get_data(erftmp);
-<a name="l01079"></a>01079 } <span class="keywordflow">else</span> {
-<a name="l01080"></a>01080
-<a name="l01081"></a>01081 <span class="keyword">const</span> <span class="keywordtype">double</span> yval = 0.5 / wslit;
-<a name="l01082"></a>01082 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = 0.5 * wslit + 0.5;
-<a name="l01083"></a>01083 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = -0.5 * wslit + 0.5;
-<a name="l01084"></a>01084 <span class="keywordtype">double</span> x1diff
-<a name="l01085"></a>01085 = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma)
-<a name="l01086"></a>01086 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma);
-<a name="l01087"></a>01087 <span class="keywordtype">int</span> ipix;
-<a name="l01088"></a>01088
-<a name="l01089"></a>01089 <span class="keywordflow">if</span> (erftmp == NULL) {
-<a name="l01090"></a>01090 profile = (<span class="keywordtype">double</span>*)cpl_malloc(<span class="keyword">sizeof</span>(<span class="keywordtype">double</span>)*(size_t)npix);
-<a name="l01091"></a>01091 } <span class="keywordflow">else</span> {
-<a name="l01092"></a>01092 cpl_vector_set_size(erftmp, npix);
-<a name="l01093"></a>01093 profile = cpl_vector_get_data(erftmp);
-<a name="l01094"></a>01094 }
-<a name="l01095"></a>01095
-<a name="l01096"></a>01096 profile[0] = 2.0 * yval * x1diff;
-<a name="l01097"></a>01097
-<a name="l01098"></a>01098 <span class="keywordflow">for</span> (ipix = 1; ipix < npix; ipix++) {
-<a name="l01099"></a>01099 <span class="keyword">const</span> <span class="keywordtype">double</span> x1 = (double)ipix;
-<a name="l01100"></a>01100 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = x1 + 0.5 * wslit + 0.5;
-<a name="l01101"></a>01101 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = x1 - 0.5 * wslit + 0.5;
-<a name="l01102"></a>01102 <span class="keyword">const</span> <span class="keywordtype">double</span> x0diff = x1diff;
-<a name="l01103"></a>01103
-<a name="l01104"></a>01104 x1diff = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma)
-<a name="l01105"></a>01105 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma);
-<a name="l01106"></a>01106
-<a name="l01107"></a>01107 profile[ipix] = yval * (x1diff - x0diff);
-<a name="l01108"></a>01108
-<a name="l01109"></a>01109 }
-<a name="l01110"></a>01110 }
-<a name="l01111"></a>01111 }
+<a name="l00990"></a>00990 cpl_msg_info(cpl_func, <span class="stringliteral">"Shifting %d pixels (%g < %g)"</span>, xxc,
+<a name="l00991"></a>00991 cpl_vector_get(xcorr, hsize), xc);
+<a name="l00992"></a>00992
+<a name="l00993"></a>00993 <span class="keywordflow">if</span> (doplot) {
+<a name="l00994"></a>00994 cpl_vector * xvals = cpl_vector_new(1 + 2 * hsize);
+<a name="l00995"></a>00995 cpl_bivector * bcorr = cpl_bivector_wrap_vectors(xvals, xcorr);
+<a name="l00996"></a>00996 <span class="keywordtype">int</span> i;
+<a name="l00997"></a>00997 <span class="keywordtype">double</span> x = (double)-hsize;
+<a name="l00998"></a>00998 <span class="keywordtype">char</span> * title = cpl_sprintf(<span class="stringliteral">"t 'Cross-correlation of shifted %d-pixel "</span>
+<a name="l00999"></a>00999 <span class="stringliteral">"spectrum (XCmax=%g at %d)' w linespoints"</span>,
+<a name="l01000"></a>01000 nobs, cpl_vector_get(xcorr, ixc), xxc);
+<a name="l01001"></a>01001
+<a name="l01002"></a>01002 <span class="keywordflow">for</span> (i = 0; i < 1 + 2 * hsize; i++, x += 1.0) {
+<a name="l01003"></a>01003 cpl_vector_set(xvals, i, x);
+<a name="l01004"></a>01004 }
+<a name="l01005"></a>01005
+<a name="l01006"></a>01006 cpl_plot_bivector(<span class="stringliteral">"set grid;set xlabel 'Offset [pixel]';"</span>, title,
+<a name="l01007"></a>01007 <span class="stringliteral">""</span>, bcorr);
+<a name="l01008"></a>01008 cpl_bivector_unwrap_vectors(bcorr);
+<a name="l01009"></a>01009 cpl_vector_delete(xvals);
+<a name="l01010"></a>01010 cpl_free(title);
+<a name="l01011"></a>01011 }
+<a name="l01012"></a>01012
+<a name="l01013"></a>01013 cpl_vector_delete(xcorr);
+<a name="l01014"></a>01014
+<a name="l01015"></a>01015 cpl_ensure_code(!error, error);
+<a name="l01016"></a>01016
+<a name="l01017"></a>01017 <span class="keywordflow">if</span> (pxc != NULL) *pxc = xc;
+<a name="l01018"></a>01018
+<a name="l01019"></a>01019 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01020"></a>01020
+<a name="l01021"></a>01021 }
+<a name="l01022"></a>01022
+<a name="l01023"></a>01023
+<a name="l01024"></a>01024 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01044"></a>01044 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01045"></a>01045 cpl_error_code
+<a name="l01046"></a><a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761">01046</a> <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(cpl_vector * <span class="keyword">self</span>,
+<a name="l01047"></a>01047 cpl_vector * linepix,
+<a name="l01048"></a>01048 cpl_vector * erftmp,
+<a name="l01049"></a>01049 <span class="keyword">const</span> cpl_polynomial * disp,
+<a name="l01050"></a>01050 <span class="keyword">const</span> cpl_bivector * lines,
+<a name="l01051"></a>01051 <span class="keywordtype">double</span> wslit,
+<a name="l01052"></a>01052 <span class="keywordtype">double</span> wfwhm,
+<a name="l01053"></a>01053 <span class="keywordtype">double</span> xtrunc,
+<a name="l01054"></a>01054 <span class="keywordtype">int</span> hsize,
+<a name="l01055"></a>01055 cpl_boolean dofast,
+<a name="l01056"></a>01056 cpl_boolean dolog,
+<a name="l01057"></a>01057 cpl_size * pulines)
+<a name="l01058"></a>01058 {
+<a name="l01059"></a>01059
+<a name="l01060"></a>01060 cpl_errorstate prestate;
+<a name="l01061"></a>01061 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = wfwhm * CPL_MATH_SIG_FWHM;
+<a name="l01062"></a>01062 <span class="keyword">const</span> cpl_vector * xlines = cpl_bivector_get_x_const(lines);
+<a name="l01063"></a>01063 <span class="keyword">const</span> <span class="keywordtype">double</span> * dxlines = cpl_vector_get_data_const(xlines);
+<a name="l01064"></a>01064 <span class="keyword">const</span> <span class="keywordtype">double</span> * dylines = cpl_bivector_get_y_data_const(lines);
+<a name="l01065"></a>01065 <span class="keywordtype">double</span> * plinepix
+<a name="l01066"></a>01066 = linepix ? cpl_vector_get_data(linepix) : NULL;
+<a name="l01067"></a>01067 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_vector_get_size(xlines);
+<a name="l01068"></a>01068 <span class="keyword">const</span> <span class="keywordtype">int</span> nself = cpl_vector_get_size(<span class="keyword">self</span>);
+<a name="l01069"></a>01069 <span class="keywordtype">double</span> * dself = cpl_vector_get_data(<span class="keyword">self</span>);
+<a name="l01070"></a>01070 cpl_polynomial * dispi;
+<a name="l01071"></a>01071 <span class="keywordtype">double</span> * profile = NULL;
+<a name="l01072"></a>01072 <span class="keyword">const</span> cpl_size i0 = 0;
+<a name="l01073"></a>01073 <span class="keyword">const</span> <span class="keywordtype">double</span> p0 = cpl_polynomial_get_coeff(disp, &i0);
+<a name="l01074"></a>01074 <span class="keywordtype">double</span> wl;
+<a name="l01075"></a>01075 <span class="keywordtype">double</span> xpos = (double)(1-hsize)-xtrunc;
+<a name="l01076"></a>01076 <span class="keyword">const</span> <span class="keywordtype">double</span> xmax = (double)(nself-hsize)+xtrunc;
+<a name="l01077"></a>01077 <span class="keywordtype">double</span> xderiv, xextreme;
+<a name="l01078"></a>01078 cpl_error_code error = CPL_ERROR_NONE;
+<a name="l01079"></a>01079 <span class="keywordtype">int</span> iline;
+<a name="l01080"></a>01080 cpl_size ulines = 0;
+<a name="l01081"></a>01081
+<a name="l01082"></a>01082 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01083"></a>01083 cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01084"></a>01084 cpl_ensure_code(lines != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01085"></a>01085
+<a name="l01086"></a>01086 cpl_ensure_code(wslit > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01087"></a>01087 cpl_ensure_code(wfwhm > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01088"></a>01088 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01089"></a>01089 cpl_ensure_code(xtrunc > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01090"></a>01090 cpl_ensure_code(nself > 2 * hsize, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01091"></a>01091
+<a name="l01092"></a>01092 cpl_ensure_code(cpl_polynomial_get_dimension(disp) == 1,
+<a name="l01093"></a>01093 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01094"></a>01094 cpl_ensure_code(cpl_polynomial_get_degree(disp) > 0,
+<a name="l01095"></a>01095 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01096"></a>01096
+<a name="l01097"></a>01097 <span class="comment">/* The smallest wavelength contributing to the spectrum. */</span>
+<a name="l01098"></a>01098 wl = cpl_polynomial_eval_1d(disp, xpos, &xderiv);
+<a name="l01099"></a>01099
+<a name="l01100"></a>01100 <span class="keywordflow">if</span> (wl <= 0.0) <span class="keywordflow">return</span>
+<a name="l01101"></a>01101 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT, __FILE__,
+<a name="l01102"></a>01102 __LINE__, <span class="stringliteral">"Non-positive wavelength at x=%g: "</span>
+<a name="l01103"></a>01103 <span class="stringliteral">"P(x)=%g, P'(x)=%g"</span>, xpos, wl, xderiv);
+<a name="l01104"></a>01104
+<a name="l01105"></a>01105 <span class="keywordflow">if</span> (xderiv <= 0.0) <span class="keywordflow">return</span>
+<a name="l01106"></a>01106 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT, __FILE__,
+<a name="l01107"></a>01107 __LINE__, <span class="stringliteral">"Non-increasing dispersion at "</span>
+<a name="l01108"></a>01108 <span class="stringliteral">"x=%g: P'(x)=%g, P(x)=%g"</span>, xpos, xderiv, wl);
+<a name="l01109"></a>01109
+<a name="l01110"></a>01110 <span class="comment">/* Find the 1st line */</span>
+<a name="l01111"></a>01111 iline = cpl_vector_find(xlines, wl);
<a name="l01112"></a>01112
-<a name="l01113"></a>01113 cpl_polynomial_copy(dispi, disp);
-<a name="l01114"></a>01114
-<a name="l01115"></a>01115 <span class="comment">/* FIXME: A custom version of cpl_polynomial_solve_1d() which returns</span>
-<a name="l01116"></a>01116 <span class="comment"> P'(xpos) can be used for the 1st NR-iteration. */</span>
-<a name="l01117"></a>01117 <span class="comment">/* Further, the sign of P'(xpos) could be checked for all lines. */</span>
-<a name="l01118"></a>01118 <span class="comment">/* Perform 1st NR-iteration in solving for P(xpos) = dxlines[iline] */</span>
-<a name="l01119"></a>01119 xpos -= (wl - dxlines[iline]) / xderiv;
-<a name="l01120"></a>01120
-<a name="l01121"></a>01121 <span class="comment">/* Iterate through the lines */</span>
-<a name="l01122"></a>01122 <span class="keywordflow">for</span> (; !error && iline < nlines; iline++) {
+<a name="l01113"></a>01113 <span class="comment">/* The first line must be at least at wl */</span>
+<a name="l01114"></a>01114 <span class="keywordflow">if</span> (dxlines[iline] < wl) iline++;
+<a name="l01115"></a>01115
+<a name="l01116"></a>01116 <span class="keywordflow">if</span> (iline >= nlines) <span class="keywordflow">return</span>
+<a name="l01117"></a>01117 cpl_error_set_message_macro(cpl_func, CPL_ERROR_DATA_NOT_FOUND, __FILE__,
+<a name="l01118"></a>01118 __LINE__, <span class="stringliteral">"The %d-line catalogue has only "</span>
+<a name="l01119"></a>01119 <span class="stringliteral">"lines below P(%g)=%g > %g"</span>, nlines, xpos,
+<a name="l01120"></a>01120 wl, dxlines[nlines-1]);
+<a name="l01121"></a>01121
+<a name="l01122"></a>01122 memset(dself, 0, nself * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
<a name="l01123"></a>01123
-<a name="l01124"></a>01124 <span class="comment">/* Lines may have a non-physical intensity (e.g. zero) to indicate some</span>
-<a name="l01125"></a>01125 <span class="comment"> property of the line, e.g. unknown intensity due to blending */</span>
-<a name="l01126"></a>01126 <span class="keywordflow">if</span> (dylines[iline] <= 0.0) <span class="keywordflow">continue</span>;
-<a name="l01127"></a>01127
-<a name="l01128"></a>01128 <span class="comment">/* Use 1st guess, if available (Use 0.0 to flag unavailable) */</span>
-<a name="l01129"></a>01129 <span class="keywordflow">if</span> (plinepix != NULL && plinepix[iline] > 0.0) xpos = plinepix[iline];
+<a name="l01124"></a>01124 dispi = cpl_polynomial_duplicate(disp);
+<a name="l01125"></a>01125
+<a name="l01126"></a>01126 <span class="comment">/* Verify monotony of dispersion */</span>
+<a name="l01127"></a>01127 cpl_polynomial_derivative(dispi, 0);
+<a name="l01128"></a>01128
+<a name="l01129"></a>01129 prestate = cpl_errorstate_get();
<a name="l01130"></a>01130
-<a name="l01131"></a>01131 <span class="keywordflow">if</span> (xpos > xmax) xpos = xmax; <span class="comment">/* FIXME: Better to limit xpos ? */</span>
-<a name="l01132"></a>01132
-<a name="l01133"></a>01133 <span class="comment">/* Find the (sub-) pixel position of the line */</span>
-<a name="l01134"></a>01134 error = cpl_polynomial_set_coeff(dispi, &i0, p0 - dxlines[iline]) ||
-<a name="l01135"></a>01135 cpl_polynomial_solve_1d(dispi, xpos, &xpos, 1);
-<a name="l01136"></a>01136
-<a name="l01137"></a>01137 <span class="keywordflow">if</span> (xpos > xmax) {
-<a name="l01138"></a>01138 <span class="keywordflow">if</span> (error) {
-<a name="l01139"></a>01139 error = 0;
-<a name="l01140"></a>01140 cpl_msg_debug(cpl_func, <span class="stringliteral">"Stopping spectrum fill at line %d/%d "</span>
-<a name="l01141"></a>01141 <span class="stringliteral">"at xpos=%g > xmax=%g"</span>,
-<a name="l01142"></a>01142 iline, nlines, xpos, xmax);
-<a name="l01143"></a>01143 cpl_errorstate_dump(prestate, CPL_FALSE,
-<a name="l01144"></a>01144 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
-<a name="l01145"></a>01145 cpl_errorstate_set(prestate);
-<a name="l01146"></a>01146 }
-<a name="l01147"></a>01147 <span class="keywordflow">break</span>;
-<a name="l01148"></a>01148 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error) {
-<a name="l01149"></a>01149 <span class="keywordflow">if</span> (linepix != NULL && ulines) (void)cpl_vector_fill(linepix, 0.0);
-<a name="l01150"></a>01150 (void)cpl_error_set_message_macro(cpl_func, cpl_error_get_code(),
-<a name="l01151"></a>01151 __FILE__, __LINE__,
-<a name="l01152"></a>01152 <span class="stringliteral">"Could not find pixel-position "</span>
-<a name="l01153"></a>01153 <span class="stringliteral">"of line %d/%d at wavelength=%g."</span>
-<a name="l01154"></a>01154 <span class="stringliteral">" xpos=%g, xmax=%g"</span>,
-<a name="l01155"></a>01155 iline, nlines, dxlines[iline],
-<a name="l01156"></a>01156 xpos, xmax);
-<a name="l01157"></a>01157 <span class="keywordflow">break</span>;
-<a name="l01158"></a>01158 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dofast) {
-<a name="l01159"></a>01159 <span class="keyword">const</span> <span class="keywordtype">double</span> frac = fabs(xpos - floor(xpos));
-<a name="l01160"></a>01160 <span class="preprocessor">#ifdef IRPLIB_WAVECAL_FAST_FAST</span>
-<a name="l01161"></a>01161 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">double</span> frac0 = 1.0 - frac; <span class="comment">/* Weight opposite of distance */</span>
-<a name="l01162"></a>01162 <span class="preprocessor">#else</span>
-<a name="l01163"></a>01163 <span class="preprocessor"></span> <span class="comment">/* Center intensity correctly */</span>
-<a name="l01164"></a>01164 <span class="keyword">const</span> <span class="keywordtype">double</span> ep1pw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac + 0.5 * wslit, sigma);
-<a name="l01165"></a>01165 <span class="keyword">const</span> <span class="keywordtype">double</span> en1pw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac + 0.5 * wslit - 1.0,
-<a name="l01166"></a>01166 sigma);
-<a name="l01167"></a>01167 <span class="keyword">const</span> <span class="keywordtype">double</span> ep1nw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac - 0.5 * wslit, sigma);
-<a name="l01168"></a>01168 <span class="keyword">const</span> <span class="keywordtype">double</span> en1nw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac - 0.5 * wslit - 1.0,
-<a name="l01169"></a>01169 sigma);
-<a name="l01170"></a>01170 <span class="keyword">const</span> <span class="keywordtype">double</span> frac0
-<a name="l01171"></a>01171 = (en1nw - en1pw) / (ep1pw - en1pw - ep1nw + en1nw);
-<a name="l01172"></a>01172
-<a name="l01173"></a>01173 <span class="preprocessor">#endif</span>
-<a name="l01174"></a>01174 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">double</span> frac1 = 1.0 - frac0;
-<a name="l01175"></a>01175 <span class="keyword">const</span> <span class="keywordtype">double</span> yval0 = frac0 * dylines[iline];
-<a name="l01176"></a>01176 <span class="keyword">const</span> <span class="keywordtype">double</span> yval1 = frac1 * dylines[iline];
-<a name="l01177"></a>01177 <span class="keyword">const</span> <span class="keywordtype">int</span> npix = 1+(int)xtrunc;
-<a name="l01178"></a>01178 <span class="keywordtype">int</span> ipix;
-<a name="l01179"></a>01179 <span class="keywordtype">int</span> i0n = hsize - 1 + floor(xpos);
-<a name="l01180"></a>01180 <span class="keywordtype">int</span> i0p = i0n;
-<a name="l01181"></a>01181 <span class="keywordtype">int</span> i1n = i0n + 1;
-<a name="l01182"></a>01182 <span class="keywordtype">int</span> i1p = i1n;
-<a name="l01183"></a>01183 cpl_boolean didline = CPL_FALSE;
+<a name="l01131"></a>01131 <span class="keywordflow">if</span> (cpl_polynomial_solve_1d(dispi, 0.5*(nlines+1), &xextreme, 1)) {
+<a name="l01132"></a>01132 cpl_errorstate_set(prestate);
+<a name="l01133"></a>01133 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (xpos < xextreme && xextreme < xmax) {
+<a name="l01134"></a>01134 cpl_polynomial_delete(dispi);
+<a name="l01135"></a>01135 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l01136"></a>01136 __FILE__, __LINE__, <span class="stringliteral">"Non-monotone "</span>
+<a name="l01137"></a>01137 <span class="stringliteral">"dispersion at x=%g: P'(x)=0, "</span>
+<a name="l01138"></a>01138 <span class="stringliteral">"P(x)=%g"</span>, xextreme,
+<a name="l01139"></a>01139 cpl_polynomial_eval_1d(disp, xextreme,
+<a name="l01140"></a>01140 NULL));
+<a name="l01141"></a>01141 }
+<a name="l01142"></a>01142
+<a name="l01143"></a>01143 <span class="keywordflow">if</span> (dofast) {
+<a name="l01144"></a>01144 <span class="keyword">const</span> <span class="keywordtype">int</span> npix = 1+(int)xtrunc;
+<a name="l01145"></a>01145
+<a name="l01146"></a>01146 <span class="keywordflow">if</span> (erftmp != NULL && cpl_vector_get_size(erftmp) == npix &&
+<a name="l01147"></a>01147 cpl_vector_get(erftmp, 0) > 0.0) {
+<a name="l01148"></a>01148 profile = cpl_vector_get_data(erftmp);
+<a name="l01149"></a>01149 } <span class="keywordflow">else</span> {
+<a name="l01150"></a>01150
+<a name="l01151"></a>01151 <span class="keyword">const</span> <span class="keywordtype">double</span> yval = 0.5 / wslit;
+<a name="l01152"></a>01152 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = 0.5 * wslit + 0.5;
+<a name="l01153"></a>01153 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = -0.5 * wslit + 0.5;
+<a name="l01154"></a>01154 <span class="keywordtype">double</span> x1diff
+<a name="l01155"></a>01155 = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma)
+<a name="l01156"></a>01156 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma);
+<a name="l01157"></a>01157 <span class="keywordtype">int</span> ipix;
+<a name="l01158"></a>01158
+<a name="l01159"></a>01159 <span class="keywordflow">if</span> (erftmp == NULL) {
+<a name="l01160"></a>01160 profile = (<span class="keywordtype">double</span>*)cpl_malloc(<span class="keyword">sizeof</span>(<span class="keywordtype">double</span>)*(size_t)npix);
+<a name="l01161"></a>01161 } <span class="keywordflow">else</span> {
+<a name="l01162"></a>01162 cpl_vector_set_size(erftmp, npix);
+<a name="l01163"></a>01163 profile = cpl_vector_get_data(erftmp);
+<a name="l01164"></a>01164 }
+<a name="l01165"></a>01165
+<a name="l01166"></a>01166 profile[0] = 2.0 * yval * x1diff;
+<a name="l01167"></a>01167
+<a name="l01168"></a>01168 <span class="keywordflow">for</span> (ipix = 1; ipix < npix; ipix++) {
+<a name="l01169"></a>01169 <span class="keyword">const</span> <span class="keywordtype">double</span> x1 = (double)ipix;
+<a name="l01170"></a>01170 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = x1 + 0.5 * wslit + 0.5;
+<a name="l01171"></a>01171 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = x1 - 0.5 * wslit + 0.5;
+<a name="l01172"></a>01172 <span class="keyword">const</span> <span class="keywordtype">double</span> x0diff = x1diff;
+<a name="l01173"></a>01173
+<a name="l01174"></a>01174 x1diff = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma)
+<a name="l01175"></a>01175 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma);
+<a name="l01176"></a>01176
+<a name="l01177"></a>01177 profile[ipix] = yval * (x1diff - x0diff);
+<a name="l01178"></a>01178
+<a name="l01179"></a>01179 }
+<a name="l01180"></a>01180 }
+<a name="l01181"></a>01181 }
+<a name="l01182"></a>01182
+<a name="l01183"></a>01183 cpl_polynomial_copy(dispi, disp);
<a name="l01184"></a>01184
-<a name="l01185"></a>01185
-<a name="l01186"></a>01186 <span class="comment">/* Update 1st guess for next time, if available */</span>
-<a name="l01187"></a>01187 <span class="keywordflow">if</span> (plinepix != NULL) plinepix[iline] = xpos;
-<a name="l01188"></a>01188
-<a name="l01189"></a>01189 <span class="keywordflow">if</span> (frac0 < 0.0) {
-<a name="l01190"></a>01190 (void)cpl_error_set_message_macro(cpl_func,
-<a name="l01191"></a>01191 CPL_ERROR_UNSPECIFIED,
-<a name="l01192"></a>01192 __FILE__, __LINE__,
-<a name="l01193"></a>01193 <span class="stringliteral">"Illegal split at x=%g: %g + "</span>
-<a name="l01194"></a>01194 <span class="stringliteral">"%g = 1"</span>, xpos, frac0, frac1);
-<a name="l01195"></a>01195 <span class="preprocessor">#ifdef IRPLIB_WAVEVAL_DEBUG</span>
-<a name="l01196"></a>01196 <span class="preprocessor"></span> } <span class="keywordflow">else</span> {
-<a name="l01197"></a>01197 cpl_msg_warning(cpl_func,<span class="stringliteral">"profile split at x=%g: %g + %g = 1"</span>,
-<a name="l01198"></a>01198 xpos, frac0, frac1);
-<a name="l01199"></a>01199 <span class="preprocessor">#endif</span>
-<a name="l01200"></a>01200 <span class="preprocessor"></span> }
-<a name="l01201"></a>01201
-<a name="l01202"></a>01202 <span class="keywordflow">for</span> (ipix = 0; ipix < npix; ipix++, i0n--, i0p++, i1n--, i1p++) {
-<a name="l01203"></a>01203
-<a name="l01204"></a>01204 <span class="keywordflow">if</span> (i0n >= 0 && i0n < nself) {
-<a name="l01205"></a>01205 dself[i0n] += yval0 * profile[ipix];
-<a name="l01206"></a>01206 didline = CPL_TRUE;
-<a name="l01207"></a>01207 }
-<a name="l01208"></a>01208 <span class="keywordflow">if</span> (i1n >= 0 && i1n < nself && ipix + 1 < npix) {
-<a name="l01209"></a>01209 dself[i1n] += yval1 * profile[ipix+1];
-<a name="l01210"></a>01210 didline = CPL_TRUE;
-<a name="l01211"></a>01211 }
-<a name="l01212"></a>01212
-<a name="l01213"></a>01213 <span class="keywordflow">if</span> (ipix == 0) <span class="keywordflow">continue</span>;
-<a name="l01214"></a>01214
-<a name="l01215"></a>01215 <span class="keywordflow">if</span> (i0p >= 0 && i0p < nself) {
-<a name="l01216"></a>01216 dself[i0p] += yval0 * profile[ipix];
-<a name="l01217"></a>01217 didline = CPL_TRUE;
-<a name="l01218"></a>01218 }
-<a name="l01219"></a>01219 <span class="keywordflow">if</span> (i1p >= 0 && i1p < nself && ipix + 1 < npix) {
-<a name="l01220"></a>01220 dself[i1p] += yval1 * profile[ipix+1];
-<a name="l01221"></a>01221 didline = CPL_TRUE;
-<a name="l01222"></a>01222 }
-<a name="l01223"></a>01223 }
-<a name="l01224"></a>01224
-<a name="l01225"></a>01225 <span class="keywordflow">if</span> (didline) ulines++;
-<a name="l01226"></a>01226
-<a name="l01227"></a>01227 } <span class="keywordflow">else</span> {
-<a name="l01228"></a>01228 <span class="keyword">const</span> <span class="keywordtype">double</span> yval = 0.5 * dylines[iline] / wslit;
-<a name="l01229"></a>01229 <span class="keyword">const</span> <span class="keywordtype">int</span> ifirst = IRPLIB_MAX((<span class="keywordtype">int</span>)(xpos-xtrunc+0.5), 1-hsize);
-<a name="l01230"></a>01230 <span class="keyword">const</span> <span class="keywordtype">int</span> ilast = IRPLIB_MIN((<span class="keywordtype">int</span>)(xpos+xtrunc), nself-hsize);
-<a name="l01231"></a>01231 <span class="keywordtype">int</span> ipix;
-<a name="l01232"></a>01232 <span class="keyword">const</span> <span class="keywordtype">double</span> x0 = (double)ifirst - xpos;
-<a name="l01233"></a>01233 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = x0 + 0.5*wslit - 0.5;
-<a name="l01234"></a>01234 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = x0 - 0.5*wslit - 0.5;
-<a name="l01235"></a>01235 <span class="keywordtype">double</span> x1diff
-<a name="l01236"></a>01236 = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma)
-<a name="l01237"></a>01237 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma);
-<a name="l01238"></a>01238
-<a name="l01239"></a>01239 <span class="comment">/* Update 1st guess for next time, if available */</span>
-<a name="l01240"></a>01240 <span class="keywordflow">if</span> (plinepix != NULL) plinepix[iline] = xpos;
-<a name="l01241"></a>01241
-<a name="l01242"></a>01242 <span class="keywordflow">if</span> (ilast >= ifirst) ulines++;
-<a name="l01243"></a>01243
-<a name="l01244"></a>01244 <span class="keywordflow">for</span> (ipix = ifirst; ipix <= ilast; ipix++) {
-<a name="l01245"></a>01245 <span class="keyword">const</span> <span class="keywordtype">double</span> x1 = (double)ipix - xpos;
-<a name="l01246"></a>01246 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = x1 + 0.5*wslit + 0.5;
-<a name="l01247"></a>01247 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = x1 - 0.5*wslit + 0.5;
-<a name="l01248"></a>01248 <span class="keyword">const</span> <span class="keywordtype">double</span> x0diff = x1diff;
-<a name="l01249"></a>01249
-<a name="l01250"></a>01250 x1diff = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma)
-<a name="l01251"></a>01251 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma);
-<a name="l01252"></a>01252
-<a name="l01253"></a>01253 dself[ipix+hsize-1] += yval * (x1diff - x0diff);
+<a name="l01185"></a>01185 <span class="comment">/* FIXME: A custom version of cpl_polynomial_solve_1d() which returns</span>
+<a name="l01186"></a>01186 <span class="comment"> P'(xpos) can be used for the 1st NR-iteration. */</span>
+<a name="l01187"></a>01187 <span class="comment">/* Further, the sign of P'(xpos) could be checked for all lines. */</span>
+<a name="l01188"></a>01188 <span class="comment">/* Perform 1st NR-iteration in solving for P(xpos) = dxlines[iline] */</span>
+<a name="l01189"></a>01189 xpos -= (wl - dxlines[iline]) / xderiv;
+<a name="l01190"></a>01190
+<a name="l01191"></a>01191 <span class="comment">/* Iterate through the lines */</span>
+<a name="l01192"></a>01192 <span class="keywordflow">for</span> (; !error && iline < nlines; iline++) {
+<a name="l01193"></a>01193
+<a name="l01194"></a>01194 <span class="comment">/* Lines may have a non-physical intensity (e.g. zero) to indicate some</span>
+<a name="l01195"></a>01195 <span class="comment"> property of the line, e.g. unknown intensity due to blending */</span>
+<a name="l01196"></a>01196 <span class="keywordflow">if</span> (dylines[iline] <= 0.0) <span class="keywordflow">continue</span>;
+<a name="l01197"></a>01197
+<a name="l01198"></a>01198 <span class="comment">/* Use 1st guess, if available (Use 0.0 to flag unavailable) */</span>
+<a name="l01199"></a>01199 <span class="keywordflow">if</span> (plinepix != NULL && plinepix[iline] > 0.0) xpos = plinepix[iline];
+<a name="l01200"></a>01200
+<a name="l01201"></a>01201 <span class="keywordflow">if</span> (xpos > xmax) xpos = xmax; <span class="comment">/* FIXME: Better to limit xpos ? */</span>
+<a name="l01202"></a>01202
+<a name="l01203"></a>01203 <span class="comment">/* Find the (sub-) pixel position of the line */</span>
+<a name="l01204"></a>01204 error = cpl_polynomial_set_coeff(dispi, &i0, p0 - dxlines[iline]) ||
+<a name="l01205"></a>01205 cpl_polynomial_solve_1d(dispi, xpos, &xpos, 1);
+<a name="l01206"></a>01206
+<a name="l01207"></a>01207 <span class="keywordflow">if</span> (xpos > xmax) {
+<a name="l01208"></a>01208 <span class="keywordflow">if</span> (error) {
+<a name="l01209"></a>01209 error = 0;
+<a name="l01210"></a>01210 cpl_msg_debug(cpl_func, <span class="stringliteral">"Stopping spectrum fill at line %d/%d "</span>
+<a name="l01211"></a>01211 <span class="stringliteral">"at xpos=%g > xmax=%g"</span>,
+<a name="l01212"></a>01212 iline, nlines, xpos, xmax);
+<a name="l01213"></a>01213 cpl_errorstate_dump(prestate, CPL_FALSE,
+<a name="l01214"></a>01214 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
+<a name="l01215"></a>01215 cpl_errorstate_set(prestate);
+<a name="l01216"></a>01216 }
+<a name="l01217"></a>01217 <span class="keywordflow">break</span>;
+<a name="l01218"></a>01218 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (error) {
+<a name="l01219"></a>01219 <span class="keywordflow">if</span> (linepix != NULL && ulines) (void)cpl_vector_fill(linepix, 0.0);
+<a name="l01220"></a>01220 (void)cpl_error_set_message_macro(cpl_func, cpl_error_get_code(),
+<a name="l01221"></a>01221 __FILE__, __LINE__,
+<a name="l01222"></a>01222 <span class="stringliteral">"Could not find pixel-position "</span>
+<a name="l01223"></a>01223 <span class="stringliteral">"of line %d/%d at wavelength=%g."</span>
+<a name="l01224"></a>01224 <span class="stringliteral">" xpos=%g, xmax=%g"</span>,
+<a name="l01225"></a>01225 iline, nlines, dxlines[iline],
+<a name="l01226"></a>01226 xpos, xmax);
+<a name="l01227"></a>01227 <span class="keywordflow">break</span>;
+<a name="l01228"></a>01228 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dofast) {
+<a name="l01229"></a>01229 <span class="keyword">const</span> <span class="keywordtype">double</span> frac = fabs(xpos - floor(xpos));
+<a name="l01230"></a>01230 <span class="preprocessor">#ifdef IRPLIB_WAVECAL_FAST_FAST</span>
+<a name="l01231"></a>01231 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">double</span> frac0 = 1.0 - frac; <span class="comment">/* Weight opposite of distance */</span>
+<a name="l01232"></a>01232 <span class="preprocessor">#else</span>
+<a name="l01233"></a>01233 <span class="preprocessor"></span> <span class="comment">/* Center intensity correctly */</span>
+<a name="l01234"></a>01234 <span class="keyword">const</span> <span class="keywordtype">double</span> ep1pw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac + 0.5 * wslit, sigma);
+<a name="l01235"></a>01235 <span class="keyword">const</span> <span class="keywordtype">double</span> en1pw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac + 0.5 * wslit - 1.0,
+<a name="l01236"></a>01236 sigma);
+<a name="l01237"></a>01237 <span class="keyword">const</span> <span class="keywordtype">double</span> ep1nw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac - 0.5 * wslit, sigma);
+<a name="l01238"></a>01238 <span class="keyword">const</span> <span class="keywordtype">double</span> en1nw = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(frac - 0.5 * wslit - 1.0,
+<a name="l01239"></a>01239 sigma);
+<a name="l01240"></a>01240 <span class="keyword">const</span> <span class="keywordtype">double</span> frac0
+<a name="l01241"></a>01241 = (en1nw - en1pw) / (ep1pw - en1pw - ep1nw + en1nw);
+<a name="l01242"></a>01242
+<a name="l01243"></a>01243 <span class="preprocessor">#endif</span>
+<a name="l01244"></a>01244 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">double</span> frac1 = 1.0 - frac0;
+<a name="l01245"></a>01245 <span class="keyword">const</span> <span class="keywordtype">double</span> yval0 = frac0 * dylines[iline];
+<a name="l01246"></a>01246 <span class="keyword">const</span> <span class="keywordtype">double</span> yval1 = frac1 * dylines[iline];
+<a name="l01247"></a>01247 <span class="keyword">const</span> <span class="keywordtype">int</span> npix = 1+(int)xtrunc;
+<a name="l01248"></a>01248 <span class="keywordtype">int</span> ipix;
+<a name="l01249"></a>01249 <span class="keywordtype">int</span> i0n = hsize - 1 + floor(xpos);
+<a name="l01250"></a>01250 <span class="keywordtype">int</span> i0p = i0n;
+<a name="l01251"></a>01251 <span class="keywordtype">int</span> i1n = i0n + 1;
+<a name="l01252"></a>01252 <span class="keywordtype">int</span> i1p = i1n;
+<a name="l01253"></a>01253 cpl_boolean didline = CPL_FALSE;
<a name="l01254"></a>01254
-<a name="l01255"></a>01255 }
-<a name="l01256"></a>01256 }
-<a name="l01257"></a>01257 }
+<a name="l01255"></a>01255
+<a name="l01256"></a>01256 <span class="comment">/* Update 1st guess for next time, if available */</span>
+<a name="l01257"></a>01257 <span class="keywordflow">if</span> (plinepix != NULL) plinepix[iline] = xpos;
<a name="l01258"></a>01258
-<a name="l01259"></a>01259 cpl_polynomial_delete(dispi);
-<a name="l01260"></a>01260 <span class="keywordflow">if</span> (erftmp == NULL) cpl_free(profile);
-<a name="l01261"></a>01261
-<a name="l01262"></a>01262 cpl_ensure_code(!error, cpl_error_get_code());
-<a name="l01263"></a>01263
-<a name="l01264"></a>01264 <span class="keywordflow">if</span> (dolog) {
-<a name="l01265"></a>01265 <span class="keywordtype">int</span> i;
-<a name="l01266"></a>01266 <span class="keywordflow">for</span> (i = 0; i < nself; i++) {
-<a name="l01267"></a>01267 dself[i] = dself[i] > 0.0 ? log(1.0 + dself[i]) : 0.0;
-<a name="l01268"></a>01268 }
-<a name="l01269"></a>01269 }
-<a name="l01270"></a>01270
-<a name="l01271"></a>01271 <span class="keywordflow">if</span> (!ulines) <span class="keywordflow">return</span>
-<a name="l01272"></a>01272 cpl_error_set_message_macro(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
-<a name="l01273"></a>01273 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
-<a name="l01274"></a>01274 <span class="stringliteral">"catalogue has no lines in the range "</span>
-<a name="l01275"></a>01275 <span class="stringliteral">"%g -> P(%g)=%g"</span>, nlines, wl, xmax,
-<a name="l01276"></a>01276 cpl_polynomial_eval_1d(disp, xmax, NULL));
-<a name="l01277"></a>01277
-<a name="l01278"></a>01278 <span class="keywordflow">if</span> (pulines != NULL) *pulines = ulines;
-<a name="l01279"></a>01279
-<a name="l01280"></a>01280 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01281"></a>01281 }
+<a name="l01259"></a>01259 <span class="keywordflow">if</span> (frac0 < 0.0) {
+<a name="l01260"></a>01260 (void)cpl_error_set_message_macro(cpl_func,
+<a name="l01261"></a>01261 CPL_ERROR_UNSPECIFIED,
+<a name="l01262"></a>01262 __FILE__, __LINE__,
+<a name="l01263"></a>01263 <span class="stringliteral">"Illegal split at x=%g: %g + "</span>
+<a name="l01264"></a>01264 <span class="stringliteral">"%g = 1"</span>, xpos, frac0, frac1);
+<a name="l01265"></a>01265 <span class="preprocessor">#ifdef IRPLIB_WAVEVAL_DEBUG</span>
+<a name="l01266"></a>01266 <span class="preprocessor"></span> } <span class="keywordflow">else</span> {
+<a name="l01267"></a>01267 cpl_msg_warning(cpl_func,<span class="stringliteral">"profile split at x=%g: %g + %g = 1"</span>,
+<a name="l01268"></a>01268 xpos, frac0, frac1);
+<a name="l01269"></a>01269 <span class="preprocessor">#endif</span>
+<a name="l01270"></a>01270 <span class="preprocessor"></span> }
+<a name="l01271"></a>01271
+<a name="l01272"></a>01272 <span class="keywordflow">for</span> (ipix = 0; ipix < npix; ipix++, i0n--, i0p++, i1n--, i1p++) {
+<a name="l01273"></a>01273
+<a name="l01274"></a>01274 <span class="keywordflow">if</span> (i0n >= 0 && i0n < nself) {
+<a name="l01275"></a>01275 dself[i0n] += yval0 * profile[ipix];
+<a name="l01276"></a>01276 didline = CPL_TRUE;
+<a name="l01277"></a>01277 }
+<a name="l01278"></a>01278 <span class="keywordflow">if</span> (i1n >= 0 && i1n < nself && ipix + 1 < npix) {
+<a name="l01279"></a>01279 dself[i1n] += yval1 * profile[ipix+1];
+<a name="l01280"></a>01280 didline = CPL_TRUE;
+<a name="l01281"></a>01281 }
<a name="l01282"></a>01282
-<a name="l01283"></a>01283 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01292"></a>01292 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01293"></a><a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f">01293</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> sigma)
-<a name="l01294"></a>01294 {
-<a name="l01295"></a>01295 <span class="keywordflow">return</span> x * erf( x / (sigma * CPL_MATH_SQRT2))
-<a name="l01296"></a>01296 + 2.0 * sigma/CPL_MATH_SQRT2PI * exp(-0.5 * x * x / (sigma * sigma));
-<a name="l01297"></a>01297 }
-<a name="l01298"></a>01298
-<a name="l01299"></a>01299
-<a name="l01300"></a>01300 <span class="preprocessor">#ifdef HAVE_GSL</span>
-<a name="l01301"></a>01301 <span class="preprocessor"></span>
-<a name="l01302"></a>01302 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01310"></a>01310 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01311"></a>01311 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_gsl_correlation(<span class="keyword">const</span> gsl_vector * <span class="keyword">self</span>, <span class="keywordtype">void</span> * data)
-<a name="l01312"></a>01312 {
+<a name="l01283"></a>01283 <span class="keywordflow">if</span> (ipix == 0) <span class="keywordflow">continue</span>;
+<a name="l01284"></a>01284
+<a name="l01285"></a>01285 <span class="keywordflow">if</span> (i0p >= 0 && i0p < nself) {
+<a name="l01286"></a>01286 dself[i0p] += yval0 * profile[ipix];
+<a name="l01287"></a>01287 didline = CPL_TRUE;
+<a name="l01288"></a>01288 }
+<a name="l01289"></a>01289 <span class="keywordflow">if</span> (i1p >= 0 && i1p < nself && ipix + 1 < npix) {
+<a name="l01290"></a>01290 dself[i1p] += yval1 * profile[ipix+1];
+<a name="l01291"></a>01291 didline = CPL_TRUE;
+<a name="l01292"></a>01292 }
+<a name="l01293"></a>01293 }
+<a name="l01294"></a>01294
+<a name="l01295"></a>01295 <span class="keywordflow">if</span> (didline) ulines++;
+<a name="l01296"></a>01296
+<a name="l01297"></a>01297 } <span class="keywordflow">else</span> {
+<a name="l01298"></a>01298 <span class="keyword">const</span> <span class="keywordtype">double</span> yval = 0.5 * dylines[iline] / wslit;
+<a name="l01299"></a>01299 <span class="keyword">const</span> <span class="keywordtype">int</span> ifirst = IRPLIB_MAX((<span class="keywordtype">int</span>)(xpos-xtrunc+0.5), 1-hsize);
+<a name="l01300"></a>01300 <span class="keyword">const</span> <span class="keywordtype">int</span> ilast = IRPLIB_MIN((<span class="keywordtype">int</span>)(xpos+xtrunc), nself-hsize);
+<a name="l01301"></a>01301 <span class="keywordtype">int</span> ipix;
+<a name="l01302"></a>01302 <span class="keyword">const</span> <span class="keywordtype">double</span> x0 = (double)ifirst - xpos;
+<a name="l01303"></a>01303 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = x0 + 0.5*wslit - 0.5;
+<a name="l01304"></a>01304 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = x0 - 0.5*wslit - 0.5;
+<a name="l01305"></a>01305 <span class="keywordtype">double</span> x1diff
+<a name="l01306"></a>01306 = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma)
+<a name="l01307"></a>01307 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma);
+<a name="l01308"></a>01308
+<a name="l01309"></a>01309 <span class="comment">/* Update 1st guess for next time, if available */</span>
+<a name="l01310"></a>01310 <span class="keywordflow">if</span> (plinepix != NULL) plinepix[iline] = xpos;
+<a name="l01311"></a>01311
+<a name="l01312"></a>01312 <span class="keywordflow">if</span> (ilast >= ifirst) ulines++;
<a name="l01313"></a>01313
-<a name="l01314"></a>01314 irplib_multimin * mindata = (irplib_multimin *)data;
-<a name="l01315"></a>01315 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l01316"></a>01316 <span class="keywordtype">int</span> nobs, nmodel, ndiff;
-<a name="l01317"></a>01317 cpl_size i;
-<a name="l01318"></a>01318
-<a name="l01319"></a>01319 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
-<a name="l01320"></a>01320 cpl_ensure(data != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
-<a name="l01321"></a>01321
-<a name="l01322"></a>01322 cpl_ensure(mindata->filler != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
-<a name="l01323"></a>01323 cpl_ensure(mindata->observed != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
-<a name="l01324"></a>01324 cpl_ensure(mindata->spectrum != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
-<a name="l01325"></a>01325
-<a name="l01326"></a>01326 nobs = cpl_vector_get_size(mindata->observed);
-<a name="l01327"></a>01327 nmodel = cpl_vector_get_size(mindata->spectrum);
-<a name="l01328"></a>01328 ndiff = nmodel - nobs;
-<a name="l01329"></a>01329
-<a name="l01330"></a>01330 cpl_ensure((ndiff & 1) == 0, CPL_ERROR_ILLEGAL_INPUT, GSL_NAN);
+<a name="l01314"></a>01314 <span class="keywordflow">for</span> (ipix = ifirst; ipix <= ilast; ipix++) {
+<a name="l01315"></a>01315 <span class="keyword">const</span> <span class="keywordtype">double</span> x1 = (double)ipix - xpos;
+<a name="l01316"></a>01316 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = x1 + 0.5*wslit + 0.5;
+<a name="l01317"></a>01317 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = x1 - 0.5*wslit + 0.5;
+<a name="l01318"></a>01318 <span class="keyword">const</span> <span class="keywordtype">double</span> x0diff = x1diff;
+<a name="l01319"></a>01319
+<a name="l01320"></a>01320 x1diff = <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma)
+<a name="l01321"></a>01321 - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma);
+<a name="l01322"></a>01322
+<a name="l01323"></a>01323 dself[ipix+hsize-1] += yval * (x1diff - x0diff);
+<a name="l01324"></a>01324
+<a name="l01325"></a>01325 }
+<a name="l01326"></a>01326 }
+<a name="l01327"></a>01327 }
+<a name="l01328"></a>01328
+<a name="l01329"></a>01329 cpl_polynomial_delete(dispi);
+<a name="l01330"></a>01330 <span class="keywordflow">if</span> (erftmp == NULL) cpl_free(profile);
<a name="l01331"></a>01331
-<a name="l01332"></a>01332 cpl_ensure(cpl_vector_get_size(mindata->vxc) == 1 + ndiff,
-<a name="l01333"></a>01333 CPL_ERROR_ILLEGAL_INPUT, GSL_NAN);
-<a name="l01334"></a>01334
-<a name="l01335"></a>01335 ndiff /= 2;
-<a name="l01336"></a>01336
-<a name="l01337"></a>01337 <span class="keywordflow">for</span> (i=0; i < (cpl_size)self->size; i++) {
-<a name="l01338"></a>01338 <span class="keyword">const</span> <span class="keywordtype">double</span> value = gsl_vector_get(<span class="keyword">self</span>, (<span class="keywordtype">size_t</span>)i);
-<a name="l01339"></a>01339 cpl_polynomial_set_coeff(mindata->disp1d, &i, value);
-<a name="l01340"></a>01340 }
-<a name="l01341"></a>01341
-<a name="l01342"></a>01342 <span class="keywordflow">if</span> (mindata->filler(mindata->spectrum, mindata->disp1d,
-<a name="l01343"></a>01343 mindata->param, ndiff)
-<a name="l01344"></a>01344 || !cpl_errorstate_is_equal(prestate)) {
-<a name="l01345"></a>01345
-<a name="l01346"></a>01346 <span class="comment">/* The fill failed. Ensure the discarding of this candidate by</span>
-<a name="l01347"></a>01347 <span class="comment"> setting the cross-correlation to its minimum possible value. */</span>
-<a name="l01348"></a>01348
-<a name="l01349"></a>01349 (void)cpl_vector_fill(mindata->vxc, -1.0);
-<a name="l01350"></a>01350
-<a name="l01351"></a>01351 mindata->maxxc = ndiff;
+<a name="l01332"></a>01332 cpl_ensure_code(!error, cpl_error_get_code());
+<a name="l01333"></a>01333
+<a name="l01334"></a>01334 <span class="keywordflow">if</span> (dolog) {
+<a name="l01335"></a>01335 <span class="keywordtype">int</span> i;
+<a name="l01336"></a>01336 <span class="keywordflow">for</span> (i = 0; i < nself; i++) {
+<a name="l01337"></a>01337 dself[i] = dself[i] > 0.0 ? log(1.0 + dself[i]) : 0.0;
+<a name="l01338"></a>01338 }
+<a name="l01339"></a>01339 }
+<a name="l01340"></a>01340
+<a name="l01341"></a>01341 <span class="keywordflow">if</span> (!ulines) <span class="keywordflow">return</span>
+<a name="l01342"></a>01342 cpl_error_set_message_macro(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+<a name="l01343"></a>01343 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
+<a name="l01344"></a>01344 <span class="stringliteral">"catalogue has no lines in the range "</span>
+<a name="l01345"></a>01345 <span class="stringliteral">"%g -> P(%g)=%g"</span>, nlines, wl, xmax,
+<a name="l01346"></a>01346 cpl_polynomial_eval_1d(disp, xmax, NULL));
+<a name="l01347"></a>01347
+<a name="l01348"></a>01348 <span class="keywordflow">if</span> (pulines != NULL) *pulines = ulines;
+<a name="l01349"></a>01349
+<a name="l01350"></a>01350 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01351"></a>01351 }
<a name="l01352"></a>01352
-<a name="l01353"></a>01353 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
-<a name="l01354"></a>01354 cpl_msg_debug(cpl_func, <span class="stringliteral">"Spectrum fill failed:"</span>);
-<a name="l01355"></a>01355 cpl_errorstate_dump(prestate, CPL_FALSE,
-<a name="l01356"></a>01356 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
-<a name="l01357"></a>01357 cpl_errorstate_set(prestate);
-<a name="l01358"></a>01358 }
-<a name="l01359"></a>01359 } <span class="keywordflow">else</span> {
-<a name="l01360"></a>01360
-<a name="l01361"></a>01361 mindata->maxxc = cpl_vector_correlate(mindata->vxc,
-<a name="l01362"></a>01362 mindata->spectrum,
-<a name="l01363"></a>01363 mindata->observed);
-<a name="l01364"></a>01364 }
-<a name="l01365"></a>01365
-<a name="l01366"></a>01366 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
-<a name="l01367"></a>01367 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
-<a name="l01368"></a>01368 irplib_polynomial_dump_corr_step(mindata->disp1d, mindata->vxc,
-<a name="l01369"></a>01369 <span class="stringliteral">"Optimize"</span>);
-<a name="l01370"></a>01370 <span class="preprocessor">#endif</span>
+<a name="l01353"></a>01353 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01362"></a>01362 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01363"></a><a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f">01363</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> sigma)
+<a name="l01364"></a>01364 {
+<a name="l01365"></a>01365 <span class="keywordflow">return</span> x * erf( x / (sigma * CPL_MATH_SQRT2))
+<a name="l01366"></a>01366 + 2.0 * sigma/CPL_MATH_SQRT2PI * exp(-0.5 * x * x / (sigma * sigma));
+<a name="l01367"></a>01367 }
+<a name="l01368"></a>01368
+<a name="l01369"></a>01369
+<a name="l01370"></a>01370 <span class="preprocessor">#ifdef HAVE_GSL</span>
<a name="l01371"></a>01371 <span class="preprocessor"></span>
-<a name="l01372"></a>01372 mindata->xc = cpl_vector_get(mindata->vxc, ndiff);
-<a name="l01373"></a>01373
-<a name="l01374"></a>01374 <span class="keywordflow">if</span> (mindata->maxxc != ndiff &&
-<a name="l01375"></a>01375 cpl_vector_get(mindata->vxc, mindata->maxxc) > mindata->mxc) {
-<a name="l01376"></a>01376 <span class="keyword">const</span> irplib_base_spectrum_model * arclamp
-<a name="l01377"></a>01377 = (<span class="keyword">const</span> irplib_base_spectrum_model *)mindata->param;
-<a name="l01378"></a>01378
-<a name="l01379"></a>01379 if (mindata->mdisp == NULL) {
-<a name="l01380"></a>01380 mindata->mdisp = cpl_polynomial_duplicate(mindata->disp1d);
-<a name="l01381"></a>01381 } <span class="keywordflow">else</span> {
-<a name="l01382"></a>01382 cpl_polynomial_copy(mindata->mdisp, mindata->disp1d);
-<a name="l01383"></a>01383 }
-<a name="l01384"></a>01384 mindata->mxc = cpl_vector_get(mindata->vxc, mindata->maxxc);
-<a name="l01385"></a>01385 mindata->ishift = mindata->maxxc - ndiff;
-<a name="l01386"></a>01386 cpl_msg_debug(cpl_func, <span class="stringliteral">"Local maximum: %g(%d) > %g(%d) (cost=%u:%u. "</span>
-<a name="l01387"></a>01387 <span class="stringliteral">"lines=%u)"</span>, mindata->mxc, mindata->maxxc, mindata->xc,
-<a name="l01388"></a>01388 ndiff, arclamp->cost, arclamp->xcost, arclamp->ulines);
-<a name="l01389"></a>01389 }
+<a name="l01372"></a>01372 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01379"></a>01379 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01380"></a>01380 <span class="keyword">static</span> <span class="keywordtype">double</span> irplib_gsl_correlation(<span class="keyword">const</span> gsl_vector * <span class="keyword">self</span>, <span class="keywordtype">void</span> * data)
+<a name="l01381"></a>01381 {
+<a name="l01382"></a>01382
+<a name="l01383"></a>01383 irplib_multimin * mindata = (irplib_multimin *)data;
+<a name="l01384"></a>01384 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l01385"></a>01385 <span class="keywordtype">int</span> nobs, nmodel, ndiff;
+<a name="l01386"></a>01386 cpl_size i;
+<a name="l01387"></a>01387
+<a name="l01388"></a>01388 cpl_ensure(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
+<a name="l01389"></a>01389 cpl_ensure(data != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
<a name="l01390"></a>01390
-<a name="l01391"></a>01391 <span class="keywordflow">return</span> -mindata->xc;
-<a name="l01392"></a>01392 }
-<a name="l01393"></a>01393
-<a name="l01394"></a>01394 <span class="preprocessor">#endif</span>
-<a name="l01395"></a>01395 <span class="preprocessor"></span>
-<a name="l01396"></a>01396 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01419"></a>01419 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01420"></a>01420 cpl_error_code
-<a name="l01421"></a><a class="code" href="group__irplib__wavecal.html#ga0adf260c4d27fc50bc8b4cbcc0264a4e">01421</a> <a class="code" href="group__irplib__wavecal.html#ga0adf260c4d27fc50bc8b4cbcc0264a4e" title="Modify self by maximizing the cross-correlation across all maxima.">irplib_polynomial_find_1d_from_correlation_all</a>(cpl_polynomial * <span class="keyword">self</span>,
-<a name="l01422"></a>01422 <span class="keywordtype">int</span> maxdeg,
-<a name="l01423"></a>01423 <span class="keyword">const</span> cpl_vector * obs,
-<a name="l01424"></a>01424 <span class="keywordtype">int</span> nmaxima,
-<a name="l01425"></a>01425 <span class="keywordtype">int</span> linelim,
-<a name="l01426"></a>01426 irplib_base_spectrum_model* model,
-<a name="l01427"></a>01427 cpl_error_code (* filler)
-<a name="l01428"></a>01428 (cpl_vector *,
-<a name="l01429"></a>01429 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l01430"></a>01430 irplib_base_spectrum_model *,
-<a name="l01431"></a>01431 <span class="keywordtype">int</span>),
-<a name="l01432"></a>01432 <span class="keywordtype">double</span> pixtol,
-<a name="l01433"></a>01433 <span class="keywordtype">double</span> pixstep,
-<a name="l01434"></a>01434 <span class="keywordtype">int</span> hsize,
-<a name="l01435"></a>01435 <span class="keywordtype">int</span> maxite,
-<a name="l01436"></a>01436 <span class="keywordtype">int</span> maxfail,
-<a name="l01437"></a>01437 <span class="keywordtype">int</span> maxcont,
-<a name="l01438"></a>01438 cpl_boolean doplot,
-<a name="l01439"></a>01439 <span class="keywordtype">double</span> * pxc)
-<a name="l01440"></a>01440 {
-<a name="l01441"></a>01441
-<a name="l01442"></a>01442 <span class="preprocessor">#ifdef HAVE_GSL</span>
-<a name="l01443"></a>01443 <span class="preprocessor"></span>
-<a name="l01444"></a>01444 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l01445"></a>01445 cpl_polynomial * start;
-<a name="l01446"></a>01446 cpl_polynomial * cand;
-<a name="l01447"></a>01447 cpl_polynomial * backup;
-<a name="l01448"></a>01448 cpl_error_code error = CPL_ERROR_NONE;
-<a name="l01449"></a>01449 <span class="keywordtype">double</span> xc;
-<a name="l01450"></a>01450 cpl_bivector * xtshift = cpl_bivector_new(nmaxima ? nmaxima : 1);
-<a name="l01451"></a>01451 <span class="keyword">const</span> cpl_vector * xtshiftx = cpl_bivector_get_x_const(xtshift);
-<a name="l01452"></a>01452 <span class="keyword">const</span> cpl_vector * xtshifty = cpl_bivector_get_y_const(xtshift);
-<a name="l01453"></a>01453 <span class="keywordtype">int</span> nshift;
-<a name="l01454"></a>01454 <span class="keywordtype">int</span> imaximum = -1;
-<a name="l01455"></a>01455 <span class="keywordtype">int</span> imaxima;
-<a name="l01456"></a>01456
-<a name="l01457"></a>01457 <span class="preprocessor">#endif</span>
-<a name="l01458"></a>01458 <span class="preprocessor"></span>
-<a name="l01459"></a>01459 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01460"></a>01460 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01461"></a>01461 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01462"></a>01462 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01463"></a>01463 cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01464"></a>01464
-<a name="l01465"></a>01465 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 1,
-<a name="l01466"></a>01466 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01467"></a>01467
-<a name="l01468"></a>01468 cpl_ensure_code(cpl_polynomial_get_degree(<span class="keyword">self</span>) > 0,
-<a name="l01469"></a>01469 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01470"></a>01470
-<a name="l01471"></a>01471 cpl_ensure_code(maxdeg >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01472"></a>01472 cpl_ensure_code(pixtol > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01473"></a>01473 cpl_ensure_code(pixstep > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01474"></a>01474 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01475"></a>01475 cpl_ensure_code(maxite >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01476"></a>01476 cpl_ensure_code(nmaxima >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01477"></a>01477 cpl_ensure_code(maxfail > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01478"></a>01478 cpl_ensure_code(maxcont > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01479"></a>01479 cpl_ensure_code(linelim >= 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01480"></a>01480
-<a name="l01481"></a>01481 <span class="preprocessor">#ifndef HAVE_GSL</span>
-<a name="l01482"></a>01482 <span class="preprocessor"></span> <span class="comment">/* Avoid unused variable warning */</span>
-<a name="l01483"></a>01483 cpl_ensure_code(doplot == CPL_TRUE || doplot == CPL_FALSE,
-<a name="l01484"></a>01484 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01485"></a>01485 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE,
-<a name="l01486"></a>01486 <span class="stringliteral">"GSL is not available"</span>);
-<a name="l01487"></a>01487 <span class="preprocessor">#else</span>
-<a name="l01488"></a>01488 <span class="preprocessor"></span>
-<a name="l01489"></a>01489 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__wavecal.html#gae027096b411661b9584c72ab3e8e6547" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(xtshift, <span class="keyword">self</span>, obs,
-<a name="l01490"></a>01490 model, filler,
-<a name="l01491"></a>01491 hsize, doplot, &xc)) {
-<a name="l01492"></a>01492 cpl_bivector_delete(xtshift);
-<a name="l01493"></a>01493 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
-<a name="l01494"></a>01494 }
-<a name="l01495"></a>01495
-<a name="l01496"></a>01496 <span class="keywordflow">if</span> (model->ulines > (<span class="keywordtype">unsigned</span>)linelim) {
-<a name="l01497"></a>01497 <span class="comment">/* The initial, optimal (integer) shift */</span>
-<a name="l01498"></a>01498 <span class="keyword">const</span> <span class="keywordtype">double</span> xxc = cpl_vector_get(xtshiftx, 0);
-<a name="l01499"></a>01499 <span class="keyword">const</span> <span class="keywordtype">double</span> xc0 = cpl_vector_get(xtshifty, 0);
-<a name="l01500"></a>01500
-<a name="l01501"></a>01501 cpl_msg_warning(cpl_func, <span class="stringliteral">"Doing only shift=%g pixels with lines=%u > "</span>
-<a name="l01502"></a>01502 <span class="stringliteral">"%d and XC=%g"</span>, xxc, model->ulines, linelim, xc0);
-<a name="l01503"></a>01503
-<a name="l01504"></a>01504 cpl_polynomial_shift_1d(<span class="keyword">self</span>, 0, xxc);
-<a name="l01505"></a>01505
-<a name="l01506"></a>01506 *pxc = xc0;
-<a name="l01507"></a>01507
-<a name="l01508"></a>01508 cpl_bivector_delete(xtshift);
-<a name="l01509"></a>01509
-<a name="l01510"></a>01510 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01511"></a>01511 }
-<a name="l01512"></a>01512
-<a name="l01513"></a>01513 start = cpl_polynomial_duplicate(<span class="keyword">self</span>);
-<a name="l01514"></a>01514 cand = cpl_polynomial_new(1);
-<a name="l01515"></a>01515 backup = cpl_polynomial_new(1);
-<a name="l01516"></a>01516
-<a name="l01517"></a>01517 <span class="comment">/* Number of (local) maxima to use as starting point of the optimization */</span>
-<a name="l01518"></a>01518 nshift = cpl_bivector_get_size(xtshift);
-<a name="l01519"></a>01519 <span class="keywordflow">if</span> (nmaxima == 0 || nmaxima > nshift) nmaxima = nshift;
-<a name="l01520"></a>01520
-<a name="l01521"></a>01521 cpl_msg_info(cpl_func, <span class="stringliteral">"Optimizing %d/%d local shift-maxima "</span>
-<a name="l01522"></a>01522 <span class="stringliteral">"(no-shift xc=%g. linelim=%d)"</span>, nmaxima, nshift, xc, linelim);
-<a name="l01523"></a>01523 <span class="keywordflow">if</span> (cpl_msg_get_level() <= CPL_MSG_DEBUG)
-<a name="l01524"></a>01524 cpl_bivector_dump(xtshift, stdout);
-<a name="l01525"></a>01525
-<a name="l01526"></a>01526 <span class="keywordflow">for</span> (imaxima = 0; imaxima < nmaxima; imaxima++) {
-<a name="l01527"></a>01527 <span class="comment">/* The initial, optimal (integer) shift */</span>
-<a name="l01528"></a>01528 <span class="keyword">const</span> <span class="keywordtype">double</span> xxc = cpl_vector_get(xtshiftx, imaxima);
-<a name="l01529"></a>01529 <span class="keywordtype">double</span> xtpixstep = pixstep;
-<a name="l01530"></a>01530 <span class="keywordtype">double</span> xtpixtol = pixtol;
-<a name="l01531"></a>01531 <span class="keywordtype">double</span> xtxc;
-<a name="l01532"></a>01532 cpl_boolean ok = CPL_FALSE;
-<a name="l01533"></a>01533 <span class="keywordtype">int</span> nfail;
-<a name="l01534"></a>01534
-<a name="l01535"></a>01535
-<a name="l01536"></a>01536 cpl_polynomial_copy(cand, start);
-<a name="l01537"></a>01537 cpl_polynomial_shift_1d(cand, 0, xxc);
-<a name="l01538"></a>01538 cpl_polynomial_copy(backup, cand);
-<a name="l01539"></a>01539
-<a name="l01540"></a>01540 <span class="comment">/* Increase tolerance until convergence */</span>
-<a name="l01541"></a>01541 <span class="keywordflow">for</span> (nfail = 0; nfail < maxfail; nfail++, xtpixtol *= 2.0,
-<a name="l01542"></a>01542 xtpixstep *= 2.0) {
-<a name="l01543"></a>01543 <span class="keywordtype">int</span> restart = maxcont;
-<a name="l01544"></a>01544 <span class="keywordflow">do</span> {
-<a name="l01545"></a>01545 error = <a class="code" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>
-<a name="l01546"></a>01546 (cand, maxdeg, obs, model,
-<a name="l01547"></a>01547 filler, xtpixtol, xtpixstep, 2,
-<a name="l01548"></a>01548 maxite, &xtxc);
-<a name="l01549"></a>01549 } <span class="keywordflow">while</span> (error == CPL_ERROR_CONTINUE && --restart);
-<a name="l01550"></a>01550
-<a name="l01551"></a>01551 <span class="keywordflow">if</span> (!error) {
-<a name="l01552"></a>01552 cpl_msg_debug(cpl_func, <span class="stringliteral">"XC(imax=%d/%d:xtpixtol=%g): %g "</span>
-<a name="l01553"></a>01553 <span class="stringliteral">"(cost=%u:%u)"</span>, 1+imaxima, nmaxima, xtpixtol,
-<a name="l01554"></a>01554 xtxc, model->cost, model->xcost);
-<a name="l01555"></a>01555 <span class="keywordflow">break</span>;
-<a name="l01556"></a>01556 }
-<a name="l01557"></a>01557 cpl_msg_warning(cpl_func, <span class="stringliteral">"Increasing xtpixtol from %g (%g, imax="</span>
-<a name="l01558"></a>01558 <span class="stringliteral">"%d/%d)"</span>, xtpixtol, xtpixstep, 1+imaxima, nmaxima);
-<a name="l01559"></a>01559 <span class="keywordflow">if</span> (model->ulines > (<span class="keywordtype">unsigned</span>)linelim) {
-<a name="l01560"></a>01560 cpl_msg_warning(cpl_func, <span class="stringliteral">"Stopping search-refinement via "</span>
-<a name="l01561"></a>01561 <span class="stringliteral">"catalogue with %u lines > %u"</span>, model->ulines,
-<a name="l01562"></a>01562 linelim);
-<a name="l01563"></a>01563 <span class="keywordflow">break</span>;
-<a name="l01564"></a>01564 }
-<a name="l01565"></a>01565 cpl_polynomial_copy(cand, start);
-<a name="l01566"></a>01566 }
-<a name="l01567"></a>01567
-<a name="l01568"></a>01568 <span class="comment">/* Decrease tolerance until inconvergence, keep previous */</span>
-<a name="l01569"></a>01569 <span class="keywordflow">for</span> (; !error && xtpixtol > 0.0; xtpixtol *= 0.25, xtpixstep *= 0.5) {
-<a name="l01570"></a>01570 <span class="keywordtype">int</span> restart = maxcont;
-<a name="l01571"></a>01571
-<a name="l01572"></a>01572 cpl_polynomial_copy(backup, cand);
-<a name="l01573"></a>01573 <span class="keywordflow">do</span> {
-<a name="l01574"></a>01574 error = <a class="code" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>
-<a name="l01575"></a>01575 (cand, maxdeg, obs, model, filler,
-<a name="l01576"></a>01576 xtpixtol, xtpixstep, 2, maxite, &xtxc);
-<a name="l01577"></a>01577 } <span class="keywordflow">while</span> (error == CPL_ERROR_CONTINUE && --restart);
-<a name="l01578"></a>01578 <span class="keywordflow">if</span> (error) <span class="keywordflow">break</span>;
-<a name="l01579"></a>01579 ok = CPL_TRUE;
-<a name="l01580"></a>01580 cpl_msg_debug(cpl_func, <span class="stringliteral">"XC(imax=%d/%d:xtpixtol=%g): %g (cost=%u:%u"</span>
-<a name="l01581"></a>01581 <span class="stringliteral">". ulines=%u)"</span>, 1+imaxima, nmaxima, xtpixtol, xtxc,
-<a name="l01582"></a>01582 model->cost, model->xcost, model->ulines);
-<a name="l01583"></a>01583 <span class="keywordflow">if</span> (model->ulines > (<span class="keywordtype">unsigned</span>)linelim) {
-<a name="l01584"></a>01584 cpl_msg_info(cpl_func, <span class="stringliteral">"Stopping search-refinement via "</span>
-<a name="l01585"></a>01585 <span class="stringliteral">"catalogue with %u lines > %u"</span>, model->ulines,
-<a name="l01586"></a>01586 linelim);
-<a name="l01587"></a>01587 <span class="keywordflow">break</span>;
-<a name="l01588"></a>01588 }
-<a name="l01589"></a>01589 }
-<a name="l01590"></a>01590
-<a name="l01591"></a>01591 <span class="keywordflow">if</span> (error) {
-<a name="l01592"></a>01592 error = 0;
-<a name="l01593"></a>01593 cpl_errorstate_dump(prestate, CPL_FALSE,
-<a name="l01594"></a>01594 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
-<a name="l01595"></a>01595 cpl_errorstate_set(prestate);
-<a name="l01596"></a>01596 cpl_polynomial_copy(cand, backup);
-<a name="l01597"></a>01597 }
-<a name="l01598"></a>01598 <span class="keywordflow">if</span> (ok && xtxc > xc) {
-<a name="l01599"></a>01599 imaximum = imaxima;
-<a name="l01600"></a>01600 cpl_polynomial_copy(<span class="keyword">self</span>, cand);
-<a name="l01601"></a>01601 xc = xtxc;
-<a name="l01602"></a>01602
-<a name="l01603"></a>01603 cpl_msg_info(cpl_func, <span class="stringliteral">"XC(imax=%d/%d): %g -> %g (initial-shift=%g. "</span>
-<a name="l01604"></a>01604 <span class="stringliteral">"cost=%u:%u. lines=%u)"</span>, 1+imaxima, nmaxima,
-<a name="l01605"></a>01605 cpl_vector_get(xtshifty, imaxima), xtxc,
-<a name="l01606"></a>01606 cpl_vector_get(xtshiftx, imaxima), model->cost,
-<a name="l01607"></a>01607 model->xcost, model->ulines);
-<a name="l01608"></a>01608 } <span class="keywordflow">else</span> {
-<a name="l01609"></a>01609 cpl_msg_info(cpl_func, <span class="stringliteral">"xc(imax=%d/%d): %g -> %g (initial-shift=%g. "</span>
-<a name="l01610"></a>01610 <span class="stringliteral">"cost=%u:%u. lines=%u)"</span>, 1+imaxima, nmaxima,
-<a name="l01611"></a>01611 cpl_vector_get(xtshifty, imaxima), xtxc,
-<a name="l01612"></a>01612 cpl_vector_get(xtshiftx, imaxima),
-<a name="l01613"></a>01613 model->cost, model->xcost, model->ulines);
-<a name="l01614"></a>01614 }
-<a name="l01615"></a>01615 }
-<a name="l01616"></a>01616
-<a name="l01617"></a>01617 cpl_polynomial_delete(start);
-<a name="l01618"></a>01618 cpl_polynomial_delete(backup);
-<a name="l01619"></a>01619 cpl_polynomial_delete(cand);
+<a name="l01391"></a>01391 cpl_ensure(mindata->filler != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
+<a name="l01392"></a>01392 cpl_ensure(mindata->observed != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
+<a name="l01393"></a>01393 cpl_ensure(mindata->spectrum != NULL, CPL_ERROR_NULL_INPUT, GSL_NAN);
+<a name="l01394"></a>01394
+<a name="l01395"></a>01395 nobs = cpl_vector_get_size(mindata->observed);
+<a name="l01396"></a>01396 nmodel = cpl_vector_get_size(mindata->spectrum);
+<a name="l01397"></a>01397 ndiff = nmodel - nobs;
+<a name="l01398"></a>01398
+<a name="l01399"></a>01399 cpl_ensure((ndiff & 1) == 0, CPL_ERROR_ILLEGAL_INPUT, GSL_NAN);
+<a name="l01400"></a>01400
+<a name="l01401"></a>01401 cpl_ensure(cpl_vector_get_size(mindata->vxc) == 1 + ndiff,
+<a name="l01402"></a>01402 CPL_ERROR_ILLEGAL_INPUT, GSL_NAN);
+<a name="l01403"></a>01403
+<a name="l01404"></a>01404 ndiff /= 2;
+<a name="l01405"></a>01405
+<a name="l01406"></a>01406 <span class="keywordflow">for</span> (i=0; i < (cpl_size)self->size; i++) {
+<a name="l01407"></a>01407 <span class="keyword">const</span> <span class="keywordtype">double</span> value = gsl_vector_get(<span class="keyword">self</span>, (<span class="keywordtype">size_t</span>)i);
+<a name="l01408"></a>01408 cpl_polynomial_set_coeff(mindata->disp1d, &i, value);
+<a name="l01409"></a>01409 }
+<a name="l01410"></a>01410
+<a name="l01411"></a>01411 <span class="comment">/* Shift reference by -ndiff so filler can be used without offset.</span>
+<a name="l01412"></a>01412 <span class="comment"> The subsequent polynomial shift is reduced by -ndiff. */</span>
+<a name="l01413"></a>01413 cpl_ensure_code(!cpl_polynomial_shift_1d(mindata->disp1d, 0, -ndiff),
+<a name="l01414"></a>01414 cpl_error_get_code());
+<a name="l01415"></a>01415
+<a name="l01416"></a>01416 <span class="keywordflow">if</span> (mindata->filler(mindata->spectrum, mindata->disp1d,
+<a name="l01417"></a>01417 mindata->param)
+<a name="l01418"></a>01418 || !cpl_errorstate_is_equal(prestate)) {
+<a name="l01419"></a>01419
+<a name="l01420"></a>01420 <span class="comment">/* The fill failed. Ensure the discarding of this candidate by</span>
+<a name="l01421"></a>01421 <span class="comment"> setting the cross-correlation to its minimum possible value. */</span>
+<a name="l01422"></a>01422
+<a name="l01423"></a>01423 (void)cpl_vector_fill(mindata->vxc, -1.0);
+<a name="l01424"></a>01424
+<a name="l01425"></a>01425 mindata->maxxc = ndiff;
+<a name="l01426"></a>01426
+<a name="l01427"></a>01427 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
+<a name="l01428"></a>01428 cpl_msg_debug(cpl_func, <span class="stringliteral">"Spectrum fill failed:"</span>);
+<a name="l01429"></a>01429 cpl_errorstate_dump(prestate, CPL_FALSE,
+<a name="l01430"></a>01430 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
+<a name="l01431"></a>01431 cpl_errorstate_set(prestate);
+<a name="l01432"></a>01432 }
+<a name="l01433"></a>01433 } <span class="keywordflow">else</span> {
+<a name="l01434"></a>01434
+<a name="l01435"></a>01435 mindata->maxxc = cpl_vector_correlate(mindata->vxc,
+<a name="l01436"></a>01436 mindata->spectrum,
+<a name="l01437"></a>01437 mindata->observed);
+<a name="l01438"></a>01438 }
+<a name="l01439"></a>01439
+<a name="l01440"></a>01440 <span class="preprocessor">#ifdef IRPLIB_SPC_DUMP</span>
+<a name="l01441"></a>01441 <span class="preprocessor"></span> <span class="comment">/* Need irplib_wavecal.c rev. 1.12 through 1.15 */</span>
+<a name="l01442"></a>01442 irplib_polynomial_dump_corr_step(mindata->disp1d, mindata->vxc,
+<a name="l01443"></a>01443 <span class="stringliteral">"Optimize"</span>);
+<a name="l01444"></a>01444 <span class="preprocessor">#endif</span>
+<a name="l01445"></a>01445 <span class="preprocessor"></span>
+<a name="l01446"></a>01446 mindata->xc = cpl_vector_get(mindata->vxc, ndiff);
+<a name="l01447"></a>01447
+<a name="l01448"></a>01448 <span class="keywordflow">if</span> (mindata->maxxc != ndiff &&
+<a name="l01449"></a>01449 cpl_vector_get(mindata->vxc, mindata->maxxc) > mindata->mxc) {
+<a name="l01450"></a>01450 <span class="keyword">const</span> irplib_base_spectrum_model * arclamp
+<a name="l01451"></a>01451 = (<span class="keyword">const</span> irplib_base_spectrum_model *)mindata->param;
+<a name="l01452"></a>01452
+<a name="l01453"></a>01453 if (mindata->mdisp == NULL) {
+<a name="l01454"></a>01454 mindata->mdisp = cpl_polynomial_duplicate(mindata->disp1d);
+<a name="l01455"></a>01455 } <span class="keywordflow">else</span> {
+<a name="l01456"></a>01456 cpl_polynomial_copy(mindata->mdisp, mindata->disp1d);
+<a name="l01457"></a>01457 }
+<a name="l01458"></a>01458 mindata->mxc = cpl_vector_get(mindata->vxc, mindata->maxxc);
+<a name="l01459"></a>01459 mindata->ishift = mindata->maxxc; <span class="comment">/* Offset -ndiff pre-shifted above */</span>
+<a name="l01460"></a>01460 cpl_msg_debug(cpl_func, <span class="stringliteral">"Local maximum: %g(%d) > %g(%d) (cost=%u:%u. "</span>
+<a name="l01461"></a>01461 <span class="stringliteral">"lines=%u)"</span>, mindata->mxc, mindata->maxxc, mindata->xc,
+<a name="l01462"></a>01462 ndiff, (<span class="keywordtype">unsigned</span>)arclamp->cost, (<span class="keywordtype">unsigned</span>)arclamp->xcost,
+<a name="l01463"></a>01463 (<span class="keywordtype">unsigned</span>)arclamp->ulines);
+<a name="l01464"></a>01464 }
+<a name="l01465"></a>01465
+<a name="l01466"></a>01466 <span class="keywordflow">return</span> -mindata->xc;
+<a name="l01467"></a>01467 }
+<a name="l01468"></a>01468
+<a name="l01469"></a>01469 <span class="preprocessor">#endif</span>
+<a name="l01470"></a>01470 <span class="preprocessor"></span>
+<a name="l01471"></a>01471 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01494"></a>01494 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01495"></a>01495 cpl_error_code
+<a name="l01496"></a><a class="code" href="group__irplib__wavecal.html#ga7e782bcb7ec0e638a93dba628916a7a8">01496</a> <a class="code" href="group__irplib__wavecal.html#ga7e782bcb7ec0e638a93dba628916a7a8" title="Modify self by maximizing the cross-correlation across all maxima.">irplib_polynomial_find_1d_from_correlation_all</a>(cpl_polynomial * <span class="keyword">self</span>,
+<a name="l01497"></a>01497 <span class="keywordtype">int</span> maxdeg,
+<a name="l01498"></a>01498 <span class="keyword">const</span> cpl_vector * obs,
+<a name="l01499"></a>01499 <span class="keywordtype">int</span> nmaxima,
+<a name="l01500"></a>01500 <span class="keywordtype">int</span> linelim,
+<a name="l01501"></a>01501 irplib_base_spectrum_model* model,
+<a name="l01502"></a>01502 cpl_error_code (* filler)
+<a name="l01503"></a>01503 (cpl_vector *,
+<a name="l01504"></a>01504 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l01505"></a>01505 irplib_base_spectrum_model *),
+<a name="l01506"></a>01506 <span class="keywordtype">double</span> pixtol,
+<a name="l01507"></a>01507 <span class="keywordtype">double</span> pixstep,
+<a name="l01508"></a>01508 <span class="keywordtype">int</span> hsize,
+<a name="l01509"></a>01509 <span class="keywordtype">int</span> maxite,
+<a name="l01510"></a>01510 <span class="keywordtype">int</span> maxfail,
+<a name="l01511"></a>01511 <span class="keywordtype">int</span> maxcont,
+<a name="l01512"></a>01512 cpl_boolean doplot,
+<a name="l01513"></a>01513 <span class="keywordtype">double</span> * pxc)
+<a name="l01514"></a>01514 {
+<a name="l01515"></a>01515
+<a name="l01516"></a>01516 <span class="preprocessor">#ifdef HAVE_GSL</span>
+<a name="l01517"></a>01517 <span class="preprocessor"></span>
+<a name="l01518"></a>01518 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l01519"></a>01519 cpl_polynomial * start;
+<a name="l01520"></a>01520 cpl_polynomial * cand;
+<a name="l01521"></a>01521 cpl_polynomial * backup;
+<a name="l01522"></a>01522 cpl_error_code error = CPL_ERROR_NONE;
+<a name="l01523"></a>01523 <span class="keywordtype">double</span> xc;
+<a name="l01524"></a>01524 cpl_bivector * xtshift = cpl_bivector_new(nmaxima ? nmaxima : 1);
+<a name="l01525"></a>01525 <span class="keyword">const</span> cpl_vector * xtshiftx = cpl_bivector_get_x_const(xtshift);
+<a name="l01526"></a>01526 <span class="keyword">const</span> cpl_vector * xtshifty = cpl_bivector_get_y_const(xtshift);
+<a name="l01527"></a>01527 <span class="keywordtype">int</span> nshift;
+<a name="l01528"></a>01528 <span class="keywordtype">int</span> imaximum = -1;
+<a name="l01529"></a>01529 <span class="keywordtype">int</span> imaxima;
+<a name="l01530"></a>01530
+<a name="l01531"></a>01531 <span class="preprocessor">#endif</span>
+<a name="l01532"></a>01532 <span class="preprocessor"></span>
+<a name="l01533"></a>01533 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01534"></a>01534 cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01535"></a>01535 cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01536"></a>01536 cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01537"></a>01537 cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01538"></a>01538
+<a name="l01539"></a>01539 cpl_ensure_code(cpl_polynomial_get_dimension(<span class="keyword">self</span>) == 1,
+<a name="l01540"></a>01540 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01541"></a>01541
+<a name="l01542"></a>01542 cpl_ensure_code(cpl_polynomial_get_degree(<span class="keyword">self</span>) > 0,
+<a name="l01543"></a>01543 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01544"></a>01544
+<a name="l01545"></a>01545 cpl_ensure_code(maxdeg >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01546"></a>01546 cpl_ensure_code(pixtol > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01547"></a>01547 cpl_ensure_code(pixstep > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01548"></a>01548 cpl_ensure_code(hsize >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01549"></a>01549 cpl_ensure_code(maxite >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01550"></a>01550 cpl_ensure_code(nmaxima >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01551"></a>01551 cpl_ensure_code(maxfail > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01552"></a>01552 cpl_ensure_code(maxcont > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01553"></a>01553 cpl_ensure_code(linelim >= 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01554"></a>01554
+<a name="l01555"></a>01555 <span class="preprocessor">#ifndef HAVE_GSL</span>
+<a name="l01556"></a>01556 <span class="preprocessor"></span> <span class="comment">/* Avoid unused variable warning */</span>
+<a name="l01557"></a>01557 cpl_ensure_code(doplot == CPL_TRUE || doplot == CPL_FALSE,
+<a name="l01558"></a>01558 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01559"></a>01559 <span class="keywordflow">return</span> cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE,
+<a name="l01560"></a>01560 <span class="stringliteral">"GSL is not available"</span>);
+<a name="l01561"></a>01561 <span class="preprocessor">#else</span>
+<a name="l01562"></a>01562 <span class="preprocessor"></span>
+<a name="l01563"></a>01563 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__wavecal.html#ga260740bf1f3fc364b301519eab3249a6" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(xtshift, <span class="keyword">self</span>, obs,
+<a name="l01564"></a>01564 model, filler,
+<a name="l01565"></a>01565 hsize, doplot, &xc)) {
+<a name="l01566"></a>01566 cpl_bivector_delete(xtshift);
+<a name="l01567"></a>01567 <span class="keywordflow">return</span> cpl_error_set_where(cpl_func);
+<a name="l01568"></a>01568 }
+<a name="l01569"></a>01569
+<a name="l01570"></a>01570 <span class="keywordflow">if</span> (model->ulines > (cpl_size)linelim) {
+<a name="l01571"></a>01571 <span class="comment">/* The initial, optimal (integer) shift */</span>
+<a name="l01572"></a>01572 <span class="keyword">const</span> <span class="keywordtype">double</span> xxc = cpl_vector_get(xtshiftx, 0);
+<a name="l01573"></a>01573 <span class="keyword">const</span> <span class="keywordtype">double</span> xc0 = cpl_vector_get(xtshifty, 0);
+<a name="l01574"></a>01574
+<a name="l01575"></a>01575 cpl_msg_warning(cpl_func, <span class="stringliteral">"Doing only shift=%g pixels with lines=%u > "</span>
+<a name="l01576"></a>01576 <span class="stringliteral">"%d and XC=%g"</span>, xxc, (<span class="keywordtype">unsigned</span>)model->ulines, linelim,
+<a name="l01577"></a>01577 xc0);
+<a name="l01578"></a>01578
+<a name="l01579"></a>01579 cpl_polynomial_shift_1d(<span class="keyword">self</span>, 0, xxc);
+<a name="l01580"></a>01580
+<a name="l01581"></a>01581 *pxc = xc0;
+<a name="l01582"></a>01582
+<a name="l01583"></a>01583 cpl_bivector_delete(xtshift);
+<a name="l01584"></a>01584
+<a name="l01585"></a>01585 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01586"></a>01586 }
+<a name="l01587"></a>01587
+<a name="l01588"></a>01588 start = cpl_polynomial_duplicate(<span class="keyword">self</span>);
+<a name="l01589"></a>01589 cand = cpl_polynomial_new(1);
+<a name="l01590"></a>01590 backup = cpl_polynomial_new(1);
+<a name="l01591"></a>01591
+<a name="l01592"></a>01592 <span class="comment">/* Number of (local) maxima to use as starting point of the optimization */</span>
+<a name="l01593"></a>01593 nshift = cpl_bivector_get_size(xtshift);
+<a name="l01594"></a>01594 <span class="keywordflow">if</span> (nmaxima == 0 || nmaxima > nshift) nmaxima = nshift;
+<a name="l01595"></a>01595
+<a name="l01596"></a>01596 cpl_msg_info(cpl_func, <span class="stringliteral">"Optimizing %d/%d local shift-maxima "</span>
+<a name="l01597"></a>01597 <span class="stringliteral">"(no-shift xc=%g. linelim=%d)"</span>, nmaxima, nshift, xc, linelim);
+<a name="l01598"></a>01598 <span class="keywordflow">if</span> (cpl_msg_get_level() <= CPL_MSG_DEBUG)
+<a name="l01599"></a>01599 cpl_bivector_dump(xtshift, stdout);
+<a name="l01600"></a>01600
+<a name="l01601"></a>01601 <span class="keywordflow">for</span> (imaxima = 0; imaxima < nmaxima; imaxima++) {
+<a name="l01602"></a>01602 <span class="comment">/* The initial, optimal (integer) shift */</span>
+<a name="l01603"></a>01603 <span class="keyword">const</span> <span class="keywordtype">double</span> xxc = cpl_vector_get(xtshiftx, imaxima);
+<a name="l01604"></a>01604 <span class="keywordtype">double</span> xtpixstep = pixstep;
+<a name="l01605"></a>01605 <span class="keywordtype">double</span> xtpixtol = pixtol;
+<a name="l01606"></a>01606 <span class="keywordtype">double</span> xtxc;
+<a name="l01607"></a>01607 cpl_boolean ok = CPL_FALSE;
+<a name="l01608"></a>01608 <span class="keywordtype">int</span> nfail;
+<a name="l01609"></a>01609
+<a name="l01610"></a>01610
+<a name="l01611"></a>01611 cpl_polynomial_copy(cand, start);
+<a name="l01612"></a>01612 cpl_polynomial_shift_1d(cand, 0, xxc);
+<a name="l01613"></a>01613 cpl_polynomial_copy(backup, cand);
+<a name="l01614"></a>01614
+<a name="l01615"></a>01615 <span class="comment">/* Increase tolerance until convergence */</span>
+<a name="l01616"></a>01616 <span class="keywordflow">for</span> (nfail = 0; nfail < maxfail; nfail++, xtpixtol *= 2.0,
+<a name="l01617"></a>01617 xtpixstep *= 2.0) {
+<a name="l01618"></a>01618 <span class="keywordtype">int</span> restart = maxcont;
+<a name="l01619"></a>01619 cpl_boolean redo;
<a name="l01620"></a>01620
-<a name="l01621"></a>01621 <span class="keywordflow">if</span> (imaximum < 0) {
-<a name="l01622"></a>01622 error = cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
-<a name="l01623"></a>01623 <span class="stringliteral">"XC could not be optimized over %d "</span>
-<a name="l01624"></a>01624 <span class="stringliteral">"local shift-maxima (xc=%g)"</span>, nmaxima, xc);
-<a name="l01625"></a>01625 } <span class="keywordflow">else</span> {
-<a name="l01626"></a>01626 cpl_msg_info(cpl_func, <span class="stringliteral">"Maximal XC=%g (up from %g, with initial pixel-"</span>
-<a name="l01627"></a>01627 <span class="stringliteral">"shift of %g) at %d/%d local shift-maximi"</span>, xc,
-<a name="l01628"></a>01628 cpl_vector_get(xtshifty, imaximum),
-<a name="l01629"></a>01629 cpl_vector_get(xtshiftx, imaximum),
-<a name="l01630"></a>01630 1+imaximum, nmaxima);
-<a name="l01631"></a>01631
-<a name="l01632"></a>01632 <span class="keywordflow">if</span> (doplot) {
-<a name="l01633"></a>01633 <a class="code" href="group__irplib__wavecal.html#ga7eec8e48f4888aba01b98d9e0dc2acc5" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(obs, <span class="keyword">self</span>, model, filler);
-<a name="l01634"></a>01634 }
-<a name="l01635"></a>01635
-<a name="l01636"></a>01636 *pxc = xc;
-<a name="l01637"></a>01637 }
-<a name="l01638"></a>01638
-<a name="l01639"></a>01639 cpl_bivector_delete(xtshift);
-<a name="l01640"></a>01640
-<a name="l01641"></a>01641 <span class="keywordflow">return</span> error;
-<a name="l01642"></a>01642
-<a name="l01643"></a>01643 <span class="preprocessor">#endif</span>
-<a name="l01644"></a>01644 <span class="preprocessor"></span>
-<a name="l01645"></a>01645 }
+<a name="l01621"></a>01621 <span class="keywordflow">do</span> {
+<a name="l01622"></a>01622 <span class="keywordflow">if</span> (error) {
+<a name="l01623"></a>01623 cpl_errorstate_dump(prestate, CPL_FALSE,
+<a name="l01624"></a>01624 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
+<a name="l01625"></a>01625 cpl_errorstate_set(prestate);
+<a name="l01626"></a>01626 }
+<a name="l01627"></a>01627 error = irplib_polynomial_find_1d_from_correlation_
+<a name="l01628"></a>01628 (cand, maxdeg, obs, model,
+<a name="l01629"></a>01629 filler, xtpixtol, xtpixstep, 2,
+<a name="l01630"></a>01630 maxite, &xtxc, &redo);
+<a name="l01631"></a>01631 <span class="keywordflow">if</span> (redo && !error) error = CPL_ERROR_CONTINUE;
+<a name="l01632"></a>01632 } <span class="keywordflow">while</span> (((!error && redo) || error == CPL_ERROR_CONTINUE)
+<a name="l01633"></a>01633 && --restart);
+<a name="l01634"></a>01634
+<a name="l01635"></a>01635 <span class="keywordflow">if</span> (!error && !redo) {
+<a name="l01636"></a>01636 cpl_msg_debug(cpl_func, <span class="stringliteral">"XC(imax=%d/%d:xtpixtol=%g): %g "</span>
+<a name="l01637"></a>01637 <span class="stringliteral">"(cost=%u:%u)"</span>, 1+imaxima, nmaxima, xtpixtol,
+<a name="l01638"></a>01638 xtxc, (<span class="keywordtype">unsigned</span>)model->cost,
+<a name="l01639"></a>01639 (<span class="keywordtype">unsigned</span>)model->xcost);
+<a name="l01640"></a>01640 <span class="keywordflow">break</span>;
+<a name="l01641"></a>01641 }
+<a name="l01642"></a>01642 cpl_msg_warning(cpl_func, <span class="stringliteral">"Increasing xtpixtol from %g (%g, imax="</span>
+<a name="l01643"></a>01643 <span class="stringliteral">"%d/%d)"</span>, xtpixtol, xtpixstep, 1+imaxima, nmaxima);
+<a name="l01644"></a>01644 <span class="keywordflow">if</span> (model->ulines > (cpl_size)linelim) {
+<a name="l01645"></a>01645 cpl_msg_warning(cpl_func, <span class="stringliteral">"Stopping search-refinement via "</span>
+<a name="l01646"></a>01646 <span class="stringliteral">"catalogue with %u lines > %d"</span>,
+<a name="l01647"></a>01647 (<span class="keywordtype">unsigned</span>)model->ulines, linelim);
+<a name="l01648"></a>01648 <span class="keywordflow">break</span>;
+<a name="l01649"></a>01649 }
+<a name="l01650"></a>01650 cpl_polynomial_copy(cand, start);
+<a name="l01651"></a>01651 }
+<a name="l01652"></a>01652
+<a name="l01653"></a>01653 <span class="comment">/* Decrease tolerance until divergence, keep previous */</span>
+<a name="l01654"></a>01654 <span class="keywordflow">for</span> (; !error && xtpixtol > 0.0; xtpixtol *= 0.25, xtpixstep *= 0.5) {
+<a name="l01655"></a>01655 <span class="keywordtype">int</span> restart = maxcont;
+<a name="l01656"></a>01656 cpl_boolean redo;
+<a name="l01657"></a>01657
+<a name="l01658"></a>01658 cpl_polynomial_copy(backup, cand);
+<a name="l01659"></a>01659 <span class="keywordflow">do</span> {
+<a name="l01660"></a>01660 <span class="keywordflow">if</span> (error) {
+<a name="l01661"></a>01661 cpl_errorstate_dump(prestate, CPL_FALSE,
+<a name="l01662"></a>01662 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
+<a name="l01663"></a>01663 cpl_errorstate_set(prestate);
+<a name="l01664"></a>01664 }
+<a name="l01665"></a>01665 error = irplib_polynomial_find_1d_from_correlation_
+<a name="l01666"></a>01666 (cand, maxdeg, obs, model, filler,
+<a name="l01667"></a>01667 xtpixtol, xtpixstep, 2, maxite, &xtxc, &redo);
+<a name="l01668"></a>01668 <span class="keywordflow">if</span> (redo && !error) error = CPL_ERROR_CONTINUE;
+<a name="l01669"></a>01669 } <span class="keywordflow">while</span> (((!error && redo) || error == CPL_ERROR_CONTINUE)
+<a name="l01670"></a>01670 && --restart);
+<a name="l01671"></a>01671 <span class="keywordflow">if</span> (error) <span class="keywordflow">break</span>;
+<a name="l01672"></a>01672 ok = CPL_TRUE;
+<a name="l01673"></a>01673 <span class="keywordflow">if</span> (redo) <span class="keywordflow">break</span>;
+<a name="l01674"></a>01674 cpl_msg_debug(cpl_func, <span class="stringliteral">"XC(imax=%d/%d:xtpixtol=%g): %g (cost=%u:%u"</span>
+<a name="l01675"></a>01675 <span class="stringliteral">". ulines=%u)"</span>, 1+imaxima, nmaxima, xtpixtol, xtxc,
+<a name="l01676"></a>01676 (<span class="keywordtype">unsigned</span>)model->cost, (<span class="keywordtype">unsigned</span>)model->xcost,
+<a name="l01677"></a>01677 (<span class="keywordtype">unsigned</span>)model->ulines);
+<a name="l01678"></a>01678 <span class="keywordflow">if</span> (model->ulines > (cpl_size)linelim) {
+<a name="l01679"></a>01679 cpl_msg_info(cpl_func, <span class="stringliteral">"Stopping search-refinement via "</span>
+<a name="l01680"></a>01680 <span class="stringliteral">"catalogue with %u lines > %u"</span>,
+<a name="l01681"></a>01681 (<span class="keywordtype">unsigned</span>)model->ulines, linelim);
+<a name="l01682"></a>01682 <span class="keywordflow">break</span>;
+<a name="l01683"></a>01683 }
+<a name="l01684"></a>01684 }
+<a name="l01685"></a>01685
+<a name="l01686"></a>01686 <span class="keywordflow">if</span> (error) {
+<a name="l01687"></a>01687 error = 0;
+<a name="l01688"></a>01688 cpl_errorstate_dump(prestate, CPL_FALSE,
+<a name="l01689"></a>01689 <a class="code" href="group__irplib__utils.html#ga26c6209e5df98978e2922a15b47b47d1" title="Dump a single CPL error at the CPL debug level.">irplib_errorstate_dump_debug</a>);
+<a name="l01690"></a>01690 cpl_errorstate_set(prestate);
+<a name="l01691"></a>01691 cpl_polynomial_copy(cand, backup);
+<a name="l01692"></a>01692 }
+<a name="l01693"></a>01693 <span class="keywordflow">if</span> (ok && xtxc > xc) {
+<a name="l01694"></a>01694 imaximum = imaxima;
+<a name="l01695"></a>01695 cpl_polynomial_copy(<span class="keyword">self</span>, cand);
+<a name="l01696"></a>01696 xc = xtxc;
+<a name="l01697"></a>01697
+<a name="l01698"></a>01698 cpl_msg_info(cpl_func, <span class="stringliteral">"XC(imax=%d/%d): %g -> %g (initial-shift=%g. "</span>
+<a name="l01699"></a>01699 <span class="stringliteral">"cost=%u:%u. lines=%u)"</span>, 1+imaxima, nmaxima,
+<a name="l01700"></a>01700 cpl_vector_get(xtshifty, imaxima), xtxc,
+<a name="l01701"></a>01701 cpl_vector_get(xtshiftx, imaxima),
+<a name="l01702"></a>01702 (<span class="keywordtype">unsigned</span>)model->cost, (<span class="keywordtype">unsigned</span>)model->xcost,
+<a name="l01703"></a>01703 (<span class="keywordtype">unsigned</span>)model->ulines);
+<a name="l01704"></a>01704 } <span class="keywordflow">else</span> {
+<a name="l01705"></a>01705 cpl_msg_info(cpl_func, <span class="stringliteral">"xc(imax=%d/%d): %g -> %g (initial-shift=%g. "</span>
+<a name="l01706"></a>01706 <span class="stringliteral">"cost=%u:%u. lines=%u)"</span>, 1+imaxima, nmaxima,
+<a name="l01707"></a>01707 cpl_vector_get(xtshifty, imaxima), xtxc,
+<a name="l01708"></a>01708 cpl_vector_get(xtshiftx, imaxima),
+<a name="l01709"></a>01709 (<span class="keywordtype">unsigned</span>)model->cost, (<span class="keywordtype">unsigned</span>)model->xcost,
+<a name="l01710"></a>01710 (<span class="keywordtype">unsigned</span>)model->ulines);
+<a name="l01711"></a>01711 }
+<a name="l01712"></a>01712 }
+<a name="l01713"></a>01713
+<a name="l01714"></a>01714 cpl_polynomial_delete(start);
+<a name="l01715"></a>01715 cpl_polynomial_delete(backup);
+<a name="l01716"></a>01716 cpl_polynomial_delete(cand);
+<a name="l01717"></a>01717
+<a name="l01718"></a>01718 <span class="keywordflow">if</span> (imaximum < 0) {
+<a name="l01719"></a>01719 <span class="comment">/* The initial, optimal (integer) shift */</span>
+<a name="l01720"></a>01720 <span class="keyword">const</span> <span class="keywordtype">double</span> xxc = cpl_vector_get(xtshiftx, 0);
+<a name="l01721"></a>01721 <span class="keyword">const</span> <span class="keywordtype">double</span> xc0 = cpl_vector_get(xtshifty, 0);
+<a name="l01722"></a>01722
+<a name="l01723"></a>01723 error = cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+<a name="l01724"></a>01724 <span class="stringliteral">"Could not improve XC=%g over %d "</span>
+<a name="l01725"></a>01725 <span class="stringliteral">"local shift-maxima, best at shift %g"</span>,
+<a name="l01726"></a>01726 xc0, nmaxima, xxc);
+<a name="l01727"></a>01727 } <span class="keywordflow">else</span> {
+<a name="l01728"></a>01728 cpl_msg_info(cpl_func, <span class="stringliteral">"Maximal XC=%g (up from %g, with initial pixel-"</span>
+<a name="l01729"></a>01729 <span class="stringliteral">"shift of %g) at %d/%d local shift-maximi"</span>, xc,
+<a name="l01730"></a>01730 cpl_vector_get(xtshifty, imaximum),
+<a name="l01731"></a>01731 cpl_vector_get(xtshiftx, imaximum),
+<a name="l01732"></a>01732 1+imaximum, nmaxima);
+<a name="l01733"></a>01733
+<a name="l01734"></a>01734 <span class="keywordflow">if</span> (doplot) {
+<a name="l01735"></a>01735 <a class="code" href="group__irplib__wavecal.html#ga7bac402a4e2c60f7646f1e655a66833d" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(obs, <span class="keyword">self</span>, model, filler);
+<a name="l01736"></a>01736 }
+<a name="l01737"></a>01737
+<a name="l01738"></a>01738 *pxc = xc;
+<a name="l01739"></a>01739 }
+<a name="l01740"></a>01740
+<a name="l01741"></a>01741 cpl_bivector_delete(xtshift);
+<a name="l01742"></a>01742
+<a name="l01743"></a>01743 <span class="keywordflow">return</span> error;
+<a name="l01744"></a>01744
+<a name="l01745"></a>01745 <span class="preprocessor">#endif</span>
+<a name="l01746"></a>01746 <span class="preprocessor"></span>
+<a name="l01747"></a>01747 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wavecal_8h_source.html b/html/irplib__wavecal_8h_source.html
index c60731e..9295e0a 100644
--- a/html/irplib__wavecal_8h_source.html
+++ b/html/irplib__wavecal_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_wavecal.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal.h,v 1.16 2009/10/21 14:49:42 llundin Exp $</span>
+<h1>irplib_wavecal.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal.h,v 1.18 2012/08/03 21:05:33 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the IRPLIB Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -30,9 +30,9 @@
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/10/21 14:49:42 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.16 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/08/03 21:05:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.18 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_WAVECAL_H</span>
@@ -73,16 +73,16 @@
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="comment">/* Any spectrum model must have these members first! */</span>
<a name="l00065"></a>00065 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00066"></a>00066 <span class="keywordtype">unsigned</span> cost; <span class="comment">/* May be incremented for cost counting */</span>
-<a name="l00067"></a>00067 <span class="keywordtype">unsigned</span> xcost; <span class="comment">/* Ditto (can exclude failed fills) */</span>
-<a name="l00068"></a>00068 <span class="keywordtype">unsigned</span> ulines; <span class="comment">/* May be set to number of lines used */</span>
+<a name="l00066"></a>00066 cpl_size cost; <span class="comment">/* May be incremented for cost counting */</span>
+<a name="l00067"></a>00067 cpl_size xcost; <span class="comment">/* Ditto (can exclude failed fills) */</span>
+<a name="l00068"></a>00068 cpl_size ulines; <span class="comment">/* May be set to number of lines used */</span>
<a name="l00069"></a>00069
<a name="l00070"></a>00070 } irplib_base_spectrum_model;
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00073"></a>00073 <span class="keywordtype">unsigned</span> cost; <span class="comment">/* May be incremented for cost counting */</span>
-<a name="l00074"></a>00074 <span class="keywordtype">unsigned</span> xcost; <span class="comment">/* Ditto (can exclude failed fills) */</span>
-<a name="l00075"></a>00075 <span class="keywordtype">unsigned</span> ulines; <span class="comment">/* May be set to number of lines used */</span>
+<a name="l00073"></a>00073 cpl_size cost; <span class="comment">/* May be incremented for cost counting */</span>
+<a name="l00074"></a>00074 cpl_size xcost; <span class="comment">/* Ditto (can exclude failed fills) */</span>
+<a name="l00075"></a>00075 cpl_size ulines; <span class="comment">/* May be set to number of lines used */</span>
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="keywordtype">double</span> wslit; <span class="comment">/* Slit Width */</span>
<a name="l00078"></a>00078 <span class="keywordtype">double</span> wfwhm; <span class="comment">/* FWHM of transfer function */</span>
@@ -101,7 +101,7 @@
<a name="l00091"></a>00091 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00092"></a>00092
<a name="l00093"></a>00093 cpl_error_code
-<a name="l00094"></a>00094 <a class="code" href="group__irplib__wavecal.html#ga0adf260c4d27fc50bc8b4cbcc0264a4e" title="Modify self by maximizing the cross-correlation across all maxima.">irplib_polynomial_find_1d_from_correlation_all</a>(cpl_polynomial *,
+<a name="l00094"></a>00094 <a class="code" href="group__irplib__wavecal.html#ga7e782bcb7ec0e638a93dba628916a7a8" title="Modify self by maximizing the cross-correlation across all maxima.">irplib_polynomial_find_1d_from_correlation_all</a>(cpl_polynomial *,
<a name="l00095"></a>00095 <span class="keywordtype">int</span>,
<a name="l00096"></a>00096 <span class="keyword">const</span> cpl_vector *,
<a name="l00097"></a>00097 <span class="keywordtype">int</span>, <span class="keywordtype">int</span>,
@@ -109,91 +109,85 @@
<a name="l00099"></a>00099 cpl_error_code (*)
<a name="l00100"></a>00100 (cpl_vector *,
<a name="l00101"></a>00101 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00102"></a>00102 irplib_base_spectrum_model *,
-<a name="l00103"></a>00103 <span class="keywordtype">int</span>),
+<a name="l00102"></a>00102 irplib_base_spectrum_model *),
+<a name="l00103"></a>00103 <span class="keywordtype">double</span>,
<a name="l00104"></a>00104 <span class="keywordtype">double</span>,
-<a name="l00105"></a>00105 <span class="keywordtype">double</span>,
+<a name="l00105"></a>00105 <span class="keywordtype">int</span>,
<a name="l00106"></a>00106 <span class="keywordtype">int</span>,
<a name="l00107"></a>00107 <span class="keywordtype">int</span>,
<a name="l00108"></a>00108 <span class="keywordtype">int</span>,
-<a name="l00109"></a>00109 <span class="keywordtype">int</span>,
-<a name="l00110"></a>00110 cpl_boolean,
-<a name="l00111"></a>00111 <span class="keywordtype">double</span> *);
-<a name="l00112"></a>00112
-<a name="l00113"></a>00113 cpl_error_code
-<a name="l00114"></a>00114 <a class="code" href="group__irplib__wavecal.html#gae027096b411661b9584c72ab3e8e6547" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(cpl_bivector *,
-<a name="l00115"></a>00115 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00116"></a>00116 <span class="keyword">const</span> cpl_vector *,
-<a name="l00117"></a>00117 irplib_base_spectrum_model *,
-<a name="l00118"></a>00118 cpl_error_code (*)
-<a name="l00119"></a>00119 (cpl_vector *,
-<a name="l00120"></a>00120 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00121"></a>00121 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00122"></a>00122 <span class="keywordtype">int</span>,
-<a name="l00123"></a>00123 cpl_boolean,
-<a name="l00124"></a>00124 <span class="keywordtype">double</span> *);
-<a name="l00125"></a>00125
-<a name="l00126"></a>00126 cpl_error_code
-<a name="l00127"></a>00127 <a class="code" href="group__irplib__wavecal.html#gabaec991ebc1b856766bf66768c4a6a19" title="Shift self by the amount that maximizes the cross-correlation.">irplib_polynomial_shift_1d_from_correlation</a>(cpl_polynomial *,
-<a name="l00128"></a>00128 <span class="keyword">const</span> cpl_vector *,
-<a name="l00129"></a>00129 irplib_base_spectrum_model *,
-<a name="l00130"></a>00130 cpl_error_code (*)
-<a name="l00131"></a>00131 (cpl_vector *,
-<a name="l00132"></a>00132 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00133"></a>00133 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00134"></a>00134 <span class="keywordtype">int</span>, cpl_boolean, <span class="keywordtype">double</span> *);
-<a name="l00135"></a>00135
-<a name="l00136"></a>00136 cpl_error_code
-<a name="l00137"></a>00137 <a class="code" href="group__irplib__wavecal.html#gaaa889f20c9483965ff6bab186d4f9972" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>(cpl_polynomial *, <span class="keywordtype">int</span>,
-<a name="l00138"></a>00138 <span class="keyword">const</span> cpl_vector *,
-<a name="l00139"></a>00139 irplib_base_spectrum_model *,
-<a name="l00140"></a>00140 cpl_error_code (*)
-<a name="l00141"></a>00141 (cpl_vector *,
-<a name="l00142"></a>00142 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00143"></a>00143 irplib_base_spectrum_model *, <span class="keywordtype">int</span>),
-<a name="l00144"></a>00144 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
-<a name="l00145"></a>00145 <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *);
-<a name="l00146"></a>00146
-<a name="l00147"></a>00147 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga44aa21cb1fc1459ab3b360748a737974" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a>(cpl_vector *,
-<a name="l00148"></a>00148 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00149"></a>00149 irplib_base_spectrum_model *,
-<a name="l00150"></a>00150 <span class="keywordtype">int</span>);
-<a name="l00151"></a>00151
-<a name="l00152"></a>00152 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga631e29d63bc65109f458915b5d1c8bb9" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum</a>(cpl_vector *,
-<a name="l00153"></a>00153 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00154"></a>00154 irplib_base_spectrum_model *,
-<a name="l00155"></a>00155 <span class="keywordtype">int</span>);
-<a name="l00156"></a>00156
-<a name="l00157"></a>00157 cpl_error_code
-<a name="l00158"></a>00158 <a class="code" href="group__irplib__wavecal.html#gae8e236a419dedc99eab52690f4a33901" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast</a>(cpl_vector *,
-<a name="l00159"></a>00159 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00160"></a>00160 irplib_base_spectrum_model *,
-<a name="l00161"></a>00161 <span class="keywordtype">int</span>);
-<a name="l00162"></a>00162
-<a name="l00163"></a>00163 cpl_error_code
-<a name="l00164"></a>00164 <a class="code" href="group__irplib__wavecal.html#gaa0000d5a34e290fc93dfcc936e631eb7" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum_fast</a>(cpl_vector *,
-<a name="l00165"></a>00165 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00166"></a>00166 irplib_base_spectrum_model *,
-<a name="l00167"></a>00167 <span class="keywordtype">int</span>);
-<a name="l00168"></a>00168
-<a name="l00169"></a>00169 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga7eec8e48f4888aba01b98d9e0dc2acc5" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(<span class="keyword">const</span> cpl_vector *,
-<a name="l00170"></a>00170 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00171"></a>00171 irplib_base_spectrum_model *,
-<a name="l00172"></a>00172 cpl_error_code (*)
-<a name="l00173"></a>00173 (cpl_vector *,
-<a name="l00174"></a>00174 <span class="keyword">const</span> cpl_polynomial *,
-<a name="l00175"></a>00175 irplib_base_spectrum_model *,
-<a name="l00176"></a>00176 <span class="keywordtype">int</span>));
+<a name="l00109"></a>00109 cpl_boolean,
+<a name="l00110"></a>00110 <span class="keywordtype">double</span> *);
+<a name="l00111"></a>00111
+<a name="l00112"></a>00112 cpl_error_code
+<a name="l00113"></a>00113 <a class="code" href="group__irplib__wavecal.html#ga260740bf1f3fc364b301519eab3249a6" title="Find shift(s) that maximizes (locally) the cross-correlation.">irplib_bivector_find_shift_from_correlation</a>(cpl_bivector *,
+<a name="l00114"></a>00114 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00115"></a>00115 <span class="keyword">const</span> cpl_vector *,
+<a name="l00116"></a>00116 irplib_base_spectrum_model *,
+<a name="l00117"></a>00117 cpl_error_code (*)
+<a name="l00118"></a>00118 (cpl_vector *,
+<a name="l00119"></a>00119 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00120"></a>00120 irplib_base_spectrum_model *),
+<a name="l00121"></a>00121 <span class="keywordtype">int</span>,
+<a name="l00122"></a>00122 cpl_boolean,
+<a name="l00123"></a>00123 <span class="keywordtype">double</span> *);
+<a name="l00124"></a>00124
+<a name="l00125"></a>00125 cpl_error_code
+<a name="l00126"></a>00126 <a class="code" href="group__irplib__wavecal.html#gadf93655e2c7c0d5df23e2e3de66d0b56" title="Shift self by the amount that maximizes the cross-correlation.">irplib_polynomial_shift_1d_from_correlation</a>(cpl_polynomial *,
+<a name="l00127"></a>00127 <span class="keyword">const</span> cpl_vector *,
+<a name="l00128"></a>00128 irplib_base_spectrum_model *,
+<a name="l00129"></a>00129 cpl_error_code (*)
+<a name="l00130"></a>00130 (cpl_vector *,
+<a name="l00131"></a>00131 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00132"></a>00132 irplib_base_spectrum_model *),
+<a name="l00133"></a>00133 <span class="keywordtype">int</span>, cpl_boolean, <span class="keywordtype">double</span> *);
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 cpl_error_code
+<a name="l00136"></a>00136 <a class="code" href="group__irplib__wavecal.html#ga8f49c4927c50a461288e8f19720dff86" title="Modify self by maximizing the cross-correlation.">irplib_polynomial_find_1d_from_correlation</a>(cpl_polynomial *, <span class="keywordtype">int</span>,
+<a name="l00137"></a>00137 <span class="keyword">const</span> cpl_vector *,
+<a name="l00138"></a>00138 irplib_base_spectrum_model *,
+<a name="l00139"></a>00139 cpl_error_code (*)
+<a name="l00140"></a>00140 (cpl_vector *,
+<a name="l00141"></a>00141 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00142"></a>00142 irplib_base_spectrum_model *),
+<a name="l00143"></a>00143 <span class="keywordtype">double</span>, <span class="keywordtype">double</span>,
+<a name="l00144"></a>00144 <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *);
+<a name="l00145"></a>00145
+<a name="l00146"></a>00146 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga1d49cb7f85fc246c8fdf38625c769f7a" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum</a>(cpl_vector *,
+<a name="l00147"></a>00147 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00148"></a>00148 irplib_base_spectrum_model *);
+<a name="l00149"></a>00149
+<a name="l00150"></a>00150 cpl_error_code <a class="code" href="group__irplib__wavecal.html#gad22539bf83d1b08d845ed5f618a4009f" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum</a>(cpl_vector *,
+<a name="l00151"></a>00151 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00152"></a>00152 irplib_base_spectrum_model *);
+<a name="l00153"></a>00153
+<a name="l00154"></a>00154 cpl_error_code
+<a name="l00155"></a>00155 <a class="code" href="group__irplib__wavecal.html#ga6a463d7816b4164fdd23a4df2805cc95" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_line_spectrum_fast</a>(cpl_vector *,
+<a name="l00156"></a>00156 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00157"></a>00157 irplib_base_spectrum_model *);
+<a name="l00158"></a>00158
+<a name="l00159"></a>00159 cpl_error_code
+<a name="l00160"></a>00160 <a class="code" href="group__irplib__wavecal.html#ga75a85320c74d1088eeaeec97974d793c" title="Generate a 1D spectrum from a model and a dispersion relation.">irplib_vector_fill_logline_spectrum_fast</a>(cpl_vector *,
+<a name="l00161"></a>00161 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00162"></a>00162 irplib_base_spectrum_model *);
+<a name="l00163"></a>00163
+<a name="l00164"></a>00164 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga7bac402a4e2c60f7646f1e655a66833d" title="Plot a 1D spectrum and one from a model.">irplib_plot_spectrum_and_model</a>(<span class="keyword">const</span> cpl_vector *,
+<a name="l00165"></a>00165 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00166"></a>00166 irplib_base_spectrum_model *,
+<a name="l00167"></a>00167 cpl_error_code (*)
+<a name="l00168"></a>00168 (cpl_vector *,
+<a name="l00169"></a>00169 <span class="keyword">const</span> cpl_polynomial *,
+<a name="l00170"></a>00170 irplib_base_spectrum_model *));
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb" title="Fit a 2D-dispersion from an image of wavelengths.">irplib_polynomial_fit_2d_dispersion</a>(cpl_polynomial *,
+<a name="l00173"></a>00173 <span class="keyword">const</span> cpl_image *,
+<a name="l00174"></a>00174 <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *);
+<a name="l00175"></a>00175
+<a name="l00176"></a>00176 <span class="keywordtype">int</span> <a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25" title="Count the positive Y-entries in a given X-range.">irplib_bivector_count_positive</a>(<span class="keyword">const</span> cpl_bivector *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
<a name="l00177"></a>00177
-<a name="l00178"></a>00178 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga2dd3251367e2ee8b8bd5ce080e9f31bb" title="Fit a 2D-dispersion from an image of wavelengths.">irplib_polynomial_fit_2d_dispersion</a>(cpl_polynomial *,
-<a name="l00179"></a>00179 <span class="keyword">const</span> cpl_image *,
-<a name="l00180"></a>00180 <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *);
-<a name="l00181"></a>00181
-<a name="l00182"></a>00182 <span class="keywordtype">int</span> <a class="code" href="group__irplib__wavecal.html#ga03d7f038adc7e18e7a9071581fa47a25" title="Count the positive Y-entries in a given X-range.">irplib_bivector_count_positive</a>(<span class="keyword">const</span> cpl_bivector *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
-<a name="l00183"></a>00183
-<a name="l00184"></a>00184 <span class="preprocessor">#endif</span>
+<a name="l00178"></a>00178 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wavecal__impl_8h_source.html b/html/irplib__wavecal__impl_8h_source.html
index 16b4904..6f46262 100644
--- a/html/irplib__wavecal__impl_8h_source.html
+++ b/html/irplib__wavecal__impl_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_wavecal_impl.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal_impl.h,v 1.6 2009/10/21 14:49:42 llundin Exp $</span>
+<h1>irplib_wavecal_impl.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wavecal_impl.h,v 1.7 2012/08/03 21:05:34 llundin Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the IRPLIB Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -30,9 +30,9 @@
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/10/21 14:49:42 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/08/03 21:05:34 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.7 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_WAVECAL_IMPL_H</span>
@@ -48,7 +48,7 @@
<a name="l00038"></a>00038 <span class="comment"> Private Function Prototypes</span>
<a name="l00039"></a>00039 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00040"></a>00040
-<a name="l00041"></a>00041 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(cpl_vector *,
+<a name="l00041"></a>00041 cpl_error_code <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(cpl_vector *,
<a name="l00042"></a>00042 cpl_vector *,
<a name="l00043"></a>00043 cpl_vector *,
<a name="l00044"></a>00044 <span class="keyword">const</span> cpl_polynomial *,
@@ -59,13 +59,13 @@
<a name="l00049"></a>00049 <span class="keywordtype">int</span>,
<a name="l00050"></a>00050 cpl_boolean,
<a name="l00051"></a>00051 cpl_boolean,
-<a name="l00052"></a>00052 <span class="keywordtype">unsigned</span> *);
+<a name="l00052"></a>00052 cpl_size *);
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="keywordtype">double</span> <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(<span class="keywordtype">double</span>, <span class="keywordtype">double</span>);
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wcs_8c_source.html b/html/irplib__wcs_8c_source.html
index 4955752..32bc206 100644
--- a/html/irplib__wcs_8c_source.html
+++ b/html/irplib__wcs_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2010/10/07 14:10:55 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -304,7 +304,7 @@
<a name="l00390"></a>00390 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00391"></a>00391 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wcs_8h_source.html b/html/irplib__wcs_8h_source.html
index 72a1816..09899ca 100644
--- a/html/irplib__wcs_8h_source.html
+++ b/html/irplib__wcs_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2010/10/07 14:10:55 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_WCS_H</span>
@@ -75,7 +75,7 @@
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wlxcorr_8c_source.html b/html/irplib__wlxcorr_8c_source.html
index 9887138..01e29c7 100644
--- a/html/irplib__wlxcorr_8c_source.html
+++ b/html/irplib__wlxcorr_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_wlxcorr.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wlxcorr.c,v 1.55 2012/01/12 11:50:41 llundin Exp $</span>
+<h1>irplib_wlxcorr.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wlxcorr.c,v 1.58 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the IRPLIB package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 11:50:41 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.55 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.58 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -345,7 +345,7 @@
<a name="l00399"></a>00399 lines_catalog, conv_kernel,
<a name="l00400"></a>00400 guess_poly, 0);
<a name="l00401"></a>00401 } <span class="keywordflow">else</span> {
-<a name="l00402"></a>00402 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>
+<a name="l00402"></a>00402 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>
<a name="l00403"></a>00403 (cpl_bivector_get_y(gen_init), NULL, NULL,
<a name="l00404"></a>00404 guess_poly, lines_catalog,
<a name="l00405"></a>00405 slitw, fwhm, xtrunc, 0, CPL_FALSE, CPL_FALSE, NULL);
@@ -368,7 +368,7 @@
<a name="l00422"></a>00422 lines_catalog, conv_kernel,
<a name="l00423"></a>00423 corr_poly, 0);
<a name="l00424"></a>00424 } <span class="keywordflow">else</span> {
-<a name="l00425"></a>00425 error = <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>
+<a name="l00425"></a>00425 error = <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>
<a name="l00426"></a>00426 (cpl_bivector_get_y(gen_corr), NULL, NULL,
<a name="l00427"></a>00427 corr_poly, lines_catalog,
<a name="l00428"></a>00428 slitw, fwhm, xtrunc, 0, CPL_FALSE, CPL_FALSE, NULL);
@@ -428,656 +428,674 @@
<a name="l00493"></a>00493 cpl_ensure(lines_catalog != NULL, CPL_ERROR_NULL_INPUT, NULL);
<a name="l00494"></a>00494
<a name="l00495"></a>00495 <span class="comment">/* Find the 1st line */</span>
-<a name="l00496"></a>00496 wave_min_id = cpl_vector_find(xlines, wave_min);
-<a name="l00497"></a>00497 <span class="comment">/* The first line must be greater than (at least?) wave_min */</span>
-<a name="l00498"></a>00498 <span class="keywordflow">if</span> (dxlines[wave_min_id] <= wave_min) wave_min_id++;
-<a name="l00499"></a>00499
-<a name="l00500"></a>00500 <span class="comment">/* Find the last line */</span>
-<a name="l00501"></a>00501 wave_max_id = cpl_vector_find(xlines, wave_max);
-<a name="l00502"></a>00502 <span class="comment">/* The last line must be less than wave_max */</span>
-<a name="l00503"></a>00503 <span class="keywordflow">if</span> (dxlines[wave_max_id] >= wave_min) wave_max_id--;
-<a name="l00504"></a>00504
-<a name="l00505"></a>00505 <span class="comment">/* Checking the wavelength range at this point via the indices also</span>
-<a name="l00506"></a>00506 <span class="comment"> verifies that they were not found using non-increasing wavelengths */</span>
-<a name="l00507"></a>00507 cpl_ensure(wave_min_id <= wave_max_id, CPL_ERROR_ILLEGAL_INPUT, NULL);
-<a name="l00508"></a>00508
-<a name="l00509"></a>00509 <span class="keywordflow">if</span> (wave_min_id < 0 || wave_max_id == nlines) {
+<a name="l00496"></a>00496 wave_min_id = (int)cpl_vector_find(xlines, wave_min);
+<a name="l00497"></a>00497 <span class="keywordflow">if</span> (wave_min_id < 0) {
+<a name="l00498"></a>00498 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00499"></a>00499 __FILE__, __LINE__,
+<a name="l00500"></a>00500 <span class="stringliteral">"The starting wavelength cannot be found"</span>) ;
+<a name="l00501"></a>00501 <span class="keywordflow">return</span> NULL ;
+<a name="l00502"></a>00502 }
+<a name="l00503"></a>00503
+<a name="l00504"></a>00504 <span class="comment">/* The first line must be greater than (at least?) wave_min */</span>
+<a name="l00505"></a>00505 <span class="keywordflow">if</span> (dxlines[wave_min_id] <= wave_min) wave_min_id++;
+<a name="l00506"></a>00506
+<a name="l00507"></a>00507 <span class="comment">/* Find the last line */</span>
+<a name="l00508"></a>00508 wave_max_id = (int)cpl_vector_find(xlines, wave_max);
+<a name="l00509"></a>00509 <span class="keywordflow">if</span> (wave_max_id < 0) {
<a name="l00510"></a>00510 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l00511"></a>00511 __FILE__, __LINE__, <span class="stringliteral">"The %d-line catalogue "</span>
-<a name="l00512"></a>00512 <span class="stringliteral">"has no lines in the range %g -> %g"</span>,
-<a name="l00513"></a>00513 nlines, wave_min, wave_max);
-<a name="l00514"></a>00514 <span class="keywordflow">return</span> NULL ;
-<a name="l00515"></a>00515 }
-<a name="l00516"></a>00516
-<a name="l00517"></a>00517 sub_cat_wl = cpl_vector_extract(xlines, wave_min_id, wave_max_id, 1);
-<a name="l00518"></a>00518 sub_cat_int = cpl_vector_extract(cpl_bivector_get_y_const(lines_catalog),
-<a name="l00519"></a>00519 wave_min_id, wave_max_id, 1);
-<a name="l00520"></a>00520
-<a name="l00521"></a>00521 <span class="keywordflow">return</span> cpl_bivector_wrap_vectors(sub_cat_wl, sub_cat_int);
-<a name="l00522"></a>00522 }
-<a name="l00523"></a>00523
-<a name="l00524"></a>00524 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00541"></a>00541 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00542"></a>00542 cpl_vector * irplib_wlxcorr_convolve_create_kernel(<span class="keywordtype">double</span> slitw,
-<a name="l00543"></a>00543 <span class="keywordtype">double</span> fwhm)
-<a name="l00544"></a>00544 {
-<a name="l00545"></a>00545 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = fwhm * CPL_MATH_SIG_FWHM;
-<a name="l00546"></a>00546 <span class="keyword">const</span> <span class="keywordtype">int</span> size = 1 + (int)(5.0 * sigma + 0.5*slitw);
-<a name="l00547"></a>00547 cpl_vector * kernel = cpl_vector_new(size);
-<a name="l00548"></a>00548
-<a name="l00549"></a>00549
-<a name="l00550"></a>00550 <span class="keywordflow">if</span> (cpl_vector_fill_lss_profile_symmetric(kernel, slitw, fwhm)) {
-<a name="l00551"></a>00551 cpl_vector_delete(kernel);
-<a name="l00552"></a>00552 cpl_ensure(0, cpl_error_get_code(), NULL);
-<a name="l00553"></a>00553 }
-<a name="l00554"></a>00554
-<a name="l00555"></a>00555 <span class="keywordflow">return</span> kernel;
-<a name="l00556"></a>00556 }
-<a name="l00557"></a>00557
-<a name="l00558"></a>00558 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00511"></a>00511 __FILE__, __LINE__,
+<a name="l00512"></a>00512 <span class="stringliteral">"The ending wavelength cannot be found"</span>) ;
+<a name="l00513"></a>00513 <span class="keywordflow">return</span> NULL ;
+<a name="l00514"></a>00514 }
+<a name="l00515"></a>00515 <span class="comment">/* The last line must be less than wave_max */</span>
+<a name="l00516"></a>00516 <span class="keywordflow">if</span> (dxlines[wave_max_id] >= wave_min) wave_max_id--;
+<a name="l00517"></a>00517
+<a name="l00518"></a>00518 <span class="comment">/* Checking the wavelength range at this point via the indices also</span>
+<a name="l00519"></a>00519 <span class="comment"> verifies that they were not found using non-increasing wavelengths */</span>
+<a name="l00520"></a>00520 cpl_ensure(wave_min_id <= wave_max_id, CPL_ERROR_ILLEGAL_INPUT, NULL);
+<a name="l00521"></a>00521
+<a name="l00522"></a>00522 <span class="keywordflow">if</span> (wave_min_id < 0 || wave_max_id == nlines) {
+<a name="l00523"></a>00523 cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l00524"></a>00524 __FILE__, __LINE__, <span class="stringliteral">"The %d-line catalogue "</span>
+<a name="l00525"></a>00525 <span class="stringliteral">"has no lines in the range %g -> %g"</span>,
+<a name="l00526"></a>00526 nlines, wave_min, wave_max);
+<a name="l00527"></a>00527 <span class="keywordflow">return</span> NULL ;
+<a name="l00528"></a>00528 }
+<a name="l00529"></a>00529
+<a name="l00530"></a>00530 sub_cat_wl = cpl_vector_extract(xlines, wave_min_id, wave_max_id, 1);
+<a name="l00531"></a>00531 sub_cat_int = cpl_vector_extract(cpl_bivector_get_y_const(lines_catalog),
+<a name="l00532"></a>00532 wave_min_id, wave_max_id, 1);
+<a name="l00533"></a>00533
+<a name="l00534"></a>00534 <span class="keywordflow">return</span> cpl_bivector_wrap_vectors(sub_cat_wl, sub_cat_int);
+<a name="l00535"></a>00535 }
+<a name="l00536"></a>00536
+<a name="l00537"></a>00537 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00554"></a>00554 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00555"></a>00555 cpl_vector * irplib_wlxcorr_convolve_create_kernel(<span class="keywordtype">double</span> slitw,
+<a name="l00556"></a>00556 <span class="keywordtype">double</span> fwhm)
+<a name="l00557"></a>00557 {
+<a name="l00558"></a>00558 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = fwhm * CPL_MATH_SIG_FWHM;
+<a name="l00559"></a>00559 <span class="keyword">const</span> <span class="keywordtype">int</span> size = 1 + (int)(5.0 * sigma + 0.5*slitw);
+<a name="l00560"></a>00560 cpl_vector * kernel = cpl_vector_new(size);
+<a name="l00561"></a>00561
+<a name="l00562"></a>00562
+<a name="l00563"></a>00563 <span class="keywordflow">if</span> (cpl_vector_fill_lss_profile_symmetric(kernel, slitw, fwhm)) {
+<a name="l00564"></a>00564 cpl_vector_delete(kernel);
+<a name="l00565"></a>00565 cpl_ensure(0, cpl_error_get_code(), NULL);
+<a name="l00566"></a>00566 }
+<a name="l00567"></a>00567
+<a name="l00568"></a>00568 <span class="keywordflow">return</span> kernel;
+<a name="l00569"></a>00569 }
+<a name="l00570"></a>00570
<a name="l00571"></a>00571 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00572"></a>00572 <span class="keywordtype">int</span> irplib_wlxcorr_convolve(
-<a name="l00573"></a>00573 cpl_vector * smoothed,
-<a name="l00574"></a>00574 <span class="keyword">const</span> cpl_vector * conv_kernel)
-<a name="l00575"></a>00575 {
-<a name="l00576"></a>00576 <span class="keywordtype">int</span> nsamples ;
-<a name="l00577"></a>00577 <span class="keywordtype">int</span> ihwidth ;
-<a name="l00578"></a>00578 cpl_vector * raw ;
-<a name="l00579"></a>00579 <span class="keywordtype">double</span> * psmoothe ;
-<a name="l00580"></a>00580 <span class="keywordtype">double</span> * praw ;
-<a name="l00581"></a>00581 <span class="keyword">const</span> <span class="keywordtype">double</span>* psymm ;
-<a name="l00582"></a>00582 <span class="keywordtype">int</span> i, j ;
-<a name="l00583"></a>00583
-<a name="l00584"></a>00584 <span class="comment">/* Test entries */</span>
-<a name="l00585"></a>00585 cpl_ensure(smoothed, CPL_ERROR_NULL_INPUT, -1) ;
-<a name="l00586"></a>00586 cpl_ensure(conv_kernel, CPL_ERROR_NULL_INPUT, -1) ;
-<a name="l00587"></a>00587
-<a name="l00588"></a>00588 <span class="comment">/* Initialise */</span>
-<a name="l00589"></a>00589 nsamples = cpl_vector_get_size(smoothed) ;
-<a name="l00590"></a>00590 ihwidth = cpl_vector_get_size(conv_kernel) - 1 ;
-<a name="l00591"></a>00591 cpl_ensure(ihwidth<nsamples, CPL_ERROR_ILLEGAL_INPUT, -1) ;
-<a name="l00592"></a>00592 psymm = cpl_vector_get_data_const(conv_kernel) ;
-<a name="l00593"></a>00593 psmoothe = cpl_vector_get_data(smoothed) ;
-<a name="l00594"></a>00594
-<a name="l00595"></a>00595 <span class="comment">/* Create raw vector */</span>
-<a name="l00596"></a>00596 raw = cpl_vector_duplicate(smoothed) ;
-<a name="l00597"></a>00597 praw = cpl_vector_get_data(raw) ;
-<a name="l00598"></a>00598
-<a name="l00599"></a>00599 <span class="comment">/* Convolve with the symmetric function */</span>
-<a name="l00600"></a>00600 <span class="keywordflow">for</span> (i=0 ; i<ihwidth ; i++) {
-<a name="l00601"></a>00601 psmoothe[i] = praw[i] * psymm[0];
-<a name="l00602"></a>00602 <span class="keywordflow">for</span> (j=1 ; j <= ihwidth ; j++) {
-<a name="l00603"></a>00603 <span class="keyword">const</span> <span class="keywordtype">int</span> k = i-j < 0 ? 0 : i-j;
-<a name="l00604"></a>00604 psmoothe[i] += (praw[k]+praw[i+j]) * psymm[j];
-<a name="l00605"></a>00605 }
-<a name="l00606"></a>00606 }
-<a name="l00607"></a>00607
-<a name="l00608"></a>00608 <span class="keywordflow">for</span> (i=ihwidth ; i<nsamples-ihwidth ; i++) {
-<a name="l00609"></a>00609 psmoothe[i] = praw[i] * psymm[0];
-<a name="l00610"></a>00610 <span class="keywordflow">for</span> (j=1 ; j<=ihwidth ; j++)
-<a name="l00611"></a>00611 psmoothe[i] += (praw[i-j]+praw[i+j]) * psymm[j];
-<a name="l00612"></a>00612 }
-<a name="l00613"></a>00613 <span class="keywordflow">for</span> (i=nsamples-ihwidth ; i<nsamples ; i++) {
+<a name="l00584"></a>00584 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00585"></a>00585 <span class="keywordtype">int</span> irplib_wlxcorr_convolve(
+<a name="l00586"></a>00586 cpl_vector * smoothed,
+<a name="l00587"></a>00587 <span class="keyword">const</span> cpl_vector * conv_kernel)
+<a name="l00588"></a>00588 {
+<a name="l00589"></a>00589 <span class="keywordtype">int</span> nsamples ;
+<a name="l00590"></a>00590 <span class="keywordtype">int</span> ihwidth ;
+<a name="l00591"></a>00591 cpl_vector * raw ;
+<a name="l00592"></a>00592 <span class="keywordtype">double</span> * psmoothe ;
+<a name="l00593"></a>00593 <span class="keywordtype">double</span> * praw ;
+<a name="l00594"></a>00594 <span class="keyword">const</span> <span class="keywordtype">double</span>* psymm ;
+<a name="l00595"></a>00595 <span class="keywordtype">int</span> i, j ;
+<a name="l00596"></a>00596
+<a name="l00597"></a>00597 <span class="comment">/* Test entries */</span>
+<a name="l00598"></a>00598 cpl_ensure(smoothed, CPL_ERROR_NULL_INPUT, -1) ;
+<a name="l00599"></a>00599 cpl_ensure(conv_kernel, CPL_ERROR_NULL_INPUT, -1) ;
+<a name="l00600"></a>00600
+<a name="l00601"></a>00601 <span class="comment">/* Initialise */</span>
+<a name="l00602"></a>00602 nsamples = cpl_vector_get_size(smoothed) ;
+<a name="l00603"></a>00603 ihwidth = cpl_vector_get_size(conv_kernel) - 1 ;
+<a name="l00604"></a>00604 cpl_ensure(ihwidth<nsamples, CPL_ERROR_ILLEGAL_INPUT, -1) ;
+<a name="l00605"></a>00605 psymm = cpl_vector_get_data_const(conv_kernel) ;
+<a name="l00606"></a>00606 psmoothe = cpl_vector_get_data(smoothed) ;
+<a name="l00607"></a>00607
+<a name="l00608"></a>00608 <span class="comment">/* Create raw vector */</span>
+<a name="l00609"></a>00609 raw = cpl_vector_duplicate(smoothed) ;
+<a name="l00610"></a>00610 praw = cpl_vector_get_data(raw) ;
+<a name="l00611"></a>00611
+<a name="l00612"></a>00612 <span class="comment">/* Convolve with the symmetric function */</span>
+<a name="l00613"></a>00613 <span class="keywordflow">for</span> (i=0 ; i<ihwidth ; i++) {
<a name="l00614"></a>00614 psmoothe[i] = praw[i] * psymm[0];
-<a name="l00615"></a>00615 <span class="keywordflow">for</span> (j=1 ; j<=ihwidth ; j++) {
-<a name="l00616"></a>00616 <span class="keyword">const</span> <span class="keywordtype">int</span> k = i+j > nsamples-1 ? nsamples - 1 : i+j;
-<a name="l00617"></a>00617 psmoothe[i] += (praw[k]+praw[i-j]) * psymm[j];
+<a name="l00615"></a>00615 <span class="keywordflow">for</span> (j=1 ; j <= ihwidth ; j++) {
+<a name="l00616"></a>00616 <span class="keyword">const</span> <span class="keywordtype">int</span> k = i-j < 0 ? 0 : i-j;
+<a name="l00617"></a>00617 psmoothe[i] += (praw[k]+praw[i+j]) * psymm[j];
<a name="l00618"></a>00618 }
<a name="l00619"></a>00619 }
-<a name="l00620"></a>00620 cpl_vector_delete(raw) ;
-<a name="l00621"></a>00621 <span class="keywordflow">return</span> 0 ;
-<a name="l00622"></a>00622 }
-<a name="l00623"></a>00623
-<a name="l00624"></a>00624 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00634"></a>00634 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00635"></a>00635 <span class="keywordtype">int</span> irplib_wlxcorr_plot_solution(
-<a name="l00636"></a>00636 <span class="keyword">const</span> cpl_polynomial * init,
-<a name="l00637"></a>00637 <span class="keyword">const</span> cpl_polynomial * comp,
-<a name="l00638"></a>00638 <span class="keyword">const</span> cpl_polynomial * sol,
-<a name="l00639"></a>00639 <span class="keywordtype">int</span> pix_start,
-<a name="l00640"></a>00640 <span class="keywordtype">int</span> pix_stop)
-<a name="l00641"></a>00641 {
-<a name="l00642"></a>00642 <span class="keywordtype">int</span> nsamples, nplots ;
-<a name="l00643"></a>00643 cpl_vector ** vectors ;
-<a name="l00644"></a>00644 cpl_bivector * bivector ;
-<a name="l00645"></a>00645 <span class="keywordtype">double</span> diff ;
-<a name="l00646"></a>00646 <span class="keywordtype">int</span> i ;
-<a name="l00647"></a>00647
-<a name="l00648"></a>00648 <span class="comment">/* Test entries */</span>
-<a name="l00649"></a>00649 <span class="keywordflow">if</span> (init == NULL || comp == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00650"></a>00650
-<a name="l00651"></a>00651 <span class="comment">/* Initialise */</span>
-<a name="l00652"></a>00652 nsamples = pix_stop - pix_start + 1 ;
-<a name="l00653"></a>00653 <span class="keywordflow">if</span> (sol != NULL) nplots = 3 ;
-<a name="l00654"></a>00654 <span class="keywordflow">else</span> nplots = 2 ;
-<a name="l00655"></a>00655
-<a name="l00656"></a>00656 <span class="comment">/* Create vectors */</span>
-<a name="l00657"></a>00657 vectors = cpl_malloc((nplots+1)*<span class="keyword">sizeof</span>(cpl_vector*)) ;
-<a name="l00658"></a>00658 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) vectors[i] = cpl_vector_new(nsamples) ;
-<a name="l00659"></a>00659
-<a name="l00660"></a>00660 <span class="comment">/* First plot with the lambda/pixel relation */</span>
-<a name="l00661"></a>00661 <span class="comment">/* Fill vectors */</span>
-<a name="l00662"></a>00662 <span class="keywordflow">for</span> (i=0 ; i<nsamples ; i++) {
-<a name="l00663"></a>00663 cpl_vector_set(vectors[0], i, pix_start+i) ;
-<a name="l00664"></a>00664 cpl_vector_set(vectors[1], i,
-<a name="l00665"></a>00665 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
-<a name="l00666"></a>00666 cpl_vector_set(vectors[2], i,
-<a name="l00667"></a>00667 cpl_polynomial_eval_1d(comp, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
-<a name="l00668"></a>00668 <span class="keywordflow">if</span> (sol != NULL)
-<a name="l00669"></a>00669 cpl_vector_set(vectors[3], i,
-<a name="l00670"></a>00670 cpl_polynomial_eval_1d(sol, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
-<a name="l00671"></a>00671 }
+<a name="l00620"></a>00620
+<a name="l00621"></a>00621 <span class="keywordflow">for</span> (i=ihwidth ; i<nsamples-ihwidth ; i++) {
+<a name="l00622"></a>00622 psmoothe[i] = praw[i] * psymm[0];
+<a name="l00623"></a>00623 <span class="keywordflow">for</span> (j=1 ; j<=ihwidth ; j++)
+<a name="l00624"></a>00624 psmoothe[i] += (praw[i-j]+praw[i+j]) * psymm[j];
+<a name="l00625"></a>00625 }
+<a name="l00626"></a>00626 <span class="keywordflow">for</span> (i=nsamples-ihwidth ; i<nsamples ; i++) {
+<a name="l00627"></a>00627 psmoothe[i] = praw[i] * psymm[0];
+<a name="l00628"></a>00628 <span class="keywordflow">for</span> (j=1 ; j<=ihwidth ; j++) {
+<a name="l00629"></a>00629 <span class="keyword">const</span> <span class="keywordtype">int</span> k = i+j > nsamples-1 ? nsamples - 1 : i+j;
+<a name="l00630"></a>00630 psmoothe[i] += (praw[k]+praw[i-j]) * psymm[j];
+<a name="l00631"></a>00631 }
+<a name="l00632"></a>00632 }
+<a name="l00633"></a>00633 cpl_vector_delete(raw) ;
+<a name="l00634"></a>00634 <span class="keywordflow">return</span> 0 ;
+<a name="l00635"></a>00635 }
+<a name="l00636"></a>00636
+<a name="l00637"></a>00637 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00647"></a>00647 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00648"></a>00648 <span class="keywordtype">int</span> irplib_wlxcorr_plot_solution(
+<a name="l00649"></a>00649 <span class="keyword">const</span> cpl_polynomial * init,
+<a name="l00650"></a>00650 <span class="keyword">const</span> cpl_polynomial * comp,
+<a name="l00651"></a>00651 <span class="keyword">const</span> cpl_polynomial * sol,
+<a name="l00652"></a>00652 <span class="keywordtype">int</span> pix_start,
+<a name="l00653"></a>00653 <span class="keywordtype">int</span> pix_stop)
+<a name="l00654"></a>00654 {
+<a name="l00655"></a>00655 <span class="keywordtype">int</span> nsamples, nplots ;
+<a name="l00656"></a>00656 cpl_vector ** vectors ;
+<a name="l00657"></a>00657 cpl_bivector * bivector ;
+<a name="l00658"></a>00658 <span class="keywordtype">double</span> diff ;
+<a name="l00659"></a>00659 <span class="keywordtype">int</span> i ;
+<a name="l00660"></a>00660
+<a name="l00661"></a>00661 <span class="comment">/* Test entries */</span>
+<a name="l00662"></a>00662 <span class="keywordflow">if</span> (init == NULL || comp == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l00663"></a>00663
+<a name="l00664"></a>00664 <span class="comment">/* Initialise */</span>
+<a name="l00665"></a>00665 nsamples = pix_stop - pix_start + 1 ;
+<a name="l00666"></a>00666 <span class="keywordflow">if</span> (sol != NULL) nplots = 3 ;
+<a name="l00667"></a>00667 <span class="keywordflow">else</span> nplots = 2 ;
+<a name="l00668"></a>00668
+<a name="l00669"></a>00669 <span class="comment">/* Create vectors */</span>
+<a name="l00670"></a>00670 vectors = cpl_malloc((nplots+1)*<span class="keyword">sizeof</span>(cpl_vector*)) ;
+<a name="l00671"></a>00671 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) vectors[i] = cpl_vector_new(nsamples) ;
<a name="l00672"></a>00672
-<a name="l00673"></a>00673 <span class="comment">/* Plot */</span>
-<a name="l00674"></a>00674 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Position (pixels)';"</span>,
-<a name="l00675"></a>00675 <span class="stringliteral">"t '1-Initial / 2-Computed / 3-Solution' w lines"</span>,
-<a name="l00676"></a>00676 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, nplots+1);
-<a name="l00677"></a>00677
-<a name="l00678"></a>00678 <span class="comment">/* Free vectors */</span>
-<a name="l00679"></a>00679 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) cpl_vector_delete(vectors[i]) ;
-<a name="l00680"></a>00680 cpl_free(vectors) ;
-<a name="l00681"></a>00681
-<a name="l00682"></a>00682 <span class="comment">/* Allocate vectors */</span>
-<a name="l00683"></a>00683 nplots -- ;
-<a name="l00684"></a>00684 vectors = cpl_malloc((nplots+1)*<span class="keyword">sizeof</span>(cpl_vector*)) ;
-<a name="l00685"></a>00685 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) vectors[i] = cpl_vector_new(nsamples) ;
-<a name="l00686"></a>00686
-<a name="l00687"></a>00687 <span class="comment">/* Second plot with the delta-lambda/pixel relation */</span>
-<a name="l00688"></a>00688 <span class="comment">/* Fill vectors */</span>
-<a name="l00689"></a>00689 <span class="keywordflow">for</span> (i=0 ; i<nsamples ; i++) {
-<a name="l00690"></a>00690 cpl_vector_set(vectors[0], i, pix_start+i) ;
-<a name="l00691"></a>00691 diff = cpl_polynomial_eval_1d(comp, (<span class="keywordtype">double</span>)(pix_start+i), NULL) -
-<a name="l00692"></a>00692 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL) ;
-<a name="l00693"></a>00693 cpl_vector_set(vectors[1], i, diff) ;
-<a name="l00694"></a>00694 <span class="keywordflow">if</span> (sol != NULL) {
-<a name="l00695"></a>00695 diff = cpl_polynomial_eval_1d(sol, (<span class="keywordtype">double</span>)(pix_start+i), NULL) -
-<a name="l00696"></a>00696 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL) ;
-<a name="l00697"></a>00697 cpl_vector_set(vectors[2], i, diff) ;
-<a name="l00698"></a>00698 }
-<a name="l00699"></a>00699 }
-<a name="l00700"></a>00700
-<a name="l00701"></a>00701 <span class="comment">/* Plot */</span>
-<a name="l00702"></a>00702 <span class="keywordflow">if</span> (sol == NULL) {
-<a name="l00703"></a>00703 bivector = cpl_bivector_wrap_vectors(vectors[0], vectors[1]) ;
-<a name="l00704"></a>00704 cpl_plot_bivector(
-<a name="l00705"></a>00705 <span class="stringliteral">"set grid;set xlabel 'Position (pixels)';set ylabel 'Wavelength difference';"</span>,
-<a name="l00706"></a>00706 <span class="stringliteral">"t 'Computed-Initial wavelenth' w lines"</span>, <span class="stringliteral">""</span>, bivector);
-<a name="l00707"></a>00707 cpl_bivector_unwrap_vectors(bivector) ;
-<a name="l00708"></a>00708 } <span class="keywordflow">else</span> {
-<a name="l00709"></a>00709 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Position (pixels)';"</span>,
-<a name="l00710"></a>00710 <span class="stringliteral">"t '1-Computed - Initial / 2--Solution - Initial' w lines"</span>,
-<a name="l00711"></a>00711 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, nplots+1);
+<a name="l00673"></a>00673 <span class="comment">/* First plot with the lambda/pixel relation */</span>
+<a name="l00674"></a>00674 <span class="comment">/* Fill vectors */</span>
+<a name="l00675"></a>00675 <span class="keywordflow">for</span> (i=0 ; i<nsamples ; i++) {
+<a name="l00676"></a>00676 cpl_vector_set(vectors[0], i, pix_start+i) ;
+<a name="l00677"></a>00677 cpl_vector_set(vectors[1], i,
+<a name="l00678"></a>00678 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
+<a name="l00679"></a>00679 cpl_vector_set(vectors[2], i,
+<a name="l00680"></a>00680 cpl_polynomial_eval_1d(comp, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
+<a name="l00681"></a>00681 <span class="keywordflow">if</span> (sol != NULL)
+<a name="l00682"></a>00682 cpl_vector_set(vectors[3], i,
+<a name="l00683"></a>00683 cpl_polynomial_eval_1d(sol, (<span class="keywordtype">double</span>)(pix_start+i), NULL)) ;
+<a name="l00684"></a>00684 }
+<a name="l00685"></a>00685
+<a name="l00686"></a>00686 <span class="comment">/* Plot */</span>
+<a name="l00687"></a>00687 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Position (pixels)';"</span>,
+<a name="l00688"></a>00688 <span class="stringliteral">"t '1-Initial / 2-Computed / 3-Solution' w lines"</span>,
+<a name="l00689"></a>00689 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, nplots+1);
+<a name="l00690"></a>00690
+<a name="l00691"></a>00691 <span class="comment">/* Free vectors */</span>
+<a name="l00692"></a>00692 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) cpl_vector_delete(vectors[i]) ;
+<a name="l00693"></a>00693 cpl_free(vectors) ;
+<a name="l00694"></a>00694
+<a name="l00695"></a>00695 <span class="comment">/* Allocate vectors */</span>
+<a name="l00696"></a>00696 nplots -- ;
+<a name="l00697"></a>00697 vectors = cpl_malloc((nplots+1)*<span class="keyword">sizeof</span>(cpl_vector*)) ;
+<a name="l00698"></a>00698 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) vectors[i] = cpl_vector_new(nsamples) ;
+<a name="l00699"></a>00699
+<a name="l00700"></a>00700 <span class="comment">/* Second plot with the delta-lambda/pixel relation */</span>
+<a name="l00701"></a>00701 <span class="comment">/* Fill vectors */</span>
+<a name="l00702"></a>00702 <span class="keywordflow">for</span> (i=0 ; i<nsamples ; i++) {
+<a name="l00703"></a>00703 cpl_vector_set(vectors[0], i, pix_start+i) ;
+<a name="l00704"></a>00704 diff = cpl_polynomial_eval_1d(comp, (<span class="keywordtype">double</span>)(pix_start+i), NULL) -
+<a name="l00705"></a>00705 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL) ;
+<a name="l00706"></a>00706 cpl_vector_set(vectors[1], i, diff) ;
+<a name="l00707"></a>00707 <span class="keywordflow">if</span> (sol != NULL) {
+<a name="l00708"></a>00708 diff = cpl_polynomial_eval_1d(sol, (<span class="keywordtype">double</span>)(pix_start+i), NULL) -
+<a name="l00709"></a>00709 cpl_polynomial_eval_1d(init, (<span class="keywordtype">double</span>)(pix_start+i), NULL) ;
+<a name="l00710"></a>00710 cpl_vector_set(vectors[2], i, diff) ;
+<a name="l00711"></a>00711 }
<a name="l00712"></a>00712 }
-<a name="l00713"></a>00713
-<a name="l00714"></a>00714 <span class="comment">/* Free vectors */</span>
-<a name="l00715"></a>00715 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) cpl_vector_delete(vectors[i]) ;
-<a name="l00716"></a>00716 cpl_free(vectors) ;
-<a name="l00717"></a>00717
-<a name="l00718"></a>00718 <span class="comment">/* Return */</span>
-<a name="l00719"></a>00719 <span class="keywordflow">return</span> 0 ;
-<a name="l00720"></a>00720 }
-<a name="l00721"></a>00721
-<a name="l00722"></a>00722 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00729"></a>00729 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00730"></a>00730 <span class="keywordtype">int</span> irplib_wlxcorr_plot_spc_table(
-<a name="l00731"></a>00731 <span class="keyword">const</span> cpl_table * spc_table,
-<a name="l00732"></a>00732 <span class="keyword">const</span> <span class="keywordtype">char</span> * title)
-<a name="l00733"></a>00733 {
-<a name="l00734"></a>00734 <span class="keywordtype">char</span> title_loc[1024] ;
-<a name="l00735"></a>00735 cpl_vector ** vectors ;
-<a name="l00736"></a>00736 cpl_vector ** sub_vectors ;
-<a name="l00737"></a>00737 cpl_vector * tmp_vec ;
-<a name="l00738"></a>00738 <span class="keywordtype">int</span> nsamples ;
-<a name="l00739"></a>00739 <span class="keywordtype">double</span> max, mean1, mean3 ;
-<a name="l00740"></a>00740 <span class="keywordtype">int</span> start_ind, stop_ind, nblines, hsize_pix ;
-<a name="l00741"></a>00741 <span class="keywordtype">int</span> i, j ;
-<a name="l00742"></a>00742
-<a name="l00743"></a>00743 <span class="comment">/* Test entries */</span>
-<a name="l00744"></a>00744 <span class="keywordflow">if</span> (spc_table == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00745"></a>00745
-<a name="l00746"></a>00746 <span class="comment">/* Initialise */</span>
-<a name="l00747"></a>00747 nsamples = cpl_table_get_nrow(spc_table) ;
-<a name="l00748"></a>00748 hsize_pix = 10 ;
-<a name="l00749"></a>00749 nblines = 0 ;
-<a name="l00750"></a>00750 sprintf(title_loc,
-<a name="l00751"></a>00751 <span class="stringliteral">"t '%s - 1-Initial catalog/2-Corrected catalog/3-Observed' w lines"</span>,
-<a name="l00752"></a>00752 title) ;
-<a name="l00753"></a>00753 title_loc[1023] = (char)0 ;
-<a name="l00754"></a>00754
-<a name="l00755"></a>00755 vectors = cpl_malloc(4*<span class="keyword">sizeof</span>(cpl_vector*)) ;
-<a name="l00756"></a>00756 vectors[0] = cpl_vector_wrap(nsamples,
-<a name="l00757"></a>00757 cpl_table_get_data_double((cpl_table*)spc_table,
-<a name="l00758"></a>00758 IRPLIB_WLXCORR_COL_WAVELENGTH));
-<a name="l00759"></a>00759 vectors[1] = cpl_vector_wrap(nsamples,
-<a name="l00760"></a>00760 cpl_table_get_data_double((cpl_table*)spc_table,
-<a name="l00761"></a>00761 IRPLIB_WLXCORR_COL_CAT_INIT));
-<a name="l00762"></a>00762 vectors[2] = cpl_vector_wrap(nsamples,
-<a name="l00763"></a>00763 cpl_table_get_data_double((cpl_table*)spc_table,
-<a name="l00764"></a>00764 IRPLIB_WLXCORR_COL_CAT_FINAL));
-<a name="l00765"></a>00765 vectors[3] = cpl_vector_wrap(nsamples,
-<a name="l00766"></a>00766 cpl_table_get_data_double((cpl_table*)spc_table,
-<a name="l00767"></a>00767 IRPLIB_WLXCORR_COL_OBS)) ;
-<a name="l00768"></a>00768
-<a name="l00769"></a>00769 <span class="comment">/* Scale the signal for a bettre display */</span>
-<a name="l00770"></a>00770 mean1 = cpl_vector_get_mean(vectors[1]) ;
-<a name="l00771"></a>00771 mean3 = cpl_vector_get_mean(vectors[3]) ;
-<a name="l00772"></a>00772 <span class="keywordflow">if</span> (fabs(mean3) > 1)
-<a name="l00773"></a>00773 cpl_vector_multiply_scalar(vectors[3], fabs(mean1/mean3)) ;
-<a name="l00774"></a>00774
-<a name="l00775"></a>00775 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';"</span>, title_loc,
-<a name="l00776"></a>00776 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, 4);
-<a name="l00777"></a>00777
-<a name="l00778"></a>00778 <span class="comment">/* Unscale the signal */</span>
-<a name="l00779"></a>00779 <span class="keywordflow">if</span> (fabs(mean3) > 1)
-<a name="l00780"></a>00780 cpl_vector_multiply_scalar(vectors[3], mean3/mean1) ;
-<a name="l00781"></a>00781
-<a name="l00782"></a>00782 <span class="comment">/* Loop on the brightest lines and zoom on them */</span>
-<a name="l00783"></a>00783 sprintf(title_loc,
-<a name="l00784"></a>00784 <span class="stringliteral">"t '%s - 1-Initial catalog/2-Corrected catalog/3-Observed (ZOOMED)' w lines"</span>,
-<a name="l00785"></a>00785 title) ;
-<a name="l00786"></a>00786 title_loc[1023] = (char)0 ;
-<a name="l00787"></a>00787 tmp_vec = cpl_vector_duplicate(vectors[2]) ;
-<a name="l00788"></a>00788 <span class="keywordflow">for</span> (i=0 ; i<nblines ; i++) {
-<a name="l00789"></a>00789 <span class="comment">/* Find the brightest line */</span>
-<a name="l00790"></a>00790 <span class="keywordflow">if</span> ((max = cpl_vector_get_max(tmp_vec)) <= 0.0) break ;
-<a name="l00791"></a>00791 <span class="keywordflow">for</span> (j=0 ; i<nsamples ; j++) {
-<a name="l00792"></a>00792 <span class="keywordflow">if</span> (cpl_vector_get(tmp_vec, j) == max) break ;
-<a name="l00793"></a>00793 }
-<a name="l00794"></a>00794 <span class="keywordflow">if</span> (j-hsize_pix < 0) start_ind = 0 ;
-<a name="l00795"></a>00795 <span class="keywordflow">else</span> start_ind = j-hsize_pix ;
-<a name="l00796"></a>00796 <span class="keywordflow">if</span> (j+hsize_pix > nsamples-1) stop_ind = nsamples-1 ;
-<a name="l00797"></a>00797 <span class="keywordflow">else</span> stop_ind = j+hsize_pix ;
-<a name="l00798"></a>00798 <span class="keywordflow">for</span> (j=start_ind ; j<=stop_ind ; j++) cpl_vector_set(tmp_vec, j, 0.0) ;
-<a name="l00799"></a>00799
-<a name="l00800"></a>00800 sub_vectors = cpl_malloc(4*<span class="keyword">sizeof</span>(cpl_vector*)) ;
-<a name="l00801"></a>00801 sub_vectors[0]=cpl_vector_extract(vectors[0],start_ind,stop_ind,1);
-<a name="l00802"></a>00802 sub_vectors[1]=cpl_vector_extract(vectors[1],start_ind,stop_ind,1);
-<a name="l00803"></a>00803 sub_vectors[2]=cpl_vector_extract(vectors[2],start_ind,stop_ind,1);
-<a name="l00804"></a>00804 sub_vectors[3]=cpl_vector_extract(vectors[3],start_ind,stop_ind,1);
-<a name="l00805"></a>00805
-<a name="l00806"></a>00806 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';"</span>, title_loc,
-<a name="l00807"></a>00807 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)sub_vectors, 4);
-<a name="l00808"></a>00808
-<a name="l00809"></a>00809 cpl_vector_delete(sub_vectors[0]) ;
-<a name="l00810"></a>00810 cpl_vector_delete(sub_vectors[1]) ;
-<a name="l00811"></a>00811 cpl_vector_delete(sub_vectors[2]) ;
-<a name="l00812"></a>00812 cpl_vector_delete(sub_vectors[3]) ;
-<a name="l00813"></a>00813 cpl_free(sub_vectors) ;
-<a name="l00814"></a>00814 }
-<a name="l00815"></a>00815 cpl_vector_delete(tmp_vec) ;
-<a name="l00816"></a>00816
-<a name="l00817"></a>00817 cpl_vector_unwrap(vectors[0]) ;
-<a name="l00818"></a>00818 cpl_vector_unwrap(vectors[1]) ;
-<a name="l00819"></a>00819 cpl_vector_unwrap(vectors[2]) ;
-<a name="l00820"></a>00820 cpl_vector_unwrap(vectors[3]) ;
-<a name="l00821"></a>00821 cpl_free(vectors) ;
-<a name="l00822"></a>00822
-<a name="l00823"></a>00823 <span class="keywordflow">return</span> 0 ;
-<a name="l00824"></a>00824 }
-<a name="l00825"></a>00825
-<a name="l00826"></a>00826 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00834"></a>00834 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00835"></a>00835 <span class="keywordtype">int</span> irplib_wlxcorr_catalog_plot(
-<a name="l00836"></a>00836 <span class="keyword">const</span> cpl_bivector * cat,
-<a name="l00837"></a>00837 <span class="keywordtype">double</span> wmin,
-<a name="l00838"></a>00838 <span class="keywordtype">double</span> wmax)
-<a name="l00839"></a>00839 {
-<a name="l00840"></a>00840 <span class="keywordtype">int</span> start, stop ;
-<a name="l00841"></a>00841 cpl_bivector * subcat ;
-<a name="l00842"></a>00842 cpl_vector * subcat_x ;
-<a name="l00843"></a>00843 cpl_vector * subcat_y ;
-<a name="l00844"></a>00844 <span class="keyword">const</span> <span class="keywordtype">double</span> * pwave ;
-<a name="l00845"></a>00845 <span class="keywordtype">int</span> nvals, nvals_tot ;
-<a name="l00846"></a>00846 <span class="keywordtype">int</span> i ;
+<a name="l00713"></a>00713
+<a name="l00714"></a>00714 <span class="comment">/* Plot */</span>
+<a name="l00715"></a>00715 <span class="keywordflow">if</span> (sol == NULL) {
+<a name="l00716"></a>00716 bivector = cpl_bivector_wrap_vectors(vectors[0], vectors[1]) ;
+<a name="l00717"></a>00717 cpl_plot_bivector(
+<a name="l00718"></a>00718 <span class="stringliteral">"set grid;set xlabel 'Position (pixels)';set ylabel 'Wavelength difference';"</span>,
+<a name="l00719"></a>00719 <span class="stringliteral">"t 'Computed-Initial wavelenth' w lines"</span>, <span class="stringliteral">""</span>, bivector);
+<a name="l00720"></a>00720 cpl_bivector_unwrap_vectors(bivector) ;
+<a name="l00721"></a>00721 } <span class="keywordflow">else</span> {
+<a name="l00722"></a>00722 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Position (pixels)';"</span>,
+<a name="l00723"></a>00723 <span class="stringliteral">"t '1-Computed - Initial / 2--Solution - Initial' w lines"</span>,
+<a name="l00724"></a>00724 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, nplots+1);
+<a name="l00725"></a>00725 }
+<a name="l00726"></a>00726
+<a name="l00727"></a>00727 <span class="comment">/* Free vectors */</span>
+<a name="l00728"></a>00728 <span class="keywordflow">for</span> (i=0 ; i<nplots+1 ; i++) cpl_vector_delete(vectors[i]) ;
+<a name="l00729"></a>00729 cpl_free(vectors) ;
+<a name="l00730"></a>00730
+<a name="l00731"></a>00731 <span class="comment">/* Return */</span>
+<a name="l00732"></a>00732 <span class="keywordflow">return</span> 0 ;
+<a name="l00733"></a>00733 }
+<a name="l00734"></a>00734
+<a name="l00735"></a>00735 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00746"></a>00746 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00747"></a>00747 <span class="keywordtype">int</span> irplib_wlxcorr_plot_spc_table(
+<a name="l00748"></a>00748 <span class="keyword">const</span> cpl_table * spc_table,
+<a name="l00749"></a>00749 <span class="keyword">const</span> <span class="keywordtype">char</span> * title,
+<a name="l00750"></a>00750 <span class="keywordtype">int</span> first_plotted_line,
+<a name="l00751"></a>00751 <span class="keywordtype">int</span> last_plotted_line)
+<a name="l00752"></a>00752 {
+<a name="l00753"></a>00753 <span class="keywordtype">char</span> title_loc[1024] ;
+<a name="l00754"></a>00754 cpl_vector ** vectors ;
+<a name="l00755"></a>00755 cpl_vector ** sub_vectors ;
+<a name="l00756"></a>00756 cpl_vector * tmp_vec ;
+<a name="l00757"></a>00757 <span class="keywordtype">int</span> nsamples ;
+<a name="l00758"></a>00758 <span class="keywordtype">double</span> max, mean1, mean3 ;
+<a name="l00759"></a>00759 <span class="keywordtype">int</span> start_ind, stop_ind, hsize_pix ;
+<a name="l00760"></a>00760 <span class="keywordtype">int</span> i, j ;
+<a name="l00761"></a>00761
+<a name="l00762"></a>00762 <span class="comment">/* Test entries */</span>
+<a name="l00763"></a>00763 <span class="keywordflow">if</span> (first_plotted_line > last_plotted_line) <span class="keywordflow">return</span> -1 ;
+<a name="l00764"></a>00764 <span class="keywordflow">if</span> (spc_table == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l00765"></a>00765
+<a name="l00766"></a>00766 <span class="comment">/* Initialise */</span>
+<a name="l00767"></a>00767 nsamples = cpl_table_get_nrow(spc_table) ;
+<a name="l00768"></a>00768 hsize_pix = 10 ;
+<a name="l00769"></a>00769
+<a name="l00770"></a>00770 sprintf(title_loc,
+<a name="l00771"></a>00771 <span class="stringliteral">"t '%s - 1-Initial catalog/2-Corrected catalog/3-Observed' w lines"</span>,
+<a name="l00772"></a>00772 title) ;
+<a name="l00773"></a>00773 title_loc[1023] = (char)0 ;
+<a name="l00774"></a>00774
+<a name="l00775"></a>00775 vectors = cpl_malloc(4*<span class="keyword">sizeof</span>(cpl_vector*)) ;
+<a name="l00776"></a>00776 vectors[0] = cpl_vector_wrap(nsamples,
+<a name="l00777"></a>00777 cpl_table_get_data_double((cpl_table*)spc_table,
+<a name="l00778"></a>00778 IRPLIB_WLXCORR_COL_WAVELENGTH));
+<a name="l00779"></a>00779 vectors[1] = cpl_vector_wrap(nsamples,
+<a name="l00780"></a>00780 cpl_table_get_data_double((cpl_table*)spc_table,
+<a name="l00781"></a>00781 IRPLIB_WLXCORR_COL_CAT_INIT));
+<a name="l00782"></a>00782 vectors[2] = cpl_vector_wrap(nsamples,
+<a name="l00783"></a>00783 cpl_table_get_data_double((cpl_table*)spc_table,
+<a name="l00784"></a>00784 IRPLIB_WLXCORR_COL_CAT_FINAL));
+<a name="l00785"></a>00785 vectors[3] = cpl_vector_wrap(nsamples,
+<a name="l00786"></a>00786 cpl_table_get_data_double((cpl_table*)spc_table,
+<a name="l00787"></a>00787 IRPLIB_WLXCORR_COL_OBS)) ;
+<a name="l00788"></a>00788
+<a name="l00789"></a>00789 <span class="comment">/* Scale the signal for a bettre display */</span>
+<a name="l00790"></a>00790 mean1 = cpl_vector_get_mean(vectors[1]) ;
+<a name="l00791"></a>00791 mean3 = cpl_vector_get_mean(vectors[3]) ;
+<a name="l00792"></a>00792 <span class="keywordflow">if</span> (fabs(mean3) > 1)
+<a name="l00793"></a>00793 cpl_vector_multiply_scalar(vectors[3], fabs(mean1/mean3)) ;
+<a name="l00794"></a>00794
+<a name="l00795"></a>00795 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';"</span>, title_loc,
+<a name="l00796"></a>00796 <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)vectors, 4);
+<a name="l00797"></a>00797
+<a name="l00798"></a>00798 <span class="comment">/* Unscale the signal */</span>
+<a name="l00799"></a>00799 <span class="keywordflow">if</span> (fabs(mean3) > 1)
+<a name="l00800"></a>00800 cpl_vector_multiply_scalar(vectors[3], mean3/mean1) ;
+<a name="l00801"></a>00801
+<a name="l00802"></a>00802 <span class="comment">/* Loop on the brightest lines and zoom on them */</span>
+<a name="l00803"></a>00803 sprintf(title_loc,
+<a name="l00804"></a>00804 <span class="stringliteral">"t '%s - 1-Initial catalog/2-Corrected catalog/3-Observed (ZOOMED)' w lines"</span>,
+<a name="l00805"></a>00805 title) ;
+<a name="l00806"></a>00806 title_loc[1023] = (char)0 ;
+<a name="l00807"></a>00807 tmp_vec = cpl_vector_duplicate(vectors[2]) ;
+<a name="l00808"></a>00808 <span class="keywordflow">for</span> (i=0 ; i<last_plotted_line ; i++) {
+<a name="l00809"></a>00809 <span class="comment">/* Find the brightest line */</span>
+<a name="l00810"></a>00810 <span class="keywordflow">if</span> ((max = cpl_vector_get_max(tmp_vec)) <= 0.0) break ;
+<a name="l00811"></a>00811 <span class="keywordflow">for</span> (j=0 ; j<nsamples ; j++) {
+<a name="l00812"></a>00812 <span class="keywordflow">if</span> (cpl_vector_get(tmp_vec, j) == max) break ;
+<a name="l00813"></a>00813 }
+<a name="l00814"></a>00814 <span class="keywordflow">if</span> (j-hsize_pix < 0) start_ind = 0 ;
+<a name="l00815"></a>00815 <span class="keywordflow">else</span> start_ind = j-hsize_pix ;
+<a name="l00816"></a>00816 <span class="keywordflow">if</span> (j+hsize_pix > nsamples-1) stop_ind = nsamples-1 ;
+<a name="l00817"></a>00817 <span class="keywordflow">else</span> stop_ind = j+hsize_pix ;
+<a name="l00818"></a>00818 <span class="keywordflow">for</span> (j=start_ind ; j<=stop_ind ; j++) cpl_vector_set(tmp_vec, j, 0.0) ;
+<a name="l00819"></a>00819
+<a name="l00820"></a>00820 <span class="keywordflow">if</span> (i+1 >= first_plotted_line) {
+<a name="l00821"></a>00821 sub_vectors = cpl_malloc(4*<span class="keyword">sizeof</span>(cpl_vector*)) ;
+<a name="l00822"></a>00822 sub_vectors[0]=cpl_vector_extract(vectors[0],start_ind,stop_ind,1);
+<a name="l00823"></a>00823 sub_vectors[1]=cpl_vector_extract(vectors[1],start_ind,stop_ind,1);
+<a name="l00824"></a>00824 sub_vectors[2]=cpl_vector_extract(vectors[2],start_ind,stop_ind,1);
+<a name="l00825"></a>00825 sub_vectors[3]=cpl_vector_extract(vectors[3],start_ind,stop_ind,1);
+<a name="l00826"></a>00826
+<a name="l00827"></a>00827 cpl_plot_vectors(<span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';"</span>,
+<a name="l00828"></a>00828 title_loc, <span class="stringliteral">""</span>, (<span class="keyword">const</span> cpl_vector **)sub_vectors, 4);
+<a name="l00829"></a>00829
+<a name="l00830"></a>00830 cpl_vector_delete(sub_vectors[0]) ;
+<a name="l00831"></a>00831 cpl_vector_delete(sub_vectors[1]) ;
+<a name="l00832"></a>00832 cpl_vector_delete(sub_vectors[2]) ;
+<a name="l00833"></a>00833 cpl_vector_delete(sub_vectors[3]) ;
+<a name="l00834"></a>00834 cpl_free(sub_vectors) ;
+<a name="l00835"></a>00835 }
+<a name="l00836"></a>00836 }
+<a name="l00837"></a>00837 cpl_vector_delete(tmp_vec) ;
+<a name="l00838"></a>00838
+<a name="l00839"></a>00839 cpl_vector_unwrap(vectors[0]) ;
+<a name="l00840"></a>00840 cpl_vector_unwrap(vectors[1]) ;
+<a name="l00841"></a>00841 cpl_vector_unwrap(vectors[2]) ;
+<a name="l00842"></a>00842 cpl_vector_unwrap(vectors[3]) ;
+<a name="l00843"></a>00843 cpl_free(vectors) ;
+<a name="l00844"></a>00844
+<a name="l00845"></a>00845 <span class="keywordflow">return</span> 0 ;
+<a name="l00846"></a>00846 }
<a name="l00847"></a>00847
-<a name="l00848"></a>00848 <span class="comment">/* Test entries */</span>
-<a name="l00849"></a>00849 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l00850"></a>00850 <span class="keywordflow">if</span> (wmax <= wmin) <span class="keywordflow">return</span> -1 ;
-<a name="l00851"></a>00851
-<a name="l00852"></a>00852 <span class="comment">/* Initialise */</span>
-<a name="l00853"></a>00853 nvals_tot = cpl_bivector_get_size(cat) ;
-<a name="l00854"></a>00854
-<a name="l00855"></a>00855 <span class="comment">/* Count the nb of values */</span>
-<a name="l00856"></a>00856 pwave = cpl_bivector_get_x_data_const(cat) ;
-<a name="l00857"></a>00857 <span class="keywordflow">if</span> (pwave[0] >= wmin) start = 0 ;
-<a name="l00858"></a>00858 <span class="keywordflow">else</span> start = -1 ;
-<a name="l00859"></a>00859 <span class="keywordflow">if</span> (pwave[nvals_tot-1] <= wmax) stop = nvals_tot-1 ;
-<a name="l00860"></a>00860 <span class="keywordflow">else</span> stop = -1 ;
-<a name="l00861"></a>00861 i=0 ;
-<a name="l00862"></a>00862 <span class="keywordflow">while</span> ((pwave[i] < wmin) && (i<nvals_tot-1)) i++ ;
-<a name="l00863"></a>00863 start = i ;
-<a name="l00864"></a>00864 i= nvals_tot-1 ;
-<a name="l00865"></a>00865 <span class="keywordflow">while</span> ((pwave[i] > wmax) && (i>0)) i-- ;
-<a name="l00866"></a>00866 stop = i ;
-<a name="l00867"></a>00867
-<a name="l00868"></a>00868 <span class="keywordflow">if</span> (start>=stop) {
-<a name="l00869"></a>00869 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot plot the catalog"</span>) ;
-<a name="l00870"></a>00870 <span class="keywordflow">return</span> -1 ;
-<a name="l00871"></a>00871 }
-<a name="l00872"></a>00872 nvals = start - stop + 1 ;
+<a name="l00848"></a>00848 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00856"></a>00856 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00857"></a>00857 <span class="keywordtype">int</span> irplib_wlxcorr_catalog_plot(
+<a name="l00858"></a>00858 <span class="keyword">const</span> cpl_bivector * cat,
+<a name="l00859"></a>00859 <span class="keywordtype">double</span> wmin,
+<a name="l00860"></a>00860 <span class="keywordtype">double</span> wmax)
+<a name="l00861"></a>00861 {
+<a name="l00862"></a>00862 <span class="keywordtype">int</span> start, stop ;
+<a name="l00863"></a>00863 cpl_bivector * subcat ;
+<a name="l00864"></a>00864 cpl_vector * subcat_x ;
+<a name="l00865"></a>00865 cpl_vector * subcat_y ;
+<a name="l00866"></a>00866 <span class="keyword">const</span> <span class="keywordtype">double</span> * pwave ;
+<a name="l00867"></a>00867 <span class="keywordtype">int</span> nvals, nvals_tot ;
+<a name="l00868"></a>00868 <span class="keywordtype">int</span> i ;
+<a name="l00869"></a>00869
+<a name="l00870"></a>00870 <span class="comment">/* Test entries */</span>
+<a name="l00871"></a>00871 <span class="keywordflow">if</span> (cat == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l00872"></a>00872 <span class="keywordflow">if</span> (wmax <= wmin) <span class="keywordflow">return</span> -1 ;
<a name="l00873"></a>00873
-<a name="l00874"></a>00874 <span class="comment">/* Create the bivector to plot */</span>
-<a name="l00875"></a>00875 subcat_x = cpl_vector_extract(cpl_bivector_get_x_const(cat),start,stop, 1) ;
-<a name="l00876"></a>00876 subcat_y = cpl_vector_extract(cpl_bivector_get_y_const(cat),start,stop, 1) ;
-<a name="l00877"></a>00877 subcat = cpl_bivector_wrap_vectors(subcat_x, subcat_y) ;
-<a name="l00878"></a>00878
-<a name="l00879"></a>00879 <span class="comment">/* Plot */</span>
-<a name="l00880"></a>00880 <span class="keywordflow">if</span> (nvals > 500) {
-<a name="l00881"></a>00881 cpl_plot_bivector(
-<a name="l00882"></a>00882 <span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';set ylabel 'Emission';"</span>,
-<a name="l00883"></a>00883 <span class="stringliteral">"t 'Catalog Spectrum' w lines"</span>, <span class="stringliteral">""</span>, subcat);
-<a name="l00884"></a>00884 } <span class="keywordflow">else</span> {
-<a name="l00885"></a>00885 cpl_plot_bivector(
-<a name="l00886"></a>00886 <span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';set ylabel 'Emission';"</span>,
-<a name="l00887"></a>00887 <span class="stringliteral">"t 'Catalog Spectrum' w impulses"</span>, <span class="stringliteral">""</span>, subcat);
-<a name="l00888"></a>00888 }
-<a name="l00889"></a>00889 cpl_bivector_unwrap_vectors(subcat) ;
-<a name="l00890"></a>00890 cpl_vector_delete(subcat_x) ;
-<a name="l00891"></a>00891 cpl_vector_delete(subcat_y) ;
-<a name="l00892"></a>00892
-<a name="l00893"></a>00893 <span class="keywordflow">return</span> 0 ;
-<a name="l00894"></a>00894 }
-<a name="l00895"></a>00895
-<a name="l00898"></a>00898 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00913"></a>00913 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00914"></a>00914 <span class="keyword">static</span> <span class="keywordtype">void</span> irplib_wlxcorr_estimate(cpl_vector * vxc,
-<a name="l00915"></a>00915 cpl_vector * model,
-<a name="l00916"></a>00916 <span class="keyword">const</span> cpl_vector * spectrum,
-<a name="l00917"></a>00917 <span class="keyword">const</span> cpl_bivector * lines_catalog,
-<a name="l00918"></a>00918 <span class="keyword">const</span> cpl_vector * conv_kernel,
-<a name="l00919"></a>00919 <span class="keyword">const</span> cpl_polynomial * poly_candi,
-<a name="l00920"></a>00920 <span class="keywordtype">double</span> slitw,
-<a name="l00921"></a>00921 <span class="keywordtype">double</span> fwhm)
-<a name="l00922"></a>00922 {
-<a name="l00923"></a>00923 cpl_errorstate prestate = cpl_errorstate_get();
-<a name="l00924"></a>00924 <span class="keyword">const</span> <span class="keywordtype">int</span> hsize = cpl_vector_get_size(vxc) / 2;
-<a name="l00925"></a>00925
-<a name="l00926"></a>00926 <span class="keywordflow">if</span> (conv_kernel != NULL) {
-<a name="l00927"></a>00927 irplib_wlcalib_fill_spectrum(model, lines_catalog, conv_kernel,
-<a name="l00928"></a>00928 poly_candi, hsize);
-<a name="l00929"></a>00929 } <span class="keywordflow">else</span> {
-<a name="l00930"></a>00930 <span class="keyword">const</span> <span class="keywordtype">double</span> xtrunc = 0.5 * slitw + 5.0 * fwhm * CPL_MATH_SIG_FWHM;
-<a name="l00931"></a>00931
-<a name="l00932"></a>00932 <a class="code" href="group__irplib__wavecal.html#ga0db5e24244f88b41627d5a385af81b33" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(model, NULL, NULL, poly_candi,
-<a name="l00933"></a>00933 lines_catalog, slitw, fwhm,
-<a name="l00934"></a>00934 xtrunc, 0, CPL_FALSE, CPL_FALSE,
-<a name="l00935"></a>00935 NULL);
-<a name="l00936"></a>00936 }
-<a name="l00937"></a>00937
-<a name="l00938"></a>00938 <span class="keywordflow">if</span> (cpl_errorstate_is_equal(prestate))
-<a name="l00939"></a>00939 cpl_vector_correlate(vxc, model, spectrum);
-<a name="l00940"></a>00940
-<a name="l00941"></a>00941 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
-<a name="l00942"></a>00942 cpl_vector_fill(vxc, 0.0);
-<a name="l00943"></a>00943
-<a name="l00944"></a>00944 <span class="comment">/* cpl_errorstate_dump(prestate, CPL_FALSE, NULL); */</span>
-<a name="l00945"></a>00945 cpl_errorstate_set(prestate);
-<a name="l00946"></a>00946
-<a name="l00947"></a>00947 }
-<a name="l00948"></a>00948
-<a name="l00949"></a>00949 <span class="keywordflow">return</span>;
-<a name="l00950"></a>00950 }
-<a name="l00951"></a>00951
-<a name="l00952"></a>00952
-<a name="l00953"></a>00953 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00963"></a>00963 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00964"></a>00964 <span class="keyword">static</span> cpl_boolean irplib_wlcalib_is_lines(<span class="keyword">const</span> cpl_vector * wavelengths,
-<a name="l00965"></a>00965 <span class="keyword">const</span> cpl_polynomial * disp1d,
-<a name="l00966"></a>00966 <span class="keywordtype">int</span> spec_sz,
-<a name="l00967"></a>00967 <span class="keywordtype">double</span> tol)
-<a name="l00968"></a>00968 {
-<a name="l00969"></a>00969 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_vector_get_size(wavelengths);
-<a name="l00970"></a>00970 <span class="comment">/* The dispersion on the detector center */</span>
-<a name="l00971"></a>00971 <span class="keyword">const</span> <span class="keywordtype">double</span> dispersion = cpl_polynomial_eval_1d_diff(disp1d,
-<a name="l00972"></a>00972 0.5 * spec_sz + 1.0,
-<a name="l00973"></a>00973 0.5 * spec_sz,
-<a name="l00974"></a>00974 NULL);
-<a name="l00975"></a>00975 <span class="keyword">const</span> <span class="keywordtype">double</span> range = cpl_vector_get(wavelengths, nlines-1)
-<a name="l00976"></a>00976 - cpl_vector_get(wavelengths, 0);
-<a name="l00977"></a>00977
-<a name="l00978"></a>00978 cpl_ensure(wavelengths != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
-<a name="l00979"></a>00979 cpl_ensure(disp1d != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
-<a name="l00980"></a>00980 cpl_ensure(cpl_polynomial_get_dimension(disp1d) == 1,
-<a name="l00981"></a>00981 CPL_ERROR_ILLEGAL_INPUT, CPL_FALSE);
-<a name="l00982"></a>00982 cpl_ensure(range > 0.0, CPL_ERROR_ILLEGAL_INPUT, CPL_FALSE);
-<a name="l00983"></a>00983
-<a name="l00984"></a>00984 <span class="keywordflow">return</span> nlines * fabs(dispersion) <= tol * fabs(range) ? CPL_TRUE
-<a name="l00985"></a>00985 : CPL_FALSE;
-<a name="l00986"></a>00986
-<a name="l00987"></a>00987 }
-<a name="l00988"></a>00988
-<a name="l00989"></a>00989 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01004"></a>01004 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01005"></a>01005 <span class="keyword">static</span>
-<a name="l01006"></a>01006 cpl_error_code irplib_wlcalib_fill_spectrum(cpl_vector * <span class="keyword">self</span>,
-<a name="l01007"></a>01007 <span class="keyword">const</span> cpl_bivector * lines_catalog,
-<a name="l01008"></a>01008 <span class="keyword">const</span> cpl_vector * conv_kernel,
-<a name="l01009"></a>01009 <span class="keyword">const</span> cpl_polynomial * poly,
-<a name="l01010"></a>01010 <span class="keywordtype">int</span> search_hs)
-<a name="l01011"></a>01011 {
-<a name="l01012"></a>01012
-<a name="l01013"></a>01013
-<a name="l01014"></a>01014 <span class="keyword">const</span> <span class="keywordtype">int</span> size = cpl_vector_get_size(<span class="keyword">self</span>);
-<a name="l01015"></a>01015 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_bivector_get_size(lines_catalog);
-<a name="l01016"></a>01016 <span class="keyword">const</span> cpl_vector * xlines = cpl_bivector_get_x_const(lines_catalog);
-<a name="l01017"></a>01017 <span class="keyword">const</span> <span class="keywordtype">double</span> * dxlines = cpl_vector_get_data_const(xlines);
-<a name="l01018"></a>01018 cpl_bivector * sub_cat ;
-<a name="l01019"></a>01019 cpl_vector * sub_cat_x;
-<a name="l01020"></a>01020 cpl_vector * sub_cat_y;
-<a name="l01021"></a>01021 cpl_vector * wl_limits;
-<a name="l01022"></a>01022 <span class="keywordtype">double</span> wave_min, wave_max;
-<a name="l01023"></a>01023 <span class="keywordtype">int</span> wave_min_id, wave_max_id;
-<a name="l01024"></a>01024 <span class="keywordtype">int</span> nsub;
-<a name="l01025"></a>01025 <span class="keywordtype">int</span> error;
-<a name="l01026"></a>01026
-<a name="l01027"></a>01027 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01028"></a>01028 cpl_ensure_code(lines_catalog != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01029"></a>01029 cpl_ensure_code(conv_kernel != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01030"></a>01030 cpl_ensure_code(poly != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01031"></a>01031 cpl_ensure_code(size > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01032"></a>01032
-<a name="l01033"></a>01033
-<a name="l01034"></a>01034 <span class="comment">/* Resample the spectrum */</span>
-<a name="l01035"></a>01035 wl_limits = cpl_vector_new(size + 1);
-<a name="l01036"></a>01036 cpl_vector_fill_polynomial(wl_limits, poly, 0.5 - search_hs, 1);
-<a name="l01037"></a>01037
-<a name="l01038"></a>01038 <span class="comment">/* The spectrum wavelength bounds */</span>
-<a name="l01039"></a>01039 wave_min = cpl_vector_get(wl_limits, 0);
-<a name="l01040"></a>01040 wave_max = cpl_vector_get(wl_limits, size);
-<a name="l01041"></a>01041
-<a name="l01042"></a>01042 <span class="comment">/* Find the 1st line */</span>
-<a name="l01043"></a>01043 wave_min_id = cpl_vector_find(xlines, wave_min);
-<a name="l01044"></a>01044 <span class="comment">/* The first line must be less than or equal to wave_min */</span>
-<a name="l01045"></a>01045 <span class="keywordflow">if</span> (dxlines[wave_min_id] > wave_min) wave_min_id--;
-<a name="l01046"></a>01046
-<a name="l01047"></a>01047 <span class="keywordflow">if</span> (wave_min_id < 0) {
-<a name="l01048"></a>01048 cpl_vector_delete(wl_limits);
-<a name="l01049"></a>01049 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l01050"></a>01050 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
-<a name="l01051"></a>01051 <span class="stringliteral">"catalogue only has lines above %g"</span>,
-<a name="l01052"></a>01052 nlines, wave_min);
-<a name="l01053"></a>01053 }
+<a name="l00874"></a>00874 <span class="comment">/* Initialise */</span>
+<a name="l00875"></a>00875 nvals_tot = cpl_bivector_get_size(cat) ;
+<a name="l00876"></a>00876
+<a name="l00877"></a>00877 <span class="comment">/* Count the nb of values */</span>
+<a name="l00878"></a>00878 pwave = cpl_bivector_get_x_data_const(cat) ;
+<a name="l00879"></a>00879 <span class="keywordflow">if</span> (pwave[0] >= wmin) start = 0 ;
+<a name="l00880"></a>00880 <span class="keywordflow">else</span> start = -1 ;
+<a name="l00881"></a>00881 <span class="keywordflow">if</span> (pwave[nvals_tot-1] <= wmax) stop = nvals_tot-1 ;
+<a name="l00882"></a>00882 <span class="keywordflow">else</span> stop = -1 ;
+<a name="l00883"></a>00883 i=0 ;
+<a name="l00884"></a>00884 <span class="keywordflow">while</span> ((pwave[i] < wmin) && (i<nvals_tot-1)) i++ ;
+<a name="l00885"></a>00885 start = i ;
+<a name="l00886"></a>00886 i= nvals_tot-1 ;
+<a name="l00887"></a>00887 <span class="keywordflow">while</span> ((pwave[i] > wmax) && (i>0)) i-- ;
+<a name="l00888"></a>00888 stop = i ;
+<a name="l00889"></a>00889
+<a name="l00890"></a>00890 <span class="keywordflow">if</span> (start>=stop) {
+<a name="l00891"></a>00891 cpl_msg_error(cpl_func, <span class="stringliteral">"Cannot plot the catalog"</span>) ;
+<a name="l00892"></a>00892 <span class="keywordflow">return</span> -1 ;
+<a name="l00893"></a>00893 }
+<a name="l00894"></a>00894 nvals = start - stop + 1 ;
+<a name="l00895"></a>00895
+<a name="l00896"></a>00896 <span class="comment">/* Create the bivector to plot */</span>
+<a name="l00897"></a>00897 subcat_x = cpl_vector_extract(cpl_bivector_get_x_const(cat),start,stop, 1) ;
+<a name="l00898"></a>00898 subcat_y = cpl_vector_extract(cpl_bivector_get_y_const(cat),start,stop, 1) ;
+<a name="l00899"></a>00899 subcat = cpl_bivector_wrap_vectors(subcat_x, subcat_y) ;
+<a name="l00900"></a>00900
+<a name="l00901"></a>00901 <span class="comment">/* Plot */</span>
+<a name="l00902"></a>00902 <span class="keywordflow">if</span> (nvals > 500) {
+<a name="l00903"></a>00903 cpl_plot_bivector(
+<a name="l00904"></a>00904 <span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';set ylabel 'Emission';"</span>,
+<a name="l00905"></a>00905 <span class="stringliteral">"t 'Catalog Spectrum' w lines"</span>, <span class="stringliteral">""</span>, subcat);
+<a name="l00906"></a>00906 } <span class="keywordflow">else</span> {
+<a name="l00907"></a>00907 cpl_plot_bivector(
+<a name="l00908"></a>00908 <span class="stringliteral">"set grid;set xlabel 'Wavelength (nm)';set ylabel 'Emission';"</span>,
+<a name="l00909"></a>00909 <span class="stringliteral">"t 'Catalog Spectrum' w impulses"</span>, <span class="stringliteral">""</span>, subcat);
+<a name="l00910"></a>00910 }
+<a name="l00911"></a>00911 cpl_bivector_unwrap_vectors(subcat) ;
+<a name="l00912"></a>00912 cpl_vector_delete(subcat_x) ;
+<a name="l00913"></a>00913 cpl_vector_delete(subcat_y) ;
+<a name="l00914"></a>00914
+<a name="l00915"></a>00915 <span class="keywordflow">return</span> 0 ;
+<a name="l00916"></a>00916 }
+<a name="l00917"></a>00917
+<a name="l00920"></a>00920 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00935"></a>00935 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00936"></a>00936 <span class="keyword">static</span> <span class="keywordtype">void</span> irplib_wlxcorr_estimate(cpl_vector * vxc,
+<a name="l00937"></a>00937 cpl_vector * model,
+<a name="l00938"></a>00938 <span class="keyword">const</span> cpl_vector * spectrum,
+<a name="l00939"></a>00939 <span class="keyword">const</span> cpl_bivector * lines_catalog,
+<a name="l00940"></a>00940 <span class="keyword">const</span> cpl_vector * conv_kernel,
+<a name="l00941"></a>00941 <span class="keyword">const</span> cpl_polynomial * poly_candi,
+<a name="l00942"></a>00942 <span class="keywordtype">double</span> slitw,
+<a name="l00943"></a>00943 <span class="keywordtype">double</span> fwhm)
+<a name="l00944"></a>00944 {
+<a name="l00945"></a>00945 cpl_errorstate prestate = cpl_errorstate_get();
+<a name="l00946"></a>00946 <span class="keyword">const</span> <span class="keywordtype">int</span> hsize = cpl_vector_get_size(vxc) / 2;
+<a name="l00947"></a>00947
+<a name="l00948"></a>00948 <span class="keywordflow">if</span> (conv_kernel != NULL) {
+<a name="l00949"></a>00949 irplib_wlcalib_fill_spectrum(model, lines_catalog, conv_kernel,
+<a name="l00950"></a>00950 poly_candi, hsize);
+<a name="l00951"></a>00951 } <span class="keywordflow">else</span> {
+<a name="l00952"></a>00952 <span class="keyword">const</span> <span class="keywordtype">double</span> xtrunc = 0.5 * slitw + 5.0 * fwhm * CPL_MATH_SIG_FWHM;
+<a name="l00953"></a>00953
+<a name="l00954"></a>00954 <a class="code" href="group__irplib__wavecal.html#ga8a65755ca17c9fa0b69ceb128f544761" title="Generate a 1D spectrum from (arc) lines and a dispersion relation.">irplib_vector_fill_line_spectrum_model</a>(model, NULL, NULL, poly_candi,
+<a name="l00955"></a>00955 lines_catalog, slitw, fwhm,
+<a name="l00956"></a>00956 xtrunc, 0, CPL_FALSE, CPL_FALSE,
+<a name="l00957"></a>00957 NULL);
+<a name="l00958"></a>00958 }
+<a name="l00959"></a>00959
+<a name="l00960"></a>00960 <span class="keywordflow">if</span> (cpl_errorstate_is_equal(prestate))
+<a name="l00961"></a>00961 cpl_vector_correlate(vxc, model, spectrum);
+<a name="l00962"></a>00962
+<a name="l00963"></a>00963 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(prestate)) {
+<a name="l00964"></a>00964 cpl_vector_fill(vxc, 0.0);
+<a name="l00965"></a>00965
+<a name="l00966"></a>00966 <span class="comment">/* cpl_errorstate_dump(prestate, CPL_FALSE, NULL); */</span>
+<a name="l00967"></a>00967 cpl_errorstate_set(prestate);
+<a name="l00968"></a>00968
+<a name="l00969"></a>00969 }
+<a name="l00970"></a>00970
+<a name="l00971"></a>00971 <span class="keywordflow">return</span>;
+<a name="l00972"></a>00972 }
+<a name="l00973"></a>00973
+<a name="l00974"></a>00974
+<a name="l00975"></a>00975 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00985"></a>00985 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00986"></a>00986 <span class="keyword">static</span> cpl_boolean irplib_wlcalib_is_lines(<span class="keyword">const</span> cpl_vector * wavelengths,
+<a name="l00987"></a>00987 <span class="keyword">const</span> cpl_polynomial * disp1d,
+<a name="l00988"></a>00988 <span class="keywordtype">int</span> spec_sz,
+<a name="l00989"></a>00989 <span class="keywordtype">double</span> tol)
+<a name="l00990"></a>00990 {
+<a name="l00991"></a>00991 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_vector_get_size(wavelengths);
+<a name="l00992"></a>00992 <span class="comment">/* The dispersion on the detector center */</span>
+<a name="l00993"></a>00993 <span class="keyword">const</span> <span class="keywordtype">double</span> dispersion = cpl_polynomial_eval_1d_diff(disp1d,
+<a name="l00994"></a>00994 0.5 * spec_sz + 1.0,
+<a name="l00995"></a>00995 0.5 * spec_sz,
+<a name="l00996"></a>00996 NULL);
+<a name="l00997"></a>00997 <span class="keyword">const</span> <span class="keywordtype">double</span> range = cpl_vector_get(wavelengths, nlines-1)
+<a name="l00998"></a>00998 - cpl_vector_get(wavelengths, 0);
+<a name="l00999"></a>00999
+<a name="l01000"></a>01000 cpl_ensure(wavelengths != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
+<a name="l01001"></a>01001 cpl_ensure(disp1d != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
+<a name="l01002"></a>01002 cpl_ensure(cpl_polynomial_get_dimension(disp1d) == 1,
+<a name="l01003"></a>01003 CPL_ERROR_ILLEGAL_INPUT, CPL_FALSE);
+<a name="l01004"></a>01004 cpl_ensure(range > 0.0, CPL_ERROR_ILLEGAL_INPUT, CPL_FALSE);
+<a name="l01005"></a>01005
+<a name="l01006"></a>01006 <span class="keywordflow">return</span> nlines * fabs(dispersion) <= tol * fabs(range) ? CPL_TRUE
+<a name="l01007"></a>01007 : CPL_FALSE;
+<a name="l01008"></a>01008
+<a name="l01009"></a>01009 }
+<a name="l01010"></a>01010
+<a name="l01011"></a>01011 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01026"></a>01026 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01027"></a>01027 <span class="keyword">static</span>
+<a name="l01028"></a>01028 cpl_error_code irplib_wlcalib_fill_spectrum(cpl_vector * <span class="keyword">self</span>,
+<a name="l01029"></a>01029 <span class="keyword">const</span> cpl_bivector * lines_catalog,
+<a name="l01030"></a>01030 <span class="keyword">const</span> cpl_vector * conv_kernel,
+<a name="l01031"></a>01031 <span class="keyword">const</span> cpl_polynomial * poly,
+<a name="l01032"></a>01032 <span class="keywordtype">int</span> search_hs)
+<a name="l01033"></a>01033 {
+<a name="l01034"></a>01034
+<a name="l01035"></a>01035
+<a name="l01036"></a>01036 <span class="keyword">const</span> <span class="keywordtype">int</span> size = cpl_vector_get_size(<span class="keyword">self</span>);
+<a name="l01037"></a>01037 <span class="keyword">const</span> <span class="keywordtype">int</span> nlines = cpl_bivector_get_size(lines_catalog);
+<a name="l01038"></a>01038 <span class="keyword">const</span> cpl_vector * xlines = cpl_bivector_get_x_const(lines_catalog);
+<a name="l01039"></a>01039 <span class="keyword">const</span> <span class="keywordtype">double</span> * dxlines = cpl_vector_get_data_const(xlines);
+<a name="l01040"></a>01040 cpl_bivector * sub_cat ;
+<a name="l01041"></a>01041 cpl_vector * sub_cat_x;
+<a name="l01042"></a>01042 cpl_vector * sub_cat_y;
+<a name="l01043"></a>01043 cpl_vector * wl_limits;
+<a name="l01044"></a>01044 <span class="keywordtype">double</span> wave_min, wave_max;
+<a name="l01045"></a>01045 <span class="keywordtype">int</span> wave_min_id, wave_max_id;
+<a name="l01046"></a>01046 <span class="keywordtype">int</span> nsub;
+<a name="l01047"></a>01047 <span class="keywordtype">int</span> error;
+<a name="l01048"></a>01048
+<a name="l01049"></a>01049 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01050"></a>01050 cpl_ensure_code(lines_catalog != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01051"></a>01051 cpl_ensure_code(conv_kernel != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01052"></a>01052 cpl_ensure_code(poly != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01053"></a>01053 cpl_ensure_code(size > 0, CPL_ERROR_ILLEGAL_INPUT);
<a name="l01054"></a>01054
-<a name="l01055"></a>01055 <span class="comment">/* Find the last line */</span>
-<a name="l01056"></a>01056 wave_max_id = cpl_vector_find(xlines, wave_max);
-<a name="l01057"></a>01057 <span class="comment">/* The last line must be greater than or equal to wave_max */</span>
-<a name="l01058"></a>01058 <span class="keywordflow">if</span> (dxlines[wave_max_id] < wave_max) wave_max_id++;
+<a name="l01055"></a>01055
+<a name="l01056"></a>01056 <span class="comment">/* Resample the spectrum */</span>
+<a name="l01057"></a>01057 wl_limits = cpl_vector_new(size + 1);
+<a name="l01058"></a>01058 cpl_vector_fill_polynomial(wl_limits, poly, 0.5 - search_hs, 1);
<a name="l01059"></a>01059
-<a name="l01060"></a>01060 <span class="keywordflow">if</span> (wave_max_id == nlines) {
-<a name="l01061"></a>01061 cpl_vector_delete(wl_limits);
-<a name="l01062"></a>01062 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
-<a name="l01063"></a>01063 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
-<a name="l01064"></a>01064 <span class="stringliteral">"catalogue only has lines below %g"</span>,
-<a name="l01065"></a>01065 nlines, wave_max);
-<a name="l01066"></a>01066 }
-<a name="l01067"></a>01067
-<a name="l01068"></a>01068 <span class="comment">/* Checking the wavelength range at this point via the indices also</span>
-<a name="l01069"></a>01069 <span class="comment"> verifies that they were not found using non-increasing wavelengths */</span>
-<a name="l01070"></a>01070 nsub = 1 + wave_max_id - wave_min_id;
-<a name="l01071"></a>01071 cpl_ensure_code(nsub > 1, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01072"></a>01072
-<a name="l01073"></a>01073 <span class="comment">/* Wrap a new bivector around the relevant part of the catalog */</span>
-<a name="l01074"></a>01074 <span class="comment">/* The data is _not_ modified */</span>
-<a name="l01075"></a>01075 sub_cat_x = cpl_vector_wrap(nsub, wave_min_id + (<span class="keywordtype">double</span>*)dxlines);
-<a name="l01076"></a>01076 sub_cat_y = cpl_vector_wrap(nsub, wave_min_id + (<span class="keywordtype">double</span>*)
-<a name="l01077"></a>01077 cpl_bivector_get_y_data_const(lines_catalog));
-<a name="l01078"></a>01078 sub_cat = cpl_bivector_wrap_vectors(sub_cat_x, sub_cat_y);
-<a name="l01079"></a>01079
-<a name="l01080"></a>01080 <span class="comment">/* High resolution catalog */</span>
-<a name="l01081"></a>01081 error = irplib_wlxcorr_signal_resample(<span class="keyword">self</span>, wl_limits, sub_cat);
-<a name="l01082"></a>01082
-<a name="l01083"></a>01083 cpl_vector_delete(wl_limits);
-<a name="l01084"></a>01084 cpl_bivector_unwrap_vectors(sub_cat);
-<a name="l01085"></a>01085 (void)cpl_vector_unwrap(sub_cat_x);
-<a name="l01086"></a>01086 (void)cpl_vector_unwrap(sub_cat_y);
-<a name="l01087"></a>01087
-<a name="l01088"></a>01088 cpl_ensure_code(!error, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01060"></a>01060 <span class="comment">/* The spectrum wavelength bounds */</span>
+<a name="l01061"></a>01061 wave_min = cpl_vector_get(wl_limits, 0);
+<a name="l01062"></a>01062 wave_max = cpl_vector_get(wl_limits, size);
+<a name="l01063"></a>01063
+<a name="l01064"></a>01064 <span class="comment">/* Find the 1st line */</span>
+<a name="l01065"></a>01065 wave_min_id = cpl_vector_find(xlines, wave_min);
+<a name="l01066"></a>01066 <span class="comment">/* The first line must be less than or equal to wave_min */</span>
+<a name="l01067"></a>01067 <span class="keywordflow">if</span> (dxlines[wave_min_id] > wave_min) wave_min_id--;
+<a name="l01068"></a>01068
+<a name="l01069"></a>01069 <span class="keywordflow">if</span> (wave_min_id < 0) {
+<a name="l01070"></a>01070 cpl_vector_delete(wl_limits);
+<a name="l01071"></a>01071 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l01072"></a>01072 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
+<a name="l01073"></a>01073 <span class="stringliteral">"catalogue only has lines above %g"</span>,
+<a name="l01074"></a>01074 nlines, wave_min);
+<a name="l01075"></a>01075 }
+<a name="l01076"></a>01076
+<a name="l01077"></a>01077 <span class="comment">/* Find the last line */</span>
+<a name="l01078"></a>01078 wave_max_id = cpl_vector_find(xlines, wave_max);
+<a name="l01079"></a>01079 <span class="comment">/* The last line must be greater than or equal to wave_max */</span>
+<a name="l01080"></a>01080 <span class="keywordflow">if</span> (dxlines[wave_max_id] < wave_max) wave_max_id++;
+<a name="l01081"></a>01081
+<a name="l01082"></a>01082 <span class="keywordflow">if</span> (wave_max_id == nlines) {
+<a name="l01083"></a>01083 cpl_vector_delete(wl_limits);
+<a name="l01084"></a>01084 <span class="keywordflow">return</span> cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+<a name="l01085"></a>01085 __FILE__, __LINE__, <span class="stringliteral">"The %d-line "</span>
+<a name="l01086"></a>01086 <span class="stringliteral">"catalogue only has lines below %g"</span>,
+<a name="l01087"></a>01087 nlines, wave_max);
+<a name="l01088"></a>01088 }
<a name="l01089"></a>01089
-<a name="l01090"></a>01090 <span class="comment">/* Smooth the instrument resolution */</span>
-<a name="l01091"></a>01091 cpl_ensure_code(!irplib_wlxcorr_convolve(<span class="keyword">self</span>, conv_kernel),
-<a name="l01092"></a>01092 cpl_error_get_code());
-<a name="l01093"></a>01093
-<a name="l01094"></a>01094 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01095"></a>01095 }
-<a name="l01096"></a>01096
-<a name="l01097"></a>01097
-<a name="l01098"></a>01098 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01108"></a>01108 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01109"></a>01109 <span class="keyword">static</span> <span class="keywordtype">int</span> irplib_wlxcorr_signal_resample(
-<a name="l01110"></a>01110 cpl_vector * resampled,
-<a name="l01111"></a>01111 <span class="keyword">const</span> cpl_vector * xbounds,
-<a name="l01112"></a>01112 <span class="keyword">const</span> cpl_bivector * hires)
-<a name="l01113"></a>01113 {
-<a name="l01114"></a>01114 <span class="keyword">const</span> <span class="keywordtype">int</span> hrsize = cpl_bivector_get_size(hires);
-<a name="l01115"></a>01115 <span class="keyword">const</span> cpl_vector* xhires ;
-<a name="l01116"></a>01116 <span class="keyword">const</span> cpl_vector* yhires ;
-<a name="l01117"></a>01117 <span class="keyword">const</span> <span class="keywordtype">double</span> * pxhires ;
-<a name="l01118"></a>01118 <span class="keyword">const</span> <span class="keywordtype">double</span> * pyhires ;
-<a name="l01119"></a>01119 <span class="keyword">const</span> <span class="keywordtype">double</span> * pxbounds ;
-<a name="l01120"></a>01120 cpl_vector * ybounds ;
-<a name="l01121"></a>01121 cpl_bivector * boundary ;
-<a name="l01122"></a>01122 <span class="keywordtype">double</span> * pybounds ;
-<a name="l01123"></a>01123 <span class="keywordtype">double</span> * presampled ;
-<a name="l01124"></a>01124 <span class="keywordtype">int</span> nsamples ;
-<a name="l01125"></a>01125 <span class="keywordtype">int</span> i, itt ;
-<a name="l01126"></a>01126
-<a name="l01127"></a>01127 <span class="comment">/* Test entries */</span>
-<a name="l01128"></a>01128 <span class="keywordflow">if</span> ((!resampled) || (!xbounds) || (!hires)) <span class="keywordflow">return</span> -1 ;
-<a name="l01129"></a>01129
-<a name="l01130"></a>01130 <span class="comment">/* Initialise */</span>
-<a name="l01131"></a>01131 nsamples = cpl_vector_get_size(resampled) ;
-<a name="l01132"></a>01132
-<a name="l01133"></a>01133 <span class="comment">/* Initialise */</span>
-<a name="l01134"></a>01134 presampled = cpl_vector_get_data(resampled) ;
-<a name="l01135"></a>01135 pxbounds = cpl_vector_get_data_const(xbounds) ;
-<a name="l01136"></a>01136 xhires = cpl_bivector_get_x_const(hires) ;
-<a name="l01137"></a>01137 yhires = cpl_bivector_get_y_const(hires) ;
-<a name="l01138"></a>01138 pxhires = cpl_vector_get_data_const(xhires) ;
-<a name="l01139"></a>01139 pyhires = cpl_vector_get_data_const(yhires) ;
-<a name="l01140"></a>01140
-<a name="l01141"></a>01141 <span class="comment">/* Create a new vector */</span>
-<a name="l01142"></a>01142 ybounds = cpl_vector_new(cpl_vector_get_size(xbounds)) ;
-<a name="l01143"></a>01143 boundary = cpl_bivector_wrap_vectors((cpl_vector*)xbounds,ybounds) ;
-<a name="l01144"></a>01144 pybounds = cpl_vector_get_data(ybounds) ;
-<a name="l01145"></a>01145
-<a name="l01146"></a>01146 <span class="comment">/* Test entries */</span>
-<a name="l01147"></a>01147 <span class="keywordflow">if</span> (cpl_bivector_get_size(boundary) != nsamples + 1) {
-<a name="l01148"></a>01148 cpl_bivector_unwrap_vectors(boundary) ;
-<a name="l01149"></a>01149 cpl_vector_delete(ybounds) ;
-<a name="l01150"></a>01150 <span class="keywordflow">return</span> -1 ;
-<a name="l01151"></a>01151 }
-<a name="l01152"></a>01152
-<a name="l01153"></a>01153 <span class="comment">/* Get the ind */</span>
-<a name="l01154"></a>01154 itt = cpl_vector_find(xhires, pxbounds[0]);
-<a name="l01155"></a>01155
-<a name="l01156"></a>01156 <span class="comment">/* Interpolate the signal */</span>
-<a name="l01157"></a>01157 <span class="keywordflow">if</span> (cpl_bivector_interpolate_linear(boundary, hires)) {
-<a name="l01158"></a>01158 cpl_bivector_unwrap_vectors(boundary) ;
-<a name="l01159"></a>01159 cpl_vector_delete(ybounds) ;
-<a name="l01160"></a>01160 <span class="keywordflow">return</span> -1 ;
-<a name="l01161"></a>01161 }
-<a name="l01162"></a>01162
-<a name="l01163"></a>01163 <span class="comment">/* At this point itt most likely points to element just below</span>
-<a name="l01164"></a>01164 <span class="comment"> pxbounds[0] */</span>
-<a name="l01165"></a>01165 <span class="keywordflow">while</span> (pxhires[itt] < pxbounds[0]) itt++;
-<a name="l01166"></a>01166
-<a name="l01167"></a>01167 <span class="keywordflow">for</span> (i=0; i < nsamples; i++) {
-<a name="l01168"></a>01168 <span class="comment">/* The i'th signal is the weighted average of the two interpolated</span>
-<a name="l01169"></a>01169 <span class="comment"> signals at the pixel boundaries and those table signals in</span>
-<a name="l01170"></a>01170 <span class="comment"> between */</span>
-<a name="l01171"></a>01171
-<a name="l01172"></a>01172 <span class="keywordtype">double</span> xlow = pxbounds[i];
-<a name="l01173"></a>01173 <span class="keywordtype">double</span> x = pxhires[itt];
+<a name="l01090"></a>01090 <span class="comment">/* Checking the wavelength range at this point via the indices also</span>
+<a name="l01091"></a>01091 <span class="comment"> verifies that they were not found using non-increasing wavelengths */</span>
+<a name="l01092"></a>01092 nsub = 1 + wave_max_id - wave_min_id;
+<a name="l01093"></a>01093 cpl_ensure_code(nsub > 1, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01094"></a>01094
+<a name="l01095"></a>01095 <span class="comment">/* Wrap a new bivector around the relevant part of the catalog */</span>
+<a name="l01096"></a>01096 <span class="comment">/* The data is _not_ modified */</span>
+<a name="l01097"></a>01097 sub_cat_x = cpl_vector_wrap(nsub, wave_min_id + (<span class="keywordtype">double</span>*)dxlines);
+<a name="l01098"></a>01098 sub_cat_y = cpl_vector_wrap(nsub, wave_min_id + (<span class="keywordtype">double</span>*)
+<a name="l01099"></a>01099 cpl_bivector_get_y_data_const(lines_catalog));
+<a name="l01100"></a>01100 sub_cat = cpl_bivector_wrap_vectors(sub_cat_x, sub_cat_y);
+<a name="l01101"></a>01101
+<a name="l01102"></a>01102 <span class="comment">/* High resolution catalog */</span>
+<a name="l01103"></a>01103 error = irplib_wlxcorr_signal_resample(<span class="keyword">self</span>, wl_limits, sub_cat);
+<a name="l01104"></a>01104
+<a name="l01105"></a>01105 cpl_vector_delete(wl_limits);
+<a name="l01106"></a>01106 cpl_bivector_unwrap_vectors(sub_cat);
+<a name="l01107"></a>01107 (void)cpl_vector_unwrap(sub_cat_x);
+<a name="l01108"></a>01108 (void)cpl_vector_unwrap(sub_cat_y);
+<a name="l01109"></a>01109
+<a name="l01110"></a>01110 cpl_ensure_code(!error, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01111"></a>01111
+<a name="l01112"></a>01112 <span class="comment">/* Smooth the instrument resolution */</span>
+<a name="l01113"></a>01113 cpl_ensure_code(!irplib_wlxcorr_convolve(<span class="keyword">self</span>, conv_kernel),
+<a name="l01114"></a>01114 cpl_error_get_code());
+<a name="l01115"></a>01115
+<a name="l01116"></a>01116 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01117"></a>01117 }
+<a name="l01118"></a>01118
+<a name="l01119"></a>01119
+<a name="l01120"></a>01120 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01130"></a>01130 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01131"></a>01131 <span class="keyword">static</span> <span class="keywordtype">int</span> irplib_wlxcorr_signal_resample(
+<a name="l01132"></a>01132 cpl_vector * resampled,
+<a name="l01133"></a>01133 <span class="keyword">const</span> cpl_vector * xbounds,
+<a name="l01134"></a>01134 <span class="keyword">const</span> cpl_bivector * hires)
+<a name="l01135"></a>01135 {
+<a name="l01136"></a>01136 <span class="keyword">const</span> <span class="keywordtype">int</span> hrsize = cpl_bivector_get_size(hires);
+<a name="l01137"></a>01137 <span class="keyword">const</span> cpl_vector* xhires ;
+<a name="l01138"></a>01138 <span class="keyword">const</span> cpl_vector* yhires ;
+<a name="l01139"></a>01139 <span class="keyword">const</span> <span class="keywordtype">double</span> * pxhires ;
+<a name="l01140"></a>01140 <span class="keyword">const</span> <span class="keywordtype">double</span> * pyhires ;
+<a name="l01141"></a>01141 <span class="keyword">const</span> <span class="keywordtype">double</span> * pxbounds ;
+<a name="l01142"></a>01142 cpl_vector * ybounds ;
+<a name="l01143"></a>01143 cpl_bivector * boundary ;
+<a name="l01144"></a>01144 <span class="keywordtype">double</span> * pybounds ;
+<a name="l01145"></a>01145 <span class="keywordtype">double</span> * presampled ;
+<a name="l01146"></a>01146 <span class="keywordtype">int</span> nsamples ;
+<a name="l01147"></a>01147 <span class="keywordtype">int</span> i, itt ;
+<a name="l01148"></a>01148
+<a name="l01149"></a>01149 <span class="comment">/* Test entries */</span>
+<a name="l01150"></a>01150 <span class="keywordflow">if</span> ((!resampled) || (!xbounds) || (!hires)) <span class="keywordflow">return</span> -1 ;
+<a name="l01151"></a>01151
+<a name="l01152"></a>01152 <span class="comment">/* Initialise */</span>
+<a name="l01153"></a>01153 nsamples = cpl_vector_get_size(resampled) ;
+<a name="l01154"></a>01154
+<a name="l01155"></a>01155 <span class="comment">/* Initialise */</span>
+<a name="l01156"></a>01156 presampled = cpl_vector_get_data(resampled) ;
+<a name="l01157"></a>01157 pxbounds = cpl_vector_get_data_const(xbounds) ;
+<a name="l01158"></a>01158 xhires = cpl_bivector_get_x_const(hires) ;
+<a name="l01159"></a>01159 yhires = cpl_bivector_get_y_const(hires) ;
+<a name="l01160"></a>01160 pxhires = cpl_vector_get_data_const(xhires) ;
+<a name="l01161"></a>01161 pyhires = cpl_vector_get_data_const(yhires) ;
+<a name="l01162"></a>01162
+<a name="l01163"></a>01163 <span class="comment">/* Create a new vector */</span>
+<a name="l01164"></a>01164 ybounds = cpl_vector_new(cpl_vector_get_size(xbounds)) ;
+<a name="l01165"></a>01165 boundary = cpl_bivector_wrap_vectors((cpl_vector*)xbounds,ybounds) ;
+<a name="l01166"></a>01166 pybounds = cpl_vector_get_data(ybounds) ;
+<a name="l01167"></a>01167
+<a name="l01168"></a>01168 <span class="comment">/* Test entries */</span>
+<a name="l01169"></a>01169 <span class="keywordflow">if</span> (cpl_bivector_get_size(boundary) != nsamples + 1) {
+<a name="l01170"></a>01170 cpl_bivector_unwrap_vectors(boundary) ;
+<a name="l01171"></a>01171 cpl_vector_delete(ybounds) ;
+<a name="l01172"></a>01172 <span class="keywordflow">return</span> -1 ;
+<a name="l01173"></a>01173 }
<a name="l01174"></a>01174
-<a name="l01175"></a>01175 <span class="keywordflow">if</span> (x > pxbounds[i+1]) x = pxbounds[i+1];
-<a name="l01176"></a>01176 <span class="comment">/* Contribution from interpolated value at wavelength at lower pixel</span>
-<a name="l01177"></a>01177 <span class="comment"> boundary */</span>
-<a name="l01178"></a>01178 presampled[i] = pybounds[i] * (x - xlow);
-<a name="l01179"></a>01179
-<a name="l01180"></a>01180 <span class="comment">/* Contribution from table values in between pixel boundaries */</span>
-<a name="l01181"></a>01181 <span class="keywordflow">while</span> ((pxhires[itt] < pxbounds[i+1]) && (itt < hrsize)) {
-<a name="l01182"></a>01182 <span class="keyword">const</span> <span class="keywordtype">double</span> xprev = x;
-<a name="l01183"></a>01183 x = pxhires[itt+1];
-<a name="l01184"></a>01184 <span class="keywordflow">if</span> (x > pxbounds[i+1]) x = pxbounds[i+1];
-<a name="l01185"></a>01185 presampled[i] += pyhires[itt] * (x - xlow);
-<a name="l01186"></a>01186 xlow = xprev;
-<a name="l01187"></a>01187 itt++;
-<a name="l01188"></a>01188 }
-<a name="l01189"></a>01189
-<a name="l01190"></a>01190 <span class="comment">/* Contribution from interpolated value at wavelength at upper pixel</span>
-<a name="l01191"></a>01191 <span class="comment"> boundary */</span>
-<a name="l01192"></a>01192 presampled[i] += pybounds[i+1] * (pxbounds[i+1] - xlow);
+<a name="l01175"></a>01175 <span class="comment">/* Get the ind */</span>
+<a name="l01176"></a>01176 itt = cpl_vector_find(xhires, pxbounds[0]);
+<a name="l01177"></a>01177
+<a name="l01178"></a>01178 <span class="comment">/* Interpolate the signal */</span>
+<a name="l01179"></a>01179 <span class="keywordflow">if</span> (cpl_bivector_interpolate_linear(boundary, hires)) {
+<a name="l01180"></a>01180 cpl_bivector_unwrap_vectors(boundary) ;
+<a name="l01181"></a>01181 cpl_vector_delete(ybounds) ;
+<a name="l01182"></a>01182 <span class="keywordflow">return</span> -1 ;
+<a name="l01183"></a>01183 }
+<a name="l01184"></a>01184
+<a name="l01185"></a>01185 <span class="comment">/* At this point itt most likely points to element just below</span>
+<a name="l01186"></a>01186 <span class="comment"> pxbounds[0] */</span>
+<a name="l01187"></a>01187 <span class="keywordflow">while</span> (pxhires[itt] < pxbounds[0]) itt++;
+<a name="l01188"></a>01188
+<a name="l01189"></a>01189 <span class="keywordflow">for</span> (i=0; i < nsamples; i++) {
+<a name="l01190"></a>01190 <span class="comment">/* The i'th signal is the weighted average of the two interpolated</span>
+<a name="l01191"></a>01191 <span class="comment"> signals at the pixel boundaries and those table signals in</span>
+<a name="l01192"></a>01192 <span class="comment"> between */</span>
<a name="l01193"></a>01193
-<a name="l01194"></a>01194 <span class="comment">/* Compute average by dividing integral by length of pixel range</span>
-<a name="l01195"></a>01195 <span class="comment"> (the factor 2 comes from the contributions) */</span>
-<a name="l01196"></a>01196 presampled[i] /= 2 * (pxbounds[i+1] - pxbounds[i]);
-<a name="l01197"></a>01197 }
-<a name="l01198"></a>01198 cpl_bivector_unwrap_vectors(boundary) ;
-<a name="l01199"></a>01199 cpl_vector_delete(ybounds) ;
-<a name="l01200"></a>01200 <span class="keywordflow">return</span> 0 ;
-<a name="l01201"></a>01201 }
-<a name="l01202"></a>01202
-<a name="l01203"></a>01203
-<a name="l01204"></a>01204
-<a name="l01205"></a>01205 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01226"></a>01226 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01227"></a>01227 <span class="keyword">static</span> cpl_error_code cpl_vector_fill_lss_profile_symmetric(cpl_vector * <span class="keyword">self</span>,
-<a name="l01228"></a>01228 <span class="keywordtype">double</span> slitw,
-<a name="l01229"></a>01229 <span class="keywordtype">double</span> fwhm)
-<a name="l01230"></a>01230 {
-<a name="l01231"></a>01231
-<a name="l01232"></a>01232 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = fwhm * CPL_MATH_SIG_FWHM;
-<a name="l01233"></a>01233 <span class="keyword">const</span> <span class="keywordtype">int</span> n = cpl_vector_get_size(<span class="keyword">self</span>);
-<a name="l01234"></a>01234 <span class="keywordtype">int</span> i;
-<a name="l01235"></a>01235
-<a name="l01236"></a>01236
-<a name="l01237"></a>01237 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01238"></a>01238 cpl_ensure_code(slitw > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01239"></a>01239 cpl_ensure_code(fwhm > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01240"></a>01240
-<a name="l01241"></a>01241 <span class="comment">/* Cannot fail now */</span>
-<a name="l01242"></a>01242
-<a name="l01243"></a>01243 <span class="comment">/* Special case for i = 0 */</span>
-<a name="l01244"></a>01244 (void)cpl_vector_set(<span class="keyword">self</span>, 0,
-<a name="l01245"></a>01245 (<a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(0.5*slitw + 0.5, sigma) -
-<a name="l01246"></a>01246 <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(0.5*slitw - 0.5, sigma)) / slitw);
-<a name="l01247"></a>01247
-<a name="l01248"></a>01248 <span class="keywordflow">for</span> (i = 1; i < n; i++) {
-<a name="l01249"></a>01249 <span class="comment">/* FIXME: Reuse two irplib_erf_antideriv() calls from previous value */</span>
-<a name="l01250"></a>01250 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = i + 0.5*slitw + 0.5;
-<a name="l01251"></a>01251 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = i - 0.5*slitw + 0.5;
-<a name="l01252"></a>01252 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = i + 0.5*slitw - 0.5;
-<a name="l01253"></a>01253 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = i - 0.5*slitw - 0.5;
-<a name="l01254"></a>01254 <span class="keyword">const</span> <span class="keywordtype">double</span> val = 0.5/slitw *
-<a name="l01255"></a>01255 (<a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma) - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma) -
-<a name="l01256"></a>01256 <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma) + <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma));
-<a name="l01257"></a>01257 (void)cpl_vector_set(<span class="keyword">self</span>, i, val);
-<a name="l01258"></a>01258 }
-<a name="l01259"></a>01259
-<a name="l01260"></a>01260 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01261"></a>01261 }
+<a name="l01194"></a>01194 <span class="keywordtype">double</span> xlow = pxbounds[i];
+<a name="l01195"></a>01195 <span class="keywordtype">double</span> x = pxhires[itt];
+<a name="l01196"></a>01196
+<a name="l01197"></a>01197 <span class="keywordflow">if</span> (x > pxbounds[i+1]) x = pxbounds[i+1];
+<a name="l01198"></a>01198 <span class="comment">/* Contribution from interpolated value at wavelength at lower pixel</span>
+<a name="l01199"></a>01199 <span class="comment"> boundary */</span>
+<a name="l01200"></a>01200 presampled[i] = pybounds[i] * (x - xlow);
+<a name="l01201"></a>01201
+<a name="l01202"></a>01202 <span class="comment">/* Contribution from table values in between pixel boundaries */</span>
+<a name="l01203"></a>01203 <span class="keywordflow">while</span> ((pxhires[itt] < pxbounds[i+1]) && (itt < hrsize)) {
+<a name="l01204"></a>01204 <span class="keyword">const</span> <span class="keywordtype">double</span> xprev = x;
+<a name="l01205"></a>01205 x = pxhires[itt+1];
+<a name="l01206"></a>01206 <span class="keywordflow">if</span> (x > pxbounds[i+1]) x = pxbounds[i+1];
+<a name="l01207"></a>01207 presampled[i] += pyhires[itt] * (x - xlow);
+<a name="l01208"></a>01208 xlow = xprev;
+<a name="l01209"></a>01209 itt++;
+<a name="l01210"></a>01210 }
+<a name="l01211"></a>01211
+<a name="l01212"></a>01212 <span class="comment">/* Contribution from interpolated value at wavelength at upper pixel</span>
+<a name="l01213"></a>01213 <span class="comment"> boundary */</span>
+<a name="l01214"></a>01214 presampled[i] += pybounds[i+1] * (pxbounds[i+1] - xlow);
+<a name="l01215"></a>01215
+<a name="l01216"></a>01216 <span class="comment">/* Compute average by dividing integral by length of pixel range</span>
+<a name="l01217"></a>01217 <span class="comment"> (the factor 2 comes from the contributions) */</span>
+<a name="l01218"></a>01218 presampled[i] /= 2 * (pxbounds[i+1] - pxbounds[i]);
+<a name="l01219"></a>01219 }
+<a name="l01220"></a>01220 cpl_bivector_unwrap_vectors(boundary) ;
+<a name="l01221"></a>01221 cpl_vector_delete(ybounds) ;
+<a name="l01222"></a>01222 <span class="keywordflow">return</span> 0 ;
+<a name="l01223"></a>01223 }
+<a name="l01224"></a>01224
+<a name="l01225"></a>01225
+<a name="l01226"></a>01226
+<a name="l01227"></a>01227 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01248"></a>01248 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01249"></a>01249 <span class="keyword">static</span> cpl_error_code cpl_vector_fill_lss_profile_symmetric(cpl_vector * <span class="keyword">self</span>,
+<a name="l01250"></a>01250 <span class="keywordtype">double</span> slitw,
+<a name="l01251"></a>01251 <span class="keywordtype">double</span> fwhm)
+<a name="l01252"></a>01252 {
+<a name="l01253"></a>01253
+<a name="l01254"></a>01254 <span class="keyword">const</span> <span class="keywordtype">double</span> sigma = fwhm * CPL_MATH_SIG_FWHM;
+<a name="l01255"></a>01255 <span class="keyword">const</span> <span class="keywordtype">int</span> n = cpl_vector_get_size(<span class="keyword">self</span>);
+<a name="l01256"></a>01256 <span class="keywordtype">int</span> i;
+<a name="l01257"></a>01257
+<a name="l01258"></a>01258
+<a name="l01259"></a>01259 cpl_ensure_code(<span class="keyword">self</span> != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01260"></a>01260 cpl_ensure_code(slitw > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01261"></a>01261 cpl_ensure_code(fwhm > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01262"></a>01262
+<a name="l01263"></a>01263 <span class="comment">/* Cannot fail now */</span>
+<a name="l01264"></a>01264
+<a name="l01265"></a>01265 <span class="comment">/* Special case for i = 0 */</span>
+<a name="l01266"></a>01266 (void)cpl_vector_set(<span class="keyword">self</span>, 0,
+<a name="l01267"></a>01267 (<a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(0.5*slitw + 0.5, sigma) -
+<a name="l01268"></a>01268 <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(0.5*slitw - 0.5, sigma)) / slitw);
+<a name="l01269"></a>01269
+<a name="l01270"></a>01270 <span class="keywordflow">for</span> (i = 1; i < n; i++) {
+<a name="l01271"></a>01271 <span class="comment">/* FIXME: Reuse two irplib_erf_antideriv() calls from previous value */</span>
+<a name="l01272"></a>01272 <span class="keyword">const</span> <span class="keywordtype">double</span> x1p = i + 0.5*slitw + 0.5;
+<a name="l01273"></a>01273 <span class="keyword">const</span> <span class="keywordtype">double</span> x1n = i - 0.5*slitw + 0.5;
+<a name="l01274"></a>01274 <span class="keyword">const</span> <span class="keywordtype">double</span> x0p = i + 0.5*slitw - 0.5;
+<a name="l01275"></a>01275 <span class="keyword">const</span> <span class="keywordtype">double</span> x0n = i - 0.5*slitw - 0.5;
+<a name="l01276"></a>01276 <span class="keyword">const</span> <span class="keywordtype">double</span> val = 0.5/slitw *
+<a name="l01277"></a>01277 (<a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1p, sigma) - <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x1n, sigma) -
+<a name="l01278"></a>01278 <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0p, sigma) + <a class="code" href="group__irplib__wavecal.html#ga2da9c21054a19322705de2d4f48d1d3f" title="The antiderivative of erx(x/sigma/sqrt(2)) with respect to x.">irplib_erf_antideriv</a>(x0n, sigma));
+<a name="l01279"></a>01279 (void)cpl_vector_set(<span class="keyword">self</span>, i, val);
+<a name="l01280"></a>01280 }
+<a name="l01281"></a>01281
+<a name="l01282"></a>01282 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01283"></a>01283 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/irplib__wlxcorr_8h_source.html b/html/irplib__wlxcorr_8h_source.html
index 7e96a50..ed2ac5c 100644
--- a/html/irplib__wlxcorr_8h_source.html
+++ b/html/irplib__wlxcorr_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>irplib_wlxcorr.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wlxcorr.h,v 1.20 2008/11/06 12:45:28 llundin Exp $</span>
+<h1>irplib_wlxcorr.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: irplib_wlxcorr.h,v 1.22 2013/01/29 08:43:33 jtaylor Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the IRPLIB package</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -25,14 +25,14 @@
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: llundin $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/11/06 12:45:28 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.20 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: jtaylor $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/29 08:43:33 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.22 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef IRPLIB_WLXCORR_H</span>
@@ -58,7 +58,7 @@
<a name="l00048"></a>00048 <span class="comment"> Functions prototypes</span>
<a name="l00049"></a>00049 <span class="comment"> -----------------------------------------------------------------------------*/</span>
<a name="l00050"></a>00050
-<a name="l00051"></a>00051 <span class="keywordtype">int</span> irplib_wlxcorr_plot_spc_table(<span class="keyword">const</span> cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *) ;
+<a name="l00051"></a>00051 <span class="keywordtype">int</span> irplib_wlxcorr_plot_spc_table(<span class="keyword">const</span> cpl_table *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>) ;
<a name="l00052"></a>00052 <span class="keywordtype">int</span> irplib_wlxcorr_catalog_plot(<span class="keyword">const</span> cpl_bivector *, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>) ;
<a name="l00053"></a>00053 <span class="keywordtype">int</span> irplib_wlxcorr_plot_solution(<span class="keyword">const</span> cpl_polynomial *, <span class="keyword">const</span> cpl_polynomial *,
<a name="l00054"></a>00054 <span class="keyword">const</span> cpl_polynomial *, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>) ;
@@ -82,7 +82,7 @@
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/modules.html b/html/modules.html
index 62ec186..ec1b0ed 100644
--- a/html/modules.html
+++ b/html/modules.html
@@ -115,7 +115,7 @@
<li><a class="el" href="group__sinfo__recipes.html">Recipe utilities</a></li>
</ul>
</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__cube2ima_8c_source.html b/html/recipes_2sinfo__utl__cube2ima_8c_source.html
index ba79842..725b2c8 100644
--- a/html/recipes_2sinfo__utl__cube2ima_8c_source.html
+++ b/html/recipes_2sinfo__utl__cube2ima_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -194,7 +194,7 @@
<a name="l00213"></a>00213 }
<a name="l00214"></a>00214
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__cube2spectrum_8c_source.html b/html/recipes_2sinfo__utl__cube2spectrum_8c_source.html
index 5ef6332..7b5d524 100644
--- a/html/recipes_2sinfo__utl__cube2spectrum_8c_source.html
+++ b/html/recipes_2sinfo__utl__cube2spectrum_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 08:33:11 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.12 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -268,7 +268,7 @@
<a name="l00287"></a>00287 }
<a name="l00288"></a>00288
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__cube__arith_8c_source.html b/html/recipes_2sinfo__utl__cube__arith_8c_source.html
index 0f0e0a6..fc7a927 100644
--- a/html/recipes_2sinfo__utl__cube__arith_8c_source.html
+++ b/html/recipes_2sinfo__utl__cube__arith_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -210,7 +210,7 @@
<a name="l00229"></a>00229 <span class="keywordflow">return</span> 0 ;
<a name="l00230"></a>00230 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__cube__combine_8c_source.html b/html/recipes_2sinfo__utl__cube__combine_8c_source.html
index de2d6af..857a6ca 100644
--- a/html/recipes_2sinfo__utl__cube__combine_8c_source.html
+++ b/html/recipes_2sinfo__utl__cube__combine_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.12 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -227,7 +227,7 @@
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html b/html/recipes_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
index e76cd9b..04151dc 100644
--- a/html/recipes_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
+++ b/html/recipes_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -185,7 +185,7 @@
<a name="l00206"></a>00206 }
<a name="l00207"></a>00207
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/recipes_2sinfo__utl__spectrum__wavelength__shift_8c_source.html b/html/recipes_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
index 590da74..8f81e4d 100644
--- a/html/recipes_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
+++ b/html/recipes_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.11 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -200,7 +200,7 @@
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__absolute_8c_source.html b/html/sinfo__absolute_8c_source.html
index 345952a..93fd315 100644
--- a/html/sinfo__absolute_8c_source.html
+++ b/html/sinfo__absolute_8c_source.html
@@ -3207,7 +3207,7 @@
<a name="l03636"></a>03636
<a name="l03637"></a>03637
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__absolute_8h_source.html b/html/sinfo__absolute_8h_source.html
index bab544c..f8ed7b3 100644
--- a/html/sinfo__absolute_8h_source.html
+++ b/html/sinfo__absolute_8h_source.html
@@ -148,7 +148,7 @@
<a name="l00430"></a>00430
<a name="l00431"></a>00431 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__atmo__disp_8c_source.html b/html/sinfo__atmo__disp_8c_source.html
index 23a2e80..9a8cd94 100644
--- a/html/sinfo__atmo__disp_8c_source.html
+++ b/html/sinfo__atmo__disp_8c_source.html
@@ -337,7 +337,7 @@
<a name="l00327"></a>00327 <span class="keywordflow">return</span> retcube;
<a name="l00328"></a>00328 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__atmo__disp_8h_source.html b/html/sinfo__atmo__disp_8h_source.html
index f7a6b7a..063b64b 100644
--- a/html/sinfo__atmo__disp_8h_source.html
+++ b/html/sinfo__atmo__disp_8h_source.html
@@ -79,7 +79,7 @@
<a name="l00069"></a>00069 cpl_polynomial* sinfo_atmo_load_polynom(<span class="keyword">const</span> <span class="keywordtype">char</span>* filename);
<a name="l00070"></a>00070 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_ATM_DISP_H_ */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bad__cfg_8c_source.html b/html/sinfo__bad__cfg_8c_source.html
index 14f2d59..f48099d 100644
--- a/html/sinfo__bad__cfg_8c_source.html
+++ b/html/sinfo__bad__cfg_8c_source.html
@@ -64,7 +64,7 @@
<a name="l00074"></a>00074 }
<a name="l00075"></a>00075
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bad__cfg_8h_source.html b/html/sinfo__bad__cfg_8h_source.html
index 5bef3ad..d1aec5c 100644
--- a/html/sinfo__bad__cfg_8h_source.html
+++ b/html/sinfo__bad__cfg_8h_source.html
@@ -120,7 +120,7 @@
<a name="l00123"></a>00123
<a name="l00124"></a>00124 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bad__ini_8h_source.html b/html/sinfo__bad__ini_8h_source.html
index b4bc71d..c43e59d 100644
--- a/html/sinfo__bad__ini_8h_source.html
+++ b/html/sinfo__bad__ini_8h_source.html
@@ -64,7 +64,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__baddist__ini__by__cpl_8c_source.html b/html/sinfo__baddist__ini__by__cpl_8c_source.html
index 6b2c336..6838779 100644
--- a/html/sinfo__baddist__ini__by__cpl_8c_source.html
+++ b/html/sinfo__baddist__ini__by__cpl_8c_source.html
@@ -264,7 +264,7 @@
<a name="l00300"></a>00300
<a name="l00301"></a>00301 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__baddist__ini__by__cpl_8h_source.html b/html/sinfo__baddist__ini__by__cpl_8h_source.html
index d565e29..8c3aa8d 100644
--- a/html/sinfo__baddist__ini__by__cpl_8h_source.html
+++ b/html/sinfo__baddist__ini__by__cpl_8h_source.html
@@ -65,7 +65,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badnorm__ini__by__cpl_8c_source.html b/html/sinfo__badnorm__ini__by__cpl_8c_source.html
index 64fae37..6112348 100644
--- a/html/sinfo__badnorm__ini__by__cpl_8c_source.html
+++ b/html/sinfo__badnorm__ini__by__cpl_8c_source.html
@@ -288,7 +288,7 @@
<a name="l00335"></a>00335
<a name="l00336"></a>00336 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badnorm__ini__by__cpl_8h_source.html b/html/sinfo__badnorm__ini__by__cpl_8h_source.html
index 297c6ab..c9dfcc7 100644
--- a/html/sinfo__badnorm__ini__by__cpl_8h_source.html
+++ b/html/sinfo__badnorm__ini__by__cpl_8h_source.html
@@ -59,7 +59,7 @@
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badsky__cfg_8c_source.html b/html/sinfo__badsky__cfg_8c_source.html
index ed5287c..239bfa2 100644
--- a/html/sinfo__badsky__cfg_8c_source.html
+++ b/html/sinfo__badsky__cfg_8c_source.html
@@ -62,7 +62,7 @@
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badsky__cfg_8h_source.html b/html/sinfo__badsky__cfg_8h_source.html
index 5fe703a..ded1283 100644
--- a/html/sinfo__badsky__cfg_8h_source.html
+++ b/html/sinfo__badsky__cfg_8h_source.html
@@ -116,7 +116,7 @@
<a name="l00119"></a>00119
<a name="l00120"></a>00120 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badsky__ini__by__cpl_8c_source.html b/html/sinfo__badsky__ini__by__cpl_8c_source.html
index 400330a..88dd0fe 100644
--- a/html/sinfo__badsky__ini__by__cpl_8c_source.html
+++ b/html/sinfo__badsky__ini__by__cpl_8c_source.html
@@ -253,7 +253,7 @@
<a name="l00293"></a>00293
<a name="l00294"></a>00294 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__badsky__ini__by__cpl_8h_source.html b/html/sinfo__badsky__ini__by__cpl_8h_source.html
index 58d8597..ea79f2e 100644
--- a/html/sinfo__badsky__ini__by__cpl_8h_source.html
+++ b/html/sinfo__badsky__ini__by__cpl_8h_source.html
@@ -59,7 +59,7 @@
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__balance_8c_source.html b/html/sinfo__balance_8c_source.html
index 0df5afa..b2c0058 100644
--- a/html/sinfo__balance_8c_source.html
+++ b/html/sinfo__balance_8c_source.html
@@ -139,7 +139,7 @@
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__baryvel_8c_source.html b/html/sinfo__baryvel_8c_source.html
index 53786f0..d24de8a 100644
--- a/html/sinfo__baryvel_8c_source.html
+++ b/html/sinfo__baryvel_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Log: sinfo_baryvel.c,v $</span>
<a name="l00026"></a>00026 <span class="comment"> * Revision 1.3 2012/03/02 08:42:20 amodigli</span>
<a name="l00027"></a>00027 <span class="comment"> * fixed some typos on doxygen</span>
@@ -1034,7 +1034,7 @@
<a name="l01109"></a>01109 <span class="keywordflow">return</span> cpl_error_get_code();
<a name="l01110"></a>01110 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__baryvel_8h_source.html b/html/sinfo__baryvel_8h_source.html
index a6eb1f0..3bf1e9a 100644
--- a/html/sinfo__baryvel_8h_source.html
+++ b/html/sinfo__baryvel_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2009/04/28 11:42:18 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Log: sinfo_baryvel.h,v $</span>
<a name="l00026"></a>00026 <span class="comment"> * Revision 1.2 2009/04/28 11:42:18 amodigli</span>
<a name="l00027"></a>00027 <span class="comment"> * now return cpl_error_code</span>
@@ -70,7 +70,7 @@
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_BARYVEL_H */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__boltzmann_8c_source.html b/html/sinfo__boltzmann_8c_source.html
index fa12790..decfda1 100644
--- a/html/sinfo__boltzmann_8c_source.html
+++ b/html/sinfo__boltzmann_8c_source.html
@@ -2285,7 +2285,7 @@
<a name="l02511"></a>02511
<a name="l02512"></a>02512 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__config_8c_source.html b/html/sinfo__bp__config_8c_source.html
index 8900531..fee6abb 100644
--- a/html/sinfo__bp__config_8c_source.html
+++ b/html/sinfo__bp__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -71,7 +71,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__config_8h_source.html b/html/sinfo__bp__config_8h_source.html
index e3778b5..5fec5fe 100644
--- a/html/sinfo__bp__config_8h_source.html
+++ b/html/sinfo__bp__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__dist__config_8c_source.html b/html/sinfo__bp__dist__config_8c_source.html
index e80c5e9..1146624 100644
--- a/html/sinfo__bp__dist__config_8c_source.html
+++ b/html/sinfo__bp__dist__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/06/06 07:10:45 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -263,7 +263,7 @@
<a name="l00271"></a>00271
<a name="l00272"></a>00272 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__dist__config_8h_source.html b/html/sinfo__bp__dist__config_8h_source.html
index f1e38f2..184acad 100644
--- a/html/sinfo__bp__dist__config_8h_source.html
+++ b/html/sinfo__bp__dist__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -50,7 +50,7 @@
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__lin_8c_source.html b/html/sinfo__bp__lin_8c_source.html
index 5bb8013..4e4a731 100644
--- a/html/sinfo__bp__lin_8c_source.html
+++ b/html/sinfo__bp__lin_8c_source.html
@@ -362,7 +362,7 @@
<a name="l00384"></a>00384
<a name="l00385"></a>00385 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__lin_8h_source.html b/html/sinfo__bp__lin_8h_source.html
index 2f5ae6d..2ebe57f 100644
--- a/html/sinfo__bp__lin_8h_source.html
+++ b/html/sinfo__bp__lin_8h_source.html
@@ -60,7 +60,7 @@
<a name="l00058"></a>00058 <span class="preprocessor">#endif </span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__lin__config_8c_source.html b/html/sinfo__bp__lin__config_8c_source.html
index a8a72ca..a280604 100644
--- a/html/sinfo__bp__lin__config_8c_source.html
+++ b/html/sinfo__bp__lin__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -138,7 +138,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__lin__config_8h_source.html b/html/sinfo__bp__lin__config_8h_source.html
index c05d5a5..67071f4 100644
--- a/html/sinfo__bp__lin__config_8h_source.html
+++ b/html/sinfo__bp__lin__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/22 14:12:27 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__noise_8c_source.html b/html/sinfo__bp__noise_8c_source.html
index 8413a25..da8f7d3 100644
--- a/html/sinfo__bp__noise_8c_source.html
+++ b/html/sinfo__bp__noise_8c_source.html
@@ -144,7 +144,7 @@
<a name="l00156"></a>00156
<a name="l00157"></a>00157 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__noise_8h_source.html b/html/sinfo__bp__noise_8h_source.html
index 4c42705..e6c3422 100644
--- a/html/sinfo__bp__noise_8h_source.html
+++ b/html/sinfo__bp__noise_8h_source.html
@@ -60,7 +60,7 @@
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__noise__config_8c_source.html b/html/sinfo__bp__noise__config_8c_source.html
index 7018557..e22e8af 100644
--- a/html/sinfo__bp__noise__config_8c_source.html
+++ b/html/sinfo__bp__noise__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2008/01/17 07:54:04 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -107,7 +107,7 @@
<a name="l00115"></a>00115
<a name="l00116"></a>00116 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__noise__config_8h_source.html b/html/sinfo__bp__noise__config_8h_source.html
index bf52879..00bd46c 100644
--- a/html/sinfo__bp__noise__config_8h_source.html
+++ b/html/sinfo__bp__noise__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/22 14:12:27 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__norm_8c_source.html b/html/sinfo__bp__norm_8c_source.html
index f66d7fa..c3b3dc8 100644
--- a/html/sinfo__bp__norm_8c_source.html
+++ b/html/sinfo__bp__norm_8c_source.html
@@ -298,65 +298,71 @@
<a name="l00332"></a>00332 sinfo_free_table(&qclog_tbl);
<a name="l00333"></a>00333 sinfo_free_image(&maskImage);
<a name="l00334"></a>00334 sinfo_free_image(&compImage);
-<a name="l00335"></a>00335 <span class="keywordflow">if</span> (med != NULL) {
-<a name="l00336"></a>00336 <span class="keywordflow">for</span> ( i = 0 ; i < cfg->iterations ; i++ ) {
-<a name="l00337"></a>00337 <span class="keywordflow">if</span>(med[i] != NULL) {
-<a name="l00338"></a>00338 cpl_image_delete(med[i]) ;
-<a name="l00339"></a>00339 med[i]=NULL;
-<a name="l00340"></a>00340 }
-<a name="l00341"></a>00341 }
-<a name="l00342"></a>00342 cpl_free(med) ;
-<a name="l00343"></a>00343 med=NULL;
-<a name="l00344"></a>00344 }
-<a name="l00345"></a>00345 <span class="keywordflow">if</span> (stats != NULL) {
-<a name="l00346"></a>00346 cpl_free(stats) ;
-<a name="l00347"></a>00347 stats=NULL;
-<a name="l00348"></a>00348 }
-<a name="l00349"></a>00349 sinfo_free_image(&medIm);
-<a name="l00350"></a>00350 sinfo_free_image(&medImage);
-<a name="l00351"></a>00351 sinfo_free_image(&colImage);
-<a name="l00352"></a>00352 <span class="keywordflow">if</span> (cfg->threshInd == 1 ) {
-<a name="l00353"></a>00353 sinfo_free_image(&threshIm);
-<a name="l00354"></a>00354 }
-<a name="l00355"></a>00355 sinfo_badnorm_free(&cfg) ;
-<a name="l00356"></a>00356 sinfo_free_frameset(&raw);
-<a name="l00357"></a>00357 <span class="keywordflow">return</span> 0;
-<a name="l00358"></a>00358
-<a name="l00359"></a>00359 cleanup:
-<a name="l00360"></a>00360
+<a name="l00335"></a>00335 sinfo_free_image_array(&med,cfg->iterations);
+<a name="l00336"></a>00336 <span class="comment">/*</span>
+<a name="l00337"></a>00337 <span class="comment"> if (med != NULL) {</span>
+<a name="l00338"></a>00338 <span class="comment"> for ( i = 0 ; i < cfg->iterations ; i++ ) {</span>
+<a name="l00339"></a>00339 <span class="comment"> if(med[i] != NULL) {</span>
+<a name="l00340"></a>00340 <span class="comment"> cpl_image_delete(med[i]) ;</span>
+<a name="l00341"></a>00341 <span class="comment"> med[i]=NULL;</span>
+<a name="l00342"></a>00342 <span class="comment"> }</span>
+<a name="l00343"></a>00343 <span class="comment"> }</span>
+<a name="l00344"></a>00344 <span class="comment"> cpl_free(med) ; </span>
+<a name="l00345"></a>00345 <span class="comment"> med=NULL;</span>
+<a name="l00346"></a>00346 <span class="comment"> }</span>
+<a name="l00347"></a>00347 <span class="comment"> */</span>
+<a name="l00348"></a>00348 <span class="keywordflow">if</span> (stats != NULL) {
+<a name="l00349"></a>00349 cpl_free(stats) ;
+<a name="l00350"></a>00350 stats=NULL;
+<a name="l00351"></a>00351 }
+<a name="l00352"></a>00352 sinfo_free_image(&medIm);
+<a name="l00353"></a>00353 sinfo_free_image(&medImage);
+<a name="l00354"></a>00354 sinfo_free_image(&colImage);
+<a name="l00355"></a>00355 <span class="keywordflow">if</span> (cfg->threshInd == 1 ) {
+<a name="l00356"></a>00356 sinfo_free_image(&threshIm);
+<a name="l00357"></a>00357 }
+<a name="l00358"></a>00358 sinfo_badnorm_free(&cfg) ;
+<a name="l00359"></a>00359 sinfo_free_frameset(&raw);
+<a name="l00360"></a>00360 <span class="keywordflow">return</span> 0;
<a name="l00361"></a>00361
-<a name="l00362"></a>00362 <span class="keywordflow">if</span> (med != NULL) {
-<a name="l00363"></a>00363 <span class="keywordflow">for</span> ( i = 0 ; i < cfg->iterations ; i++ ) {
-<a name="l00364"></a>00364 <span class="keywordflow">if</span>(med[i] != NULL) {
-<a name="l00365"></a>00365 cpl_image_delete(med[i]) ;
-<a name="l00366"></a>00366 med[i]=NULL;
-<a name="l00367"></a>00367 }
-<a name="l00368"></a>00368 }
-<a name="l00369"></a>00369 cpl_free(med) ;
-<a name="l00370"></a>00370 med=NULL;
-<a name="l00371"></a>00371 }
-<a name="l00372"></a>00372 sinfo_free_image(&compImage) ;
-<a name="l00373"></a>00373 sinfo_free_image(&maskImage) ;
-<a name="l00374"></a>00374 sinfo_free_image(&threshIm) ;
-<a name="l00375"></a>00375 sinfo_free_table(&qclog_tbl);
-<a name="l00376"></a>00376 sinfo_free_image(&threshIm) ;
-<a name="l00377"></a>00377 <span class="keywordflow">if</span> (stats != NULL) {
-<a name="l00378"></a>00378 cpl_free(stats) ;
-<a name="l00379"></a>00379 stats=NULL;
-<a name="l00380"></a>00380 }
-<a name="l00381"></a>00381 sinfo_free_image(&medIm);
-<a name="l00382"></a>00382 sinfo_free_image(&medImage);
-<a name="l00383"></a>00383 sinfo_free_image(&colImage);
-<a name="l00384"></a>00384 sinfo_free_imagelist(&image_list) ;
-<a name="l00385"></a>00385 sinfo_free_frameset(&raw);
-<a name="l00386"></a>00386 sinfo_badnorm_free(&cfg);
-<a name="l00387"></a>00387
-<a name="l00388"></a>00388 <span class="keywordflow">return</span> -1;
-<a name="l00389"></a>00389
-<a name="l00390"></a>00390 }
-<a name="l00391"></a>00391
+<a name="l00362"></a>00362 cleanup:
+<a name="l00363"></a>00363
+<a name="l00364"></a>00364 sinfo_free_image_array(&med,cfg->iterations);
+<a name="l00365"></a>00365 <span class="comment">/*</span>
+<a name="l00366"></a>00366 <span class="comment"> if (med != NULL) {</span>
+<a name="l00367"></a>00367 <span class="comment"> for ( i = 0 ; i < cfg->iterations ; i++ ) {</span>
+<a name="l00368"></a>00368 <span class="comment"> if(med[i] != NULL) {</span>
+<a name="l00369"></a>00369 <span class="comment"> cpl_image_delete(med[i]) ;</span>
+<a name="l00370"></a>00370 <span class="comment"> med[i]=NULL;</span>
+<a name="l00371"></a>00371 <span class="comment"> }</span>
+<a name="l00372"></a>00372 <span class="comment"> }</span>
+<a name="l00373"></a>00373 <span class="comment"> cpl_free(med) ; </span>
+<a name="l00374"></a>00374 <span class="comment"> med=NULL;</span>
+<a name="l00375"></a>00375 <span class="comment"> }</span>
+<a name="l00376"></a>00376 <span class="comment"> */</span>
+<a name="l00377"></a>00377 sinfo_free_image(&compImage) ;
+<a name="l00378"></a>00378 sinfo_free_image(&maskImage) ;
+<a name="l00379"></a>00379 sinfo_free_image(&threshIm) ;
+<a name="l00380"></a>00380 sinfo_free_table(&qclog_tbl);
+<a name="l00381"></a>00381 sinfo_free_image(&threshIm) ;
+<a name="l00382"></a>00382 <span class="keywordflow">if</span> (stats != NULL) {
+<a name="l00383"></a>00383 cpl_free(stats) ;
+<a name="l00384"></a>00384 stats=NULL;
+<a name="l00385"></a>00385 }
+<a name="l00386"></a>00386
+<a name="l00387"></a>00387 sinfo_free_image(&medIm);
+<a name="l00388"></a>00388 sinfo_free_image(&medImage);
+<a name="l00389"></a>00389 sinfo_free_image(&colImage);
+<a name="l00390"></a>00390 sinfo_free_imagelist(&image_list) ;
+<a name="l00391"></a>00391 sinfo_free_frameset(&raw);
+<a name="l00392"></a>00392 sinfo_badnorm_free(&cfg);
+<a name="l00393"></a>00393
+<a name="l00394"></a>00394 <span class="keywordflow">return</span> -1;
+<a name="l00395"></a>00395
+<a name="l00396"></a>00396 }
+<a name="l00397"></a>00397
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__norm_8h_source.html b/html/sinfo__bp__norm_8h_source.html
index 47b5143..f39e33b 100644
--- a/html/sinfo__bp__norm_8h_source.html
+++ b/html/sinfo__bp__norm_8h_source.html
@@ -63,7 +63,7 @@
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__norm__config_8c_source.html b/html/sinfo__bp__norm__config_8c_source.html
index 59cb143..71c9dc3 100644
--- a/html/sinfo__bp__norm__config_8c_source.html
+++ b/html/sinfo__bp__norm__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/06/06 07:10:45 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -264,7 +264,7 @@
<a name="l00272"></a>00272
<a name="l00273"></a>00273 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__norm__config_8h_source.html b/html/sinfo__bp__norm__config_8h_source.html
index 83c2fa5..bbd1e5f 100644
--- a/html/sinfo__bp__norm__config_8h_source.html
+++ b/html/sinfo__bp__norm__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -50,7 +50,7 @@
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__sky__config_8c_source.html b/html/sinfo__bp__sky__config_8c_source.html
index 8d25066..9abe884 100644
--- a/html/sinfo__bp__sky__config_8c_source.html
+++ b/html/sinfo__bp__sky__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/06/06 07:10:45 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -274,7 +274,7 @@
<a name="l00282"></a>00282
<a name="l00283"></a>00283 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__bp__sky__config_8h_source.html b/html/sinfo__bp__sky__config_8h_source.html
index 905db55..be64835 100644
--- a/html/sinfo__bp__sky__config_8h_source.html
+++ b/html/sinfo__bp__sky__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -47,7 +47,7 @@
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__coltilt_8c_source.html b/html/sinfo__coltilt_8c_source.html
index 12ae9bc..944eb53 100644
--- a/html/sinfo__coltilt_8c_source.html
+++ b/html/sinfo__coltilt_8c_source.html
@@ -1122,7 +1122,7 @@
<a name="l01198"></a>01198 }
<a name="l01199"></a>01199
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__coltilt_8h_source.html b/html/sinfo__coltilt_8h_source.html
index 3b2abc0..fa7eca4 100644
--- a/html/sinfo__coltilt_8h_source.html
+++ b/html/sinfo__coltilt_8h_source.html
@@ -111,7 +111,7 @@
<a name="l00160"></a>00160
<a name="l00161"></a>00161 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__companion_8c_source.html b/html/sinfo__companion_8c_source.html
index d543741..23a9151 100644
--- a/html/sinfo__companion_8c_source.html
+++ b/html/sinfo__companion_8c_source.html
@@ -47,7 +47,7 @@
<a name="l00052"></a>00052 MAT (m, i, nc - 1, nc) = -a[i] / a[nc];
<a name="l00053"></a>00053 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__compare__tags_8h_source.html b/html/sinfo__compare__tags_8h_source.html
index fb41261..e569656 100644
--- a/html/sinfo__compare__tags_8h_source.html
+++ b/html/sinfo__compare__tags_8h_source.html
@@ -37,7 +37,7 @@
<a name="l00033"></a>00033 compare_tags(cpl_frame * frame1,cpl_frame * frame2);
<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__cpl__size_8h_source.html b/html/sinfo__cpl__size_8h_source.html
index c700b00..1128a6c 100644
--- a/html/sinfo__cpl__size_8h_source.html
+++ b/html/sinfo__cpl__size_8h_source.html
@@ -26,7 +26,7 @@
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_CPL_SIZE_H_ */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__cube__construct_8c_source.html b/html/sinfo__cube__construct_8c_source.html
index 25e3ab0..1804424 100644
--- a/html/sinfo__cube__construct_8c_source.html
+++ b/html/sinfo__cube__construct_8c_source.html
@@ -1025,7 +1025,7 @@
<a name="l01078"></a>01078 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"wrong slitlet index: couldn't be a "</span>
<a name="l01079"></a>01079 <span class="stringliteral">"spiffi image, there must be 32 slitlets!"</span>) ;
<a name="l01080"></a>01080 <span class="keywordflow">return</span> -1 ;
-<a name="l01081"></a>01081 break ;
+<a name="l01081"></a>01081
<a name="l01082"></a>01082
<a name="l01083"></a>01083 }
<a name="l01084"></a>01084 <span class="keywordflow">return</span> slit_index;
@@ -3261,7 +3261,7 @@
<a name="l03570"></a>03570
<a name="l03571"></a>03571 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__cube__construct_8h_source.html b/html/sinfo__cube__construct_8h_source.html
index a43fb92..e8772cc 100644
--- a/html/sinfo__cube__construct_8h_source.html
+++ b/html/sinfo__cube__construct_8h_source.html
@@ -145,7 +145,7 @@
<a name="l00405"></a>00405
<a name="l00406"></a>00406 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__cubecreate__ini_8h_source.html b/html/sinfo__cubecreate__ini_8h_source.html
index a6a2702..6039b87 100644
--- a/html/sinfo__cubecreate__ini_8h_source.html
+++ b/html/sinfo__cubecreate__ini_8h_source.html
@@ -54,7 +54,7 @@
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__cfg_8c_source.html b/html/sinfo__dark__cfg_8c_source.html
index 1865c8a..23af42a 100644
--- a/html/sinfo__dark__cfg_8c_source.html
+++ b/html/sinfo__dark__cfg_8c_source.html
@@ -62,7 +62,7 @@
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__cfg_8h_source.html b/html/sinfo__dark__cfg_8h_source.html
index c0c9f42..f53bb8f 100644
--- a/html/sinfo__dark__cfg_8h_source.html
+++ b/html/sinfo__dark__cfg_8h_source.html
@@ -102,7 +102,7 @@
<a name="l00105"></a>00105
<a name="l00106"></a>00106 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__config_8c_source.html b/html/sinfo__dark__config_8c_source.html
index 87ab5bb..6c37631 100644
--- a/html/sinfo__dark__config_8c_source.html
+++ b/html/sinfo__dark__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -208,7 +208,7 @@
<a name="l00216"></a>00216
<a name="l00217"></a>00217 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__config_8h_source.html b/html/sinfo__dark__config_8h_source.html
index 52c94c5..c74e257 100644
--- a/html/sinfo__dark__config_8h_source.html
+++ b/html/sinfo__dark__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -45,7 +45,7 @@
<a name="l00035"></a>00035 <span class="keywordtype">void</span> sinfo_dark_config_add(cpl_parameterlist *list);
<a name="l00036"></a>00036
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__ini_8h_source.html b/html/sinfo__dark__ini_8h_source.html
index e7e9833..05c0f94 100644
--- a/html/sinfo__dark__ini_8h_source.html
+++ b/html/sinfo__dark__ini_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__ini__by__cpl_8c_source.html b/html/sinfo__dark__ini__by__cpl_8c_source.html
index 6f33253..557a15c 100644
--- a/html/sinfo__dark__ini__by__cpl_8c_source.html
+++ b/html/sinfo__dark__ini__by__cpl_8c_source.html
@@ -252,7 +252,7 @@
<a name="l00293"></a>00293
<a name="l00294"></a>00294 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dark__ini__by__cpl_8h_source.html b/html/sinfo__dark__ini__by__cpl_8h_source.html
index 9edb6e1..a12b8b9 100644
--- a/html/sinfo__dark__ini__by__cpl_8h_source.html
+++ b/html/sinfo__dark__ini__by__cpl_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__define__opt_8h_source.html b/html/sinfo__define__opt_8h_source.html
index 8eb8737..2e7cfd0 100644
--- a/html/sinfo__define__opt_8h_source.html
+++ b/html/sinfo__define__opt_8h_source.html
@@ -38,7 +38,7 @@
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define OPT_CIN 2003</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin_8c_source.html b/html/sinfo__detlin_8c_source.html
index dc4658b..4b488ed 100644
--- a/html/sinfo__detlin_8c_source.html
+++ b/html/sinfo__detlin_8c_source.html
@@ -1119,7 +1119,7 @@
<a name="l01215"></a>01215
<a name="l01216"></a>01216
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin_8h_source.html b/html/sinfo__detlin_8h_source.html
index b15fa84..b7caddd 100644
--- a/html/sinfo__detlin_8h_source.html
+++ b/html/sinfo__detlin_8h_source.html
@@ -126,7 +126,7 @@
<a name="l00215"></a>00215
<a name="l00216"></a>00216 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin__cfg_8c_source.html b/html/sinfo__detlin__cfg_8c_source.html
index 5a90a6a..979b676 100644
--- a/html/sinfo__detlin__cfg_8c_source.html
+++ b/html/sinfo__detlin__cfg_8c_source.html
@@ -60,7 +60,7 @@
<a name="l00069"></a>00069 }
<a name="l00070"></a>00070
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin__cfg_8h_source.html b/html/sinfo__detlin__cfg_8h_source.html
index 45e6875..5f4ee84 100644
--- a/html/sinfo__detlin__cfg_8h_source.html
+++ b/html/sinfo__detlin__cfg_8h_source.html
@@ -96,7 +96,7 @@
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin__ini_8h_source.html b/html/sinfo__detlin__ini_8h_source.html
index b8fd59a..d2c9c6a 100644
--- a/html/sinfo__detlin__ini_8h_source.html
+++ b/html/sinfo__detlin__ini_8h_source.html
@@ -57,7 +57,7 @@
<a name="l00066"></a>00066 parse_detlin_ini_file(<span class="keywordtype">char</span> * ini_name) ;
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin__ini__by__cpl_8c_source.html b/html/sinfo__detlin__ini__by__cpl_8c_source.html
index e953354..3f73f9b 100644
--- a/html/sinfo__detlin__ini__by__cpl_8c_source.html
+++ b/html/sinfo__detlin__ini__by__cpl_8c_source.html
@@ -227,7 +227,7 @@
<a name="l00261"></a>00261
<a name="l00262"></a>00262 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detlin__ini__by__cpl_8h_source.html b/html/sinfo__detlin__ini__by__cpl_8h_source.html
index 50971f6..b3918e5 100644
--- a/html/sinfo__detlin__ini__by__cpl_8h_source.html
+++ b/html/sinfo__detlin__ini__by__cpl_8h_source.html
@@ -58,7 +58,7 @@
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detnoise__cfg_8c_source.html b/html/sinfo__detnoise__cfg_8c_source.html
index 76bf3f4..bc65887 100644
--- a/html/sinfo__detnoise__cfg_8c_source.html
+++ b/html/sinfo__detnoise__cfg_8c_source.html
@@ -62,7 +62,7 @@
<a name="l00071"></a>00071 }
<a name="l00072"></a>00072
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detnoise__cfg_8h_source.html b/html/sinfo__detnoise__cfg_8h_source.html
index c0376d8..9bd0e40 100644
--- a/html/sinfo__detnoise__cfg_8h_source.html
+++ b/html/sinfo__detnoise__cfg_8h_source.html
@@ -85,7 +85,7 @@
<a name="l00088"></a>00088
<a name="l00089"></a>00089 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detnoise__ini_8h_source.html b/html/sinfo__detnoise__ini_8h_source.html
index bbb9c5b..f204be3 100644
--- a/html/sinfo__detnoise__ini_8h_source.html
+++ b/html/sinfo__detnoise__ini_8h_source.html
@@ -60,7 +60,7 @@
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detnoise__ini__by__cpl_8c_source.html b/html/sinfo__detnoise__ini__by__cpl_8c_source.html
index aabce02..084fc7d 100644
--- a/html/sinfo__detnoise__ini__by__cpl_8c_source.html
+++ b/html/sinfo__detnoise__ini__by__cpl_8c_source.html
@@ -192,7 +192,7 @@
<a name="l00224"></a>00224 }
<a name="l00225"></a>00225 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__detnoise__ini__by__cpl_8h_source.html b/html/sinfo__detnoise__ini__by__cpl_8h_source.html
index 44fd88c..858ede7 100644
--- a/html/sinfo__detnoise__ini__by__cpl_8h_source.html
+++ b/html/sinfo__detnoise__ini__by__cpl_8h_source.html
@@ -59,7 +59,7 @@
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dfs_8c_source.html b/html/sinfo__dfs_8c_source.html
index 4cb5169..9a44729 100644
--- a/html/sinfo__dfs_8c_source.html
+++ b/html/sinfo__dfs_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>sinfo_dfs.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_dfs.c,v 1.41 2012/04/26 14:44:48 amodigli Exp $</span>
+<h1>sinfo_dfs.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_dfs.c,v 1.43 2013/01/24 15:56:40 amodigli Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the SINFONI Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -30,9 +30,9 @@
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/04/26 14:44:48 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.41 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2013/01/24 15:56:40 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.43 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -52,880 +52,880 @@
<a name="l00042"></a>00042 <span class="comment"> Includes</span>
<a name="l00043"></a>00043 <span class="comment"> ----------------------------------------------------------------------------*/</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include "sinfo_dfs.h"</span>
-<a name="l00045"></a>00045 <span class="preprocessor">#include <assert.h></span>
-<a name="l00046"></a>00046 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00047"></a>00047 <span class="preprocessor">#include <math.h></span>
-<a name="l00048"></a>00048 <span class="preprocessor">#include "sinfo_error.h"</span>
-<a name="l00049"></a>00049 <span class="preprocessor">#include "sinfo_utilities.h"</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include "sinfo_utils_wrappers.h"</span>
-<a name="l00051"></a>00051 <span class="preprocessor">#include "sinfo_msg.h"</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#include "sinfo_globals.h"</span>
-<a name="l00053"></a>00053 <span class="preprocessor">#include "sinfo_pro_save.h"</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#include "sinfo_skycor.h"</span>
-<a name="l00055"></a>00055 <span class="preprocessor">#include "sinfo_file_handling.h"</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#include <unistd.h></span>
-<a name="l00057"></a>00057 <span class="preprocessor">#include <stdio.h></span>
-<a name="l00059"></a>00059 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00065"></a>00065 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00066"></a>00066
-<a name="l00067"></a>00067 <span class="comment">/* defines */</span>
-<a name="l00068"></a>00068
-<a name="l00069"></a>00069 <span class="preprocessor">#define FITS_MAGIC_SZ 6</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_FIT_AMOEBA_NMAX 5000</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span>
-<a name="l00072"></a>00072 <span class="comment">/* function prototypes */</span>
-<a name="l00073"></a>00073 <span class="comment">/*</span>
-<a name="l00074"></a>00074 <span class="comment"> static int</span>
-<a name="l00075"></a>00075 <span class="comment"> sinfo_stat_rectangle(cpl_image* img,</span>
-<a name="l00076"></a>00076 <span class="comment"> const int kappa,</span>
-<a name="l00077"></a>00077 <span class="comment"> const int nclip,</span>
-<a name="l00078"></a>00078 <span class="comment"> double *mean,</span>
-<a name="l00079"></a>00079 <span class="comment"> double *stdev);</span>
-<a name="l00080"></a>00080 <span class="comment">*/</span>
-<a name="l00081"></a>00081 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00082"></a>00082 sinfo_fit_amoeba_get_psum(<span class="keywordtype">int</span> ndim, <span class="keywordtype">int</span> mpts, <span class="keywordtype">double</span>** p, <span class="keywordtype">double</span>* psum);
+<a name="l00045"></a>00045 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include <math.h></span>
+<a name="l00047"></a>00047 <span class="preprocessor">#include "sinfo_error.h"</span>
+<a name="l00048"></a>00048 <span class="preprocessor">#include "sinfo_utilities.h"</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#include "sinfo_utils_wrappers.h"</span>
+<a name="l00050"></a>00050 <span class="preprocessor">#include "sinfo_msg.h"</span>
+<a name="l00051"></a>00051 <span class="preprocessor">#include "sinfo_globals.h"</span>
+<a name="l00052"></a>00052 <span class="preprocessor">#include "sinfo_pro_save.h"</span>
+<a name="l00053"></a>00053 <span class="preprocessor">#include "sinfo_skycor.h"</span>
+<a name="l00054"></a>00054 <span class="preprocessor">#include "sinfo_file_handling.h"</span>
+<a name="l00055"></a>00055 <span class="preprocessor">#include <unistd.h></span>
+<a name="l00056"></a>00056 <span class="preprocessor">#include <stdio.h></span>
+<a name="l00058"></a>00058 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00064"></a>00064 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00065"></a>00065
+<a name="l00066"></a>00066 <span class="comment">/* defines */</span>
+<a name="l00067"></a>00067
+<a name="l00068"></a>00068 <span class="preprocessor">#define FITS_MAGIC_SZ 6</span>
+<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_FIT_AMOEBA_NMAX 5000</span>
+<a name="l00070"></a>00070 <span class="preprocessor"></span>
+<a name="l00071"></a>00071 <span class="comment">/* function prototypes */</span>
+<a name="l00072"></a>00072 <span class="comment">/*</span>
+<a name="l00073"></a>00073 <span class="comment"> static int</span>
+<a name="l00074"></a>00074 <span class="comment"> sinfo_stat_rectangle(cpl_image* img,</span>
+<a name="l00075"></a>00075 <span class="comment"> const int kappa,</span>
+<a name="l00076"></a>00076 <span class="comment"> const int nclip,</span>
+<a name="l00077"></a>00077 <span class="comment"> double *mean,</span>
+<a name="l00078"></a>00078 <span class="comment"> double *stdev);</span>
+<a name="l00079"></a>00079 <span class="comment">*/</span>
+<a name="l00080"></a>00080 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00081"></a>00081 sinfo_fit_amoeba_get_psum(<span class="keywordtype">int</span> ndim, <span class="keywordtype">int</span> mpts, <span class="keywordtype">double</span>** p, <span class="keywordtype">double</span>* psum);
+<a name="l00082"></a>00082
<a name="l00083"></a>00083
-<a name="l00084"></a>00084
-<a name="l00085"></a>00085 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00086"></a>00086 sinfo_fit_amotry(<span class="keywordtype">double</span>** p,
-<a name="l00087"></a>00087 <span class="keywordtype">double</span> y[],
-<a name="l00088"></a>00088 <span class="keywordtype">double</span> psum[],
-<a name="l00089"></a>00089 <span class="keywordtype">int</span> ndim,
-<a name="l00090"></a>00090 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),
-<a name="l00091"></a>00091 <span class="keywordtype">int</span> ihi,
-<a name="l00092"></a>00092 <span class="keywordtype">double</span> fac);
+<a name="l00084"></a>00084 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00085"></a>00085 sinfo_fit_amotry(<span class="keywordtype">double</span>** p,
+<a name="l00086"></a>00086 <span class="keywordtype">double</span> y[],
+<a name="l00087"></a>00087 <span class="keywordtype">double</span> psum[],
+<a name="l00088"></a>00088 <span class="keywordtype">int</span> ndim,
+<a name="l00089"></a>00089 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),
+<a name="l00090"></a>00090 <span class="keywordtype">int</span> ihi,
+<a name="l00091"></a>00091 <span class="keywordtype">double</span> fac);
+<a name="l00092"></a>00092
<a name="l00093"></a>00093
-<a name="l00094"></a>00094
-<a name="l00095"></a>00095 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00096"></a>00096 get_chisq(<span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
-<a name="l00097"></a>00097 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
-<a name="l00098"></a>00098 <span class="keyword">const</span> <span class="keywordtype">double</span> *a,
-<a name="l00099"></a>00099 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
-<a name="l00100"></a>00100 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
-<a name="l00101"></a>00101 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma);
-<a name="l00102"></a>00102
-<a name="l00103"></a>00103 <span class="keyword">static</span> <span class="keywordtype">int</span> get_candidate(<span class="keyword">const</span> <span class="keywordtype">double</span> *a, <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
-<a name="l00104"></a>00104 <span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
-<a name="l00105"></a>00105 <span class="keywordtype">double</span> lambda,
-<a name="l00106"></a>00106 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
-<a name="l00107"></a>00107 <span class="keywordtype">double</span> *result),
-<a name="l00108"></a>00108 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
-<a name="l00109"></a>00109 <span class="keywordtype">double</span> result[]),
-<a name="l00110"></a>00110 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
-<a name="l00111"></a>00111 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
-<a name="l00112"></a>00112 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma,
-<a name="l00113"></a>00113 <span class="keywordtype">double</span> *partials,
-<a name="l00114"></a>00114 cpl_matrix *alpha,
-<a name="l00115"></a>00115 cpl_matrix *beta,
-<a name="l00116"></a>00116 <span class="keywordtype">double</span> *a_da);
+<a name="l00094"></a>00094 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00095"></a>00095 get_chisq(<span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
+<a name="l00096"></a>00096 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
+<a name="l00097"></a>00097 <span class="keyword">const</span> <span class="keywordtype">double</span> *a,
+<a name="l00098"></a>00098 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
+<a name="l00099"></a>00099 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
+<a name="l00100"></a>00100 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma);
+<a name="l00101"></a>00101
+<a name="l00102"></a>00102 <span class="keyword">static</span> <span class="keywordtype">int</span> get_candidate(<span class="keyword">const</span> <span class="keywordtype">double</span> *a, <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
+<a name="l00103"></a>00103 <span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
+<a name="l00104"></a>00104 <span class="keywordtype">double</span> lambda,
+<a name="l00105"></a>00105 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
+<a name="l00106"></a>00106 <span class="keywordtype">double</span> *result),
+<a name="l00107"></a>00107 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
+<a name="l00108"></a>00108 <span class="keywordtype">double</span> result[]),
+<a name="l00109"></a>00109 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
+<a name="l00110"></a>00110 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
+<a name="l00111"></a>00111 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma,
+<a name="l00112"></a>00112 <span class="keywordtype">double</span> *partials,
+<a name="l00113"></a>00113 cpl_matrix *alpha,
+<a name="l00114"></a>00114 cpl_matrix *beta,
+<a name="l00115"></a>00115 <span class="keywordtype">double</span> *a_da);
+<a name="l00116"></a>00116
<a name="l00117"></a>00117
<a name="l00118"></a>00118
-<a name="l00119"></a>00119
-<a name="l00120"></a>00120 <span class="keywordtype">int</span>
-<a name="l00121"></a>00121 sinfo_frame_is_raw_dark(<span class="keywordtype">char</span> * tag);
-<a name="l00122"></a>00122
-<a name="l00128"></a>00128 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00135"></a>00135 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l00136"></a>00136 cpl_frameset *
-<a name="l00137"></a>00137 sinfo_frameset_extract(<span class="keyword">const</span> cpl_frameset *frames,
-<a name="l00138"></a>00138 <span class="keyword">const</span> <span class="keywordtype">char</span> *tag)
-<a name="l00139"></a>00139 {
-<a name="l00140"></a>00140 cpl_frameset *subset = NULL;
-<a name="l00141"></a>00141 <span class="keyword">const</span> cpl_frame *f;
+<a name="l00119"></a>00119 <span class="keywordtype">int</span>
+<a name="l00120"></a>00120 sinfo_frame_is_raw_dark(<span class="keywordtype">char</span> * tag);
+<a name="l00121"></a>00121
+<a name="l00127"></a>00127 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00134"></a>00134 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l00135"></a>00135 cpl_frameset *
+<a name="l00136"></a>00136 sinfo_frameset_extract(<span class="keyword">const</span> cpl_frameset *frames,
+<a name="l00137"></a>00137 <span class="keyword">const</span> <span class="keywordtype">char</span> *tag)
+<a name="l00138"></a>00138 {
+<a name="l00139"></a>00139 cpl_frameset *subset = NULL;
+<a name="l00140"></a>00140 <span class="keyword">const</span> cpl_frame *f;
+<a name="l00141"></a>00141
<a name="l00142"></a>00142
<a name="l00143"></a>00143
-<a name="l00144"></a>00144
-<a name="l00145"></a>00145 assure( frames != NULL, CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Null frameset"</span> );
-<a name="l00146"></a>00146 assure( tag != NULL, CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Null tag"</span> );
-<a name="l00147"></a>00147
-<a name="l00148"></a>00148 subset = cpl_frameset_new();
-<a name="l00149"></a>00149
-<a name="l00150"></a>00150 <span class="keywordflow">for</span> (f = cpl_frameset_find_const(frames, tag);
-<a name="l00151"></a>00151 f != NULL;
-<a name="l00152"></a>00152 f = cpl_frameset_find_const(frames, NULL)) {
-<a name="l00153"></a>00153
-<a name="l00154"></a>00154 cpl_frameset_insert(subset, cpl_frame_duplicate(f));
-<a name="l00155"></a>00155 }
-<a name="l00156"></a>00156 cleanup:
-<a name="l00157"></a>00157 <span class="keywordflow">return</span> subset;
-<a name="l00158"></a>00158 }
+<a name="l00144"></a>00144 assure( frames != NULL, CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Null frameset"</span> );
+<a name="l00145"></a>00145 assure( tag != NULL, CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Null tag"</span> );
+<a name="l00146"></a>00146
+<a name="l00147"></a>00147 subset = cpl_frameset_new();
+<a name="l00148"></a>00148
+<a name="l00149"></a>00149 <span class="keywordflow">for</span> (f = cpl_frameset_find_const(frames, tag);
+<a name="l00150"></a>00150 f != NULL;
+<a name="l00151"></a>00151 f = cpl_frameset_find_const(frames, NULL)) {
+<a name="l00152"></a>00152
+<a name="l00153"></a>00153 cpl_frameset_insert(subset, cpl_frame_duplicate(f));
+<a name="l00154"></a>00154 }
+<a name="l00155"></a>00155 cleanup:
+<a name="l00156"></a>00156 <span class="keywordflow">return</span> subset;
+<a name="l00157"></a>00157 }
+<a name="l00158"></a>00158
<a name="l00159"></a>00159
<a name="l00160"></a>00160
-<a name="l00161"></a>00161
-<a name="l00167"></a>00167 <span class="keywordtype">int</span> sinfo_print_rec_status(<span class="keyword">const</span> <span class="keywordtype">int</span> val) {
-<a name="l00168"></a>00168 <span class="keywordflow">if</span>(cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l00169"></a>00169 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Recipe status at %d"</span>,val);
-<a name="l00170"></a>00170 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"%s"</span>,(<span class="keyword">const</span> <span class="keywordtype">char</span>*) cpl_error_get_message());
-<a name="l00171"></a>00171 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"%s"</span>,(<span class="keyword">const</span> <span class="keywordtype">char</span>*) cpl_error_get_where());
-<a name="l00172"></a>00172 <span class="keywordflow">return</span> -1;
-<a name="l00173"></a>00173 }
-<a name="l00174"></a>00174 <span class="keywordflow">return</span> 0;
-<a name="l00175"></a>00175 }
+<a name="l00166"></a>00166 <span class="keywordtype">int</span> sinfo_print_rec_status(<span class="keyword">const</span> <span class="keywordtype">int</span> val) {
+<a name="l00167"></a>00167 <span class="keywordflow">if</span>(cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l00168"></a>00168 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Recipe status at %d"</span>,val);
+<a name="l00169"></a>00169 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"%s"</span>,(<span class="keyword">const</span> <span class="keywordtype">char</span>*) cpl_error_get_message());
+<a name="l00170"></a>00170 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"%s"</span>,(<span class="keyword">const</span> <span class="keywordtype">char</span>*) cpl_error_get_where());
+<a name="l00171"></a>00171 <span class="keywordflow">return</span> -1;
+<a name="l00172"></a>00172 }
+<a name="l00173"></a>00173 <span class="keywordflow">return</span> 0;
+<a name="l00174"></a>00174 }
+<a name="l00175"></a>00175
<a name="l00176"></a>00176
-<a name="l00177"></a>00177
-<a name="l00194"></a>00194 cpl_vector*
-<a name="l00195"></a>00195 sinfo_vector_clip(<span class="keyword">const</span> cpl_vector* vinp,
-<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">double</span> kappa,
-<a name="l00197"></a>00197 <span class="keyword">const</span> <span class="keywordtype">int</span> n,
-<a name="l00198"></a>00198 <span class="keyword">const</span> <span class="keywordtype">int</span> method)
-<a name="l00199"></a>00199 {
-<a name="l00200"></a>00200 cpl_vector* vout=NULL;
-<a name="l00201"></a>00201 cpl_vector* vtmp=NULL;
-<a name="l00202"></a>00202 <span class="keywordtype">int</span> size=0;
-<a name="l00203"></a>00203 <span class="keywordtype">int</span> j=0;
-<a name="l00204"></a>00204 <span class="keyword">register</span> <span class="keywordtype">int</span> i=0;
-<a name="l00205"></a>00205
-<a name="l00206"></a>00206 <span class="keywordtype">double</span> mean=0;
-<a name="l00207"></a>00207 <span class="keywordtype">double</span> median=0;
-<a name="l00208"></a>00208 <span class="keywordtype">double</span> stdev=0;
-<a name="l00209"></a>00209 <span class="keywordtype">double</span>* pt=NULL;
-<a name="l00210"></a>00210 <span class="keywordtype">double</span>* po=NULL;
-<a name="l00211"></a>00211
-<a name="l00212"></a>00212 cknull(vinp,<span class="stringliteral">"Null input vector"</span>);
-<a name="l00213"></a>00213 check_nomsg(vout=cpl_vector_duplicate(vinp));
-<a name="l00214"></a>00214 check_nomsg(mean=cpl_vector_get_mean(vout));
-<a name="l00215"></a>00215 check_nomsg(median=cpl_vector_get_median_const(vout));
-<a name="l00216"></a>00216 check_nomsg(stdev=cpl_vector_get_stdev(vout));
-<a name="l00217"></a>00217 check_nomsg(pt=cpl_vector_get_data(vtmp));
-<a name="l00218"></a>00218
-<a name="l00219"></a>00219 <span class="keywordflow">if</span>(method == 0) {
-<a name="l00220"></a>00220 <span class="comment">/*</span>
-<a name="l00221"></a>00221 <span class="comment"> are rejected</span>
-<a name="l00222"></a>00222 <span class="comment"> values ||val-mean|| > kappa*sigma</span>
-<a name="l00223"></a>00223 <span class="comment"> */</span>
-<a name="l00224"></a>00224 <span class="keywordflow">for</span>(j=0;j<n;j++) {
-<a name="l00225"></a>00225
-<a name="l00226"></a>00226 check_nomsg(cpl_vector_sort(vout,1)); <span class="comment">/* sort by increasing data */</span>
-<a name="l00227"></a>00227 check_nomsg(po=cpl_vector_get_data(vout));
-<a name="l00228"></a>00228
-<a name="l00229"></a>00229 <span class="keywordflow">if</span>( (size > 1) && (fabs(po[size-1]-mean) > kappa*stdev)) {
-<a name="l00230"></a>00230
-<a name="l00231"></a>00231 size--;
-<a name="l00232"></a>00232 check_nomsg(vtmp=cpl_vector_new(size));
-<a name="l00233"></a>00233 check_nomsg(pt=cpl_vector_get_data(vtmp));
-<a name="l00234"></a>00234 <span class="keywordflow">for</span>(i=0;i<size;i++) {
-<a name="l00235"></a>00235 pt[i]=po[i];
-<a name="l00236"></a>00236 }
-<a name="l00237"></a>00237 check_nomsg(cpl_vector_delete(vout));
-<a name="l00238"></a>00238 check_nomsg(vout=cpl_vector_duplicate(vtmp));
-<a name="l00239"></a>00239 check_nomsg(cpl_vector_delete(vtmp));
-<a name="l00240"></a>00240
-<a name="l00241"></a>00241 check_nomsg(mean=cpl_vector_get_mean(vout));
-<a name="l00242"></a>00242 check_nomsg(stdev=cpl_vector_get_stdev(vout));
-<a name="l00243"></a>00243
-<a name="l00244"></a>00244 }
-<a name="l00245"></a>00245
-<a name="l00246"></a>00246 }
-<a name="l00247"></a>00247
-<a name="l00248"></a>00248 } <span class="keywordflow">else</span> {
-<a name="l00249"></a>00249 <span class="comment">/*</span>
-<a name="l00250"></a>00250 <span class="comment"> are rejected</span>
-<a name="l00251"></a>00251 <span class="comment"> values ||val-median|| > kappa*sigma</span>
-<a name="l00252"></a>00252 <span class="comment"> */</span>
+<a name="l00193"></a>00193 cpl_vector*
+<a name="l00194"></a>00194 sinfo_vector_clip(<span class="keyword">const</span> cpl_vector* vinp,
+<a name="l00195"></a>00195 <span class="keyword">const</span> <span class="keywordtype">double</span> kappa,
+<a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">int</span> n,
+<a name="l00197"></a>00197 <span class="keyword">const</span> <span class="keywordtype">int</span> method)
+<a name="l00198"></a>00198 {
+<a name="l00199"></a>00199 cpl_vector* vout=NULL;
+<a name="l00200"></a>00200 cpl_vector* vtmp=NULL;
+<a name="l00201"></a>00201 <span class="keywordtype">int</span> size=0;
+<a name="l00202"></a>00202 <span class="keywordtype">int</span> j=0;
+<a name="l00203"></a>00203 <span class="keyword">register</span> <span class="keywordtype">int</span> i=0;
+<a name="l00204"></a>00204
+<a name="l00205"></a>00205 <span class="keywordtype">double</span> mean=0;
+<a name="l00206"></a>00206 <span class="keywordtype">double</span> median=0;
+<a name="l00207"></a>00207 <span class="keywordtype">double</span> stdev=0;
+<a name="l00208"></a>00208 <span class="keywordtype">double</span>* pt=NULL;
+<a name="l00209"></a>00209 <span class="keywordtype">double</span>* po=NULL;
+<a name="l00210"></a>00210
+<a name="l00211"></a>00211 cknull(vinp,<span class="stringliteral">"Null input vector"</span>);
+<a name="l00212"></a>00212 check_nomsg(vout=cpl_vector_duplicate(vinp));
+<a name="l00213"></a>00213 check_nomsg(mean=cpl_vector_get_mean(vout));
+<a name="l00214"></a>00214 check_nomsg(median=cpl_vector_get_median_const(vout));
+<a name="l00215"></a>00215 check_nomsg(stdev=cpl_vector_get_stdev(vout));
+<a name="l00216"></a>00216 check_nomsg(pt=cpl_vector_get_data(vtmp));
+<a name="l00217"></a>00217
+<a name="l00218"></a>00218 <span class="keywordflow">if</span>(method == 0) {
+<a name="l00219"></a>00219 <span class="comment">/*</span>
+<a name="l00220"></a>00220 <span class="comment"> are rejected</span>
+<a name="l00221"></a>00221 <span class="comment"> values ||val-mean|| > kappa*sigma</span>
+<a name="l00222"></a>00222 <span class="comment"> */</span>
+<a name="l00223"></a>00223 <span class="keywordflow">for</span>(j=0;j<n;j++) {
+<a name="l00224"></a>00224
+<a name="l00225"></a>00225 check_nomsg(cpl_vector_sort(vout,1)); <span class="comment">/* sort by increasing data */</span>
+<a name="l00226"></a>00226 check_nomsg(po=cpl_vector_get_data(vout));
+<a name="l00227"></a>00227
+<a name="l00228"></a>00228 <span class="keywordflow">if</span>( (size > 1) && (fabs(po[size-1]-mean) > kappa*stdev)) {
+<a name="l00229"></a>00229
+<a name="l00230"></a>00230 size--;
+<a name="l00231"></a>00231 check_nomsg(vtmp=cpl_vector_new(size));
+<a name="l00232"></a>00232 check_nomsg(pt=cpl_vector_get_data(vtmp));
+<a name="l00233"></a>00233 <span class="keywordflow">for</span>(i=0;i<size;i++) {
+<a name="l00234"></a>00234 pt[i]=po[i];
+<a name="l00235"></a>00235 }
+<a name="l00236"></a>00236 check_nomsg(cpl_vector_delete(vout));
+<a name="l00237"></a>00237 check_nomsg(vout=cpl_vector_duplicate(vtmp));
+<a name="l00238"></a>00238 check_nomsg(cpl_vector_delete(vtmp));
+<a name="l00239"></a>00239
+<a name="l00240"></a>00240 check_nomsg(mean=cpl_vector_get_mean(vout));
+<a name="l00241"></a>00241 check_nomsg(stdev=cpl_vector_get_stdev(vout));
+<a name="l00242"></a>00242
+<a name="l00243"></a>00243 }
+<a name="l00244"></a>00244
+<a name="l00245"></a>00245 }
+<a name="l00246"></a>00246
+<a name="l00247"></a>00247 } <span class="keywordflow">else</span> {
+<a name="l00248"></a>00248 <span class="comment">/*</span>
+<a name="l00249"></a>00249 <span class="comment"> are rejected</span>
+<a name="l00250"></a>00250 <span class="comment"> values ||val-median|| > kappa*sigma</span>
+<a name="l00251"></a>00251 <span class="comment"> */</span>
+<a name="l00252"></a>00252
<a name="l00253"></a>00253
-<a name="l00254"></a>00254
-<a name="l00255"></a>00255 <span class="keywordflow">for</span>(j=0;j<n;j++) {
-<a name="l00256"></a>00256
-<a name="l00257"></a>00257 check_nomsg(cpl_vector_sort(vout,1)); <span class="comment">/* sort by increasing data */</span>
-<a name="l00258"></a>00258 check_nomsg(po=cpl_vector_get_data(vout));
-<a name="l00259"></a>00259
-<a name="l00260"></a>00260 <span class="keywordflow">if</span>( (size > 1) && (fabs(po[size-1]-median) > kappa*stdev)) {
-<a name="l00261"></a>00261
-<a name="l00262"></a>00262 size--;
-<a name="l00263"></a>00263 check_nomsg(vtmp=cpl_vector_new(size));
-<a name="l00264"></a>00264 check_nomsg(pt=cpl_vector_get_data(vtmp));
-<a name="l00265"></a>00265 <span class="keywordflow">for</span>(i=0;i<size;i++) {
-<a name="l00266"></a>00266 pt[i]=po[i];
-<a name="l00267"></a>00267 }
-<a name="l00268"></a>00268 check_nomsg(cpl_vector_delete(vout));
-<a name="l00269"></a>00269 check_nomsg(vout=cpl_vector_duplicate(vtmp));
-<a name="l00270"></a>00270 check_nomsg(cpl_vector_delete(vtmp));
-<a name="l00271"></a>00271
-<a name="l00272"></a>00272 check_nomsg(median=cpl_vector_get_median_const(vout));
-<a name="l00273"></a>00273 check_nomsg(stdev=cpl_vector_get_stdev(vout));
-<a name="l00274"></a>00274
-<a name="l00275"></a>00275 }
-<a name="l00276"></a>00276
-<a name="l00277"></a>00277 }
+<a name="l00254"></a>00254 <span class="keywordflow">for</span>(j=0;j<n;j++) {
+<a name="l00255"></a>00255
+<a name="l00256"></a>00256 check_nomsg(cpl_vector_sort(vout,1)); <span class="comment">/* sort by increasing data */</span>
+<a name="l00257"></a>00257 check_nomsg(po=cpl_vector_get_data(vout));
+<a name="l00258"></a>00258
+<a name="l00259"></a>00259 <span class="keywordflow">if</span>( (size > 1) && (fabs(po[size-1]-median) > kappa*stdev)) {
+<a name="l00260"></a>00260
+<a name="l00261"></a>00261 size--;
+<a name="l00262"></a>00262 check_nomsg(vtmp=cpl_vector_new(size));
+<a name="l00263"></a>00263 check_nomsg(pt=cpl_vector_get_data(vtmp));
+<a name="l00264"></a>00264 <span class="keywordflow">for</span>(i=0;i<size;i++) {
+<a name="l00265"></a>00265 pt[i]=po[i];
+<a name="l00266"></a>00266 }
+<a name="l00267"></a>00267 check_nomsg(cpl_vector_delete(vout));
+<a name="l00268"></a>00268 check_nomsg(vout=cpl_vector_duplicate(vtmp));
+<a name="l00269"></a>00269 check_nomsg(cpl_vector_delete(vtmp));
+<a name="l00270"></a>00270
+<a name="l00271"></a>00271 check_nomsg(median=cpl_vector_get_median_const(vout));
+<a name="l00272"></a>00272 check_nomsg(stdev=cpl_vector_get_stdev(vout));
+<a name="l00273"></a>00273
+<a name="l00274"></a>00274 }
+<a name="l00275"></a>00275
+<a name="l00276"></a>00276 }
+<a name="l00277"></a>00277
<a name="l00278"></a>00278
<a name="l00279"></a>00279
<a name="l00280"></a>00280
-<a name="l00281"></a>00281
-<a name="l00282"></a>00282 }
-<a name="l00283"></a>00283 <span class="keywordflow">return</span> vout;
-<a name="l00284"></a>00284 cleanup:
-<a name="l00285"></a>00285 <span class="keywordflow">return</span> NULL;
+<a name="l00281"></a>00281 }
+<a name="l00282"></a>00282 <span class="keywordflow">return</span> vout;
+<a name="l00283"></a>00283 cleanup:
+<a name="l00284"></a>00284 <span class="keywordflow">return</span> NULL;
+<a name="l00285"></a>00285
<a name="l00286"></a>00286
-<a name="l00287"></a>00287
-<a name="l00288"></a>00288 }
+<a name="l00287"></a>00287 }
+<a name="l00288"></a>00288
<a name="l00289"></a>00289
<a name="l00290"></a>00290
-<a name="l00291"></a>00291
-<a name="l00292"></a>00292 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00326"></a>00326 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00327"></a>00327 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00328"></a>00328 get_candidate(<span class="keyword">const</span> <span class="keywordtype">double</span> *a, <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
-<a name="l00329"></a>00329 <span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
-<a name="l00330"></a>00330 <span class="keywordtype">double</span> lambda,
-<a name="l00331"></a>00331 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
-<a name="l00332"></a>00332 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> result[]),
-<a name="l00333"></a>00333 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
-<a name="l00334"></a>00334 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
-<a name="l00335"></a>00335 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma,
-<a name="l00336"></a>00336 <span class="keywordtype">double</span> *partials,
-<a name="l00337"></a>00337 cpl_matrix *alpha,
-<a name="l00338"></a>00338 cpl_matrix *beta,
-<a name="l00339"></a>00339 <span class="keywordtype">double</span> *a_da)
-<a name="l00340"></a>00340 {
-<a name="l00341"></a>00341 <span class="keywordtype">int</span> Mfit = 0; <span class="comment">/* Number of non-constant fit parameters */</span>
-<a name="l00342"></a>00342 cpl_matrix *da; <span class="comment">/* Solution of alpha * da = beta */</span>
-<a name="l00343"></a>00343 <span class="keywordtype">double</span> *alpha_data;
-<a name="l00344"></a>00344 <span class="keywordtype">double</span> *beta_data;
-<a name="l00345"></a>00345 <span class="keywordtype">double</span> *da_data;
-<a name="l00346"></a>00346 <span class="keywordtype">int</span> i, imfit = 0;
-<a name="l00347"></a>00347 <span class="keywordtype">int</span> j, jmfit = 0;
-<a name="l00348"></a>00348 <span class="keywordtype">int</span> k = 0;
-<a name="l00349"></a>00349
-<a name="l00350"></a>00350 <span class="comment">/* For efficiency, don't check input in this static function */</span>
-<a name="l00351"></a>00351
-<a name="l00352"></a>00352 Mfit = cpl_matrix_get_nrow(alpha);
-<a name="l00353"></a>00353
-<a name="l00354"></a>00354 alpha_data = cpl_matrix_get_data(alpha);
-<a name="l00355"></a>00355 beta_data = cpl_matrix_get_data(beta);
-<a name="l00356"></a>00356
-<a name="l00357"></a>00357 <span class="comment">/* Build alpha, beta:</span>
-<a name="l00358"></a>00358 <span class="comment"> *</span>
-<a name="l00359"></a>00359 <span class="comment"> * alpha[i,j] = sum_{k=1,N} (sigma_k)^-2 * df/da_i * df/da_j *</span>
-<a name="l00360"></a>00360 <span class="comment"> * (1 + delta_ij lambda) ,</span>
-<a name="l00361"></a>00361 <span class="comment"> *</span>
-<a name="l00362"></a>00362 <span class="comment"> * beta[i] = sum_{k=1,N} (sigma_k)^-2 * ( y_k - f(x_k) ) * df/da_i</span>
-<a name="l00363"></a>00363 <span class="comment"> *</span>
-<a name="l00364"></a>00364 <span class="comment"> * where (i,j) loop over the non-constant parameters (0 to Mfit-1),</span>
-<a name="l00365"></a>00365 <span class="comment"> * delta is Kronecker's delta, and all df/da are evaluated in x_k</span>
-<a name="l00366"></a>00366 <span class="comment"> */</span>
-<a name="l00367"></a>00367
-<a name="l00368"></a>00368 cpl_matrix_fill(alpha, 0.0);
-<a name="l00369"></a>00369 cpl_matrix_fill(beta , 0.0);
-<a name="l00370"></a>00370
-<a name="l00371"></a>00371 <span class="keywordflow">for</span> (k = 0; k < N; k++)
-<a name="l00372"></a>00372 {
-<a name="l00373"></a>00373 <span class="keywordtype">double</span> sm2 = 0.0; <span class="comment">/* (sigma_k)^-2 */</span>
-<a name="l00374"></a>00374 <span class="keywordtype">double</span> fx_k = 0.0; <span class="comment">/* f(x_k) */</span>
-<a name="l00375"></a>00375 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_k = &(x[0+k*D]); <span class="comment">/* x_k */</span>
-<a name="l00376"></a>00376
-<a name="l00377"></a>00377 <span class="keywordflow">if</span> (sigma == NULL)
-<a name="l00378"></a>00378 {
-<a name="l00379"></a>00379 sm2 = 1.0;
-<a name="l00380"></a>00380 }
-<a name="l00381"></a>00381 <span class="keywordflow">else</span>
-<a name="l00382"></a>00382 {
-<a name="l00383"></a>00383 sm2 = 1.0 / (sigma[k] * sigma[k]);
-<a name="l00384"></a>00384 }
-<a name="l00385"></a>00385
-<a name="l00386"></a>00386 <span class="comment">/* Evaluate f(x_k) */</span>
-<a name="l00387"></a>00387 cpl_ensure( f(x_k, a, &fx_k) == 0, CPL_ERROR_ILLEGAL_INPUT, -1);
-<a name="l00388"></a>00388
-<a name="l00389"></a>00389 <span class="comment">/* Evaluate (all) df/da (x_k) */</span>
-<a name="l00390"></a>00390 cpl_ensure( dfda(x_k, a, partials) == 0,
-<a name="l00391"></a>00391 CPL_ERROR_ILLEGAL_INPUT, -1);
-<a name="l00392"></a>00392
-<a name="l00393"></a>00393 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
-<a name="l00394"></a>00394 {
-<a name="l00395"></a>00395 <span class="keywordflow">if</span> (ia[i] != 0)
-<a name="l00396"></a>00396 {
-<a name="l00397"></a>00397 <span class="comment">/* Beta */</span>
-<a name="l00398"></a>00398 beta_data[imfit] +=
-<a name="l00399"></a>00399 sm2 * (y[k] - fx_k) * partials[i];
-<a name="l00400"></a>00400
-<a name="l00401"></a>00401 <span class="comment">/* Alpha is symmetrical, so compute</span>
-<a name="l00402"></a>00402 <span class="comment"> only lower-left part */</span>
-<a name="l00403"></a>00403 <span class="keywordflow">for</span> (j = 0, jmfit = 0; j < i; j++)
-<a name="l00404"></a>00404 {
-<a name="l00405"></a>00405 <span class="keywordflow">if</span> (ia[j] != 0)
-<a name="l00406"></a>00406 {
-<a name="l00407"></a>00407 alpha_data[jmfit + imfit*Mfit] +=
-<a name="l00408"></a>00408 sm2 * partials[i] *
-<a name="l00409"></a>00409 partials[j];
-<a name="l00410"></a>00410
-<a name="l00411"></a>00411 jmfit += 1;
-<a name="l00412"></a>00412 }
-<a name="l00413"></a>00413 }
-<a name="l00414"></a>00414
-<a name="l00415"></a>00415 <span class="comment">/* Alpha, diagonal terms */</span>
-<a name="l00416"></a>00416 j = i;
-<a name="l00417"></a>00417 jmfit = imfit;
-<a name="l00418"></a>00418
-<a name="l00419"></a>00419 alpha_data[jmfit + imfit*Mfit] +=
-<a name="l00420"></a>00420 sm2 * partials[i] *
-<a name="l00421"></a>00421 partials[j] * (1 + lambda);
-<a name="l00422"></a>00422
-<a name="l00423"></a>00423 imfit += 1;
-<a name="l00424"></a>00424 }
-<a name="l00425"></a>00425 }
-<a name="l00426"></a>00426
-<a name="l00427"></a>00427 assert( imfit == Mfit );
-<a name="l00428"></a>00428 }
-<a name="l00429"></a>00429
-<a name="l00430"></a>00430 <span class="comment">/* Create upper-right part of alpha */</span>
-<a name="l00431"></a>00431 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++) {
-<a name="l00432"></a>00432 <span class="keywordflow">if</span> (ia[i] != 0) {
-<a name="l00433"></a>00433 <span class="keywordflow">for</span> (j = i+1, jmfit = imfit+1; j < M; j++) {
-<a name="l00434"></a>00434 <span class="keywordflow">if</span> (ia[j] != 0) {
-<a name="l00435"></a>00435 alpha_data[jmfit+imfit*Mfit] = alpha_data[imfit+jmfit*Mfit];
-<a name="l00436"></a>00436 jmfit += 1;
-<a name="l00437"></a>00437 }
-<a name="l00438"></a>00438 }
-<a name="l00439"></a>00439 assert( jmfit == Mfit );
-<a name="l00440"></a>00440 imfit += 1;
-<a name="l00441"></a>00441 }
-<a name="l00442"></a>00442 }
-<a name="l00443"></a>00443 assert( imfit == Mfit );
-<a name="l00444"></a>00444
-<a name="l00445"></a>00445 da = cpl_matrix_solve(alpha, beta);
-<a name="l00446"></a>00446
-<a name="l00447"></a>00447 cpl_ensure(da != NULL, cpl_error_get_code(), -1);
-<a name="l00448"></a>00448
-<a name="l00449"></a>00449 <span class="comment">/* Create a+da vector by adding a and da */</span>
-<a name="l00450"></a>00450 da_data = cpl_matrix_get_data(da);
-<a name="l00451"></a>00451
-<a name="l00452"></a>00452 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
-<a name="l00453"></a>00453 {
-<a name="l00454"></a>00454 <span class="keywordflow">if</span> (ia[i] != 0)
-<a name="l00455"></a>00455 {
-<a name="l00456"></a>00456 a_da[i] = a[i] + da_data[0 + imfit*1];
-<a name="l00457"></a>00457
-<a name="l00458"></a>00458 imfit += 1;
-<a name="l00459"></a>00459 }
-<a name="l00460"></a>00460 <span class="keywordflow">else</span>
-<a name="l00461"></a>00461 {
-<a name="l00462"></a>00462 a_da[i] = a[i];
-<a name="l00463"></a>00463 }
-<a name="l00464"></a>00464 }
-<a name="l00465"></a>00465
-<a name="l00466"></a>00466 assert( imfit == Mfit );
-<a name="l00467"></a>00467
-<a name="l00468"></a>00468 cpl_matrix_delete(da);
-<a name="l00469"></a>00469
-<a name="l00470"></a>00470 <span class="keywordflow">return</span> 0;
-<a name="l00471"></a>00471 }
-<a name="l00472"></a>00472
-<a name="l00473"></a>00473 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00291"></a>00291 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00325"></a>00325 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00326"></a>00326 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00327"></a>00327 get_candidate(<span class="keyword">const</span> <span class="keywordtype">double</span> *a, <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
+<a name="l00328"></a>00328 <span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
+<a name="l00329"></a>00329 <span class="keywordtype">double</span> lambda,
+<a name="l00330"></a>00330 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
+<a name="l00331"></a>00331 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> result[]),
+<a name="l00332"></a>00332 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
+<a name="l00333"></a>00333 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
+<a name="l00334"></a>00334 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma,
+<a name="l00335"></a>00335 <span class="keywordtype">double</span> *partials,
+<a name="l00336"></a>00336 cpl_matrix *alpha,
+<a name="l00337"></a>00337 cpl_matrix *beta,
+<a name="l00338"></a>00338 <span class="keywordtype">double</span> *a_da)
+<a name="l00339"></a>00339 {
+<a name="l00340"></a>00340 <span class="keywordtype">int</span> Mfit = 0; <span class="comment">/* Number of non-constant fit parameters */</span>
+<a name="l00341"></a>00341 cpl_matrix *da; <span class="comment">/* Solution of alpha * da = beta */</span>
+<a name="l00342"></a>00342 <span class="keywordtype">double</span> *alpha_data;
+<a name="l00343"></a>00343 <span class="keywordtype">double</span> *beta_data;
+<a name="l00344"></a>00344 <span class="keywordtype">double</span> *da_data;
+<a name="l00345"></a>00345 <span class="keywordtype">int</span> i, imfit = 0;
+<a name="l00346"></a>00346 <span class="keywordtype">int</span> j, jmfit = 0;
+<a name="l00347"></a>00347 <span class="keywordtype">int</span> k = 0;
+<a name="l00348"></a>00348
+<a name="l00349"></a>00349 <span class="comment">/* For efficiency, don't check input in this static function */</span>
+<a name="l00350"></a>00350
+<a name="l00351"></a>00351 Mfit = cpl_matrix_get_nrow(alpha);
+<a name="l00352"></a>00352
+<a name="l00353"></a>00353 alpha_data = cpl_matrix_get_data(alpha);
+<a name="l00354"></a>00354 beta_data = cpl_matrix_get_data(beta);
+<a name="l00355"></a>00355
+<a name="l00356"></a>00356 <span class="comment">/* Build alpha, beta:</span>
+<a name="l00357"></a>00357 <span class="comment"> *</span>
+<a name="l00358"></a>00358 <span class="comment"> * alpha[i,j] = sum_{k=1,N} (sigma_k)^-2 * df/da_i * df/da_j *</span>
+<a name="l00359"></a>00359 <span class="comment"> * (1 + delta_ij lambda) ,</span>
+<a name="l00360"></a>00360 <span class="comment"> *</span>
+<a name="l00361"></a>00361 <span class="comment"> * beta[i] = sum_{k=1,N} (sigma_k)^-2 * ( y_k - f(x_k) ) * df/da_i</span>
+<a name="l00362"></a>00362 <span class="comment"> *</span>
+<a name="l00363"></a>00363 <span class="comment"> * where (i,j) loop over the non-constant parameters (0 to Mfit-1),</span>
+<a name="l00364"></a>00364 <span class="comment"> * delta is Kronecker's delta, and all df/da are evaluated in x_k</span>
+<a name="l00365"></a>00365 <span class="comment"> */</span>
+<a name="l00366"></a>00366
+<a name="l00367"></a>00367 cpl_matrix_fill(alpha, 0.0);
+<a name="l00368"></a>00368 cpl_matrix_fill(beta , 0.0);
+<a name="l00369"></a>00369
+<a name="l00370"></a>00370 <span class="keywordflow">for</span> (k = 0; k < N; k++)
+<a name="l00371"></a>00371 {
+<a name="l00372"></a>00372 <span class="keywordtype">double</span> sm2 = 0.0; <span class="comment">/* (sigma_k)^-2 */</span>
+<a name="l00373"></a>00373 <span class="keywordtype">double</span> fx_k = 0.0; <span class="comment">/* f(x_k) */</span>
+<a name="l00374"></a>00374 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_k = &(x[0+k*D]); <span class="comment">/* x_k */</span>
+<a name="l00375"></a>00375
+<a name="l00376"></a>00376 <span class="keywordflow">if</span> (sigma == NULL)
+<a name="l00377"></a>00377 {
+<a name="l00378"></a>00378 sm2 = 1.0;
+<a name="l00379"></a>00379 }
+<a name="l00380"></a>00380 <span class="keywordflow">else</span>
+<a name="l00381"></a>00381 {
+<a name="l00382"></a>00382 sm2 = 1.0 / (sigma[k] * sigma[k]);
+<a name="l00383"></a>00383 }
+<a name="l00384"></a>00384
+<a name="l00385"></a>00385 <span class="comment">/* Evaluate f(x_k) */</span>
+<a name="l00386"></a>00386 cpl_ensure( f(x_k, a, &fx_k) == 0, CPL_ERROR_ILLEGAL_INPUT, -1);
+<a name="l00387"></a>00387
+<a name="l00388"></a>00388 <span class="comment">/* Evaluate (all) df/da (x_k) */</span>
+<a name="l00389"></a>00389 cpl_ensure( dfda(x_k, a, partials) == 0,
+<a name="l00390"></a>00390 CPL_ERROR_ILLEGAL_INPUT, -1);
+<a name="l00391"></a>00391
+<a name="l00392"></a>00392 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
+<a name="l00393"></a>00393 {
+<a name="l00394"></a>00394 <span class="keywordflow">if</span> (ia[i] != 0)
+<a name="l00395"></a>00395 {
+<a name="l00396"></a>00396 <span class="comment">/* Beta */</span>
+<a name="l00397"></a>00397 beta_data[imfit] +=
+<a name="l00398"></a>00398 sm2 * (y[k] - fx_k) * partials[i];
+<a name="l00399"></a>00399
+<a name="l00400"></a>00400 <span class="comment">/* Alpha is symmetrical, so compute</span>
+<a name="l00401"></a>00401 <span class="comment"> only lower-left part */</span>
+<a name="l00402"></a>00402 <span class="keywordflow">for</span> (j = 0, jmfit = 0; j < i; j++)
+<a name="l00403"></a>00403 {
+<a name="l00404"></a>00404 <span class="keywordflow">if</span> (ia[j] != 0)
+<a name="l00405"></a>00405 {
+<a name="l00406"></a>00406 alpha_data[jmfit + imfit*Mfit] +=
+<a name="l00407"></a>00407 sm2 * partials[i] *
+<a name="l00408"></a>00408 partials[j];
+<a name="l00409"></a>00409
+<a name="l00410"></a>00410 jmfit += 1;
+<a name="l00411"></a>00411 }
+<a name="l00412"></a>00412 }
+<a name="l00413"></a>00413
+<a name="l00414"></a>00414 <span class="comment">/* Alpha, diagonal terms */</span>
+<a name="l00415"></a>00415 j = i;
+<a name="l00416"></a>00416 jmfit = imfit;
+<a name="l00417"></a>00417
+<a name="l00418"></a>00418 alpha_data[jmfit + imfit*Mfit] +=
+<a name="l00419"></a>00419 sm2 * partials[i] *
+<a name="l00420"></a>00420 partials[j] * (1 + lambda);
+<a name="l00421"></a>00421
+<a name="l00422"></a>00422 imfit += 1;
+<a name="l00423"></a>00423 }
+<a name="l00424"></a>00424 }
+<a name="l00425"></a>00425
+<a name="l00426"></a>00426 cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
+<a name="l00427"></a>00427 }
+<a name="l00428"></a>00428
+<a name="l00429"></a>00429 <span class="comment">/* Create upper-right part of alpha */</span>
+<a name="l00430"></a>00430 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++) {
+<a name="l00431"></a>00431 <span class="keywordflow">if</span> (ia[i] != 0) {
+<a name="l00432"></a>00432 <span class="keywordflow">for</span> (j = i+1, jmfit = imfit+1; j < M; j++) {
+<a name="l00433"></a>00433 <span class="keywordflow">if</span> (ia[j] != 0) {
+<a name="l00434"></a>00434 alpha_data[jmfit+imfit*Mfit] = alpha_data[imfit+jmfit*Mfit];
+<a name="l00435"></a>00435 jmfit += 1;
+<a name="l00436"></a>00436 }
+<a name="l00437"></a>00437 }
+<a name="l00438"></a>00438 cpl_ensure( jmfit == Mfit,CPL_ERROR_ILLEGAL_INPUT,-1 );
+<a name="l00439"></a>00439 imfit += 1;
+<a name="l00440"></a>00440 }
+<a name="l00441"></a>00441 }
+<a name="l00442"></a>00442 cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
+<a name="l00443"></a>00443
+<a name="l00444"></a>00444 da = cpl_matrix_solve(alpha, beta);
+<a name="l00445"></a>00445
+<a name="l00446"></a>00446 cpl_ensure(da != NULL, cpl_error_get_code(), -1);
+<a name="l00447"></a>00447
+<a name="l00448"></a>00448 <span class="comment">/* Create a+da vector by adding a and da */</span>
+<a name="l00449"></a>00449 da_data = cpl_matrix_get_data(da);
+<a name="l00450"></a>00450
+<a name="l00451"></a>00451 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
+<a name="l00452"></a>00452 {
+<a name="l00453"></a>00453 <span class="keywordflow">if</span> (ia[i] != 0)
+<a name="l00454"></a>00454 {
+<a name="l00455"></a>00455 a_da[i] = a[i] + da_data[0 + imfit*1];
+<a name="l00456"></a>00456
+<a name="l00457"></a>00457 imfit += 1;
+<a name="l00458"></a>00458 }
+<a name="l00459"></a>00459 <span class="keywordflow">else</span>
+<a name="l00460"></a>00460 {
+<a name="l00461"></a>00461 a_da[i] = a[i];
+<a name="l00462"></a>00462 }
+<a name="l00463"></a>00463 }
+<a name="l00464"></a>00464
+<a name="l00465"></a>00465 cpl_ensure( imfit == Mfit ,CPL_ERROR_ILLEGAL_INPUT,-1);
+<a name="l00466"></a>00466
+<a name="l00467"></a>00467 cpl_matrix_delete(da);
+<a name="l00468"></a>00468
+<a name="l00469"></a>00469 <span class="keywordflow">return</span> 0;
+<a name="l00470"></a>00470 }
+<a name="l00471"></a>00471
+<a name="l00472"></a>00472 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00473"></a>00473
<a name="l00474"></a>00474
-<a name="l00475"></a>00475
-<a name="l00476"></a>00476 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00497"></a>00497 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00498"></a>00498
-<a name="l00499"></a>00499 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00500"></a>00500 get_chisq(<span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
-<a name="l00501"></a>00501 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
-<a name="l00502"></a>00502 <span class="keyword">const</span> <span class="keywordtype">double</span> *a,
-<a name="l00503"></a>00503 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
-<a name="l00504"></a>00504 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
-<a name="l00505"></a>00505 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma)
-<a name="l00506"></a>00506 {
-<a name="l00507"></a>00507 <span class="keywordtype">double</span> chi_sq; <span class="comment">/* Result */</span>
-<a name="l00508"></a>00508 <span class="keywordtype">int</span> i = 0;
-<a name="l00509"></a>00509
-<a name="l00510"></a>00510 <span class="comment">/* For efficiency, don't check input in this static function */</span>
-<a name="l00511"></a>00511 chi_sq = 0.0;
-<a name="l00512"></a>00512 <span class="keywordflow">for</span> (i = 0; i < N; i++)
-<a name="l00513"></a>00513 {
-<a name="l00514"></a>00514 <span class="keywordtype">double</span> fx_i;
-<a name="l00515"></a>00515 <span class="keywordtype">double</span> residual; <span class="comment">/* Residual in units of uncertainty */</span>
-<a name="l00516"></a>00516 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_i = &(x[0+i*D]);
-<a name="l00517"></a>00517
-<a name="l00518"></a>00518 <span class="comment">/* Evaluate */</span>
-<a name="l00519"></a>00519 cpl_ensure( f(x_i,
-<a name="l00520"></a>00520 a,
-<a name="l00521"></a>00521 &fx_i) == 0, CPL_ERROR_ILLEGAL_INPUT, -1.0);
-<a name="l00522"></a>00522
-<a name="l00523"></a>00523 <span class="comment">/* Accumulate */</span>
-<a name="l00524"></a>00524 <span class="keywordflow">if</span> (sigma == NULL)
-<a name="l00525"></a>00525 {
-<a name="l00526"></a>00526 residual = (fx_i - y[i]);
-<a name="l00527"></a>00527 }
-<a name="l00528"></a>00528 <span class="keywordflow">else</span>
-<a name="l00529"></a>00529 {
-<a name="l00530"></a>00530 residual = (fx_i - y[i]) / sigma[i];
-<a name="l00531"></a>00531 }
-<a name="l00532"></a>00532
-<a name="l00533"></a>00533 chi_sq += residual*residual;
-<a name="l00534"></a>00534
-<a name="l00535"></a>00535 }
-<a name="l00536"></a>00536
-<a name="l00537"></a>00537 <span class="keywordflow">return</span> chi_sq;
-<a name="l00538"></a>00538 }
+<a name="l00475"></a>00475 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00496"></a>00496 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00497"></a>00497
+<a name="l00498"></a>00498 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00499"></a>00499 get_chisq(<span class="keywordtype">int</span> N, <span class="keywordtype">int</span> D,
+<a name="l00500"></a>00500 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[], <span class="keyword">const</span> <span class="keywordtype">double</span> a[], <span class="keywordtype">double</span> *result),
+<a name="l00501"></a>00501 <span class="keyword">const</span> <span class="keywordtype">double</span> *a,
+<a name="l00502"></a>00502 <span class="keyword">const</span> <span class="keywordtype">double</span> *x,
+<a name="l00503"></a>00503 <span class="keyword">const</span> <span class="keywordtype">double</span> *y,
+<a name="l00504"></a>00504 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma)
+<a name="l00505"></a>00505 {
+<a name="l00506"></a>00506 <span class="keywordtype">double</span> chi_sq; <span class="comment">/* Result */</span>
+<a name="l00507"></a>00507 <span class="keywordtype">int</span> i = 0;
+<a name="l00508"></a>00508
+<a name="l00509"></a>00509 <span class="comment">/* For efficiency, don't check input in this static function */</span>
+<a name="l00510"></a>00510 chi_sq = 0.0;
+<a name="l00511"></a>00511 <span class="keywordflow">for</span> (i = 0; i < N; i++)
+<a name="l00512"></a>00512 {
+<a name="l00513"></a>00513 <span class="keywordtype">double</span> fx_i;
+<a name="l00514"></a>00514 <span class="keywordtype">double</span> residual; <span class="comment">/* Residual in units of uncertainty */</span>
+<a name="l00515"></a>00515 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_i = &(x[0+i*D]);
+<a name="l00516"></a>00516
+<a name="l00517"></a>00517 <span class="comment">/* Evaluate */</span>
+<a name="l00518"></a>00518 cpl_ensure( f(x_i,
+<a name="l00519"></a>00519 a,
+<a name="l00520"></a>00520 &fx_i) == 0, CPL_ERROR_ILLEGAL_INPUT, -1.0);
+<a name="l00521"></a>00521
+<a name="l00522"></a>00522 <span class="comment">/* Accumulate */</span>
+<a name="l00523"></a>00523 <span class="keywordflow">if</span> (sigma == NULL)
+<a name="l00524"></a>00524 {
+<a name="l00525"></a>00525 residual = (fx_i - y[i]);
+<a name="l00526"></a>00526 }
+<a name="l00527"></a>00527 <span class="keywordflow">else</span>
+<a name="l00528"></a>00528 {
+<a name="l00529"></a>00529 residual = (fx_i - y[i]) / sigma[i];
+<a name="l00530"></a>00530 }
+<a name="l00531"></a>00531
+<a name="l00532"></a>00532 chi_sq += residual*residual;
+<a name="l00533"></a>00533
+<a name="l00534"></a>00534 }
+<a name="l00535"></a>00535
+<a name="l00536"></a>00536 <span class="keywordflow">return</span> chi_sq;
+<a name="l00537"></a>00537 }
+<a name="l00538"></a>00538
<a name="l00539"></a>00539
<a name="l00540"></a>00540
-<a name="l00541"></a>00541
-<a name="l00542"></a>00542 <span class="preprocessor">#ifndef CPL_VECTOR_FIT_MAXITER</span>
-<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="preprocessor">#define CPL_VECTOR_FIT_MAXITER 1000</span>
-<a name="l00544"></a>00544 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00545"></a>00545 <span class="preprocessor"></span><span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00612"></a>00612 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00613"></a>00613 cpl_error_code
-<a name="l00614"></a>00614 sinfo_fit_lm(<span class="keyword">const</span> cpl_matrix *x,
-<a name="l00615"></a>00615 <span class="keyword">const</span> cpl_matrix *sigma_x,
-<a name="l00616"></a>00616 <span class="keyword">const</span> cpl_vector *y,
-<a name="l00617"></a>00617 <span class="keyword">const</span> cpl_vector *sigma_y,
-<a name="l00618"></a>00618 cpl_vector *a,
-<a name="l00619"></a>00619 <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
-<a name="l00620"></a>00620 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[],
-<a name="l00621"></a>00621 <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
-<a name="l00622"></a>00622 <span class="keywordtype">double</span> *result),
-<a name="l00623"></a>00623 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[],
-<a name="l00624"></a>00624 <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
-<a name="l00625"></a>00625 <span class="keywordtype">double</span> result[]),
-<a name="l00626"></a>00626 <span class="keywordtype">double</span> *mse,
-<a name="l00627"></a>00627 <span class="keywordtype">double</span> *red_chisq,
-<a name="l00628"></a>00628 cpl_matrix **covariance)
-<a name="l00629"></a>00629 {
-<a name="l00630"></a>00630 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_data = NULL; <span class="comment">/* Pointer to input data */</span>
-<a name="l00631"></a>00631 <span class="keyword">const</span> <span class="keywordtype">double</span> *y_data = NULL; <span class="comment">/* Pointer to input data */</span>
-<a name="l00632"></a>00632 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma_data = NULL; <span class="comment">/* Pointer to input data */</span>
-<a name="l00633"></a>00633 <span class="keywordtype">int</span> N = 0; <span class="comment">/* Number of data points */</span>
-<a name="l00634"></a>00634 <span class="keywordtype">int</span> D = 0; <span class="comment">/* Dimension of x-points */</span>
-<a name="l00635"></a>00635 <span class="keywordtype">int</span> M = 0; <span class="comment">/* Number of fit parameters */</span>
-<a name="l00636"></a>00636 <span class="keywordtype">int</span> Mfit = 0; <span class="comment">/* Number of non-constant fit</span>
-<a name="l00637"></a>00637 <span class="comment"> parameters */</span>
-<a name="l00638"></a>00638
-<a name="l00639"></a>00639 <span class="keywordtype">double</span> lambda = 0.0; <span class="comment">/* Lambda in L-M algorithm */</span>
-<a name="l00640"></a>00640 <span class="keywordtype">double</span> MAXLAMBDA = 10e40; <span class="comment">/* Parameter to control the graceful exit</span>
-<a name="l00641"></a>00641 <span class="comment"> if steepest descent unexpectedly fails */</span>
-<a name="l00642"></a>00642 <span class="keywordtype">double</span> chi_sq = 0.0; <span class="comment">/* Current chi^2 */</span>
-<a name="l00643"></a>00643 <span class="keywordtype">int</span> count = 0; <span class="comment">/* Number of successive small improvements</span>
-<a name="l00644"></a>00644 <span class="comment"> in chi^2 */</span>
-<a name="l00645"></a>00645 <span class="keywordtype">int</span> iterations = 0;
-<a name="l00646"></a>00646
-<a name="l00647"></a>00647 cpl_matrix *alpha = NULL; <span class="comment">/* The MxM ~curvature matrix used in L-M */</span>
-<a name="l00648"></a>00648 cpl_matrix *beta = NULL; <span class="comment">/* Mx1 matrix = -.5 grad(chi^2) */</span>
-<a name="l00649"></a>00649 <span class="keywordtype">double</span> *a_data = NULL; <span class="comment">/* Parameters, a */</span>
-<a name="l00650"></a>00650 <span class="keywordtype">double</span> *a_da = NULL; <span class="comment">/* Candidate position a+da */</span>
-<a name="l00651"></a>00651 <span class="keywordtype">double</span> *part = NULL; <span class="comment">/* The partial derivatives df/da */</span>
-<a name="l00652"></a>00652 <span class="keywordtype">int</span> *ia_local = NULL; <span class="comment">/* non-NULL version of ia */</span>
-<a name="l00653"></a>00653
-<a name="l00654"></a>00654 <span class="comment">/* If covariance computation is requested, then either</span>
-<a name="l00655"></a>00655 <span class="comment"> * return the covariance matrix or return NULL.</span>
-<a name="l00656"></a>00656 <span class="comment"> */</span>
-<a name="l00657"></a>00657 <span class="keywordflow">if</span> (covariance != NULL) *covariance = NULL;
-<a name="l00658"></a>00658
-<a name="l00659"></a>00659 <span class="comment">/* Validate input */</span>
-<a name="l00660"></a>00660 cpl_ensure_code(x != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00661"></a>00661 cpl_ensure_code(sigma_x == NULL, CPL_ERROR_UNSUPPORTED_MODE);
-<a name="l00662"></a>00662 cpl_ensure_code(y != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00663"></a>00663 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00664"></a>00664 <span class="comment">/* ia may be NULL */</span>
-<a name="l00665"></a>00665 cpl_ensure_code(f != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00666"></a>00666 cpl_ensure_code(dfda != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l00667"></a>00667
-<a name="l00668"></a>00668 <span class="comment">/* Chi^2 and covariance computations require sigmas to be known */</span>
-<a name="l00669"></a>00669 cpl_ensure_code( sigma_y != NULL ||
-<a name="l00670"></a>00670 (red_chisq == NULL && covariance == NULL),
-<a name="l00671"></a>00671 CPL_ERROR_INCOMPATIBLE_INPUT);
-<a name="l00672"></a>00672
-<a name="l00673"></a>00673 D = cpl_matrix_get_ncol(x);
-<a name="l00674"></a>00674 N = cpl_matrix_get_nrow(x);
-<a name="l00675"></a>00675 M = cpl_vector_get_size(a);
-<a name="l00676"></a>00676 cpl_ensure_code(N > 0 && D > 0 && M > 0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00677"></a>00677
-<a name="l00678"></a>00678 cpl_ensure_code( cpl_vector_get_size(y) == N,
-<a name="l00679"></a>00679 CPL_ERROR_INCOMPATIBLE_INPUT);
-<a name="l00680"></a>00680
-<a name="l00681"></a>00681 x_data = cpl_matrix_get_data_const(x);
-<a name="l00682"></a>00682 y_data = cpl_vector_get_data_const(y);
-<a name="l00683"></a>00683 a_data = cpl_vector_get_data(a);
-<a name="l00684"></a>00684
-<a name="l00685"></a>00685 <span class="keywordflow">if</span> (sigma_y != NULL)
-<a name="l00686"></a>00686 {
-<a name="l00687"></a>00687 cpl_ensure_code( cpl_vector_get_size(sigma_y) == N,
-<a name="l00688"></a>00688 CPL_ERROR_INCOMPATIBLE_INPUT);
-<a name="l00689"></a>00689 <span class="comment">/* Sigmas must be positive */</span>
-<a name="l00690"></a>00690 cpl_ensure_code( cpl_vector_get_min (sigma_y) > 0,
-<a name="l00691"></a>00691 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00692"></a>00692 sigma_data = cpl_vector_get_data_const(sigma_y);
-<a name="l00693"></a>00693 }
-<a name="l00694"></a>00694
-<a name="l00695"></a>00695 ia_local = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
-<a name="l00696"></a>00696 cpl_ensure_code(ia_local != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00697"></a>00697
-<a name="l00698"></a>00698 <span class="comment">/* Count non-constant fit parameters, copy ia */</span>
-<a name="l00699"></a>00699 <span class="keywordflow">if</span> (ia != NULL)
-<a name="l00700"></a>00700 {
-<a name="l00701"></a>00701 <span class="keywordtype">int</span> i;
-<a name="l00702"></a>00702
-<a name="l00703"></a>00703 Mfit = 0;
-<a name="l00704"></a>00704 <span class="keywordflow">for</span> (i = 0; i < M; i++)
-<a name="l00705"></a>00705 {
-<a name="l00706"></a>00706 ia_local[i] = ia[i];
-<a name="l00707"></a>00707
-<a name="l00708"></a>00708 <span class="keywordflow">if</span> (ia[i] != 0)
-<a name="l00709"></a>00709 {
-<a name="l00710"></a>00710 Mfit += 1;
-<a name="l00711"></a>00711 }
-<a name="l00712"></a>00712 }
-<a name="l00713"></a>00713
-<a name="l00714"></a>00714 <span class="keywordflow">if</span> (! (Mfit > 0))
-<a name="l00715"></a>00715 {
-<a name="l00716"></a>00716 cpl_free(ia_local);
-<a name="l00717"></a>00717 cpl_ensure_code( CPL_FALSE,
-<a name="l00718"></a>00718 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00719"></a>00719 }
-<a name="l00720"></a>00720 }
-<a name="l00721"></a>00721 <span class="keywordflow">else</span>
-<a name="l00722"></a>00722 {
-<a name="l00723"></a>00723 <span class="comment">/* All parameters participate */</span>
-<a name="l00724"></a>00724 <span class="keywordtype">int</span> i;
-<a name="l00725"></a>00725
-<a name="l00726"></a>00726 Mfit = M;
-<a name="l00727"></a>00727
-<a name="l00728"></a>00728 <span class="keywordflow">for</span> (i = 0; i < M; i++)
-<a name="l00729"></a>00729 {
-<a name="l00730"></a>00730 ia_local[i] = 1;
-<a name="l00731"></a>00731 }
-<a name="l00732"></a>00732 }
-<a name="l00733"></a>00733
-<a name="l00734"></a>00734 <span class="comment">/* To compute reduced chi^2, we need N > Mfit */</span>
-<a name="l00735"></a>00735 <span class="keywordflow">if</span> (! ( red_chisq == NULL || N > Mfit ) )
-<a name="l00736"></a>00736 {
-<a name="l00737"></a>00737 cpl_free(ia_local);
-<a name="l00738"></a>00738 cpl_ensure_code(
-<a name="l00739"></a>00739 CPL_FALSE,
-<a name="l00740"></a>00740 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00741"></a>00741 }
-<a name="l00742"></a>00742
-<a name="l00743"></a>00743 <span class="comment">/* Create alpha, beta, a_da, part work space */</span>
-<a name="l00744"></a>00744 alpha = cpl_matrix_new(Mfit, Mfit);
-<a name="l00745"></a>00745 <span class="keywordflow">if</span> (alpha == NULL)
-<a name="l00746"></a>00746 {
-<a name="l00747"></a>00747 cpl_free(ia_local);
-<a name="l00748"></a>00748 cpl_ensure_code(
-<a name="l00749"></a>00749 CPL_FALSE,
-<a name="l00750"></a>00750 CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00751"></a>00751 }
-<a name="l00752"></a>00752
-<a name="l00753"></a>00753 beta = cpl_matrix_new(Mfit, 1);
-<a name="l00754"></a>00754 <span class="keywordflow">if</span> (beta == NULL)
-<a name="l00755"></a>00755 {
-<a name="l00756"></a>00756 cpl_free(ia_local);
-<a name="l00757"></a>00757 cpl_matrix_delete(alpha);
-<a name="l00758"></a>00758 cpl_ensure_code(
-<a name="l00759"></a>00759 CPL_FALSE,
-<a name="l00760"></a>00760 CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00761"></a>00761 }
-<a name="l00762"></a>00762
-<a name="l00763"></a>00763 a_da = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
-<a name="l00764"></a>00764 <span class="keywordflow">if</span> (a_da == NULL)
-<a name="l00765"></a>00765 {
-<a name="l00766"></a>00766 cpl_free(ia_local);
-<a name="l00767"></a>00767 cpl_matrix_delete(alpha);
-<a name="l00768"></a>00768 cpl_matrix_delete(beta);
-<a name="l00769"></a>00769 cpl_ensure_code(
-<a name="l00770"></a>00770 CPL_FALSE,
-<a name="l00771"></a>00771 CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00772"></a>00772 }
-<a name="l00773"></a>00773
-<a name="l00774"></a>00774 part = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
-<a name="l00775"></a>00775 <span class="keywordflow">if</span> (part == NULL)
-<a name="l00776"></a>00776 {
-<a name="l00777"></a>00777 cpl_free(ia_local);
-<a name="l00778"></a>00778 cpl_matrix_delete(alpha);
-<a name="l00779"></a>00779 cpl_matrix_delete(beta);
-<a name="l00780"></a>00780 cpl_free(a_da);
-<a name="l00781"></a>00781 cpl_ensure_code(
-<a name="l00782"></a>00782 CPL_FALSE,
-<a name="l00783"></a>00783 CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l00784"></a>00784 }
-<a name="l00785"></a>00785
-<a name="l00786"></a>00786 <span class="comment">/* Initialize loop variables */</span>
-<a name="l00787"></a>00787 lambda = 0.001;
-<a name="l00788"></a>00788 count = 0;
-<a name="l00789"></a>00789 iterations = 0;
-<a name="l00790"></a>00790 <span class="keywordflow">if</span>( (chi_sq = get_chisq(N, D, f, a_data, x_data, y_data, sigma_data)) < 0)
-<a name="l00791"></a>00791 {
-<a name="l00792"></a>00792 cpl_free(ia_local);
-<a name="l00793"></a>00793 cpl_matrix_delete(alpha);
-<a name="l00794"></a>00794 cpl_matrix_delete(beta);
-<a name="l00795"></a>00795 cpl_free(a_da);
-<a name="l00796"></a>00796 cpl_free(part);
-<a name="l00797"></a>00797 cpl_ensure_code(
-<a name="l00798"></a>00798 CPL_FALSE,
-<a name="l00799"></a>00799 cpl_error_get_code());
-<a name="l00800"></a>00800 }
-<a name="l00801"></a>00801
-<a name="l00802"></a>00802 <span class="comment">/* uves_msg_debug("Initial chi^2 = %f", chi_sq); */</span>
-<a name="l00803"></a>00803
-<a name="l00804"></a>00804 <span class="comment">/* Iterate until chi^2 didn't improve substantially many (say, 5)</span>
-<a name="l00805"></a>00805 <span class="comment"> times in a row */</span>
-<a name="l00806"></a>00806 <span class="keywordflow">while</span> (count < 5 &&
-<a name="l00807"></a>00807 lambda < MAXLAMBDA &&
-<a name="l00808"></a>00808 iterations < CPL_VECTOR_FIT_MAXITER)
-<a name="l00809"></a>00809 {
-<a name="l00810"></a>00810 <span class="comment">/* In each iteration lambda increases, or chi^2 decreases or</span>
-<a name="l00811"></a>00811 <span class="comment"> count increases. Because chi^2 is bounded from below</span>
-<a name="l00812"></a>00812 <span class="comment"> (and lambda and count from above), the loop will terminate */</span>
-<a name="l00813"></a>00813
-<a name="l00814"></a>00814 <span class="keywordtype">double</span> chi_sq_candidate = 0.0;
-<a name="l00815"></a>00815 <span class="keywordtype">int</span> returncode = 0;
-<a name="l00816"></a>00816
-<a name="l00817"></a>00817 <span class="comment">/* Get candidate position in parameter space = a+da,</span>
-<a name="l00818"></a>00818 <span class="comment"> * where alpha * da = beta .</span>
-<a name="l00819"></a>00819 <span class="comment"> * Increase lambda until alpha is non-singular</span>
-<a name="l00820"></a>00820 <span class="comment"> */</span>
-<a name="l00821"></a>00821
-<a name="l00822"></a>00822 <span class="keywordflow">while</span>( (returncode = get_candidate(a_data, ia_local,
-<a name="l00823"></a>00823 M, N, D,
-<a name="l00824"></a>00824 lambda, f, dfda,
-<a name="l00825"></a>00825 x_data, y_data, sigma_data,
-<a name="l00826"></a>00826 part, alpha, beta, a_da)
-<a name="l00827"></a>00827 ) != 0
-<a name="l00828"></a>00828 && cpl_error_get_code() == CPL_ERROR_SINGULAR_MATRIX
-<a name="l00829"></a>00829 && lambda < MAXLAMBDA)
-<a name="l00830"></a>00830 {
-<a name="l00831"></a>00831 <span class="comment">/* uves_msg_debug("Singular matrix. lambda = %e", lambda); */</span>
-<a name="l00832"></a>00832 cpl_error_reset();
-<a name="l00833"></a>00833 lambda *= 9.0;
-<a name="l00834"></a>00834 }
-<a name="l00835"></a>00835
-<a name="l00836"></a>00836 <span class="comment">/* Set error if lambda diverged */</span>
-<a name="l00837"></a>00837 <span class="keywordflow">if</span> ( !( lambda < MAXLAMBDA ) )
-<a name="l00838"></a>00838 {
-<a name="l00839"></a>00839 cpl_free(ia_local);
-<a name="l00840"></a>00840 cpl_matrix_delete(alpha);
-<a name="l00841"></a>00841 cpl_matrix_delete(beta);
-<a name="l00842"></a>00842 cpl_free(a_da);
-<a name="l00843"></a>00843 cpl_free(part);
-<a name="l00844"></a>00844 cpl_ensure_code(
-<a name="l00845"></a>00845 CPL_FALSE,
-<a name="l00846"></a>00846 CPL_ERROR_CONTINUE);
-<a name="l00847"></a>00847 }
-<a name="l00848"></a>00848
-<a name="l00849"></a>00849 <span class="keywordflow">if</span> (returncode != 0)
-<a name="l00850"></a>00850 {
-<a name="l00851"></a>00851 cpl_free(ia_local);
-<a name="l00852"></a>00852 cpl_matrix_delete(alpha);
-<a name="l00853"></a>00853 cpl_matrix_delete(beta);
-<a name="l00854"></a>00854 cpl_free(a_da);
-<a name="l00855"></a>00855 cpl_free(part);
-<a name="l00856"></a>00856 cpl_ensure_code(
-<a name="l00857"></a>00857 CPL_FALSE,
-<a name="l00858"></a>00858 cpl_error_get_code());
-<a name="l00859"></a>00859 }
-<a name="l00860"></a>00860
-<a name="l00861"></a>00861 <span class="comment">/* Get chi^2(a+da) */</span>
-<a name="l00862"></a>00862 <span class="keywordflow">if</span> ((chi_sq_candidate = get_chisq(N, D, f, a_da,
-<a name="l00863"></a>00863 x_data, y_data, sigma_data)) < 0)
-<a name="l00864"></a>00864 {
-<a name="l00865"></a>00865 cpl_free(ia_local);
-<a name="l00866"></a>00866 cpl_matrix_delete(alpha);
-<a name="l00867"></a>00867 cpl_matrix_delete(beta);
-<a name="l00868"></a>00868 cpl_free(a_da);
-<a name="l00869"></a>00869 cpl_free(part);
-<a name="l00870"></a>00870 cpl_ensure_code(
-<a name="l00871"></a>00871 CPL_FALSE,
-<a name="l00872"></a>00872 cpl_error_get_code());
-<a name="l00873"></a>00873 }
-<a name="l00874"></a>00874
-<a name="l00875"></a>00875 <span class="comment">/* uves_msg_debug("Chi^2 = %f Candidate = %f Lambda = %e",</span>
-<a name="l00876"></a>00876 <span class="comment"> chi_sq, chi_sq_candidate, lambda); */</span>
-<a name="l00877"></a>00877
-<a name="l00878"></a>00878 <span class="keywordflow">if</span> (chi_sq_candidate > chi_sq)
-<a name="l00879"></a>00879 {
-<a name="l00880"></a>00880 <span class="comment">/* Move towards steepest descent */</span>
-<a name="l00881"></a>00881 lambda *= 9.0;
-<a name="l00882"></a>00882 }
-<a name="l00883"></a>00883 <span class="keywordflow">else</span>
-<a name="l00884"></a>00884 {
-<a name="l00885"></a>00885 <span class="comment">/* Move towards Newton's algorithm */</span>
-<a name="l00886"></a>00886 lambda /= 10.0;
-<a name="l00887"></a>00887
-<a name="l00888"></a>00888 <span class="comment">/* Count the number of successive improvements in chi^2 of</span>
-<a name="l00889"></a>00889 <span class="comment"> less than 0.01 relative */</span>
-<a name="l00890"></a>00890 <span class="keywordflow">if</span> ( chi_sq == 0 ||
-<a name="l00891"></a>00891 (chi_sq - chi_sq_candidate)/chi_sq < .01)
-<a name="l00892"></a>00892 {
-<a name="l00893"></a>00893 count += 1;
-<a name="l00894"></a>00894 }
-<a name="l00895"></a>00895 <span class="keywordflow">else</span>
-<a name="l00896"></a>00896 {
-<a name="l00897"></a>00897 <span class="comment">/* Chi^2 improved by a significant amount,</span>
-<a name="l00898"></a>00898 <span class="comment"> reset counter */</span>
-<a name="l00899"></a>00899 count = 0;
-<a name="l00900"></a>00900 }
-<a name="l00901"></a>00901
-<a name="l00902"></a>00902 <span class="comment">/* chi^2 improved, update a and chi^2 */</span>
-<a name="l00903"></a>00903 {
-<a name="l00904"></a>00904 <span class="keywordtype">int</span> i;
-<a name="l00905"></a>00905 <span class="keywordflow">for</span> (i = 0; i < M; i++) a_data[i] = a_da[i];
-<a name="l00906"></a>00906 }
-<a name="l00907"></a>00907 chi_sq = chi_sq_candidate;
-<a name="l00908"></a>00908 }
-<a name="l00909"></a>00909 iterations++;
-<a name="l00910"></a>00910 }
-<a name="l00911"></a>00911
-<a name="l00912"></a>00912 <span class="comment">/* Set error if we didn't converge */</span>
-<a name="l00913"></a>00913 <span class="keywordflow">if</span> ( !( lambda < MAXLAMBDA && iterations < CPL_VECTOR_FIT_MAXITER ) )
-<a name="l00914"></a>00914 {
-<a name="l00915"></a>00915 cpl_free(ia_local);
-<a name="l00916"></a>00916 cpl_matrix_delete(alpha);
-<a name="l00917"></a>00917 cpl_matrix_delete(beta);
-<a name="l00918"></a>00918 cpl_free(a_da);
-<a name="l00919"></a>00919 cpl_free(part);
-<a name="l00920"></a>00920 cpl_ensure_code(
-<a name="l00921"></a>00921 CPL_FALSE,
-<a name="l00922"></a>00922 CPL_ERROR_CONTINUE);
-<a name="l00923"></a>00923 }
-<a name="l00924"></a>00924
-<a name="l00925"></a>00925 <span class="comment">/* Compute mse if requested */</span>
-<a name="l00926"></a>00926 <span class="keywordflow">if</span> (mse != NULL)
-<a name="l00927"></a>00927 {
-<a name="l00928"></a>00928 <span class="keywordtype">int</span> i;
-<a name="l00929"></a>00929
-<a name="l00930"></a>00930 *mse = 0.0;
-<a name="l00931"></a>00931
-<a name="l00932"></a>00932 <span class="keywordflow">for</span>(i = 0; i < N; i++)
-<a name="l00933"></a>00933 {
-<a name="l00934"></a>00934 <span class="keywordtype">double</span> fx_i = 0.0;
-<a name="l00935"></a>00935 <span class="keywordtype">double</span> residual = 0.0;
-<a name="l00936"></a>00936
-<a name="l00937"></a>00937 <span class="comment">/* Evaluate f(x_i) at the best fit parameters */</span>
-<a name="l00938"></a>00938 <span class="keywordflow">if</span>( f(&(x_data[i*D]),
-<a name="l00939"></a>00939 a_data,
-<a name="l00940"></a>00940 &fx_i) != 0)
-<a name="l00941"></a>00941 {
-<a name="l00942"></a>00942 cpl_free(ia_local);
-<a name="l00943"></a>00943 cpl_matrix_delete(alpha);
-<a name="l00944"></a>00944 cpl_matrix_delete(beta);
-<a name="l00945"></a>00945 cpl_free(a_da);
-<a name="l00946"></a>00946 cpl_free(part);
-<a name="l00947"></a>00947 cpl_ensure_code(
-<a name="l00948"></a>00948 CPL_FALSE,
-<a name="l00949"></a>00949 CPL_ERROR_ILLEGAL_INPUT);
-<a name="l00950"></a>00950 }
-<a name="l00951"></a>00951
-<a name="l00952"></a>00952 residual = y_data[i] - fx_i;
-<a name="l00953"></a>00953 *mse += residual * residual;
-<a name="l00954"></a>00954 }
-<a name="l00955"></a>00955 *mse /= N;
-<a name="l00956"></a>00956 }
-<a name="l00957"></a>00957
-<a name="l00958"></a>00958 <span class="comment">/* Compute reduced chi^2 if requested */</span>
-<a name="l00959"></a>00959 <span class="keywordflow">if</span> (red_chisq != NULL)
-<a name="l00960"></a>00960 {
-<a name="l00961"></a>00961 <span class="comment">/* We already know the optimal chi^2 (and that N > Mfit)*/</span>
-<a name="l00962"></a>00962 *red_chisq = chi_sq / (N-Mfit);
-<a name="l00963"></a>00963 }
-<a name="l00964"></a>00964
-<a name="l00965"></a>00965 <span class="comment">/* Compute covariance matrix if requested</span>
-<a name="l00966"></a>00966 <span class="comment"> * cov = alpha(lambda=0)^-1</span>
-<a name="l00967"></a>00967 <span class="comment"> */</span>
-<a name="l00968"></a>00968 <span class="keywordflow">if</span> (covariance != NULL)
-<a name="l00969"></a>00969 {
-<a name="l00970"></a>00970 cpl_matrix *cov;
-<a name="l00971"></a>00971
-<a name="l00972"></a>00972 <span class="keywordflow">if</span>( get_candidate(a_data, ia_local,
-<a name="l00973"></a>00973 M, N, D, 0.0, f, dfda,
-<a name="l00974"></a>00974 x_data, y_data, sigma_data,
-<a name="l00975"></a>00975 part, alpha, beta, a_da)
-<a name="l00976"></a>00976 != 0)
-<a name="l00977"></a>00977 {
-<a name="l00978"></a>00978 cpl_free(ia_local);
-<a name="l00979"></a>00979 cpl_matrix_delete(alpha);
-<a name="l00980"></a>00980 cpl_matrix_delete(beta);
-<a name="l00981"></a>00981 cpl_free(a_da);
-<a name="l00982"></a>00982 cpl_free(part);
-<a name="l00983"></a>00983 cpl_ensure_code(
-<a name="l00984"></a>00984 CPL_FALSE,
-<a name="l00985"></a>00985 cpl_error_get_code());
-<a name="l00986"></a>00986 }
-<a name="l00987"></a>00987
-<a name="l00988"></a>00988 cov = cpl_matrix_invert_create(alpha);
-<a name="l00989"></a>00989 <span class="keywordflow">if</span> (cov == NULL)
-<a name="l00990"></a>00990 {
-<a name="l00991"></a>00991 cpl_free(ia_local);
-<a name="l00992"></a>00992 cpl_matrix_delete(alpha);
-<a name="l00993"></a>00993 cpl_matrix_delete(beta);
-<a name="l00994"></a>00994 cpl_free(a_da);
-<a name="l00995"></a>00995 cpl_free(part);
-<a name="l00996"></a>00996 cpl_ensure_code(
-<a name="l00997"></a>00997 CPL_FALSE,
-<a name="l00998"></a>00998 cpl_error_get_code());
-<a name="l00999"></a>00999 }
-<a name="l01000"></a>01000
-<a name="l01001"></a>01001 <span class="comment">/* Make sure that variances are positive */</span>
-<a name="l01002"></a>01002 {
-<a name="l01003"></a>01003 <span class="keywordtype">int</span> i;
-<a name="l01004"></a>01004 <span class="keywordflow">for</span> (i = 0; i < Mfit; i++)
-<a name="l01005"></a>01005 {
-<a name="l01006"></a>01006 <span class="keywordflow">if</span> ( !(cpl_matrix_get(cov, i, i) > 0) )
-<a name="l01007"></a>01007 {
-<a name="l01008"></a>01008 cpl_free(ia_local);
-<a name="l01009"></a>01009 cpl_matrix_delete(alpha);
-<a name="l01010"></a>01010 cpl_matrix_delete(beta);
-<a name="l01011"></a>01011 cpl_free(a_da);
-<a name="l01012"></a>01012 cpl_free(part);
-<a name="l01013"></a>01013 cpl_matrix_delete(cov);
-<a name="l01014"></a>01014 *covariance = NULL;
-<a name="l01015"></a>01015 cpl_ensure_code(
-<a name="l01016"></a>01016 CPL_FALSE,
-<a name="l01017"></a>01017 CPL_ERROR_SINGULAR_MATRIX);
-<a name="l01018"></a>01018 }
-<a name="l01019"></a>01019 }
-<a name="l01020"></a>01020 }
-<a name="l01021"></a>01021
-<a name="l01022"></a>01022 <span class="comment">/* Expand covariance matrix from Mfit x Mfit</span>
-<a name="l01023"></a>01023 <span class="comment"> to M x M. Set rows/columns corresponding to fixed</span>
-<a name="l01024"></a>01024 <span class="comment"> parameters to zero */</span>
-<a name="l01025"></a>01025
-<a name="l01026"></a>01026 *covariance = cpl_matrix_new(M, M);
-<a name="l01027"></a>01027 <span class="keywordflow">if</span> (*covariance == NULL)
-<a name="l01028"></a>01028 {
-<a name="l01029"></a>01029 cpl_free(ia_local);
-<a name="l01030"></a>01030 cpl_matrix_delete(alpha);
-<a name="l01031"></a>01031 cpl_matrix_delete(beta);
-<a name="l01032"></a>01032 cpl_free(a_da);
-<a name="l01033"></a>01033 cpl_free(part);
-<a name="l01034"></a>01034 cpl_matrix_delete(cov);
-<a name="l01035"></a>01035 cpl_ensure_code(
-<a name="l01036"></a>01036 CPL_FALSE,
-<a name="l01037"></a>01037 CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l01038"></a>01038 }
-<a name="l01039"></a>01039
-<a name="l01040"></a>01040 {
-<a name="l01041"></a>01041 <span class="keywordtype">int</span> j, jmfit;
-<a name="l01042"></a>01042
-<a name="l01043"></a>01043 <span class="keywordflow">for</span> (j = 0, jmfit = 0; j < M; j++)
-<a name="l01044"></a>01044 <span class="keywordflow">if</span> (ia_local[j] != 0)
-<a name="l01045"></a>01045 {
-<a name="l01046"></a>01046 <span class="keywordtype">int</span> i, imfit;
-<a name="l01047"></a>01047
-<a name="l01048"></a>01048 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
-<a name="l01049"></a>01049 <span class="keywordflow">if</span> (ia_local[i] != 0)
-<a name="l01050"></a>01050 {
-<a name="l01051"></a>01051 cpl_matrix_set(*covariance, i, j,
-<a name="l01052"></a>01052 cpl_matrix_get(
-<a name="l01053"></a>01053 cov, imfit, jmfit));
-<a name="l01054"></a>01054 imfit += 1;
-<a name="l01055"></a>01055 }
-<a name="l01056"></a>01056
-<a name="l01057"></a>01057 assert( imfit == Mfit );
-<a name="l01058"></a>01058
-<a name="l01059"></a>01059 jmfit += 1;
-<a name="l01060"></a>01060 }
-<a name="l01061"></a>01061
-<a name="l01062"></a>01062 assert( jmfit == Mfit );
-<a name="l01063"></a>01063 }
-<a name="l01064"></a>01064
-<a name="l01065"></a>01065 cpl_matrix_delete(cov);
-<a name="l01066"></a>01066 }
-<a name="l01067"></a>01067
-<a name="l01068"></a>01068 cpl_free(ia_local);
-<a name="l01069"></a>01069 cpl_matrix_delete(alpha);
-<a name="l01070"></a>01070 cpl_matrix_delete(beta);
-<a name="l01071"></a>01071 cpl_free(a_da);
-<a name="l01072"></a>01072 cpl_free(part);
-<a name="l01073"></a>01073
-<a name="l01074"></a>01074 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01075"></a>01075 }
+<a name="l00541"></a>00541 <span class="preprocessor">#ifndef CPL_VECTOR_FIT_MAXITER</span>
+<a name="l00542"></a>00542 <span class="preprocessor"></span><span class="preprocessor">#define CPL_VECTOR_FIT_MAXITER 1000</span>
+<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00544"></a>00544 <span class="preprocessor"></span><span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00611"></a>00611 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00612"></a>00612 cpl_error_code
+<a name="l00613"></a>00613 sinfo_fit_lm(<span class="keyword">const</span> cpl_matrix *x,
+<a name="l00614"></a>00614 <span class="keyword">const</span> cpl_matrix *sigma_x,
+<a name="l00615"></a>00615 <span class="keyword">const</span> cpl_vector *y,
+<a name="l00616"></a>00616 <span class="keyword">const</span> cpl_vector *sigma_y,
+<a name="l00617"></a>00617 cpl_vector *a,
+<a name="l00618"></a>00618 <span class="keyword">const</span> <span class="keywordtype">int</span> ia[],
+<a name="l00619"></a>00619 <span class="keywordtype">int</span> (*f)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[],
+<a name="l00620"></a>00620 <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
+<a name="l00621"></a>00621 <span class="keywordtype">double</span> *result),
+<a name="l00622"></a>00622 <span class="keywordtype">int</span> (*dfda)(<span class="keyword">const</span> <span class="keywordtype">double</span> x[],
+<a name="l00623"></a>00623 <span class="keyword">const</span> <span class="keywordtype">double</span> a[],
+<a name="l00624"></a>00624 <span class="keywordtype">double</span> result[]),
+<a name="l00625"></a>00625 <span class="keywordtype">double</span> *mse,
+<a name="l00626"></a>00626 <span class="keywordtype">double</span> *red_chisq,
+<a name="l00627"></a>00627 cpl_matrix **covariance)
+<a name="l00628"></a>00628 {
+<a name="l00629"></a>00629 <span class="keyword">const</span> <span class="keywordtype">double</span> *x_data = NULL; <span class="comment">/* Pointer to input data */</span>
+<a name="l00630"></a>00630 <span class="keyword">const</span> <span class="keywordtype">double</span> *y_data = NULL; <span class="comment">/* Pointer to input data */</span>
+<a name="l00631"></a>00631 <span class="keyword">const</span> <span class="keywordtype">double</span> *sigma_data = NULL; <span class="comment">/* Pointer to input data */</span>
+<a name="l00632"></a>00632 <span class="keywordtype">int</span> N = 0; <span class="comment">/* Number of data points */</span>
+<a name="l00633"></a>00633 <span class="keywordtype">int</span> D = 0; <span class="comment">/* Dimension of x-points */</span>
+<a name="l00634"></a>00634 <span class="keywordtype">int</span> M = 0; <span class="comment">/* Number of fit parameters */</span>
+<a name="l00635"></a>00635 <span class="keywordtype">int</span> Mfit = 0; <span class="comment">/* Number of non-constant fit</span>
+<a name="l00636"></a>00636 <span class="comment"> parameters */</span>
+<a name="l00637"></a>00637
+<a name="l00638"></a>00638 <span class="keywordtype">double</span> lambda = 0.0; <span class="comment">/* Lambda in L-M algorithm */</span>
+<a name="l00639"></a>00639 <span class="keywordtype">double</span> MAXLAMBDA = 10e40; <span class="comment">/* Parameter to control the graceful exit</span>
+<a name="l00640"></a>00640 <span class="comment"> if steepest descent unexpectedly fails */</span>
+<a name="l00641"></a>00641 <span class="keywordtype">double</span> chi_sq = 0.0; <span class="comment">/* Current chi^2 */</span>
+<a name="l00642"></a>00642 <span class="keywordtype">int</span> count = 0; <span class="comment">/* Number of successive small improvements</span>
+<a name="l00643"></a>00643 <span class="comment"> in chi^2 */</span>
+<a name="l00644"></a>00644 <span class="keywordtype">int</span> iterations = 0;
+<a name="l00645"></a>00645
+<a name="l00646"></a>00646 cpl_matrix *alpha = NULL; <span class="comment">/* The MxM ~curvature matrix used in L-M */</span>
+<a name="l00647"></a>00647 cpl_matrix *beta = NULL; <span class="comment">/* Mx1 matrix = -.5 grad(chi^2) */</span>
+<a name="l00648"></a>00648 <span class="keywordtype">double</span> *a_data = NULL; <span class="comment">/* Parameters, a */</span>
+<a name="l00649"></a>00649 <span class="keywordtype">double</span> *a_da = NULL; <span class="comment">/* Candidate position a+da */</span>
+<a name="l00650"></a>00650 <span class="keywordtype">double</span> *part = NULL; <span class="comment">/* The partial derivatives df/da */</span>
+<a name="l00651"></a>00651 <span class="keywordtype">int</span> *ia_local = NULL; <span class="comment">/* non-NULL version of ia */</span>
+<a name="l00652"></a>00652
+<a name="l00653"></a>00653 <span class="comment">/* If covariance computation is requested, then either</span>
+<a name="l00654"></a>00654 <span class="comment"> * return the covariance matrix or return NULL.</span>
+<a name="l00655"></a>00655 <span class="comment"> */</span>
+<a name="l00656"></a>00656 <span class="keywordflow">if</span> (covariance != NULL) *covariance = NULL;
+<a name="l00657"></a>00657
+<a name="l00658"></a>00658 <span class="comment">/* Validate input */</span>
+<a name="l00659"></a>00659 cpl_ensure_code(x != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00660"></a>00660 cpl_ensure_code(sigma_x == NULL, CPL_ERROR_UNSUPPORTED_MODE);
+<a name="l00661"></a>00661 cpl_ensure_code(y != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00662"></a>00662 cpl_ensure_code(a != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00663"></a>00663 <span class="comment">/* ia may be NULL */</span>
+<a name="l00664"></a>00664 cpl_ensure_code(f != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00665"></a>00665 cpl_ensure_code(dfda != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l00666"></a>00666
+<a name="l00667"></a>00667 <span class="comment">/* Chi^2 and covariance computations require sigmas to be known */</span>
+<a name="l00668"></a>00668 cpl_ensure_code( sigma_y != NULL ||
+<a name="l00669"></a>00669 (red_chisq == NULL && covariance == NULL),
+<a name="l00670"></a>00670 CPL_ERROR_INCOMPATIBLE_INPUT);
+<a name="l00671"></a>00671
+<a name="l00672"></a>00672 D = cpl_matrix_get_ncol(x);
+<a name="l00673"></a>00673 N = cpl_matrix_get_nrow(x);
+<a name="l00674"></a>00674 M = cpl_vector_get_size(a);
+<a name="l00675"></a>00675 cpl_ensure_code(N > 0 && D > 0 && M > 0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00676"></a>00676
+<a name="l00677"></a>00677 cpl_ensure_code( cpl_vector_get_size(y) == N,
+<a name="l00678"></a>00678 CPL_ERROR_INCOMPATIBLE_INPUT);
+<a name="l00679"></a>00679
+<a name="l00680"></a>00680 x_data = cpl_matrix_get_data_const(x);
+<a name="l00681"></a>00681 y_data = cpl_vector_get_data_const(y);
+<a name="l00682"></a>00682 a_data = cpl_vector_get_data(a);
+<a name="l00683"></a>00683
+<a name="l00684"></a>00684 <span class="keywordflow">if</span> (sigma_y != NULL)
+<a name="l00685"></a>00685 {
+<a name="l00686"></a>00686 cpl_ensure_code( cpl_vector_get_size(sigma_y) == N,
+<a name="l00687"></a>00687 CPL_ERROR_INCOMPATIBLE_INPUT);
+<a name="l00688"></a>00688 <span class="comment">/* Sigmas must be positive */</span>
+<a name="l00689"></a>00689 cpl_ensure_code( cpl_vector_get_min (sigma_y) > 0,
+<a name="l00690"></a>00690 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00691"></a>00691 sigma_data = cpl_vector_get_data_const(sigma_y);
+<a name="l00692"></a>00692 }
+<a name="l00693"></a>00693
+<a name="l00694"></a>00694 ia_local = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
+<a name="l00695"></a>00695 cpl_ensure_code(ia_local != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00696"></a>00696
+<a name="l00697"></a>00697 <span class="comment">/* Count non-constant fit parameters, copy ia */</span>
+<a name="l00698"></a>00698 <span class="keywordflow">if</span> (ia != NULL)
+<a name="l00699"></a>00699 {
+<a name="l00700"></a>00700 <span class="keywordtype">int</span> i;
+<a name="l00701"></a>00701
+<a name="l00702"></a>00702 Mfit = 0;
+<a name="l00703"></a>00703 <span class="keywordflow">for</span> (i = 0; i < M; i++)
+<a name="l00704"></a>00704 {
+<a name="l00705"></a>00705 ia_local[i] = ia[i];
+<a name="l00706"></a>00706
+<a name="l00707"></a>00707 <span class="keywordflow">if</span> (ia[i] != 0)
+<a name="l00708"></a>00708 {
+<a name="l00709"></a>00709 Mfit += 1;
+<a name="l00710"></a>00710 }
+<a name="l00711"></a>00711 }
+<a name="l00712"></a>00712
+<a name="l00713"></a>00713 <span class="keywordflow">if</span> (! (Mfit > 0))
+<a name="l00714"></a>00714 {
+<a name="l00715"></a>00715 cpl_free(ia_local);
+<a name="l00716"></a>00716 cpl_ensure_code( CPL_FALSE,
+<a name="l00717"></a>00717 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00718"></a>00718 }
+<a name="l00719"></a>00719 }
+<a name="l00720"></a>00720 <span class="keywordflow">else</span>
+<a name="l00721"></a>00721 {
+<a name="l00722"></a>00722 <span class="comment">/* All parameters participate */</span>
+<a name="l00723"></a>00723 <span class="keywordtype">int</span> i;
+<a name="l00724"></a>00724
+<a name="l00725"></a>00725 Mfit = M;
+<a name="l00726"></a>00726
+<a name="l00727"></a>00727 <span class="keywordflow">for</span> (i = 0; i < M; i++)
+<a name="l00728"></a>00728 {
+<a name="l00729"></a>00729 ia_local[i] = 1;
+<a name="l00730"></a>00730 }
+<a name="l00731"></a>00731 }
+<a name="l00732"></a>00732
+<a name="l00733"></a>00733 <span class="comment">/* To compute reduced chi^2, we need N > Mfit */</span>
+<a name="l00734"></a>00734 <span class="keywordflow">if</span> (! ( red_chisq == NULL || N > Mfit ) )
+<a name="l00735"></a>00735 {
+<a name="l00736"></a>00736 cpl_free(ia_local);
+<a name="l00737"></a>00737 cpl_ensure_code(
+<a name="l00738"></a>00738 CPL_FALSE,
+<a name="l00739"></a>00739 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00740"></a>00740 }
+<a name="l00741"></a>00741
+<a name="l00742"></a>00742 <span class="comment">/* Create alpha, beta, a_da, part work space */</span>
+<a name="l00743"></a>00743 alpha = cpl_matrix_new(Mfit, Mfit);
+<a name="l00744"></a>00744 <span class="keywordflow">if</span> (alpha == NULL)
+<a name="l00745"></a>00745 {
+<a name="l00746"></a>00746 cpl_free(ia_local);
+<a name="l00747"></a>00747 cpl_ensure_code(
+<a name="l00748"></a>00748 CPL_FALSE,
+<a name="l00749"></a>00749 CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00750"></a>00750 }
+<a name="l00751"></a>00751
+<a name="l00752"></a>00752 beta = cpl_matrix_new(Mfit, 1);
+<a name="l00753"></a>00753 <span class="keywordflow">if</span> (beta == NULL)
+<a name="l00754"></a>00754 {
+<a name="l00755"></a>00755 cpl_free(ia_local);
+<a name="l00756"></a>00756 cpl_matrix_delete(alpha);
+<a name="l00757"></a>00757 cpl_ensure_code(
+<a name="l00758"></a>00758 CPL_FALSE,
+<a name="l00759"></a>00759 CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00760"></a>00760 }
+<a name="l00761"></a>00761
+<a name="l00762"></a>00762 a_da = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
+<a name="l00763"></a>00763 <span class="keywordflow">if</span> (a_da == NULL)
+<a name="l00764"></a>00764 {
+<a name="l00765"></a>00765 cpl_free(ia_local);
+<a name="l00766"></a>00766 cpl_matrix_delete(alpha);
+<a name="l00767"></a>00767 cpl_matrix_delete(beta);
+<a name="l00768"></a>00768 cpl_ensure_code(
+<a name="l00769"></a>00769 CPL_FALSE,
+<a name="l00770"></a>00770 CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00771"></a>00771 }
+<a name="l00772"></a>00772
+<a name="l00773"></a>00773 part = cpl_malloc(M * <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));
+<a name="l00774"></a>00774 <span class="keywordflow">if</span> (part == NULL)
+<a name="l00775"></a>00775 {
+<a name="l00776"></a>00776 cpl_free(ia_local);
+<a name="l00777"></a>00777 cpl_matrix_delete(alpha);
+<a name="l00778"></a>00778 cpl_matrix_delete(beta);
+<a name="l00779"></a>00779 cpl_free(a_da);
+<a name="l00780"></a>00780 cpl_ensure_code(
+<a name="l00781"></a>00781 CPL_FALSE,
+<a name="l00782"></a>00782 CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l00783"></a>00783 }
+<a name="l00784"></a>00784
+<a name="l00785"></a>00785 <span class="comment">/* Initialize loop variables */</span>
+<a name="l00786"></a>00786 lambda = 0.001;
+<a name="l00787"></a>00787 count = 0;
+<a name="l00788"></a>00788 iterations = 0;
+<a name="l00789"></a>00789 <span class="keywordflow">if</span>( (chi_sq = get_chisq(N, D, f, a_data, x_data, y_data, sigma_data)) < 0)
+<a name="l00790"></a>00790 {
+<a name="l00791"></a>00791 cpl_free(ia_local);
+<a name="l00792"></a>00792 cpl_matrix_delete(alpha);
+<a name="l00793"></a>00793 cpl_matrix_delete(beta);
+<a name="l00794"></a>00794 cpl_free(a_da);
+<a name="l00795"></a>00795 cpl_free(part);
+<a name="l00796"></a>00796 cpl_ensure_code(
+<a name="l00797"></a>00797 CPL_FALSE,
+<a name="l00798"></a>00798 cpl_error_get_code());
+<a name="l00799"></a>00799 }
+<a name="l00800"></a>00800
+<a name="l00801"></a>00801 <span class="comment">/* uves_msg_debug("Initial chi^2 = %f", chi_sq); */</span>
+<a name="l00802"></a>00802
+<a name="l00803"></a>00803 <span class="comment">/* Iterate until chi^2 didn't improve substantially many (say, 5)</span>
+<a name="l00804"></a>00804 <span class="comment"> times in a row */</span>
+<a name="l00805"></a>00805 <span class="keywordflow">while</span> (count < 5 &&
+<a name="l00806"></a>00806 lambda < MAXLAMBDA &&
+<a name="l00807"></a>00807 iterations < CPL_VECTOR_FIT_MAXITER)
+<a name="l00808"></a>00808 {
+<a name="l00809"></a>00809 <span class="comment">/* In each iteration lambda increases, or chi^2 decreases or</span>
+<a name="l00810"></a>00810 <span class="comment"> count increases. Because chi^2 is bounded from below</span>
+<a name="l00811"></a>00811 <span class="comment"> (and lambda and count from above), the loop will terminate */</span>
+<a name="l00812"></a>00812
+<a name="l00813"></a>00813 <span class="keywordtype">double</span> chi_sq_candidate = 0.0;
+<a name="l00814"></a>00814 <span class="keywordtype">int</span> returncode = 0;
+<a name="l00815"></a>00815
+<a name="l00816"></a>00816 <span class="comment">/* Get candidate position in parameter space = a+da,</span>
+<a name="l00817"></a>00817 <span class="comment"> * where alpha * da = beta .</span>
+<a name="l00818"></a>00818 <span class="comment"> * Increase lambda until alpha is non-singular</span>
+<a name="l00819"></a>00819 <span class="comment"> */</span>
+<a name="l00820"></a>00820
+<a name="l00821"></a>00821 <span class="keywordflow">while</span>( (returncode = get_candidate(a_data, ia_local,
+<a name="l00822"></a>00822 M, N, D,
+<a name="l00823"></a>00823 lambda, f, dfda,
+<a name="l00824"></a>00824 x_data, y_data, sigma_data,
+<a name="l00825"></a>00825 part, alpha, beta, a_da)
+<a name="l00826"></a>00826 ) != 0
+<a name="l00827"></a>00827 && cpl_error_get_code() == CPL_ERROR_SINGULAR_MATRIX
+<a name="l00828"></a>00828 && lambda < MAXLAMBDA)
+<a name="l00829"></a>00829 {
+<a name="l00830"></a>00830 <span class="comment">/* uves_msg_debug("Singular matrix. lambda = %e", lambda); */</span>
+<a name="l00831"></a>00831 cpl_error_reset();
+<a name="l00832"></a>00832 lambda *= 9.0;
+<a name="l00833"></a>00833 }
+<a name="l00834"></a>00834
+<a name="l00835"></a>00835 <span class="comment">/* Set error if lambda diverged */</span>
+<a name="l00836"></a>00836 <span class="keywordflow">if</span> ( !( lambda < MAXLAMBDA ) )
+<a name="l00837"></a>00837 {
+<a name="l00838"></a>00838 cpl_free(ia_local);
+<a name="l00839"></a>00839 cpl_matrix_delete(alpha);
+<a name="l00840"></a>00840 cpl_matrix_delete(beta);
+<a name="l00841"></a>00841 cpl_free(a_da);
+<a name="l00842"></a>00842 cpl_free(part);
+<a name="l00843"></a>00843 cpl_ensure_code(
+<a name="l00844"></a>00844 CPL_FALSE,
+<a name="l00845"></a>00845 CPL_ERROR_CONTINUE);
+<a name="l00846"></a>00846 }
+<a name="l00847"></a>00847
+<a name="l00848"></a>00848 <span class="keywordflow">if</span> (returncode != 0)
+<a name="l00849"></a>00849 {
+<a name="l00850"></a>00850 cpl_free(ia_local);
+<a name="l00851"></a>00851 cpl_matrix_delete(alpha);
+<a name="l00852"></a>00852 cpl_matrix_delete(beta);
+<a name="l00853"></a>00853 cpl_free(a_da);
+<a name="l00854"></a>00854 cpl_free(part);
+<a name="l00855"></a>00855 cpl_ensure_code(
+<a name="l00856"></a>00856 CPL_FALSE,
+<a name="l00857"></a>00857 cpl_error_get_code());
+<a name="l00858"></a>00858 }
+<a name="l00859"></a>00859
+<a name="l00860"></a>00860 <span class="comment">/* Get chi^2(a+da) */</span>
+<a name="l00861"></a>00861 <span class="keywordflow">if</span> ((chi_sq_candidate = get_chisq(N, D, f, a_da,
+<a name="l00862"></a>00862 x_data, y_data, sigma_data)) < 0)
+<a name="l00863"></a>00863 {
+<a name="l00864"></a>00864 cpl_free(ia_local);
+<a name="l00865"></a>00865 cpl_matrix_delete(alpha);
+<a name="l00866"></a>00866 cpl_matrix_delete(beta);
+<a name="l00867"></a>00867 cpl_free(a_da);
+<a name="l00868"></a>00868 cpl_free(part);
+<a name="l00869"></a>00869 cpl_ensure_code(
+<a name="l00870"></a>00870 CPL_FALSE,
+<a name="l00871"></a>00871 cpl_error_get_code());
+<a name="l00872"></a>00872 }
+<a name="l00873"></a>00873
+<a name="l00874"></a>00874 <span class="comment">/* uves_msg_debug("Chi^2 = %f Candidate = %f Lambda = %e",</span>
+<a name="l00875"></a>00875 <span class="comment"> chi_sq, chi_sq_candidate, lambda); */</span>
+<a name="l00876"></a>00876
+<a name="l00877"></a>00877 <span class="keywordflow">if</span> (chi_sq_candidate > chi_sq)
+<a name="l00878"></a>00878 {
+<a name="l00879"></a>00879 <span class="comment">/* Move towards steepest descent */</span>
+<a name="l00880"></a>00880 lambda *= 9.0;
+<a name="l00881"></a>00881 }
+<a name="l00882"></a>00882 <span class="keywordflow">else</span>
+<a name="l00883"></a>00883 {
+<a name="l00884"></a>00884 <span class="comment">/* Move towards Newton's algorithm */</span>
+<a name="l00885"></a>00885 lambda /= 10.0;
+<a name="l00886"></a>00886
+<a name="l00887"></a>00887 <span class="comment">/* Count the number of successive improvements in chi^2 of</span>
+<a name="l00888"></a>00888 <span class="comment"> less than 0.01 relative */</span>
+<a name="l00889"></a>00889 <span class="keywordflow">if</span> ( chi_sq == 0 ||
+<a name="l00890"></a>00890 (chi_sq - chi_sq_candidate)/chi_sq < .01)
+<a name="l00891"></a>00891 {
+<a name="l00892"></a>00892 count += 1;
+<a name="l00893"></a>00893 }
+<a name="l00894"></a>00894 <span class="keywordflow">else</span>
+<a name="l00895"></a>00895 {
+<a name="l00896"></a>00896 <span class="comment">/* Chi^2 improved by a significant amount,</span>
+<a name="l00897"></a>00897 <span class="comment"> reset counter */</span>
+<a name="l00898"></a>00898 count = 0;
+<a name="l00899"></a>00899 }
+<a name="l00900"></a>00900
+<a name="l00901"></a>00901 <span class="comment">/* chi^2 improved, update a and chi^2 */</span>
+<a name="l00902"></a>00902 {
+<a name="l00903"></a>00903 <span class="keywordtype">int</span> i;
+<a name="l00904"></a>00904 <span class="keywordflow">for</span> (i = 0; i < M; i++) a_data[i] = a_da[i];
+<a name="l00905"></a>00905 }
+<a name="l00906"></a>00906 chi_sq = chi_sq_candidate;
+<a name="l00907"></a>00907 }
+<a name="l00908"></a>00908 iterations++;
+<a name="l00909"></a>00909 }
+<a name="l00910"></a>00910
+<a name="l00911"></a>00911 <span class="comment">/* Set error if we didn't converge */</span>
+<a name="l00912"></a>00912 <span class="keywordflow">if</span> ( !( lambda < MAXLAMBDA && iterations < CPL_VECTOR_FIT_MAXITER ) )
+<a name="l00913"></a>00913 {
+<a name="l00914"></a>00914 cpl_free(ia_local);
+<a name="l00915"></a>00915 cpl_matrix_delete(alpha);
+<a name="l00916"></a>00916 cpl_matrix_delete(beta);
+<a name="l00917"></a>00917 cpl_free(a_da);
+<a name="l00918"></a>00918 cpl_free(part);
+<a name="l00919"></a>00919 cpl_ensure_code(
+<a name="l00920"></a>00920 CPL_FALSE,
+<a name="l00921"></a>00921 CPL_ERROR_CONTINUE);
+<a name="l00922"></a>00922 }
+<a name="l00923"></a>00923
+<a name="l00924"></a>00924 <span class="comment">/* Compute mse if requested */</span>
+<a name="l00925"></a>00925 <span class="keywordflow">if</span> (mse != NULL)
+<a name="l00926"></a>00926 {
+<a name="l00927"></a>00927 <span class="keywordtype">int</span> i;
+<a name="l00928"></a>00928
+<a name="l00929"></a>00929 *mse = 0.0;
+<a name="l00930"></a>00930
+<a name="l00931"></a>00931 <span class="keywordflow">for</span>(i = 0; i < N; i++)
+<a name="l00932"></a>00932 {
+<a name="l00933"></a>00933 <span class="keywordtype">double</span> fx_i = 0.0;
+<a name="l00934"></a>00934 <span class="keywordtype">double</span> residual = 0.0;
+<a name="l00935"></a>00935
+<a name="l00936"></a>00936 <span class="comment">/* Evaluate f(x_i) at the best fit parameters */</span>
+<a name="l00937"></a>00937 <span class="keywordflow">if</span>( f(&(x_data[i*D]),
+<a name="l00938"></a>00938 a_data,
+<a name="l00939"></a>00939 &fx_i) != 0)
+<a name="l00940"></a>00940 {
+<a name="l00941"></a>00941 cpl_free(ia_local);
+<a name="l00942"></a>00942 cpl_matrix_delete(alpha);
+<a name="l00943"></a>00943 cpl_matrix_delete(beta);
+<a name="l00944"></a>00944 cpl_free(a_da);
+<a name="l00945"></a>00945 cpl_free(part);
+<a name="l00946"></a>00946 cpl_ensure_code(
+<a name="l00947"></a>00947 CPL_FALSE,
+<a name="l00948"></a>00948 CPL_ERROR_ILLEGAL_INPUT);
+<a name="l00949"></a>00949 }
+<a name="l00950"></a>00950
+<a name="l00951"></a>00951 residual = y_data[i] - fx_i;
+<a name="l00952"></a>00952 *mse += residual * residual;
+<a name="l00953"></a>00953 }
+<a name="l00954"></a>00954 *mse /= N;
+<a name="l00955"></a>00955 }
+<a name="l00956"></a>00956
+<a name="l00957"></a>00957 <span class="comment">/* Compute reduced chi^2 if requested */</span>
+<a name="l00958"></a>00958 <span class="keywordflow">if</span> (red_chisq != NULL)
+<a name="l00959"></a>00959 {
+<a name="l00960"></a>00960 <span class="comment">/* We already know the optimal chi^2 (and that N > Mfit)*/</span>
+<a name="l00961"></a>00961 *red_chisq = chi_sq / (N-Mfit);
+<a name="l00962"></a>00962 }
+<a name="l00963"></a>00963
+<a name="l00964"></a>00964 <span class="comment">/* Compute covariance matrix if requested</span>
+<a name="l00965"></a>00965 <span class="comment"> * cov = alpha(lambda=0)^-1</span>
+<a name="l00966"></a>00966 <span class="comment"> */</span>
+<a name="l00967"></a>00967 <span class="keywordflow">if</span> (covariance != NULL)
+<a name="l00968"></a>00968 {
+<a name="l00969"></a>00969 cpl_matrix *cov;
+<a name="l00970"></a>00970
+<a name="l00971"></a>00971 <span class="keywordflow">if</span>( get_candidate(a_data, ia_local,
+<a name="l00972"></a>00972 M, N, D, 0.0, f, dfda,
+<a name="l00973"></a>00973 x_data, y_data, sigma_data,
+<a name="l00974"></a>00974 part, alpha, beta, a_da)
+<a name="l00975"></a>00975 != 0)
+<a name="l00976"></a>00976 {
+<a name="l00977"></a>00977 cpl_free(ia_local);
+<a name="l00978"></a>00978 cpl_matrix_delete(alpha);
+<a name="l00979"></a>00979 cpl_matrix_delete(beta);
+<a name="l00980"></a>00980 cpl_free(a_da);
+<a name="l00981"></a>00981 cpl_free(part);
+<a name="l00982"></a>00982 cpl_ensure_code(
+<a name="l00983"></a>00983 CPL_FALSE,
+<a name="l00984"></a>00984 cpl_error_get_code());
+<a name="l00985"></a>00985 }
+<a name="l00986"></a>00986
+<a name="l00987"></a>00987 cov = cpl_matrix_invert_create(alpha);
+<a name="l00988"></a>00988 <span class="keywordflow">if</span> (cov == NULL)
+<a name="l00989"></a>00989 {
+<a name="l00990"></a>00990 cpl_free(ia_local);
+<a name="l00991"></a>00991 cpl_matrix_delete(alpha);
+<a name="l00992"></a>00992 cpl_matrix_delete(beta);
+<a name="l00993"></a>00993 cpl_free(a_da);
+<a name="l00994"></a>00994 cpl_free(part);
+<a name="l00995"></a>00995 cpl_ensure_code(
+<a name="l00996"></a>00996 CPL_FALSE,
+<a name="l00997"></a>00997 cpl_error_get_code());
+<a name="l00998"></a>00998 }
+<a name="l00999"></a>00999
+<a name="l01000"></a>01000 <span class="comment">/* Make sure that variances are positive */</span>
+<a name="l01001"></a>01001 {
+<a name="l01002"></a>01002 <span class="keywordtype">int</span> i;
+<a name="l01003"></a>01003 <span class="keywordflow">for</span> (i = 0; i < Mfit; i++)
+<a name="l01004"></a>01004 {
+<a name="l01005"></a>01005 <span class="keywordflow">if</span> ( !(cpl_matrix_get(cov, i, i) > 0) )
+<a name="l01006"></a>01006 {
+<a name="l01007"></a>01007 cpl_free(ia_local);
+<a name="l01008"></a>01008 cpl_matrix_delete(alpha);
+<a name="l01009"></a>01009 cpl_matrix_delete(beta);
+<a name="l01010"></a>01010 cpl_free(a_da);
+<a name="l01011"></a>01011 cpl_free(part);
+<a name="l01012"></a>01012 cpl_matrix_delete(cov);
+<a name="l01013"></a>01013 *covariance = NULL;
+<a name="l01014"></a>01014 cpl_ensure_code(
+<a name="l01015"></a>01015 CPL_FALSE,
+<a name="l01016"></a>01016 CPL_ERROR_SINGULAR_MATRIX);
+<a name="l01017"></a>01017 }
+<a name="l01018"></a>01018 }
+<a name="l01019"></a>01019 }
+<a name="l01020"></a>01020
+<a name="l01021"></a>01021 <span class="comment">/* Expand covariance matrix from Mfit x Mfit</span>
+<a name="l01022"></a>01022 <span class="comment"> to M x M. Set rows/columns corresponding to fixed</span>
+<a name="l01023"></a>01023 <span class="comment"> parameters to zero */</span>
+<a name="l01024"></a>01024
+<a name="l01025"></a>01025 *covariance = cpl_matrix_new(M, M);
+<a name="l01026"></a>01026 <span class="keywordflow">if</span> (*covariance == NULL)
+<a name="l01027"></a>01027 {
+<a name="l01028"></a>01028 cpl_free(ia_local);
+<a name="l01029"></a>01029 cpl_matrix_delete(alpha);
+<a name="l01030"></a>01030 cpl_matrix_delete(beta);
+<a name="l01031"></a>01031 cpl_free(a_da);
+<a name="l01032"></a>01032 cpl_free(part);
+<a name="l01033"></a>01033 cpl_matrix_delete(cov);
+<a name="l01034"></a>01034 cpl_ensure_code(
+<a name="l01035"></a>01035 CPL_FALSE,
+<a name="l01036"></a>01036 CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l01037"></a>01037 }
+<a name="l01038"></a>01038
+<a name="l01039"></a>01039 {
+<a name="l01040"></a>01040 <span class="keywordtype">int</span> j, jmfit;
+<a name="l01041"></a>01041
+<a name="l01042"></a>01042 <span class="keywordflow">for</span> (j = 0, jmfit = 0; j < M; j++)
+<a name="l01043"></a>01043 <span class="keywordflow">if</span> (ia_local[j] != 0)
+<a name="l01044"></a>01044 {
+<a name="l01045"></a>01045 <span class="keywordtype">int</span> i, imfit;
+<a name="l01046"></a>01046
+<a name="l01047"></a>01047 <span class="keywordflow">for</span> (i = 0, imfit = 0; i < M; i++)
+<a name="l01048"></a>01048 <span class="keywordflow">if</span> (ia_local[i] != 0)
+<a name="l01049"></a>01049 {
+<a name="l01050"></a>01050 cpl_matrix_set(*covariance, i, j,
+<a name="l01051"></a>01051 cpl_matrix_get(
+<a name="l01052"></a>01052 cov, imfit, jmfit));
+<a name="l01053"></a>01053 imfit += 1;
+<a name="l01054"></a>01054 }
+<a name="l01055"></a>01055
+<a name="l01056"></a>01056 cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
+<a name="l01057"></a>01057
+<a name="l01058"></a>01058 jmfit += 1;
+<a name="l01059"></a>01059 }
+<a name="l01060"></a>01060
+<a name="l01061"></a>01061 cpl_ensure( jmfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1 );
+<a name="l01062"></a>01062 }
+<a name="l01063"></a>01063
+<a name="l01064"></a>01064 cpl_matrix_delete(cov);
+<a name="l01065"></a>01065 }
+<a name="l01066"></a>01066
+<a name="l01067"></a>01067 cpl_free(ia_local);
+<a name="l01068"></a>01068 cpl_matrix_delete(alpha);
+<a name="l01069"></a>01069 cpl_matrix_delete(beta);
+<a name="l01070"></a>01070 cpl_free(a_da);
+<a name="l01071"></a>01071 cpl_free(part);
+<a name="l01072"></a>01072
+<a name="l01073"></a>01073 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01074"></a>01074 }
+<a name="l01075"></a>01075
<a name="l01076"></a>01076
<a name="l01077"></a>01077
<a name="l01078"></a>01078
@@ -940,1387 +940,1387 @@
<a name="l01087"></a>01087
<a name="l01088"></a>01088
<a name="l01089"></a>01089
-<a name="l01090"></a>01090
-<a name="l01091"></a>01091 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l01092"></a>01092
-<a name="l01104"></a>01104 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01105"></a>01105 sinfo_fit_amoeba_get_psum(<span class="keywordtype">int</span> ndim, <span class="keywordtype">int</span> mpts, <span class="keywordtype">double</span>** p, <span class="keywordtype">double</span>* psum)
-<a name="l01106"></a>01106 {
-<a name="l01107"></a>01107 <span class="keywordtype">int</span> i=0;
-<a name="l01108"></a>01108 <span class="keywordtype">int</span> j=0;
-<a name="l01109"></a>01109 <span class="keywordtype">double</span> sum=0;
-<a name="l01110"></a>01110 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
-<a name="l01111"></a>01111 <span class="keywordflow">for</span> (sum=0.0,i=0;i<mpts;i++) {
-<a name="l01112"></a>01112 sum += p[i][j];
-<a name="l01113"></a>01113 }
-<a name="l01114"></a>01114 psum[j]=sum;
-<a name="l01115"></a>01115 }
-<a name="l01116"></a>01116
-<a name="l01117"></a>01117 }
+<a name="l01090"></a>01090 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l01091"></a>01091
+<a name="l01103"></a>01103 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l01104"></a>01104 sinfo_fit_amoeba_get_psum(<span class="keywordtype">int</span> ndim, <span class="keywordtype">int</span> mpts, <span class="keywordtype">double</span>** p, <span class="keywordtype">double</span>* psum)
+<a name="l01105"></a>01105 {
+<a name="l01106"></a>01106 <span class="keywordtype">int</span> i=0;
+<a name="l01107"></a>01107 <span class="keywordtype">int</span> j=0;
+<a name="l01108"></a>01108 <span class="keywordtype">double</span> sum=0;
+<a name="l01109"></a>01109 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
+<a name="l01110"></a>01110 <span class="keywordflow">for</span> (sum=0.0,i=0;i<mpts;i++) {
+<a name="l01111"></a>01111 sum += p[i][j];
+<a name="l01112"></a>01112 }
+<a name="l01113"></a>01113 psum[j]=sum;
+<a name="l01114"></a>01114 }
+<a name="l01115"></a>01115
+<a name="l01116"></a>01116 }
+<a name="l01117"></a>01117
<a name="l01118"></a>01118
-<a name="l01119"></a>01119
-<a name="l01120"></a>01120 <span class="preprocessor">#define SINFO_FIT_AMOEBA_SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}</span>
-<a name="l01121"></a>01121 <span class="preprocessor"></span>
+<a name="l01119"></a>01119 <span class="preprocessor">#define SINFO_FIT_AMOEBA_SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}</span>
+<a name="l01120"></a>01120 <span class="preprocessor"></span>
+<a name="l01121"></a>01121
<a name="l01122"></a>01122
-<a name="l01123"></a>01123
-<a name="l01150"></a>01150 <span class="keywordtype">void</span>
-<a name="l01151"></a>01151 sinfo_fit_amoeba(
-<a name="l01152"></a>01152 <span class="keywordtype">double</span>**p,
-<a name="l01153"></a>01153 <span class="keywordtype">double</span> y[],
-<a name="l01154"></a>01154 <span class="keywordtype">int</span> ndim,
-<a name="l01155"></a>01155 <span class="keywordtype">double</span> ftol,
-<a name="l01156"></a>01156 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),
-<a name="l01157"></a>01157 <span class="keywordtype">int</span>* nfunk)
-<a name="l01158"></a>01158 {
+<a name="l01149"></a>01149 <span class="keywordtype">void</span>
+<a name="l01150"></a>01150 sinfo_fit_amoeba(
+<a name="l01151"></a>01151 <span class="keywordtype">double</span>**p,
+<a name="l01152"></a>01152 <span class="keywordtype">double</span> y[],
+<a name="l01153"></a>01153 <span class="keywordtype">int</span> ndim,
+<a name="l01154"></a>01154 <span class="keywordtype">double</span> ftol,
+<a name="l01155"></a>01155 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),
+<a name="l01156"></a>01156 <span class="keywordtype">int</span>* nfunk)
+<a name="l01157"></a>01157 {
+<a name="l01158"></a>01158
<a name="l01159"></a>01159
-<a name="l01160"></a>01160
-<a name="l01161"></a>01161 <span class="keywordtype">int</span> i=0;
-<a name="l01162"></a>01162 <span class="keywordtype">int</span> ihi=0;
-<a name="l01163"></a>01163 <span class="keywordtype">int</span> ilo=0;
-<a name="l01164"></a>01164 <span class="keywordtype">int</span> inhi=0;
-<a name="l01165"></a>01165 <span class="keywordtype">int</span> j=0;
-<a name="l01166"></a>01166 <span class="keywordtype">int</span> mpts=ndim+1;
-<a name="l01167"></a>01167 <span class="keywordtype">double</span> rtol=0;
-<a name="l01168"></a>01168 <span class="keywordtype">double</span> swap=0;
-<a name="l01169"></a>01169 <span class="keywordtype">double</span> ysave=0;
-<a name="l01170"></a>01170 <span class="keywordtype">double</span> ytry=0;
-<a name="l01171"></a>01171 cpl_vector* sum=NULL;
-<a name="l01172"></a>01172 <span class="keywordtype">double</span>* psum=NULL;
-<a name="l01173"></a>01173
-<a name="l01174"></a>01174 sum=cpl_vector_new(ndim);
-<a name="l01175"></a>01175 psum=cpl_vector_get_data(sum);
-<a name="l01176"></a>01176 *nfunk=0;
-<a name="l01177"></a>01177
-<a name="l01178"></a>01178 sinfo_fit_amoeba_get_psum(ndim,mpts,p,psum);
-<a name="l01179"></a>01179
-<a name="l01180"></a>01180 <span class="keywordflow">for</span>(;;) {
-<a name="l01181"></a>01181 ilo=0;
-<a name="l01182"></a>01182 <span class="comment">/*</span>
-<a name="l01183"></a>01183 <span class="comment"> First we must determine which point is the highest (worst),</span>
-<a name="l01184"></a>01184 <span class="comment"> next-highest, and lowest (best), by looping over the points</span>
-<a name="l01185"></a>01185 <span class="comment"> in the simplex</span>
-<a name="l01186"></a>01186 <span class="comment"> */</span>
-<a name="l01187"></a>01187 ihi=y[0]>y[1] ? (inhi=1,0) : (inhi=0,1);
-<a name="l01188"></a>01188
-<a name="l01189"></a>01189 <span class="keywordflow">for</span> (i=0;i< mpts;i++) {
-<a name="l01190"></a>01190 <span class="keywordflow">if</span> (y[i] <= y[ilo]) ilo=i;
-<a name="l01191"></a>01191 <span class="keywordflow">if</span> (y[i] > y[ihi]) {
-<a name="l01192"></a>01192 inhi=ihi;
-<a name="l01193"></a>01193 ihi=i;
-<a name="l01194"></a>01194 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (y[i] > y[inhi] && i != ihi) inhi=i;
-<a name="l01195"></a>01195 }
-<a name="l01196"></a>01196 rtol=2.0*fabs(y[ihi]-y[ilo])/(fabs(y[ihi])+fabs(y[ilo]));
-<a name="l01197"></a>01197
-<a name="l01198"></a>01198 <span class="comment">/*</span>
-<a name="l01199"></a>01199 <span class="comment"> compute the fractional range from highest to lowest and return if</span>
-<a name="l01200"></a>01200 <span class="comment"> satisfactory</span>
-<a name="l01201"></a>01201 <span class="comment"> */</span>
-<a name="l01202"></a>01202 <span class="keywordflow">if</span>(rtol < ftol) { <span class="comment">// if returning, but best point and value is in slot 1</span>
-<a name="l01203"></a>01203 SINFO_FIT_AMOEBA_SWAP(y[0],y[ilo]);
-<a name="l01204"></a>01204 <span class="keywordflow">for</span> (i=0;i<ndim;i++) SINFO_FIT_AMOEBA_SWAP(p[1][i],p[ilo][i]);
-<a name="l01205"></a>01205 <span class="keywordflow">break</span>;
-<a name="l01206"></a>01206 }
-<a name="l01207"></a>01207 <span class="keywordflow">if</span> (*nfunk >= SINFO_FIT_AMOEBA_NMAX) {
-<a name="l01208"></a>01208 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"NMAX exceeded"</span>);
-<a name="l01209"></a>01209 SINFO_FIT_AMOEBA_SWAP(y[0],y[ilo]);
-<a name="l01210"></a>01210 <span class="keywordflow">for</span> (i=0;i<ndim;i++) SINFO_FIT_AMOEBA_SWAP(p[1][i],p[ilo][i]);
-<a name="l01211"></a>01211 <span class="keywordflow">for</span> (i=0;i<ndim;i++) {
-<a name="l01212"></a>01212 sinfo_msg(<span class="stringliteral">"p[1][i]=%g p[ilo][i]=%g ilo=%d"</span>,p[1][i],p[ilo][i],ilo);
-<a name="l01213"></a>01213 }
-<a name="l01214"></a>01214 assure(*nfunk >= SINFO_FIT_AMOEBA_NMAX,CPL_ERROR_UNSPECIFIED,
-<a name="l01215"></a>01215 <span class="stringliteral">"NMAX exceeded"</span>);
-<a name="l01216"></a>01216 <span class="keywordflow">break</span>;
-<a name="l01217"></a>01217
-<a name="l01218"></a>01218 }
-<a name="l01219"></a>01219 *nfunk +=2;
-<a name="l01220"></a>01220 <span class="comment">/*</span>
-<a name="l01221"></a>01221 <span class="comment"> Begin a new iteration. First extrapolate by a Factor -1 through the face</span>
-<a name="l01222"></a>01222 <span class="comment"> of the simplex across the high point, i.e. reflect the simplex from the</span>
-<a name="l01223"></a>01223 <span class="comment"> high point</span>
-<a name="l01224"></a>01224 <span class="comment"> */</span>
-<a name="l01225"></a>01225 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,-1.0);
-<a name="l01226"></a>01226 <span class="keywordflow">if</span>(ytry <= y[ilo]) {
-<a name="l01227"></a>01227 <span class="comment">/*</span>
-<a name="l01228"></a>01228 <span class="comment"> Gives a result better than the best point, so try an additional</span>
-<a name="l01229"></a>01229 <span class="comment"> extrapolation by a factor 2</span>
-<a name="l01230"></a>01230 <span class="comment"> */</span>
-<a name="l01231"></a>01231 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,2.0);
-<a name="l01232"></a>01232 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ytry >= y[inhi]) {
-<a name="l01233"></a>01233
-<a name="l01234"></a>01234 <span class="comment">/*</span>
-<a name="l01235"></a>01235 <span class="comment"> The reflected point is worse than the second highest, so look for an</span>
-<a name="l01236"></a>01236 <span class="comment"> intermediate lower point, i.e. do a one-dimensional contraction</span>
-<a name="l01237"></a>01237 <span class="comment"> */</span>
-<a name="l01238"></a>01238 ysave=y[ihi];
-<a name="l01239"></a>01239 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,0.5);
-<a name="l01240"></a>01240 <span class="keywordflow">if</span>(ytry >= ysave) {
-<a name="l01241"></a>01241 <span class="comment">/*</span>
-<a name="l01242"></a>01242 <span class="comment"> Can't seem to get rid of that high point.</span>
-<a name="l01243"></a>01243 <span class="comment"> Better contract around the lowest (best) point</span>
-<a name="l01244"></a>01244 <span class="comment"> */</span>
-<a name="l01245"></a>01245 <span class="keywordflow">for</span>(i=0;i<mpts;i++) {
-<a name="l01246"></a>01246 <span class="keywordflow">if</span>(i != ilo) {
-<a name="l01247"></a>01247 <span class="keywordflow">for</span>( j=0;j<ndim;j++) {
-<a name="l01248"></a>01248 p[i][j]=psum[j]=0.5*(p[i][j]+p[ilo][j]);
-<a name="l01249"></a>01249 }
-<a name="l01250"></a>01250 y[i]=(*funk)(psum);
-<a name="l01251"></a>01251 }
-<a name="l01252"></a>01252 }
-<a name="l01253"></a>01253 *nfunk += ndim; <span class="comment">/* Keep track of function evaluations */</span>
-<a name="l01254"></a>01254 sinfo_fit_amoeba_get_psum(ndim,mpts,p,psum);<span class="comment">/* Recomputes psum */</span>
-<a name="l01255"></a>01255 }
-<a name="l01256"></a>01256 } <span class="keywordflow">else</span> {
-<a name="l01257"></a>01257 --(*nfunk);
-<a name="l01258"></a>01258 <span class="comment">/* Go back for the test of doneness and the next iteration */</span>
-<a name="l01259"></a>01259 }
-<a name="l01260"></a>01260 }
-<a name="l01261"></a>01261 cleanup:
-<a name="l01262"></a>01262 cpl_vector_delete(sum);
-<a name="l01263"></a>01263 }
+<a name="l01160"></a>01160 <span class="keywordtype">int</span> i=0;
+<a name="l01161"></a>01161 <span class="keywordtype">int</span> ihi=0;
+<a name="l01162"></a>01162 <span class="keywordtype">int</span> ilo=0;
+<a name="l01163"></a>01163 <span class="keywordtype">int</span> inhi=0;
+<a name="l01164"></a>01164 <span class="keywordtype">int</span> j=0;
+<a name="l01165"></a>01165 <span class="keywordtype">int</span> mpts=ndim+1;
+<a name="l01166"></a>01166 <span class="keywordtype">double</span> rtol=0;
+<a name="l01167"></a>01167 <span class="keywordtype">double</span> swap=0;
+<a name="l01168"></a>01168 <span class="keywordtype">double</span> ysave=0;
+<a name="l01169"></a>01169 <span class="keywordtype">double</span> ytry=0;
+<a name="l01170"></a>01170 cpl_vector* sum=NULL;
+<a name="l01171"></a>01171 <span class="keywordtype">double</span>* psum=NULL;
+<a name="l01172"></a>01172
+<a name="l01173"></a>01173 sum=cpl_vector_new(ndim);
+<a name="l01174"></a>01174 psum=cpl_vector_get_data(sum);
+<a name="l01175"></a>01175 *nfunk=0;
+<a name="l01176"></a>01176
+<a name="l01177"></a>01177 sinfo_fit_amoeba_get_psum(ndim,mpts,p,psum);
+<a name="l01178"></a>01178
+<a name="l01179"></a>01179 <span class="keywordflow">for</span>(;;) {
+<a name="l01180"></a>01180 ilo=0;
+<a name="l01181"></a>01181 <span class="comment">/*</span>
+<a name="l01182"></a>01182 <span class="comment"> First we must determine which point is the highest (worst),</span>
+<a name="l01183"></a>01183 <span class="comment"> next-highest, and lowest (best), by looping over the points</span>
+<a name="l01184"></a>01184 <span class="comment"> in the simplex</span>
+<a name="l01185"></a>01185 <span class="comment"> */</span>
+<a name="l01186"></a>01186 ihi=y[0]>y[1] ? (inhi=1,0) : (inhi=0,1);
+<a name="l01187"></a>01187
+<a name="l01188"></a>01188 <span class="keywordflow">for</span> (i=0;i< mpts;i++) {
+<a name="l01189"></a>01189 <span class="keywordflow">if</span> (y[i] <= y[ilo]) ilo=i;
+<a name="l01190"></a>01190 <span class="keywordflow">if</span> (y[i] > y[ihi]) {
+<a name="l01191"></a>01191 inhi=ihi;
+<a name="l01192"></a>01192 ihi=i;
+<a name="l01193"></a>01193 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (y[i] > y[inhi] && i != ihi) inhi=i;
+<a name="l01194"></a>01194 }
+<a name="l01195"></a>01195 rtol=2.0*fabs(y[ihi]-y[ilo])/(fabs(y[ihi])+fabs(y[ilo]));
+<a name="l01196"></a>01196
+<a name="l01197"></a>01197 <span class="comment">/*</span>
+<a name="l01198"></a>01198 <span class="comment"> compute the fractional range from highest to lowest and return if</span>
+<a name="l01199"></a>01199 <span class="comment"> satisfactory</span>
+<a name="l01200"></a>01200 <span class="comment"> */</span>
+<a name="l01201"></a>01201 <span class="keywordflow">if</span>(rtol < ftol) { <span class="comment">// if returning, but best point and value is in slot 1</span>
+<a name="l01202"></a>01202 SINFO_FIT_AMOEBA_SWAP(y[0],y[ilo]);
+<a name="l01203"></a>01203 <span class="keywordflow">for</span> (i=0;i<ndim;i++) SINFO_FIT_AMOEBA_SWAP(p[1][i],p[ilo][i]);
+<a name="l01204"></a>01204 <span class="keywordflow">break</span>;
+<a name="l01205"></a>01205 }
+<a name="l01206"></a>01206 <span class="keywordflow">if</span> (*nfunk >= SINFO_FIT_AMOEBA_NMAX) {
+<a name="l01207"></a>01207 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"NMAX exceeded"</span>);
+<a name="l01208"></a>01208 SINFO_FIT_AMOEBA_SWAP(y[0],y[ilo]);
+<a name="l01209"></a>01209 <span class="keywordflow">for</span> (i=0;i<ndim;i++) SINFO_FIT_AMOEBA_SWAP(p[1][i],p[ilo][i]);
+<a name="l01210"></a>01210 <span class="keywordflow">for</span> (i=0;i<ndim;i++) {
+<a name="l01211"></a>01211 sinfo_msg(<span class="stringliteral">"p[1][i]=%g p[ilo][i]=%g ilo=%d"</span>,p[1][i],p[ilo][i],ilo);
+<a name="l01212"></a>01212 }
+<a name="l01213"></a>01213 assure(*nfunk >= SINFO_FIT_AMOEBA_NMAX,CPL_ERROR_UNSPECIFIED,
+<a name="l01214"></a>01214 <span class="stringliteral">"NMAX exceeded"</span>);
+<a name="l01215"></a>01215 <span class="keywordflow">break</span>;
+<a name="l01216"></a>01216
+<a name="l01217"></a>01217 }
+<a name="l01218"></a>01218 *nfunk +=2;
+<a name="l01219"></a>01219 <span class="comment">/*</span>
+<a name="l01220"></a>01220 <span class="comment"> Begin a new iteration. First extrapolate by a Factor -1 through the face</span>
+<a name="l01221"></a>01221 <span class="comment"> of the simplex across the high point, i.e. reflect the simplex from the</span>
+<a name="l01222"></a>01222 <span class="comment"> high point</span>
+<a name="l01223"></a>01223 <span class="comment"> */</span>
+<a name="l01224"></a>01224 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,-1.0);
+<a name="l01225"></a>01225 <span class="keywordflow">if</span>(ytry <= y[ilo]) {
+<a name="l01226"></a>01226 <span class="comment">/*</span>
+<a name="l01227"></a>01227 <span class="comment"> Gives a result better than the best point, so try an additional</span>
+<a name="l01228"></a>01228 <span class="comment"> extrapolation by a factor 2</span>
+<a name="l01229"></a>01229 <span class="comment"> */</span>
+<a name="l01230"></a>01230 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,2.0);
+<a name="l01231"></a>01231 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ytry >= y[inhi]) {
+<a name="l01232"></a>01232
+<a name="l01233"></a>01233 <span class="comment">/*</span>
+<a name="l01234"></a>01234 <span class="comment"> The reflected point is worse than the second highest, so look for an</span>
+<a name="l01235"></a>01235 <span class="comment"> intermediate lower point, i.e. do a one-dimensional contraction</span>
+<a name="l01236"></a>01236 <span class="comment"> */</span>
+<a name="l01237"></a>01237 ysave=y[ihi];
+<a name="l01238"></a>01238 ytry=sinfo_fit_amotry(p,y,psum,ndim,funk,ihi,0.5);
+<a name="l01239"></a>01239 <span class="keywordflow">if</span>(ytry >= ysave) {
+<a name="l01240"></a>01240 <span class="comment">/*</span>
+<a name="l01241"></a>01241 <span class="comment"> Can't seem to get rid of that high point.</span>
+<a name="l01242"></a>01242 <span class="comment"> Better contract around the lowest (best) point</span>
+<a name="l01243"></a>01243 <span class="comment"> */</span>
+<a name="l01244"></a>01244 <span class="keywordflow">for</span>(i=0;i<mpts;i++) {
+<a name="l01245"></a>01245 <span class="keywordflow">if</span>(i != ilo) {
+<a name="l01246"></a>01246 <span class="keywordflow">for</span>( j=0;j<ndim;j++) {
+<a name="l01247"></a>01247 p[i][j]=psum[j]=0.5*(p[i][j]+p[ilo][j]);
+<a name="l01248"></a>01248 }
+<a name="l01249"></a>01249 y[i]=(*funk)(psum);
+<a name="l01250"></a>01250 }
+<a name="l01251"></a>01251 }
+<a name="l01252"></a>01252 *nfunk += ndim; <span class="comment">/* Keep track of function evaluations */</span>
+<a name="l01253"></a>01253 sinfo_fit_amoeba_get_psum(ndim,mpts,p,psum);<span class="comment">/* Recomputes psum */</span>
+<a name="l01254"></a>01254 }
+<a name="l01255"></a>01255 } <span class="keywordflow">else</span> {
+<a name="l01256"></a>01256 --(*nfunk);
+<a name="l01257"></a>01257 <span class="comment">/* Go back for the test of doneness and the next iteration */</span>
+<a name="l01258"></a>01258 }
+<a name="l01259"></a>01259 }
+<a name="l01260"></a>01260 cleanup:
+<a name="l01261"></a>01261 cpl_vector_delete(sum);
+<a name="l01262"></a>01262 }
+<a name="l01263"></a>01263
<a name="l01264"></a>01264
-<a name="l01265"></a>01265
-<a name="l01266"></a>01266 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l01267"></a>01267 sinfo_fit_amotry(<span class="keywordtype">double</span>** p, <span class="keywordtype">double</span> y[], <span class="keywordtype">double</span> psum[], <span class="keywordtype">int</span> ndim,
-<a name="l01268"></a>01268 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),<span class="keywordtype">int</span> ihi, <span class="keywordtype">double</span> fac)
-<a name="l01269"></a>01269 {
-<a name="l01270"></a>01270 <span class="keywordtype">int</span> j;
-<a name="l01271"></a>01271 <span class="keywordtype">double</span> fac1=0;
-<a name="l01272"></a>01272 <span class="keywordtype">double</span> fac2=0;
-<a name="l01273"></a>01273 <span class="keywordtype">double</span> ytry=0;
-<a name="l01274"></a>01274 cpl_vector * vtry=NULL;
-<a name="l01275"></a>01275 <span class="keywordtype">double</span> *ptry=NULL;
-<a name="l01276"></a>01276
-<a name="l01277"></a>01277 vtry=cpl_vector_new(ndim);
-<a name="l01278"></a>01278 ptry=cpl_vector_get_data(vtry);
-<a name="l01279"></a>01279
-<a name="l01280"></a>01280 fac1=(1.0-fac)/ndim;
-<a name="l01281"></a>01281 fac2=fac1-fac;
-<a name="l01282"></a>01282
-<a name="l01283"></a>01283 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
-<a name="l01284"></a>01284 ptry[j]=psum[j]*fac1-p[ihi][j]*fac2;
-<a name="l01285"></a>01285 }
-<a name="l01286"></a>01286 ytry=(*funk)(ptry);
-<a name="l01287"></a>01287 <span class="keywordflow">if</span> (ytry < y[ihi]) {
-<a name="l01288"></a>01288 y[ihi]=ytry;
-<a name="l01289"></a>01289 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
-<a name="l01290"></a>01290 psum[j] += ptry[j]-p[ihi][j];
-<a name="l01291"></a>01291 p[ihi][j]=ptry[j];
-<a name="l01292"></a>01292 }
-<a name="l01293"></a>01293 }
-<a name="l01294"></a>01294 sinfo_free_my_vector(&vtry);
-<a name="l01295"></a>01295 <span class="keywordflow">return</span> ytry;
-<a name="l01296"></a>01296 }
-<a name="l01297"></a>01297
+<a name="l01265"></a>01265 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l01266"></a>01266 sinfo_fit_amotry(<span class="keywordtype">double</span>** p, <span class="keywordtype">double</span> y[], <span class="keywordtype">double</span> psum[], <span class="keywordtype">int</span> ndim,
+<a name="l01267"></a>01267 <span class="keywordtype">double</span> (*funk)(<span class="keywordtype">double</span>[]),<span class="keywordtype">int</span> ihi, <span class="keywordtype">double</span> fac)
+<a name="l01268"></a>01268 {
+<a name="l01269"></a>01269 <span class="keywordtype">int</span> j;
+<a name="l01270"></a>01270 <span class="keywordtype">double</span> fac1=0;
+<a name="l01271"></a>01271 <span class="keywordtype">double</span> fac2=0;
+<a name="l01272"></a>01272 <span class="keywordtype">double</span> ytry=0;
+<a name="l01273"></a>01273 cpl_vector * vtry=NULL;
+<a name="l01274"></a>01274 <span class="keywordtype">double</span> *ptry=NULL;
+<a name="l01275"></a>01275
+<a name="l01276"></a>01276 vtry=cpl_vector_new(ndim);
+<a name="l01277"></a>01277 ptry=cpl_vector_get_data(vtry);
+<a name="l01278"></a>01278
+<a name="l01279"></a>01279 fac1=(1.0-fac)/ndim;
+<a name="l01280"></a>01280 fac2=fac1-fac;
+<a name="l01281"></a>01281
+<a name="l01282"></a>01282 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
+<a name="l01283"></a>01283 ptry[j]=psum[j]*fac1-p[ihi][j]*fac2;
+<a name="l01284"></a>01284 }
+<a name="l01285"></a>01285 ytry=(*funk)(ptry);
+<a name="l01286"></a>01286 <span class="keywordflow">if</span> (ytry < y[ihi]) {
+<a name="l01287"></a>01287 y[ihi]=ytry;
+<a name="l01288"></a>01288 <span class="keywordflow">for</span> (j=0;j<ndim;j++) {
+<a name="l01289"></a>01289 psum[j] += ptry[j]-p[ihi][j];
+<a name="l01290"></a>01290 p[ihi][j]=ptry[j];
+<a name="l01291"></a>01291 }
+<a name="l01292"></a>01292 }
+<a name="l01293"></a>01293 sinfo_free_my_vector(&vtry);
+<a name="l01294"></a>01294 <span class="keywordflow">return</span> ytry;
+<a name="l01295"></a>01295 }
+<a name="l01296"></a>01296
+<a name="l01297"></a>01297 <span class="comment">/*-------------------------------------------------------------------------*/</span>
<a name="l01298"></a>01298 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l01299"></a>01299 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l01309"></a>01309 <span class="comment">/*--------------------------------------------------------------------------*/</span>
-<a name="l01310"></a>01310
-<a name="l01311"></a>01311 <span class="keywordtype">int</span> sinfo_vector_dindgen(cpl_vector** v)
-<a name="l01312"></a>01312 {
-<a name="l01313"></a>01313
-<a name="l01314"></a>01314 <span class="keywordtype">int</span> sz=0;
-<a name="l01315"></a>01315 <span class="keywordtype">int</span> i=0;
-<a name="l01316"></a>01316
-<a name="l01317"></a>01317 cknull(*v,<span class="stringliteral">"Null input vector"</span>);
-<a name="l01318"></a>01318 check(sz=cpl_vector_get_size(*v),<span class="stringliteral">"Getting size of a vector"</span>);
-<a name="l01319"></a>01319
-<a name="l01320"></a>01320 <span class="keywordflow">for</span>(i=0;i<sz;i++) {
-<a name="l01321"></a>01321 cpl_vector_set(*v,i,(<span class="keywordtype">double</span>)i);
-<a name="l01322"></a>01322 }
-<a name="l01323"></a>01323
-<a name="l01324"></a>01324 <span class="keywordflow">return</span> 0;
-<a name="l01325"></a>01325 cleanup:
-<a name="l01326"></a>01326 <span class="keywordflow">return</span> -1;
-<a name="l01327"></a>01327
-<a name="l01328"></a>01328 }
-<a name="l01329"></a>01329
-<a name="l01330"></a>01330 <span class="comment">/*-------------------------------------------------------------------------*/</span>
-<a name="l01341"></a>01341 <span class="comment">/*--------------------------------------------------------------------------*/</span>
-<a name="l01342"></a>01342
-<a name="l01343"></a>01343 <span class="keywordtype">int</span> sinfo_is_fits_file(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename)
-<a name="l01344"></a>01344 {
-<a name="l01345"></a>01345 FILE *fp ;
-<a name="l01346"></a>01346 <span class="keywordtype">char</span> *magic ;
-<a name="l01347"></a>01347 <span class="keywordtype">int</span> isfits ;
-<a name="l01348"></a>01348
-<a name="l01349"></a>01349 <span class="keywordflow">if</span> ((fp = fopen(filename, <span class="stringliteral">"r"</span>))==NULL) {
-<a name="l01350"></a>01350 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"cannot open file [%s]"</span>, filename) ;
-<a name="l01351"></a>01351 <span class="keywordflow">return</span> -1 ;
-<a name="l01352"></a>01352 }
-<a name="l01353"></a>01353
-<a name="l01354"></a>01354 magic = cpl_calloc(FITS_MAGIC_SZ+1, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)) ;
-<a name="l01355"></a>01355 (void)fread(magic, 1, FITS_MAGIC_SZ, fp) ;
-<a name="l01356"></a>01356 (void)fclose(fp) ;
-<a name="l01357"></a>01357 magic[FITS_MAGIC_SZ] = (char)0 ;
-<a name="l01358"></a>01358 <span class="keywordflow">if</span> (strstr(magic, <span class="stringliteral">"SIMPLE"</span>)!=NULL)
-<a name="l01359"></a>01359 isfits = 1 ;
-<a name="l01360"></a>01360 <span class="keywordflow">else</span>
-<a name="l01361"></a>01361 isfits = 0 ;
-<a name="l01362"></a>01362 cpl_free(magic) ;
-<a name="l01363"></a>01363 <span class="keywordflow">return</span> isfits ;
-<a name="l01364"></a>01364 }
-<a name="l01365"></a>01365
-<a name="l01366"></a>01366 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01372"></a>01372 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01373"></a>01373 cpl_error_code
-<a name="l01374"></a>01374 sinfo_table_correl(cpl_table * t1, cpl_table* t2, cpl_table* range,<span class="keywordtype">double</span>* xcor)
-<a name="l01375"></a>01375 {
-<a name="l01376"></a>01376
-<a name="l01377"></a>01377 <span class="keywordtype">double</span> wsr=0;
-<a name="l01378"></a>01378 <span class="keywordtype">double</span> wer=0;
-<a name="l01379"></a>01379 <span class="keywordtype">int</span> nr=0;
-<a name="l01380"></a>01380 <span class="keywordtype">int</span> i=0;
-<a name="l01381"></a>01381 <span class="keywordtype">int</span> status=0;
-<a name="l01382"></a>01382 <span class="keywordtype">int</span> nrows=0;
-<a name="l01383"></a>01383 <span class="keywordtype">double</span> mean=0;
-<a name="l01384"></a>01384 <span class="keywordtype">double</span> prod=0;
-<a name="l01385"></a>01385
-<a name="l01386"></a>01386 cpl_table* tmp_t1=NULL;
-<a name="l01387"></a>01387 cpl_table* tmp_t2=NULL;
-<a name="l01388"></a>01388
-<a name="l01389"></a>01389 check_nomsg(nr=cpl_table_get_nrow(range));
-<a name="l01390"></a>01390 <span class="keywordflow">for</span>(i=0;i<nr;i++) {
-<a name="l01391"></a>01391 wsr=cpl_table_get_double(range,<span class="stringliteral">"WSTART"</span>,i,&status);
-<a name="l01392"></a>01392 wer=cpl_table_get_double(range,<span class="stringliteral">"WEND"</span>,i,&status);
-<a name="l01393"></a>01393 cpl_table_and_selected_double(t1,<span class="stringliteral">"WAVE"</span>,CPL_NOT_LESS_THAN,wsr);
-<a name="l01394"></a>01394 cpl_table_and_selected_double(t1,<span class="stringliteral">"WAVE"</span>,CPL_NOT_GREATER_THAN,wer);
-<a name="l01395"></a>01395 tmp_t1=cpl_table_extract_selected(t1);
-<a name="l01396"></a>01396 cpl_table_and_selected_double(t2,<span class="stringliteral">"WAVE"</span>,CPL_NOT_LESS_THAN,wsr);
-<a name="l01397"></a>01397 cpl_table_and_selected_double(t2,<span class="stringliteral">"WAVE"</span>,CPL_NOT_GREATER_THAN,wer);
-<a name="l01398"></a>01398 tmp_t2=cpl_table_extract_selected(t2);
-<a name="l01399"></a>01399 cpl_table_duplicate_column(tmp_t1,<span class="stringliteral">"INT1"</span>,tmp_t1,<span class="stringliteral">"INT"</span>);
-<a name="l01400"></a>01400 cpl_table_duplicate_column(tmp_t1,<span class="stringliteral">"INT2"</span>,tmp_t2,<span class="stringliteral">"INT"</span>);
-<a name="l01401"></a>01401 cpl_table_multiply_columns(tmp_t1,<span class="stringliteral">"INT1"</span>,<span class="stringliteral">"INT2"</span>);
-<a name="l01402"></a>01402 mean=cpl_table_get_column_mean(tmp_t1,<span class="stringliteral">"INT1"</span>);
-<a name="l01403"></a>01403 nrows=cpl_table_get_nrow(tmp_t1);
-<a name="l01404"></a>01404 prod=mean*nrows;
-<a name="l01405"></a>01405 *xcor+=prod;
-<a name="l01406"></a>01406 }
-<a name="l01407"></a>01407
-<a name="l01408"></a>01408 cleanup:
-<a name="l01409"></a>01409 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01410"></a>01410 }
-<a name="l01416"></a>01416 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01417"></a>01417 cpl_error_code
-<a name="l01418"></a>01418 sinfo_frameset_merge(cpl_frameset * set1, cpl_frameset* set2)
-<a name="l01419"></a>01419 {
-<a name="l01420"></a>01420
-<a name="l01421"></a>01421 cpl_frame* frm_tmp=NULL;
-<a name="l01422"></a>01422 cpl_frame* frm_dup=NULL;
-<a name="l01423"></a>01423
-<a name="l01424"></a>01424 passure(set1 != NULL, <span class="stringliteral">"Wrong input set"</span>);
-<a name="l01425"></a>01425
-<a name="l01426"></a>01426 check_nomsg(frm_tmp = cpl_frameset_get_first(set2));
-<a name="l01427"></a>01427 <span class="keywordflow">while</span> (frm_tmp != NULL)
-<a name="l01428"></a>01428 {
-<a name="l01429"></a>01429 frm_dup=cpl_frame_duplicate(frm_tmp);
-<a name="l01430"></a>01430 cpl_frameset_insert(set1,frm_dup);
-<a name="l01431"></a>01431 frm_tmp = cpl_frameset_get_next(set2);
-<a name="l01432"></a>01432 }
-<a name="l01433"></a>01433
-<a name="l01434"></a>01434 cleanup:
-<a name="l01435"></a>01435 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01436"></a>01436 }
-<a name="l01437"></a>01437
-<a name="l01438"></a>01438 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01446"></a>01446 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01447"></a>01447
-<a name="l01448"></a>01448 cpl_error_code
-<a name="l01449"></a>01449 sinfo_extract_frames_group_type(<span class="keyword">const</span> cpl_frameset * <span class="keyword">set</span>,
-<a name="l01450"></a>01450 cpl_frameset** ext,
-<a name="l01451"></a>01451 cpl_frame_group type)
-<a name="l01452"></a>01452 {
-<a name="l01453"></a>01453 <span class="keyword">const</span> cpl_frame* frm_tmp=NULL;
-<a name="l01454"></a>01454 cpl_frame* frm_dup=NULL;
-<a name="l01455"></a>01455 cpl_frame_group g;
-<a name="l01456"></a>01456
-<a name="l01457"></a>01457 check_nomsg(*ext = cpl_frameset_new());
-<a name="l01458"></a>01458 check_nomsg(frm_tmp = cpl_frameset_get_first_const(<span class="keyword">set</span>));
-<a name="l01459"></a>01459 <span class="keywordflow">while</span> (frm_tmp != NULL)
-<a name="l01460"></a>01460 {
-<a name="l01461"></a>01461 g=cpl_frame_get_group(frm_tmp);
-<a name="l01462"></a>01462 <span class="keywordflow">if</span>(g == type) {
-<a name="l01463"></a>01463 frm_dup=cpl_frame_duplicate(frm_tmp);
-<a name="l01464"></a>01464 cpl_frameset_insert(*ext,frm_dup);
-<a name="l01465"></a>01465 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"group %d insert file %s "</span>,
-<a name="l01466"></a>01466 type,cpl_frame_get_filename(frm_dup));
-<a name="l01467"></a>01467 }
-<a name="l01468"></a>01468 frm_tmp = cpl_frameset_get_next_const(<span class="keyword">set</span>);
-<a name="l01469"></a>01469 }
-<a name="l01470"></a>01470
-<a name="l01471"></a>01471 cleanup:
-<a name="l01472"></a>01472 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01473"></a>01473 }
+<a name="l01308"></a>01308 <span class="comment">/*--------------------------------------------------------------------------*/</span>
+<a name="l01309"></a>01309
+<a name="l01310"></a>01310 <span class="keywordtype">int</span> sinfo_vector_dindgen(cpl_vector** v)
+<a name="l01311"></a>01311 {
+<a name="l01312"></a>01312
+<a name="l01313"></a>01313 <span class="keywordtype">int</span> sz=0;
+<a name="l01314"></a>01314 <span class="keywordtype">int</span> i=0;
+<a name="l01315"></a>01315
+<a name="l01316"></a>01316 cknull(*v,<span class="stringliteral">"Null input vector"</span>);
+<a name="l01317"></a>01317 check(sz=cpl_vector_get_size(*v),<span class="stringliteral">"Getting size of a vector"</span>);
+<a name="l01318"></a>01318
+<a name="l01319"></a>01319 <span class="keywordflow">for</span>(i=0;i<sz;i++) {
+<a name="l01320"></a>01320 cpl_vector_set(*v,i,(<span class="keywordtype">double</span>)i);
+<a name="l01321"></a>01321 }
+<a name="l01322"></a>01322
+<a name="l01323"></a>01323 <span class="keywordflow">return</span> 0;
+<a name="l01324"></a>01324 cleanup:
+<a name="l01325"></a>01325 <span class="keywordflow">return</span> -1;
+<a name="l01326"></a>01326
+<a name="l01327"></a>01327 }
+<a name="l01328"></a>01328
+<a name="l01329"></a>01329 <span class="comment">/*-------------------------------------------------------------------------*/</span>
+<a name="l01340"></a>01340 <span class="comment">/*--------------------------------------------------------------------------*/</span>
+<a name="l01341"></a>01341
+<a name="l01342"></a>01342 <span class="keywordtype">int</span> sinfo_is_fits_file(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename)
+<a name="l01343"></a>01343 {
+<a name="l01344"></a>01344 FILE *fp ;
+<a name="l01345"></a>01345 <span class="keywordtype">char</span> *magic ;
+<a name="l01346"></a>01346 <span class="keywordtype">int</span> isfits ;
+<a name="l01347"></a>01347
+<a name="l01348"></a>01348 <span class="keywordflow">if</span> ((fp = fopen(filename, <span class="stringliteral">"r"</span>))==NULL) {
+<a name="l01349"></a>01349 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"cannot open file [%s]"</span>, filename) ;
+<a name="l01350"></a>01350 <span class="keywordflow">return</span> -1 ;
+<a name="l01351"></a>01351 }
+<a name="l01352"></a>01352
+<a name="l01353"></a>01353 magic = cpl_calloc(FITS_MAGIC_SZ+1, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)) ;
+<a name="l01354"></a>01354 (void)fread(magic, 1, FITS_MAGIC_SZ, fp) ;
+<a name="l01355"></a>01355 (void)fclose(fp) ;
+<a name="l01356"></a>01356 magic[FITS_MAGIC_SZ] = (char)0 ;
+<a name="l01357"></a>01357 <span class="keywordflow">if</span> (strstr(magic, <span class="stringliteral">"SIMPLE"</span>)!=NULL)
+<a name="l01358"></a>01358 isfits = 1 ;
+<a name="l01359"></a>01359 <span class="keywordflow">else</span>
+<a name="l01360"></a>01360 isfits = 0 ;
+<a name="l01361"></a>01361 cpl_free(magic) ;
+<a name="l01362"></a>01362 <span class="keywordflow">return</span> isfits ;
+<a name="l01363"></a>01363 }
+<a name="l01364"></a>01364
+<a name="l01365"></a>01365 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01371"></a>01371 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01372"></a>01372 cpl_error_code
+<a name="l01373"></a>01373 sinfo_table_correl(cpl_table * t1, cpl_table* t2, cpl_table* range,<span class="keywordtype">double</span>* xcor)
+<a name="l01374"></a>01374 {
+<a name="l01375"></a>01375
+<a name="l01376"></a>01376 <span class="keywordtype">double</span> wsr=0;
+<a name="l01377"></a>01377 <span class="keywordtype">double</span> wer=0;
+<a name="l01378"></a>01378 <span class="keywordtype">int</span> nr=0;
+<a name="l01379"></a>01379 <span class="keywordtype">int</span> i=0;
+<a name="l01380"></a>01380 <span class="keywordtype">int</span> status=0;
+<a name="l01381"></a>01381 <span class="keywordtype">int</span> nrows=0;
+<a name="l01382"></a>01382 <span class="keywordtype">double</span> mean=0;
+<a name="l01383"></a>01383 <span class="keywordtype">double</span> prod=0;
+<a name="l01384"></a>01384
+<a name="l01385"></a>01385 cpl_table* tmp_t1=NULL;
+<a name="l01386"></a>01386 cpl_table* tmp_t2=NULL;
+<a name="l01387"></a>01387
+<a name="l01388"></a>01388 check_nomsg(nr=cpl_table_get_nrow(range));
+<a name="l01389"></a>01389 <span class="keywordflow">for</span>(i=0;i<nr;i++) {
+<a name="l01390"></a>01390 wsr=cpl_table_get_double(range,<span class="stringliteral">"WSTART"</span>,i,&status);
+<a name="l01391"></a>01391 wer=cpl_table_get_double(range,<span class="stringliteral">"WEND"</span>,i,&status);
+<a name="l01392"></a>01392 cpl_table_and_selected_double(t1,<span class="stringliteral">"WAVE"</span>,CPL_NOT_LESS_THAN,wsr);
+<a name="l01393"></a>01393 cpl_table_and_selected_double(t1,<span class="stringliteral">"WAVE"</span>,CPL_NOT_GREATER_THAN,wer);
+<a name="l01394"></a>01394 tmp_t1=cpl_table_extract_selected(t1);
+<a name="l01395"></a>01395 cpl_table_and_selected_double(t2,<span class="stringliteral">"WAVE"</span>,CPL_NOT_LESS_THAN,wsr);
+<a name="l01396"></a>01396 cpl_table_and_selected_double(t2,<span class="stringliteral">"WAVE"</span>,CPL_NOT_GREATER_THAN,wer);
+<a name="l01397"></a>01397 tmp_t2=cpl_table_extract_selected(t2);
+<a name="l01398"></a>01398 cpl_table_duplicate_column(tmp_t1,<span class="stringliteral">"INT1"</span>,tmp_t1,<span class="stringliteral">"INT"</span>);
+<a name="l01399"></a>01399 cpl_table_duplicate_column(tmp_t1,<span class="stringliteral">"INT2"</span>,tmp_t2,<span class="stringliteral">"INT"</span>);
+<a name="l01400"></a>01400 cpl_table_multiply_columns(tmp_t1,<span class="stringliteral">"INT1"</span>,<span class="stringliteral">"INT2"</span>);
+<a name="l01401"></a>01401 mean=cpl_table_get_column_mean(tmp_t1,<span class="stringliteral">"INT1"</span>);
+<a name="l01402"></a>01402 nrows=cpl_table_get_nrow(tmp_t1);
+<a name="l01403"></a>01403 prod=mean*nrows;
+<a name="l01404"></a>01404 *xcor+=prod;
+<a name="l01405"></a>01405 }
+<a name="l01406"></a>01406
+<a name="l01407"></a>01407 cleanup:
+<a name="l01408"></a>01408 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01409"></a>01409 }
+<a name="l01415"></a>01415 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01416"></a>01416 cpl_error_code
+<a name="l01417"></a>01417 sinfo_frameset_merge(cpl_frameset * set1, cpl_frameset* set2)
+<a name="l01418"></a>01418 {
+<a name="l01419"></a>01419
+<a name="l01420"></a>01420 cpl_frame* frm_tmp=NULL;
+<a name="l01421"></a>01421 cpl_frame* frm_dup=NULL;
+<a name="l01422"></a>01422
+<a name="l01423"></a>01423 passure(set1 != NULL, <span class="stringliteral">"Wrong input set"</span>);
+<a name="l01424"></a>01424
+<a name="l01425"></a>01425 check_nomsg(frm_tmp = cpl_frameset_get_first(set2));
+<a name="l01426"></a>01426 <span class="keywordflow">while</span> (frm_tmp != NULL)
+<a name="l01427"></a>01427 {
+<a name="l01428"></a>01428 frm_dup=cpl_frame_duplicate(frm_tmp);
+<a name="l01429"></a>01429 cpl_frameset_insert(set1,frm_dup);
+<a name="l01430"></a>01430 frm_tmp = cpl_frameset_get_next(set2);
+<a name="l01431"></a>01431 }
+<a name="l01432"></a>01432
+<a name="l01433"></a>01433 cleanup:
+<a name="l01434"></a>01434 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01435"></a>01435 }
+<a name="l01436"></a>01436
+<a name="l01437"></a>01437 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01445"></a>01445 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01446"></a>01446
+<a name="l01447"></a>01447 cpl_error_code
+<a name="l01448"></a>01448 sinfo_extract_frames_group_type(<span class="keyword">const</span> cpl_frameset * <span class="keyword">set</span>,
+<a name="l01449"></a>01449 cpl_frameset** ext,
+<a name="l01450"></a>01450 cpl_frame_group type)
+<a name="l01451"></a>01451 {
+<a name="l01452"></a>01452 <span class="keyword">const</span> cpl_frame* frm_tmp=NULL;
+<a name="l01453"></a>01453 cpl_frame* frm_dup=NULL;
+<a name="l01454"></a>01454 cpl_frame_group g;
+<a name="l01455"></a>01455
+<a name="l01456"></a>01456 check_nomsg(*ext = cpl_frameset_new());
+<a name="l01457"></a>01457 check_nomsg(frm_tmp = cpl_frameset_get_first_const(<span class="keyword">set</span>));
+<a name="l01458"></a>01458 <span class="keywordflow">while</span> (frm_tmp != NULL)
+<a name="l01459"></a>01459 {
+<a name="l01460"></a>01460 g=cpl_frame_get_group(frm_tmp);
+<a name="l01461"></a>01461 <span class="keywordflow">if</span>(g == type) {
+<a name="l01462"></a>01462 frm_dup=cpl_frame_duplicate(frm_tmp);
+<a name="l01463"></a>01463 cpl_frameset_insert(*ext,frm_dup);
+<a name="l01464"></a>01464 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"group %d insert file %s "</span>,
+<a name="l01465"></a>01465 type,cpl_frame_get_filename(frm_dup));
+<a name="l01466"></a>01466 }
+<a name="l01467"></a>01467 frm_tmp = cpl_frameset_get_next_const(<span class="keyword">set</span>);
+<a name="l01468"></a>01468 }
+<a name="l01469"></a>01469
+<a name="l01470"></a>01470 cleanup:
+<a name="l01471"></a>01471 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01472"></a>01472 }
+<a name="l01473"></a>01473
<a name="l01474"></a>01474
<a name="l01475"></a>01475
<a name="l01476"></a>01476
-<a name="l01477"></a>01477
-<a name="l01488"></a>01488 <span class="keywordtype">int</span>
-<a name="l01489"></a>01489 sinfo_get_pupil_shift(cpl_imagelist* iml,<span class="keyword">const</span> <span class="keywordtype">int</span> n,cpl_table** qclog_tbl)
-<a name="l01490"></a>01490 {
-<a name="l01491"></a>01491 cpl_size max_ima_x=0;
-<a name="l01492"></a>01492 cpl_size max_ima_y=0;
-<a name="l01493"></a>01493 <span class="keywordtype">int</span> nx=0;
-<a name="l01494"></a>01494 <span class="keywordtype">int</span> ny=0;
-<a name="l01495"></a>01495
-<a name="l01496"></a>01496 <span class="keywordtype">double</span> xshift=0;
-<a name="l01497"></a>01497 <span class="keywordtype">double</span> yshift=0;
-<a name="l01498"></a>01498
-<a name="l01499"></a>01499 <span class="keywordtype">double</span> max_ima_cx=0;
-<a name="l01500"></a>01500 <span class="keywordtype">double</span> max_ima_cy=0;
-<a name="l01501"></a>01501
-<a name="l01502"></a>01502 cpl_image* img=NULL;
-<a name="l01503"></a>01503 cpl_image* img_dup=NULL;
-<a name="l01504"></a>01504
-<a name="l01505"></a>01505 <span class="keywordtype">char</span> key_name[FILE_NAME_SZ];
-<a name="l01506"></a>01506
-<a name="l01507"></a>01507 img=cpl_imagelist_collapse_median_create(iml);
-<a name="l01508"></a>01508 nx=cpl_image_get_size_x(img);
-<a name="l01509"></a>01509 ny=cpl_image_get_size_y(img);
-<a name="l01510"></a>01510
-<a name="l01511"></a>01511 img_dup=cpl_image_duplicate(img);
-<a name="l01512"></a>01512 sinfo_clean_nan(&img_dup);
-<a name="l01513"></a>01513 cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y);
-<a name="l01514"></a>01514 max_ima_cx=cpl_image_get_centroid_x_window(img_dup,1,1,nx,ny);
-<a name="l01515"></a>01515 max_ima_cy=cpl_image_get_centroid_y_window(img_dup,1,1,nx,ny);
-<a name="l01516"></a>01516
-<a name="l01517"></a>01517 cpl_image_delete(img_dup);
+<a name="l01487"></a>01487 <span class="keywordtype">int</span>
+<a name="l01488"></a>01488 sinfo_get_pupil_shift(cpl_imagelist* iml,<span class="keyword">const</span> <span class="keywordtype">int</span> n,cpl_table** qclog_tbl)
+<a name="l01489"></a>01489 {
+<a name="l01490"></a>01490 cpl_size max_ima_x=0;
+<a name="l01491"></a>01491 cpl_size max_ima_y=0;
+<a name="l01492"></a>01492 <span class="keywordtype">int</span> nx=0;
+<a name="l01493"></a>01493 <span class="keywordtype">int</span> ny=0;
+<a name="l01494"></a>01494
+<a name="l01495"></a>01495 <span class="keywordtype">double</span> xshift=0;
+<a name="l01496"></a>01496 <span class="keywordtype">double</span> yshift=0;
+<a name="l01497"></a>01497
+<a name="l01498"></a>01498 <span class="keywordtype">double</span> max_ima_cx=0;
+<a name="l01499"></a>01499 <span class="keywordtype">double</span> max_ima_cy=0;
+<a name="l01500"></a>01500
+<a name="l01501"></a>01501 cpl_image* img=NULL;
+<a name="l01502"></a>01502 cpl_image* img_dup=NULL;
+<a name="l01503"></a>01503
+<a name="l01504"></a>01504 <span class="keywordtype">char</span> key_name[FILE_NAME_SZ];
+<a name="l01505"></a>01505
+<a name="l01506"></a>01506 img=cpl_imagelist_collapse_median_create(iml);
+<a name="l01507"></a>01507 nx=cpl_image_get_size_x(img);
+<a name="l01508"></a>01508 ny=cpl_image_get_size_y(img);
+<a name="l01509"></a>01509
+<a name="l01510"></a>01510 img_dup=cpl_image_duplicate(img);
+<a name="l01511"></a>01511 sinfo_clean_nan(&img_dup);
+<a name="l01512"></a>01512 cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y);
+<a name="l01513"></a>01513 max_ima_cx=cpl_image_get_centroid_x_window(img_dup,1,1,nx,ny);
+<a name="l01514"></a>01514 max_ima_cy=cpl_image_get_centroid_y_window(img_dup,1,1,nx,ny);
+<a name="l01515"></a>01515
+<a name="l01516"></a>01516 cpl_image_delete(img_dup);
+<a name="l01517"></a>01517
<a name="l01518"></a>01518
-<a name="l01519"></a>01519
-<a name="l01520"></a>01520 xshift=max_ima_cx-(double)nx/2;
-<a name="l01521"></a>01521 yshift=max_ima_cy-(double)ny/2;
-<a name="l01522"></a>01522
-<a name="l01523"></a>01523 snprintf(key_name,<span class="keyword">sizeof</span>(key_name),<span class="stringliteral">"%s%d%s"</span>,<span class="stringliteral">"QC PUPIL"</span>,n,<span class="stringliteral">" SHIFTX"</span>);
-<a name="l01524"></a>01524 sinfo_qclog_add_double(*qclog_tbl,key_name,xshift,
-<a name="l01525"></a>01525 <span class="stringliteral">"X shift centroid - center image"</span>,<span class="stringliteral">"%f"</span>);
-<a name="l01526"></a>01526
-<a name="l01527"></a>01527 snprintf(key_name,<span class="keyword">sizeof</span>(key_name),<span class="stringliteral">"%s%d%s"</span>,<span class="stringliteral">"QC PUPIL"</span>,n,<span class="stringliteral">" SHIFTY"</span>);
-<a name="l01528"></a>01528 sinfo_qclog_add_double(*qclog_tbl,key_name,yshift,
-<a name="l01529"></a>01529 <span class="stringliteral">"Y shift centroid - center image"</span>,<span class="stringliteral">"%f"</span>);
-<a name="l01530"></a>01530 cpl_image_delete(img);
-<a name="l01531"></a>01531
-<a name="l01532"></a>01532 <span class="keywordflow">return</span> 0;
-<a name="l01533"></a>01533 }
+<a name="l01519"></a>01519 xshift=max_ima_cx-(double)nx/2;
+<a name="l01520"></a>01520 yshift=max_ima_cy-(double)ny/2;
+<a name="l01521"></a>01521
+<a name="l01522"></a>01522 snprintf(key_name,<span class="keyword">sizeof</span>(key_name),<span class="stringliteral">"%s%d%s"</span>,<span class="stringliteral">"QC PUPIL"</span>,n,<span class="stringliteral">" SHIFTX"</span>);
+<a name="l01523"></a>01523 sinfo_qclog_add_double(*qclog_tbl,key_name,xshift,
+<a name="l01524"></a>01524 <span class="stringliteral">"X shift centroid - center image"</span>,<span class="stringliteral">"%f"</span>);
+<a name="l01525"></a>01525
+<a name="l01526"></a>01526 snprintf(key_name,<span class="keyword">sizeof</span>(key_name),<span class="stringliteral">"%s%d%s"</span>,<span class="stringliteral">"QC PUPIL"</span>,n,<span class="stringliteral">" SHIFTY"</span>);
+<a name="l01527"></a>01527 sinfo_qclog_add_double(*qclog_tbl,key_name,yshift,
+<a name="l01528"></a>01528 <span class="stringliteral">"Y shift centroid - center image"</span>,<span class="stringliteral">"%f"</span>);
+<a name="l01529"></a>01529 cpl_image_delete(img);
+<a name="l01530"></a>01530
+<a name="l01531"></a>01531 <span class="keywordflow">return</span> 0;
+<a name="l01532"></a>01532 }
+<a name="l01533"></a>01533
<a name="l01534"></a>01534
<a name="l01535"></a>01535
-<a name="l01536"></a>01536
-<a name="l01543"></a>01543 <span class="keywordtype">int</span> sinfo_get_strehl_type(cpl_frameset* sof)
-<a name="l01544"></a>01544 {
-<a name="l01545"></a>01545 <span class="keywordtype">int</span> strehl_sw=0;
-<a name="l01546"></a>01546 <span class="keywordtype">int</span> nobs=0;
-<a name="l01547"></a>01547 <span class="keywordtype">int</span> i=0;
-<a name="l01548"></a>01548 cpl_frameset* obs=NULL;
-<a name="l01549"></a>01549
-<a name="l01550"></a>01550 cpl_frame* frame=NULL;
-<a name="l01551"></a>01551 <span class="keywordtype">float</span>* pix_scale=NULL;
-<a name="l01552"></a>01552 cpl_propertylist* plist=NULL;
-<a name="l01553"></a>01553
-<a name="l01554"></a>01554 obs = cpl_frameset_new();
-<a name="l01555"></a>01555
-<a name="l01556"></a>01556 sinfo_contains_frames_kind(sof,obs,PRO_OBS_PSF);
-<a name="l01557"></a>01557
-<a name="l01558"></a>01558 nobs=cpl_frameset_get_size(obs);
-<a name="l01559"></a>01559 <span class="keywordflow">if</span> (nobs < 1) {
-<a name="l01560"></a>01560 sinfo_contains_frames_kind(sof,obs,PRO_OBS_STD);
-<a name="l01561"></a>01561 nobs=cpl_frameset_get_size(obs);
-<a name="l01562"></a>01562 }
-<a name="l01563"></a>01563
-<a name="l01564"></a>01564 nobs=cpl_frameset_get_size(obs);
-<a name="l01565"></a>01565
-<a name="l01566"></a>01566 <span class="keywordflow">if</span> (nobs < 1) {
-<a name="l01567"></a>01567 <span class="keywordflow">return</span> 0;
-<a name="l01568"></a>01568 } <span class="keywordflow">else</span> {
-<a name="l01569"></a>01569 pix_scale=cpl_calloc(nobs,<span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));
-<a name="l01570"></a>01570 <span class="keywordflow">for</span>(i=0;i<nobs;i++) {
-<a name="l01571"></a>01571 frame=cpl_frameset_get_frame(obs,i);
-<a name="l01572"></a>01572 plist=cpl_propertylist_load(cpl_frame_get_filename(frame),0);
-<a name="l01573"></a>01573 pix_scale[i]=sinfo_pfits_get_pixscale(plist);
-<a name="l01574"></a>01574 cpl_propertylist_delete(plist);
-<a name="l01575"></a>01575 }
-<a name="l01576"></a>01576 <span class="keywordflow">if</span>(sinfo_pix_scale_isnot_const(pix_scale,nobs)) {
-<a name="l01577"></a>01577 strehl_sw=1;
-<a name="l01578"></a>01578 }
-<a name="l01579"></a>01579 cpl_free(pix_scale);
-<a name="l01580"></a>01580 }
-<a name="l01581"></a>01581 cpl_frameset_delete(obs);
-<a name="l01582"></a>01582
-<a name="l01583"></a>01583 <span class="keywordflow">return</span> strehl_sw;
-<a name="l01584"></a>01584
-<a name="l01585"></a>01585 }
+<a name="l01542"></a>01542 <span class="keywordtype">int</span> sinfo_get_strehl_type(cpl_frameset* sof)
+<a name="l01543"></a>01543 {
+<a name="l01544"></a>01544 <span class="keywordtype">int</span> strehl_sw=0;
+<a name="l01545"></a>01545 <span class="keywordtype">int</span> nobs=0;
+<a name="l01546"></a>01546 <span class="keywordtype">int</span> i=0;
+<a name="l01547"></a>01547 cpl_frameset* obs=NULL;
+<a name="l01548"></a>01548
+<a name="l01549"></a>01549 cpl_frame* frame=NULL;
+<a name="l01550"></a>01550 <span class="keywordtype">float</span>* pix_scale=NULL;
+<a name="l01551"></a>01551 cpl_propertylist* plist=NULL;
+<a name="l01552"></a>01552
+<a name="l01553"></a>01553 obs = cpl_frameset_new();
+<a name="l01554"></a>01554
+<a name="l01555"></a>01555 sinfo_contains_frames_kind(sof,obs,PRO_OBS_PSF);
+<a name="l01556"></a>01556
+<a name="l01557"></a>01557 nobs=cpl_frameset_get_size(obs);
+<a name="l01558"></a>01558 <span class="keywordflow">if</span> (nobs < 1) {
+<a name="l01559"></a>01559 sinfo_contains_frames_kind(sof,obs,PRO_OBS_STD);
+<a name="l01560"></a>01560 nobs=cpl_frameset_get_size(obs);
+<a name="l01561"></a>01561 }
+<a name="l01562"></a>01562
+<a name="l01563"></a>01563 nobs=cpl_frameset_get_size(obs);
+<a name="l01564"></a>01564
+<a name="l01565"></a>01565 <span class="keywordflow">if</span> (nobs < 1) {
+<a name="l01566"></a>01566 <span class="keywordflow">return</span> 0;
+<a name="l01567"></a>01567 } <span class="keywordflow">else</span> {
+<a name="l01568"></a>01568 pix_scale=cpl_calloc(nobs,<span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));
+<a name="l01569"></a>01569 <span class="keywordflow">for</span>(i=0;i<nobs;i++) {
+<a name="l01570"></a>01570 frame=cpl_frameset_get_frame(obs,i);
+<a name="l01571"></a>01571 plist=cpl_propertylist_load(cpl_frame_get_filename(frame),0);
+<a name="l01572"></a>01572 pix_scale[i]=sinfo_pfits_get_pixscale(plist);
+<a name="l01573"></a>01573 cpl_propertylist_delete(plist);
+<a name="l01574"></a>01574 }
+<a name="l01575"></a>01575 <span class="keywordflow">if</span>(sinfo_pix_scale_isnot_const(pix_scale,nobs)) {
+<a name="l01576"></a>01576 strehl_sw=1;
+<a name="l01577"></a>01577 }
+<a name="l01578"></a>01578 cpl_free(pix_scale);
+<a name="l01579"></a>01579 }
+<a name="l01580"></a>01580 cpl_frameset_delete(obs);
+<a name="l01581"></a>01581
+<a name="l01582"></a>01582 <span class="keywordflow">return</span> strehl_sw;
+<a name="l01583"></a>01583
+<a name="l01584"></a>01584 }
+<a name="l01585"></a>01585
<a name="l01586"></a>01586
<a name="l01587"></a>01587
-<a name="l01588"></a>01588
-<a name="l01595"></a>01595 <span class="keywordtype">double</span> sinfo_get_wave_cent(<span class="keyword">const</span> <span class="keywordtype">char</span>* band)
-<a name="l01596"></a>01596 {
-<a name="l01597"></a>01597 <span class="keywordtype">double</span> lam=0.;
-<a name="l01598"></a>01598 <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H+K"</span>) == 0) {
-<a name="l01599"></a>01599 lam=1.950;
-<a name="l01600"></a>01600 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"K"</span>) == 0) {
-<a name="l01601"></a>01601 lam=2.175;
-<a name="l01602"></a>01602 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"J"</span>) == 0) {
-<a name="l01603"></a>01603 lam=1.225;
-<a name="l01604"></a>01604 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H"</span>) == 0) {
-<a name="l01605"></a>01605 lam=1.675;
-<a name="l01606"></a>01606 }
-<a name="l01607"></a>01607 <span class="keywordflow">return</span> lam;
-<a name="l01608"></a>01608
-<a name="l01609"></a>01609 }
+<a name="l01594"></a>01594 <span class="keywordtype">double</span> sinfo_get_wave_cent(<span class="keyword">const</span> <span class="keywordtype">char</span>* band)
+<a name="l01595"></a>01595 {
+<a name="l01596"></a>01596 <span class="keywordtype">double</span> lam=0.;
+<a name="l01597"></a>01597 <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H+K"</span>) == 0) {
+<a name="l01598"></a>01598 lam=1.950;
+<a name="l01599"></a>01599 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"K"</span>) == 0) {
+<a name="l01600"></a>01600 lam=2.175;
+<a name="l01601"></a>01601 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"J"</span>) == 0) {
+<a name="l01602"></a>01602 lam=1.225;
+<a name="l01603"></a>01603 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H"</span>) == 0) {
+<a name="l01604"></a>01604 lam=1.675;
+<a name="l01605"></a>01605 }
+<a name="l01606"></a>01606 <span class="keywordflow">return</span> lam;
+<a name="l01607"></a>01607
+<a name="l01608"></a>01608 }
+<a name="l01609"></a>01609
<a name="l01610"></a>01610
<a name="l01611"></a>01611
-<a name="l01612"></a>01612
-<a name="l01621"></a>01621 <span class="keywordtype">int</span> sinfo_pix_scale_isnot_const(<span class="keywordtype">float</span>* pix_scale, <span class="keyword">const</span> <span class="keywordtype">int</span> n) {
-<a name="l01622"></a>01622 <span class="keywordtype">int</span> i=0;
-<a name="l01623"></a>01623 <span class="keywordtype">float</span> eps=0.0001;
-<a name="l01624"></a>01624 <span class="keywordtype">float</span> ref=pix_scale[0];
-<a name="l01625"></a>01625
-<a name="l01626"></a>01626 <span class="keywordflow">for</span>(i=1;i<n;i++) {
-<a name="l01627"></a>01627 <span class="keywordflow">if</span>(fabs(pix_scale[i]-ref) > eps) <span class="keywordflow">return</span> 1;
-<a name="l01628"></a>01628 }
-<a name="l01629"></a>01629 <span class="keywordflow">return</span> 0;
-<a name="l01630"></a>01630 }
+<a name="l01620"></a>01620 <span class="keywordtype">int</span> sinfo_pix_scale_isnot_const(<span class="keywordtype">float</span>* pix_scale, <span class="keyword">const</span> <span class="keywordtype">int</span> n) {
+<a name="l01621"></a>01621 <span class="keywordtype">int</span> i=0;
+<a name="l01622"></a>01622 <span class="keywordtype">float</span> eps=0.0001;
+<a name="l01623"></a>01623 <span class="keywordtype">float</span> ref=pix_scale[0];
+<a name="l01624"></a>01624
+<a name="l01625"></a>01625 <span class="keywordflow">for</span>(i=1;i<n;i++) {
+<a name="l01626"></a>01626 <span class="keywordflow">if</span>(fabs(pix_scale[i]-ref) > eps) <span class="keywordflow">return</span> 1;
+<a name="l01627"></a>01627 }
+<a name="l01628"></a>01628 <span class="keywordflow">return</span> 0;
+<a name="l01629"></a>01629 }
+<a name="l01630"></a>01630
<a name="l01631"></a>01631
-<a name="l01632"></a>01632
-<a name="l01640"></a>01640 <span class="keyword">const</span> <span class="keywordtype">char</span>* sinfo_get_pix_scale(<span class="keywordtype">float</span> ps) {
-<a name="l01641"></a>01641
-<a name="l01642"></a>01642 <span class="keyword">const</span> <span class="keywordtype">char</span>* key_value;
-<a name="l01643"></a>01643 <span class="keywordtype">float</span> eps=0.0001;
-<a name="l01644"></a>01644
-<a name="l01645"></a>01645 <span class="keywordflow">if</span>(fabs(ps - 0.025) < eps) {
-<a name="l01646"></a>01646 key_value=<span class="stringliteral">"0.025"</span>;
-<a name="l01647"></a>01647 }
-<a name="l01648"></a>01648 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 0.1) < eps) {
-<a name="l01649"></a>01649 key_value=<span class="stringliteral">"0.1"</span>;
-<a name="l01650"></a>01650 }
-<a name="l01651"></a>01651 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 0.25) < eps) {
-<a name="l01652"></a>01652 key_value=<span class="stringliteral">"0.25"</span>;
-<a name="l01653"></a>01653 }
-<a name="l01654"></a>01654 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 1.0) < eps) {
-<a name="l01655"></a>01655 key_value=<span class="stringliteral">"pupil"</span>;
-<a name="l01656"></a>01656 } <span class="keywordflow">else</span> {
-<a name="l01657"></a>01657 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"ps=%f. Failed to set pixel scale"</span>,ps);
-<a name="l01658"></a>01658 <span class="keywordflow">return</span> NULL;
-<a name="l01659"></a>01659 }
-<a name="l01660"></a>01660
-<a name="l01661"></a>01661 <span class="keywordflow">return</span> key_value;
-<a name="l01662"></a>01662 }
+<a name="l01639"></a>01639 <span class="keyword">const</span> <span class="keywordtype">char</span>* sinfo_get_pix_scale(<span class="keywordtype">float</span> ps) {
+<a name="l01640"></a>01640
+<a name="l01641"></a>01641 <span class="keyword">const</span> <span class="keywordtype">char</span>* key_value;
+<a name="l01642"></a>01642 <span class="keywordtype">float</span> eps=0.0001;
+<a name="l01643"></a>01643
+<a name="l01644"></a>01644 <span class="keywordflow">if</span>(fabs(ps - 0.025) < eps) {
+<a name="l01645"></a>01645 key_value=<span class="stringliteral">"0.025"</span>;
+<a name="l01646"></a>01646 }
+<a name="l01647"></a>01647 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 0.1) < eps) {
+<a name="l01648"></a>01648 key_value=<span class="stringliteral">"0.1"</span>;
+<a name="l01649"></a>01649 }
+<a name="l01650"></a>01650 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 0.25) < eps) {
+<a name="l01651"></a>01651 key_value=<span class="stringliteral">"0.25"</span>;
+<a name="l01652"></a>01652 }
+<a name="l01653"></a>01653 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(ps - 1.0) < eps) {
+<a name="l01654"></a>01654 key_value=<span class="stringliteral">"pupil"</span>;
+<a name="l01655"></a>01655 } <span class="keywordflow">else</span> {
+<a name="l01656"></a>01656 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"ps=%f. Failed to set pixel scale"</span>,ps);
+<a name="l01657"></a>01657 <span class="keywordflow">return</span> NULL;
+<a name="l01658"></a>01658 }
+<a name="l01659"></a>01659
+<a name="l01660"></a>01660 <span class="keywordflow">return</span> key_value;
+<a name="l01661"></a>01661 }
+<a name="l01662"></a>01662
<a name="l01663"></a>01663
-<a name="l01664"></a>01664
-<a name="l01680"></a>01680 <span class="keywordtype">int</span> sinfo_get_clean_mean_window(cpl_image* img,
-<a name="l01681"></a>01681 <span class="keywordtype">int</span> llx, <span class="keywordtype">int</span> lly, <span class="keywordtype">int</span> urx, <span class="keywordtype">int</span> ury,
-<a name="l01682"></a>01682 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa, <span class="keyword">const</span> <span class="keywordtype">int</span> nclip,
-<a name="l01683"></a>01683 <span class="keywordtype">double</span>* local_clean_mean,
-<a name="l01684"></a>01684 <span class="keywordtype">double</span>* clean_stdev)
-<a name="l01685"></a>01685 {
-<a name="l01686"></a>01686
-<a name="l01687"></a>01687 <span class="keywordtype">double</span> mean=0;
-<a name="l01688"></a>01688 <span class="keywordtype">double</span> stdev=0;
-<a name="l01689"></a>01689 <span class="keywordtype">double</span> threshold=0;
-<a name="l01690"></a>01690 <span class="keywordtype">double</span> lo_cut=0;
-<a name="l01691"></a>01691 <span class="keywordtype">double</span> hi_cut=0;
-<a name="l01692"></a>01692 cpl_mask* mask=NULL;
-<a name="l01693"></a>01693 cpl_image* tmp=NULL;
-<a name="l01694"></a>01694 cpl_stats* stats=NULL;
-<a name="l01695"></a>01695 <span class="keywordtype">int</span> i=0;
-<a name="l01696"></a>01696
-<a name="l01697"></a>01697 tmp=cpl_image_extract(img,llx,lly,urx,ury);
-<a name="l01698"></a>01698 cpl_image_accept_all(tmp);
-<a name="l01699"></a>01699 <span class="keywordflow">for</span>(i=0;i<nclip;i++) {
+<a name="l01679"></a>01679 <span class="keywordtype">int</span> sinfo_get_clean_mean_window(cpl_image* img,
+<a name="l01680"></a>01680 <span class="keywordtype">int</span> llx, <span class="keywordtype">int</span> lly, <span class="keywordtype">int</span> urx, <span class="keywordtype">int</span> ury,
+<a name="l01681"></a>01681 <span class="keyword">const</span> <span class="keywordtype">int</span> kappa, <span class="keyword">const</span> <span class="keywordtype">int</span> nclip,
+<a name="l01682"></a>01682 <span class="keywordtype">double</span>* local_clean_mean,
+<a name="l01683"></a>01683 <span class="keywordtype">double</span>* clean_stdev)
+<a name="l01684"></a>01684 {
+<a name="l01685"></a>01685
+<a name="l01686"></a>01686 <span class="keywordtype">double</span> mean=0;
+<a name="l01687"></a>01687 <span class="keywordtype">double</span> stdev=0;
+<a name="l01688"></a>01688 <span class="keywordtype">double</span> threshold=0;
+<a name="l01689"></a>01689 <span class="keywordtype">double</span> lo_cut=0;
+<a name="l01690"></a>01690 <span class="keywordtype">double</span> hi_cut=0;
+<a name="l01691"></a>01691 cpl_mask* mask=NULL;
+<a name="l01692"></a>01692 cpl_image* tmp=NULL;
+<a name="l01693"></a>01693 cpl_stats* stats=NULL;
+<a name="l01694"></a>01694 <span class="keywordtype">int</span> i=0;
+<a name="l01695"></a>01695
+<a name="l01696"></a>01696 tmp=cpl_image_extract(img,llx,lly,urx,ury);
+<a name="l01697"></a>01697 cpl_image_accept_all(tmp);
+<a name="l01698"></a>01698 <span class="keywordflow">for</span>(i=0;i<nclip;i++) {
+<a name="l01699"></a>01699
<a name="l01700"></a>01700
-<a name="l01701"></a>01701
-<a name="l01702"></a>01702 cpl_stats_delete(stats);
-<a name="l01703"></a>01703 stats = cpl_stats_new_from_image(tmp, CPL_STATS_MEAN | CPL_STATS_STDEV);
-<a name="l01704"></a>01704 mean = cpl_stats_get_mean(stats);
-<a name="l01705"></a>01705 stdev = cpl_stats_get_stdev(stats);
-<a name="l01706"></a>01706
-<a name="l01707"></a>01707 threshold=kappa*stdev;
-<a name="l01708"></a>01708 lo_cut=mean-threshold;
-<a name="l01709"></a>01709 hi_cut=mean+threshold;
-<a name="l01710"></a>01710 cpl_image_accept_all(tmp);
-<a name="l01711"></a>01711 mask=cpl_mask_threshold_image_create(tmp,lo_cut,hi_cut);
-<a name="l01712"></a>01712
-<a name="l01713"></a>01713 cpl_mask_not(mask);
-<a name="l01714"></a>01714 cpl_image_reject_from_mask(tmp,mask);
-<a name="l01715"></a>01715 cpl_mask_delete(mask);
+<a name="l01701"></a>01701 cpl_stats_delete(stats);
+<a name="l01702"></a>01702 stats = cpl_stats_new_from_image(tmp, CPL_STATS_MEAN | CPL_STATS_STDEV);
+<a name="l01703"></a>01703 mean = cpl_stats_get_mean(stats);
+<a name="l01704"></a>01704 stdev = cpl_stats_get_stdev(stats);
+<a name="l01705"></a>01705
+<a name="l01706"></a>01706 threshold=kappa*stdev;
+<a name="l01707"></a>01707 lo_cut=mean-threshold;
+<a name="l01708"></a>01708 hi_cut=mean+threshold;
+<a name="l01709"></a>01709 cpl_image_accept_all(tmp);
+<a name="l01710"></a>01710 mask=cpl_mask_threshold_image_create(tmp,lo_cut,hi_cut);
+<a name="l01711"></a>01711
+<a name="l01712"></a>01712 cpl_mask_not(mask);
+<a name="l01713"></a>01713 cpl_image_reject_from_mask(tmp,mask);
+<a name="l01714"></a>01714 cpl_mask_delete(mask);
+<a name="l01715"></a>01715
<a name="l01716"></a>01716
-<a name="l01717"></a>01717
-<a name="l01718"></a>01718 }
-<a name="l01719"></a>01719 *local_clean_mean=mean;
-<a name="l01720"></a>01720 *clean_stdev=stdev;
-<a name="l01721"></a>01721 cpl_image_delete(tmp);
-<a name="l01722"></a>01722 cpl_stats_delete(stats);
+<a name="l01717"></a>01717 }
+<a name="l01718"></a>01718 *local_clean_mean=mean;
+<a name="l01719"></a>01719 *clean_stdev=stdev;
+<a name="l01720"></a>01720 cpl_image_delete(tmp);
+<a name="l01721"></a>01721 cpl_stats_delete(stats);
+<a name="l01722"></a>01722
<a name="l01723"></a>01723
-<a name="l01724"></a>01724
-<a name="l01725"></a>01725 <span class="keywordflow">return</span> 0;
+<a name="l01724"></a>01724 <span class="keywordflow">return</span> 0;
+<a name="l01725"></a>01725
<a name="l01726"></a>01726
-<a name="l01727"></a>01727
-<a name="l01728"></a>01728 }
-<a name="l01734"></a>01734 <span class="keywordtype">int</span> sinfo_check_rec_status(<span class="keyword">const</span> <span class="keywordtype">int</span> val) {
-<a name="l01735"></a>01735 <span class="keywordflow">if</span>(cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l01736"></a>01736 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"error before %d"</span>,val);
-<a name="l01737"></a>01737 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>((<span class="keywordtype">char</span>* ) cpl_error_get_message());
-<a name="l01738"></a>01738 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>((<span class="keywordtype">char</span>* ) cpl_error_get_where());
-<a name="l01739"></a>01739 <span class="keywordflow">return</span> -1;
-<a name="l01740"></a>01740 }
-<a name="l01741"></a>01741 <span class="keywordflow">return</span> 0;
-<a name="l01742"></a>01742 }
-<a name="l01743"></a>01743
-<a name="l01750"></a>01750 <span class="keywordtype">int</span>
-<a name="l01751"></a>01751 sinfo_clean_nan(cpl_image** im)
-<a name="l01752"></a>01752 {
-<a name="l01753"></a>01753 <span class="keywordtype">int</span> i=0;
-<a name="l01754"></a>01754 <span class="keywordtype">int</span> j=0;
-<a name="l01755"></a>01755 <span class="keywordtype">int</span> nx=0;
-<a name="l01756"></a>01756 <span class="keywordtype">int</span> ny=0;
-<a name="l01757"></a>01757 <span class="keywordtype">float</span>* data=NULL;
-<a name="l01758"></a>01758
-<a name="l01759"></a>01759 nx=cpl_image_get_size_x(*im);
-<a name="l01760"></a>01760 ny=cpl_image_get_size_y(*im);
-<a name="l01761"></a>01761 data=cpl_image_get_data_float(*im);
-<a name="l01762"></a>01762
-<a name="l01763"></a>01763 <span class="keywordflow">for</span>(j=0;j<ny;j++) {
-<a name="l01764"></a>01764 <span class="keywordflow">for</span>(i=0;i<nx;i++) {
-<a name="l01765"></a>01765 <span class="keywordflow">if</span>(isnan(data[j*nx+i]) != 0) {
-<a name="l01766"></a>01766 data[j*nx+i] = 0;
-<a name="l01767"></a>01767 }
-<a name="l01768"></a>01768 }
-<a name="l01769"></a>01769 }
-<a name="l01770"></a>01770 <span class="keywordflow">return</span> 0;
-<a name="l01771"></a>01771 }
-<a name="l01772"></a>01772
-<a name="l01782"></a>01782 <span class="keywordtype">void</span>
-<a name="l01783"></a>01783 sinfo_add_pro_fits_key(cpl_propertylist * plist,
-<a name="l01784"></a>01784 <span class="keywordtype">char</span>* pro_catg,
-<a name="l01785"></a>01785 <span class="keywordtype">char</span>* file_name,
-<a name="l01786"></a>01786 <span class="keywordtype">char</span>* out_name)
-<a name="l01787"></a>01787 {
-<a name="l01788"></a>01788
-<a name="l01789"></a>01789 <span class="keywordtype">char</span>* date=NULL;
-<a name="l01790"></a>01790 date = sinfo_get_datetime_iso8601() ;
-<a name="l01791"></a>01791
-<a name="l01792"></a>01792 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01793"></a>01793 KEY_NAME_PIPEFILE, out_name) ;
-<a name="l01794"></a>01794 cpl_propertylist_set_comment(plist, KEY_NAME_PIPEFILE,KEY_HELP_PIPEFILE) ;
-<a name="l01795"></a>01795
-<a name="l01796"></a>01796 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01797"></a>01797 KEY_NAME_HPRO_DID, KEY_VALUE_HPRO_DID) ;
-<a name="l01798"></a>01798 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DID,KEY_HELP_HPRO_DID) ;
-<a name="l01799"></a>01799
-<a name="l01800"></a>01800 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01801"></a>01801 KEY_NAME_HPRO_TYPE, <span class="stringliteral">"REDUCED"</span>) ;
-<a name="l01802"></a>01802 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_TYPE, KEY_HELP_HPRO_TYPE) ;
-<a name="l01803"></a>01803
-<a name="l01804"></a>01804 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01805"></a>01805 KEY_NAME_HPRO_CATG, pro_catg) ;
-<a name="l01806"></a>01806 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_CATG, KEY_HELP_HPRO_CATG);
-<a name="l01807"></a>01807
-<a name="l01808"></a>01808 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01809"></a>01809 KEY_NAME_HPRO_STATUS, <span class="stringliteral">"OK"</span>) ;
-<a name="l01810"></a>01810 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_STATUS,KEY_HELP_HPRO_CATG);
-<a name="l01811"></a>01811
-<a name="l01812"></a>01812 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01813"></a>01813 KEY_NAME_HPRO_DATE, date) ;
-<a name="l01814"></a>01814 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DATE, KEY_HELP_HPRO_DATE);
-<a name="l01815"></a>01815
-<a name="l01816"></a>01816 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01817"></a>01817 KEY_NAME_HPRO_RECID, file_name) ;
-<a name="l01818"></a>01818 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_RECID,KEY_HELP_HPRO_RECID);
-<a name="l01819"></a>01819
-<a name="l01820"></a>01820 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
-<a name="l01821"></a>01821 KEY_NAME_HPRO_DRSID, PACKAGE_VERSION);
-<a name="l01822"></a>01822 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DRSID,KEY_HELP_HPRO_DRSID);
+<a name="l01727"></a>01727 }
+<a name="l01733"></a>01733 <span class="keywordtype">int</span> sinfo_check_rec_status(<span class="keyword">const</span> <span class="keywordtype">int</span> val) {
+<a name="l01734"></a>01734 <span class="keywordflow">if</span>(cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l01735"></a>01735 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"error before %d"</span>,val);
+<a name="l01736"></a>01736 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>((<span class="keywordtype">char</span>* ) cpl_error_get_message());
+<a name="l01737"></a>01737 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>((<span class="keywordtype">char</span>* ) cpl_error_get_where());
+<a name="l01738"></a>01738 <span class="keywordflow">return</span> -1;
+<a name="l01739"></a>01739 }
+<a name="l01740"></a>01740 <span class="keywordflow">return</span> 0;
+<a name="l01741"></a>01741 }
+<a name="l01742"></a>01742
+<a name="l01749"></a>01749 <span class="keywordtype">int</span>
+<a name="l01750"></a>01750 sinfo_clean_nan(cpl_image** im)
+<a name="l01751"></a>01751 {
+<a name="l01752"></a>01752 <span class="keywordtype">int</span> i=0;
+<a name="l01753"></a>01753 <span class="keywordtype">int</span> j=0;
+<a name="l01754"></a>01754 <span class="keywordtype">int</span> nx=0;
+<a name="l01755"></a>01755 <span class="keywordtype">int</span> ny=0;
+<a name="l01756"></a>01756 <span class="keywordtype">float</span>* data=NULL;
+<a name="l01757"></a>01757
+<a name="l01758"></a>01758 nx=cpl_image_get_size_x(*im);
+<a name="l01759"></a>01759 ny=cpl_image_get_size_y(*im);
+<a name="l01760"></a>01760 data=cpl_image_get_data_float(*im);
+<a name="l01761"></a>01761
+<a name="l01762"></a>01762 <span class="keywordflow">for</span>(j=0;j<ny;j++) {
+<a name="l01763"></a>01763 <span class="keywordflow">for</span>(i=0;i<nx;i++) {
+<a name="l01764"></a>01764 <span class="keywordflow">if</span>(isnan(data[j*nx+i]) != 0) {
+<a name="l01765"></a>01765 data[j*nx+i] = 0;
+<a name="l01766"></a>01766 }
+<a name="l01767"></a>01767 }
+<a name="l01768"></a>01768 }
+<a name="l01769"></a>01769 <span class="keywordflow">return</span> 0;
+<a name="l01770"></a>01770 }
+<a name="l01771"></a>01771
+<a name="l01781"></a>01781 <span class="keywordtype">void</span>
+<a name="l01782"></a>01782 sinfo_add_pro_fits_key(cpl_propertylist * plist,
+<a name="l01783"></a>01783 <span class="keywordtype">char</span>* pro_catg,
+<a name="l01784"></a>01784 <span class="keywordtype">char</span>* file_name,
+<a name="l01785"></a>01785 <span class="keywordtype">char</span>* out_name)
+<a name="l01786"></a>01786 {
+<a name="l01787"></a>01787
+<a name="l01788"></a>01788 <span class="keywordtype">char</span>* date=NULL;
+<a name="l01789"></a>01789 date = sinfo_get_datetime_iso8601() ;
+<a name="l01790"></a>01790
+<a name="l01791"></a>01791 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01792"></a>01792 KEY_NAME_PIPEFILE, out_name) ;
+<a name="l01793"></a>01793 cpl_propertylist_set_comment(plist, KEY_NAME_PIPEFILE,KEY_HELP_PIPEFILE) ;
+<a name="l01794"></a>01794
+<a name="l01795"></a>01795 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01796"></a>01796 KEY_NAME_HPRO_DID, KEY_VALUE_HPRO_DID) ;
+<a name="l01797"></a>01797 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DID,KEY_HELP_HPRO_DID) ;
+<a name="l01798"></a>01798
+<a name="l01799"></a>01799 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01800"></a>01800 KEY_NAME_HPRO_TYPE, <span class="stringliteral">"REDUCED"</span>) ;
+<a name="l01801"></a>01801 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_TYPE, KEY_HELP_HPRO_TYPE) ;
+<a name="l01802"></a>01802
+<a name="l01803"></a>01803 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01804"></a>01804 KEY_NAME_HPRO_CATG, pro_catg) ;
+<a name="l01805"></a>01805 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_CATG, KEY_HELP_HPRO_CATG);
+<a name="l01806"></a>01806
+<a name="l01807"></a>01807 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01808"></a>01808 KEY_NAME_HPRO_STATUS, <span class="stringliteral">"OK"</span>) ;
+<a name="l01809"></a>01809 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_STATUS,KEY_HELP_HPRO_CATG);
+<a name="l01810"></a>01810
+<a name="l01811"></a>01811 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01812"></a>01812 KEY_NAME_HPRO_DATE, date) ;
+<a name="l01813"></a>01813 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DATE, KEY_HELP_HPRO_DATE);
+<a name="l01814"></a>01814
+<a name="l01815"></a>01815 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01816"></a>01816 KEY_NAME_HPRO_RECID, file_name) ;
+<a name="l01817"></a>01817 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_RECID,KEY_HELP_HPRO_RECID);
+<a name="l01818"></a>01818
+<a name="l01819"></a>01819 cpl_propertylist_insert_after_string(plist, <span class="stringliteral">"EXPTIME"</span>,
+<a name="l01820"></a>01820 KEY_NAME_HPRO_DRSID, PACKAGE_VERSION);
+<a name="l01821"></a>01821 cpl_propertylist_set_comment(plist, KEY_NAME_HPRO_DRSID,KEY_HELP_HPRO_DRSID);
+<a name="l01822"></a>01822
<a name="l01823"></a>01823
-<a name="l01824"></a>01824
-<a name="l01825"></a>01825 }
-<a name="l01826"></a>01826 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01833"></a>01833 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01834"></a>01834 <span class="keywordtype">int</span> sinfo_compare_tags(
-<a name="l01835"></a>01835 <span class="keyword">const</span> cpl_frame * frame1,
-<a name="l01836"></a>01836 <span class="keyword">const</span> cpl_frame * frame2)
-<a name="l01837"></a>01837 {
-<a name="l01838"></a>01838 <span class="keywordtype">char</span> * v1 ;
-<a name="l01839"></a>01839 <span class="keywordtype">char</span> * v2 ;
-<a name="l01840"></a>01840
-<a name="l01841"></a>01841 <span class="comment">/* Test entries */</span>
-<a name="l01842"></a>01842 <span class="keywordflow">if</span> (frame1==NULL || frame2==NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01843"></a>01843
-<a name="l01844"></a>01844 <span class="comment">/* Get the tags */</span>
-<a name="l01845"></a>01845 <span class="keywordflow">if</span> ((v1 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame1)) == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01846"></a>01846 <span class="keywordflow">if</span> ((v2 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame2)) == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l01847"></a>01847
-<a name="l01848"></a>01848 <span class="comment">/* Compare the tags */</span>
-<a name="l01849"></a>01849 <span class="keywordflow">if</span> (strcmp(v1, v2)) <span class="keywordflow">return</span> 0 ;
-<a name="l01850"></a>01850 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 1 ;
-<a name="l01851"></a>01851 }
-<a name="l01852"></a>01852
-<a name="l01861"></a>01861 <span class="keywordtype">int</span> sinfo_extract_raw_pinhole_frames(cpl_frameset * sof, cpl_frameset** raw)
-<a name="l01862"></a>01862 {
-<a name="l01863"></a>01863 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l01864"></a>01864 <span class="keywordtype">char</span>* name=NULL;
-<a name="l01865"></a>01865 cpl_frame* frame = NULL;
-<a name="l01866"></a>01866 <span class="keywordtype">int</span> nsof=0;
-<a name="l01867"></a>01867 <span class="keywordtype">int</span> i=0;
-<a name="l01868"></a>01868 nsof = cpl_frameset_get_size(sof);
-<a name="l01869"></a>01869 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l01870"></a>01870 frame = cpl_frameset_get_frame(sof,i);
-<a name="l01871"></a>01871 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l01872"></a>01872 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l01873"></a>01873 <span class="comment">/* to go on the file must exist */</span>
-<a name="l01874"></a>01874 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l01875"></a>01875 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l01876"></a>01876 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l01877"></a>01877 <span class="keywordflow">if</span>(sinfo_frame_is_pinhole_lamp(tag) == 1) {
-<a name="l01878"></a>01878 cpl_frameset_insert(*raw,frame);
-<a name="l01879"></a>01879 }
-<a name="l01880"></a>01880 }
-<a name="l01881"></a>01881 }
-<a name="l01882"></a>01882 }
-<a name="l01883"></a>01883 <span class="keywordflow">return</span> 0;
-<a name="l01884"></a>01884 }
+<a name="l01824"></a>01824 }
+<a name="l01825"></a>01825 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01832"></a>01832 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01833"></a>01833 <span class="keywordtype">int</span> sinfo_compare_tags(
+<a name="l01834"></a>01834 <span class="keyword">const</span> cpl_frame * frame1,
+<a name="l01835"></a>01835 <span class="keyword">const</span> cpl_frame * frame2)
+<a name="l01836"></a>01836 {
+<a name="l01837"></a>01837 <span class="keywordtype">char</span> * v1 ;
+<a name="l01838"></a>01838 <span class="keywordtype">char</span> * v2 ;
+<a name="l01839"></a>01839
+<a name="l01840"></a>01840 <span class="comment">/* Test entries */</span>
+<a name="l01841"></a>01841 <span class="keywordflow">if</span> (frame1==NULL || frame2==NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01842"></a>01842
+<a name="l01843"></a>01843 <span class="comment">/* Get the tags */</span>
+<a name="l01844"></a>01844 <span class="keywordflow">if</span> ((v1 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame1)) == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01845"></a>01845 <span class="keywordflow">if</span> ((v2 = (<span class="keywordtype">char</span>*)cpl_frame_get_tag(frame2)) == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l01846"></a>01846
+<a name="l01847"></a>01847 <span class="comment">/* Compare the tags */</span>
+<a name="l01848"></a>01848 <span class="keywordflow">if</span> (strcmp(v1, v2)) <span class="keywordflow">return</span> 0 ;
+<a name="l01849"></a>01849 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 1 ;
+<a name="l01850"></a>01850 }
+<a name="l01851"></a>01851
+<a name="l01860"></a>01860 <span class="keywordtype">int</span> sinfo_extract_raw_pinhole_frames(cpl_frameset * sof, cpl_frameset** raw)
+<a name="l01861"></a>01861 {
+<a name="l01862"></a>01862 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l01863"></a>01863 <span class="keywordtype">char</span>* name=NULL;
+<a name="l01864"></a>01864 cpl_frame* frame = NULL;
+<a name="l01865"></a>01865 <span class="keywordtype">int</span> nsof=0;
+<a name="l01866"></a>01866 <span class="keywordtype">int</span> i=0;
+<a name="l01867"></a>01867 nsof = cpl_frameset_get_size(sof);
+<a name="l01868"></a>01868 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l01869"></a>01869 frame = cpl_frameset_get_frame(sof,i);
+<a name="l01870"></a>01870 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l01871"></a>01871 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l01872"></a>01872 <span class="comment">/* to go on the file must exist */</span>
+<a name="l01873"></a>01873 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l01874"></a>01874 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l01875"></a>01875 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l01876"></a>01876 <span class="keywordflow">if</span>(sinfo_frame_is_pinhole_lamp(tag) == 1) {
+<a name="l01877"></a>01877 cpl_frameset_insert(*raw,frame);
+<a name="l01878"></a>01878 }
+<a name="l01879"></a>01879 }
+<a name="l01880"></a>01880 }
+<a name="l01881"></a>01881 }
+<a name="l01882"></a>01882 <span class="keywordflow">return</span> 0;
+<a name="l01883"></a>01883 }
+<a name="l01884"></a>01884
<a name="l01885"></a>01885
-<a name="l01886"></a>01886
-<a name="l01887"></a>01887 <span class="keywordtype">int</span> sinfo_get_ins_set(<span class="keywordtype">char</span>* band,<span class="keywordtype">int</span>* ins_set){
-<a name="l01888"></a>01888
-<a name="l01889"></a>01889 <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H"</span>) == 0) {
-<a name="l01890"></a>01890 *ins_set = 0;
-<a name="l01891"></a>01891 }
-<a name="l01892"></a>01892 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H+K"</span>) == 0) {
-<a name="l01893"></a>01893 *ins_set = 1;
-<a name="l01894"></a>01894 }
-<a name="l01895"></a>01895 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"K"</span>) == 0) {
-<a name="l01896"></a>01896 *ins_set = 2;
-<a name="l01897"></a>01897 }
-<a name="l01898"></a>01898 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"J"</span>) == 0) {
-<a name="l01899"></a>01899 *ins_set = 3;
-<a name="l01900"></a>01900 }
-<a name="l01901"></a>01901 <span class="keywordflow">return</span> 0;
+<a name="l01886"></a>01886 <span class="keywordtype">int</span> sinfo_get_ins_set(<span class="keywordtype">char</span>* band,<span class="keywordtype">int</span>* ins_set){
+<a name="l01887"></a>01887
+<a name="l01888"></a>01888 <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H"</span>) == 0) {
+<a name="l01889"></a>01889 *ins_set = 0;
+<a name="l01890"></a>01890 }
+<a name="l01891"></a>01891 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"H+K"</span>) == 0) {
+<a name="l01892"></a>01892 *ins_set = 1;
+<a name="l01893"></a>01893 }
+<a name="l01894"></a>01894 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"K"</span>) == 0) {
+<a name="l01895"></a>01895 *ins_set = 2;
+<a name="l01896"></a>01896 }
+<a name="l01897"></a>01897 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(band,<span class="stringliteral">"J"</span>) == 0) {
+<a name="l01898"></a>01898 *ins_set = 3;
+<a name="l01899"></a>01899 }
+<a name="l01900"></a>01900 <span class="keywordflow">return</span> 0;
+<a name="l01901"></a>01901
<a name="l01902"></a>01902
-<a name="l01903"></a>01903
-<a name="l01904"></a>01904 }
-<a name="l01905"></a>01905 <span class="keywordtype">int</span> sinfo_extract_raw_frames(cpl_frameset * sof, cpl_frameset** raw)
-<a name="l01906"></a>01906 {
-<a name="l01907"></a>01907 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l01908"></a>01908 <span class="keywordtype">char</span>* name=NULL;
-<a name="l01909"></a>01909 cpl_frame* frame = NULL;
-<a name="l01910"></a>01910 <span class="keywordtype">int</span> nsof=0;
-<a name="l01911"></a>01911 <span class="keywordtype">int</span> i=0;
-<a name="l01912"></a>01912 nsof = cpl_frameset_get_size(sof);
-<a name="l01913"></a>01913 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l01914"></a>01914 frame = cpl_frameset_get_frame(sof,i);
-<a name="l01915"></a>01915 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l01916"></a>01916 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l01917"></a>01917 <span class="comment">/* to go on the file must exist */</span>
-<a name="l01918"></a>01918 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l01919"></a>01919 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l01920"></a>01920 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l01921"></a>01921 <span class="keywordflow">if</span>(sinfo_frame_is_raw(tag) == 1) {
-<a name="l01922"></a>01922 cpl_frameset_insert(*raw,frame);
-<a name="l01923"></a>01923 }
-<a name="l01924"></a>01924 }
-<a name="l01925"></a>01925 }
-<a name="l01926"></a>01926 }
-<a name="l01927"></a>01927 <span class="keywordflow">return</span> 0;
-<a name="l01928"></a>01928 }
-<a name="l01929"></a>01929
-<a name="l01930"></a>01930 <span class="keywordtype">int</span> sinfo_remove_qc_frames(cpl_frameset* sof,cpl_frameset** raw)
-<a name="l01931"></a>01931 {
-<a name="l01932"></a>01932 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l01933"></a>01933 <span class="keywordtype">char</span>* name=NULL;
-<a name="l01934"></a>01934 cpl_frame* frame = NULL;
-<a name="l01935"></a>01935 <span class="keywordtype">int</span> nsof=0;
-<a name="l01936"></a>01936 <span class="keywordtype">int</span> i=0;
-<a name="l01937"></a>01937
-<a name="l01938"></a>01938 nsof = cpl_frameset_get_size(sof);
-<a name="l01939"></a>01939 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l01940"></a>01940 frame = cpl_frameset_get_frame(sof,i);
-<a name="l01941"></a>01941 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l01942"></a>01942 <span class="comment">/* sinfo_msg("name=%s",name); */</span>
-<a name="l01943"></a>01943 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l01944"></a>01944 <span class="comment">/* sinfo_msg("\t exist "); */</span>
-<a name="l01945"></a>01945 <span class="comment">/* to go on the file must exist */</span>
-<a name="l01946"></a>01946 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l01947"></a>01947 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l01948"></a>01948 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l01949"></a>01949 <span class="comment">/* sinfo_msg("\t tag %s\n ",tag); */</span>
-<a name="l01950"></a>01950 <span class="keywordflow">if</span>(strstr(tag,<span class="stringliteral">"QC"</span>) != NULL) {
-<a name="l01951"></a>01951 <span class="comment">/* sinfo_msg("remove frame %s\n",name); */</span>
-<a name="l01952"></a>01952 cpl_frameset_erase(*raw,tag);
-<a name="l01953"></a>01953 }
-<a name="l01954"></a>01954 }
-<a name="l01955"></a>01955 } <span class="keywordflow">else</span> {
-<a name="l01956"></a>01956 <span class="comment">/* sinfo_msg("remove frame\n"); */</span>
-<a name="l01957"></a>01957 cpl_frameset_erase_frame(*raw,frame);
-<a name="l01958"></a>01958 }
-<a name="l01959"></a>01959 }
-<a name="l01960"></a>01960 <span class="keywordflow">return</span> 0;
-<a name="l01961"></a>01961
-<a name="l01962"></a>01962 }
+<a name="l01903"></a>01903 }
+<a name="l01904"></a>01904 <span class="keywordtype">int</span> sinfo_extract_raw_frames(cpl_frameset * sof, cpl_frameset** raw)
+<a name="l01905"></a>01905 {
+<a name="l01906"></a>01906 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l01907"></a>01907 <span class="keywordtype">char</span>* name=NULL;
+<a name="l01908"></a>01908 cpl_frame* frame = NULL;
+<a name="l01909"></a>01909 <span class="keywordtype">int</span> nsof=0;
+<a name="l01910"></a>01910 <span class="keywordtype">int</span> i=0;
+<a name="l01911"></a>01911 nsof = cpl_frameset_get_size(sof);
+<a name="l01912"></a>01912 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l01913"></a>01913 frame = cpl_frameset_get_frame(sof,i);
+<a name="l01914"></a>01914 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l01915"></a>01915 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l01916"></a>01916 <span class="comment">/* to go on the file must exist */</span>
+<a name="l01917"></a>01917 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l01918"></a>01918 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l01919"></a>01919 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l01920"></a>01920 <span class="keywordflow">if</span>(sinfo_frame_is_raw(tag) == 1) {
+<a name="l01921"></a>01921 cpl_frameset_insert(*raw,frame);
+<a name="l01922"></a>01922 }
+<a name="l01923"></a>01923 }
+<a name="l01924"></a>01924 }
+<a name="l01925"></a>01925 }
+<a name="l01926"></a>01926 <span class="keywordflow">return</span> 0;
+<a name="l01927"></a>01927 }
+<a name="l01928"></a>01928
+<a name="l01929"></a>01929 <span class="keywordtype">int</span> sinfo_remove_qc_frames(cpl_frameset* sof,cpl_frameset** raw)
+<a name="l01930"></a>01930 {
+<a name="l01931"></a>01931 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l01932"></a>01932 <span class="keywordtype">char</span>* name=NULL;
+<a name="l01933"></a>01933 cpl_frame* frame = NULL;
+<a name="l01934"></a>01934 <span class="keywordtype">int</span> nsof=0;
+<a name="l01935"></a>01935 <span class="keywordtype">int</span> i=0;
+<a name="l01936"></a>01936
+<a name="l01937"></a>01937 nsof = cpl_frameset_get_size(sof);
+<a name="l01938"></a>01938 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l01939"></a>01939 frame = cpl_frameset_get_frame(sof,i);
+<a name="l01940"></a>01940 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l01941"></a>01941 <span class="comment">/* sinfo_msg("name=%s",name); */</span>
+<a name="l01942"></a>01942 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l01943"></a>01943 <span class="comment">/* sinfo_msg("\t exist "); */</span>
+<a name="l01944"></a>01944 <span class="comment">/* to go on the file must exist */</span>
+<a name="l01945"></a>01945 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l01946"></a>01946 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l01947"></a>01947 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l01948"></a>01948 <span class="comment">/* sinfo_msg("\t tag %s\n ",tag); */</span>
+<a name="l01949"></a>01949 <span class="keywordflow">if</span>(strstr(tag,<span class="stringliteral">"QC"</span>) != NULL) {
+<a name="l01950"></a>01950 <span class="comment">/* sinfo_msg("remove frame %s\n",name); */</span>
+<a name="l01951"></a>01951 cpl_frameset_erase(*raw,tag);
+<a name="l01952"></a>01952 }
+<a name="l01953"></a>01953 }
+<a name="l01954"></a>01954 } <span class="keywordflow">else</span> {
+<a name="l01955"></a>01955 <span class="comment">/* sinfo_msg("remove frame\n"); */</span>
+<a name="l01956"></a>01956 cpl_frameset_erase_frame(*raw,frame);
+<a name="l01957"></a>01957 }
+<a name="l01958"></a>01958 }
+<a name="l01959"></a>01959 <span class="keywordflow">return</span> 0;
+<a name="l01960"></a>01960
+<a name="l01961"></a>01961 }
+<a name="l01962"></a>01962
<a name="l01963"></a>01963
-<a name="l01964"></a>01964
-<a name="l01965"></a>01965 <span class="keywordtype">int</span> sinfo_contains_frames_kind(cpl_frameset * sof,
-<a name="l01966"></a>01966 cpl_frameset* raw,
-<a name="l01967"></a>01967 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l01968"></a>01968 {
-<a name="l01969"></a>01969 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l01970"></a>01970 <span class="keywordtype">char</span>* name=NULL;
-<a name="l01971"></a>01971 cpl_frame* frame = NULL;
-<a name="l01972"></a>01972 cpl_frame* frame_dup = NULL;
-<a name="l01973"></a>01973
-<a name="l01974"></a>01974 <span class="keywordtype">int</span> nsof=0;
-<a name="l01975"></a>01975 <span class="keywordtype">int</span> i=0;
-<a name="l01976"></a>01976 nsof = cpl_frameset_get_size(sof);
-<a name="l01977"></a>01977 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l01978"></a>01978 frame = cpl_frameset_get_frame(sof,i);
-<a name="l01979"></a>01979 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l01980"></a>01980 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l01981"></a>01981 <span class="comment">/* to go on the file must exist */</span>
-<a name="l01982"></a>01982 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l01983"></a>01983 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l01984"></a>01984 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l01985"></a>01985 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l01986"></a>01986 <span class="keywordflow">if</span>(strstr(tag,type) != NULL) {
-<a name="l01987"></a>01987 <span class="comment">/* sinfo_msg("Match name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l01988"></a>01988 frame_dup = cpl_frame_duplicate(frame);
-<a name="l01989"></a>01989 cpl_frameset_insert(raw,frame_dup);
-<a name="l01990"></a>01990 <span class="comment">/* sinfo_msg("inserted\n"); */</span>
-<a name="l01991"></a>01991 }
-<a name="l01992"></a>01992 }
-<a name="l01993"></a>01993 }
-<a name="l01994"></a>01994 }
-<a name="l01995"></a>01995 <span class="keywordflow">return</span> 0;
-<a name="l01996"></a>01996 }
+<a name="l01964"></a>01964 <span class="keywordtype">int</span> sinfo_contains_frames_kind(cpl_frameset * sof,
+<a name="l01965"></a>01965 cpl_frameset* raw,
+<a name="l01966"></a>01966 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l01967"></a>01967 {
+<a name="l01968"></a>01968 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l01969"></a>01969 <span class="keywordtype">char</span>* name=NULL;
+<a name="l01970"></a>01970 cpl_frame* frame = NULL;
+<a name="l01971"></a>01971 cpl_frame* frame_dup = NULL;
+<a name="l01972"></a>01972
+<a name="l01973"></a>01973 <span class="keywordtype">int</span> nsof=0;
+<a name="l01974"></a>01974 <span class="keywordtype">int</span> i=0;
+<a name="l01975"></a>01975 nsof = cpl_frameset_get_size(sof);
+<a name="l01976"></a>01976 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l01977"></a>01977 frame = cpl_frameset_get_frame(sof,i);
+<a name="l01978"></a>01978 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l01979"></a>01979 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l01980"></a>01980 <span class="comment">/* to go on the file must exist */</span>
+<a name="l01981"></a>01981 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l01982"></a>01982 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l01983"></a>01983 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l01984"></a>01984 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l01985"></a>01985 <span class="keywordflow">if</span>(strstr(tag,type) != NULL) {
+<a name="l01986"></a>01986 <span class="comment">/* sinfo_msg("Match name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l01987"></a>01987 frame_dup = cpl_frame_duplicate(frame);
+<a name="l01988"></a>01988 cpl_frameset_insert(raw,frame_dup);
+<a name="l01989"></a>01989 <span class="comment">/* sinfo_msg("inserted\n"); */</span>
+<a name="l01990"></a>01990 }
+<a name="l01991"></a>01991 }
+<a name="l01992"></a>01992 }
+<a name="l01993"></a>01993 }
+<a name="l01994"></a>01994 <span class="keywordflow">return</span> 0;
+<a name="l01995"></a>01995 }
+<a name="l01996"></a>01996
<a name="l01997"></a>01997
<a name="l01998"></a>01998
<a name="l01999"></a>01999
-<a name="l02000"></a>02000
-<a name="l02001"></a>02001 <span class="keywordtype">int</span> sinfo_is_fibres_on_off(cpl_frameset * sof,
-<a name="l02002"></a>02002 cpl_frameset* raw)
-<a name="l02003"></a>02003 {
-<a name="l02004"></a>02004 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02005"></a>02005 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02006"></a>02006 cpl_frame* frame = NULL;
-<a name="l02007"></a>02007 cpl_frame* frame_dup = NULL;
-<a name="l02008"></a>02008
-<a name="l02009"></a>02009 <span class="keywordtype">int</span> nsof=0;
-<a name="l02010"></a>02010 <span class="keywordtype">int</span> i=0;
-<a name="l02011"></a>02011 nsof = cpl_frameset_get_size(sof);
-<a name="l02012"></a>02012 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02013"></a>02013 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02014"></a>02014 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02015"></a>02015 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l02016"></a>02016 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02017"></a>02017 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02018"></a>02018 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02019"></a>02019 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02020"></a>02020 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l02021"></a>02021 <span class="keywordflow">if</span>( strcmp(tag,PRO_FIBRE_NS_STACKED ) == 0) {
-<a name="l02022"></a>02022 <span class="comment">/* sinfo_msg("Match name=%s tag=%s type=%s\n",name,tag); */</span>
-<a name="l02023"></a>02023 frame_dup = cpl_frame_duplicate(frame);
-<a name="l02024"></a>02024 cpl_frameset_insert(raw,frame_dup);
-<a name="l02025"></a>02025 <span class="comment">/* sinfo_msg("inserted\n"); */</span>
-<a name="l02026"></a>02026 }
-<a name="l02027"></a>02027 }
-<a name="l02028"></a>02028 }
-<a name="l02029"></a>02029 }
-<a name="l02030"></a>02030 <span class="keywordflow">return</span> 0;
-<a name="l02031"></a>02031 }
+<a name="l02000"></a>02000 <span class="keywordtype">int</span> sinfo_is_fibres_on_off(cpl_frameset * sof,
+<a name="l02001"></a>02001 cpl_frameset* raw)
+<a name="l02002"></a>02002 {
+<a name="l02003"></a>02003 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02004"></a>02004 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02005"></a>02005 cpl_frame* frame = NULL;
+<a name="l02006"></a>02006 cpl_frame* frame_dup = NULL;
+<a name="l02007"></a>02007
+<a name="l02008"></a>02008 <span class="keywordtype">int</span> nsof=0;
+<a name="l02009"></a>02009 <span class="keywordtype">int</span> i=0;
+<a name="l02010"></a>02010 nsof = cpl_frameset_get_size(sof);
+<a name="l02011"></a>02011 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02012"></a>02012 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02013"></a>02013 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02014"></a>02014 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l02015"></a>02015 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02016"></a>02016 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02017"></a>02017 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02018"></a>02018 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02019"></a>02019 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l02020"></a>02020 <span class="keywordflow">if</span>( strcmp(tag,PRO_FIBRE_NS_STACKED ) == 0) {
+<a name="l02021"></a>02021 <span class="comment">/* sinfo_msg("Match name=%s tag=%s type=%s\n",name,tag); */</span>
+<a name="l02022"></a>02022 frame_dup = cpl_frame_duplicate(frame);
+<a name="l02023"></a>02023 cpl_frameset_insert(raw,frame_dup);
+<a name="l02024"></a>02024 <span class="comment">/* sinfo_msg("inserted\n"); */</span>
+<a name="l02025"></a>02025 }
+<a name="l02026"></a>02026 }
+<a name="l02027"></a>02027 }
+<a name="l02028"></a>02028 }
+<a name="l02029"></a>02029 <span class="keywordflow">return</span> 0;
+<a name="l02030"></a>02030 }
+<a name="l02031"></a>02031
<a name="l02032"></a>02032
-<a name="l02033"></a>02033
-<a name="l02034"></a>02034 <span class="keywordtype">int</span> sinfo_contains_frames_type(cpl_frameset * sof,
-<a name="l02035"></a>02035 cpl_frameset** raw,
-<a name="l02036"></a>02036 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l02037"></a>02037 {
-<a name="l02038"></a>02038 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02039"></a>02039 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02040"></a>02040 cpl_frame* frame = NULL;
-<a name="l02041"></a>02041 cpl_frame* frame_dup = NULL;
-<a name="l02042"></a>02042 <span class="keywordtype">int</span> nsof=0;
-<a name="l02043"></a>02043 <span class="keywordtype">int</span> i=0;
-<a name="l02044"></a>02044 nsof = cpl_frameset_get_size(sof);
-<a name="l02045"></a>02045 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02046"></a>02046 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02047"></a>02047 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02048"></a>02048 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l02049"></a>02049 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02050"></a>02050 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02051"></a>02051 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02052"></a>02052 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02053"></a>02053 <span class="keywordflow">if</span>(strstr(tag,type) != NULL) {
-<a name="l02054"></a>02054 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l02055"></a>02055 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02056"></a>02056 cpl_frameset_insert(*raw,frame_dup);
-<a name="l02057"></a>02057 }
-<a name="l02058"></a>02058 }
-<a name="l02059"></a>02059 }
-<a name="l02060"></a>02060 }
-<a name="l02061"></a>02061 <span class="keywordflow">return</span> 0;
-<a name="l02062"></a>02062 }
-<a name="l02063"></a>02063
-<a name="l02064"></a>02064 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type2(cpl_frameset * sof,
-<a name="l02065"></a>02065 cpl_frameset** raw,
-<a name="l02066"></a>02066 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l02067"></a>02067 {
-<a name="l02068"></a>02068
-<a name="l02069"></a>02069 cpl_frame* frame=NULL;
-<a name="l02070"></a>02070 cpl_frame* frame_dup = NULL;
-<a name="l02071"></a>02071 frame = cpl_frameset_find(sof,type);
-<a name="l02072"></a>02072 <span class="keywordflow">while</span>(frame) {
-<a name="l02073"></a>02073 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02074"></a>02074 cpl_frameset_insert(*raw,frame_dup);
-<a name="l02075"></a>02075 frame = cpl_frameset_find(sof,NULL);
-<a name="l02076"></a>02076 }
-<a name="l02077"></a>02077 <span class="keywordflow">return</span> 0;
-<a name="l02078"></a>02078
-<a name="l02079"></a>02079 }
+<a name="l02033"></a>02033 <span class="keywordtype">int</span> sinfo_contains_frames_type(cpl_frameset * sof,
+<a name="l02034"></a>02034 cpl_frameset** raw,
+<a name="l02035"></a>02035 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l02036"></a>02036 {
+<a name="l02037"></a>02037 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02038"></a>02038 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02039"></a>02039 cpl_frame* frame = NULL;
+<a name="l02040"></a>02040 cpl_frame* frame_dup = NULL;
+<a name="l02041"></a>02041 <span class="keywordtype">int</span> nsof=0;
+<a name="l02042"></a>02042 <span class="keywordtype">int</span> i=0;
+<a name="l02043"></a>02043 nsof = cpl_frameset_get_size(sof);
+<a name="l02044"></a>02044 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02045"></a>02045 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02046"></a>02046 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02047"></a>02047 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l02048"></a>02048 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02049"></a>02049 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02050"></a>02050 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02051"></a>02051 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02052"></a>02052 <span class="keywordflow">if</span>(strstr(tag,type) != NULL) {
+<a name="l02053"></a>02053 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l02054"></a>02054 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02055"></a>02055 cpl_frameset_insert(*raw,frame_dup);
+<a name="l02056"></a>02056 }
+<a name="l02057"></a>02057 }
+<a name="l02058"></a>02058 }
+<a name="l02059"></a>02059 }
+<a name="l02060"></a>02060 <span class="keywordflow">return</span> 0;
+<a name="l02061"></a>02061 }
+<a name="l02062"></a>02062
+<a name="l02063"></a>02063 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type2(cpl_frameset * sof,
+<a name="l02064"></a>02064 cpl_frameset** raw,
+<a name="l02065"></a>02065 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l02066"></a>02066 {
+<a name="l02067"></a>02067
+<a name="l02068"></a>02068 cpl_frame* frame=NULL;
+<a name="l02069"></a>02069 cpl_frame* frame_dup = NULL;
+<a name="l02070"></a>02070 frame = cpl_frameset_find(sof,type);
+<a name="l02071"></a>02071 <span class="keywordflow">while</span>(frame) {
+<a name="l02072"></a>02072 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02073"></a>02073 cpl_frameset_insert(*raw,frame_dup);
+<a name="l02074"></a>02074 frame = cpl_frameset_find(sof,NULL);
+<a name="l02075"></a>02075 }
+<a name="l02076"></a>02076 <span class="keywordflow">return</span> 0;
+<a name="l02077"></a>02077
+<a name="l02078"></a>02078 }
+<a name="l02079"></a>02079
<a name="l02080"></a>02080
-<a name="l02081"></a>02081
-<a name="l02082"></a>02082 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type1(cpl_frameset * sof,
-<a name="l02083"></a>02083 cpl_frameset* raw,
-<a name="l02084"></a>02084 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l02085"></a>02085 {
-<a name="l02086"></a>02086
-<a name="l02087"></a>02087 cpl_frame* frame=NULL;
-<a name="l02088"></a>02088 cpl_frame* frame_dup = NULL;
-<a name="l02089"></a>02089 frame = cpl_frameset_find(sof,type);
-<a name="l02090"></a>02090 <span class="keywordflow">while</span>(frame) {
-<a name="l02091"></a>02091 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02092"></a>02092 cpl_frameset_insert(raw,frame_dup);
-<a name="l02093"></a>02093 frame = cpl_frameset_find(sof,NULL);
-<a name="l02094"></a>02094 }
-<a name="l02095"></a>02095 <span class="keywordflow">return</span> 0;
-<a name="l02096"></a>02096
-<a name="l02097"></a>02097 }
-<a name="l02098"></a>02098
-<a name="l02099"></a>02099 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type(cpl_frameset * sof,
-<a name="l02100"></a>02100 cpl_frameset** raw,
-<a name="l02101"></a>02101 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l02102"></a>02102 {
-<a name="l02103"></a>02103 <span class="keywordtype">char</span> tag[FILE_NAME_SZ];
-<a name="l02104"></a>02104 <span class="keywordtype">char</span> name[FILE_NAME_SZ];
-<a name="l02105"></a>02105 cpl_frame* frame = NULL;
-<a name="l02106"></a>02106 cpl_frame* frame_dup = NULL;
-<a name="l02107"></a>02107 <span class="keywordtype">int</span> nsof=0;
-<a name="l02108"></a>02108 <span class="keywordtype">int</span> i=0;
-<a name="l02109"></a>02109 nsof = cpl_frameset_get_size(sof);
-<a name="l02110"></a>02110 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02111"></a>02111 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02112"></a>02112 strcpy(name, cpl_frame_get_filename(frame));
-<a name="l02113"></a>02113 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l02114"></a>02114 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02115"></a>02115 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02116"></a>02116 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02117"></a>02117 strcpy(tag,cpl_frame_get_tag(frame));
-<a name="l02118"></a>02118 <span class="keywordflow">if</span>(strcmp(tag,type) == 0) {
-<a name="l02119"></a>02119 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l02120"></a>02120 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02121"></a>02121
-<a name="l02122"></a>02122 cpl_frameset_insert(*raw,frame_dup);
-<a name="l02123"></a>02123 }
-<a name="l02124"></a>02124 }
-<a name="l02125"></a>02125 }
-<a name="l02126"></a>02126 }
-<a name="l02127"></a>02127 <span class="keywordflow">return</span> 0;
-<a name="l02128"></a>02128 }
-<a name="l02129"></a>02129
-<a name="l02130"></a>02130 <span class="keywordtype">int</span> sinfo_extract_frames_type(cpl_frameset * sof,
-<a name="l02131"></a>02131 cpl_frameset * raw,
-<a name="l02132"></a>02132 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
-<a name="l02133"></a>02133 {
-<a name="l02134"></a>02134 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02135"></a>02135 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02136"></a>02136 cpl_frame* frame = NULL;
-<a name="l02137"></a>02137 cpl_frame* frame_dup = NULL;
-<a name="l02138"></a>02138 <span class="keywordtype">int</span> nsof=0;
-<a name="l02139"></a>02139 <span class="keywordtype">int</span> i=0;
-<a name="l02140"></a>02140 nsof = cpl_frameset_get_size(sof);
-<a name="l02141"></a>02141 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02142"></a>02142 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02143"></a>02143 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02144"></a>02144 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
-<a name="l02145"></a>02145 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02146"></a>02146 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02147"></a>02147 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02148"></a>02148 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02149"></a>02149 <span class="keywordflow">if</span>(strcmp(tag,type) == 0) {
-<a name="l02150"></a>02150 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
-<a name="l02151"></a>02151 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02152"></a>02152 cpl_frameset_insert(raw,frame_dup);
-<a name="l02153"></a>02153 }
-<a name="l02154"></a>02154 }
-<a name="l02155"></a>02155 }
-<a name="l02156"></a>02156 }
-<a name="l02157"></a>02157 <span class="keywordflow">return</span> 0;
-<a name="l02158"></a>02158 }
+<a name="l02081"></a>02081 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type1(cpl_frameset * sof,
+<a name="l02082"></a>02082 cpl_frameset* raw,
+<a name="l02083"></a>02083 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l02084"></a>02084 {
+<a name="l02085"></a>02085
+<a name="l02086"></a>02086 cpl_frame* frame=NULL;
+<a name="l02087"></a>02087 cpl_frame* frame_dup = NULL;
+<a name="l02088"></a>02088 frame = cpl_frameset_find(sof,type);
+<a name="l02089"></a>02089 <span class="keywordflow">while</span>(frame) {
+<a name="l02090"></a>02090 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02091"></a>02091 cpl_frameset_insert(raw,frame_dup);
+<a name="l02092"></a>02092 frame = cpl_frameset_find(sof,NULL);
+<a name="l02093"></a>02093 }
+<a name="l02094"></a>02094 <span class="keywordflow">return</span> 0;
+<a name="l02095"></a>02095
+<a name="l02096"></a>02096 }
+<a name="l02097"></a>02097
+<a name="l02098"></a>02098 <span class="keywordtype">int</span> sinfo_extract_raw_frames_type(cpl_frameset * sof,
+<a name="l02099"></a>02099 cpl_frameset** raw,
+<a name="l02100"></a>02100 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l02101"></a>02101 {
+<a name="l02102"></a>02102 <span class="keywordtype">char</span> tag[FILE_NAME_SZ];
+<a name="l02103"></a>02103 <span class="keywordtype">char</span> name[FILE_NAME_SZ];
+<a name="l02104"></a>02104 cpl_frame* frame = NULL;
+<a name="l02105"></a>02105 cpl_frame* frame_dup = NULL;
+<a name="l02106"></a>02106 <span class="keywordtype">int</span> nsof=0;
+<a name="l02107"></a>02107 <span class="keywordtype">int</span> i=0;
+<a name="l02108"></a>02108 nsof = cpl_frameset_get_size(sof);
+<a name="l02109"></a>02109 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02110"></a>02110 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02111"></a>02111 strcpy(name, cpl_frame_get_filename(frame));
+<a name="l02112"></a>02112 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l02113"></a>02113 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02114"></a>02114 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02115"></a>02115 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02116"></a>02116 strcpy(tag,cpl_frame_get_tag(frame));
+<a name="l02117"></a>02117 <span class="keywordflow">if</span>(strcmp(tag,type) == 0) {
+<a name="l02118"></a>02118 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l02119"></a>02119 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02120"></a>02120
+<a name="l02121"></a>02121 cpl_frameset_insert(*raw,frame_dup);
+<a name="l02122"></a>02122 }
+<a name="l02123"></a>02123 }
+<a name="l02124"></a>02124 }
+<a name="l02125"></a>02125 }
+<a name="l02126"></a>02126 <span class="keywordflow">return</span> 0;
+<a name="l02127"></a>02127 }
+<a name="l02128"></a>02128
+<a name="l02129"></a>02129 <span class="keywordtype">int</span> sinfo_extract_frames_type(cpl_frameset * sof,
+<a name="l02130"></a>02130 cpl_frameset * raw,
+<a name="l02131"></a>02131 <span class="keyword">const</span> <span class="keywordtype">char</span>* type)
+<a name="l02132"></a>02132 {
+<a name="l02133"></a>02133 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02134"></a>02134 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02135"></a>02135 cpl_frame* frame = NULL;
+<a name="l02136"></a>02136 cpl_frame* frame_dup = NULL;
+<a name="l02137"></a>02137 <span class="keywordtype">int</span> nsof=0;
+<a name="l02138"></a>02138 <span class="keywordtype">int</span> i=0;
+<a name="l02139"></a>02139 nsof = cpl_frameset_get_size(sof);
+<a name="l02140"></a>02140 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02141"></a>02141 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02142"></a>02142 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02143"></a>02143 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) == 1) {
+<a name="l02144"></a>02144 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02145"></a>02145 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02146"></a>02146 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02147"></a>02147 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02148"></a>02148 <span class="keywordflow">if</span>(strcmp(tag,type) == 0) {
+<a name="l02149"></a>02149 <span class="comment">/* sinfo_msg("name=%s tag=%s type=%s\n",name,tag,type); */</span>
+<a name="l02150"></a>02150 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02151"></a>02151 cpl_frameset_insert(raw,frame_dup);
+<a name="l02152"></a>02152 }
+<a name="l02153"></a>02153 }
+<a name="l02154"></a>02154 }
+<a name="l02155"></a>02155 }
+<a name="l02156"></a>02156 <span class="keywordflow">return</span> 0;
+<a name="l02157"></a>02157 }
+<a name="l02158"></a>02158
<a name="l02159"></a>02159
-<a name="l02160"></a>02160
-<a name="l02161"></a>02161 <span class="keywordtype">int</span> sinfo_extract_obj_frames(cpl_frameset * sof, cpl_frameset* obj)
-<a name="l02162"></a>02162 {
-<a name="l02163"></a>02163 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02164"></a>02164 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02165"></a>02165 cpl_frame* frame = NULL;
-<a name="l02166"></a>02166 cpl_frame* frame_dup = NULL;
-<a name="l02167"></a>02167
-<a name="l02168"></a>02168 <span class="keywordtype">int</span> nsof=0;
-<a name="l02169"></a>02169 <span class="keywordtype">int</span> i=0;
-<a name="l02170"></a>02170 nsof = cpl_frameset_get_size(sof);
-<a name="l02171"></a>02171 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02172"></a>02172 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02173"></a>02173 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02174"></a>02174 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02175"></a>02175 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02176"></a>02176 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02177"></a>02177 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02178"></a>02178 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02179"></a>02179 <span class="keywordflow">if</span>(sinfo_tag_is_obj(tag) == 1) {
-<a name="l02180"></a>02180 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02181"></a>02181 cpl_frameset_insert(obj,frame_dup);
-<a name="l02182"></a>02182 }
-<a name="l02183"></a>02183 }
-<a name="l02184"></a>02184 }
-<a name="l02185"></a>02185 }
-<a name="l02186"></a>02186
-<a name="l02187"></a>02187 <span class="keywordflow">return</span> 0;
-<a name="l02188"></a>02188 }
+<a name="l02160"></a>02160 <span class="keywordtype">int</span> sinfo_extract_obj_frames(cpl_frameset * sof, cpl_frameset* obj)
+<a name="l02161"></a>02161 {
+<a name="l02162"></a>02162 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02163"></a>02163 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02164"></a>02164 cpl_frame* frame = NULL;
+<a name="l02165"></a>02165 cpl_frame* frame_dup = NULL;
+<a name="l02166"></a>02166
+<a name="l02167"></a>02167 <span class="keywordtype">int</span> nsof=0;
+<a name="l02168"></a>02168 <span class="keywordtype">int</span> i=0;
+<a name="l02169"></a>02169 nsof = cpl_frameset_get_size(sof);
+<a name="l02170"></a>02170 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02171"></a>02171 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02172"></a>02172 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02173"></a>02173 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02174"></a>02174 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02175"></a>02175 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02176"></a>02176 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02177"></a>02177 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02178"></a>02178 <span class="keywordflow">if</span>(sinfo_tag_is_obj(tag) == 1) {
+<a name="l02179"></a>02179 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02180"></a>02180 cpl_frameset_insert(obj,frame_dup);
+<a name="l02181"></a>02181 }
+<a name="l02182"></a>02182 }
+<a name="l02183"></a>02183 }
+<a name="l02184"></a>02184 }
+<a name="l02185"></a>02185
+<a name="l02186"></a>02186 <span class="keywordflow">return</span> 0;
+<a name="l02187"></a>02187 }
+<a name="l02188"></a>02188
<a name="l02189"></a>02189
-<a name="l02190"></a>02190
-<a name="l02191"></a>02191 <span class="keywordtype">int</span> sinfo_extract_obj_products(cpl_frameset * sof, cpl_frameset* obj)
-<a name="l02192"></a>02192 {
-<a name="l02193"></a>02193 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02194"></a>02194 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02195"></a>02195 cpl_frame* frame = NULL;
-<a name="l02196"></a>02196 cpl_frame* frame_dup = NULL;
-<a name="l02197"></a>02197
-<a name="l02198"></a>02198 <span class="keywordtype">int</span> nsof=0;
-<a name="l02199"></a>02199 <span class="keywordtype">int</span> i=0;
-<a name="l02200"></a>02200 nsof = cpl_frameset_get_size(sof);
-<a name="l02201"></a>02201 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02202"></a>02202 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02203"></a>02203 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02204"></a>02204 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02205"></a>02205 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02206"></a>02206 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02207"></a>02207 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02208"></a>02208 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02209"></a>02209 <span class="keywordflow">if</span>(sinfo_tag_is_objpro(tag) == 1) {
-<a name="l02210"></a>02210 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02211"></a>02211 cpl_frameset_insert(obj,frame_dup);
-<a name="l02212"></a>02212 }
-<a name="l02213"></a>02213 }
-<a name="l02214"></a>02214 }
-<a name="l02215"></a>02215 }
-<a name="l02216"></a>02216
-<a name="l02217"></a>02217 <span class="keywordflow">return</span> 0;
-<a name="l02218"></a>02218 }
-<a name="l02219"></a>02219
-<a name="l02220"></a>02220 <span class="keywordtype">int</span> sinfo_extract_on_frames(cpl_frameset * sof, cpl_frameset* on)
-<a name="l02221"></a>02221 {
-<a name="l02222"></a>02222 cpl_frame* frame = NULL;
-<a name="l02223"></a>02223 cpl_frame* frame_dup = NULL;
-<a name="l02224"></a>02224
-<a name="l02225"></a>02225 <span class="keywordtype">int</span> nsof=0;
-<a name="l02226"></a>02226 <span class="keywordtype">int</span> i=0;
-<a name="l02227"></a>02227 nsof = cpl_frameset_get_size(sof);
-<a name="l02228"></a>02228 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02229"></a>02229 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02230"></a>02230 <span class="keywordflow">if</span>(sinfo_frame_is_on(frame) ==1) {
-<a name="l02231"></a>02231 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02232"></a>02232 cpl_frameset_insert(on,frame_dup);
-<a name="l02233"></a>02233 }
-<a name="l02234"></a>02234 }
-<a name="l02235"></a>02235
-<a name="l02236"></a>02236 <span class="keywordflow">return</span> 0;
-<a name="l02237"></a>02237 }
-<a name="l02238"></a>02238
-<a name="l02239"></a>02239 <span class="keywordtype">int</span> sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky)
-<a name="l02240"></a>02240 {
-<a name="l02241"></a>02241 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02242"></a>02242 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02243"></a>02243 cpl_frame* frame = NULL;
-<a name="l02244"></a>02244 cpl_frame* frame_dup = NULL;
-<a name="l02245"></a>02245 <span class="keywordtype">int</span> nsof=0;
-<a name="l02246"></a>02246 <span class="keywordtype">int</span> i=0;
-<a name="l02247"></a>02247 nsof = cpl_frameset_get_size(sof);
-<a name="l02248"></a>02248 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02249"></a>02249 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02250"></a>02250 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02251"></a>02251 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02252"></a>02252 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02253"></a>02253 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02254"></a>02254 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02255"></a>02255 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02256"></a>02256 <span class="keywordflow">if</span>(sinfo_tag_is_sky(tag) == 1) {
-<a name="l02257"></a>02257 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02258"></a>02258 cpl_frameset_insert(sky,frame_dup);
-<a name="l02259"></a>02259 }
-<a name="l02260"></a>02260 }
-<a name="l02261"></a>02261 }
-<a name="l02262"></a>02262 }
-<a name="l02263"></a>02263
-<a name="l02264"></a>02264 <span class="keywordflow">return</span> 0;
-<a name="l02265"></a>02265 }
+<a name="l02190"></a>02190 <span class="keywordtype">int</span> sinfo_extract_obj_products(cpl_frameset * sof, cpl_frameset* obj)
+<a name="l02191"></a>02191 {
+<a name="l02192"></a>02192 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02193"></a>02193 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02194"></a>02194 cpl_frame* frame = NULL;
+<a name="l02195"></a>02195 cpl_frame* frame_dup = NULL;
+<a name="l02196"></a>02196
+<a name="l02197"></a>02197 <span class="keywordtype">int</span> nsof=0;
+<a name="l02198"></a>02198 <span class="keywordtype">int</span> i=0;
+<a name="l02199"></a>02199 nsof = cpl_frameset_get_size(sof);
+<a name="l02200"></a>02200 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02201"></a>02201 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02202"></a>02202 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02203"></a>02203 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02204"></a>02204 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02205"></a>02205 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02206"></a>02206 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02207"></a>02207 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02208"></a>02208 <span class="keywordflow">if</span>(sinfo_tag_is_objpro(tag) == 1) {
+<a name="l02209"></a>02209 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02210"></a>02210 cpl_frameset_insert(obj,frame_dup);
+<a name="l02211"></a>02211 }
+<a name="l02212"></a>02212 }
+<a name="l02213"></a>02213 }
+<a name="l02214"></a>02214 }
+<a name="l02215"></a>02215
+<a name="l02216"></a>02216 <span class="keywordflow">return</span> 0;
+<a name="l02217"></a>02217 }
+<a name="l02218"></a>02218
+<a name="l02219"></a>02219 <span class="keywordtype">int</span> sinfo_extract_on_frames(cpl_frameset * sof, cpl_frameset* on)
+<a name="l02220"></a>02220 {
+<a name="l02221"></a>02221 cpl_frame* frame = NULL;
+<a name="l02222"></a>02222 cpl_frame* frame_dup = NULL;
+<a name="l02223"></a>02223
+<a name="l02224"></a>02224 <span class="keywordtype">int</span> nsof=0;
+<a name="l02225"></a>02225 <span class="keywordtype">int</span> i=0;
+<a name="l02226"></a>02226 nsof = cpl_frameset_get_size(sof);
+<a name="l02227"></a>02227 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02228"></a>02228 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02229"></a>02229 <span class="keywordflow">if</span>(sinfo_frame_is_on(frame) ==1) {
+<a name="l02230"></a>02230 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02231"></a>02231 cpl_frameset_insert(on,frame_dup);
+<a name="l02232"></a>02232 }
+<a name="l02233"></a>02233 }
+<a name="l02234"></a>02234
+<a name="l02235"></a>02235 <span class="keywordflow">return</span> 0;
+<a name="l02236"></a>02236 }
+<a name="l02237"></a>02237
+<a name="l02238"></a>02238 <span class="keywordtype">int</span> sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky)
+<a name="l02239"></a>02239 {
+<a name="l02240"></a>02240 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02241"></a>02241 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02242"></a>02242 cpl_frame* frame = NULL;
+<a name="l02243"></a>02243 cpl_frame* frame_dup = NULL;
+<a name="l02244"></a>02244 <span class="keywordtype">int</span> nsof=0;
+<a name="l02245"></a>02245 <span class="keywordtype">int</span> i=0;
+<a name="l02246"></a>02246 nsof = cpl_frameset_get_size(sof);
+<a name="l02247"></a>02247 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02248"></a>02248 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02249"></a>02249 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02250"></a>02250 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02251"></a>02251 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02252"></a>02252 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02253"></a>02253 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02254"></a>02254 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02255"></a>02255 <span class="keywordflow">if</span>(sinfo_tag_is_sky(tag) == 1) {
+<a name="l02256"></a>02256 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02257"></a>02257 cpl_frameset_insert(sky,frame_dup);
+<a name="l02258"></a>02258 }
+<a name="l02259"></a>02259 }
+<a name="l02260"></a>02260 }
+<a name="l02261"></a>02261 }
+<a name="l02262"></a>02262
+<a name="l02263"></a>02263 <span class="keywordflow">return</span> 0;
+<a name="l02264"></a>02264 }
+<a name="l02265"></a>02265
<a name="l02266"></a>02266
<a name="l02267"></a>02267
-<a name="l02268"></a>02268
-<a name="l02269"></a>02269 <span class="keywordtype">int</span> sinfo_extract_off_frames(cpl_frameset * sof, cpl_frameset* off)
-<a name="l02270"></a>02270 {
-<a name="l02271"></a>02271 cpl_frame* frame = NULL;
-<a name="l02272"></a>02272 cpl_frame* frame_dup = NULL;
-<a name="l02273"></a>02273 <span class="keywordtype">int</span> nsof=0;
-<a name="l02274"></a>02274 <span class="keywordtype">int</span> i=0;
-<a name="l02275"></a>02275 nsof = cpl_frameset_get_size(sof);
-<a name="l02276"></a>02276 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02277"></a>02277 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02278"></a>02278 <span class="keywordflow">if</span>(sinfo_frame_is_on(frame)) {
-<a name="l02279"></a>02279 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02280"></a>02280 cpl_frameset_insert(off,frame_dup);
-<a name="l02281"></a>02281 }
-<a name="l02282"></a>02282 }
-<a name="l02283"></a>02283
-<a name="l02284"></a>02284 <span class="keywordflow">return</span> 0;
-<a name="l02285"></a>02285 }
-<a name="l02286"></a>02286
-<a name="l02287"></a>02287 <span class="keywordtype">int</span> sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb)
-<a name="l02288"></a>02288 {
-<a name="l02289"></a>02289 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02290"></a>02290 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02291"></a>02291 cpl_frame* frame = NULL;
-<a name="l02292"></a>02292 cpl_frame* frame_dup = NULL;
-<a name="l02293"></a>02293 <span class="keywordtype">int</span> nsof=0;
-<a name="l02294"></a>02294 <span class="keywordtype">int</span> i=0;
-<a name="l02295"></a>02295
-<a name="l02296"></a>02296 nsof = cpl_frameset_get_size(sof);
-<a name="l02297"></a>02297 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02298"></a>02298 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02299"></a>02299 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02300"></a>02300 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02301"></a>02301 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02302"></a>02302 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02303"></a>02303 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02304"></a>02304 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02305"></a>02305 <span class="keywordflow">if</span>(sinfo_frame_is_cdb(tag) == 1) {
-<a name="l02306"></a>02306 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02307"></a>02307 cpl_frameset_insert(cdb,frame_dup);
-<a name="l02308"></a>02308 }
-<a name="l02309"></a>02309 }
-<a name="l02310"></a>02310 }
-<a name="l02311"></a>02311 }
-<a name="l02312"></a>02312
-<a name="l02313"></a>02313 <span class="keywordflow">return</span> 0;
-<a name="l02314"></a>02314 }
-<a name="l02315"></a>02315
-<a name="l02316"></a>02316 cpl_frameset* sinfo_frameset_join(cpl_frameset* fs1,cpl_frameset* fs2) {
-<a name="l02317"></a>02317
-<a name="l02318"></a>02318 cpl_frameset* join=NULL;
-<a name="l02319"></a>02319 cpl_frame* frm=NULL;
-<a name="l02320"></a>02320 cpl_frame* frm_dup=NULL;
-<a name="l02321"></a>02321 <span class="keywordtype">int</span> i=0;
-<a name="l02322"></a>02322 <span class="keywordtype">int</span> n=0;
-<a name="l02323"></a>02323
-<a name="l02324"></a>02324 join=cpl_frameset_new();
-<a name="l02325"></a>02325
-<a name="l02326"></a>02326 n=cpl_frameset_get_size(fs1);
-<a name="l02327"></a>02327 <span class="keywordflow">for</span>(i=0;i<n; i++) {
-<a name="l02328"></a>02328 frm=cpl_frameset_get_frame(fs1,i);
-<a name="l02329"></a>02329 frm_dup= cpl_frame_duplicate(frm);
-<a name="l02330"></a>02330 cpl_frameset_insert(join,frm_dup);
-<a name="l02331"></a>02331 }
-<a name="l02332"></a>02332
-<a name="l02333"></a>02333 n=cpl_frameset_get_size(fs2);
-<a name="l02334"></a>02334 <span class="keywordflow">for</span>(i=0;i<n; i++) {
-<a name="l02335"></a>02335 frm=cpl_frameset_get_frame(fs2,i);
-<a name="l02336"></a>02336 frm_dup= cpl_frame_duplicate(frm);
-<a name="l02337"></a>02337 cpl_frameset_insert(join,frm_dup);
-<a name="l02338"></a>02338 }
+<a name="l02268"></a>02268 <span class="keywordtype">int</span> sinfo_extract_off_frames(cpl_frameset * sof, cpl_frameset* off)
+<a name="l02269"></a>02269 {
+<a name="l02270"></a>02270 cpl_frame* frame = NULL;
+<a name="l02271"></a>02271 cpl_frame* frame_dup = NULL;
+<a name="l02272"></a>02272 <span class="keywordtype">int</span> nsof=0;
+<a name="l02273"></a>02273 <span class="keywordtype">int</span> i=0;
+<a name="l02274"></a>02274 nsof = cpl_frameset_get_size(sof);
+<a name="l02275"></a>02275 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02276"></a>02276 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02277"></a>02277 <span class="keywordflow">if</span>(sinfo_frame_is_on(frame)) {
+<a name="l02278"></a>02278 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02279"></a>02279 cpl_frameset_insert(off,frame_dup);
+<a name="l02280"></a>02280 }
+<a name="l02281"></a>02281 }
+<a name="l02282"></a>02282
+<a name="l02283"></a>02283 <span class="keywordflow">return</span> 0;
+<a name="l02284"></a>02284 }
+<a name="l02285"></a>02285
+<a name="l02286"></a>02286 <span class="keywordtype">int</span> sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb)
+<a name="l02287"></a>02287 {
+<a name="l02288"></a>02288 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02289"></a>02289 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02290"></a>02290 cpl_frame* frame = NULL;
+<a name="l02291"></a>02291 cpl_frame* frame_dup = NULL;
+<a name="l02292"></a>02292 <span class="keywordtype">int</span> nsof=0;
+<a name="l02293"></a>02293 <span class="keywordtype">int</span> i=0;
+<a name="l02294"></a>02294
+<a name="l02295"></a>02295 nsof = cpl_frameset_get_size(sof);
+<a name="l02296"></a>02296 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02297"></a>02297 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02298"></a>02298 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02299"></a>02299 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02300"></a>02300 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02301"></a>02301 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02302"></a>02302 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02303"></a>02303 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02304"></a>02304 <span class="keywordflow">if</span>(sinfo_frame_is_cdb(tag) == 1) {
+<a name="l02305"></a>02305 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02306"></a>02306 cpl_frameset_insert(cdb,frame_dup);
+<a name="l02307"></a>02307 }
+<a name="l02308"></a>02308 }
+<a name="l02309"></a>02309 }
+<a name="l02310"></a>02310 }
+<a name="l02311"></a>02311
+<a name="l02312"></a>02312 <span class="keywordflow">return</span> 0;
+<a name="l02313"></a>02313 }
+<a name="l02314"></a>02314
+<a name="l02315"></a>02315 cpl_frameset* sinfo_frameset_join(cpl_frameset* fs1,cpl_frameset* fs2) {
+<a name="l02316"></a>02316
+<a name="l02317"></a>02317 cpl_frameset* join=NULL;
+<a name="l02318"></a>02318 cpl_frame* frm=NULL;
+<a name="l02319"></a>02319 cpl_frame* frm_dup=NULL;
+<a name="l02320"></a>02320 <span class="keywordtype">int</span> i=0;
+<a name="l02321"></a>02321 <span class="keywordtype">int</span> n=0;
+<a name="l02322"></a>02322
+<a name="l02323"></a>02323 join=cpl_frameset_new();
+<a name="l02324"></a>02324
+<a name="l02325"></a>02325 n=cpl_frameset_get_size(fs1);
+<a name="l02326"></a>02326 <span class="keywordflow">for</span>(i=0;i<n; i++) {
+<a name="l02327"></a>02327 frm=cpl_frameset_get_frame(fs1,i);
+<a name="l02328"></a>02328 frm_dup= cpl_frame_duplicate(frm);
+<a name="l02329"></a>02329 cpl_frameset_insert(join,frm_dup);
+<a name="l02330"></a>02330 }
+<a name="l02331"></a>02331
+<a name="l02332"></a>02332 n=cpl_frameset_get_size(fs2);
+<a name="l02333"></a>02333 <span class="keywordflow">for</span>(i=0;i<n; i++) {
+<a name="l02334"></a>02334 frm=cpl_frameset_get_frame(fs2,i);
+<a name="l02335"></a>02335 frm_dup= cpl_frame_duplicate(frm);
+<a name="l02336"></a>02336 cpl_frameset_insert(join,frm_dup);
+<a name="l02337"></a>02337 }
+<a name="l02338"></a>02338
<a name="l02339"></a>02339
-<a name="l02340"></a>02340
-<a name="l02341"></a>02341 <span class="keywordflow">return</span> join;
-<a name="l02342"></a>02342
-<a name="l02343"></a>02343 }
+<a name="l02340"></a>02340 <span class="keywordflow">return</span> join;
+<a name="l02341"></a>02341
+<a name="l02342"></a>02342 }
+<a name="l02343"></a>02343
<a name="l02344"></a>02344
-<a name="l02345"></a>02345
-<a name="l02346"></a>02346 <span class="keywordtype">int</span> sinfo_extract_stk_frames(cpl_frameset * sof,
-<a name="l02347"></a>02347 cpl_frameset* res)
-<a name="l02348"></a>02348 {
-<a name="l02349"></a>02349 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02350"></a>02350 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02351"></a>02351 cpl_frame* frame = NULL;
-<a name="l02352"></a>02352 cpl_frame* frame_dup = NULL;
-<a name="l02353"></a>02353 <span class="keywordtype">int</span> nsof=0;
-<a name="l02354"></a>02354 <span class="keywordtype">int</span> i=0;
-<a name="l02355"></a>02355
-<a name="l02356"></a>02356 nsof = cpl_frameset_get_size(sof);
-<a name="l02357"></a>02357 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02358"></a>02358 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02359"></a>02359 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02360"></a>02360 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02361"></a>02361 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02362"></a>02362 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02363"></a>02363 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02364"></a>02364 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02365"></a>02365 <span class="keywordflow">if</span>(sinfo_frame_is_stk(tag) == 1) {
-<a name="l02366"></a>02366 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02367"></a>02367 cpl_frameset_insert(res,frame_dup);
-<a name="l02368"></a>02368 }
-<a name="l02369"></a>02369 }
-<a name="l02370"></a>02370 }
-<a name="l02371"></a>02371 }
-<a name="l02372"></a>02372
-<a name="l02373"></a>02373 <span class="keywordflow">return</span> 0;
-<a name="l02374"></a>02374 }
+<a name="l02345"></a>02345 <span class="keywordtype">int</span> sinfo_extract_stk_frames(cpl_frameset * sof,
+<a name="l02346"></a>02346 cpl_frameset* res)
+<a name="l02347"></a>02347 {
+<a name="l02348"></a>02348 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02349"></a>02349 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02350"></a>02350 cpl_frame* frame = NULL;
+<a name="l02351"></a>02351 cpl_frame* frame_dup = NULL;
+<a name="l02352"></a>02352 <span class="keywordtype">int</span> nsof=0;
+<a name="l02353"></a>02353 <span class="keywordtype">int</span> i=0;
+<a name="l02354"></a>02354
+<a name="l02355"></a>02355 nsof = cpl_frameset_get_size(sof);
+<a name="l02356"></a>02356 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02357"></a>02357 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02358"></a>02358 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02359"></a>02359 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02360"></a>02360 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02361"></a>02361 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02362"></a>02362 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02363"></a>02363 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02364"></a>02364 <span class="keywordflow">if</span>(sinfo_frame_is_stk(tag) == 1) {
+<a name="l02365"></a>02365 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02366"></a>02366 cpl_frameset_insert(res,frame_dup);
+<a name="l02367"></a>02367 }
+<a name="l02368"></a>02368 }
+<a name="l02369"></a>02369 }
+<a name="l02370"></a>02370 }
+<a name="l02371"></a>02371
+<a name="l02372"></a>02372 <span class="keywordflow">return</span> 0;
+<a name="l02373"></a>02373 }
+<a name="l02374"></a>02374
<a name="l02375"></a>02375
-<a name="l02376"></a>02376
-<a name="l02377"></a>02377 <span class="keywordtype">int</span>
-<a name="l02378"></a>02378 sinfo_extract_preoptic_frames(cpl_frameset * sof,
-<a name="l02379"></a>02379 cpl_frameset** res,
-<a name="l02380"></a>02380 <span class="keyword">const</span> <span class="keywordtype">char</span>* val)
-<a name="l02381"></a>02381 {
-<a name="l02382"></a>02382 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02383"></a>02383 cpl_frame* frame = NULL;
-<a name="l02384"></a>02384 cpl_frame* frame_dup = NULL;
-<a name="l02385"></a>02385 <span class="keywordtype">int</span> nsof=0;
-<a name="l02386"></a>02386 <span class="keywordtype">int</span> i=0;
-<a name="l02387"></a>02387
-<a name="l02388"></a>02388 nsof = cpl_frameset_get_size(sof);
-<a name="l02389"></a>02389 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02390"></a>02390 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02391"></a>02391 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02392"></a>02392 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02393"></a>02393 <span class="keywordflow">if</span>(sinfo_frame_is_preoptic(frame,val) == 1) {
-<a name="l02394"></a>02394 frame_dup=cpl_frame_duplicate(frame);
-<a name="l02395"></a>02395 cpl_frameset_insert(*res,frame_dup);
-<a name="l02396"></a>02396 }
-<a name="l02397"></a>02397 }
-<a name="l02398"></a>02398 }
-<a name="l02399"></a>02399
-<a name="l02400"></a>02400 <span class="keywordflow">return</span> 0;
-<a name="l02401"></a>02401 }
-<a name="l02402"></a>02402
-<a name="l02403"></a>02403 <span class="keywordtype">int</span> sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro)
-<a name="l02404"></a>02404 {
-<a name="l02405"></a>02405 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02406"></a>02406 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02407"></a>02407 cpl_frame* frame = NULL;
-<a name="l02408"></a>02408 cpl_frame* frame_dup = NULL;
-<a name="l02409"></a>02409
-<a name="l02410"></a>02410 <span class="keywordtype">int</span> nsof=0;
-<a name="l02411"></a>02411 <span class="keywordtype">int</span> i=0;
-<a name="l02412"></a>02412 nsof = cpl_frameset_get_size(sof);
-<a name="l02413"></a>02413
-<a name="l02414"></a>02414 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02415"></a>02415 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02416"></a>02416 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02417"></a>02417 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02418"></a>02418 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02419"></a>02419 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02420"></a>02420 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02421"></a>02421 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02422"></a>02422 <span class="comment">/* sinfo_msg("tag=%s\n",tag); */</span>
-<a name="l02423"></a>02423 <span class="keywordflow">if</span>(sinfo_frame_is_raw_stack(tag) == 1) {
-<a name="l02424"></a>02424 frame_dup = cpl_frame_duplicate(frame);
-<a name="l02425"></a>02425 cpl_frameset_insert(*pro,frame_dup);
-<a name="l02426"></a>02426 }
-<a name="l02427"></a>02427 }
-<a name="l02428"></a>02428 }
-<a name="l02429"></a>02429 }
-<a name="l02430"></a>02430
-<a name="l02431"></a>02431 <span class="keywordflow">return</span> 0;
-<a name="l02432"></a>02432 }
+<a name="l02376"></a>02376 <span class="keywordtype">int</span>
+<a name="l02377"></a>02377 sinfo_extract_preoptic_frames(cpl_frameset * sof,
+<a name="l02378"></a>02378 cpl_frameset** res,
+<a name="l02379"></a>02379 <span class="keyword">const</span> <span class="keywordtype">char</span>* val)
+<a name="l02380"></a>02380 {
+<a name="l02381"></a>02381 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02382"></a>02382 cpl_frame* frame = NULL;
+<a name="l02383"></a>02383 cpl_frame* frame_dup = NULL;
+<a name="l02384"></a>02384 <span class="keywordtype">int</span> nsof=0;
+<a name="l02385"></a>02385 <span class="keywordtype">int</span> i=0;
+<a name="l02386"></a>02386
+<a name="l02387"></a>02387 nsof = cpl_frameset_get_size(sof);
+<a name="l02388"></a>02388 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02389"></a>02389 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02390"></a>02390 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02391"></a>02391 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02392"></a>02392 <span class="keywordflow">if</span>(sinfo_frame_is_preoptic(frame,val) == 1) {
+<a name="l02393"></a>02393 frame_dup=cpl_frame_duplicate(frame);
+<a name="l02394"></a>02394 cpl_frameset_insert(*res,frame_dup);
+<a name="l02395"></a>02395 }
+<a name="l02396"></a>02396 }
+<a name="l02397"></a>02397 }
+<a name="l02398"></a>02398
+<a name="l02399"></a>02399 <span class="keywordflow">return</span> 0;
+<a name="l02400"></a>02400 }
+<a name="l02401"></a>02401
+<a name="l02402"></a>02402 <span class="keywordtype">int</span> sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro)
+<a name="l02403"></a>02403 {
+<a name="l02404"></a>02404 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02405"></a>02405 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02406"></a>02406 cpl_frame* frame = NULL;
+<a name="l02407"></a>02407 cpl_frame* frame_dup = NULL;
+<a name="l02408"></a>02408
+<a name="l02409"></a>02409 <span class="keywordtype">int</span> nsof=0;
+<a name="l02410"></a>02410 <span class="keywordtype">int</span> i=0;
+<a name="l02411"></a>02411 nsof = cpl_frameset_get_size(sof);
+<a name="l02412"></a>02412
+<a name="l02413"></a>02413 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02414"></a>02414 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02415"></a>02415 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02416"></a>02416 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02417"></a>02417 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02418"></a>02418 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02419"></a>02419 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02420"></a>02420 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02421"></a>02421 <span class="comment">/* sinfo_msg("tag=%s\n",tag); */</span>
+<a name="l02422"></a>02422 <span class="keywordflow">if</span>(sinfo_frame_is_raw_stack(tag) == 1) {
+<a name="l02423"></a>02423 frame_dup = cpl_frame_duplicate(frame);
+<a name="l02424"></a>02424 cpl_frameset_insert(*pro,frame_dup);
+<a name="l02425"></a>02425 }
+<a name="l02426"></a>02426 }
+<a name="l02427"></a>02427 }
+<a name="l02428"></a>02428 }
+<a name="l02429"></a>02429
+<a name="l02430"></a>02430 <span class="keywordflow">return</span> 0;
+<a name="l02431"></a>02431 }
+<a name="l02432"></a>02432
<a name="l02433"></a>02433
-<a name="l02434"></a>02434
-<a name="l02435"></a>02435 <span class="keywordtype">int</span> sinfo_extract_raw_slit_frames(cpl_frameset * sof, cpl_frameset** pro)
-<a name="l02436"></a>02436 {
-<a name="l02437"></a>02437 <span class="keywordtype">char</span>* tag=NULL;
-<a name="l02438"></a>02438 <span class="keywordtype">char</span>* name=NULL;
-<a name="l02439"></a>02439 cpl_frame* frame = NULL;
-<a name="l02440"></a>02440 <span class="keywordtype">int</span> nsof=0;
-<a name="l02441"></a>02441 <span class="keywordtype">int</span> i=0;
-<a name="l02442"></a>02442 nsof = cpl_frameset_get_size(sof);
-<a name="l02443"></a>02443 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
-<a name="l02444"></a>02444 frame = cpl_frameset_get_frame(sof,i);
-<a name="l02445"></a>02445 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
-<a name="l02446"></a>02446 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
-<a name="l02447"></a>02447 <span class="comment">/* to go on the file must exist */</span>
-<a name="l02448"></a>02448 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
-<a name="l02449"></a>02449 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
-<a name="l02450"></a>02450 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
-<a name="l02451"></a>02451 <span class="keywordflow">if</span>(sinfo_frame_is_slit_lamp(tag) == 1) {
-<a name="l02452"></a>02452 cpl_frameset_insert(*pro,frame);
-<a name="l02453"></a>02453 }
-<a name="l02454"></a>02454 }
-<a name="l02455"></a>02455 }
-<a name="l02456"></a>02456 }
-<a name="l02457"></a>02457
-<a name="l02458"></a>02458 <span class="keywordflow">return</span> 0;
-<a name="l02459"></a>02459 }
-<a name="l02460"></a>02460
-<a name="l02461"></a>02461 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02467"></a>02467 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02468"></a>02468 <span class="keywordtype">int</span> sinfo_frame_is_raw(<span class="keywordtype">char</span> * tag)
-<a name="l02469"></a>02469 {
-<a name="l02470"></a>02470 <span class="comment">/* Test entries */</span>
-<a name="l02471"></a>02471 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l02472"></a>02472
-<a name="l02473"></a>02473 <span class="keywordflow">if</span> (!strcmp(tag, RAW_LINEARITY_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02474"></a>02474 <span class="keywordflow">if</span> (!strcmp(tag, RAW_DARK)) <span class="keywordflow">return</span> 1 ;
-<a name="l02475"></a>02475 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PINHOLE_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02476"></a>02476 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SLIT_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02477"></a>02477 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02478"></a>02478 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02479"></a>02479 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02480"></a>02480 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_NS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02481"></a>02481 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02482"></a>02482 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_EW)) <span class="keywordflow">return</span> 1 ;
-<a name="l02483"></a>02483 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_NS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02484"></a>02484 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_SKY)) <span class="keywordflow">return</span> 1 ;
-<a name="l02485"></a>02485 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLUX_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02486"></a>02486 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02487"></a>02487 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FOCUS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02488"></a>02488
-<a name="l02489"></a>02489 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD)) <span class="keywordflow">return</span> 1 ;
-<a name="l02490"></a>02490 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02491"></a>02491 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02492"></a>02492 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_STD)) <span class="keywordflow">return</span> 1 ;
-<a name="l02493"></a>02493 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_OH)) <span class="keywordflow">return</span> 1 ;
-<a name="l02494"></a>02494 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02495"></a>02495
-<a name="l02496"></a>02496 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PUPIL_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02497"></a>02497 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_JITTER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02498"></a>02498 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_JITTER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02499"></a>02499 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING)) <span class="keywordflow">return</span> 1 ;
-<a name="l02500"></a>02500 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02501"></a>02501 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING)) <span class="keywordflow">return</span> 1 ;
-<a name="l02502"></a>02502
-<a name="l02503"></a>02503 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02504"></a>02504 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02505"></a>02505 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02506"></a>02506 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02507"></a>02507 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02508"></a>02508 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02434"></a>02434 <span class="keywordtype">int</span> sinfo_extract_raw_slit_frames(cpl_frameset * sof, cpl_frameset** pro)
+<a name="l02435"></a>02435 {
+<a name="l02436"></a>02436 <span class="keywordtype">char</span>* tag=NULL;
+<a name="l02437"></a>02437 <span class="keywordtype">char</span>* name=NULL;
+<a name="l02438"></a>02438 cpl_frame* frame = NULL;
+<a name="l02439"></a>02439 <span class="keywordtype">int</span> nsof=0;
+<a name="l02440"></a>02440 <span class="keywordtype">int</span> i=0;
+<a name="l02441"></a>02441 nsof = cpl_frameset_get_size(sof);
+<a name="l02442"></a>02442 <span class="keywordflow">for</span> (i=0 ; i<nsof ; i++) {
+<a name="l02443"></a>02443 frame = cpl_frameset_get_frame(sof,i);
+<a name="l02444"></a>02444 name= (<span class="keywordtype">char</span>*) cpl_frame_get_filename(frame);
+<a name="l02445"></a>02445 <span class="keywordflow">if</span>(sinfo_is_fits_file(name) ==1) {
+<a name="l02446"></a>02446 <span class="comment">/* to go on the file must exist */</span>
+<a name="l02447"></a>02447 <span class="keywordflow">if</span>(cpl_frame_get_tag(frame) != NULL) {
+<a name="l02448"></a>02448 <span class="comment">/* If the frame has a tag we process it. Else it is an object */</span>
+<a name="l02449"></a>02449 tag= (<span class="keywordtype">char</span>*) cpl_frame_get_tag(frame);
+<a name="l02450"></a>02450 <span class="keywordflow">if</span>(sinfo_frame_is_slit_lamp(tag) == 1) {
+<a name="l02451"></a>02451 cpl_frameset_insert(*pro,frame);
+<a name="l02452"></a>02452 }
+<a name="l02453"></a>02453 }
+<a name="l02454"></a>02454 }
+<a name="l02455"></a>02455 }
+<a name="l02456"></a>02456
+<a name="l02457"></a>02457 <span class="keywordflow">return</span> 0;
+<a name="l02458"></a>02458 }
+<a name="l02459"></a>02459
+<a name="l02460"></a>02460 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02466"></a>02466 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02467"></a>02467 <span class="keywordtype">int</span> sinfo_frame_is_raw(<span class="keywordtype">char</span> * tag)
+<a name="l02468"></a>02468 {
+<a name="l02469"></a>02469 <span class="comment">/* Test entries */</span>
+<a name="l02470"></a>02470 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02471"></a>02471
+<a name="l02472"></a>02472 <span class="keywordflow">if</span> (!strcmp(tag, RAW_LINEARITY_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02473"></a>02473 <span class="keywordflow">if</span> (!strcmp(tag, RAW_DARK)) <span class="keywordflow">return</span> 1 ;
+<a name="l02474"></a>02474 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PINHOLE_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02475"></a>02475 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SLIT_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02476"></a>02476 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02477"></a>02477 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02478"></a>02478 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02479"></a>02479 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_NS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02480"></a>02480 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02481"></a>02481 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_EW)) <span class="keywordflow">return</span> 1 ;
+<a name="l02482"></a>02482 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_NS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02483"></a>02483 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_SKY)) <span class="keywordflow">return</span> 1 ;
+<a name="l02484"></a>02484 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLUX_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02485"></a>02485 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02486"></a>02486 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FOCUS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02487"></a>02487
+<a name="l02488"></a>02488 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD)) <span class="keywordflow">return</span> 1 ;
+<a name="l02489"></a>02489 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02490"></a>02490 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02491"></a>02491 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_STD)) <span class="keywordflow">return</span> 1 ;
+<a name="l02492"></a>02492 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_OH)) <span class="keywordflow">return</span> 1 ;
+<a name="l02493"></a>02493 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02494"></a>02494
+<a name="l02495"></a>02495 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PUPIL_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02496"></a>02496 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_JITTER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02497"></a>02497 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_JITTER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02498"></a>02498 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING)) <span class="keywordflow">return</span> 1 ;
+<a name="l02499"></a>02499 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02500"></a>02500 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING)) <span class="keywordflow">return</span> 1 ;
+<a name="l02501"></a>02501
+<a name="l02502"></a>02502 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLAT_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02503"></a>02503 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02504"></a>02504 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02505"></a>02505 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02506"></a>02506 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02507"></a>02507 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02508"></a>02508
<a name="l02509"></a>02509
-<a name="l02510"></a>02510
-<a name="l02511"></a>02511 <span class="keywordflow">return</span> 0 ;
-<a name="l02512"></a>02512 }
-<a name="l02513"></a>02513
-<a name="l02514"></a>02514 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02520"></a>02520 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02521"></a>02521 <span class="keywordtype">int</span> sinfo_frame_is_raw_stack(<span class="keywordtype">char</span> * tag)
-<a name="l02522"></a>02522 {
-<a name="l02523"></a>02523 <span class="comment">/* Test entries */</span>
-<a name="l02524"></a>02524 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02510"></a>02510 <span class="keywordflow">return</span> 0 ;
+<a name="l02511"></a>02511 }
+<a name="l02512"></a>02512
+<a name="l02513"></a>02513 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02519"></a>02519 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02520"></a>02520 <span class="keywordtype">int</span> sinfo_frame_is_raw_stack(<span class="keywordtype">char</span> * tag)
+<a name="l02521"></a>02521 {
+<a name="l02522"></a>02522 <span class="comment">/* Test entries */</span>
+<a name="l02523"></a>02523 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02524"></a>02524
<a name="l02525"></a>02525
-<a name="l02526"></a>02526
-<a name="l02527"></a>02527 <span class="keywordflow">if</span> (!strcmp(tag, PRO_SKY_DUMMY)) <span class="keywordflow">return</span> 1 ;
-<a name="l02528"></a>02528 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02529"></a>02529 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02530"></a>02530 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02531"></a>02531 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02532"></a>02532
-<a name="l02533"></a>02533 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLUX_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02534"></a>02534 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_NS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02535"></a>02535 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_EW)) <span class="keywordflow">return</span> 1 ;
-<a name="l02536"></a>02536
-<a name="l02537"></a>02537 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02538"></a>02538 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_PSF)) <span class="keywordflow">return</span> 1 ;
-<a name="l02539"></a>02539 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_DARK)) <span class="keywordflow">return</span> 1 ;
-<a name="l02540"></a>02540
-<a name="l02541"></a>02541 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FOCUS)) <span class="keywordflow">return</span> 1 ;
-<a name="l02542"></a>02542
-<a name="l02543"></a>02543 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PUPIL_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02544"></a>02544 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_JITTER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02545"></a>02545 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_JITTER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02546"></a>02546 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING)) <span class="keywordflow">return</span> 1 ;
-<a name="l02547"></a>02547 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02548"></a>02548 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING)) <span class="keywordflow">return</span> 1 ;
-<a name="l02549"></a>02549
-<a name="l02550"></a>02550 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02551"></a>02551 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER_DITHER)) <span class="keywordflow">return</span> 1 ;
-<a name="l02552"></a>02552 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02526"></a>02526 <span class="keywordflow">if</span> (!strcmp(tag, PRO_SKY_DUMMY)) <span class="keywordflow">return</span> 1 ;
+<a name="l02527"></a>02527 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02528"></a>02528 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_LAMP_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02529"></a>02529 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02530"></a>02530 <span class="keywordflow">if</span> (!strcmp(tag, RAW_WAVE_NS_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02531"></a>02531
+<a name="l02532"></a>02532 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FLUX_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02533"></a>02533 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_NS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02534"></a>02534 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_EW)) <span class="keywordflow">return</span> 1 ;
+<a name="l02535"></a>02535
+<a name="l02536"></a>02536 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02537"></a>02537 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_PSF)) <span class="keywordflow">return</span> 1 ;
+<a name="l02538"></a>02538 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FIBRE_DARK)) <span class="keywordflow">return</span> 1 ;
+<a name="l02539"></a>02539
+<a name="l02540"></a>02540 <span class="keywordflow">if</span> (!strcmp(tag, RAW_FOCUS)) <span class="keywordflow">return</span> 1 ;
+<a name="l02541"></a>02541
+<a name="l02542"></a>02542 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PUPIL_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02543"></a>02543 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_JITTER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02544"></a>02544 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_JITTER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02545"></a>02545 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING)) <span class="keywordflow">return</span> 1 ;
+<a name="l02546"></a>02546 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02547"></a>02547 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING)) <span class="keywordflow">return</span> 1 ;
+<a name="l02548"></a>02548
+<a name="l02549"></a>02549 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02550"></a>02550 <span class="keywordflow">if</span> (!strcmp(tag, RAW_OBJECT_SKYSPIDER_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02551"></a>02551 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_NODDING_DITHER)) <span class="keywordflow">return</span> 1 ;
+<a name="l02552"></a>02552
<a name="l02553"></a>02553
-<a name="l02554"></a>02554
-<a name="l02555"></a>02555 <span class="keywordflow">if</span> (!strcmp(tag, RAW_IMAGE_PRE_OBJECT)) <span class="keywordflow">return</span> 1 ;
-<a name="l02556"></a>02556 <span class="keywordflow">if</span> (!strcmp(tag, RAW_IMAGE_PRE_SKY)) <span class="keywordflow">return</span> 1 ;
-<a name="l02557"></a>02557 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD)) <span class="keywordflow">return</span> 1 ;
-<a name="l02558"></a>02558 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_STD)) <span class="keywordflow">return</span> 1 ;
-<a name="l02559"></a>02559 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_OH)) <span class="keywordflow">return</span> 1 ;
-<a name="l02560"></a>02560 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02561"></a>02561 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR)) <span class="keywordflow">return</span> 1 ;
-<a name="l02562"></a>02562 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY)) <span class="keywordflow">return</span> 1 ;
-<a name="l02563"></a>02563
-<a name="l02564"></a>02564 <span class="keywordflow">return</span> 0 ;
-<a name="l02565"></a>02565 }
+<a name="l02554"></a>02554 <span class="keywordflow">if</span> (!strcmp(tag, RAW_IMAGE_PRE_OBJECT)) <span class="keywordflow">return</span> 1 ;
+<a name="l02555"></a>02555 <span class="keywordflow">if</span> (!strcmp(tag, RAW_IMAGE_PRE_SKY)) <span class="keywordflow">return</span> 1 ;
+<a name="l02556"></a>02556 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD)) <span class="keywordflow">return</span> 1 ;
+<a name="l02557"></a>02557 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_STD)) <span class="keywordflow">return</span> 1 ;
+<a name="l02558"></a>02558 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_OH)) <span class="keywordflow">return</span> 1 ;
+<a name="l02559"></a>02559 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY_PSF_CALIBRATOR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02560"></a>02560 <span class="keywordflow">if</span> (!strcmp(tag, RAW_STD_STAR)) <span class="keywordflow">return</span> 1 ;
+<a name="l02561"></a>02561 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SKY)) <span class="keywordflow">return</span> 1 ;
+<a name="l02562"></a>02562
+<a name="l02563"></a>02563 <span class="keywordflow">return</span> 0 ;
+<a name="l02564"></a>02564 }
+<a name="l02565"></a>02565
<a name="l02566"></a>02566
-<a name="l02567"></a>02567
-<a name="l02568"></a>02568 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02574"></a>02574 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02575"></a>02575 <span class="keywordtype">int</span> sinfo_frame_is_raw_dark(<span class="keywordtype">char</span> * tag)
-<a name="l02576"></a>02576 {
-<a name="l02577"></a>02577 <span class="comment">/* Test entries */</span>
-<a name="l02578"></a>02578 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l02579"></a>02579
-<a name="l02580"></a>02580 <span class="keywordflow">if</span> (!strcmp(tag, RAW_DARK)) <span class="keywordflow">return</span> 1 ;
-<a name="l02581"></a>02581
-<a name="l02582"></a>02582 <span class="keywordflow">return</span> 0 ;
-<a name="l02583"></a>02583 }
-<a name="l02584"></a>02584
-<a name="l02585"></a>02585 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02591"></a>02591 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02592"></a>02592 <span class="keywordtype">int</span> sinfo_frame_is_slit_lamp(<span class="keywordtype">char</span> * tag)
-<a name="l02593"></a>02593 {
-<a name="l02594"></a>02594 <span class="comment">/* Test entries */</span>
-<a name="l02595"></a>02595 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l02596"></a>02596
-<a name="l02597"></a>02597 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SLIT_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02598"></a>02598
-<a name="l02599"></a>02599 <span class="keywordflow">return</span> 0 ;
-<a name="l02600"></a>02600 }
+<a name="l02567"></a>02567 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02573"></a>02573 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02574"></a>02574 <span class="keywordtype">int</span> sinfo_frame_is_raw_dark(<span class="keywordtype">char</span> * tag)
+<a name="l02575"></a>02575 {
+<a name="l02576"></a>02576 <span class="comment">/* Test entries */</span>
+<a name="l02577"></a>02577 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02578"></a>02578
+<a name="l02579"></a>02579 <span class="keywordflow">if</span> (!strcmp(tag, RAW_DARK)) <span class="keywordflow">return</span> 1 ;
+<a name="l02580"></a>02580
+<a name="l02581"></a>02581 <span class="keywordflow">return</span> 0 ;
+<a name="l02582"></a>02582 }
+<a name="l02583"></a>02583
+<a name="l02584"></a>02584 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02590"></a>02590 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02591"></a>02591 <span class="keywordtype">int</span> sinfo_frame_is_slit_lamp(<span class="keywordtype">char</span> * tag)
+<a name="l02592"></a>02592 {
+<a name="l02593"></a>02593 <span class="comment">/* Test entries */</span>
+<a name="l02594"></a>02594 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02595"></a>02595
+<a name="l02596"></a>02596 <span class="keywordflow">if</span> (!strcmp(tag, RAW_SLIT_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02597"></a>02597
+<a name="l02598"></a>02598 <span class="keywordflow">return</span> 0 ;
+<a name="l02599"></a>02599 }
+<a name="l02600"></a>02600
<a name="l02601"></a>02601
-<a name="l02602"></a>02602
-<a name="l02603"></a>02603 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02609"></a>02609 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02610"></a>02610 <span class="keywordtype">int</span> sinfo_frame_is_pinhole_lamp(<span class="keywordtype">char</span> * tag)
-<a name="l02611"></a>02611 {
-<a name="l02612"></a>02612 <span class="comment">/* Test entries */</span>
-<a name="l02613"></a>02613 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l02614"></a>02614
-<a name="l02615"></a>02615 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PINHOLE_LAMP)) <span class="keywordflow">return</span> 1 ;
-<a name="l02616"></a>02616
-<a name="l02617"></a>02617 <span class="keywordflow">return</span> 0 ;
-<a name="l02618"></a>02618 }
+<a name="l02602"></a>02602 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02608"></a>02608 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02609"></a>02609 <span class="keywordtype">int</span> sinfo_frame_is_pinhole_lamp(<span class="keywordtype">char</span> * tag)
+<a name="l02610"></a>02610 {
+<a name="l02611"></a>02611 <span class="comment">/* Test entries */</span>
+<a name="l02612"></a>02612 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02613"></a>02613
+<a name="l02614"></a>02614 <span class="keywordflow">if</span> (!strcmp(tag, RAW_PINHOLE_LAMP)) <span class="keywordflow">return</span> 1 ;
+<a name="l02615"></a>02615
+<a name="l02616"></a>02616 <span class="keywordflow">return</span> 0 ;
+<a name="l02617"></a>02617 }
+<a name="l02618"></a>02618
<a name="l02619"></a>02619
-<a name="l02620"></a>02620
-<a name="l02621"></a>02621 <span class="keywordtype">int</span> sinfo_frame_is_cdb(<span class="keywordtype">char</span> * tag)
-<a name="l02622"></a>02622 {
-<a name="l02623"></a>02623 <span class="comment">/* Test entries */</span>
-<a name="l02624"></a>02624 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
-<a name="l02625"></a>02625 <span class="comment">/* For the moment not checked the following:</span>
-<a name="l02626"></a>02626 <span class="comment"></span>
-<a name="l02627"></a>02627 <span class="comment"> PRO_STACKED</span>
-<a name="l02628"></a>02628 <span class="comment"> PRO_SLIT_ON</span>
-<a name="l02629"></a>02629 <span class="comment"> PRO_FLUX_LAMP_STACKED</span>
-<a name="l02630"></a>02630 <span class="comment"> PRO_WAVE_LAMP_STACKED</span>
-<a name="l02631"></a>02631 <span class="comment"> PRO_PSF_CALIBRATOR_STACKED</span>
-<a name="l02632"></a>02632 <span class="comment"> PRO_FOCUS_STACKED</span>
-<a name="l02633"></a>02633 <span class="comment"> PRO_OBJECT_NODDING_STACKED</span>
-<a name="l02634"></a>02634 <span class="comment"> PRO_OBJECT_SKYSPIDER_STACKED</span>
-<a name="l02635"></a>02635 <span class="comment"> PRO_SKY_NODDING_STACKED</span>
-<a name="l02636"></a>02636 <span class="comment"> PRO_STD_NODDING_STACKED</span>
-<a name="l02637"></a>02637 <span class="comment"> PRO_MASK_CUBE</span>
-<a name="l02638"></a>02638 <span class="comment"> PRO_PSF</span>
-<a name="l02639"></a>02639 <span class="comment"> TMP_FOCUS</span>
-<a name="l02640"></a>02640 <span class="comment"> TMP_FOCUS_ON</span>
-<a name="l02641"></a>02641 <span class="comment"> TMP_FOCUS_OFF</span>
-<a name="l02642"></a>02642 <span class="comment"> PRO_FOCUS</span>
-<a name="l02643"></a>02643 <span class="comment"> PRO_FOCUS_GAUSS</span>
-<a name="l02644"></a>02644 <span class="comment"> PRO_SPECTRA</span>
-<a name="l02645"></a>02645 <span class="comment"> PRO_CUBE</span>
-<a name="l02646"></a>02646 <span class="comment"> PRO_CUBE_COLL</span>
-<a name="l02647"></a>02647 <span class="comment"> PRO_SLOPEX</span>
-<a name="l02648"></a>02648 <span class="comment"> PRO_SLOPEY</span>
-<a name="l02649"></a>02649 <span class="comment"> PRO_MASK_CUBE</span>
-<a name="l02650"></a>02650 <span class="comment"> PRO_OBJ_CUBE</span>
-<a name="l02651"></a>02651 <span class="comment"> PRO_BP_COEFF</span>
-<a name="l02652"></a>02652 <span class="comment"> */</span>
-<a name="l02653"></a>02653
-<a name="l02654"></a>02654 <span class="keywordflow">if</span> (!strcmp(tag, REF_LINE_ARC)) <span class="keywordflow">return</span> 1 ;
+<a name="l02620"></a>02620 <span class="keywordtype">int</span> sinfo_frame_is_cdb(<span class="keywordtype">char</span> * tag)
+<a name="l02621"></a>02621 {
+<a name="l02622"></a>02622 <span class="comment">/* Test entries */</span>
+<a name="l02623"></a>02623 <span class="keywordflow">if</span> (tag == NULL) <span class="keywordflow">return</span> -1 ;
+<a name="l02624"></a>02624 <span class="comment">/* For the moment not checked the following:</span>
+<a name="l02625"></a>02625 <span class="comment"></span>
+<a name="l02626"></a>02626 <span class="comment"> PRO_STACKED</span>
+<a name="l02627"></a>02627 <span class="comment"> PRO_SLIT_ON</span>
+<a name="l02628"></a>02628 <span class="comment"> PRO_FLUX_LAMP_STACKED</span>
+<a name="l02629"></a>02629 <span class="comment"> PRO_WAVE_LAMP_STACKED</span>
+<a name="l02630"></a>02630 <span class="comment"> PRO_PSF_CALIBRATOR_STACKED</span>
+<a name="l02631"></a>02631 <span class="comment"> PRO_FOCUS_STACKED</span>
+<a name="l02632"></a>02632 <span class="comment"> PRO_OBJECT_NODDING_STACKED</span>
+<a name="l02633"></a>02633 <span class="comment"> PRO_OBJECT_SKYSPIDER_STACKED</span>
+<a name="l02634"></a>02634 <span class="comment"> PRO_SKY_NODDING_STACKED</span>
+<a name="l02635"></a>02635 <span class="comment"> PRO_STD_NODDING_STACKED</span>
+<a name="l02636"></a>02636 <span class="comment"> PRO_MASK_CUBE</span>
+<a name="l02637"></a>02637 <span class="comment"> PRO_PSF</span>
+<a name="l02638"></a>02638 <span class="comment"> TMP_FOCUS</span>
+<a name="l02639"></a>02639 <span class="comment"> TMP_FOCUS_ON</span>
+<a name="l02640"></a>02640 <span class="comment"> TMP_FOCUS_OFF</span>
+<a name="l02641"></a>02641 <span class="comment"> PRO_FOCUS</span>
+<a name="l02642"></a>02642 <span class="comment"> PRO_FOCUS_GAUSS</span>
+<a name="l02643"></a>02643 <span class="comment"> PRO_SPECTRA</span>
+<a name="l02644"></a>02644 <span class="comment"> PRO_CUBE</span>
+<a name="l02645"></a>02645 <span class="comment"> PRO_CUBE_COLL</span>
+<a name="l02646"></a>02646 <span class="comment"> PRO_SLOPEX</span>
+<a name="l02647"></a>02647 <span class="comment"> PRO_SLOPEY</span>
+<a name="l02648"></a>02648 <span class="comment"> PRO_MASK_CUBE</span>
+<a name="l02649"></a>02649 <span class="comment"> PRO_OBJ_CUBE</span>
+<a name="l02650"></a>02650 <span class="comment"> PRO_BP_COEFF</span>
+<a name="l02651"></a>02651 <span class="comment"> */</span>
+<a name="l02652"></a>02652
+<a name="l02653"></a>02653 <span class="keywordflow">if</span> (!strcmp(tag, REF_LINE_ARC)) <span class="keywordflow">return</span> 1 ;
+<a name="l02654"></a>02654 <span class="keywordflow">if</span> (!strcmp(tag, REF_LINE_OH)) <span class="keywordflow">return</span> 1 ;
<a name="l02655"></a>02655 <span class="keywordflow">if</span> (!strcmp(tag, PRO_BP_MAP)) <span class="keywordflow">return</span> 1 ;
<a name="l02656"></a>02656 <span class="keywordflow">if</span> (!strcmp(tag, PRO_BP_MAP_HP)) <span class="keywordflow">return</span> 1 ;
<a name="l02657"></a>02657 <span class="keywordflow">if</span> (!strcmp(tag, PRO_BP_MAP_DI)) <span class="keywordflow">return</span> 1 ;
@@ -4213,7 +4213,7 @@
<a name="l04738"></a>04738
<a name="l04739"></a>04739
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dfs_8h_source.html b/html/sinfo__dfs_8h_source.html
index 9f2634b..e9aa7c2 100644
--- a/html/sinfo__dfs_8h_source.html
+++ b/html/sinfo__dfs_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2010/02/17 09:23:43 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_DFS_H</span>
@@ -61,7 +61,7 @@
<a name="l00051"></a>00051 CPL_END_DECLS
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__distortion_8c_source.html b/html/sinfo__distortion_8c_source.html
index a636ba6..935febd 100644
--- a/html/sinfo__distortion_8c_source.html
+++ b/html/sinfo__distortion_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/05 16:34:06 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.37 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -1506,7 +1506,7 @@
<a name="l01603"></a>01603 }
<a name="l01604"></a>01604
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__distortion_8h_source.html b/html/sinfo__distortion_8h_source.html
index f2ae2ab..ab97a14 100644
--- a/html/sinfo__distortion_8h_source.html
+++ b/html/sinfo__distortion_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/06/06 07:10:45 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_DISTORTION_H</span>
@@ -84,7 +84,7 @@
<a name="l00074"></a>00074 <span class="keyword">const</span> <span class="keywordtype">int</span> n);
<a name="l00075"></a>00075 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__distortion__config_8c_source.html b/html/sinfo__distortion__config_8c_source.html
index ae67dd1..177bb40 100644
--- a/html/sinfo__distortion__config_8c_source.html
+++ b/html/sinfo__distortion__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
@@ -546,7 +546,7 @@
<a name="l00540"></a>00540
<a name="l00541"></a>00541 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__distortion__config_8h_source.html b/html/sinfo__distortion__config_8h_source.html
index 17b0838..c747580 100644
--- a/html/sinfo__distortion__config_8h_source.html
+++ b/html/sinfo__distortion__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -41,7 +41,7 @@
<a name="l00031"></a>00031 <span class="keywordtype">void</span> sinfo_distortion_config_add(cpl_parameterlist *list);
<a name="l00032"></a>00032
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dump_8c_source.html b/html/sinfo__dump_8c_source.html
index ff72dae..3af8c35 100644
--- a/html/sinfo__dump_8c_source.html
+++ b/html/sinfo__dump_8c_source.html
@@ -29,348 +29,351 @@
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="comment">/*</span>
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/09/21 10:55:19 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.9 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Log: sinfo_dump.c,v $</span>
-<a name="l00026"></a>00026 <span class="comment"> * Revision 1.8 2012/03/02 08:42:20 amodigli</span>
-<a name="l00027"></a>00027 <span class="comment"> * fixed some typos on doxygen</span>
+<a name="l00026"></a>00026 <span class="comment"> * Revision 1.9 2012/09/21 10:55:19 amodigli</span>
+<a name="l00027"></a>00027 <span class="comment"> * removed warning from clang</span>
<a name="l00028"></a>00028 <span class="comment"> *</span>
-<a name="l00029"></a>00029 <span class="comment"> * Revision 1.7 2011/11/23 17:29:19 amodigli</span>
-<a name="l00030"></a>00030 <span class="comment"> * fix warning with cpl6</span>
+<a name="l00029"></a>00029 <span class="comment"> * Revision 1.8 2012/03/02 08:42:20 amodigli</span>
+<a name="l00030"></a>00030 <span class="comment"> * fixed some typos on doxygen</span>
<a name="l00031"></a>00031 <span class="comment"> *</span>
-<a name="l00032"></a>00032 <span class="comment"> * Revision 1.6 2008/01/17 07:54:04 amodigli</span>
-<a name="l00033"></a>00033 <span class="comment"> * shorten long lines</span>
+<a name="l00032"></a>00032 <span class="comment"> * Revision 1.7 2011/11/23 17:29:19 amodigli</span>
+<a name="l00033"></a>00033 <span class="comment"> * fix warning with cpl6</span>
<a name="l00034"></a>00034 <span class="comment"> *</span>
-<a name="l00035"></a>00035 <span class="comment"> * Revision 1.5 2007/08/11 10:45:47 amodigli</span>
-<a name="l00036"></a>00036 <span class="comment"> * upgrade to CPL4, fixed compil warnings</span>
+<a name="l00035"></a>00035 <span class="comment"> * Revision 1.6 2008/01/17 07:54:04 amodigli</span>
+<a name="l00036"></a>00036 <span class="comment"> * shorten long lines</span>
<a name="l00037"></a>00037 <span class="comment"> *</span>
-<a name="l00038"></a>00038 <span class="comment"> * Revision 1.4 2007/06/06 07:10:45 amodigli</span>
-<a name="l00039"></a>00039 <span class="comment"> * replaced tab with 4 spaces</span>
+<a name="l00038"></a>00038 <span class="comment"> * Revision 1.5 2007/08/11 10:45:47 amodigli</span>
+<a name="l00039"></a>00039 <span class="comment"> * upgrade to CPL4, fixed compil warnings</span>
<a name="l00040"></a>00040 <span class="comment"> *</span>
-<a name="l00041"></a>00041 <span class="comment"> * Revision 1.3 2006/10/20 08:07:05 amodigli</span>
-<a name="l00042"></a>00042 <span class="comment"> * using prefix sinfo_ in place of sinfoni_ for includes</span>
+<a name="l00041"></a>00041 <span class="comment"> * Revision 1.4 2007/06/06 07:10:45 amodigli</span>
+<a name="l00042"></a>00042 <span class="comment"> * replaced tab with 4 spaces</span>
<a name="l00043"></a>00043 <span class="comment"> *</span>
-<a name="l00044"></a>00044 <span class="comment"> * Revision 1.2 2006/10/16 07:26:23 amodigli</span>
-<a name="l00045"></a>00045 <span class="comment"> * shortened line length</span>
+<a name="l00044"></a>00044 <span class="comment"> * Revision 1.3 2006/10/20 08:07:05 amodigli</span>
+<a name="l00045"></a>00045 <span class="comment"> * using prefix sinfo_ in place of sinfoni_ for includes</span>
<a name="l00046"></a>00046 <span class="comment"> *</span>
-<a name="l00047"></a>00047 <span class="comment"> * Revision 1.1 2006/08/09 12:20:11 amodigli</span>
-<a name="l00048"></a>00048 <span class="comment"> * added sinfo_dump.h sinfo_dump.c</span>
+<a name="l00047"></a>00047 <span class="comment"> * Revision 1.2 2006/10/16 07:26:23 amodigli</span>
+<a name="l00048"></a>00048 <span class="comment"> * shortened line length</span>
<a name="l00049"></a>00049 <span class="comment"> *</span>
-<a name="l00050"></a>00050 <span class="comment"> * Revision 1.7 2006/05/12 15:02:05 jmlarsen</span>
-<a name="l00051"></a>00051 <span class="comment"> * Support NULL tags</span>
+<a name="l00050"></a>00050 <span class="comment"> * Revision 1.1 2006/08/09 12:20:11 amodigli</span>
+<a name="l00051"></a>00051 <span class="comment"> * added sinfo_dump.h sinfo_dump.c</span>
<a name="l00052"></a>00052 <span class="comment"> *</span>
-<a name="l00053"></a>00053 <span class="comment"> * Revision 1.6 2006/02/28 09:15:22 jmlarsen</span>
-<a name="l00054"></a>00054 <span class="comment"> * Minor update</span>
+<a name="l00053"></a>00053 <span class="comment"> * Revision 1.7 2006/05/12 15:02:05 jmlarsen</span>
+<a name="l00054"></a>00054 <span class="comment"> * Support NULL tags</span>
<a name="l00055"></a>00055 <span class="comment"> *</span>
-<a name="l00056"></a>00056 <span class="comment"> * Revision 1.5 2006/02/15 13:19:15 jmlarsen</span>
-<a name="l00057"></a>00057 <span class="comment"> * Reduced source code max. line length</span>
+<a name="l00056"></a>00056 <span class="comment"> * Revision 1.6 2006/02/28 09:15:22 jmlarsen</span>
+<a name="l00057"></a>00057 <span class="comment"> * Minor update</span>
<a name="l00058"></a>00058 <span class="comment"> *</span>
-<a name="l00059"></a>00059 <span class="comment"> * Revision 1.4 2005/12/19 16:17:56 jmlarsen</span>
-<a name="l00060"></a>00060 <span class="comment"> * Replaced bool -> int</span>
+<a name="l00059"></a>00059 <span class="comment"> * Revision 1.5 2006/02/15 13:19:15 jmlarsen</span>
+<a name="l00060"></a>00060 <span class="comment"> * Reduced source code max. line length</span>
<a name="l00061"></a>00061 <span class="comment"> *</span>
-<a name="l00062"></a>00062 <span class="comment"> */</span>
-<a name="l00063"></a>00063
-<a name="l00064"></a>00064 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
-<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
-<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span>
-<a name="l00070"></a>00070 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00077"></a>00077 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l00078"></a>00078
-<a name="l00079"></a>00079
-<a name="l00080"></a>00080 <span class="preprocessor">#include <sinfo_dump.h></span>
-<a name="l00081"></a>00081 <span class="preprocessor">#include <sinfo_utils.h></span>
-<a name="l00082"></a>00082 <span class="preprocessor">#include <sinfo_error.h></span>
-<a name="l00083"></a>00083 <span class="preprocessor">#include <sinfo_msg.h></span>
-<a name="l00084"></a>00084 <span class="preprocessor">#include <cpl.h></span>
-<a name="l00085"></a>00085
-<a name="l00086"></a>00086 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00098"></a>00098 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00099"></a>00099 cpl_error_code
-<a name="l00100"></a>00100 sinfo_print_cpl_propertylist(<span class="keyword">const</span> cpl_propertylist *pl, <span class="keywordtype">long</span> low, <span class="keywordtype">long</span> high)
-<a name="l00101"></a>00101 {
-<a name="l00102"></a>00102 cpl_property *prop;
-<a name="l00103"></a>00103 <span class="keywordtype">long</span> i = 0;
-<a name="l00104"></a>00104
-<a name="l00105"></a>00105 assure (0 <= low && high <= cpl_propertylist_get_size(pl) && low <= high,
-<a name="l00106"></a>00106 CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Illegal range"</span>);
-<a name="l00107"></a>00107 <span class="comment">/* Printing an empty range is allowed but only when low == high */</span>
-<a name="l00108"></a>00108
-<a name="l00109"></a>00109 <span class="keywordflow">if</span> (pl == NULL){
-<a name="l00110"></a>00110 sinfo_msg(<span class="stringliteral">"NULL"</span>);
-<a name="l00111"></a>00111 }
-<a name="l00112"></a>00112 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cpl_propertylist_is_empty(pl)) {
-<a name="l00113"></a>00113 sinfo_msg(<span class="stringliteral">"[Empty property list]"</span>);
+<a name="l00062"></a>00062 <span class="comment"> * Revision 1.4 2005/12/19 16:17:56 jmlarsen</span>
+<a name="l00063"></a>00063 <span class="comment"> * Replaced bool -> int</span>
+<a name="l00064"></a>00064 <span class="comment"> *</span>
+<a name="l00065"></a>00065 <span class="comment"> */</span>
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
+<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
+<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
+<a name="l00070"></a>00070 <span class="preprocessor"></span>
+<a name="l00073"></a>00073 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00080"></a>00080 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00081"></a>00081
+<a name="l00082"></a>00082
+<a name="l00083"></a>00083 <span class="preprocessor">#include <sinfo_dump.h></span>
+<a name="l00084"></a>00084 <span class="preprocessor">#include <sinfo_utils.h></span>
+<a name="l00085"></a>00085 <span class="preprocessor">#include <sinfo_error.h></span>
+<a name="l00086"></a>00086 <span class="preprocessor">#include <sinfo_msg.h></span>
+<a name="l00087"></a>00087 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00088"></a>00088
+<a name="l00089"></a>00089 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00101"></a>00101 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00102"></a>00102 cpl_error_code
+<a name="l00103"></a>00103 sinfo_print_cpl_propertylist(<span class="keyword">const</span> cpl_propertylist *pl, <span class="keywordtype">long</span> low, <span class="keywordtype">long</span> high)
+<a name="l00104"></a>00104 {
+<a name="l00105"></a>00105 cpl_property *prop;
+<a name="l00106"></a>00106 <span class="keywordtype">long</span> i = 0;
+<a name="l00107"></a>00107
+<a name="l00108"></a>00108 assure (0 <= low && high <= cpl_propertylist_get_size(pl) && low <= high,
+<a name="l00109"></a>00109 CPL_ERROR_ILLEGAL_INPUT, <span class="stringliteral">"Illegal range"</span>);
+<a name="l00110"></a>00110 <span class="comment">/* Printing an empty range is allowed but only when low == high */</span>
+<a name="l00111"></a>00111
+<a name="l00112"></a>00112 <span class="keywordflow">if</span> (pl == NULL){
+<a name="l00113"></a>00113 sinfo_msg(<span class="stringliteral">"NULL"</span>);
<a name="l00114"></a>00114 }
-<a name="l00115"></a>00115 <span class="keywordflow">else</span>
-<a name="l00116"></a>00116 <span class="keywordflow">for</span> (i = low; i < high; i++)
-<a name="l00117"></a>00117 {
-<a name="l00118"></a>00118 <span class="comment">/* bug workaround: remove const cast when declaration </span>
-<a name="l00119"></a>00119 <span class="comment"> of cpl_propertylist_get() is changed */</span>
-<a name="l00120"></a>00120 prop = cpl_propertylist_get((cpl_propertylist *)pl, i);
-<a name="l00121"></a>00121 check (sinfo_print_cpl_property(prop),
-<a name="l00122"></a>00122 <span class="stringliteral">"Error printing property"</span>);
-<a name="l00123"></a>00123 }
-<a name="l00124"></a>00124
-<a name="l00125"></a>00125 cleanup:
-<a name="l00126"></a>00126 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00127"></a>00127 }
-<a name="l00128"></a>00128 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00136"></a>00136 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00137"></a>00137
-<a name="l00138"></a>00138 cpl_error_code
-<a name="l00139"></a>00139 sinfo_print_cpl_property(<span class="keyword">const</span> cpl_property *prop)
-<a name="l00140"></a>00140 {
-<a name="l00141"></a>00141 cpl_type t;
-<a name="l00142"></a>00142
-<a name="l00143"></a>00143 <span class="keywordflow">if</span> (prop == NULL)
-<a name="l00144"></a>00144 {
-<a name="l00145"></a>00145 sinfo_msg(<span class="stringliteral">"NULL"</span>);
-<a name="l00146"></a>00146 }
-<a name="l00147"></a>00147 <span class="keywordflow">else</span>
-<a name="l00148"></a>00148 {
-<a name="l00149"></a>00149 <span class="comment">/* print property with this formatting</span>
-<a name="l00150"></a>00150 <span class="comment"> NAME =</span>
-<a name="l00151"></a>00151 <span class="comment"> VALUE</span>
-<a name="l00152"></a>00152 <span class="comment"> COMMENT</span>
-<a name="l00153"></a>00153 <span class="comment"> */</span>
-<a name="l00154"></a>00154
-<a name="l00155"></a>00155 <span class="comment">/* print name */</span>
-<a name="l00156"></a>00156
-<a name="l00157"></a>00157 sinfo_msg(<span class="stringliteral">"%s ="</span>, cpl_property_get_name(prop));
-<a name="l00158"></a>00158
-<a name="l00159"></a>00159 <span class="comment">/* print value */</span>
-<a name="l00160"></a>00160
-<a name="l00161"></a>00161 check( t = cpl_property_get_type(prop),
-<a name="l00162"></a>00162 <span class="stringliteral">"Could not read property type"</span>);
+<a name="l00115"></a>00115 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cpl_propertylist_is_empty(pl)) {
+<a name="l00116"></a>00116 sinfo_msg(<span class="stringliteral">"[Empty property list]"</span>);
+<a name="l00117"></a>00117 }
+<a name="l00118"></a>00118 <span class="keywordflow">else</span>
+<a name="l00119"></a>00119 <span class="keywordflow">for</span> (i = low; i < high; i++)
+<a name="l00120"></a>00120 {
+<a name="l00121"></a>00121 <span class="comment">/* bug workaround: remove const cast when declaration </span>
+<a name="l00122"></a>00122 <span class="comment"> of cpl_propertylist_get() is changed */</span>
+<a name="l00123"></a>00123 prop = cpl_propertylist_get((cpl_propertylist *)pl, i);
+<a name="l00124"></a>00124 check (sinfo_print_cpl_property(prop),
+<a name="l00125"></a>00125 <span class="stringliteral">"Error printing property"</span>);
+<a name="l00126"></a>00126 }
+<a name="l00127"></a>00127
+<a name="l00128"></a>00128 cleanup:
+<a name="l00129"></a>00129 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00130"></a>00130 }
+<a name="l00131"></a>00131 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00139"></a>00139 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 cpl_error_code
+<a name="l00142"></a>00142 sinfo_print_cpl_property(<span class="keyword">const</span> cpl_property *prop)
+<a name="l00143"></a>00143 {
+<a name="l00144"></a>00144 cpl_type t;
+<a name="l00145"></a>00145
+<a name="l00146"></a>00146 <span class="keywordflow">if</span> (prop == NULL)
+<a name="l00147"></a>00147 {
+<a name="l00148"></a>00148 sinfo_msg(<span class="stringliteral">"NULL"</span>);
+<a name="l00149"></a>00149 }
+<a name="l00150"></a>00150 <span class="keywordflow">else</span>
+<a name="l00151"></a>00151 {
+<a name="l00152"></a>00152 <span class="comment">/* print property with this formatting</span>
+<a name="l00153"></a>00153 <span class="comment"> NAME =</span>
+<a name="l00154"></a>00154 <span class="comment"> VALUE</span>
+<a name="l00155"></a>00155 <span class="comment"> COMMENT</span>
+<a name="l00156"></a>00156 <span class="comment"> */</span>
+<a name="l00157"></a>00157
+<a name="l00158"></a>00158 <span class="comment">/* print name */</span>
+<a name="l00159"></a>00159
+<a name="l00160"></a>00160 sinfo_msg(<span class="stringliteral">"%s ="</span>, cpl_property_get_name(prop));
+<a name="l00161"></a>00161
+<a name="l00162"></a>00162 <span class="comment">/* print value */</span>
<a name="l00163"></a>00163
-<a name="l00164"></a>00164 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
-<a name="l00165"></a>00165 {
-<a name="l00166"></a>00166 <span class="keywordflow">case</span> CPL_TYPE_CHAR:
-<a name="l00167"></a>00167 <span class="keywordflow">if</span> (t & CPL_TYPE_FLAG_ARRAY) <span class="comment">/* if type is string */</span>
-<a name="l00168"></a>00168 {
-<a name="l00169"></a>00169 sinfo_msg(<span class="stringliteral">" '%s'"</span>, cpl_property_get_string(prop));
-<a name="l00170"></a>00170 }
-<a name="l00171"></a>00171 <span class="keywordflow">else</span> <span class="comment">/* an ordinary char */</span>
-<a name="l00172"></a>00172 {
-<a name="l00173"></a>00173 sinfo_msg(<span class="stringliteral">" %c"</span>, cpl_property_get_char(prop));
-<a name="l00174"></a>00174 }
-<a name="l00175"></a>00175 <span class="keywordflow">break</span>;
-<a name="l00176"></a>00176 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">if</span> (cpl_property_get_bool(prop))
-<a name="l00177"></a>00177 {sinfo_msg(<span class="stringliteral">" true"</span>);}
-<a name="l00178"></a>00178 <span class="keywordflow">else</span>
-<a name="l00179"></a>00179 {sinfo_msg(<span class="stringliteral">" false"</span>);}
-<a name="l00180"></a>00180 <span class="keywordflow">break</span>;
-<a name="l00181"></a>00181 <span class="keywordflow">case</span> CPL_TYPE_UCHAR:
-<a name="l00182"></a>00182 sinfo_msg(<span class="stringliteral">"%c"</span>,cpl_property_get_char(prop));
-<a name="l00183"></a>00183 <span class="keywordflow">break</span>;
-<a name="l00184"></a>00184 <span class="keywordflow">case</span> CPL_TYPE_INT:
-<a name="l00185"></a>00185 sinfo_msg(<span class="stringliteral">"%d"</span>,cpl_property_get_int(prop));
+<a name="l00164"></a>00164 check( t = cpl_property_get_type(prop),
+<a name="l00165"></a>00165 <span class="stringliteral">"Could not read property type"</span>);
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
+<a name="l00168"></a>00168 {
+<a name="l00169"></a>00169 <span class="keywordflow">case</span> CPL_TYPE_CHAR:
+<a name="l00170"></a>00170 <span class="keywordflow">if</span> (t & CPL_TYPE_FLAG_ARRAY) <span class="comment">/* if type is string */</span>
+<a name="l00171"></a>00171 {
+<a name="l00172"></a>00172 sinfo_msg(<span class="stringliteral">" '%s'"</span>, cpl_property_get_string(prop));
+<a name="l00173"></a>00173 }
+<a name="l00174"></a>00174 <span class="keywordflow">else</span> <span class="comment">/* an ordinary char */</span>
+<a name="l00175"></a>00175 {
+<a name="l00176"></a>00176 sinfo_msg(<span class="stringliteral">" %c"</span>, cpl_property_get_char(prop));
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178 <span class="keywordflow">break</span>;
+<a name="l00179"></a>00179 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">if</span> (cpl_property_get_bool(prop))
+<a name="l00180"></a>00180 {sinfo_msg(<span class="stringliteral">" true"</span>);}
+<a name="l00181"></a>00181 <span class="keywordflow">else</span>
+<a name="l00182"></a>00182 {sinfo_msg(<span class="stringliteral">" false"</span>);}
+<a name="l00183"></a>00183 <span class="keywordflow">break</span>;
+<a name="l00184"></a>00184 <span class="keywordflow">case</span> CPL_TYPE_UCHAR:
+<a name="l00185"></a>00185 sinfo_msg(<span class="stringliteral">"%c"</span>,cpl_property_get_char(prop));
<a name="l00186"></a>00186 <span class="keywordflow">break</span>;
-<a name="l00187"></a>00187 <span class="keywordflow">case</span> CPL_TYPE_UINT:
-<a name="l00188"></a>00188 sinfo_msg(<span class="stringliteral">"%d"</span>,cpl_property_get_int(prop));
+<a name="l00187"></a>00187 <span class="keywordflow">case</span> CPL_TYPE_INT:
+<a name="l00188"></a>00188 sinfo_msg(<span class="stringliteral">"%d"</span>,cpl_property_get_int(prop));
<a name="l00189"></a>00189 <span class="keywordflow">break</span>;
-<a name="l00190"></a>00190 <span class="keywordflow">case</span> CPL_TYPE_LONG:
-<a name="l00191"></a>00191 sinfo_msg(<span class="stringliteral">"%ld"</span>,cpl_property_get_long(prop));
+<a name="l00190"></a>00190 <span class="keywordflow">case</span> CPL_TYPE_UINT:
+<a name="l00191"></a>00191 sinfo_msg(<span class="stringliteral">"%d"</span>,cpl_property_get_int(prop));
<a name="l00192"></a>00192 <span class="keywordflow">break</span>;
-<a name="l00193"></a>00193 <span class="keywordflow">case</span> CPL_TYPE_ULONG:
+<a name="l00193"></a>00193 <span class="keywordflow">case</span> CPL_TYPE_LONG:
<a name="l00194"></a>00194 sinfo_msg(<span class="stringliteral">"%ld"</span>,cpl_property_get_long(prop));
<a name="l00195"></a>00195 <span class="keywordflow">break</span>;
-<a name="l00196"></a>00196 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
-<a name="l00197"></a>00197 sinfo_msg(<span class="stringliteral">"%f"</span>,cpl_property_get_float(prop));
+<a name="l00196"></a>00196 <span class="keywordflow">case</span> CPL_TYPE_ULONG:
+<a name="l00197"></a>00197 sinfo_msg(<span class="stringliteral">"%ld"</span>,cpl_property_get_long(prop));
<a name="l00198"></a>00198 <span class="keywordflow">break</span>;
-<a name="l00199"></a>00199 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE:
-<a name="l00200"></a>00200 sinfo_msg(<span class="stringliteral">"%f"</span>,cpl_property_get_double(prop));
+<a name="l00199"></a>00199 <span class="keywordflow">case</span> CPL_TYPE_FLOAT:
+<a name="l00200"></a>00200 sinfo_msg(<span class="stringliteral">"%f"</span>,cpl_property_get_float(prop));
<a name="l00201"></a>00201 <span class="keywordflow">break</span>;
-<a name="l00202"></a>00202 <span class="keywordflow">case</span> CPL_TYPE_POINTER:
-<a name="l00203"></a>00203 sinfo_msg(<span class="stringliteral">"POINTER"</span>);
+<a name="l00202"></a>00202 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE:
+<a name="l00203"></a>00203 sinfo_msg(<span class="stringliteral">"%f"</span>,cpl_property_get_double(prop));
<a name="l00204"></a>00204 <span class="keywordflow">break</span>;
-<a name="l00205"></a>00205 <span class="keywordflow">case</span> CPL_TYPE_INVALID:
-<a name="l00206"></a>00206 sinfo_msg(<span class="stringliteral">"INVALID"</span>);
+<a name="l00205"></a>00205 <span class="keywordflow">case</span> CPL_TYPE_POINTER:
+<a name="l00206"></a>00206 sinfo_msg(<span class="stringliteral">"POINTER"</span>);
<a name="l00207"></a>00207 <span class="keywordflow">break</span>;
-<a name="l00208"></a>00208 <span class="keywordflow">default</span>:
-<a name="l00209"></a>00209 sinfo_msg(<span class="stringliteral">" unrecognized property"</span>);
+<a name="l00208"></a>00208 <span class="keywordflow">case</span> CPL_TYPE_INVALID:
+<a name="l00209"></a>00209 sinfo_msg(<span class="stringliteral">"INVALID"</span>);
<a name="l00210"></a>00210 <span class="keywordflow">break</span>;
-<a name="l00211"></a>00211 }
-<a name="l00212"></a>00212
-<a name="l00213"></a>00213 <span class="comment">/* Is this property an array? */</span>
-<a name="l00214"></a>00214 <span class="keywordflow">if</span> (t & CPL_TYPE_FLAG_ARRAY){
-<a name="l00215"></a>00215 cpl_msg_info(cpl_func,<span class="stringliteral">" (array size = %"</span> CPL_SIZE_FORMAT <span class="stringliteral">" )"</span>,
-<a name="l00216"></a>00216 cpl_property_get_size(prop));
-<a name="l00217"></a>00217 }
-<a name="l00218"></a>00218
-<a name="l00219"></a>00219 <span class="comment">/* Print comment */</span>
-<a name="l00220"></a>00220 <span class="keywordflow">if</span> (cpl_property_get_comment(prop) != NULL){
-<a name="l00221"></a>00221 sinfo_msg(<span class="stringliteral">" %s"</span>, cpl_property_get_comment(prop));
-<a name="l00222"></a>00222 }
-<a name="l00223"></a>00223 }
-<a name="l00224"></a>00224
-<a name="l00225"></a>00225 cleanup:
-<a name="l00226"></a>00226 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00227"></a>00227 }
-<a name="l00228"></a>00228
-<a name="l00229"></a>00229 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00237"></a>00237 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00238"></a>00238 cpl_error_code
-<a name="l00239"></a>00239 sinfo_print_cpl_frameset(<span class="keyword">const</span> cpl_frameset *frames)
-<a name="l00240"></a>00240 {
-<a name="l00241"></a>00241 <span class="comment">/* Two special cases: a NULL frame set and an empty frame set */</span>
-<a name="l00242"></a>00242
-<a name="l00243"></a>00243 <span class="keywordflow">if</span> (frames == NULL)
-<a name="l00244"></a>00244 {
-<a name="l00245"></a>00245 sinfo_msg(<span class="stringliteral">"NULL"</span>);
-<a name="l00246"></a>00246 }
-<a name="l00247"></a>00247 <span class="keywordflow">else</span>
-<a name="l00248"></a>00248 {
-<a name="l00249"></a>00249 <span class="keyword">const</span> cpl_frame *f = NULL;
-<a name="l00250"></a>00250 check( f = cpl_frameset_get_first_const(frames),
-<a name="l00251"></a>00251 <span class="stringliteral">"Error reading frameset"</span>);
-<a name="l00252"></a>00252
-<a name="l00253"></a>00253 <span class="keywordflow">if</span> (f == NULL)
-<a name="l00254"></a>00254 {
-<a name="l00255"></a>00255 sinfo_msg(<span class="stringliteral">"[Empty frame set]"</span>);
-<a name="l00256"></a>00256 }
-<a name="l00257"></a>00257 <span class="keywordflow">else</span>
-<a name="l00258"></a>00258 {
-<a name="l00259"></a>00259 <span class="keywordflow">while</span>(f != NULL)
-<a name="l00260"></a>00260 {
-<a name="l00261"></a>00261 check( sinfo_print_cpl_frame(f),
-<a name="l00262"></a>00262 <span class="stringliteral">"Could not print frame"</span>);
-<a name="l00263"></a>00263 check( f = cpl_frameset_get_next_const(frames),
-<a name="l00264"></a>00264 <span class="stringliteral">"Error reading frameset"</span>);
-<a name="l00265"></a>00265 }
-<a name="l00266"></a>00266 }
-<a name="l00267"></a>00267 }
-<a name="l00268"></a>00268
-<a name="l00269"></a>00269 cleanup:
-<a name="l00270"></a>00270 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00271"></a>00271 }
-<a name="l00272"></a>00272
-<a name="l00273"></a>00273 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00281"></a>00281 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00282"></a>00282 cpl_error_code
-<a name="l00283"></a>00283 sinfo_print_cpl_frame(<span class="keyword">const</span> cpl_frame *f)
-<a name="l00284"></a>00284 {
-<a name="l00285"></a>00285 <span class="keywordflow">if</span> (f == NULL)
-<a name="l00286"></a>00286 {
-<a name="l00287"></a>00287 sinfo_msg(<span class="stringliteral">"NULL"</span>);
-<a name="l00288"></a>00288 }
-<a name="l00289"></a>00289 <span class="keywordflow">else</span>
-<a name="l00290"></a>00290 {
-<a name="l00291"></a>00291 sinfo_msg(<span class="stringliteral">"%-7s %-20s '%s'"</span>,
-<a name="l00292"></a>00292 sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)),
-<a name="l00293"></a>00293 cpl_frame_get_tag(f) != NULL ?
-<a name="l00294"></a>00294 cpl_frame_get_tag(f) : <span class="stringliteral">"Null"</span>,
-<a name="l00295"></a>00295 cpl_frame_get_filename(f));
-<a name="l00296"></a>00296
-<a name="l00297"></a>00297 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"type \t= %s"</span>,
-<a name="l00298"></a>00298 sinfo_tostring_cpl_frame_type (cpl_frame_get_type (f)));
-<a name="l00299"></a>00299 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"group \t= %s"</span>,
-<a name="l00300"></a>00300 sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)));
-<a name="l00301"></a>00301 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"level \t= %s"</span>,
-<a name="l00302"></a>00302 sinfo_tostring_cpl_frame_level(cpl_frame_get_level(f)));
-<a name="l00303"></a>00303 }
-<a name="l00304"></a>00304
-<a name="l00305"></a>00305 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00306"></a>00306 }
+<a name="l00211"></a>00211 <span class="keywordflow">default</span>:
+<a name="l00212"></a>00212 sinfo_msg(<span class="stringliteral">" unrecognized property"</span>);
+<a name="l00213"></a>00213 <span class="keywordflow">break</span>;
+<a name="l00214"></a>00214 }
+<a name="l00215"></a>00215
+<a name="l00216"></a>00216 <span class="comment">/* Is this property an array? */</span>
+<a name="l00217"></a>00217 <span class="keywordflow">if</span> (t & CPL_TYPE_FLAG_ARRAY){
+<a name="l00218"></a>00218 cpl_msg_info(cpl_func,<span class="stringliteral">" (array size = %"</span> CPL_SIZE_FORMAT <span class="stringliteral">" )"</span>,
+<a name="l00219"></a>00219 cpl_property_get_size(prop));
+<a name="l00220"></a>00220 }
+<a name="l00221"></a>00221
+<a name="l00222"></a>00222 <span class="comment">/* Print comment */</span>
+<a name="l00223"></a>00223 <span class="keywordflow">if</span> (cpl_property_get_comment(prop) != NULL){
+<a name="l00224"></a>00224 sinfo_msg(<span class="stringliteral">" %s"</span>, cpl_property_get_comment(prop));
+<a name="l00225"></a>00225 }
+<a name="l00226"></a>00226 }
+<a name="l00227"></a>00227
+<a name="l00228"></a>00228 cleanup:
+<a name="l00229"></a>00229 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00230"></a>00230 }
+<a name="l00231"></a>00231
+<a name="l00232"></a>00232 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00240"></a>00240 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00241"></a>00241 cpl_error_code
+<a name="l00242"></a>00242 sinfo_print_cpl_frameset(<span class="keyword">const</span> cpl_frameset *frames)
+<a name="l00243"></a>00243 {
+<a name="l00244"></a>00244 <span class="comment">/* Two special cases: a NULL frame set and an empty frame set */</span>
+<a name="l00245"></a>00245
+<a name="l00246"></a>00246 <span class="keywordflow">if</span> (frames == NULL)
+<a name="l00247"></a>00247 {
+<a name="l00248"></a>00248 sinfo_msg(<span class="stringliteral">"NULL"</span>);
+<a name="l00249"></a>00249 }
+<a name="l00250"></a>00250 <span class="keywordflow">else</span>
+<a name="l00251"></a>00251 {
+<a name="l00252"></a>00252 <span class="keyword">const</span> cpl_frame *f = NULL;
+<a name="l00253"></a>00253 check( f = cpl_frameset_get_first_const(frames),
+<a name="l00254"></a>00254 <span class="stringliteral">"Error reading frameset"</span>);
+<a name="l00255"></a>00255
+<a name="l00256"></a>00256 <span class="keywordflow">if</span> (f == NULL)
+<a name="l00257"></a>00257 {
+<a name="l00258"></a>00258 sinfo_msg(<span class="stringliteral">"[Empty frame set]"</span>);
+<a name="l00259"></a>00259 }
+<a name="l00260"></a>00260 <span class="keywordflow">else</span>
+<a name="l00261"></a>00261 {
+<a name="l00262"></a>00262 <span class="keywordflow">while</span>(f != NULL)
+<a name="l00263"></a>00263 {
+<a name="l00264"></a>00264 check( sinfo_print_cpl_frame(f),
+<a name="l00265"></a>00265 <span class="stringliteral">"Could not print frame"</span>);
+<a name="l00266"></a>00266 check( f = cpl_frameset_get_next_const(frames),
+<a name="l00267"></a>00267 <span class="stringliteral">"Error reading frameset"</span>);
+<a name="l00268"></a>00268 }
+<a name="l00269"></a>00269 }
+<a name="l00270"></a>00270 }
+<a name="l00271"></a>00271
+<a name="l00272"></a>00272 cleanup:
+<a name="l00273"></a>00273 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00274"></a>00274 }
+<a name="l00275"></a>00275
+<a name="l00276"></a>00276 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00284"></a>00284 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00285"></a>00285 cpl_error_code
+<a name="l00286"></a>00286 sinfo_print_cpl_frame(<span class="keyword">const</span> cpl_frame *f)
+<a name="l00287"></a>00287 {
+<a name="l00288"></a>00288 <span class="keywordflow">if</span> (f == NULL)
+<a name="l00289"></a>00289 {
+<a name="l00290"></a>00290 sinfo_msg(<span class="stringliteral">"NULL"</span>);
+<a name="l00291"></a>00291 }
+<a name="l00292"></a>00292 <span class="keywordflow">else</span>
+<a name="l00293"></a>00293 {
+<a name="l00294"></a>00294 sinfo_msg(<span class="stringliteral">"%-7s %-20s '%s'"</span>,
+<a name="l00295"></a>00295 sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)),
+<a name="l00296"></a>00296 cpl_frame_get_tag(f) != NULL ?
+<a name="l00297"></a>00297 cpl_frame_get_tag(f) : <span class="stringliteral">"Null"</span>,
+<a name="l00298"></a>00298 cpl_frame_get_filename(f));
+<a name="l00299"></a>00299
+<a name="l00300"></a>00300 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"type \t= %s"</span>,
+<a name="l00301"></a>00301 sinfo_tostring_cpl_frame_type (cpl_frame_get_type (f)));
+<a name="l00302"></a>00302 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"group \t= %s"</span>,
+<a name="l00303"></a>00303 sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)));
+<a name="l00304"></a>00304 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"level \t= %s"</span>,
+<a name="l00305"></a>00305 sinfo_tostring_cpl_frame_level(cpl_frame_get_level(f)));
+<a name="l00306"></a>00306 }
<a name="l00307"></a>00307
-<a name="l00308"></a>00308 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00314"></a>00314 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00315"></a>00315 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00316"></a>00316 sinfo_tostring_cpl_frame_type(cpl_frame_type ft)
-<a name="l00317"></a>00317 {
-<a name="l00318"></a>00318 <span class="keywordflow">switch</span>(ft)
-<a name="l00319"></a>00319 {
-<a name="l00320"></a>00320 <span class="keywordflow">case</span> CPL_FRAME_TYPE_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>; <span class="keywordflow">break</span>;
-<a name="l00321"></a>00321 <span class="keywordflow">case</span> CPL_FRAME_TYPE_IMAGE: <span class="keywordflow">return</span> <span class="stringliteral">"IMAGE"</span>; <span class="keywordflow">break</span>;
-<a name="l00322"></a>00322 <span class="keywordflow">case</span> CPL_FRAME_TYPE_MATRIX: <span class="keywordflow">return</span> <span class="stringliteral">"MATRIX"</span>; <span class="keywordflow">break</span>;
-<a name="l00323"></a>00323 <span class="keywordflow">case</span> CPL_FRAME_TYPE_TABLE: <span class="keywordflow">return</span> <span class="stringliteral">"TABLE"</span>; <span class="keywordflow">break</span>;
-<a name="l00324"></a>00324 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame type"</span>;
-<a name="l00325"></a>00325 }
-<a name="l00326"></a>00326 }
-<a name="l00327"></a>00327
-<a name="l00328"></a>00328 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00334"></a>00334 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00335"></a>00335 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00336"></a>00336 sinfo_tostring_cpl_frame_group(cpl_frame_group fg)
-<a name="l00337"></a>00337 {
-<a name="l00338"></a>00338 <span class="keywordflow">switch</span>(fg)
-<a name="l00339"></a>00339 {
-<a name="l00340"></a>00340 <span class="keywordflow">case</span> CPL_FRAME_GROUP_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>; <span class="keywordflow">break</span>;
-<a name="l00341"></a>00341 <span class="keywordflow">case</span> CPL_FRAME_GROUP_RAW: <span class="keywordflow">return</span> CPL_FRAME_GROUP_RAW_ID; <span class="keywordflow">break</span>;
-<a name="l00342"></a>00342 <span class="keywordflow">case</span> CPL_FRAME_GROUP_CALIB: <span class="keywordflow">return</span> CPL_FRAME_GROUP_CALIB_ID; <span class="keywordflow">break</span>;
-<a name="l00343"></a>00343 <span class="keywordflow">case</span> CPL_FRAME_GROUP_PRODUCT: <span class="keywordflow">return</span> CPL_FRAME_GROUP_PRODUCT_ID;<span class="keywordflow">break</span>;
-<a name="l00344"></a>00344 <span class="keywordflow">default</span>:
-<a name="l00345"></a>00345 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame group"</span>;
-<a name="l00346"></a>00346 }
-<a name="l00347"></a>00347 }
-<a name="l00348"></a>00348
-<a name="l00349"></a>00349 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00355"></a>00355 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00356"></a>00356 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00357"></a>00357 sinfo_tostring_cpl_frame_level(cpl_frame_level fl)
-<a name="l00358"></a>00358 {
-<a name="l00359"></a>00359
-<a name="l00360"></a>00360 <span class="keywordflow">switch</span>(fl)
-<a name="l00361"></a>00361 {
-<a name="l00362"></a>00362 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>; <span class="keywordflow">break</span>;
-<a name="l00363"></a>00363 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_TEMPORARY: <span class="keywordflow">return</span> <span class="stringliteral">"TEMPORARY"</span>; <span class="keywordflow">break</span>;
-<a name="l00364"></a>00364 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_INTERMEDIATE:<span class="keywordflow">return</span> <span class="stringliteral">"INTERMEDIATE"</span>;<span class="keywordflow">break</span>;
-<a name="l00365"></a>00365 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_FINAL: <span class="keywordflow">return</span> <span class="stringliteral">"FINAL"</span>; <span class="keywordflow">break</span>;
-<a name="l00366"></a>00366 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame level"</span>;
-<a name="l00367"></a>00367 }
-<a name="l00368"></a>00368 }
-<a name="l00369"></a>00369
-<a name="l00370"></a>00370
-<a name="l00371"></a>00371 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00377"></a>00377 <span class="comment">/*----------------------------------------------------------------*/</span>
-<a name="l00378"></a>00378 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00379"></a>00379 sinfo_tostring_cpl_type(cpl_type t)
-<a name="l00380"></a>00380 {
-<a name="l00381"></a>00381
-<a name="l00382"></a>00382 <span class="comment">/* Note that CPL_TYPE_STRING is shorthand</span>
-<a name="l00383"></a>00383 <span class="comment"> for CPL_TYPE_CHAR | CPL_TYPE_FLAG_ARRAY . */</span>
+<a name="l00308"></a>00308 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00309"></a>00309 }
+<a name="l00310"></a>00310
+<a name="l00311"></a>00311 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00317"></a>00317 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00318"></a>00318 <span class="keyword">const</span> <span class="keywordtype">char</span> *
+<a name="l00319"></a>00319 sinfo_tostring_cpl_frame_type(cpl_frame_type ft)
+<a name="l00320"></a>00320 {
+<a name="l00321"></a>00321 <span class="keywordflow">switch</span>(ft)
+<a name="l00322"></a>00322 {
+<a name="l00323"></a>00323 <span class="keywordflow">case</span> CPL_FRAME_TYPE_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>;
+<a name="l00324"></a>00324 <span class="keywordflow">case</span> CPL_FRAME_TYPE_IMAGE: <span class="keywordflow">return</span> <span class="stringliteral">"IMAGE"</span>;
+<a name="l00325"></a>00325 <span class="keywordflow">case</span> CPL_FRAME_TYPE_MATRIX: <span class="keywordflow">return</span> <span class="stringliteral">"MATRIX"</span>;
+<a name="l00326"></a>00326 <span class="keywordflow">case</span> CPL_FRAME_TYPE_TABLE: <span class="keywordflow">return</span> <span class="stringliteral">"TABLE"</span>;
+<a name="l00327"></a>00327 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame type"</span>;
+<a name="l00328"></a>00328 }
+<a name="l00329"></a>00329 }
+<a name="l00330"></a>00330
+<a name="l00331"></a>00331 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00337"></a>00337 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00338"></a>00338 <span class="keyword">const</span> <span class="keywordtype">char</span> *
+<a name="l00339"></a>00339 sinfo_tostring_cpl_frame_group(cpl_frame_group fg)
+<a name="l00340"></a>00340 {
+<a name="l00341"></a>00341 <span class="keywordflow">switch</span>(fg)
+<a name="l00342"></a>00342 {
+<a name="l00343"></a>00343 <span class="keywordflow">case</span> CPL_FRAME_GROUP_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>;
+<a name="l00344"></a>00344 <span class="keywordflow">case</span> CPL_FRAME_GROUP_RAW: <span class="keywordflow">return</span> CPL_FRAME_GROUP_RAW_ID;
+<a name="l00345"></a>00345 <span class="keywordflow">case</span> CPL_FRAME_GROUP_CALIB: <span class="keywordflow">return</span> CPL_FRAME_GROUP_CALIB_ID;
+<a name="l00346"></a>00346 <span class="keywordflow">case</span> CPL_FRAME_GROUP_PRODUCT: <span class="keywordflow">return</span> CPL_FRAME_GROUP_PRODUCT_ID;
+<a name="l00347"></a>00347 <span class="keywordflow">default</span>:
+<a name="l00348"></a>00348 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame group"</span>;
+<a name="l00349"></a>00349 }
+<a name="l00350"></a>00350 }
+<a name="l00351"></a>00351
+<a name="l00352"></a>00352 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00358"></a>00358 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00359"></a>00359 <span class="keyword">const</span> <span class="keywordtype">char</span> *
+<a name="l00360"></a>00360 sinfo_tostring_cpl_frame_level(cpl_frame_level fl)
+<a name="l00361"></a>00361 {
+<a name="l00362"></a>00362
+<a name="l00363"></a>00363 <span class="keywordflow">switch</span>(fl)
+<a name="l00364"></a>00364 {
+<a name="l00365"></a>00365 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_NONE: <span class="keywordflow">return</span> <span class="stringliteral">"NONE"</span>;
+<a name="l00366"></a>00366 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_TEMPORARY: <span class="keywordflow">return</span> <span class="stringliteral">"TEMPORARY"</span>;
+<a name="l00367"></a>00367 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_INTERMEDIATE:<span class="keywordflow">return</span> <span class="stringliteral">"INTERMEDIATE"</span>;
+<a name="l00368"></a>00368 <span class="keywordflow">case</span> CPL_FRAME_LEVEL_FINAL: <span class="keywordflow">return</span> <span class="stringliteral">"FINAL"</span>;
+<a name="l00369"></a>00369 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized frame level"</span>;
+<a name="l00370"></a>00370 }
+<a name="l00371"></a>00371 }
+<a name="l00372"></a>00372
+<a name="l00373"></a>00373
+<a name="l00374"></a>00374 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00380"></a>00380 <span class="comment">/*----------------------------------------------------------------*/</span>
+<a name="l00381"></a>00381 <span class="keyword">const</span> <span class="keywordtype">char</span> *
+<a name="l00382"></a>00382 sinfo_tostring_cpl_type(cpl_type t)
+<a name="l00383"></a>00383 {
<a name="l00384"></a>00384
-<a name="l00385"></a>00385 <span class="keywordflow">if</span> (!(t & CPL_TYPE_FLAG_ARRAY))
-<a name="l00386"></a>00386 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
-<a name="l00387"></a>00387 {
-<a name="l00388"></a>00388 <span class="keywordflow">case</span> CPL_TYPE_CHAR: <span class="keywordflow">return</span> <span class="stringliteral">"char"</span>; <span class="keywordflow">break</span>;
-<a name="l00389"></a>00389 <span class="keywordflow">case</span> CPL_TYPE_UCHAR: <span class="keywordflow">return</span> <span class="stringliteral">"uchar"</span>; <span class="keywordflow">break</span>;
-<a name="l00390"></a>00390 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">return</span> <span class="stringliteral">"boolean"</span>; <span class="keywordflow">break</span>;
-<a name="l00391"></a>00391 <span class="keywordflow">case</span> CPL_TYPE_INT: <span class="keywordflow">return</span> <span class="stringliteral">"int"</span>; <span class="keywordflow">break</span>;
-<a name="l00392"></a>00392 <span class="keywordflow">case</span> CPL_TYPE_UINT: <span class="keywordflow">return</span> <span class="stringliteral">"uint"</span>; <span class="keywordflow">break</span>;
-<a name="l00393"></a>00393 <span class="keywordflow">case</span> CPL_TYPE_LONG: <span class="keywordflow">return</span> <span class="stringliteral">"long"</span>; <span class="keywordflow">break</span>;
-<a name="l00394"></a>00394 <span class="keywordflow">case</span> CPL_TYPE_ULONG: <span class="keywordflow">return</span> <span class="stringliteral">"ulong"</span>; <span class="keywordflow">break</span>;
-<a name="l00395"></a>00395 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: <span class="keywordflow">return</span> <span class="stringliteral">"float"</span>; <span class="keywordflow">break</span>;
-<a name="l00396"></a>00396 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: <span class="keywordflow">return</span> <span class="stringliteral">"double"</span>; <span class="keywordflow">break</span>;
-<a name="l00397"></a>00397 <span class="keywordflow">case</span> CPL_TYPE_POINTER: <span class="keywordflow">return</span> <span class="stringliteral">"pointer"</span>; <span class="keywordflow">break</span>;
-<a name="l00398"></a>00398 <span class="comment">/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex"; break; */</span>
-<a name="l00399"></a>00399 <span class="keywordflow">case</span> CPL_TYPE_INVALID: <span class="keywordflow">return</span> <span class="stringliteral">"invalid"</span>; <span class="keywordflow">break</span>;
-<a name="l00400"></a>00400 <span class="keywordflow">default</span>:
-<a name="l00401"></a>00401 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized type"</span>;
-<a name="l00402"></a>00402 }
-<a name="l00403"></a>00403 <span class="keywordflow">else</span>
-<a name="l00404"></a>00404 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
-<a name="l00405"></a>00405 {
-<a name="l00406"></a>00406 <span class="keywordflow">case</span> CPL_TYPE_CHAR: <span class="keywordflow">return</span> <span class="stringliteral">"string (char array)"</span>; <span class="keywordflow">break</span>;
-<a name="l00407"></a>00407 <span class="keywordflow">case</span> CPL_TYPE_UCHAR: <span class="keywordflow">return</span> <span class="stringliteral">"uchar array"</span>; <span class="keywordflow">break</span>;
-<a name="l00408"></a>00408 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">return</span> <span class="stringliteral">"boolean array"</span>; <span class="keywordflow">break</span>;
-<a name="l00409"></a>00409 <span class="keywordflow">case</span> CPL_TYPE_INT: <span class="keywordflow">return</span> <span class="stringliteral">"int array"</span>; <span class="keywordflow">break</span>;
-<a name="l00410"></a>00410 <span class="keywordflow">case</span> CPL_TYPE_UINT: <span class="keywordflow">return</span> <span class="stringliteral">"uint array"</span>; <span class="keywordflow">break</span>;
-<a name="l00411"></a>00411 <span class="keywordflow">case</span> CPL_TYPE_LONG: <span class="keywordflow">return</span> <span class="stringliteral">"long array"</span>; <span class="keywordflow">break</span>;
-<a name="l00412"></a>00412 <span class="keywordflow">case</span> CPL_TYPE_ULONG: <span class="keywordflow">return</span> <span class="stringliteral">"ulong array"</span>; <span class="keywordflow">break</span>;
-<a name="l00413"></a>00413 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: <span class="keywordflow">return</span> <span class="stringliteral">"float array"</span>; <span class="keywordflow">break</span>;
-<a name="l00414"></a>00414 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: <span class="keywordflow">return</span> <span class="stringliteral">"double array"</span>; <span class="keywordflow">break</span>;
-<a name="l00415"></a>00415 <span class="keywordflow">case</span> CPL_TYPE_POINTER: <span class="keywordflow">return</span> <span class="stringliteral">"pointer array"</span>; <span class="keywordflow">break</span>;
-<a name="l00416"></a>00416 <span class="comment">/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex array"; break; */</span>
-<a name="l00417"></a>00417 <span class="keywordflow">case</span> CPL_TYPE_INVALID: <span class="keywordflow">return</span> <span class="stringliteral">"invalid (array)"</span>; <span class="keywordflow">break</span>;
-<a name="l00418"></a>00418 <span class="keywordflow">default</span>:
-<a name="l00419"></a>00419 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized type"</span>;
-<a name="l00420"></a>00420 }
-<a name="l00421"></a>00421 }
+<a name="l00385"></a>00385 <span class="comment">/* Note that CPL_TYPE_STRING is shorthand</span>
+<a name="l00386"></a>00386 <span class="comment"> for CPL_TYPE_CHAR | CPL_TYPE_FLAG_ARRAY . */</span>
+<a name="l00387"></a>00387
+<a name="l00388"></a>00388 <span class="keywordflow">if</span> (!(t & CPL_TYPE_FLAG_ARRAY))
+<a name="l00389"></a>00389 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
+<a name="l00390"></a>00390 {
+<a name="l00391"></a>00391 <span class="keywordflow">case</span> CPL_TYPE_CHAR: <span class="keywordflow">return</span> <span class="stringliteral">"char"</span>;
+<a name="l00392"></a>00392 <span class="keywordflow">case</span> CPL_TYPE_UCHAR: <span class="keywordflow">return</span> <span class="stringliteral">"uchar"</span>;
+<a name="l00393"></a>00393 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">return</span> <span class="stringliteral">"boolean"</span>;
+<a name="l00394"></a>00394 <span class="keywordflow">case</span> CPL_TYPE_INT: <span class="keywordflow">return</span> <span class="stringliteral">"int"</span>;
+<a name="l00395"></a>00395 <span class="keywordflow">case</span> CPL_TYPE_UINT: <span class="keywordflow">return</span> <span class="stringliteral">"uint"</span>;
+<a name="l00396"></a>00396 <span class="keywordflow">case</span> CPL_TYPE_LONG: <span class="keywordflow">return</span> <span class="stringliteral">"long"</span>;
+<a name="l00397"></a>00397 <span class="keywordflow">case</span> CPL_TYPE_ULONG: <span class="keywordflow">return</span> <span class="stringliteral">"ulong"</span>;
+<a name="l00398"></a>00398 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: <span class="keywordflow">return</span> <span class="stringliteral">"float"</span>;
+<a name="l00399"></a>00399 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: <span class="keywordflow">return</span> <span class="stringliteral">"double"</span>;
+<a name="l00400"></a>00400 <span class="keywordflow">case</span> CPL_TYPE_POINTER: <span class="keywordflow">return</span> <span class="stringliteral">"pointer"</span>;
+<a name="l00401"></a>00401 <span class="comment">/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex"; */</span>
+<a name="l00402"></a>00402 <span class="keywordflow">case</span> CPL_TYPE_INVALID: <span class="keywordflow">return</span> <span class="stringliteral">"invalid"</span>;
+<a name="l00403"></a>00403 <span class="keywordflow">default</span>:
+<a name="l00404"></a>00404 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized type"</span>;
+<a name="l00405"></a>00405 }
+<a name="l00406"></a>00406 <span class="keywordflow">else</span>
+<a name="l00407"></a>00407 <span class="keywordflow">switch</span>(t & (~CPL_TYPE_FLAG_ARRAY))
+<a name="l00408"></a>00408 {
+<a name="l00409"></a>00409 <span class="keywordflow">case</span> CPL_TYPE_CHAR: <span class="keywordflow">return</span> <span class="stringliteral">"string (char array)"</span>;
+<a name="l00410"></a>00410 <span class="keywordflow">case</span> CPL_TYPE_UCHAR: <span class="keywordflow">return</span> <span class="stringliteral">"uchar array"</span>;
+<a name="l00411"></a>00411 <span class="keywordflow">case</span> CPL_TYPE_BOOL: <span class="keywordflow">return</span> <span class="stringliteral">"boolean array"</span>;
+<a name="l00412"></a>00412 <span class="keywordflow">case</span> CPL_TYPE_INT: <span class="keywordflow">return</span> <span class="stringliteral">"int array"</span>;
+<a name="l00413"></a>00413 <span class="keywordflow">case</span> CPL_TYPE_UINT: <span class="keywordflow">return</span> <span class="stringliteral">"uint array"</span>;
+<a name="l00414"></a>00414 <span class="keywordflow">case</span> CPL_TYPE_LONG: <span class="keywordflow">return</span> <span class="stringliteral">"long array"</span>;
+<a name="l00415"></a>00415 <span class="keywordflow">case</span> CPL_TYPE_ULONG: <span class="keywordflow">return</span> <span class="stringliteral">"ulong array"</span>;
+<a name="l00416"></a>00416 <span class="keywordflow">case</span> CPL_TYPE_FLOAT: <span class="keywordflow">return</span> <span class="stringliteral">"float array"</span>;
+<a name="l00417"></a>00417 <span class="keywordflow">case</span> CPL_TYPE_DOUBLE: <span class="keywordflow">return</span> <span class="stringliteral">"double array"</span>;
+<a name="l00418"></a>00418 <span class="keywordflow">case</span> CPL_TYPE_POINTER: <span class="keywordflow">return</span> <span class="stringliteral">"pointer array"</span>;
+<a name="l00419"></a>00419 <span class="comment">/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex array"; */</span>
+<a name="l00420"></a>00420 <span class="keywordflow">case</span> CPL_TYPE_INVALID: <span class="keywordflow">return</span> <span class="stringliteral">"invalid (array)"</span>;
+<a name="l00421"></a>00421 <span class="keywordflow">default</span>:
+<a name="l00422"></a>00422 <span class="keywordflow">return</span> <span class="stringliteral">"unrecognized type"</span>;
+<a name="l00423"></a>00423 }
+<a name="l00424"></a>00424 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__dump_8h_source.html b/html/sinfo__dump_8h_source.html
index 0f37309..e7b2ef7 100644
--- a/html/sinfo__dump_8h_source.html
+++ b/html/sinfo__dump_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2011/11/23 17:29:09 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Log: sinfo_dump.h,v $</span>
<a name="l00026"></a>00026 <span class="comment"> * Revision 1.6 2011/11/23 17:29:09 amodigli</span>
<a name="l00027"></a>00027 <span class="comment"> * fix warning with cpl6</span>
@@ -93,7 +93,7 @@
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_DUMP_H */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__error_8h_source.html b/html/sinfo__error_8h_source.html
index 70fec27..18fa41e 100644
--- a/html/sinfo__error_8h_source.html
+++ b/html/sinfo__error_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/10/26 09:42:36 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Log: sinfo_error.h,v $</span>
<a name="l00026"></a>00026 <span class="comment"> * Revision 1.13 2007/10/26 09:42:36 amodigli</span>
<a name="l00027"></a>00027 <span class="comment"> * removed check on CPL_VERSION_CODE (now works only for CPL4)</span>
@@ -132,7 +132,7 @@
<a name="l00126"></a>00126
<a name="l00410"></a>00410 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fft__base_8c_source.html b/html/sinfo__fft__base_8c_source.html
index 64789f4..4ad38bf 100644
--- a/html/sinfo__fft__base_8c_source.html
+++ b/html/sinfo__fft__base_8c_source.html
@@ -184,7 +184,7 @@
<a name="l00240"></a>00240 }
<a name="l00241"></a>00241
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fft__base_8h_source.html b/html/sinfo__fft__base_8h_source.html
index 24c50e3..8b7d8e1 100644
--- a/html/sinfo__fft__base_8h_source.html
+++ b/html/sinfo__fft__base_8h_source.html
@@ -71,7 +71,7 @@
<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
<a name="l00118"></a>00118
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__file__handling_8c_source.html b/html/sinfo__file__handling_8c_source.html
index a6c0720..aa294f2 100644
--- a/html/sinfo__file__handling_8c_source.html
+++ b/html/sinfo__file__handling_8c_source.html
@@ -59,7 +59,7 @@
<a name="l00066"></a>00066 <span class="keywordflow">return</span> exists;
<a name="l00067"></a>00067 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__file__handling_8h_source.html b/html/sinfo__file__handling_8h_source.html
index faa78f8..f4d8b4e 100644
--- a/html/sinfo__file__handling_8h_source.html
+++ b/html/sinfo__file__handling_8h_source.html
@@ -37,7 +37,7 @@
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__finddist__cfg_8c_source.html b/html/sinfo__finddist__cfg_8c_source.html
index 729d79b..133911e 100644
--- a/html/sinfo__finddist__cfg_8c_source.html
+++ b/html/sinfo__finddist__cfg_8c_source.html
@@ -61,7 +61,7 @@
<a name="l00071"></a>00071 return ;
<a name="l00072"></a>00072 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__finddist__cfg_8h_source.html b/html/sinfo__finddist__cfg_8h_source.html
index 9207e08..81211d4 100644
--- a/html/sinfo__finddist__cfg_8h_source.html
+++ b/html/sinfo__finddist__cfg_8h_source.html
@@ -151,7 +151,7 @@
<a name="l00154"></a>00154
<a name="l00155"></a>00155 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__finddist__ini_8h_source.html b/html/sinfo__finddist__ini_8h_source.html
index d6daeca..b4be774 100644
--- a/html/sinfo__finddist__ini_8h_source.html
+++ b/html/sinfo__finddist__ini_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00070"></a>00070
<a name="l00071"></a>00071 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__finddist__ini__by__cpl_8c_source.html b/html/sinfo__finddist__ini__by__cpl_8c_source.html
index 5ca1c54..2c73d6d 100644
--- a/html/sinfo__finddist__ini__by__cpl_8c_source.html
+++ b/html/sinfo__finddist__ini__by__cpl_8c_source.html
@@ -452,7 +452,7 @@
<a name="l00522"></a>00522
<a name="l00523"></a>00523 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__finddist__ini__by__cpl_8h_source.html b/html/sinfo__finddist__ini__by__cpl_8h_source.html
index da5e03b..51a3e46 100644
--- a/html/sinfo__finddist__ini__by__cpl_8h_source.html
+++ b/html/sinfo__finddist__ini__by__cpl_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fit_8c_source.html b/html/sinfo__fit_8c_source.html
index 771e3c6..91f5680 100644
--- a/html/sinfo__fit_8c_source.html
+++ b/html/sinfo__fit_8c_source.html
@@ -381,7 +381,7 @@
<a name="l00393"></a>00393
<a name="l00394"></a>00394
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fit_8h_source.html b/html/sinfo__fit_8h_source.html
index 6912e57..a98269a 100644
--- a/html/sinfo__fit_8h_source.html
+++ b/html/sinfo__fit_8h_source.html
@@ -47,7 +47,7 @@
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fit__curve_8c_source.html b/html/sinfo__fit__curve_8c_source.html
index f388e59..507b4ec 100644
--- a/html/sinfo__fit__curve_8c_source.html
+++ b/html/sinfo__fit__curve_8c_source.html
@@ -139,7 +139,7 @@
<a name="l00159"></a>00159
<a name="l00160"></a>00160
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__fit__curve_8h_source.html b/html/sinfo__fit__curve_8h_source.html
index c00a4ab..2df7b08 100644
--- a/html/sinfo__fit__curve_8h_source.html
+++ b/html/sinfo__fit__curve_8h_source.html
@@ -66,7 +66,7 @@
<a name="l00077"></a>00077
<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__cfg_8c_source.html b/html/sinfo__flat__cfg_8c_source.html
index ad7be19..d10cf54 100644
--- a/html/sinfo__flat__cfg_8c_source.html
+++ b/html/sinfo__flat__cfg_8c_source.html
@@ -63,7 +63,7 @@
<a name="l00075"></a>00075 return ;
<a name="l00076"></a>00076 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__cfg_8h_source.html b/html/sinfo__flat__cfg_8h_source.html
index 9f742b9..b3f2ed6 100644
--- a/html/sinfo__flat__cfg_8h_source.html
+++ b/html/sinfo__flat__cfg_8h_source.html
@@ -153,7 +153,7 @@
<a name="l00157"></a>00157
<a name="l00158"></a>00158 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__ini_8c_source.html b/html/sinfo__flat__ini_8c_source.html
index 2dd3e7b..13c6690 100644
--- a/html/sinfo__flat__ini_8c_source.html
+++ b/html/sinfo__flat__ini_8c_source.html
@@ -555,7 +555,7 @@
<a name="l00563"></a>00563
<a name="l00564"></a>00564
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__ini_8h_source.html b/html/sinfo__flat__ini_8h_source.html
index ee253c4..a65286d 100644
--- a/html/sinfo__flat__ini_8h_source.html
+++ b/html/sinfo__flat__ini_8h_source.html
@@ -57,7 +57,7 @@
<a name="l00056"></a>00056
<a name="l00057"></a>00057 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__ini__by__cpl_8c_source.html b/html/sinfo__flat__ini__by__cpl_8c_source.html
index a82c316..ce1b545 100644
--- a/html/sinfo__flat__ini__by__cpl_8c_source.html
+++ b/html/sinfo__flat__ini__by__cpl_8c_source.html
@@ -461,7 +461,7 @@
<a name="l00530"></a>00530 return ;
<a name="l00531"></a>00531 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__flat__ini__by__cpl_8h_source.html b/html/sinfo__flat__ini__by__cpl_8h_source.html
index b23c2fb..fc1fb66 100644
--- a/html/sinfo__flat__ini__by__cpl_8h_source.html
+++ b/html/sinfo__flat__ini__by__cpl_8h_source.html
@@ -62,7 +62,7 @@
<a name="l00070"></a>00070
<a name="l00071"></a>00071 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus_8c_source.html b/html/sinfo__focus_8c_source.html
index 956197f..2d48fcf 100644
--- a/html/sinfo__focus_8c_source.html
+++ b/html/sinfo__focus_8c_source.html
@@ -882,14 +882,14 @@
<a name="l01053"></a>01053 }
<a name="l01054"></a>01054
<a name="l01055"></a>01055 <span class="keywordflow">if</span> ( ( llx + 2*halfbox_x) < ilx-1 ) {
-<a name="l01056"></a>01056 halfbox_x=halfbox_x;
+<a name="l01056"></a>01056 <span class="comment">//halfbox_x=halfbox_x;</span>
<a name="l01057"></a>01057 } <span class="keywordflow">else</span> {
<a name="l01058"></a>01058 halfbox_x=(int) (ilx-2-llx)/2;
<a name="l01059"></a>01059 check++;
<a name="l01060"></a>01060 }
<a name="l01061"></a>01061
<a name="l01062"></a>01062 <span class="keywordflow">if</span> ( ( lly + 2*halfbox_y) < ily-1 ) {
-<a name="l01063"></a>01063 halfbox_y= halfbox_y;
+<a name="l01063"></a>01063 <span class="comment">//halfbox_y= halfbox_y;</span>
<a name="l01064"></a>01064 } <span class="keywordflow">else</span> {
<a name="l01065"></a>01065 halfbox_y=(int) (ily-2-lly)/2;
<a name="l01066"></a>01066 check++;
@@ -1366,7 +1366,7 @@
<a name="l01576"></a>01576
<a name="l01577"></a>01577 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus_8h_source.html b/html/sinfo__focus_8h_source.html
index ffe4c3d..b760f26 100644
--- a/html/sinfo__focus_8h_source.html
+++ b/html/sinfo__focus_8h_source.html
@@ -101,7 +101,7 @@
<a name="l00236"></a>00236
<a name="l00237"></a>00237 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__cfg_8c_source.html b/html/sinfo__focus__cfg_8c_source.html
index 6ec3e72..175590c 100644
--- a/html/sinfo__focus__cfg_8c_source.html
+++ b/html/sinfo__focus__cfg_8c_source.html
@@ -62,7 +62,7 @@
<a name="l00072"></a>00072 return ;
<a name="l00073"></a>00073 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__cfg_8h_source.html b/html/sinfo__focus__cfg_8h_source.html
index 443bbf3..f6dfe10 100644
--- a/html/sinfo__focus__cfg_8h_source.html
+++ b/html/sinfo__focus__cfg_8h_source.html
@@ -130,7 +130,7 @@
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__determination__config_8c_source.html b/html/sinfo__focus__determination__config_8c_source.html
index 92f2832..875aea4 100644
--- a/html/sinfo__focus__determination__config_8c_source.html
+++ b/html/sinfo__focus__determination__config_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
@@ -299,7 +299,7 @@
<a name="l00297"></a>00297
<a name="l00298"></a>00298 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__determination__config_8h_source.html b/html/sinfo__focus__determination__config_8h_source.html
index bf76755..3b8dbd1 100644
--- a/html/sinfo__focus__determination__config_8h_source.html
+++ b/html/sinfo__focus__determination__config_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -45,7 +45,7 @@
<a name="l00035"></a>00035 <span class="preprocessor">#include "sinfo_hidden.h"</span>
<a name="l00036"></a>00036 <span class="keywordtype">void</span> sinfo_focus_determination_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__ini_8h_source.html b/html/sinfo__focus__ini_8h_source.html
index f9d6d20..2d0a518 100644
--- a/html/sinfo__focus__ini_8h_source.html
+++ b/html/sinfo__focus__ini_8h_source.html
@@ -58,7 +58,7 @@
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__ini__by__cpl_8c_source.html b/html/sinfo__focus__ini__by__cpl_8c_source.html
index 15526a9..f6c43db 100644
--- a/html/sinfo__focus__ini__by__cpl_8c_source.html
+++ b/html/sinfo__focus__ini__by__cpl_8c_source.html
@@ -282,7 +282,7 @@
<a name="l00324"></a>00324 <span class="keywordflow">return</span>;
<a name="l00325"></a>00325 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__focus__ini__by__cpl_8h_source.html b/html/sinfo__focus__ini__by__cpl_8h_source.html
index 51a0473..4f8b790 100644
--- a/html/sinfo__focus__ini__by__cpl_8h_source.html
+++ b/html/sinfo__focus__ini__by__cpl_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__function__1d_8c_source.html b/html/sinfo__function__1d_8c_source.html
index f6a1ebd..e02f4a9 100644
--- a/html/sinfo__function__1d_8c_source.html
+++ b/html/sinfo__function__1d_8c_source.html
@@ -717,7 +717,7 @@
<a name="l00993"></a>00993 <span class="keywordflow">return</span> xcorr_max ;
<a name="l00994"></a>00994 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__function__1d_8h_source.html b/html/sinfo__function__1d_8h_source.html
index 8d77537..f0acf09 100644
--- a/html/sinfo__function__1d_8h_source.html
+++ b/html/sinfo__function__1d_8h_source.html
@@ -147,7 +147,7 @@
<a name="l00382"></a>00382
<a name="l00383"></a>00383 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__functions_8h_source.html b/html/sinfo__functions_8h_source.html
index 0114d00..8419b97 100644
--- a/html/sinfo__functions_8h_source.html
+++ b/html/sinfo__functions_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/03/04 10:17:38 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef SINFO_FUNCTIONS_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_FUNCTIONS_H</span>
@@ -282,7 +282,7 @@
<a name="l00272"></a>00272
<a name="l00273"></a>00273 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__general__config_8c_source.html b/html/sinfo__general__config_8c_source.html
index 513b095..4731a91 100644
--- a/html/sinfo__general__config_8c_source.html
+++ b/html/sinfo__general__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -100,7 +100,7 @@
<a name="l00108"></a>00108
<a name="l00109"></a>00109 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__general__config_8h_source.html b/html/sinfo__general__config_8h_source.html
index d9a6d81..9f3d218 100644
--- a/html/sinfo__general__config_8h_source.html
+++ b/html/sinfo__general__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__globals_8c_source.html b/html/sinfo__globals_8c_source.html
index b948e70..ed3d7bb 100644
--- a/html/sinfo__globals_8c_source.html
+++ b/html/sinfo__globals_8c_source.html
@@ -178,7 +178,7 @@
<a name="l00250"></a>00250 }
<a name="l00251"></a>00251
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__globals_8h_source.html b/html/sinfo__globals_8h_source.html
index eca3a82..dfb7684 100644
--- a/html/sinfo__globals_8h_source.html
+++ b/html/sinfo__globals_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/09 15:58:00 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_GLOBALS_H</span>
@@ -189,7 +189,7 @@
<a name="l00179"></a>00179
<a name="l00180"></a>00180 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__hidden_8h_source.html b/html/sinfo__hidden_8h_source.html
index 2727ee6..e54ae86 100644
--- a/html/sinfo__hidden_8h_source.html
+++ b/html/sinfo__hidden_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2010/02/12 17:56:35 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -121,7 +121,7 @@
<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define EFFICIENCY_FILENAME "out_efficiency.fits"</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__image__ops_8c_source.html b/html/sinfo__image__ops_8c_source.html
index c0dd3c7..5dccd3c 100644
--- a/html/sinfo__image__ops_8c_source.html
+++ b/html/sinfo__image__ops_8c_source.html
@@ -1331,7 +1331,7 @@
<a name="l01497"></a>01497 mly=cpl_image_get_size_y(mask);
<a name="l01498"></a>01498 pmdata=cpl_image_get_data_float(mask);
<a name="l01499"></a>01499
-<a name="l01500"></a>01500 <span class="keywordflow">if</span> ( mlx != ilx || mly != mly )
+<a name="l01500"></a>01500 <span class="keywordflow">if</span> ( mlx != ilx || mly != ily )
<a name="l01501"></a>01501 {
<a name="l01502"></a>01502 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"images not compatible !"</span>) ;
<a name="l01503"></a>01503 <span class="keywordflow">return</span> NULL ;
@@ -3110,7 +3110,7 @@
<a name="l03514"></a>03514
<a name="l03515"></a>03515 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__image__ops_8h_source.html b/html/sinfo__image__ops_8h_source.html
index a9b1229..c37ec08 100644
--- a/html/sinfo__image__ops_8h_source.html
+++ b/html/sinfo__image__ops_8h_source.html
@@ -188,7 +188,7 @@
<a name="l00450"></a>00450
<a name="l00451"></a>00451 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__img__noise_8c_source.html b/html/sinfo__img__noise_8c_source.html
index 573a270..aa11188 100644
--- a/html/sinfo__img__noise_8c_source.html
+++ b/html/sinfo__img__noise_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/09/11 10:00:24 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> * $Log: sinfo_img_noise.c,v $</span>
<a name="l00027"></a>00027 <span class="comment"> * Revision 1.3 2009/09/11 10:00:24 amodigli</span>
<a name="l00028"></a>00028 <span class="comment"> * put back include of irplib_detmon.h</span>
@@ -133,7 +133,7 @@
<a name="l00127"></a>00127 }
<a name="l00128"></a>00128
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ipow_8c_source.html b/html/sinfo__ipow_8c_source.html
index 569e5f0..236ff7f 100644
--- a/html/sinfo__ipow_8c_source.html
+++ b/html/sinfo__ipow_8c_source.html
@@ -76,7 +76,7 @@
<a name="l00087"></a>00087
<a name="l00088"></a>00088
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ipow_8h_source.html b/html/sinfo__ipow_8h_source.html
index c4d47a6..8ffa067 100644
--- a/html/sinfo__ipow_8h_source.html
+++ b/html/sinfo__ipow_8h_source.html
@@ -51,7 +51,7 @@
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__irplib__cpl__wrp_8h_source.html b/html/sinfo__irplib__cpl__wrp_8h_source.html
index cce6882..d23210a 100644
--- a/html/sinfo__irplib__cpl__wrp_8h_source.html
+++ b/html/sinfo__irplib__cpl__wrp_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: kmirny $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/10/20 14:32:56 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef SINFO_IRPLIB_CPL_WRP_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_IRPLIB_CPL_WRP_H_</span>
@@ -63,7 +63,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__key__names_8h_source.html b/html/sinfo__key__names_8h_source.html
index 3fde9ad..8af6d10 100644
--- a/html/sinfo__key__names_8h_source.html
+++ b/html/sinfo__key__names_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_KEY_NAMES_H</span>
@@ -237,7 +237,7 @@
<a name="l00227"></a>00227
<a name="l00228"></a>00228 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__cfg_8c_source.html b/html/sinfo__lamp__cfg_8c_source.html
index fa34b81..c399a03 100644
--- a/html/sinfo__lamp__cfg_8c_source.html
+++ b/html/sinfo__lamp__cfg_8c_source.html
@@ -62,7 +62,7 @@
<a name="l00071"></a>00071 return ;
<a name="l00072"></a>00072 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__cfg_8h_source.html b/html/sinfo__lamp__cfg_8h_source.html
index 34cc304..8df7d26 100644
--- a/html/sinfo__lamp__cfg_8h_source.html
+++ b/html/sinfo__lamp__cfg_8h_source.html
@@ -89,7 +89,7 @@
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__flats__config_8c_source.html b/html/sinfo__lamp__flats__config_8c_source.html
index 12c80b3..8719240 100644
--- a/html/sinfo__lamp__flats__config_8c_source.html
+++ b/html/sinfo__lamp__flats__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -371,7 +371,7 @@
<a name="l00368"></a>00368
<a name="l00369"></a>00369 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__flats__config_8h_source.html b/html/sinfo__lamp__flats__config_8h_source.html
index b7e7627..e870966 100644
--- a/html/sinfo__lamp__flats__config_8h_source.html
+++ b/html/sinfo__lamp__flats__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -48,7 +48,7 @@
<a name="l00038"></a>00038 sinfo_lamp_flats_config_add(cpl_parameterlist *list);
<a name="l00039"></a>00039
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__flats__hidden__config_8c_source.html b/html/sinfo__lamp__flats__hidden__config_8c_source.html
index 3ee558f..c184a94 100644
--- a/html/sinfo__lamp__flats__hidden__config_8c_source.html
+++ b/html/sinfo__lamp__flats__hidden__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
@@ -85,7 +85,7 @@
<a name="l00083"></a>00083
<a name="l00084"></a>00084 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__flats__hidden__config_8h_source.html b/html/sinfo__lamp__flats__hidden__config_8h_source.html
index a3f0385..e8bae35 100644
--- a/html/sinfo__lamp__flats__hidden__config_8h_source.html
+++ b/html/sinfo__lamp__flats__hidden__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -48,7 +48,7 @@
<a name="l00038"></a>00038 sinfoni_lamp_flats_hidden_config_add(cpl_parameterlist *list);
<a name="l00039"></a>00039
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__ini_8c_source.html b/html/sinfo__lamp__ini_8c_source.html
index ef383d7..f137435 100644
--- a/html/sinfo__lamp__ini_8c_source.html
+++ b/html/sinfo__lamp__ini_8c_source.html
@@ -357,7 +357,7 @@
<a name="l00380"></a>00380 }
<a name="l00381"></a>00381
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__ini_8h_source.html b/html/sinfo__lamp__ini_8h_source.html
index a58aeb2..4c44b09 100644
--- a/html/sinfo__lamp__ini_8h_source.html
+++ b/html/sinfo__lamp__ini_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__ini__by__cpl_8c_source.html b/html/sinfo__lamp__ini__by__cpl_8c_source.html
index cdc8851..9bfa497 100644
--- a/html/sinfo__lamp__ini__by__cpl_8c_source.html
+++ b/html/sinfo__lamp__ini__by__cpl_8c_source.html
@@ -201,7 +201,7 @@
<a name="l00238"></a>00238
<a name="l00239"></a>00239 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__ini__by__cpl_8h_source.html b/html/sinfo__lamp__ini__by__cpl_8h_source.html
index e849a21..5825576 100644
--- a/html/sinfo__lamp__ini__by__cpl_8h_source.html
+++ b/html/sinfo__lamp__ini__by__cpl_8h_source.html
@@ -54,7 +54,7 @@
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__spec__config_8c_source.html b/html/sinfo__lamp__spec__config_8c_source.html
index 7dc4c5d..c11a642 100644
--- a/html/sinfo__lamp__spec__config_8c_source.html
+++ b/html/sinfo__lamp__spec__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/02 08:42:20 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -127,7 +127,7 @@
<a name="l00124"></a>00124
<a name="l00125"></a>00125 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__lamp__spec__config_8h_source.html b/html/sinfo__lamp__spec__config_8h_source.html
index 0b3d370..a20c2ca 100644
--- a/html/sinfo__lamp__spec__config_8h_source.html
+++ b/html/sinfo__lamp__spec__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -44,7 +44,7 @@
<a name="l00034"></a>00034 <span class="keywordtype">void</span>
<a name="l00035"></a>00035 sinfo_lamp_spec_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__local__types_8h_source.html b/html/sinfo__local__types_8h_source.html
index 60d1dea..8f0b21e 100644
--- a/html/sinfo__local__types_8h_source.html
+++ b/html/sinfo__local__types_8h_source.html
@@ -140,7 +140,7 @@
<a name="l00130"></a>00130
<a name="l00131"></a>00131 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__matrix_8c_source.html b/html/sinfo__matrix_8c_source.html
index d894394..8a84248 100644
--- a/html/sinfo__matrix_8c_source.html
+++ b/html/sinfo__matrix_8c_source.html
@@ -322,7 +322,7 @@
<a name="l00422"></a>00422 }
<a name="l00423"></a>00423
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__matrix_8h_source.html b/html/sinfo__matrix_8h_source.html
index 3285688..9d705b0 100644
--- a/html/sinfo__matrix_8h_source.html
+++ b/html/sinfo__matrix_8h_source.html
@@ -116,7 +116,7 @@
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__median_8c_source.html b/html/sinfo__median_8c_source.html
index 9242415..6e1660b 100644
--- a/html/sinfo__median_8c_source.html
+++ b/html/sinfo__median_8c_source.html
@@ -240,7 +240,7 @@
<a name="l00372"></a>00372 }
<a name="l00373"></a>00373
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__median_8h_source.html b/html/sinfo__median_8h_source.html
index af430e1..6b218da 100644
--- a/html/sinfo__median_8h_source.html
+++ b/html/sinfo__median_8h_source.html
@@ -96,7 +96,7 @@
<a name="l00220"></a>00220
<a name="l00221"></a>00221 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__merge_8c_source.html b/html/sinfo__merge_8c_source.html
index b307be6..0f244a4 100644
--- a/html/sinfo__merge_8c_source.html
+++ b/html/sinfo__merge_8c_source.html
@@ -978,7 +978,7 @@
<a name="l01046"></a>01046 }
<a name="l01048"></a>01048 <span class="comment">/*___oOo___*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__merge_8h_source.html b/html/sinfo__merge_8h_source.html
index d72a73f..8b69252 100644
--- a/html/sinfo__merge_8h_source.html
+++ b/html/sinfo__merge_8h_source.html
@@ -86,7 +86,7 @@
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__msg_8c_source.html b/html/sinfo__msg_8c_source.html
index 29aa342..b757669 100644
--- a/html/sinfo__msg_8c_source.html
+++ b/html/sinfo__msg_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2008/02/12 14:57:39 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -240,7 +240,7 @@
<a name="l00325"></a>00325 }
<a name="l00326"></a>00326
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__msg_8h_source.html b/html/sinfo__msg_8h_source.html
index cbcfad0..b12b520 100644
--- a/html/sinfo__msg_8h_source.html
+++ b/html/sinfo__msg_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/11/21 11:56:10 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef SINFO_MSG_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_MSG_H</span>
@@ -112,7 +112,7 @@
<a name="l00143"></a>00143 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_MSG_H */</span>
<a name="l00144"></a>00144
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__add__bp__map_8c_source.html b/html/sinfo__new__add__bp__map_8c_source.html
index d386b6d..86a5e97 100644
--- a/html/sinfo__new__add__bp__map_8c_source.html
+++ b/html/sinfo__new__add__bp__map_8c_source.html
@@ -279,7 +279,7 @@
<a name="l00286"></a>00286
<a name="l00287"></a>00287
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__add__bp__map_8h_source.html b/html/sinfo__new__add__bp__map_8h_source.html
index 34f8be0..c540507 100644
--- a/html/sinfo__new__add__bp__map_8h_source.html
+++ b/html/sinfo__new__add__bp__map_8h_source.html
@@ -64,7 +64,7 @@
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__bezier_8c_source.html b/html/sinfo__new__bezier_8c_source.html
index 79df627..63278fb 100644
--- a/html/sinfo__new__bezier_8c_source.html
+++ b/html/sinfo__new__bezier_8c_source.html
@@ -1533,7 +1533,7 @@
<a name="l01630"></a>01630 }
<a name="l01631"></a>01631
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__bezier_8h_source.html b/html/sinfo__new__bezier_8h_source.html
index c75a2f8..3c569e8 100644
--- a/html/sinfo__new__bezier_8h_source.html
+++ b/html/sinfo__new__bezier_8h_source.html
@@ -192,7 +192,7 @@
<a name="l00182"></a>00182 <span class="preprocessor">#endif </span>
<a name="l00184"></a>00184 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cube__ops_8c_source.html b/html/sinfo__new__cube__ops_8c_source.html
index dc12108..15f3d43 100644
--- a/html/sinfo__new__cube__ops_8c_source.html
+++ b/html/sinfo__new__cube__ops_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>sinfo_new_cube_ops.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*$Id: sinfo_new_cube_ops.c,v 1.44 2012/03/03 09:50:51 amodigli Exp $</span>
+<h1>sinfo_new_cube_ops.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*$Id: sinfo_new_cube_ops.c,v 1.45 2012/09/21 10:55:38 amodigli Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> * This file is part of the ESO SINFONI Pipeline</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2004,2005 European Southern Observatory</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
@@ -37,9 +37,9 @@
<a name="l00027"></a>00027 <span class="comment">*/</span>
<a name="l00028"></a>00028 <span class="comment">/*</span>
<a name="l00029"></a>00029 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00030"></a>00030 <span class="comment"> * $Date: 2012/03/03 09:50:51 $</span>
-<a name="l00031"></a>00031 <span class="comment"> * $Revision: 1.44 $</span>
-<a name="l00032"></a>00032 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00030"></a>00030 <span class="comment"> * $Date: 2012/09/21 10:55:38 $</span>
+<a name="l00031"></a>00031 <span class="comment"> * $Revision: 1.45 $</span>
+<a name="l00032"></a>00032 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00033"></a>00033 <span class="comment"> */</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment">/************************************************************************</span>
@@ -399,18 +399,18 @@
<a name="l00413"></a>00413 {
<a name="l00414"></a>00414 <span class="keywordflow">case</span> <span class="charliteral">'+'</span>:
<a name="l00415"></a>00415 <span class="keywordflow">return</span> sinfo_new_cube_add(cube1, cube2) ;
-<a name="l00416"></a>00416 break ;
+<a name="l00416"></a>00416
<a name="l00417"></a>00417 <span class="keywordflow">case</span> <span class="charliteral">'-'</span>:
<a name="l00418"></a>00418 <span class="keywordflow">return</span> sinfo_new_cube_sub(cube1, cube2) ;
-<a name="l00419"></a>00419 break ;
+<a name="l00419"></a>00419
<a name="l00420"></a>00420
<a name="l00421"></a>00421 <span class="keywordflow">case</span> <span class="charliteral">'*'</span>:
<a name="l00422"></a>00422 <span class="keywordflow">return</span> sinfo_new_cube_mul(cube1, cube2) ;
-<a name="l00423"></a>00423 break ;
+<a name="l00423"></a>00423
<a name="l00424"></a>00424
<a name="l00425"></a>00425 <span class="keywordflow">case</span> <span class="charliteral">'/'</span>:
<a name="l00426"></a>00426 <span class="keywordflow">return</span> sinfo_new_cube_div(cube1, cube2) ;
-<a name="l00427"></a>00427 break ;
+<a name="l00427"></a>00427
<a name="l00428"></a>00428
<a name="l00429"></a>00429 <span class="keywordflow">default</span>:
<a name="l00430"></a>00430 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"illegal requested operation: aborting cube arithmetic"</span>) ;
@@ -3569,7 +3569,7 @@
<a name="l03861"></a>03861 <span class="keywordtype">char</span> * kernel_type)
<a name="l03862"></a>03862 {
<a name="l03863"></a>03863 cpl_imagelist * cube ;
-<a name="l03864"></a>03864 <span class="keywordtype">int</span> i, j, k, l ;
+<a name="l03864"></a>03864 <span class="keywordtype">int</span> i=0, j=0, k=0, l=0 ;
<a name="l03865"></a>03865 <span class="keywordtype">int</span> lx_out, ly_out ;
<a name="l03866"></a>03866 <span class="keywordtype">double</span> cur ;
<a name="l03867"></a>03867 <span class="keywordtype">double</span> * invert_transform ;
@@ -3631,7 +3631,7 @@
<a name="l03923"></a>03923 ly_out = (int) ily*yscale ;
<a name="l03924"></a>03924
<a name="l03925"></a>03925 cube=cpl_imagelist_new();
-<a name="l03926"></a>03926 <span class="keywordflow">for</span> ( l = 0 ; l < inp ; i++ ) {
+<a name="l03926"></a>03926 <span class="keywordflow">for</span> ( l = 0 ; l < inp ; l++ ) {
<a name="l03927"></a>03927 in_img = cpl_image_new(ilx,ily,CPL_TYPE_FLOAT);
<a name="l03928"></a>03928 cpl_imagelist_set(cube,in_img,l);
<a name="l03929"></a>03929 }
@@ -5005,7 +5005,7 @@
<a name="l05363"></a>05363
<a name="l05364"></a>05364
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cube__ops_8h_source.html b/html/sinfo__new__cube__ops_8h_source.html
index ed0a715..922cb7c 100644
--- a/html/sinfo__new__cube__ops_8h_source.html
+++ b/html/sinfo__new__cube__ops_8h_source.html
@@ -309,7 +309,7 @@
<a name="l00860"></a>00860 <span class="preprocessor">#endif </span>
<a name="l00864"></a>00864 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cubes__build_8c_source.html b/html/sinfo__new__cubes__build_8c_source.html
index 01aeea9..48aaed8 100644
--- a/html/sinfo__new__cubes__build_8c_source.html
+++ b/html/sinfo__new__cubes__build_8c_source.html
@@ -922,7 +922,7 @@
<a name="l00920"></a>00920 <span class="comment">}</span>
<a name="l00921"></a>00921 <span class="comment">*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cubes__build_8h_source.html b/html/sinfo__new__cubes__build_8h_source.html
index 84dc9bc..f1ed0a7 100644
--- a/html/sinfo__new__cubes__build_8h_source.html
+++ b/html/sinfo__new__cubes__build_8h_source.html
@@ -84,7 +84,7 @@
<a name="l00074"></a>00074 <span class="preprocessor">#endif </span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cubes__coadd_8c_source.html b/html/sinfo__new__cubes__coadd_8c_source.html
index 460b07c..20d6c9d 100644
--- a/html/sinfo__new__cubes__coadd_8c_source.html
+++ b/html/sinfo__new__cubes__coadd_8c_source.html
@@ -642,7 +642,7 @@
<a name="l00640"></a>00640 }
<a name="l00641"></a>00641
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__cubes__coadd_8h_source.html b/html/sinfo__new__cubes__coadd_8h_source.html
index 214ea8a..2e755f9 100644
--- a/html/sinfo__new__cubes__coadd_8h_source.html
+++ b/html/sinfo__new__cubes__coadd_8h_source.html
@@ -79,7 +79,7 @@
<a name="l00069"></a>00069 <span class="preprocessor">#endif </span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__dark_8c_source.html b/html/sinfo__new__dark_8c_source.html
index 063dfc8..cf736c5 100644
--- a/html/sinfo__new__dark_8c_source.html
+++ b/html/sinfo__new__dark_8c_source.html
@@ -718,7 +718,7 @@
<a name="l00729"></a>00729
<a name="l00730"></a>00730 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__dark_8h_source.html b/html/sinfo__new__dark_8h_source.html
index c2f7d2f..64a12b1 100644
--- a/html/sinfo__new__dark_8h_source.html
+++ b/html/sinfo__new__dark_8h_source.html
@@ -73,7 +73,7 @@
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__find__distortions_8c_source.html b/html/sinfo__new__find__distortions_8c_source.html
index 72d0768..bc75409 100644
--- a/html/sinfo__new__find__distortions_8c_source.html
+++ b/html/sinfo__new__find__distortions_8c_source.html
@@ -759,7 +759,7 @@
<a name="l00757"></a>00757
<a name="l00758"></a>00758 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__find__distortions_8h_source.html b/html/sinfo__new__find__distortions_8h_source.html
index 4e1d50b..cefeb4b 100644
--- a/html/sinfo__new__find__distortions_8h_source.html
+++ b/html/sinfo__new__find__distortions_8h_source.html
@@ -74,7 +74,7 @@
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00065"></a>00065 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__lamp__flats_8c_source.html b/html/sinfo__new__lamp__flats_8c_source.html
index ef66bf1..38be0af 100644
--- a/html/sinfo__new__lamp__flats_8c_source.html
+++ b/html/sinfo__new__lamp__flats_8c_source.html
@@ -1010,7 +1010,7 @@
<a name="l01007"></a>01007 }
<a name="l01008"></a>01008
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__lamp__flats_8h_source.html b/html/sinfo__new__lamp__flats_8h_source.html
index 9938759..7badb5e 100644
--- a/html/sinfo__new__lamp__flats_8h_source.html
+++ b/html/sinfo__new__lamp__flats_8h_source.html
@@ -86,7 +86,7 @@
<a name="l00076"></a>00076 <span class="preprocessor"></span>
<a name="l00077"></a>00077 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__nst_8c_source.html b/html/sinfo__new__nst_8c_source.html
index d81b9ce..be1fd76 100644
--- a/html/sinfo__new__nst_8c_source.html
+++ b/html/sinfo__new__nst_8c_source.html
@@ -391,7 +391,7 @@
<a name="l00388"></a>00388 }
<a name="l00389"></a>00389
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__nst_8h_source.html b/html/sinfo__new__nst_8h_source.html
index 20b7eea..8a28afd 100644
--- a/html/sinfo__new__nst_8h_source.html
+++ b/html/sinfo__new__nst_8h_source.html
@@ -96,7 +96,7 @@
<a name="l00086"></a>00086 <span class="preprocessor"></span>
<a name="l00087"></a>00087 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__objnod_8c_source.html b/html/sinfo__new__objnod_8c_source.html
index 8679917..fd8358c 100644
--- a/html/sinfo__new__objnod_8c_source.html
+++ b/html/sinfo__new__objnod_8c_source.html
@@ -877,7 +877,7 @@
<a name="l00875"></a>00875
<a name="l00876"></a>00876 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__objnod_8h_source.html b/html/sinfo__new__objnod_8h_source.html
index 963441b..a8fe468 100644
--- a/html/sinfo__new__objnod_8h_source.html
+++ b/html/sinfo__new__objnod_8h_source.html
@@ -79,7 +79,7 @@
<a name="l00069"></a>00069 <span class="preprocessor">#endif </span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__prepare__stacked__frames_8c_source.html b/html/sinfo__new__prepare__stacked__frames_8c_source.html
index 4c8f916..6858800 100644
--- a/html/sinfo__new__prepare__stacked__frames_8c_source.html
+++ b/html/sinfo__new__prepare__stacked__frames_8c_source.html
@@ -1408,7 +1408,7 @@
<a name="l01407"></a>01407
<a name="l01408"></a>01408 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__prepare__stacked__frames_8h_source.html b/html/sinfo__new__prepare__stacked__frames_8h_source.html
index 592b25b..71f8d58 100644
--- a/html/sinfo__new__prepare__stacked__frames_8h_source.html
+++ b/html/sinfo__new__prepare__stacked__frames_8h_source.html
@@ -90,7 +90,7 @@
<a name="l00080"></a>00080 <span class="preprocessor"></span>
<a name="l00081"></a>00081 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__psf_8c_source.html b/html/sinfo__new__psf_8c_source.html
index 1d91349..1085d87 100644
--- a/html/sinfo__new__psf_8c_source.html
+++ b/html/sinfo__new__psf_8c_source.html
@@ -49,2469 +49,2468 @@
<a name="l00039"></a>00039 <span class="preprocessor">#define _GNU_SOURCE</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include <math.h></span>
<a name="l00041"></a>00041
-<a name="l00042"></a>00042 <span class="preprocessor">#include <assert.h></span>
-<a name="l00043"></a>00043 <span class="preprocessor">#include <sinfo_cpl_size.h></span>
-<a name="l00044"></a>00044
-<a name="l00045"></a>00045 <span class="preprocessor">#include <irplib_utils.h></span>
-<a name="l00046"></a>00046 <span class="preprocessor">#include <irplib_strehl.h></span>
-<a name="l00047"></a>00047 <span class="preprocessor">#include "sinfo_new_psf.h"</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#include "sinfo_pro_save.h"</span>
-<a name="l00049"></a>00049 <span class="preprocessor">#include "sinfo_hidden.h"</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include "sinfo_key_names.h"</span>
-<a name="l00051"></a>00051 <span class="preprocessor">#include "sinfo_psf_ini.h"</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#include "sinfo_psf_ini_by_cpl.h"</span>
-<a name="l00053"></a>00053 <span class="preprocessor">#include "sinfo_utilities_scired.h"</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#include "sinfo_hidden.h"</span>
-<a name="l00055"></a>00055 <span class="preprocessor">#include "sinfo_pfits.h"</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#include "sinfo_functions.h"</span>
-<a name="l00057"></a>00057 <span class="preprocessor">#include "sinfo_error.h"</span>
-<a name="l00058"></a>00058 <span class="preprocessor">#include "sinfo_utils_wrappers.h"</span>
-<a name="l00059"></a>00059 <span class="preprocessor">#include "sinfo_globals.h"</span>
-<a name="l00060"></a>00060 <span class="comment">//Used only for sinfo_propertylist_has</span>
-<a name="l00061"></a>00061 <span class="preprocessor">#include "sinfo_dfs.h"</span>
-<a name="l00062"></a>00062 <span class="comment">/*----------------------------------------------------------------------------</span>
-<a name="l00063"></a>00063 <span class="comment"> Defines</span>
-<a name="l00064"></a>00064 <span class="comment"> ---------------------------------------------------------------------------*/</span>
-<a name="l00065"></a>00065 <span class="comment">//PSO</span>
-<a name="l00066"></a>00066 <span class="preprocessor">#define SINFO_MATH_PI 3.1415926535897932384626433832795028841971693993751058</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_MATH_PI_2 1.5707963267948966192313216916397514420985846996875529</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_MATH_PI_4 0.7853981633974483096156608458198757210492923498437765</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span>
+<a name="l00042"></a>00042 <span class="preprocessor">#include <sinfo_cpl_size.h></span>
+<a name="l00043"></a>00043
+<a name="l00044"></a>00044 <span class="preprocessor">#include <irplib_utils.h></span>
+<a name="l00045"></a>00045 <span class="preprocessor">#include <irplib_strehl.h></span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include "sinfo_new_psf.h"</span>
+<a name="l00047"></a>00047 <span class="preprocessor">#include "sinfo_pro_save.h"</span>
+<a name="l00048"></a>00048 <span class="preprocessor">#include "sinfo_hidden.h"</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#include "sinfo_key_names.h"</span>
+<a name="l00050"></a>00050 <span class="preprocessor">#include "sinfo_psf_ini.h"</span>
+<a name="l00051"></a>00051 <span class="preprocessor">#include "sinfo_psf_ini_by_cpl.h"</span>
+<a name="l00052"></a>00052 <span class="preprocessor">#include "sinfo_utilities_scired.h"</span>
+<a name="l00053"></a>00053 <span class="preprocessor">#include "sinfo_hidden.h"</span>
+<a name="l00054"></a>00054 <span class="preprocessor">#include "sinfo_pfits.h"</span>
+<a name="l00055"></a>00055 <span class="preprocessor">#include "sinfo_functions.h"</span>
+<a name="l00056"></a>00056 <span class="preprocessor">#include "sinfo_error.h"</span>
+<a name="l00057"></a>00057 <span class="preprocessor">#include "sinfo_utils_wrappers.h"</span>
+<a name="l00058"></a>00058 <span class="preprocessor">#include "sinfo_globals.h"</span>
+<a name="l00059"></a>00059 <span class="comment">//Used only for sinfo_propertylist_has</span>
+<a name="l00060"></a>00060 <span class="preprocessor">#include "sinfo_dfs.h"</span>
+<a name="l00061"></a>00061 <span class="comment">/*----------------------------------------------------------------------------</span>
+<a name="l00062"></a>00062 <span class="comment"> Defines</span>
+<a name="l00063"></a>00063 <span class="comment"> ---------------------------------------------------------------------------*/</span>
+<a name="l00064"></a>00064 <span class="comment">//PSO</span>
+<a name="l00065"></a>00065 <span class="preprocessor">#define SINFO_MATH_PI 3.1415926535897932384626433832795028841971693993751058</span>
+<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_MATH_PI_2 1.5707963267948966192313216916397514420985846996875529</span>
+<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_MATH_PI_4 0.7853981633974483096156608458198757210492923498437765</span>
+<a name="l00068"></a>00068 <span class="preprocessor"></span>
+<a name="l00069"></a>00069
<a name="l00070"></a>00070
-<a name="l00071"></a>00071
-<a name="l00072"></a>00072 <span class="preprocessor">#define SINFO_STREHL_M1 8.0 //7.9</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_M2 1.1 //1.33</span>
-<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_BOX_SIZE 64</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_WINDOW 6</span>
-<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_SZ 4</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_RSTAR 32//25</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_R1 32//25</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_R2 33//27</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_ERROR_COEFFICIENT SINFO_MATH_PI * 0.007 / 0.0271</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#ifndef SINFO_STREHL_RAD_CENTRAL</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_RAD_CENTRAL 5</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span>
-<a name="l00085"></a>00085 <span class="comment">//constants for perfect PSF generation</span>
-<a name="l00086"></a>00086 <span class="comment">// Dimension of the support for generating the perfect PFS</span>
-<a name="l00087"></a>00087 <span class="preprocessor">#define SINFO_PSF_DIM 1024//256</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_BLOCKS 63//11</span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span>
-<a name="l00090"></a>00090 <span class="preprocessor">#define SINFO_PSF_BIN 16 // Pixels over "pixel_size"</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_NPOINT 10000// number of encircled energy sampling points</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_BOX_SZ 8</span>
-<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="comment">/*----------------------------------------------------------------------------</span>
-<a name="l00094"></a>00094 <span class="comment"> Function Definitions</span>
-<a name="l00095"></a>00095 <span class="comment"> ---------------------------------------------------------------------------*/</span>
-<a name="l00096"></a>00096 <span class="keyword">static</span> cpl_error_code
-<a name="l00097"></a>00097 sinfo_add_com_psf_qclog(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname,cpl_table** qclog_tbl);
+<a name="l00071"></a>00071 <span class="preprocessor">#define SINFO_STREHL_M1 8.0 //7.9</span>
+<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_M2 1.1 //1.33</span>
+<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_BOX_SIZE 64</span>
+<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_WINDOW 6</span>
+<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_SZ 4</span>
+<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_RSTAR 32//25</span>
+<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_R1 32//25</span>
+<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_R2 33//27</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_ERROR_COEFFICIENT SINFO_MATH_PI * 0.007 / 0.0271</span>
+<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#ifndef SINFO_STREHL_RAD_CENTRAL</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_STREHL_RAD_CENTRAL 5</span>
+<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00083"></a>00083 <span class="preprocessor"></span>
+<a name="l00084"></a>00084 <span class="comment">//constants for perfect PSF generation</span>
+<a name="l00085"></a>00085 <span class="comment">// Dimension of the support for generating the perfect PFS</span>
+<a name="l00086"></a>00086 <span class="preprocessor">#define SINFO_PSF_DIM 1024//256</span>
+<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_BLOCKS 63//11</span>
+<a name="l00088"></a>00088 <span class="preprocessor"></span>
+<a name="l00089"></a>00089 <span class="preprocessor">#define SINFO_PSF_BIN 16 // Pixels over "pixel_size"</span>
+<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_PSF_NPOINT 10000// number of encircled energy sampling points</span>
+<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_BKG_BOX_SZ 8</span>
+<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="comment">/*----------------------------------------------------------------------------</span>
+<a name="l00093"></a>00093 <span class="comment"> Function Definitions</span>
+<a name="l00094"></a>00094 <span class="comment"> ---------------------------------------------------------------------------*/</span>
+<a name="l00095"></a>00095 <span class="keyword">static</span> cpl_error_code
+<a name="l00096"></a>00096 sinfo_add_com_psf_qclog(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname,cpl_table** qclog_tbl);
+<a name="l00097"></a>00097
<a name="l00098"></a>00098
-<a name="l00099"></a>00099
-<a name="l00100"></a>00100 <span class="keyword">static</span> cpl_error_code
-<a name="l00101"></a>00101 sinfo_get_star_features(<span class="keyword">const</span> cpl_image* im,
-<a name="l00102"></a>00102 <span class="keyword">const</span> <span class="keywordtype">int</span> radius,
-<a name="l00103"></a>00103 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
-<a name="l00104"></a>00104 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
-<a name="l00105"></a>00105 <span class="keywordtype">double</span>* xc,
-<a name="l00106"></a>00106 <span class="keywordtype">double</span>* yc,
-<a name="l00107"></a>00107 <span class="keywordtype">double</span>* pick,
-<a name="l00108"></a>00108 <span class="keywordtype">double</span>* flux,
-<a name="l00109"></a>00109 <span class="keywordtype">double</span>* bkg);
-<a name="l00110"></a>00110
-<a name="l00111"></a>00111 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00112"></a>00112 sinfo_find_min_of_four(<span class="keyword">const</span> <span class="keywordtype">double</span> n1,
-<a name="l00113"></a>00113 <span class="keyword">const</span> <span class="keywordtype">double</span> n2,
-<a name="l00114"></a>00114 <span class="keyword">const</span> <span class="keywordtype">double</span> n3,
-<a name="l00115"></a>00115 <span class="keyword">const</span> <span class="keywordtype">double</span> n4);
-<a name="l00116"></a>00116
-<a name="l00117"></a>00117 <span class="keyword">static</span> cpl_table*
-<a name="l00118"></a>00118 sinfo_get_strehl_from_2images(cpl_image* ima1,
-<a name="l00119"></a>00119 cpl_image* ima2,
-<a name="l00120"></a>00120 cpl_frame* frm1,
-<a name="l00121"></a>00121 cpl_frame* frm2);
+<a name="l00099"></a>00099 <span class="keyword">static</span> cpl_error_code
+<a name="l00100"></a>00100 sinfo_get_star_features(<span class="keyword">const</span> cpl_image* im,
+<a name="l00101"></a>00101 <span class="keyword">const</span> <span class="keywordtype">int</span> radius,
+<a name="l00102"></a>00102 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
+<a name="l00103"></a>00103 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
+<a name="l00104"></a>00104 <span class="keywordtype">double</span>* xc,
+<a name="l00105"></a>00105 <span class="keywordtype">double</span>* yc,
+<a name="l00106"></a>00106 <span class="keywordtype">double</span>* pick,
+<a name="l00107"></a>00107 <span class="keywordtype">double</span>* flux,
+<a name="l00108"></a>00108 <span class="keywordtype">double</span>* bkg);
+<a name="l00109"></a>00109
+<a name="l00110"></a>00110 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00111"></a>00111 sinfo_find_min_of_four(<span class="keyword">const</span> <span class="keywordtype">double</span> n1,
+<a name="l00112"></a>00112 <span class="keyword">const</span> <span class="keywordtype">double</span> n2,
+<a name="l00113"></a>00113 <span class="keyword">const</span> <span class="keywordtype">double</span> n3,
+<a name="l00114"></a>00114 <span class="keyword">const</span> <span class="keywordtype">double</span> n4);
+<a name="l00115"></a>00115
+<a name="l00116"></a>00116 <span class="keyword">static</span> cpl_table*
+<a name="l00117"></a>00117 sinfo_get_strehl_from_2images(cpl_image* ima1,
+<a name="l00118"></a>00118 cpl_image* ima2,
+<a name="l00119"></a>00119 cpl_frame* frm1,
+<a name="l00120"></a>00120 cpl_frame* frm2);
+<a name="l00121"></a>00121
<a name="l00122"></a>00122
-<a name="l00123"></a>00123
-<a name="l00124"></a>00124 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00125"></a>00125 sinfo_get_strehl_input1(cpl_frame* frm1,
-<a name="l00126"></a>00126 <span class="keywordtype">double</span>* dispersion,
-<a name="l00127"></a>00127 <span class="keywordtype">double</span>* centralWave,
-<a name="l00128"></a>00128 <span class="keywordtype">double</span>* ws,
-<a name="l00129"></a>00129 <span class="keywordtype">double</span>* we,
-<a name="l00130"></a>00130 <span class="keywordtype">double</span>* pscale,
-<a name="l00131"></a>00131 <span class="keywordtype">double</span>* exptime,
-<a name="l00132"></a>00132 <span class="keywordtype">double</span>* strehl_star_rad,
-<a name="l00133"></a>00133 <span class="keywordtype">double</span>* strehl_bg_rmin,
-<a name="l00134"></a>00134 <span class="keywordtype">double</span>* strehl_bg_rmax);
-<a name="l00135"></a>00135
-<a name="l00136"></a>00136 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00137"></a>00137 sinfo_get_strehl_input2(cpl_frame* frm1,cpl_frame* frm2,
-<a name="l00138"></a>00138 <span class="keywordtype">double</span>* dispersion,
-<a name="l00139"></a>00139 <span class="keywordtype">double</span>* centralWave,
-<a name="l00140"></a>00140 <span class="keywordtype">double</span>* ws,
-<a name="l00141"></a>00141 <span class="keywordtype">double</span>* we,
-<a name="l00142"></a>00142 <span class="keywordtype">double</span>* pscale1,
-<a name="l00143"></a>00143 <span class="keywordtype">double</span>* pscale2,
-<a name="l00144"></a>00144 <span class="keywordtype">double</span>* exptime1,
-<a name="l00145"></a>00145 <span class="keywordtype">double</span>* exptime2,
-<a name="l00146"></a>00146 <span class="keywordtype">double</span>* strehl_star_rad1,
-<a name="l00147"></a>00147 <span class="keywordtype">double</span>* strehl_star_rad2,
-<a name="l00148"></a>00148 <span class="keywordtype">double</span>* strehl_bg_rmin1,
-<a name="l00149"></a>00149 <span class="keywordtype">double</span>* strehl_bg_rmin2,
-<a name="l00150"></a>00150 <span class="keywordtype">double</span>* strehl_bg_rmax1,
-<a name="l00151"></a>00151 <span class="keywordtype">double</span>* strehl_bg_rmax2);
+<a name="l00123"></a>00123 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00124"></a>00124 sinfo_get_strehl_input1(cpl_frame* frm1,
+<a name="l00125"></a>00125 <span class="keywordtype">double</span>* dispersion,
+<a name="l00126"></a>00126 <span class="keywordtype">double</span>* centralWave,
+<a name="l00127"></a>00127 <span class="keywordtype">double</span>* ws,
+<a name="l00128"></a>00128 <span class="keywordtype">double</span>* we,
+<a name="l00129"></a>00129 <span class="keywordtype">double</span>* pscale,
+<a name="l00130"></a>00130 <span class="keywordtype">double</span>* exptime,
+<a name="l00131"></a>00131 <span class="keywordtype">double</span>* strehl_star_rad,
+<a name="l00132"></a>00132 <span class="keywordtype">double</span>* strehl_bg_rmin,
+<a name="l00133"></a>00133 <span class="keywordtype">double</span>* strehl_bg_rmax);
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00136"></a>00136 sinfo_get_strehl_input2(cpl_frame* frm1,cpl_frame* frm2,
+<a name="l00137"></a>00137 <span class="keywordtype">double</span>* dispersion,
+<a name="l00138"></a>00138 <span class="keywordtype">double</span>* centralWave,
+<a name="l00139"></a>00139 <span class="keywordtype">double</span>* ws,
+<a name="l00140"></a>00140 <span class="keywordtype">double</span>* we,
+<a name="l00141"></a>00141 <span class="keywordtype">double</span>* pscale1,
+<a name="l00142"></a>00142 <span class="keywordtype">double</span>* pscale2,
+<a name="l00143"></a>00143 <span class="keywordtype">double</span>* exptime1,
+<a name="l00144"></a>00144 <span class="keywordtype">double</span>* exptime2,
+<a name="l00145"></a>00145 <span class="keywordtype">double</span>* strehl_star_rad1,
+<a name="l00146"></a>00146 <span class="keywordtype">double</span>* strehl_star_rad2,
+<a name="l00147"></a>00147 <span class="keywordtype">double</span>* strehl_bg_rmin1,
+<a name="l00148"></a>00148 <span class="keywordtype">double</span>* strehl_bg_rmin2,
+<a name="l00149"></a>00149 <span class="keywordtype">double</span>* strehl_bg_rmax1,
+<a name="l00150"></a>00150 <span class="keywordtype">double</span>* strehl_bg_rmax2);
+<a name="l00151"></a>00151
<a name="l00152"></a>00152
-<a name="l00153"></a>00153
-<a name="l00154"></a>00154 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00155"></a>00155 sinfo_check_borders(cpl_size* val,<span class="keyword">const</span> <span class="keywordtype">int</span> max,<span class="keyword">const</span> <span class="keywordtype">int</span> thresh);
-<a name="l00156"></a>00156
-<a name="l00157"></a>00157 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00158"></a>00158 sinfo_get_safe_box(<span class="keywordtype">int</span>* llx,
-<a name="l00159"></a>00159 <span class="keywordtype">int</span>* lly,
-<a name="l00160"></a>00160 <span class="keywordtype">int</span>* urx,
-<a name="l00161"></a>00161 <span class="keywordtype">int</span>* ury,
-<a name="l00162"></a>00162 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
-<a name="l00163"></a>00163 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
-<a name="l00164"></a>00164 <span class="keyword">const</span> <span class="keywordtype">int</span> box,
-<a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">int</span> szx,
-<a name="l00166"></a>00166 <span class="keyword">const</span> <span class="keywordtype">int</span> szy);
-<a name="l00167"></a>00167
-<a name="l00168"></a>00168 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00169"></a>00169 sinfo_get_strehl_from_slice(cpl_imagelist* cube,
-<a name="l00170"></a>00170 <span class="keywordtype">double</span> disp,
-<a name="l00171"></a>00171 <span class="keywordtype">double</span> cWave,
-<a name="l00172"></a>00172 <span class="keywordtype">double</span> ws,
-<a name="l00173"></a>00173 <span class="keywordtype">double</span> we,
-<a name="l00174"></a>00174 <span class="keywordtype">double</span> pscale,
-<a name="l00175"></a>00175 <span class="keywordtype">double</span> strehl_star_radius,
-<a name="l00176"></a>00176 <span class="keywordtype">double</span> strehl_bg_r1,
-<a name="l00177"></a>00177 <span class="keywordtype">double</span> strehl_bg_r2,
-<a name="l00178"></a>00178 <span class="keywordtype">double</span>* strehl,
-<a name="l00179"></a>00179 <span class="keywordtype">double</span>* strehl_err);
+<a name="l00153"></a>00153 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00154"></a>00154 sinfo_check_borders(cpl_size* val,<span class="keyword">const</span> <span class="keywordtype">int</span> max,<span class="keyword">const</span> <span class="keywordtype">int</span> thresh);
+<a name="l00155"></a>00155
+<a name="l00156"></a>00156 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00157"></a>00157 sinfo_get_safe_box(<span class="keywordtype">int</span>* llx,
+<a name="l00158"></a>00158 <span class="keywordtype">int</span>* lly,
+<a name="l00159"></a>00159 <span class="keywordtype">int</span>* urx,
+<a name="l00160"></a>00160 <span class="keywordtype">int</span>* ury,
+<a name="l00161"></a>00161 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
+<a name="l00162"></a>00162 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
+<a name="l00163"></a>00163 <span class="keyword">const</span> <span class="keywordtype">int</span> box,
+<a name="l00164"></a>00164 <span class="keyword">const</span> <span class="keywordtype">int</span> szx,
+<a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">int</span> szy);
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00168"></a>00168 sinfo_get_strehl_from_slice(cpl_imagelist* cube,
+<a name="l00169"></a>00169 <span class="keywordtype">double</span> disp,
+<a name="l00170"></a>00170 <span class="keywordtype">double</span> cWave,
+<a name="l00171"></a>00171 <span class="keywordtype">double</span> ws,
+<a name="l00172"></a>00172 <span class="keywordtype">double</span> we,
+<a name="l00173"></a>00173 <span class="keywordtype">double</span> pscale,
+<a name="l00174"></a>00174 <span class="keywordtype">double</span> strehl_star_radius,
+<a name="l00175"></a>00175 <span class="keywordtype">double</span> strehl_bg_r1,
+<a name="l00176"></a>00176 <span class="keywordtype">double</span> strehl_bg_r2,
+<a name="l00177"></a>00177 <span class="keywordtype">double</span>* strehl,
+<a name="l00178"></a>00178 <span class="keywordtype">double</span>* strehl_err);
+<a name="l00179"></a>00179
<a name="l00180"></a>00180
-<a name="l00181"></a>00181
-<a name="l00182"></a>00182 <span class="keyword">static</span> cpl_table*
-<a name="l00183"></a>00183 sinfo_get_encircled_energy(cpl_frameset* sof,
-<a name="l00184"></a>00184 cpl_image* img,
-<a name="l00185"></a>00185 <span class="keywordtype">double</span>* fwhm_x,
-<a name="l00186"></a>00186 <span class="keywordtype">double</span>* fwhm_y,
-<a name="l00187"></a>00187 cpl_table** qclog);
-<a name="l00188"></a>00188
-<a name="l00189"></a>00189 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l00190"></a>00190 sinfo_get_strehl_from_ima(cpl_image* ima,
-<a name="l00191"></a>00191 cpl_frame* frame);
-<a name="l00192"></a>00192
-<a name="l00193"></a>00193 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00194"></a>00194 sinfo_get_strehl_from_image(cpl_image* img,
-<a name="l00195"></a>00195 <span class="keywordtype">double</span> ws,
-<a name="l00196"></a>00196 <span class="keywordtype">double</span> we,
-<a name="l00197"></a>00197 <span class="keywordtype">double</span> pscale,
-<a name="l00198"></a>00198 <span class="keywordtype">double</span> strehl_star_radius,
-<a name="l00199"></a>00199 <span class="keywordtype">double</span> strehl_bg_r1,
-<a name="l00200"></a>00200 <span class="keywordtype">double</span> strehl_bg_r2,
-<a name="l00201"></a>00201 <span class="keywordtype">double</span>* strehl,
-<a name="l00202"></a>00202 <span class="keywordtype">double</span>* strehl_err);
+<a name="l00181"></a>00181 <span class="keyword">static</span> cpl_table*
+<a name="l00182"></a>00182 sinfo_get_encircled_energy(cpl_frameset* sof,
+<a name="l00183"></a>00183 cpl_image* img,
+<a name="l00184"></a>00184 <span class="keywordtype">double</span>* fwhm_x,
+<a name="l00185"></a>00185 <span class="keywordtype">double</span>* fwhm_y,
+<a name="l00186"></a>00186 cpl_table** qclog);
+<a name="l00187"></a>00187
+<a name="l00188"></a>00188 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l00189"></a>00189 sinfo_get_strehl_from_ima(cpl_image* ima,
+<a name="l00190"></a>00190 cpl_frame* frame);
+<a name="l00191"></a>00191
+<a name="l00192"></a>00192 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00193"></a>00193 sinfo_get_strehl_from_image(cpl_image* img,
+<a name="l00194"></a>00194 <span class="keywordtype">double</span> ws,
+<a name="l00195"></a>00195 <span class="keywordtype">double</span> we,
+<a name="l00196"></a>00196 <span class="keywordtype">double</span> pscale,
+<a name="l00197"></a>00197 <span class="keywordtype">double</span> strehl_star_radius,
+<a name="l00198"></a>00198 <span class="keywordtype">double</span> strehl_bg_r1,
+<a name="l00199"></a>00199 <span class="keywordtype">double</span> strehl_bg_r2,
+<a name="l00200"></a>00200 <span class="keywordtype">double</span>* strehl,
+<a name="l00201"></a>00201 <span class="keywordtype">double</span>* strehl_err);
+<a name="l00202"></a>00202
<a name="l00203"></a>00203
<a name="l00204"></a>00204
-<a name="l00205"></a>00205
-<a name="l00206"></a>00206 <span class="keyword">static</span> cpl_table*
-<a name="l00207"></a>00207 sinfo_get_strehl_from_cube(cpl_imagelist* cube,
-<a name="l00208"></a>00208 <span class="keywordtype">char</span>* name,
-<a name="l00209"></a>00209 cpl_frame* frame);
-<a name="l00210"></a>00210
-<a name="l00211"></a>00211 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00212"></a>00212 sinfo_get_frm12(cpl_frameset* sof,cpl_frame** frm1,cpl_frame** frm2);
+<a name="l00205"></a>00205 <span class="keyword">static</span> cpl_table*
+<a name="l00206"></a>00206 sinfo_get_strehl_from_cube(cpl_imagelist* cube,
+<a name="l00207"></a>00207 <span class="keywordtype">char</span>* name,
+<a name="l00208"></a>00208 cpl_frame* frame);
+<a name="l00209"></a>00209
+<a name="l00210"></a>00210 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00211"></a>00211 sinfo_get_frm12(cpl_frameset* sof,cpl_frame** frm1,cpl_frame** frm2);
+<a name="l00212"></a>00212
<a name="l00213"></a>00213
-<a name="l00214"></a>00214
-<a name="l00223"></a>00223 <span class="comment">/*----------------------------------------------------------------------------</span>
-<a name="l00224"></a>00224 <span class="comment"> Function : sinfo_new_psf()</span>
-<a name="l00225"></a>00225 <span class="comment"> In : ini_file: file name of according .ini file</span>
-<a name="l00226"></a>00226 <span class="comment"> Out : integer (0 if it worked, -1 if it doesn't)</span>
-<a name="l00227"></a>00227 <span class="comment"> Job :</span>
-<a name="l00228"></a>00228 <span class="comment"></span>
-<a name="l00229"></a>00229 <span class="comment"> sinfo_new_psf.py does the image reconstruction of a set of sky-subtracted,</span>
-<a name="l00230"></a>00230 <span class="comment"> flatfielded,</span>
-<a name="l00231"></a>00231 <span class="comment"> bad pixel corrected and slope of the spectra aligned exposures of a bright</span>
-<a name="l00232"></a>00232 <span class="comment"> star with continuum spectrum. The resulting image can be used to determine</span>
-<a name="l00233"></a>00233 <span class="comment"> the PSF</span>
-<a name="l00234"></a>00234 <span class="comment"></span>
-<a name="l00235"></a>00235 <span class="comment"> ---------------------------------------------------------------------------*/</span>
-<a name="l00236"></a>00236
-<a name="l00237"></a>00237 <span class="keywordtype">int</span>
-<a name="l00238"></a>00238 sinfo_new_psf (<span class="keyword">const</span> <span class="keywordtype">char</span>* plugin_id,
-<a name="l00239"></a>00239 cpl_parameterlist* config,
-<a name="l00240"></a>00240 cpl_frameset* sof, cpl_frameset* ref_set)
-<a name="l00241"></a>00241 {
-<a name="l00242"></a>00242
-<a name="l00243"></a>00243 cpl_imagelist* cube1=NULL;
-<a name="l00244"></a>00244 cpl_imagelist* cube2=NULL;
-<a name="l00245"></a>00245 cpl_image * med_img1=NULL ;
-<a name="l00246"></a>00246 cpl_image * med_img2=NULL ;
-<a name="l00247"></a>00247
-<a name="l00248"></a>00248 cpl_table* ao_performance=NULL;
-<a name="l00249"></a>00249 cpl_table* enc_energy=NULL;
-<a name="l00250"></a>00250
-<a name="l00251"></a>00251 cpl_frame* frm1=NULL;
-<a name="l00252"></a>00252 cpl_frame* frm2=NULL;
-<a name="l00253"></a>00253
-<a name="l00254"></a>00254 cpl_table* qclog_tbl=NULL;
-<a name="l00255"></a>00255 cpl_frameset* stk=NULL;
-<a name="l00256"></a>00256 cpl_propertylist* plist =NULL;
-<a name="l00257"></a>00257
-<a name="l00258"></a>00258 psf_config * cfg =NULL;
-<a name="l00259"></a>00259
-<a name="l00260"></a>00260 <span class="keywordtype">int</span> nsample=0;
-<a name="l00261"></a>00261 <span class="keywordtype">int</span> i = 0;
-<a name="l00262"></a>00262 <span class="keywordtype">int</span> status=0;
+<a name="l00222"></a>00222 <span class="comment">/*----------------------------------------------------------------------------</span>
+<a name="l00223"></a>00223 <span class="comment"> Function : sinfo_new_psf()</span>
+<a name="l00224"></a>00224 <span class="comment"> In : ini_file: file name of according .ini file</span>
+<a name="l00225"></a>00225 <span class="comment"> Out : integer (0 if it worked, -1 if it doesn't)</span>
+<a name="l00226"></a>00226 <span class="comment"> Job :</span>
+<a name="l00227"></a>00227 <span class="comment"></span>
+<a name="l00228"></a>00228 <span class="comment"> sinfo_new_psf.py does the image reconstruction of a set of sky-subtracted,</span>
+<a name="l00229"></a>00229 <span class="comment"> flatfielded,</span>
+<a name="l00230"></a>00230 <span class="comment"> bad pixel corrected and slope of the spectra aligned exposures of a bright</span>
+<a name="l00231"></a>00231 <span class="comment"> star with continuum spectrum. The resulting image can be used to determine</span>
+<a name="l00232"></a>00232 <span class="comment"> the PSF</span>
+<a name="l00233"></a>00233 <span class="comment"></span>
+<a name="l00234"></a>00234 <span class="comment"> ---------------------------------------------------------------------------*/</span>
+<a name="l00235"></a>00235
+<a name="l00236"></a>00236 <span class="keywordtype">int</span>
+<a name="l00237"></a>00237 sinfo_new_psf (<span class="keyword">const</span> <span class="keywordtype">char</span>* plugin_id,
+<a name="l00238"></a>00238 cpl_parameterlist* config,
+<a name="l00239"></a>00239 cpl_frameset* sof, cpl_frameset* ref_set)
+<a name="l00240"></a>00240 {
+<a name="l00241"></a>00241
+<a name="l00242"></a>00242 cpl_imagelist* cube1=NULL;
+<a name="l00243"></a>00243 cpl_imagelist* cube2=NULL;
+<a name="l00244"></a>00244 cpl_image * med_img1=NULL ;
+<a name="l00245"></a>00245 cpl_image * med_img2=NULL ;
+<a name="l00246"></a>00246
+<a name="l00247"></a>00247 cpl_table* ao_performance=NULL;
+<a name="l00248"></a>00248 cpl_table* enc_energy=NULL;
+<a name="l00249"></a>00249
+<a name="l00250"></a>00250 cpl_frame* frm1=NULL;
+<a name="l00251"></a>00251 cpl_frame* frm2=NULL;
+<a name="l00252"></a>00252
+<a name="l00253"></a>00253 cpl_table* qclog_tbl=NULL;
+<a name="l00254"></a>00254 cpl_frameset* stk=NULL;
+<a name="l00255"></a>00255 cpl_propertylist* plist =NULL;
+<a name="l00256"></a>00256
+<a name="l00257"></a>00257 psf_config * cfg =NULL;
+<a name="l00258"></a>00258
+<a name="l00259"></a>00259 <span class="keywordtype">int</span> nsample=0;
+<a name="l00260"></a>00260 <span class="keywordtype">int</span> i = 0;
+<a name="l00261"></a>00261 <span class="keywordtype">int</span> status=0;
+<a name="l00262"></a>00262
<a name="l00263"></a>00263
<a name="l00264"></a>00264
-<a name="l00265"></a>00265
-<a name="l00266"></a>00266 <span class="keywordtype">int</span> strehl_sw=0;
-<a name="l00267"></a>00267 <span class="keywordtype">int</span> ilx1=0;
-<a name="l00268"></a>00268 <span class="keywordtype">int</span> ily1=0;
-<a name="l00269"></a>00269 <span class="keywordtype">int</span> ilx2=0;
-<a name="l00270"></a>00270 <span class="keywordtype">int</span> ily2=0;
-<a name="l00271"></a>00271
-<a name="l00272"></a>00272 <span class="keywordtype">float</span> cx1=0;
-<a name="l00273"></a>00273 <span class="keywordtype">float</span> cy1=0;
-<a name="l00274"></a>00274 <span class="keywordtype">float</span> cx2=0;
-<a name="l00275"></a>00275 <span class="keywordtype">float</span> cy2=0;
-<a name="l00276"></a>00276
-<a name="l00277"></a>00277 <span class="keywordtype">double</span> fwhm_x=0;
-<a name="l00278"></a>00278 <span class="keywordtype">double</span> fwhm_y=0;
-<a name="l00279"></a>00279 <span class="keywordtype">double</span> lam=0;
-<a name="l00280"></a>00280 <span class="keywordtype">double</span> strehl=0;
-<a name="l00281"></a>00281 <span class="keywordtype">double</span> strehl1=0;
-<a name="l00282"></a>00282 <span class="keywordtype">double</span> strehl2=0;
-<a name="l00283"></a>00283
-<a name="l00284"></a>00284 <span class="keywordtype">char</span> fname1[MAX_NAME_SIZE];
-<a name="l00285"></a>00285 <span class="keywordtype">char</span> fname2[MAX_NAME_SIZE];
-<a name="l00286"></a>00286
-<a name="l00287"></a>00287 <span class="keywordtype">char</span> key_name[MAX_NAME_SIZE];
-<a name="l00288"></a>00288
-<a name="l00289"></a>00289 <span class="keywordtype">char</span> obs_name1[MAX_NAME_SIZE];
-<a name="l00290"></a>00290 <span class="keywordtype">char</span> hlamp_st=<span class="charliteral">'F'</span>;
-<a name="l00291"></a>00291 <span class="keywordtype">char</span> shut2_st=<span class="charliteral">'F'</span>;
-<a name="l00292"></a>00292 cpl_table* tmp_tbl=NULL;
+<a name="l00265"></a>00265 <span class="keywordtype">int</span> strehl_sw=0;
+<a name="l00266"></a>00266 <span class="keywordtype">int</span> ilx1=0;
+<a name="l00267"></a>00267 <span class="keywordtype">int</span> ily1=0;
+<a name="l00268"></a>00268 <span class="keywordtype">int</span> ilx2=0;
+<a name="l00269"></a>00269 <span class="keywordtype">int</span> ily2=0;
+<a name="l00270"></a>00270
+<a name="l00271"></a>00271 <span class="keywordtype">float</span> cx1=0;
+<a name="l00272"></a>00272 <span class="keywordtype">float</span> cy1=0;
+<a name="l00273"></a>00273 <span class="keywordtype">float</span> cx2=0;
+<a name="l00274"></a>00274 <span class="keywordtype">float</span> cy2=0;
+<a name="l00275"></a>00275
+<a name="l00276"></a>00276 <span class="keywordtype">double</span> fwhm_x=0;
+<a name="l00277"></a>00277 <span class="keywordtype">double</span> fwhm_y=0;
+<a name="l00278"></a>00278 <span class="keywordtype">double</span> lam=0;
+<a name="l00279"></a>00279 <span class="keywordtype">double</span> strehl=0;
+<a name="l00280"></a>00280 <span class="keywordtype">double</span> strehl1=0;
+<a name="l00281"></a>00281 <span class="keywordtype">double</span> strehl2=0;
+<a name="l00282"></a>00282
+<a name="l00283"></a>00283 <span class="keywordtype">char</span> fname1[MAX_NAME_SIZE];
+<a name="l00284"></a>00284 <span class="keywordtype">char</span> fname2[MAX_NAME_SIZE];
+<a name="l00285"></a>00285
+<a name="l00286"></a>00286 <span class="keywordtype">char</span> key_name[MAX_NAME_SIZE];
+<a name="l00287"></a>00287
+<a name="l00288"></a>00288 <span class="keywordtype">char</span> obs_name1[MAX_NAME_SIZE];
+<a name="l00289"></a>00289 <span class="keywordtype">char</span> hlamp_st=<span class="charliteral">'F'</span>;
+<a name="l00290"></a>00290 <span class="keywordtype">char</span> shut2_st=<span class="charliteral">'F'</span>;
+<a name="l00291"></a>00291 cpl_table* tmp_tbl=NULL;
+<a name="l00292"></a>00292
<a name="l00293"></a>00293
-<a name="l00294"></a>00294
-<a name="l00295"></a>00295 <span class="comment">/*</span>
-<a name="l00296"></a>00296 <span class="comment"> -----------------------------------------------------------------</span>
-<a name="l00297"></a>00297 <span class="comment"> 1) parse the file names and parameters to the psf_config data</span>
-<a name="l00298"></a>00298 <span class="comment"> structure cfg</span>
-<a name="l00299"></a>00299 <span class="comment"> -----------------------------------------------------------------</span>
-<a name="l00300"></a>00300 <span class="comment"> */</span>
-<a name="l00301"></a>00301
-<a name="l00302"></a>00302 sinfo_msg(<span class="stringliteral">"Parsing cpl input"</span>);
-<a name="l00303"></a>00303 check_nomsg(stk=cpl_frameset_new());
-<a name="l00304"></a>00304
-<a name="l00305"></a>00305 cknull(cfg = sinfo_parse_cpl_input_psf(sof,&stk),
-<a name="l00306"></a>00306 <span class="stringliteral">"error parsing cpl input"</span>);
-<a name="l00307"></a>00307
-<a name="l00308"></a>00308 <span class="comment">/* TODO the following generate a small leak of 72 bytes */</span>
-<a name="l00309"></a>00309 strehl_sw=sinfo_get_strehl_type(sof);
-<a name="l00310"></a>00310 <span class="keywordflow">if</span>(strehl_sw==0) {
-<a name="l00311"></a>00311 sinfo_msg(<span class="stringliteral">"One target Strehl computation"</span>);
-<a name="l00312"></a>00312 <span class="keywordflow">if</span>(sinfo_is_fits_file(cfg->inFrame) != 1) {
-<a name="l00313"></a>00313 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Input file %s is not FITS"</span>,cfg->inFrame);
-<a name="l00314"></a>00314 <span class="keywordflow">goto</span> cleanup;
-<a name="l00315"></a>00315 } <span class="keywordflow">else</span> {
-<a name="l00316"></a>00316 strcpy(fname1,cfg->inFrame);
-<a name="l00317"></a>00317 }
-<a name="l00318"></a>00318
-<a name="l00319"></a>00319 <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_PSF)) {
-<a name="l00320"></a>00320 frm1 = cpl_frameset_find(sof,PRO_COADD_PSF);
-<a name="l00321"></a>00321 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_PSF)) {
-<a name="l00322"></a>00322 frm1 = cpl_frameset_find(sof,PRO_OBS_PSF);
-<a name="l00323"></a>00323 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_STD)) {
-<a name="l00324"></a>00324 frm1 = cpl_frameset_find(sof,PRO_COADD_STD);
-<a name="l00325"></a>00325 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_STD)) {
-<a name="l00326"></a>00326 frm1 = cpl_frameset_find(sof,PRO_OBS_STD);
-<a name="l00327"></a>00327 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_OBJ)) {
-<a name="l00328"></a>00328 frm1 = cpl_frameset_find(sof,PRO_COADD_OBJ);
-<a name="l00329"></a>00329 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_OBJ)) {
-<a name="l00330"></a>00330 frm1 = cpl_frameset_find(sof,PRO_OBS_OBJ);
-<a name="l00331"></a>00331 } <span class="keywordflow">else</span> {
-<a name="l00332"></a>00332 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Frame %s or %s or %s or %s or %s or %s not found!"</span>,
-<a name="l00333"></a>00333 PRO_COADD_PSF,PRO_OBS_PSF,
-<a name="l00334"></a>00334 PRO_COADD_STD,PRO_OBS_STD,
-<a name="l00335"></a>00335 PRO_COADD_OBJ,PRO_OBS_OBJ);
-<a name="l00336"></a>00336 <span class="keywordflow">goto</span> cleanup;
-<a name="l00337"></a>00337 }
-<a name="l00338"></a>00338
-<a name="l00339"></a>00339 sinfo_get_obsname(frm1,obs_name1);
-<a name="l00340"></a>00340 check_nomsg(hlamp_st=sinfo_get_keyvalue_bool(frm1,KEY_NAME_LAMP_HALO));
-<a name="l00341"></a>00341 check_nomsg(shut2_st=sinfo_get_keyvalue_bool(frm1,KEY_NAME_SHUT2_ST));
+<a name="l00294"></a>00294 <span class="comment">/*</span>
+<a name="l00295"></a>00295 <span class="comment"> -----------------------------------------------------------------</span>
+<a name="l00296"></a>00296 <span class="comment"> 1) parse the file names and parameters to the psf_config data</span>
+<a name="l00297"></a>00297 <span class="comment"> structure cfg</span>
+<a name="l00298"></a>00298 <span class="comment"> -----------------------------------------------------------------</span>
+<a name="l00299"></a>00299 <span class="comment"> */</span>
+<a name="l00300"></a>00300
+<a name="l00301"></a>00301 sinfo_msg(<span class="stringliteral">"Parsing cpl input"</span>);
+<a name="l00302"></a>00302 check_nomsg(stk=cpl_frameset_new());
+<a name="l00303"></a>00303
+<a name="l00304"></a>00304 cknull(cfg = sinfo_parse_cpl_input_psf(sof,&stk),
+<a name="l00305"></a>00305 <span class="stringliteral">"error parsing cpl input"</span>);
+<a name="l00306"></a>00306
+<a name="l00307"></a>00307 <span class="comment">/* TODO the following generate a small leak of 72 bytes */</span>
+<a name="l00308"></a>00308 strehl_sw=sinfo_get_strehl_type(sof);
+<a name="l00309"></a>00309 <span class="keywordflow">if</span>(strehl_sw==0) {
+<a name="l00310"></a>00310 sinfo_msg(<span class="stringliteral">"One target Strehl computation"</span>);
+<a name="l00311"></a>00311 <span class="keywordflow">if</span>(sinfo_is_fits_file(cfg->inFrame) != 1) {
+<a name="l00312"></a>00312 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Input file %s is not FITS"</span>,cfg->inFrame);
+<a name="l00313"></a>00313 <span class="keywordflow">goto</span> cleanup;
+<a name="l00314"></a>00314 } <span class="keywordflow">else</span> {
+<a name="l00315"></a>00315 strcpy(fname1,cfg->inFrame);
+<a name="l00316"></a>00316 }
+<a name="l00317"></a>00317
+<a name="l00318"></a>00318 <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_PSF)) {
+<a name="l00319"></a>00319 frm1 = cpl_frameset_find(sof,PRO_COADD_PSF);
+<a name="l00320"></a>00320 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_PSF)) {
+<a name="l00321"></a>00321 frm1 = cpl_frameset_find(sof,PRO_OBS_PSF);
+<a name="l00322"></a>00322 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_STD)) {
+<a name="l00323"></a>00323 frm1 = cpl_frameset_find(sof,PRO_COADD_STD);
+<a name="l00324"></a>00324 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_STD)) {
+<a name="l00325"></a>00325 frm1 = cpl_frameset_find(sof,PRO_OBS_STD);
+<a name="l00326"></a>00326 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_OBJ)) {
+<a name="l00327"></a>00327 frm1 = cpl_frameset_find(sof,PRO_COADD_OBJ);
+<a name="l00328"></a>00328 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_OBJ)) {
+<a name="l00329"></a>00329 frm1 = cpl_frameset_find(sof,PRO_OBS_OBJ);
+<a name="l00330"></a>00330 } <span class="keywordflow">else</span> {
+<a name="l00331"></a>00331 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Frame %s or %s or %s or %s or %s or %s not found!"</span>,
+<a name="l00332"></a>00332 PRO_COADD_PSF,PRO_OBS_PSF,
+<a name="l00333"></a>00333 PRO_COADD_STD,PRO_OBS_STD,
+<a name="l00334"></a>00334 PRO_COADD_OBJ,PRO_OBS_OBJ);
+<a name="l00335"></a>00335 <span class="keywordflow">goto</span> cleanup;
+<a name="l00336"></a>00336 }
+<a name="l00337"></a>00337
+<a name="l00338"></a>00338 sinfo_get_obsname(frm1,obs_name1);
+<a name="l00339"></a>00339 check_nomsg(hlamp_st=sinfo_get_keyvalue_bool(frm1,KEY_NAME_LAMP_HALO));
+<a name="l00340"></a>00340 check_nomsg(shut2_st=sinfo_get_keyvalue_bool(frm1,KEY_NAME_SHUT2_ST));
+<a name="l00341"></a>00341
<a name="l00342"></a>00342
-<a name="l00343"></a>00343
-<a name="l00344"></a>00344 check_nomsg(cube1 = cpl_imagelist_load(fname1,CPL_TYPE_FLOAT,0));
-<a name="l00345"></a>00345 cknull(med_img1=sinfo_new_median_cube(cube1),
-<a name="l00346"></a>00346 <span class="stringliteral">" could not do sinfo_medianCube()"</span>);
-<a name="l00347"></a>00347
-<a name="l00348"></a>00348 check_nomsg(ilx1=cpl_image_get_size_x(med_img1));
-<a name="l00349"></a>00349 check_nomsg(ily1=cpl_image_get_size_y(med_img1));
-<a name="l00350"></a>00350
-<a name="l00351"></a>00351 cx1 = ilx1 / 2. + 0.5;
-<a name="l00352"></a>00352 cy1 = ily1 / 2. + 0.5;
-<a name="l00353"></a>00353
-<a name="l00354"></a>00354 cknull(ao_performance=sinfo_get_strehl_from_cube(cube1,fname1,frm1),
-<a name="l00355"></a>00355 <span class="stringliteral">"error computing strehl"</span>);
-<a name="l00356"></a>00356 strehl=sinfo_get_strehl_from_ima(med_img1,frm1);
-<a name="l00357"></a>00357 sinfo_free_imagelist(&cube1);
-<a name="l00358"></a>00358 } <span class="keywordflow">else</span> {
-<a name="l00359"></a>00359 sinfo_msg(<span class="stringliteral">"Two target Strehl computation"</span>);
-<a name="l00360"></a>00360 sinfo_get_frm12(sof,&frm1,&frm2);
-<a name="l00361"></a>00361 strcpy(fname1,cpl_frame_get_filename(frm1));
-<a name="l00362"></a>00362 strcpy(fname2,cpl_frame_get_filename(frm2));
-<a name="l00363"></a>00363
-<a name="l00364"></a>00364 check_nomsg(cube1 = cpl_imagelist_load(fname1,CPL_TYPE_FLOAT,0));
-<a name="l00365"></a>00365 check_nomsg(cube2 = cpl_imagelist_load(fname2,CPL_TYPE_FLOAT,0));
-<a name="l00366"></a>00366 cknull(med_img1=sinfo_new_median_cube(cube1),<span class="stringliteral">"Computing median on cube"</span>);
-<a name="l00367"></a>00367 cknull(med_img2=sinfo_new_median_cube(cube2),<span class="stringliteral">"Computing median on cube"</span>);
-<a name="l00368"></a>00368 check_nomsg(cpl_image_save(med_img1,<span class="stringliteral">"med_img1.fits"</span>,CPL_BPP_IEEE_FLOAT,
-<a name="l00369"></a>00369 NULL,CPL_IO_DEFAULT));
-<a name="l00370"></a>00370 check_nomsg(cpl_image_save(med_img2,<span class="stringliteral">"med_img2.fits"</span>,CPL_BPP_IEEE_FLOAT,
-<a name="l00371"></a>00371 NULL,CPL_IO_DEFAULT));
+<a name="l00343"></a>00343 check_nomsg(cube1 = cpl_imagelist_load(fname1,CPL_TYPE_FLOAT,0));
+<a name="l00344"></a>00344 cknull(med_img1=sinfo_new_median_cube(cube1),
+<a name="l00345"></a>00345 <span class="stringliteral">" could not do sinfo_medianCube()"</span>);
+<a name="l00346"></a>00346
+<a name="l00347"></a>00347 check_nomsg(ilx1=cpl_image_get_size_x(med_img1));
+<a name="l00348"></a>00348 check_nomsg(ily1=cpl_image_get_size_y(med_img1));
+<a name="l00349"></a>00349
+<a name="l00350"></a>00350 cx1 = ilx1 / 2. + 0.5;
+<a name="l00351"></a>00351 cy1 = ily1 / 2. + 0.5;
+<a name="l00352"></a>00352
+<a name="l00353"></a>00353 cknull(ao_performance=sinfo_get_strehl_from_cube(cube1,fname1,frm1),
+<a name="l00354"></a>00354 <span class="stringliteral">"error computing strehl"</span>);
+<a name="l00355"></a>00355 strehl=sinfo_get_strehl_from_ima(med_img1,frm1);
+<a name="l00356"></a>00356 sinfo_free_imagelist(&cube1);
+<a name="l00357"></a>00357 } <span class="keywordflow">else</span> {
+<a name="l00358"></a>00358 sinfo_msg(<span class="stringliteral">"Two target Strehl computation"</span>);
+<a name="l00359"></a>00359 sinfo_get_frm12(sof,&frm1,&frm2);
+<a name="l00360"></a>00360 strcpy(fname1,cpl_frame_get_filename(frm1));
+<a name="l00361"></a>00361 strcpy(fname2,cpl_frame_get_filename(frm2));
+<a name="l00362"></a>00362
+<a name="l00363"></a>00363 check_nomsg(cube1 = cpl_imagelist_load(fname1,CPL_TYPE_FLOAT,0));
+<a name="l00364"></a>00364 check_nomsg(cube2 = cpl_imagelist_load(fname2,CPL_TYPE_FLOAT,0));
+<a name="l00365"></a>00365 cknull(med_img1=sinfo_new_median_cube(cube1),<span class="stringliteral">"Computing median on cube"</span>);
+<a name="l00366"></a>00366 cknull(med_img2=sinfo_new_median_cube(cube2),<span class="stringliteral">"Computing median on cube"</span>);
+<a name="l00367"></a>00367 check_nomsg(cpl_image_save(med_img1,<span class="stringliteral">"med_img1.fits"</span>,CPL_BPP_IEEE_FLOAT,
+<a name="l00368"></a>00368 NULL,CPL_IO_DEFAULT));
+<a name="l00369"></a>00369 check_nomsg(cpl_image_save(med_img2,<span class="stringliteral">"med_img2.fits"</span>,CPL_BPP_IEEE_FLOAT,
+<a name="l00370"></a>00370 NULL,CPL_IO_DEFAULT));
+<a name="l00371"></a>00371
<a name="l00372"></a>00372
-<a name="l00373"></a>00373
-<a name="l00374"></a>00374 check_nomsg(ilx1=cpl_image_get_size_x(med_img1));
-<a name="l00375"></a>00375 check_nomsg(ily1=cpl_image_get_size_y(med_img1));
-<a name="l00376"></a>00376 check_nomsg(ilx2=cpl_image_get_size_x(med_img2));
-<a name="l00377"></a>00377 check_nomsg(ily2=cpl_image_get_size_y(med_img2));
-<a name="l00378"></a>00378
-<a name="l00379"></a>00379 cx1 = ilx1 / 2. + 0.5;
-<a name="l00380"></a>00380 cy1 = ily1 / 2. + 0.5;
-<a name="l00381"></a>00381 cx2 = ilx2 / 2. + 0.5;
-<a name="l00382"></a>00382 cy2 = ily2 / 2. + 0.5;
+<a name="l00373"></a>00373 check_nomsg(ilx1=cpl_image_get_size_x(med_img1));
+<a name="l00374"></a>00374 check_nomsg(ily1=cpl_image_get_size_y(med_img1));
+<a name="l00375"></a>00375 check_nomsg(ilx2=cpl_image_get_size_x(med_img2));
+<a name="l00376"></a>00376 check_nomsg(ily2=cpl_image_get_size_y(med_img2));
+<a name="l00377"></a>00377
+<a name="l00378"></a>00378 cx1 = ilx1 / 2. + 0.5;
+<a name="l00379"></a>00379 cy1 = ily1 / 2. + 0.5;
+<a name="l00380"></a>00380 cx2 = ilx2 / 2. + 0.5;
+<a name="l00381"></a>00381 cy2 = ily2 / 2. + 0.5;
+<a name="l00382"></a>00382
<a name="l00383"></a>00383
-<a name="l00384"></a>00384
-<a name="l00385"></a>00385 sinfo_free_imagelist(&cube1);
-<a name="l00386"></a>00386 sinfo_free_imagelist(&cube2);
-<a name="l00387"></a>00387
-<a name="l00388"></a>00388 cknull(tmp_tbl=sinfo_get_strehl_from_2images(med_img1,med_img2,frm1,frm2),
-<a name="l00389"></a>00389 <span class="stringliteral">"Computing strehl"</span>);
-<a name="l00390"></a>00390 check_nomsg(strehl=cpl_table_get_double(tmp_tbl,<span class="stringliteral">"strehl"</span>,0,&status));
-<a name="l00391"></a>00391 sinfo_free_table(&tmp_tbl);
-<a name="l00392"></a>00392 strehl1=sinfo_get_strehl_from_ima(med_img1,frm1);
-<a name="l00393"></a>00393 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Strehl on 1st image=%f"</span>,strehl);
-<a name="l00394"></a>00394 strehl2=sinfo_get_strehl_from_ima(med_img2,frm2);
-<a name="l00395"></a>00395 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Strehl on 2nd image=%f"</span>,strehl);
-<a name="l00396"></a>00396
-<a name="l00397"></a>00397 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
-<a name="l00398"></a>00398 check_nomsg(sinfo_add_com_psf_qclog(fname1,&qclog_tbl));
-<a name="l00399"></a>00399 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl1)) strehl1=-100.;
-<a name="l00400"></a>00400 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL025"</span>,strehl1,
-<a name="l00401"></a>00401 <span class="stringliteral">"STREHL 25 mas"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00402"></a>00402 ck0(sinfo_pro_save_ima(med_img1,ref_set,sof,PSF_MED_CUB_025_FILENAME,
-<a name="l00403"></a>00403 PRO_MED_COADD_PSF,qclog_tbl,plugin_id,config),
-<a name="l00404"></a>00404 <span class="stringliteral">"cannot save ima %s"</span>, PSF_MED_CUB_100_FILENAME);
-<a name="l00405"></a>00405 sinfo_free_table(&qclog_tbl);
+<a name="l00384"></a>00384 sinfo_free_imagelist(&cube1);
+<a name="l00385"></a>00385 sinfo_free_imagelist(&cube2);
+<a name="l00386"></a>00386
+<a name="l00387"></a>00387 cknull(tmp_tbl=sinfo_get_strehl_from_2images(med_img1,med_img2,frm1,frm2),
+<a name="l00388"></a>00388 <span class="stringliteral">"Computing strehl"</span>);
+<a name="l00389"></a>00389 check_nomsg(strehl=cpl_table_get_double(tmp_tbl,<span class="stringliteral">"strehl"</span>,0,&status));
+<a name="l00390"></a>00390 sinfo_free_table(&tmp_tbl);
+<a name="l00391"></a>00391 strehl1=sinfo_get_strehl_from_ima(med_img1,frm1);
+<a name="l00392"></a>00392 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Strehl on 1st image=%f"</span>,strehl);
+<a name="l00393"></a>00393 strehl2=sinfo_get_strehl_from_ima(med_img2,frm2);
+<a name="l00394"></a>00394 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Strehl on 2nd image=%f"</span>,strehl);
+<a name="l00395"></a>00395
+<a name="l00396"></a>00396 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
+<a name="l00397"></a>00397 check_nomsg(sinfo_add_com_psf_qclog(fname1,&qclog_tbl));
+<a name="l00398"></a>00398 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl1)) strehl1=-100.;
+<a name="l00399"></a>00399 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL025"</span>,strehl1,
+<a name="l00400"></a>00400 <span class="stringliteral">"STREHL 25 mas"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00401"></a>00401 ck0(sinfo_pro_save_ima(med_img1,ref_set,sof,PSF_MED_CUB_025_FILENAME,
+<a name="l00402"></a>00402 PRO_MED_COADD_PSF,qclog_tbl,plugin_id,config),
+<a name="l00403"></a>00403 <span class="stringliteral">"cannot save ima %s"</span>, PSF_MED_CUB_100_FILENAME);
+<a name="l00404"></a>00404 sinfo_free_table(&qclog_tbl);
+<a name="l00405"></a>00405
<a name="l00406"></a>00406
-<a name="l00407"></a>00407
-<a name="l00408"></a>00408 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
-<a name="l00409"></a>00409 check_nomsg(sinfo_add_com_psf_qclog(fname2,&qclog_tbl));
-<a name="l00410"></a>00410 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl2)) strehl2=-100.;
-<a name="l00411"></a>00411 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL100"</span>,strehl2,
-<a name="l00412"></a>00412 <span class="stringliteral">"STREHL 100 mas"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00413"></a>00413
-<a name="l00414"></a>00414 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
-<a name="l00415"></a>00415
-<a name="l00416"></a>00416 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL"</span>,strehl,
-<a name="l00417"></a>00417 <span class="stringliteral">"STREHL from both pixel scale images"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00418"></a>00418 ck0(sinfo_pro_save_ima(med_img2,ref_set,sof,PSF_MED_CUB_100_FILENAME,
-<a name="l00419"></a>00419 PRO_MED_COADD_PSF,qclog_tbl,plugin_id,config),
-<a name="l00420"></a>00420 <span class="stringliteral">"cannot save ima %s"</span>, PSF_MED_CUB_100_FILENAME);
-<a name="l00421"></a>00421
-<a name="l00422"></a>00422 sinfo_free_table(&qclog_tbl);
-<a name="l00423"></a>00423 sinfo_free_image(&med_img2);
-<a name="l00424"></a>00424
-<a name="l00425"></a>00425 }
-<a name="l00426"></a>00426 <span class="comment">/* STREHL computation */</span>
-<a name="l00427"></a>00427
-<a name="l00428"></a>00428 check_nomsg(nsample=cpl_table_get_nrow(ao_performance));
-<a name="l00429"></a>00429 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
-<a name="l00430"></a>00430 check_nomsg(sinfo_add_com_psf_qclog(fname1,&qclog_tbl));
-<a name="l00431"></a>00431
-<a name="l00432"></a>00432 <span class="keywordflow">if</span>(strehl_sw==0) {
-<a name="l00433"></a>00433 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
-<a name="l00434"></a>00434
-<a name="l00435"></a>00435 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL"</span>,strehl,
-<a name="l00436"></a>00436 <span class="stringliteral">"STREHL from image"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00437"></a>00437
-<a name="l00438"></a>00438 }
-<a name="l00439"></a>00439
-<a name="l00440"></a>00440 check_nomsg(strehl=cpl_table_get_column_median(ao_performance,<span class="stringliteral">"strehl"</span>));
-<a name="l00441"></a>00441
-<a name="l00442"></a>00442 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL MED"</span>,strehl,
-<a name="l00443"></a>00443 <span class="stringliteral">"STREHL MEDIAN"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00444"></a>00444
-<a name="l00445"></a>00445 check_nomsg(strehl=cpl_table_get_column_mean(ao_performance,<span class="stringliteral">"strehl"</span>));
-<a name="l00446"></a>00446
-<a name="l00447"></a>00447 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL AVG"</span>,strehl,
-<a name="l00448"></a>00448 <span class="stringliteral">"STREHL AVERAGE"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00449"></a>00449 <span class="comment">/*</span>
-<a name="l00450"></a>00450 <span class="comment"> strehl=sinfo_get_strehl_from_ima(med_img1,frm1);</span>
-<a name="l00451"></a>00451 <span class="comment"></span>
-<a name="l00452"></a>00452 <span class="comment"> ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,"QC STREHL AVG",strehl,</span>
-<a name="l00453"></a>00453 <span class="comment"> "STREHL AVERAGE","%f"));</span>
-<a name="l00454"></a>00454 <span class="comment"> */</span>
-<a name="l00455"></a>00455 <span class="keywordflow">for</span>(i=1;i<nsample;i++) {
-<a name="l00456"></a>00456
-<a name="l00457"></a>00457 check_nomsg(strehl=cpl_table_get_double(ao_performance,<span class="stringliteral">"strehl"</span>,
-<a name="l00458"></a>00458 i,&status));
-<a name="l00459"></a>00459 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
-<a name="l00460"></a>00460
-<a name="l00461"></a>00461 snprintf(key_name,MAX_NAME_SIZE-1,<span class="stringliteral">"%s%d"</span>,<span class="stringliteral">"QC STREHL"</span>,i);
-<a name="l00462"></a>00462 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,key_name,strehl,<span class="stringliteral">"STREHL"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00463"></a>00463
-<a name="l00464"></a>00464 check_nomsg(lam=cpl_table_get_double(ao_performance,<span class="stringliteral">"wavelength"</span>,
-<a name="l00465"></a>00465 i,&status));
-<a name="l00466"></a>00466 snprintf(key_name,MAX_NAME_SIZE-1,<span class="stringliteral">"%s%d"</span>,<span class="stringliteral">"QC LAMBDA"</span>,i);
-<a name="l00467"></a>00467 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,key_name,lam,
-<a name="l00468"></a>00468 <span class="stringliteral">"WAVELENGTH"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00469"></a>00469
-<a name="l00470"></a>00470 }
-<a name="l00471"></a>00471
-<a name="l00472"></a>00472 check_nomsg(strehl=cpl_table_get_column_median(ao_performance,
-<a name="l00473"></a>00473 <span class="stringliteral">"strehl_error"</span>));
-<a name="l00474"></a>00474 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL MEDERR"</span>,strehl,
-<a name="l00475"></a>00475 <span class="stringliteral">"STREHL ERROR MEDIAN"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00476"></a>00476 ck0_nomsg(sinfo_qclog_add_string(qclog_tbl,<span class="stringliteral">"OBS NAME"</span>,obs_name1,
-<a name="l00477"></a>00477 <span class="stringliteral">"OB name"</span>,<span class="stringliteral">"%s"</span>));
-<a name="l00478"></a>00478 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_LAMP_HALO,hlamp_st,
-<a name="l00479"></a>00479 KEY_NAME_LAMP_HALO,<span class="stringliteral">"%d"</span>));
-<a name="l00480"></a>00480 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_SHUT2_ST,shut2_st,
-<a name="l00481"></a>00481 KEY_NAME_SHUT2_ST,<span class="stringliteral">"%d"</span>));
-<a name="l00482"></a>00482
-<a name="l00483"></a>00483 ck0(sinfo_pro_save_tbl(ao_performance,ref_set,sof,
-<a name="l00484"></a>00484 PSF_AO_PERFORMANCE_OUT_FILENAME,
-<a name="l00485"></a>00485 PRO_AO_PERFORMANCE,qclog_tbl,plugin_id,config),
-<a name="l00486"></a>00486 <span class="stringliteral">"cannot save tbl %s"</span>, PSF_AO_PERFORMANCE_OUT_FILENAME);
-<a name="l00487"></a>00487
-<a name="l00488"></a>00488 sinfo_free_table(&qclog_tbl);
-<a name="l00489"></a>00489 sinfo_free_table(&ao_performance);
-<a name="l00490"></a>00490
-<a name="l00491"></a>00491 <span class="comment">/* Encircled energy & FWHM computation */</span>
-<a name="l00492"></a>00492 cknull_nomsg(qclog_tbl=sinfo_qclog_init());
-<a name="l00493"></a>00493 cknull(enc_energy=sinfo_get_encircled_energy(sof,
-<a name="l00494"></a>00494 med_img1,
-<a name="l00495"></a>00495 &fwhm_x,
-<a name="l00496"></a>00496 &fwhm_y,
-<a name="l00497"></a>00497 &qclog_tbl),
-<a name="l00498"></a>00498 <span class="stringliteral">"Computing encircled energy"</span>);
-<a name="l00499"></a>00499
-<a name="l00500"></a>00500 ck0(sinfo_pro_save_tbl(enc_energy,ref_set,sof,PSF_ENC_ENERGY_OUT_FILENAME,
-<a name="l00501"></a>00501 PRO_ENC_ENERGY,qclog_tbl,plugin_id,config),
-<a name="l00502"></a>00502 <span class="stringliteral">"cannot save tbl %s"</span>, PSF_ENC_ENERGY_OUT_FILENAME);
-<a name="l00503"></a>00503
-<a name="l00504"></a>00504 sinfo_free_table(&qclog_tbl);
-<a name="l00505"></a>00505 sinfo_free_table(&enc_energy);
-<a name="l00506"></a>00506
-<a name="l00507"></a>00507 <span class="comment">/* QC log */</span>
-<a name="l00508"></a>00508 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
-<a name="l00509"></a>00509 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC FWHMX"</span>,fwhm_x,
-<a name="l00510"></a>00510 <span class="stringliteral">"QC FWHM X"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00511"></a>00511 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC FWHMY"</span>,fwhm_y,
-<a name="l00512"></a>00512 <span class="stringliteral">"QC FWHM Y"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00513"></a>00513 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_LAMP_HALO,
-<a name="l00514"></a>00514 hlamp_st,KEY_NAME_LAMP_HALO,<span class="stringliteral">"%d"</span>));
-<a name="l00515"></a>00515 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_SHUT2_ST,shut2_st,
-<a name="l00516"></a>00516 KEY_NAME_SHUT2_ST,<span class="stringliteral">"%d"</span>));
-<a name="l00517"></a>00517
-<a name="l00518"></a>00518 ck0(sinfo_pro_save_ima(med_img1,ref_set,sof,cfg->outName,PRO_PSF,
-<a name="l00519"></a>00519 qclog_tbl,plugin_id,config),
-<a name="l00520"></a>00520 <span class="stringliteral">"cannot save ima %s"</span>, cfg->outName);
-<a name="l00521"></a>00521
-<a name="l00522"></a>00522 sinfo_free_table(&qclog_tbl);
-<a name="l00523"></a>00523 sinfo_new_set_wcs_image(med_img1,cfg->outName,cx1, cy1);
-<a name="l00524"></a>00524 sinfo_free_image(&med_img1);
-<a name="l00525"></a>00525 sinfo_free_frameset(&stk);
-<a name="l00526"></a>00526 sinfo_free_psf(&cfg);
-<a name="l00527"></a>00527 <span class="keywordflow">return</span> 0;
-<a name="l00528"></a>00528
-<a name="l00529"></a>00529 cleanup:
-<a name="l00530"></a>00530
-<a name="l00531"></a>00531 sinfo_free_table(&qclog_tbl);
-<a name="l00532"></a>00532 sinfo_free_imagelist(&cube2);
-<a name="l00533"></a>00533 sinfo_free_imagelist(&cube1);
-<a name="l00534"></a>00534 sinfo_free_table(&enc_energy);
-<a name="l00535"></a>00535 sinfo_free_image(&med_img1);
-<a name="l00536"></a>00536 sinfo_free_table(&ao_performance);
-<a name="l00537"></a>00537 sinfo_free_propertylist(&plist) ;
-<a name="l00538"></a>00538 sinfo_free_psf(&cfg);
-<a name="l00539"></a>00539 sinfo_free_frameset(&stk);
-<a name="l00540"></a>00540
-<a name="l00541"></a>00541 <span class="keywordflow">return</span> -1 ;
-<a name="l00542"></a>00542
-<a name="l00543"></a>00543 }
+<a name="l00407"></a>00407 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
+<a name="l00408"></a>00408 check_nomsg(sinfo_add_com_psf_qclog(fname2,&qclog_tbl));
+<a name="l00409"></a>00409 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl2)) strehl2=-100.;
+<a name="l00410"></a>00410 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL100"</span>,strehl2,
+<a name="l00411"></a>00411 <span class="stringliteral">"STREHL 100 mas"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00412"></a>00412
+<a name="l00413"></a>00413 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
+<a name="l00414"></a>00414
+<a name="l00415"></a>00415 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL"</span>,strehl,
+<a name="l00416"></a>00416 <span class="stringliteral">"STREHL from both pixel scale images"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00417"></a>00417 ck0(sinfo_pro_save_ima(med_img2,ref_set,sof,PSF_MED_CUB_100_FILENAME,
+<a name="l00418"></a>00418 PRO_MED_COADD_PSF,qclog_tbl,plugin_id,config),
+<a name="l00419"></a>00419 <span class="stringliteral">"cannot save ima %s"</span>, PSF_MED_CUB_100_FILENAME);
+<a name="l00420"></a>00420
+<a name="l00421"></a>00421 sinfo_free_table(&qclog_tbl);
+<a name="l00422"></a>00422 sinfo_free_image(&med_img2);
+<a name="l00423"></a>00423
+<a name="l00424"></a>00424 }
+<a name="l00425"></a>00425 <span class="comment">/* STREHL computation */</span>
+<a name="l00426"></a>00426
+<a name="l00427"></a>00427 check_nomsg(nsample=cpl_table_get_nrow(ao_performance));
+<a name="l00428"></a>00428 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
+<a name="l00429"></a>00429 check_nomsg(sinfo_add_com_psf_qclog(fname1,&qclog_tbl));
+<a name="l00430"></a>00430
+<a name="l00431"></a>00431 <span class="keywordflow">if</span>(strehl_sw==0) {
+<a name="l00432"></a>00432 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
+<a name="l00433"></a>00433
+<a name="l00434"></a>00434 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL"</span>,strehl,
+<a name="l00435"></a>00435 <span class="stringliteral">"STREHL from image"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00436"></a>00436
+<a name="l00437"></a>00437 }
+<a name="l00438"></a>00438
+<a name="l00439"></a>00439 check_nomsg(strehl=cpl_table_get_column_median(ao_performance,<span class="stringliteral">"strehl"</span>));
+<a name="l00440"></a>00440
+<a name="l00441"></a>00441 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL MED"</span>,strehl,
+<a name="l00442"></a>00442 <span class="stringliteral">"STREHL MEDIAN"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00443"></a>00443
+<a name="l00444"></a>00444 check_nomsg(strehl=cpl_table_get_column_mean(ao_performance,<span class="stringliteral">"strehl"</span>));
+<a name="l00445"></a>00445
+<a name="l00446"></a>00446 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL AVG"</span>,strehl,
+<a name="l00447"></a>00447 <span class="stringliteral">"STREHL AVERAGE"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00448"></a>00448 <span class="comment">/*</span>
+<a name="l00449"></a>00449 <span class="comment"> strehl=sinfo_get_strehl_from_ima(med_img1,frm1);</span>
+<a name="l00450"></a>00450 <span class="comment"></span>
+<a name="l00451"></a>00451 <span class="comment"> ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,"QC STREHL AVG",strehl,</span>
+<a name="l00452"></a>00452 <span class="comment"> "STREHL AVERAGE","%f"));</span>
+<a name="l00453"></a>00453 <span class="comment"> */</span>
+<a name="l00454"></a>00454 <span class="keywordflow">for</span>(i=1;i<nsample;i++) {
+<a name="l00455"></a>00455
+<a name="l00456"></a>00456 check_nomsg(strehl=cpl_table_get_double(ao_performance,<span class="stringliteral">"strehl"</span>,
+<a name="l00457"></a>00457 i,&status));
+<a name="l00458"></a>00458 <span class="keywordflow">if</span>(<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(strehl)) strehl=-100.;
+<a name="l00459"></a>00459
+<a name="l00460"></a>00460 snprintf(key_name,MAX_NAME_SIZE-1,<span class="stringliteral">"%s%d"</span>,<span class="stringliteral">"QC STREHL"</span>,i);
+<a name="l00461"></a>00461 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,key_name,strehl,<span class="stringliteral">"STREHL"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00462"></a>00462
+<a name="l00463"></a>00463 check_nomsg(lam=cpl_table_get_double(ao_performance,<span class="stringliteral">"wavelength"</span>,
+<a name="l00464"></a>00464 i,&status));
+<a name="l00465"></a>00465 snprintf(key_name,MAX_NAME_SIZE-1,<span class="stringliteral">"%s%d"</span>,<span class="stringliteral">"QC LAMBDA"</span>,i);
+<a name="l00466"></a>00466 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,key_name,lam,
+<a name="l00467"></a>00467 <span class="stringliteral">"WAVELENGTH"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00468"></a>00468
+<a name="l00469"></a>00469 }
+<a name="l00470"></a>00470
+<a name="l00471"></a>00471 check_nomsg(strehl=cpl_table_get_column_median(ao_performance,
+<a name="l00472"></a>00472 <span class="stringliteral">"strehl_error"</span>));
+<a name="l00473"></a>00473 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC STREHL MEDERR"</span>,strehl,
+<a name="l00474"></a>00474 <span class="stringliteral">"STREHL ERROR MEDIAN"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00475"></a>00475 ck0_nomsg(sinfo_qclog_add_string(qclog_tbl,<span class="stringliteral">"OBS NAME"</span>,obs_name1,
+<a name="l00476"></a>00476 <span class="stringliteral">"OB name"</span>,<span class="stringliteral">"%s"</span>));
+<a name="l00477"></a>00477 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_LAMP_HALO,hlamp_st,
+<a name="l00478"></a>00478 KEY_NAME_LAMP_HALO,<span class="stringliteral">"%d"</span>));
+<a name="l00479"></a>00479 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_SHUT2_ST,shut2_st,
+<a name="l00480"></a>00480 KEY_NAME_SHUT2_ST,<span class="stringliteral">"%d"</span>));
+<a name="l00481"></a>00481
+<a name="l00482"></a>00482 ck0(sinfo_pro_save_tbl(ao_performance,ref_set,sof,
+<a name="l00483"></a>00483 PSF_AO_PERFORMANCE_OUT_FILENAME,
+<a name="l00484"></a>00484 PRO_AO_PERFORMANCE,qclog_tbl,plugin_id,config),
+<a name="l00485"></a>00485 <span class="stringliteral">"cannot save tbl %s"</span>, PSF_AO_PERFORMANCE_OUT_FILENAME);
+<a name="l00486"></a>00486
+<a name="l00487"></a>00487 sinfo_free_table(&qclog_tbl);
+<a name="l00488"></a>00488 sinfo_free_table(&ao_performance);
+<a name="l00489"></a>00489
+<a name="l00490"></a>00490 <span class="comment">/* Encircled energy & FWHM computation */</span>
+<a name="l00491"></a>00491 cknull_nomsg(qclog_tbl=sinfo_qclog_init());
+<a name="l00492"></a>00492 cknull(enc_energy=sinfo_get_encircled_energy(sof,
+<a name="l00493"></a>00493 med_img1,
+<a name="l00494"></a>00494 &fwhm_x,
+<a name="l00495"></a>00495 &fwhm_y,
+<a name="l00496"></a>00496 &qclog_tbl),
+<a name="l00497"></a>00497 <span class="stringliteral">"Computing encircled energy"</span>);
+<a name="l00498"></a>00498
+<a name="l00499"></a>00499 ck0(sinfo_pro_save_tbl(enc_energy,ref_set,sof,PSF_ENC_ENERGY_OUT_FILENAME,
+<a name="l00500"></a>00500 PRO_ENC_ENERGY,qclog_tbl,plugin_id,config),
+<a name="l00501"></a>00501 <span class="stringliteral">"cannot save tbl %s"</span>, PSF_ENC_ENERGY_OUT_FILENAME);
+<a name="l00502"></a>00502
+<a name="l00503"></a>00503 sinfo_free_table(&qclog_tbl);
+<a name="l00504"></a>00504 sinfo_free_table(&enc_energy);
+<a name="l00505"></a>00505
+<a name="l00506"></a>00506 <span class="comment">/* QC log */</span>
+<a name="l00507"></a>00507 cknull_nomsg(qclog_tbl = sinfo_qclog_init());
+<a name="l00508"></a>00508 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC FWHMX"</span>,fwhm_x,
+<a name="l00509"></a>00509 <span class="stringliteral">"QC FWHM X"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00510"></a>00510 ck0_nomsg(sinfo_qclog_add_double(qclog_tbl,<span class="stringliteral">"QC FWHMY"</span>,fwhm_y,
+<a name="l00511"></a>00511 <span class="stringliteral">"QC FWHM Y"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00512"></a>00512 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_LAMP_HALO,
+<a name="l00513"></a>00513 hlamp_st,KEY_NAME_LAMP_HALO,<span class="stringliteral">"%d"</span>));
+<a name="l00514"></a>00514 ck0_nomsg(sinfo_qclog_add_bool(qclog_tbl,PAF_NAME_SHUT2_ST,shut2_st,
+<a name="l00515"></a>00515 KEY_NAME_SHUT2_ST,<span class="stringliteral">"%d"</span>));
+<a name="l00516"></a>00516
+<a name="l00517"></a>00517 ck0(sinfo_pro_save_ima(med_img1,ref_set,sof,cfg->outName,PRO_PSF,
+<a name="l00518"></a>00518 qclog_tbl,plugin_id,config),
+<a name="l00519"></a>00519 <span class="stringliteral">"cannot save ima %s"</span>, cfg->outName);
+<a name="l00520"></a>00520
+<a name="l00521"></a>00521 sinfo_free_table(&qclog_tbl);
+<a name="l00522"></a>00522 sinfo_new_set_wcs_image(med_img1,cfg->outName,cx1, cy1);
+<a name="l00523"></a>00523 sinfo_free_image(&med_img1);
+<a name="l00524"></a>00524 sinfo_free_frameset(&stk);
+<a name="l00525"></a>00525 sinfo_free_psf(&cfg);
+<a name="l00526"></a>00526 <span class="keywordflow">return</span> 0;
+<a name="l00527"></a>00527
+<a name="l00528"></a>00528 cleanup:
+<a name="l00529"></a>00529
+<a name="l00530"></a>00530 sinfo_free_table(&qclog_tbl);
+<a name="l00531"></a>00531 sinfo_free_imagelist(&cube2);
+<a name="l00532"></a>00532 sinfo_free_imagelist(&cube1);
+<a name="l00533"></a>00533 sinfo_free_table(&enc_energy);
+<a name="l00534"></a>00534 sinfo_free_image(&med_img1);
+<a name="l00535"></a>00535 sinfo_free_table(&ao_performance);
+<a name="l00536"></a>00536 sinfo_free_propertylist(&plist) ;
+<a name="l00537"></a>00537 sinfo_free_psf(&cfg);
+<a name="l00538"></a>00538 sinfo_free_frameset(&stk);
+<a name="l00539"></a>00539
+<a name="l00540"></a>00540 <span class="keywordflow">return</span> -1 ;
+<a name="l00541"></a>00541
+<a name="l00542"></a>00542 }
+<a name="l00543"></a>00543
<a name="l00544"></a>00544
<a name="l00545"></a>00545
<a name="l00546"></a>00546
-<a name="l00547"></a>00547
-<a name="l00548"></a>00548 <span class="keyword">static</span> cpl_error_code
-<a name="l00549"></a>00549 sinfo_add_com_psf_qclog(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname,cpl_table** qclog_tbl)
-<a name="l00550"></a>00550 {
-<a name="l00551"></a>00551
-<a name="l00552"></a>00552 cpl_propertylist* plist=NULL;
-<a name="l00553"></a>00553
-<a name="l00554"></a>00554 <span class="comment">/* QC log */</span>
-<a name="l00555"></a>00555 cknull(plist = cpl_propertylist_load(fname, 0),
-<a name="l00556"></a>00556 <span class="stringliteral">"getting header from reference ima frame %s"</span>,fname);
-<a name="l00557"></a>00557
-<a name="l00558"></a>00558 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_LOOP_STATE)) {
-<a name="l00559"></a>00559 sinfo_qclog_add_string(*qclog_tbl,KEY_NAME_LOOP_STATE,
-<a name="l00560"></a>00560 cpl_propertylist_get_string(plist,KEY_NAME_LOOP_STATE),
-<a name="l00561"></a>00561 KEY_HELP_LOOP_STATE,<span class="stringliteral">"%s"</span>);
-<a name="l00562"></a>00562 }
+<a name="l00547"></a>00547 <span class="keyword">static</span> cpl_error_code
+<a name="l00548"></a>00548 sinfo_add_com_psf_qclog(<span class="keyword">const</span> <span class="keywordtype">char</span>* fname,cpl_table** qclog_tbl)
+<a name="l00549"></a>00549 {
+<a name="l00550"></a>00550
+<a name="l00551"></a>00551 cpl_propertylist* plist=NULL;
+<a name="l00552"></a>00552
+<a name="l00553"></a>00553 <span class="comment">/* QC log */</span>
+<a name="l00554"></a>00554 cknull(plist = cpl_propertylist_load(fname, 0),
+<a name="l00555"></a>00555 <span class="stringliteral">"getting header from reference ima frame %s"</span>,fname);
+<a name="l00556"></a>00556
+<a name="l00557"></a>00557 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_LOOP_STATE)) {
+<a name="l00558"></a>00558 sinfo_qclog_add_string(*qclog_tbl,KEY_NAME_LOOP_STATE,
+<a name="l00559"></a>00559 cpl_propertylist_get_string(plist,KEY_NAME_LOOP_STATE),
+<a name="l00560"></a>00560 KEY_HELP_LOOP_STATE,<span class="stringliteral">"%s"</span>);
+<a name="l00561"></a>00561 }
+<a name="l00562"></a>00562
<a name="l00563"></a>00563
<a name="l00564"></a>00564
-<a name="l00565"></a>00565
-<a name="l00566"></a>00566 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_LOOP_LGS)) {
-<a name="l00567"></a>00567 sinfo_qclog_add_int(*qclog_tbl,KEY_NAME_LOOP_LGS,
-<a name="l00568"></a>00568 cpl_propertylist_get_int(plist,KEY_NAME_LOOP_LGS),
-<a name="l00569"></a>00569 KEY_HELP_LOOP_LGS,<span class="stringliteral">"%d"</span>);
-<a name="l00570"></a>00570 }
+<a name="l00565"></a>00565 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_LOOP_LGS)) {
+<a name="l00566"></a>00566 sinfo_qclog_add_int(*qclog_tbl,KEY_NAME_LOOP_LGS,
+<a name="l00567"></a>00567 cpl_propertylist_get_int(plist,KEY_NAME_LOOP_LGS),
+<a name="l00568"></a>00568 KEY_HELP_LOOP_LGS,<span class="stringliteral">"%d"</span>);
+<a name="l00569"></a>00569 }
+<a name="l00570"></a>00570
<a name="l00571"></a>00571
-<a name="l00572"></a>00572
-<a name="l00573"></a>00573 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_INS1_MODE)) {
-<a name="l00574"></a>00574 sinfo_qclog_add_string(*qclog_tbl,KEY_NAME_INS1_MODE,
-<a name="l00575"></a>00575 cpl_propertylist_get_string(plist,KEY_NAME_INS1_MODE),
-<a name="l00576"></a>00576 KEY_HELP_INS1_MODE,<span class="stringliteral">"%s"</span>);
-<a name="l00577"></a>00577 }
+<a name="l00572"></a>00572 <span class="keywordflow">if</span> (sinfo_propertylist_has(plist, KEY_NAME_INS1_MODE)) {
+<a name="l00573"></a>00573 sinfo_qclog_add_string(*qclog_tbl,KEY_NAME_INS1_MODE,
+<a name="l00574"></a>00574 cpl_propertylist_get_string(plist,KEY_NAME_INS1_MODE),
+<a name="l00575"></a>00575 KEY_HELP_INS1_MODE,<span class="stringliteral">"%s"</span>);
+<a name="l00576"></a>00576 }
+<a name="l00577"></a>00577
<a name="l00578"></a>00578
-<a name="l00579"></a>00579
-<a name="l00580"></a>00580 cleanup:
-<a name="l00581"></a>00581 sinfo_free_propertylist(&plist);
-<a name="l00582"></a>00582
-<a name="l00583"></a>00583 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l00584"></a>00584 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l00585"></a>00585 } <span class="keywordflow">else</span> {
-<a name="l00586"></a>00586 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l00587"></a>00587 }
+<a name="l00579"></a>00579 cleanup:
+<a name="l00580"></a>00580 sinfo_free_propertylist(&plist);
+<a name="l00581"></a>00581
+<a name="l00582"></a>00582 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l00583"></a>00583 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l00584"></a>00584 } <span class="keywordflow">else</span> {
+<a name="l00585"></a>00585 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l00586"></a>00586 }
+<a name="l00587"></a>00587
<a name="l00588"></a>00588
-<a name="l00589"></a>00589
-<a name="l00590"></a>00590 }
-<a name="l00591"></a>00591
-<a name="l00592"></a>00592 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00593"></a>00593 sinfo_get_strehl_from_image(cpl_image* img,
-<a name="l00594"></a>00594 <span class="keywordtype">double</span> ws,
-<a name="l00595"></a>00595 <span class="keywordtype">double</span> we,
-<a name="l00596"></a>00596 <span class="keywordtype">double</span> pscale,
-<a name="l00597"></a>00597 <span class="keywordtype">double</span> strehl_star_radius,
-<a name="l00598"></a>00598 <span class="keywordtype">double</span> strehl_bg_r1,
-<a name="l00599"></a>00599 <span class="keywordtype">double</span> strehl_bg_r2,
-<a name="l00600"></a>00600 <span class="keywordtype">double</span>* strehl,
-<a name="l00601"></a>00601 <span class="keywordtype">double</span>* strehl_err)
-<a name="l00602"></a>00602 {
-<a name="l00603"></a>00603 cpl_errorstate clean_state = cpl_errorstate_get();
-<a name="l00604"></a>00604
-<a name="l00605"></a>00605 cpl_image* img_dup=NULL;
-<a name="l00606"></a>00606
-<a name="l00607"></a>00607 <span class="keywordtype">double</span> dlam=0.;
-<a name="l00608"></a>00608 <span class="keywordtype">double</span> lam=0.;
-<a name="l00609"></a>00609
-<a name="l00610"></a>00610 <span class="keywordtype">double</span> max_ima_cx=0.;
-<a name="l00611"></a>00611 <span class="keywordtype">double</span> max_ima_cy=0.;
-<a name="l00612"></a>00612
-<a name="l00613"></a>00613 <span class="keywordtype">double</span> psf_peak=0.;
-<a name="l00614"></a>00614 <span class="keywordtype">double</span> psf_flux=0.;
-<a name="l00615"></a>00615 <span class="keywordtype">double</span> bkg_noise=0.;
-<a name="l00616"></a>00616 <span class="keywordtype">double</span> star_bkg=0.;
-<a name="l00617"></a>00617 <span class="keywordtype">double</span> star_peak=0.;
-<a name="l00618"></a>00618 <span class="keywordtype">double</span> star_flux=0.;
-<a name="l00619"></a>00619
-<a name="l00620"></a>00620 cpl_size max_ima_x=0;
-<a name="l00621"></a>00621 cpl_size max_ima_y=0;
-<a name="l00622"></a>00622 <span class="keywordtype">int</span> wllx=0;
-<a name="l00623"></a>00623 <span class="keywordtype">int</span> wlly=0;
-<a name="l00624"></a>00624 <span class="keywordtype">int</span> wurx=0;
-<a name="l00625"></a>00625 <span class="keywordtype">int</span> wury=0;
-<a name="l00626"></a>00626 <span class="keywordtype">int</span> ima_szx=0;
-<a name="l00627"></a>00627 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00589"></a>00589 }
+<a name="l00590"></a>00590
+<a name="l00591"></a>00591 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00592"></a>00592 sinfo_get_strehl_from_image(cpl_image* img,
+<a name="l00593"></a>00593 <span class="keywordtype">double</span> ws,
+<a name="l00594"></a>00594 <span class="keywordtype">double</span> we,
+<a name="l00595"></a>00595 <span class="keywordtype">double</span> pscale,
+<a name="l00596"></a>00596 <span class="keywordtype">double</span> strehl_star_radius,
+<a name="l00597"></a>00597 <span class="keywordtype">double</span> strehl_bg_r1,
+<a name="l00598"></a>00598 <span class="keywordtype">double</span> strehl_bg_r2,
+<a name="l00599"></a>00599 <span class="keywordtype">double</span>* strehl,
+<a name="l00600"></a>00600 <span class="keywordtype">double</span>* strehl_err)
+<a name="l00601"></a>00601 {
+<a name="l00602"></a>00602 cpl_errorstate clean_state = cpl_errorstate_get();
+<a name="l00603"></a>00603
+<a name="l00604"></a>00604 cpl_image* img_dup=NULL;
+<a name="l00605"></a>00605
+<a name="l00606"></a>00606 <span class="keywordtype">double</span> dlam=0.;
+<a name="l00607"></a>00607 <span class="keywordtype">double</span> lam=0.;
+<a name="l00608"></a>00608
+<a name="l00609"></a>00609 <span class="keywordtype">double</span> max_ima_cx=0.;
+<a name="l00610"></a>00610 <span class="keywordtype">double</span> max_ima_cy=0.;
+<a name="l00611"></a>00611
+<a name="l00612"></a>00612 <span class="keywordtype">double</span> psf_peak=0.;
+<a name="l00613"></a>00613 <span class="keywordtype">double</span> psf_flux=0.;
+<a name="l00614"></a>00614 <span class="keywordtype">double</span> bkg_noise=0.;
+<a name="l00615"></a>00615 <span class="keywordtype">double</span> star_bkg=0.;
+<a name="l00616"></a>00616 <span class="keywordtype">double</span> star_peak=0.;
+<a name="l00617"></a>00617 <span class="keywordtype">double</span> star_flux=0.;
+<a name="l00618"></a>00618
+<a name="l00619"></a>00619 cpl_size max_ima_x=0;
+<a name="l00620"></a>00620 cpl_size max_ima_y=0;
+<a name="l00621"></a>00621 <span class="keywordtype">int</span> wllx=0;
+<a name="l00622"></a>00622 <span class="keywordtype">int</span> wlly=0;
+<a name="l00623"></a>00623 <span class="keywordtype">int</span> wurx=0;
+<a name="l00624"></a>00624 <span class="keywordtype">int</span> wury=0;
+<a name="l00625"></a>00625 <span class="keywordtype">int</span> ima_szx=0;
+<a name="l00626"></a>00626 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00627"></a>00627
<a name="l00628"></a>00628
-<a name="l00629"></a>00629
-<a name="l00630"></a>00630 lam = (double)0.5*(ws+we);
-<a name="l00631"></a>00631 dlam=we-ws;
-<a name="l00632"></a>00632 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ws=%f we=%f dl=%f"</span>,ws,we,dlam);
-<a name="l00633"></a>00633 check_nomsg(img_dup=cpl_image_duplicate(img));
-<a name="l00634"></a>00634 sinfo_clean_nan(&img_dup);
-<a name="l00635"></a>00635 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
-<a name="l00636"></a>00636 sinfo_free_image(&img_dup);
-<a name="l00637"></a>00637
-<a name="l00638"></a>00638 check_nomsg(ima_szx=cpl_image_get_size_x(img));
-<a name="l00639"></a>00639 check_nomsg(ima_szy=cpl_image_get_size_y(img));
-<a name="l00640"></a>00640 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
-<a name="l00641"></a>00641 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
-<a name="l00642"></a>00642 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
-<a name="l00643"></a>00643 ima_szx,ima_szy);
-<a name="l00644"></a>00644
-<a name="l00645"></a>00645 <span class="comment">//cpl_image_get_maxpos_window(img,wllx,wlly,wurx,wury,&max_ima_x,&max_ima_y);</span>
-<a name="l00646"></a>00646
-<a name="l00647"></a>00647 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
-<a name="l00648"></a>00648 wurx,wury));
-<a name="l00649"></a>00649 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
-<a name="l00650"></a>00650 wurx,wury));
+<a name="l00629"></a>00629 lam = (double)0.5*(ws+we);
+<a name="l00630"></a>00630 dlam=we-ws;
+<a name="l00631"></a>00631 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ws=%f we=%f dl=%f"</span>,ws,we,dlam);
+<a name="l00632"></a>00632 check_nomsg(img_dup=cpl_image_duplicate(img));
+<a name="l00633"></a>00633 sinfo_clean_nan(&img_dup);
+<a name="l00634"></a>00634 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
+<a name="l00635"></a>00635 sinfo_free_image(&img_dup);
+<a name="l00636"></a>00636
+<a name="l00637"></a>00637 check_nomsg(ima_szx=cpl_image_get_size_x(img));
+<a name="l00638"></a>00638 check_nomsg(ima_szy=cpl_image_get_size_y(img));
+<a name="l00639"></a>00639 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
+<a name="l00640"></a>00640 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
+<a name="l00641"></a>00641 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
+<a name="l00642"></a>00642 ima_szx,ima_szy);
+<a name="l00643"></a>00643
+<a name="l00644"></a>00644 <span class="comment">//cpl_image_get_maxpos_window(img,wllx,wlly,wurx,wury,&max_ima_x,&max_ima_y);</span>
+<a name="l00645"></a>00645
+<a name="l00646"></a>00646 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
+<a name="l00647"></a>00647 wurx,wury));
+<a name="l00648"></a>00648 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
+<a name="l00649"></a>00649 wurx,wury));
+<a name="l00650"></a>00650
<a name="l00651"></a>00651
-<a name="l00652"></a>00652
-<a name="l00653"></a>00653 <span class="keywordflow">if</span>(CPL_ERROR_NONE != sinfo_strehl_compute_one(img,
-<a name="l00654"></a>00654 SINFO_STREHL_M1,
-<a name="l00655"></a>00655 SINFO_STREHL_M2,
-<a name="l00656"></a>00656 lam,
-<a name="l00657"></a>00657 dlam,
-<a name="l00658"></a>00658 pscale,
-<a name="l00659"></a>00659 max_ima_x,
-<a name="l00660"></a>00660 max_ima_y,
-<a name="l00661"></a>00661 strehl_star_radius,
-<a name="l00662"></a>00662 strehl_bg_r1,
-<a name="l00663"></a>00663 strehl_bg_r2,
-<a name="l00664"></a>00664 SINFO_STREHL_BOX_SIZE,
-<a name="l00665"></a>00665 strehl,
-<a name="l00666"></a>00666 strehl_err,
-<a name="l00667"></a>00667 &star_bkg,
-<a name="l00668"></a>00668 &star_peak,
-<a name="l00669"></a>00669 &star_flux,
-<a name="l00670"></a>00670 &psf_peak,
-<a name="l00671"></a>00671 &psf_flux,
-<a name="l00672"></a>00672 &bkg_noise)) {
+<a name="l00652"></a>00652 <span class="keywordflow">if</span>(CPL_ERROR_NONE != sinfo_strehl_compute_one(img,
+<a name="l00653"></a>00653 SINFO_STREHL_M1,
+<a name="l00654"></a>00654 SINFO_STREHL_M2,
+<a name="l00655"></a>00655 lam,
+<a name="l00656"></a>00656 dlam,
+<a name="l00657"></a>00657 pscale,
+<a name="l00658"></a>00658 max_ima_x,
+<a name="l00659"></a>00659 max_ima_y,
+<a name="l00660"></a>00660 strehl_star_radius,
+<a name="l00661"></a>00661 strehl_bg_r1,
+<a name="l00662"></a>00662 strehl_bg_r2,
+<a name="l00663"></a>00663 SINFO_STREHL_BOX_SIZE,
+<a name="l00664"></a>00664 strehl,
+<a name="l00665"></a>00665 strehl_err,
+<a name="l00666"></a>00666 &star_bkg,
+<a name="l00667"></a>00667 &star_peak,
+<a name="l00668"></a>00668 &star_flux,
+<a name="l00669"></a>00669 &psf_peak,
+<a name="l00670"></a>00670 &psf_flux,
+<a name="l00671"></a>00671 &bkg_noise)) {
+<a name="l00672"></a>00672
<a name="l00673"></a>00673
-<a name="l00674"></a>00674
-<a name="l00675"></a>00675 *strehl=-1;
-<a name="l00676"></a>00676 *strehl_err=0;
-<a name="l00677"></a>00677 irplib_error_recover(clean_state,<span class="stringliteral">"Problem computing strehl"</span>);
-<a name="l00678"></a>00678
-<a name="l00679"></a>00679 }
-<a name="l00680"></a>00680
-<a name="l00681"></a>00681 <span class="keywordflow">return</span> 0;
-<a name="l00682"></a>00682
-<a name="l00683"></a>00683 cleanup:
-<a name="l00684"></a>00684
-<a name="l00685"></a>00685 <span class="keywordflow">return</span> -1;
-<a name="l00686"></a>00686
-<a name="l00687"></a>00687 }
+<a name="l00674"></a>00674 *strehl=-1;
+<a name="l00675"></a>00675 *strehl_err=0;
+<a name="l00676"></a>00676 irplib_error_recover(clean_state,<span class="stringliteral">"Problem computing strehl"</span>);
+<a name="l00677"></a>00677
+<a name="l00678"></a>00678 }
+<a name="l00679"></a>00679
+<a name="l00680"></a>00680 <span class="keywordflow">return</span> 0;
+<a name="l00681"></a>00681
+<a name="l00682"></a>00682 cleanup:
+<a name="l00683"></a>00683
+<a name="l00684"></a>00684 <span class="keywordflow">return</span> -1;
+<a name="l00685"></a>00685
+<a name="l00686"></a>00686 }
+<a name="l00687"></a>00687
<a name="l00688"></a>00688
<a name="l00689"></a>00689
<a name="l00690"></a>00690
<a name="l00691"></a>00691
<a name="l00692"></a>00692
-<a name="l00693"></a>00693
-<a name="l00694"></a>00694 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00695"></a>00695 sinfo_get_strehl_from_slice(cpl_imagelist* cube,
-<a name="l00696"></a>00696 <span class="keywordtype">double</span> disp,
-<a name="l00697"></a>00697 <span class="keywordtype">double</span> cWave,
-<a name="l00698"></a>00698 <span class="keywordtype">double</span> ws,
-<a name="l00699"></a>00699 <span class="keywordtype">double</span> we,
-<a name="l00700"></a>00700 <span class="keywordtype">double</span> pscale,
-<a name="l00701"></a>00701 <span class="keywordtype">double</span> strehl_star_radius,
-<a name="l00702"></a>00702 <span class="keywordtype">double</span> strehl_bg_r1,
-<a name="l00703"></a>00703 <span class="keywordtype">double</span> strehl_bg_r2,
-<a name="l00704"></a>00704 <span class="keywordtype">double</span>* strehl,
-<a name="l00705"></a>00705 <span class="keywordtype">double</span>* strehl_err)
-<a name="l00706"></a>00706 {
+<a name="l00693"></a>00693 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l00694"></a>00694 sinfo_get_strehl_from_slice(cpl_imagelist* cube,
+<a name="l00695"></a>00695 <span class="keywordtype">double</span> disp,
+<a name="l00696"></a>00696 <span class="keywordtype">double</span> cWave,
+<a name="l00697"></a>00697 <span class="keywordtype">double</span> ws,
+<a name="l00698"></a>00698 <span class="keywordtype">double</span> we,
+<a name="l00699"></a>00699 <span class="keywordtype">double</span> pscale,
+<a name="l00700"></a>00700 <span class="keywordtype">double</span> strehl_star_radius,
+<a name="l00701"></a>00701 <span class="keywordtype">double</span> strehl_bg_r1,
+<a name="l00702"></a>00702 <span class="keywordtype">double</span> strehl_bg_r2,
+<a name="l00703"></a>00703 <span class="keywordtype">double</span>* strehl,
+<a name="l00704"></a>00704 <span class="keywordtype">double</span>* strehl_err)
+<a name="l00705"></a>00705 {
+<a name="l00706"></a>00706
<a name="l00707"></a>00707
-<a name="l00708"></a>00708
-<a name="l00709"></a>00709 cpl_errorstate clean_state = cpl_errorstate_get();
+<a name="l00708"></a>00708 cpl_errorstate clean_state = cpl_errorstate_get();
+<a name="l00709"></a>00709
<a name="l00710"></a>00710
-<a name="l00711"></a>00711
-<a name="l00712"></a>00712 cpl_image* img_dup=NULL;
-<a name="l00713"></a>00713 cpl_image* img=NULL;
-<a name="l00714"></a>00714
-<a name="l00715"></a>00715 <span class="keywordtype">double</span> dlam=0.;
-<a name="l00716"></a>00716 <span class="keywordtype">double</span> lam=0.;
-<a name="l00717"></a>00717
-<a name="l00718"></a>00718 <span class="keywordtype">double</span> max_ima_cx=0.;
-<a name="l00719"></a>00719 <span class="keywordtype">double</span> max_ima_cy=0.;
-<a name="l00720"></a>00720 <span class="keywordtype">double</span> psf_peak=0.;
-<a name="l00721"></a>00721 <span class="keywordtype">double</span> psf_flux=0.;
-<a name="l00722"></a>00722 <span class="keywordtype">double</span> bkg_noise=0.;
-<a name="l00723"></a>00723 <span class="keywordtype">double</span> star_bkg=0.;
-<a name="l00724"></a>00724 <span class="keywordtype">double</span> star_peak=0.;
-<a name="l00725"></a>00725 <span class="keywordtype">double</span> star_flux=0.;
-<a name="l00726"></a>00726
-<a name="l00727"></a>00727 cpl_size max_ima_x=0;
-<a name="l00728"></a>00728 cpl_size max_ima_y=0;
-<a name="l00729"></a>00729 <span class="keywordtype">int</span> wllx=0;
-<a name="l00730"></a>00730 <span class="keywordtype">int</span> wlly=0;
-<a name="l00731"></a>00731 <span class="keywordtype">int</span> wurx=0;
-<a name="l00732"></a>00732 <span class="keywordtype">int</span> wury=0;
-<a name="l00733"></a>00733 <span class="keywordtype">int</span> ima_szx=0;
-<a name="l00734"></a>00734 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00711"></a>00711 cpl_image* img_dup=NULL;
+<a name="l00712"></a>00712 cpl_image* img=NULL;
+<a name="l00713"></a>00713
+<a name="l00714"></a>00714 <span class="keywordtype">double</span> dlam=0.;
+<a name="l00715"></a>00715 <span class="keywordtype">double</span> lam=0.;
+<a name="l00716"></a>00716
+<a name="l00717"></a>00717 <span class="keywordtype">double</span> max_ima_cx=0.;
+<a name="l00718"></a>00718 <span class="keywordtype">double</span> max_ima_cy=0.;
+<a name="l00719"></a>00719 <span class="keywordtype">double</span> psf_peak=0.;
+<a name="l00720"></a>00720 <span class="keywordtype">double</span> psf_flux=0.;
+<a name="l00721"></a>00721 <span class="keywordtype">double</span> bkg_noise=0.;
+<a name="l00722"></a>00722 <span class="keywordtype">double</span> star_bkg=0.;
+<a name="l00723"></a>00723 <span class="keywordtype">double</span> star_peak=0.;
+<a name="l00724"></a>00724 <span class="keywordtype">double</span> star_flux=0.;
+<a name="l00725"></a>00725
+<a name="l00726"></a>00726 cpl_size max_ima_x=0;
+<a name="l00727"></a>00727 cpl_size max_ima_y=0;
+<a name="l00728"></a>00728 <span class="keywordtype">int</span> wllx=0;
+<a name="l00729"></a>00729 <span class="keywordtype">int</span> wlly=0;
+<a name="l00730"></a>00730 <span class="keywordtype">int</span> wurx=0;
+<a name="l00731"></a>00731 <span class="keywordtype">int</span> wury=0;
+<a name="l00732"></a>00732 <span class="keywordtype">int</span> ima_szx=0;
+<a name="l00733"></a>00733 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00734"></a>00734
<a name="l00735"></a>00735
-<a name="l00736"></a>00736
-<a name="l00737"></a>00737 lam = (double)0.5*(ws+we);
-<a name="l00738"></a>00738 dlam=we-ws;
+<a name="l00736"></a>00736 lam = (double)0.5*(ws+we);
+<a name="l00737"></a>00737 dlam=we-ws;
+<a name="l00738"></a>00738
<a name="l00739"></a>00739
-<a name="l00740"></a>00740
-<a name="l00741"></a>00741 img=sinfo_new_average_cube_to_image_between_waves(cube,disp,cWave,ws,we);
-<a name="l00742"></a>00742 check_nomsg(img_dup=cpl_image_duplicate(img));
-<a name="l00743"></a>00743 sinfo_clean_nan(&img_dup);
-<a name="l00744"></a>00744 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
-<a name="l00745"></a>00745 check_nomsg(cpl_image_delete(img_dup));
+<a name="l00740"></a>00740 img=sinfo_new_average_cube_to_image_between_waves(cube,disp,cWave,ws,we);
+<a name="l00741"></a>00741 check_nomsg(img_dup=cpl_image_duplicate(img));
+<a name="l00742"></a>00742 sinfo_clean_nan(&img_dup);
+<a name="l00743"></a>00743 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
+<a name="l00744"></a>00744 check_nomsg(cpl_image_delete(img_dup));
+<a name="l00745"></a>00745
<a name="l00746"></a>00746
-<a name="l00747"></a>00747
-<a name="l00748"></a>00748 check_nomsg(ima_szx=cpl_image_get_size_x(img));
-<a name="l00749"></a>00749 check_nomsg(ima_szy=cpl_image_get_size_y(img));
-<a name="l00750"></a>00750 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
-<a name="l00751"></a>00751 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
+<a name="l00747"></a>00747 check_nomsg(ima_szx=cpl_image_get_size_x(img));
+<a name="l00748"></a>00748 check_nomsg(ima_szy=cpl_image_get_size_y(img));
+<a name="l00749"></a>00749 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
+<a name="l00750"></a>00750 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
+<a name="l00751"></a>00751
<a name="l00752"></a>00752
-<a name="l00753"></a>00753
-<a name="l00754"></a>00754 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
-<a name="l00755"></a>00755 ima_szx,ima_szy);
-<a name="l00756"></a>00756
-<a name="l00757"></a>00757 <span class="comment">/*</span>
-<a name="l00758"></a>00758 <span class="comment"> cpl_image_get_maxpos_window(img,wllx,wlly,wurx,wury,&max_ima_x,&max_ima_y);</span>
-<a name="l00759"></a>00759 <span class="comment"> */</span>
-<a name="l00760"></a>00760 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
-<a name="l00761"></a>00761 wurx,wury));
+<a name="l00753"></a>00753 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
+<a name="l00754"></a>00754 ima_szx,ima_szy);
+<a name="l00755"></a>00755
+<a name="l00756"></a>00756 <span class="comment">/*</span>
+<a name="l00757"></a>00757 <span class="comment"> cpl_image_get_maxpos_window(img,wllx,wlly,wurx,wury,&max_ima_x,&max_ima_y);</span>
+<a name="l00758"></a>00758 <span class="comment"> */</span>
+<a name="l00759"></a>00759 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
+<a name="l00760"></a>00760 wurx,wury));
+<a name="l00761"></a>00761
<a name="l00762"></a>00762
<a name="l00763"></a>00763
-<a name="l00764"></a>00764
-<a name="l00765"></a>00765 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
-<a name="l00766"></a>00766 wurx,wury));
+<a name="l00764"></a>00764 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
+<a name="l00765"></a>00765 wurx,wury));
+<a name="l00766"></a>00766
<a name="l00767"></a>00767
<a name="l00768"></a>00768
-<a name="l00769"></a>00769
-<a name="l00770"></a>00770 <span class="keywordflow">if</span>(CPL_ERROR_NONE != irplib_strehl_mark_bad_and_compute(img,
-<a name="l00771"></a>00771 SINFO_STREHL_M1,
-<a name="l00772"></a>00772 SINFO_STREHL_M2,
-<a name="l00773"></a>00773 lam,
-<a name="l00774"></a>00774 dlam,
-<a name="l00775"></a>00775 pscale,
-<a name="l00776"></a>00776 SINFO_STREHL_BOX_SIZE,
-<a name="l00777"></a>00777 max_ima_x,
-<a name="l00778"></a>00778 max_ima_y,
-<a name="l00779"></a>00779 strehl_star_radius,
-<a name="l00780"></a>00780 strehl_bg_r1,
-<a name="l00781"></a>00781 strehl_bg_r2,
-<a name="l00782"></a>00782 NOISE_HSIZE,
-<a name="l00783"></a>00783 NOISE_NSAMPLES,
-<a name="l00784"></a>00784 strehl,
-<a name="l00785"></a>00785 strehl_err,
-<a name="l00786"></a>00786 &star_bkg,
-<a name="l00787"></a>00787 &star_peak,
-<a name="l00788"></a>00788 &star_flux,
-<a name="l00789"></a>00789 &psf_peak,
-<a name="l00790"></a>00790 &psf_flux,
-<a name="l00791"></a>00791 &bkg_noise)) {
+<a name="l00769"></a>00769 <span class="keywordflow">if</span>(CPL_ERROR_NONE != irplib_strehl_mark_bad_and_compute(img,
+<a name="l00770"></a>00770 SINFO_STREHL_M1,
+<a name="l00771"></a>00771 SINFO_STREHL_M2,
+<a name="l00772"></a>00772 lam,
+<a name="l00773"></a>00773 dlam,
+<a name="l00774"></a>00774 pscale,
+<a name="l00775"></a>00775 SINFO_STREHL_BOX_SIZE,
+<a name="l00776"></a>00776 max_ima_x,
+<a name="l00777"></a>00777 max_ima_y,
+<a name="l00778"></a>00778 strehl_star_radius,
+<a name="l00779"></a>00779 strehl_bg_r1,
+<a name="l00780"></a>00780 strehl_bg_r2,
+<a name="l00781"></a>00781 NOISE_HSIZE,
+<a name="l00782"></a>00782 NOISE_NSAMPLES,
+<a name="l00783"></a>00783 strehl,
+<a name="l00784"></a>00784 strehl_err,
+<a name="l00785"></a>00785 &star_bkg,
+<a name="l00786"></a>00786 &star_peak,
+<a name="l00787"></a>00787 &star_flux,
+<a name="l00788"></a>00788 &psf_peak,
+<a name="l00789"></a>00789 &psf_flux,
+<a name="l00790"></a>00790 &bkg_noise)) {
+<a name="l00791"></a>00791
<a name="l00792"></a>00792
-<a name="l00793"></a>00793
-<a name="l00794"></a>00794 *strehl=-1;
-<a name="l00795"></a>00795 *strehl_err=0;
-<a name="l00796"></a>00796 irplib_error_recover(clean_state,<span class="stringliteral">"Problem computing strehl"</span>);
-<a name="l00797"></a>00797
-<a name="l00798"></a>00798 }
-<a name="l00799"></a>00799
-<a name="l00800"></a>00800 <span class="comment">/*</span>
-<a name="l00801"></a>00801 <span class="comment"> cpl_msg_info(__func__,"stehl=%f err=%f star_bkg=%f star_peak=%f star_flux=%f",</span>
-<a name="l00802"></a>00802 <span class="comment"> *strehl,*strehl_err,star_bkg,star_peak,star_flux);</span>
-<a name="l00803"></a>00803 <span class="comment"> cpl_msg_info(__func__,"psf_peak=%f psf_flux=%f bkg_noise=%f",</span>
-<a name="l00804"></a>00804 <span class="comment"> psf_peak,psf_flux,bkg_noise);</span>
-<a name="l00805"></a>00805 <span class="comment"> */</span>
-<a name="l00806"></a>00806 sinfo_free_image(&img);
+<a name="l00793"></a>00793 *strehl=-1;
+<a name="l00794"></a>00794 *strehl_err=0;
+<a name="l00795"></a>00795 irplib_error_recover(clean_state,<span class="stringliteral">"Problem computing strehl"</span>);
+<a name="l00796"></a>00796
+<a name="l00797"></a>00797 }
+<a name="l00798"></a>00798
+<a name="l00799"></a>00799 <span class="comment">/*</span>
+<a name="l00800"></a>00800 <span class="comment"> cpl_msg_info(__func__,"stehl=%f err=%f star_bkg=%f star_peak=%f star_flux=%f",</span>
+<a name="l00801"></a>00801 <span class="comment"> *strehl,*strehl_err,star_bkg,star_peak,star_flux);</span>
+<a name="l00802"></a>00802 <span class="comment"> cpl_msg_info(__func__,"psf_peak=%f psf_flux=%f bkg_noise=%f",</span>
+<a name="l00803"></a>00803 <span class="comment"> psf_peak,psf_flux,bkg_noise);</span>
+<a name="l00804"></a>00804 <span class="comment"> */</span>
+<a name="l00805"></a>00805 sinfo_free_image(&img);
+<a name="l00806"></a>00806
<a name="l00807"></a>00807
-<a name="l00808"></a>00808
-<a name="l00809"></a>00809 <span class="keywordflow">return</span> 0;
-<a name="l00810"></a>00810
-<a name="l00811"></a>00811 cleanup:
-<a name="l00812"></a>00812 <span class="keywordflow">return</span> -1;
-<a name="l00813"></a>00813
-<a name="l00814"></a>00814 }
+<a name="l00808"></a>00808 <span class="keywordflow">return</span> 0;
+<a name="l00809"></a>00809
+<a name="l00810"></a>00810 cleanup:
+<a name="l00811"></a>00811 <span class="keywordflow">return</span> -1;
+<a name="l00812"></a>00812
+<a name="l00813"></a>00813 }
+<a name="l00814"></a>00814
<a name="l00815"></a>00815
<a name="l00816"></a>00816
-<a name="l00817"></a>00817
-<a name="l00818"></a>00818 cpl_table* sinfo_get_encircled_energy(cpl_frameset* sof,
-<a name="l00819"></a>00819 cpl_image* img,
-<a name="l00820"></a>00820 <span class="keywordtype">double</span>* fwhm_x,
-<a name="l00821"></a>00821 <span class="keywordtype">double</span>* fwhm_y,
-<a name="l00822"></a>00822 cpl_table** qclog_tbl)
-<a name="l00823"></a>00823 {
-<a name="l00824"></a>00824
-<a name="l00825"></a>00825 cpl_errorstate clean_state = cpl_errorstate_get();
-<a name="l00826"></a>00826
-<a name="l00827"></a>00827 cpl_image* img_dup=NULL;
-<a name="l00828"></a>00828 cpl_size max_ima_x=0;
-<a name="l00829"></a>00829 cpl_size max_ima_y=0;
-<a name="l00830"></a>00830 <span class="keywordtype">int</span> wllx=0;
-<a name="l00831"></a>00831 <span class="keywordtype">int</span> wlly=0;
-<a name="l00832"></a>00832 <span class="keywordtype">int</span> wurx=0;
-<a name="l00833"></a>00833 <span class="keywordtype">int</span> wury=0;
-<a name="l00834"></a>00834 <span class="keyword">const</span> <span class="keywordtype">double</span> d_mirror = 8.;
-<a name="l00835"></a>00835 <span class="keyword">const</span> <span class="keywordtype">double</span> factor = 180/PI_NUMB*3600.;
-<a name="l00836"></a>00836 <span class="keywordtype">double</span> max_ima_cx=0;
-<a name="l00837"></a>00837 <span class="keywordtype">double</span> max_ima_cy=0;
-<a name="l00838"></a>00838
-<a name="l00839"></a>00839 <span class="keywordtype">double</span> norm=0.;
-<a name="l00840"></a>00840 <span class="keywordtype">double</span> xc=0.;
-<a name="l00841"></a>00841 <span class="keywordtype">double</span> yc=0.;
-<a name="l00842"></a>00842 <span class="keywordtype">double</span> sx=0.;
-<a name="l00843"></a>00843 <span class="keywordtype">double</span> sy=0.;
-<a name="l00844"></a>00844
-<a name="l00845"></a>00845 <span class="keywordtype">double</span> flux=0;
-<a name="l00846"></a>00846 <span class="keywordtype">double</span> flux_max=0;
-<a name="l00847"></a>00847 <span class="keywordtype">double</span> pix_scale=0;
-<a name="l00848"></a>00848 <span class="keywordtype">double</span> lam=0.;
-<a name="l00849"></a>00849 <span class="keywordtype">double</span> pscale=0.;
-<a name="l00850"></a>00850 <span class="keywordtype">int</span> dr_difr=0;
-<a name="l00851"></a>00851
-<a name="l00852"></a>00852 <span class="keywordtype">double</span> r=0.;
-<a name="l00853"></a>00853 <span class="keywordtype">double</span> bkg=0.;
-<a name="l00854"></a>00854 <span class="keywordtype">int</span> i=0;
-<a name="l00855"></a>00855 <span class="keywordtype">int</span> ni=0;
-<a name="l00856"></a>00856 <span class="keywordtype">int</span> ir_difr=0;
-<a name="l00857"></a>00857 <span class="keywordtype">int</span> dr=0;
-<a name="l00858"></a>00858 <span class="keywordtype">int</span> rmin=0;
-<a name="l00859"></a>00859
-<a name="l00860"></a>00860 <span class="keywordtype">char</span> band[MAX_NAME_SIZE];
-<a name="l00861"></a>00861 <span class="keywordtype">char</span> spat_res[MAX_NAME_SIZE];
-<a name="l00862"></a>00862
-<a name="l00863"></a>00863 cpl_table* enc_energy=NULL;
-<a name="l00864"></a>00864 cpl_frame* frame=NULL;
-<a name="l00865"></a>00865
-<a name="l00866"></a>00866 <span class="keywordtype">int</span> ima_szx=0;
-<a name="l00867"></a>00867 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00817"></a>00817 cpl_table* sinfo_get_encircled_energy(cpl_frameset* sof,
+<a name="l00818"></a>00818 cpl_image* img,
+<a name="l00819"></a>00819 <span class="keywordtype">double</span>* fwhm_x,
+<a name="l00820"></a>00820 <span class="keywordtype">double</span>* fwhm_y,
+<a name="l00821"></a>00821 cpl_table** qclog_tbl)
+<a name="l00822"></a>00822 {
+<a name="l00823"></a>00823
+<a name="l00824"></a>00824 cpl_errorstate clean_state = cpl_errorstate_get();
+<a name="l00825"></a>00825
+<a name="l00826"></a>00826 cpl_image* img_dup=NULL;
+<a name="l00827"></a>00827 cpl_size max_ima_x=0;
+<a name="l00828"></a>00828 cpl_size max_ima_y=0;
+<a name="l00829"></a>00829 <span class="keywordtype">int</span> wllx=0;
+<a name="l00830"></a>00830 <span class="keywordtype">int</span> wlly=0;
+<a name="l00831"></a>00831 <span class="keywordtype">int</span> wurx=0;
+<a name="l00832"></a>00832 <span class="keywordtype">int</span> wury=0;
+<a name="l00833"></a>00833 <span class="keyword">const</span> <span class="keywordtype">double</span> d_mirror = 8.;
+<a name="l00834"></a>00834 <span class="keyword">const</span> <span class="keywordtype">double</span> factor = 180/PI_NUMB*3600.;
+<a name="l00835"></a>00835 <span class="keywordtype">double</span> max_ima_cx=0;
+<a name="l00836"></a>00836 <span class="keywordtype">double</span> max_ima_cy=0;
+<a name="l00837"></a>00837
+<a name="l00838"></a>00838 <span class="keywordtype">double</span> norm=0.;
+<a name="l00839"></a>00839 <span class="keywordtype">double</span> xc=0.;
+<a name="l00840"></a>00840 <span class="keywordtype">double</span> yc=0.;
+<a name="l00841"></a>00841 <span class="keywordtype">double</span> sx=0.;
+<a name="l00842"></a>00842 <span class="keywordtype">double</span> sy=0.;
+<a name="l00843"></a>00843
+<a name="l00844"></a>00844 <span class="keywordtype">double</span> flux=0;
+<a name="l00845"></a>00845 <span class="keywordtype">double</span> flux_max=0;
+<a name="l00846"></a>00846 <span class="keywordtype">double</span> pix_scale=0;
+<a name="l00847"></a>00847 <span class="keywordtype">double</span> lam=0.;
+<a name="l00848"></a>00848 <span class="keywordtype">double</span> pscale=0.;
+<a name="l00849"></a>00849 <span class="keywordtype">int</span> dr_difr=0;
+<a name="l00850"></a>00850
+<a name="l00851"></a>00851 <span class="keywordtype">double</span> r=0.;
+<a name="l00852"></a>00852 <span class="keywordtype">double</span> bkg=0.;
+<a name="l00853"></a>00853 <span class="keywordtype">int</span> i=0;
+<a name="l00854"></a>00854 <span class="keywordtype">int</span> ni=0;
+<a name="l00855"></a>00855 <span class="keywordtype">int</span> ir_difr=0;
+<a name="l00856"></a>00856 <span class="keywordtype">int</span> dr=0;
+<a name="l00857"></a>00857 <span class="keywordtype">int</span> rmin=0;
+<a name="l00858"></a>00858
+<a name="l00859"></a>00859 <span class="keywordtype">char</span> band[MAX_NAME_SIZE];
+<a name="l00860"></a>00860 <span class="keywordtype">char</span> spat_res[MAX_NAME_SIZE];
+<a name="l00861"></a>00861
+<a name="l00862"></a>00862 cpl_table* enc_energy=NULL;
+<a name="l00863"></a>00863 cpl_frame* frame=NULL;
+<a name="l00864"></a>00864
+<a name="l00865"></a>00865 <span class="keywordtype">int</span> ima_szx=0;
+<a name="l00866"></a>00866 <span class="keywordtype">int</span> ima_szy=0;
+<a name="l00867"></a>00867
<a name="l00868"></a>00868
<a name="l00869"></a>00869
-<a name="l00870"></a>00870
-<a name="l00871"></a>00871 <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_PSF)) {
-<a name="l00872"></a>00872 frame = cpl_frameset_find(sof,PRO_COADD_PSF);
-<a name="l00873"></a>00873 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_PSF)) {
-<a name="l00874"></a>00874 frame = cpl_frameset_find(sof,PRO_OBS_PSF);
-<a name="l00875"></a>00875 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_STD)) {
-<a name="l00876"></a>00876 frame = cpl_frameset_find(sof,PRO_COADD_STD);
-<a name="l00877"></a>00877 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_STD)) {
-<a name="l00878"></a>00878 frame = cpl_frameset_find(sof,PRO_OBS_STD);
-<a name="l00879"></a>00879 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_OBJ)) {
-<a name="l00880"></a>00880 frame = cpl_frameset_find(sof,PRO_COADD_OBJ);
-<a name="l00881"></a>00881 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_OBJ)) {
-<a name="l00882"></a>00882 frame = cpl_frameset_find(sof,PRO_OBS_OBJ);
-<a name="l00883"></a>00883 } <span class="keywordflow">else</span> {
-<a name="l00884"></a>00884 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Frame %s or %s or %s or %s or %s or %s not found!"</span>,
-<a name="l00885"></a>00885 PRO_COADD_PSF,PRO_OBS_PSF,
-<a name="l00886"></a>00886 PRO_COADD_STD, PRO_OBS_STD,
-<a name="l00887"></a>00887 PRO_COADD_OBJ, PRO_OBS_OBJ);
-<a name="l00888"></a>00888 <span class="keywordflow">return</span> NULL;
-<a name="l00889"></a>00889 }
-<a name="l00890"></a>00890
-<a name="l00891"></a>00891 sinfo_get_spatial_res(frame,spat_res);
-<a name="l00892"></a>00892 sinfo_get_band(frame,band);
-<a name="l00893"></a>00893 pix_scale=atof(spat_res);
-<a name="l00894"></a>00894 lam=sinfo_get_wave_cent(band);
-<a name="l00895"></a>00895 <span class="comment">/* factor 2 due to change of detector to 2K */</span>
-<a name="l00896"></a>00896 pscale=0.5*pix_scale;
+<a name="l00870"></a>00870 <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_PSF)) {
+<a name="l00871"></a>00871 frame = cpl_frameset_find(sof,PRO_COADD_PSF);
+<a name="l00872"></a>00872 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_PSF)) {
+<a name="l00873"></a>00873 frame = cpl_frameset_find(sof,PRO_OBS_PSF);
+<a name="l00874"></a>00874 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_STD)) {
+<a name="l00875"></a>00875 frame = cpl_frameset_find(sof,PRO_COADD_STD);
+<a name="l00876"></a>00876 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_STD)) {
+<a name="l00877"></a>00877 frame = cpl_frameset_find(sof,PRO_OBS_STD);
+<a name="l00878"></a>00878 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_COADD_OBJ)) {
+<a name="l00879"></a>00879 frame = cpl_frameset_find(sof,PRO_COADD_OBJ);
+<a name="l00880"></a>00880 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(NULL != cpl_frameset_find(sof,PRO_OBS_OBJ)) {
+<a name="l00881"></a>00881 frame = cpl_frameset_find(sof,PRO_OBS_OBJ);
+<a name="l00882"></a>00882 } <span class="keywordflow">else</span> {
+<a name="l00883"></a>00883 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"Frame %s or %s or %s or %s or %s or %s not found!"</span>,
+<a name="l00884"></a>00884 PRO_COADD_PSF,PRO_OBS_PSF,
+<a name="l00885"></a>00885 PRO_COADD_STD, PRO_OBS_STD,
+<a name="l00886"></a>00886 PRO_COADD_OBJ, PRO_OBS_OBJ);
+<a name="l00887"></a>00887 <span class="keywordflow">return</span> NULL;
+<a name="l00888"></a>00888 }
+<a name="l00889"></a>00889
+<a name="l00890"></a>00890 sinfo_get_spatial_res(frame,spat_res);
+<a name="l00891"></a>00891 sinfo_get_band(frame,band);
+<a name="l00892"></a>00892 pix_scale=atof(spat_res);
+<a name="l00893"></a>00893 lam=sinfo_get_wave_cent(band);
+<a name="l00894"></a>00894 <span class="comment">/* factor 2 due to change of detector to 2K */</span>
+<a name="l00895"></a>00895 pscale=0.5*pix_scale;
+<a name="l00896"></a>00896
<a name="l00897"></a>00897
<a name="l00898"></a>00898
-<a name="l00899"></a>00899
-<a name="l00900"></a>00900 dr_difr=factor*1.22*lam*1.e-6/d_mirror/pscale;
-<a name="l00901"></a>00901 ir_difr=floor(dr_difr+0.5);
-<a name="l00902"></a>00902 <span class="keywordflow">if</span> (pix_scale==0.025) {
-<a name="l00903"></a>00903 ni=10;
-<a name="l00904"></a>00904 rmin=ir_difr;
-<a name="l00905"></a>00905 dr=rmin;
-<a name="l00906"></a>00906 } <span class="keywordflow">else</span> {
-<a name="l00907"></a>00907 ni=15;
-<a name="l00908"></a>00908 <a class="code" href="group__sinfo__msg.html#ga885dfc1c23dbdf3ea2051b42341a52a6" title="Print an warning message.">sinfo_msg_warning</a>(<span class="stringliteral">"Reset diffraction limit"</span>);
-<a name="l00909"></a>00909 ir_difr=10;
-<a name="l00910"></a>00910 rmin=1;
-<a name="l00911"></a>00911 dr=2;
-<a name="l00912"></a>00912 }
-<a name="l00913"></a>00913
-<a name="l00914"></a>00914 sinfo_msg(<span class="stringliteral">"Diffraction limit: %d"</span>,ir_difr);
-<a name="l00915"></a>00915
-<a name="l00916"></a>00916 check_nomsg(img_dup=cpl_image_duplicate(img));
-<a name="l00917"></a>00917 sinfo_clean_nan(&img_dup);
-<a name="l00918"></a>00918 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
-<a name="l00919"></a>00919 sinfo_free_image(&img_dup);
+<a name="l00899"></a>00899 dr_difr=factor*1.22*lam*1.e-6/d_mirror/pscale;
+<a name="l00900"></a>00900 ir_difr=floor(dr_difr+0.5);
+<a name="l00901"></a>00901 <span class="keywordflow">if</span> (pix_scale==0.025) {
+<a name="l00902"></a>00902 ni=10;
+<a name="l00903"></a>00903 rmin=ir_difr;
+<a name="l00904"></a>00904 dr=rmin;
+<a name="l00905"></a>00905 } <span class="keywordflow">else</span> {
+<a name="l00906"></a>00906 ni=15;
+<a name="l00907"></a>00907 <a class="code" href="group__sinfo__msg.html#ga885dfc1c23dbdf3ea2051b42341a52a6" title="Print an warning message.">sinfo_msg_warning</a>(<span class="stringliteral">"Reset diffraction limit"</span>);
+<a name="l00908"></a>00908 ir_difr=10;
+<a name="l00909"></a>00909 rmin=1;
+<a name="l00910"></a>00910 dr=2;
+<a name="l00911"></a>00911 }
+<a name="l00912"></a>00912
+<a name="l00913"></a>00913 sinfo_msg(<span class="stringliteral">"Diffraction limit: %d"</span>,ir_difr);
+<a name="l00914"></a>00914
+<a name="l00915"></a>00915 check_nomsg(img_dup=cpl_image_duplicate(img));
+<a name="l00916"></a>00916 sinfo_clean_nan(&img_dup);
+<a name="l00917"></a>00917 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima_x,&max_ima_y));
+<a name="l00918"></a>00918 sinfo_free_image(&img_dup);
+<a name="l00919"></a>00919
<a name="l00920"></a>00920
<a name="l00921"></a>00921
-<a name="l00922"></a>00922
-<a name="l00923"></a>00923 check_nomsg(ima_szx=cpl_image_get_size_x(img));
-<a name="l00924"></a>00924 check_nomsg(ima_szy=cpl_image_get_size_y(img));
-<a name="l00925"></a>00925 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
-<a name="l00926"></a>00926 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
-<a name="l00927"></a>00927 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
-<a name="l00928"></a>00928 ima_szx,ima_szy);
-<a name="l00929"></a>00929
-<a name="l00930"></a>00930 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
-<a name="l00931"></a>00931 wurx,wury));
-<a name="l00932"></a>00932 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
-<a name="l00933"></a>00933 wurx,wury));
+<a name="l00922"></a>00922 check_nomsg(ima_szx=cpl_image_get_size_x(img));
+<a name="l00923"></a>00923 check_nomsg(ima_szy=cpl_image_get_size_y(img));
+<a name="l00924"></a>00924 sinfo_check_borders(&max_ima_x,ima_szx,SINFO_STREHL_WINDOW);
+<a name="l00925"></a>00925 sinfo_check_borders(&max_ima_y,ima_szy,SINFO_STREHL_WINDOW);
+<a name="l00926"></a>00926 sinfo_get_safe_box(&wllx,&wlly,&wurx,&wury,max_ima_x,max_ima_y,SINFO_PSF_SZ,
+<a name="l00927"></a>00927 ima_szx,ima_szy);
+<a name="l00928"></a>00928
+<a name="l00929"></a>00929 check_nomsg(max_ima_cx=cpl_image_get_centroid_x_window(img,wllx,wlly,
+<a name="l00930"></a>00930 wurx,wury));
+<a name="l00931"></a>00931 check_nomsg(max_ima_cy=cpl_image_get_centroid_y_window(img,wllx,wlly,
+<a name="l00932"></a>00932 wurx,wury));
+<a name="l00933"></a>00933
<a name="l00934"></a>00934
-<a name="l00935"></a>00935
-<a name="l00936"></a>00936 cpl_image_save(img, <span class="stringliteral">"bad_image_psf_c.fits"</span>,CPL_BPP_IEEE_DOUBLE, NULL, CPL_IO_CREATE);
-<a name="l00937"></a>00937 sinfo_msg(<span class="stringliteral">"@@@@ sinfo_get_encircled_energy() max_ima_x[%"</span> CPL_SIZE_FORMAT <span class="stringliteral">"] max_ima_y[%"</span> CPL_SIZE_FORMAT <span class="stringliteral">"] psf_sz[%d]"</span>, max_ima_x,
-<a name="l00938"></a>00938 max_ima_y,
-<a name="l00939"></a>00939 SINFO_PSF_SZ);
-<a name="l00940"></a>00940 <span class="keywordflow">if</span>(CPL_ERROR_NONE != cpl_image_fit_gaussian(img,max_ima_x,max_ima_y,
-<a name="l00941"></a>00941 SINFO_PSF_SZ,
-<a name="l00942"></a>00942 &norm,&xc,&yc,&sx,&sy,
-<a name="l00943"></a>00943 fwhm_x,fwhm_y)) {
+<a name="l00935"></a>00935 cpl_image_save(img, <span class="stringliteral">"bad_image_psf_c.fits"</span>,CPL_BPP_IEEE_DOUBLE, NULL, CPL_IO_CREATE);
+<a name="l00936"></a>00936 sinfo_msg(<span class="stringliteral">"@@@@ sinfo_get_encircled_energy() max_ima_x[%"</span> CPL_SIZE_FORMAT <span class="stringliteral">"] max_ima_y[%"</span> CPL_SIZE_FORMAT <span class="stringliteral">"] psf_sz[%d]"</span>, max_ima_x,
+<a name="l00937"></a>00937 max_ima_y,
+<a name="l00938"></a>00938 SINFO_PSF_SZ);
+<a name="l00939"></a>00939 <span class="keywordflow">if</span>(CPL_ERROR_NONE != cpl_image_fit_gaussian(img,max_ima_x,max_ima_y,
+<a name="l00940"></a>00940 SINFO_PSF_SZ,
+<a name="l00941"></a>00941 &norm,&xc,&yc,&sx,&sy,
+<a name="l00942"></a>00942 fwhm_x,fwhm_y)) {
+<a name="l00943"></a>00943
<a name="l00944"></a>00944
-<a name="l00945"></a>00945
-<a name="l00946"></a>00946 irplib_error_recover(clean_state,<span class="stringliteral">"Gaussian fit failed"</span>);
-<a name="l00947"></a>00947
-<a name="l00948"></a>00948 }
-<a name="l00949"></a>00949
-<a name="l00950"></a>00950 check_nomsg(enc_energy = cpl_table_new(ni));
-<a name="l00951"></a>00951 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_pix"</span>, CPL_TYPE_INT));
-<a name="l00952"></a>00952 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_mas"</span>, CPL_TYPE_DOUBLE));
-<a name="l00953"></a>00953 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_dif"</span>, CPL_TYPE_DOUBLE));
-<a name="l00954"></a>00954 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"abs_energy"</span> , CPL_TYPE_DOUBLE));
-<a name="l00955"></a>00955 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"rel_energy"</span> , CPL_TYPE_DOUBLE));
-<a name="l00956"></a>00956 <span class="comment">/* encircled energy computation */</span>
-<a name="l00957"></a>00957 check_nomsg(bkg=irplib_strehl_ring_background(img,max_ima_x,max_ima_y,
-<a name="l00958"></a>00958 SINFO_BKG_R1,SINFO_BKG_R2,IRPLIB_BG_METHOD_AVER_REJ)) ;
-<a name="l00959"></a>00959 r=rmin+(ni-1)*dr;
-<a name="l00960"></a>00960 check_nomsg(flux_max=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,r,bkg));
-<a name="l00961"></a>00961 r=rmin;
-<a name="l00962"></a>00962
-<a name="l00963"></a>00963 <span class="keywordflow">for</span>(i=0; i<ni; i++)
-<a name="l00964"></a>00964 {
-<a name="l00965"></a>00965 check_nomsg(flux=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,r,bkg));
-<a name="l00966"></a>00966 check_nomsg(cpl_table_set_int(enc_energy,<span class="stringliteral">"r_pix"</span>,i,r));
-<a name="l00967"></a>00967 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"r_mas"</span>,i,r*pscale));
-<a name="l00968"></a>00968 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"r_dif"</span>,i,r/ir_difr));
-<a name="l00969"></a>00969 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"abs_energy"</span>,i,flux));
-<a name="l00970"></a>00970 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"rel_energy"</span>,i,flux/flux_max));
-<a name="l00971"></a>00971 r+=dr;
-<a name="l00972"></a>00972
-<a name="l00973"></a>00973 }
-<a name="l00974"></a>00974
-<a name="l00975"></a>00975 <span class="comment">//sinfo_msg("max ima=%d %d\n",max_ima_x,max_ima_y);</span>
-<a name="l00976"></a>00976 <span class="comment">//sinfo_msg("centroid ima=%f %f\n",max_ima_cx,max_ima_cy);</span>
-<a name="l00977"></a>00977 <span class="comment">//sinfo_msg("gauss info=%f %f %f %f %f %f %f\n",</span>
-<a name="l00978"></a>00978 <span class="comment">// norm,xc,yc,sx,sy,*fwhm_x,*fwhm_y);</span>
-<a name="l00979"></a>00979
-<a name="l00980"></a>00980 check_nomsg(flux=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,
-<a name="l00981"></a>00981 ir_difr,bkg));
-<a name="l00982"></a>00982 ck0_nomsg(sinfo_qclog_add_double(*qclog_tbl,<span class="stringliteral">"QC ENC CORE"</span>,
-<a name="l00983"></a>00983 flux/flux_max,
-<a name="l00984"></a>00984 <span class="stringliteral">"Encircled energy within PSF core"</span>,<span class="stringliteral">"%f"</span>));
-<a name="l00985"></a>00985
-<a name="l00986"></a>00986 <span class="keywordflow">return</span> enc_energy;
-<a name="l00987"></a>00987
-<a name="l00988"></a>00988 cleanup:
-<a name="l00989"></a>00989 sinfo_free_image(&img_dup);
-<a name="l00990"></a>00990
-<a name="l00991"></a>00991 <span class="keywordflow">return</span> NULL;
-<a name="l00992"></a>00992 }
+<a name="l00945"></a>00945 irplib_error_recover(clean_state,<span class="stringliteral">"Gaussian fit failed"</span>);
+<a name="l00946"></a>00946
+<a name="l00947"></a>00947 }
+<a name="l00948"></a>00948
+<a name="l00949"></a>00949 check_nomsg(enc_energy = cpl_table_new(ni));
+<a name="l00950"></a>00950 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_pix"</span>, CPL_TYPE_INT));
+<a name="l00951"></a>00951 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_mas"</span>, CPL_TYPE_DOUBLE));
+<a name="l00952"></a>00952 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"r_dif"</span>, CPL_TYPE_DOUBLE));
+<a name="l00953"></a>00953 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"abs_energy"</span> , CPL_TYPE_DOUBLE));
+<a name="l00954"></a>00954 check_nomsg(cpl_table_new_column(enc_energy,<span class="stringliteral">"rel_energy"</span> , CPL_TYPE_DOUBLE));
+<a name="l00955"></a>00955 <span class="comment">/* encircled energy computation */</span>
+<a name="l00956"></a>00956 check_nomsg(bkg=irplib_strehl_ring_background(img,max_ima_x,max_ima_y,
+<a name="l00957"></a>00957 SINFO_BKG_R1,SINFO_BKG_R2,IRPLIB_BG_METHOD_AVER_REJ)) ;
+<a name="l00958"></a>00958 r=rmin+(ni-1)*dr;
+<a name="l00959"></a>00959 check_nomsg(flux_max=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,r,bkg));
+<a name="l00960"></a>00960 r=rmin;
+<a name="l00961"></a>00961
+<a name="l00962"></a>00962 <span class="keywordflow">for</span>(i=0; i<ni; i++)
+<a name="l00963"></a>00963 {
+<a name="l00964"></a>00964 check_nomsg(flux=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,r,bkg));
+<a name="l00965"></a>00965 check_nomsg(cpl_table_set_int(enc_energy,<span class="stringliteral">"r_pix"</span>,i,r));
+<a name="l00966"></a>00966 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"r_mas"</span>,i,r*pscale));
+<a name="l00967"></a>00967 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"r_dif"</span>,i,r/ir_difr));
+<a name="l00968"></a>00968 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"abs_energy"</span>,i,flux));
+<a name="l00969"></a>00969 check_nomsg(cpl_table_set_double(enc_energy,<span class="stringliteral">"rel_energy"</span>,i,flux/flux_max));
+<a name="l00970"></a>00970 r+=dr;
+<a name="l00971"></a>00971
+<a name="l00972"></a>00972 }
+<a name="l00973"></a>00973
+<a name="l00974"></a>00974 <span class="comment">//sinfo_msg("max ima=%d %d\n",max_ima_x,max_ima_y);</span>
+<a name="l00975"></a>00975 <span class="comment">//sinfo_msg("centroid ima=%f %f\n",max_ima_cx,max_ima_cy);</span>
+<a name="l00976"></a>00976 <span class="comment">//sinfo_msg("gauss info=%f %f %f %f %f %f %f\n",</span>
+<a name="l00977"></a>00977 <span class="comment">// norm,xc,yc,sx,sy,*fwhm_x,*fwhm_y);</span>
+<a name="l00978"></a>00978
+<a name="l00979"></a>00979 check_nomsg(flux=irplib_strehl_disk_flux(img,max_ima_x,max_ima_y,
+<a name="l00980"></a>00980 ir_difr,bkg));
+<a name="l00981"></a>00981 ck0_nomsg(sinfo_qclog_add_double(*qclog_tbl,<span class="stringliteral">"QC ENC CORE"</span>,
+<a name="l00982"></a>00982 flux/flux_max,
+<a name="l00983"></a>00983 <span class="stringliteral">"Encircled energy within PSF core"</span>,<span class="stringliteral">"%f"</span>));
+<a name="l00984"></a>00984
+<a name="l00985"></a>00985 <span class="keywordflow">return</span> enc_energy;
+<a name="l00986"></a>00986
+<a name="l00987"></a>00987 cleanup:
+<a name="l00988"></a>00988 sinfo_free_image(&img_dup);
+<a name="l00989"></a>00989
+<a name="l00990"></a>00990 <span class="keywordflow">return</span> NULL;
+<a name="l00991"></a>00991 }
+<a name="l00992"></a>00992
<a name="l00993"></a>00993
-<a name="l00994"></a>00994
-<a name="l00995"></a>00995 <span class="keyword">static</span> cpl_table* sinfo_get_strehl_from_cube(cpl_imagelist* cube,
-<a name="l00996"></a>00996 <span class="keywordtype">char</span>* name,
-<a name="l00997"></a>00997 cpl_frame* frame)
-<a name="l00998"></a>00998 {
-<a name="l00999"></a>00999 cpl_table* strehl_tbl=NULL;
-<a name="l01000"></a>01000
-<a name="l01001"></a>01001 <span class="keywordtype">double</span> dispersion=0.;
-<a name="l01002"></a>01002 <span class="keywordtype">double</span> centralWave=0.;
-<a name="l01003"></a>01003 <span class="keywordtype">double</span> wrange=0;
-<a name="l01004"></a>01004 <span class="keywordtype">double</span> wstart=0;
-<a name="l01005"></a>01005 <span class="keywordtype">double</span> wstep=0;
-<a name="l01006"></a>01006 <span class="keywordtype">double</span> wend=0;
-<a name="l01007"></a>01007 <span class="keywordtype">double</span> ws=0;
-<a name="l01008"></a>01008 <span class="keywordtype">double</span> we=0;
-<a name="l01009"></a>01009 <span class="keywordtype">double</span> pix_scale=0;
-<a name="l01010"></a>01010 <span class="keywordtype">double</span> lam=0;
-<a name="l01011"></a>01011 <span class="keywordtype">double</span> dlam=0;
-<a name="l01012"></a>01012 <span class="keywordtype">double</span> pscale = 0;
-<a name="l01013"></a>01013
-<a name="l01014"></a>01014 <span class="keywordtype">double</span> strehl_star_radius=0;
-<a name="l01015"></a>01015 <span class="keywordtype">double</span> strehl_bg_r1=0;
-<a name="l01016"></a>01016 <span class="keywordtype">double</span> strehl_bg_r2=0;
-<a name="l01017"></a>01017 <span class="keywordtype">double</span> strehl=0;
-<a name="l01018"></a>01018 <span class="keywordtype">double</span> strehl_err=0;
-<a name="l01019"></a>01019 <span class="keywordtype">char</span> spat_res[MAX_NAME_SIZE];
-<a name="l01020"></a>01020 cpl_propertylist* plist=NULL;
-<a name="l01021"></a>01021
-<a name="l01022"></a>01022 <span class="keywordtype">int</span> naxis3=0;
-<a name="l01023"></a>01023 <span class="keywordtype">int</span> nsample=0;
-<a name="l01024"></a>01024 <span class="keywordtype">int</span> i=0;
+<a name="l00994"></a>00994 <span class="keyword">static</span> cpl_table* sinfo_get_strehl_from_cube(cpl_imagelist* cube,
+<a name="l00995"></a>00995 <span class="keywordtype">char</span>* name,
+<a name="l00996"></a>00996 cpl_frame* frame)
+<a name="l00997"></a>00997 {
+<a name="l00998"></a>00998 cpl_table* strehl_tbl=NULL;
+<a name="l00999"></a>00999
+<a name="l01000"></a>01000 <span class="keywordtype">double</span> dispersion=0.;
+<a name="l01001"></a>01001 <span class="keywordtype">double</span> centralWave=0.;
+<a name="l01002"></a>01002 <span class="keywordtype">double</span> wrange=0;
+<a name="l01003"></a>01003 <span class="keywordtype">double</span> wstart=0;
+<a name="l01004"></a>01004 <span class="keywordtype">double</span> wstep=0;
+<a name="l01005"></a>01005 <span class="keywordtype">double</span> wend=0;
+<a name="l01006"></a>01006 <span class="keywordtype">double</span> ws=0;
+<a name="l01007"></a>01007 <span class="keywordtype">double</span> we=0;
+<a name="l01008"></a>01008 <span class="keywordtype">double</span> pix_scale=0;
+<a name="l01009"></a>01009 <span class="keywordtype">double</span> lam=0;
+<a name="l01010"></a>01010 <span class="keywordtype">double</span> dlam=0;
+<a name="l01011"></a>01011 <span class="keywordtype">double</span> pscale = 0;
+<a name="l01012"></a>01012
+<a name="l01013"></a>01013 <span class="keywordtype">double</span> strehl_star_radius=0;
+<a name="l01014"></a>01014 <span class="keywordtype">double</span> strehl_bg_r1=0;
+<a name="l01015"></a>01015 <span class="keywordtype">double</span> strehl_bg_r2=0;
+<a name="l01016"></a>01016 <span class="keywordtype">double</span> strehl=0;
+<a name="l01017"></a>01017 <span class="keywordtype">double</span> strehl_err=0;
+<a name="l01018"></a>01018 <span class="keywordtype">char</span> spat_res[MAX_NAME_SIZE];
+<a name="l01019"></a>01019 cpl_propertylist* plist=NULL;
+<a name="l01020"></a>01020
+<a name="l01021"></a>01021 <span class="keywordtype">int</span> naxis3=0;
+<a name="l01022"></a>01022 <span class="keywordtype">int</span> nsample=0;
+<a name="l01023"></a>01023 <span class="keywordtype">int</span> i=0;
+<a name="l01024"></a>01024
<a name="l01025"></a>01025
-<a name="l01026"></a>01026
-<a name="l01027"></a>01027 sinfo_get_spatial_res(frame,spat_res);
-<a name="l01028"></a>01028 pix_scale=atof(spat_res);
-<a name="l01029"></a>01029 sinfo_msg(<span class="stringliteral">"Camera pixel scale=%f"</span>,pix_scale);
-<a name="l01030"></a>01030 <span class="comment">/* factor 2 due to change of detector to 2K */</span>
-<a name="l01031"></a>01031 pscale=0.5*pix_scale;
-<a name="l01032"></a>01032
-<a name="l01033"></a>01033 strehl_star_radius=SINFO_BKG_R1*pscale;
-<a name="l01034"></a>01034 strehl_bg_r1=SINFO_BKG_R1*pscale;
-<a name="l01035"></a>01035 strehl_bg_r2=SINFO_BKG_R2*pscale;
-<a name="l01036"></a>01036
-<a name="l01037"></a>01037 plist=cpl_propertylist_load(name,0);
-<a name="l01038"></a>01038 dispersion=sinfo_pfits_get_cdelt3(plist);
-<a name="l01039"></a>01039 centralWave=sinfo_pfits_get_crval3(plist);
-<a name="l01040"></a>01040 naxis3=sinfo_pfits_get_naxis3(plist);
-<a name="l01041"></a>01041 sinfo_free_propertylist(&plist);
-<a name="l01042"></a>01042 wrange=dispersion*naxis3;
-<a name="l01043"></a>01043
-<a name="l01044"></a>01044 wstart = centralWave - (float) (cpl_imagelist_get_size(cube) / 2)*
-<a name="l01045"></a>01045 dispersion+dispersion;
-<a name="l01046"></a>01046 wend =wstart + dispersion * cpl_imagelist_get_size(cube);
-<a name="l01047"></a>01047 wstep=0.025;
-<a name="l01048"></a>01048 <span class="comment">/*</span>
-<a name="l01049"></a>01049 <span class="comment"> note:</span>
-<a name="l01050"></a>01050 <span class="comment"> -wstep as we do not hit the borders where the</span>
-<a name="l01051"></a>01051 <span class="comment"> sinfo_gaussian fit has a problem</span>
-<a name="l01052"></a>01052 <span class="comment"> */</span>
-<a name="l01053"></a>01053 nsample=(int)((wend-wstart-wstep)/wstep);
-<a name="l01054"></a>01054 check_nomsg(strehl_tbl = cpl_table_new(nsample));
-<a name="l01055"></a>01055 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"wavelength"</span>,CPL_TYPE_DOUBLE));
-<a name="l01056"></a>01056 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl"</span>,CPL_TYPE_DOUBLE));
-<a name="l01057"></a>01057 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,CPL_TYPE_DOUBLE));
+<a name="l01026"></a>01026 sinfo_get_spatial_res(frame,spat_res);
+<a name="l01027"></a>01027 pix_scale=atof(spat_res);
+<a name="l01028"></a>01028 sinfo_msg(<span class="stringliteral">"Camera pixel scale=%f"</span>,pix_scale);
+<a name="l01029"></a>01029 <span class="comment">/* factor 2 due to change of detector to 2K */</span>
+<a name="l01030"></a>01030 pscale=0.5*pix_scale;
+<a name="l01031"></a>01031
+<a name="l01032"></a>01032 strehl_star_radius=SINFO_BKG_R1*pscale;
+<a name="l01033"></a>01033 strehl_bg_r1=SINFO_BKG_R1*pscale;
+<a name="l01034"></a>01034 strehl_bg_r2=SINFO_BKG_R2*pscale;
+<a name="l01035"></a>01035
+<a name="l01036"></a>01036 plist=cpl_propertylist_load(name,0);
+<a name="l01037"></a>01037 dispersion=sinfo_pfits_get_cdelt3(plist);
+<a name="l01038"></a>01038 centralWave=sinfo_pfits_get_crval3(plist);
+<a name="l01039"></a>01039 naxis3=sinfo_pfits_get_naxis3(plist);
+<a name="l01040"></a>01040 sinfo_free_propertylist(&plist);
+<a name="l01041"></a>01041 wrange=dispersion*naxis3;
+<a name="l01042"></a>01042
+<a name="l01043"></a>01043 wstart = centralWave - (float) (cpl_imagelist_get_size(cube) / 2)*
+<a name="l01044"></a>01044 dispersion+dispersion;
+<a name="l01045"></a>01045 wend =wstart + dispersion * cpl_imagelist_get_size(cube);
+<a name="l01046"></a>01046 wstep=0.025;
+<a name="l01047"></a>01047 <span class="comment">/*</span>
+<a name="l01048"></a>01048 <span class="comment"> note:</span>
+<a name="l01049"></a>01049 <span class="comment"> -wstep as we do not hit the borders where the</span>
+<a name="l01050"></a>01050 <span class="comment"> sinfo_gaussian fit has a problem</span>
+<a name="l01051"></a>01051 <span class="comment"> */</span>
+<a name="l01052"></a>01052 nsample=(int)((wend-wstart-wstep)/wstep);
+<a name="l01053"></a>01053 check_nomsg(strehl_tbl = cpl_table_new(nsample));
+<a name="l01054"></a>01054 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"wavelength"</span>,CPL_TYPE_DOUBLE));
+<a name="l01055"></a>01055 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl"</span>,CPL_TYPE_DOUBLE));
+<a name="l01056"></a>01056 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,CPL_TYPE_DOUBLE));
+<a name="l01057"></a>01057
<a name="l01058"></a>01058
-<a name="l01059"></a>01059
-<a name="l01060"></a>01060 <span class="keywordflow">for</span>(i=1;i<nsample;i++) {
-<a name="l01061"></a>01061
-<a name="l01062"></a>01062 ws=wstart+wstep*i;
-<a name="l01063"></a>01063 we=ws+wstep;
-<a name="l01064"></a>01064
-<a name="l01065"></a>01065 lam = (double)0.5*(ws+we);
-<a name="l01066"></a>01066 dlam=wstep;
-<a name="l01067"></a>01067
-<a name="l01068"></a>01068 check(sinfo_get_strehl_from_slice(cube,
-<a name="l01069"></a>01069 dispersion,
-<a name="l01070"></a>01070 centralWave,
-<a name="l01071"></a>01071 ws,
-<a name="l01072"></a>01072 we,
-<a name="l01073"></a>01073 pscale,
-<a name="l01074"></a>01074 strehl_star_radius,
-<a name="l01075"></a>01075 strehl_bg_r1,
-<a name="l01076"></a>01076 strehl_bg_r2,
-<a name="l01077"></a>01077 &strehl,
-<a name="l01078"></a>01078 &strehl_err),<span class="stringliteral">"Error computing strehl"</span>);
+<a name="l01059"></a>01059 <span class="keywordflow">for</span>(i=1;i<nsample;i++) {
+<a name="l01060"></a>01060
+<a name="l01061"></a>01061 ws=wstart+wstep*i;
+<a name="l01062"></a>01062 we=ws+wstep;
+<a name="l01063"></a>01063
+<a name="l01064"></a>01064 lam = (double)0.5*(ws+we);
+<a name="l01065"></a>01065 dlam=wstep;
+<a name="l01066"></a>01066
+<a name="l01067"></a>01067 check(sinfo_get_strehl_from_slice(cube,
+<a name="l01068"></a>01068 dispersion,
+<a name="l01069"></a>01069 centralWave,
+<a name="l01070"></a>01070 ws,
+<a name="l01071"></a>01071 we,
+<a name="l01072"></a>01072 pscale,
+<a name="l01073"></a>01073 strehl_star_radius,
+<a name="l01074"></a>01074 strehl_bg_r1,
+<a name="l01075"></a>01075 strehl_bg_r2,
+<a name="l01076"></a>01076 &strehl,
+<a name="l01077"></a>01077 &strehl_err),<span class="stringliteral">"Error computing strehl"</span>);
+<a name="l01078"></a>01078
<a name="l01079"></a>01079
-<a name="l01080"></a>01080
-<a name="l01081"></a>01081 <span class="keywordflow">if</span>((isnan(lam) ==0) &&
-<a name="l01082"></a>01082 (isnan(lam) ==0) &&
-<a name="l01083"></a>01083 (isnan(lam) ==0)) {
-<a name="l01084"></a>01084 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"wavelength"</span>,i,lam));
-<a name="l01085"></a>01085 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl"</span>,i,strehl));
-<a name="l01086"></a>01086 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,i,
-<a name="l01087"></a>01087 strehl_err));
-<a name="l01088"></a>01088
-<a name="l01089"></a>01089 }
-<a name="l01090"></a>01090 }
-<a name="l01091"></a>01091
-<a name="l01092"></a>01092 <span class="keywordflow">return</span> strehl_tbl;
-<a name="l01093"></a>01093
-<a name="l01094"></a>01094 cleanup:
-<a name="l01095"></a>01095 <span class="keywordflow">return</span> NULL;
+<a name="l01080"></a>01080 <span class="keywordflow">if</span>((isnan(lam) ==0) &&
+<a name="l01081"></a>01081 (isnan(lam) ==0) &&
+<a name="l01082"></a>01082 (isnan(lam) ==0)) {
+<a name="l01083"></a>01083 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"wavelength"</span>,i,lam));
+<a name="l01084"></a>01084 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl"</span>,i,strehl));
+<a name="l01085"></a>01085 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,i,
+<a name="l01086"></a>01086 strehl_err));
+<a name="l01087"></a>01087
+<a name="l01088"></a>01088 }
+<a name="l01089"></a>01089 }
+<a name="l01090"></a>01090
+<a name="l01091"></a>01091 <span class="keywordflow">return</span> strehl_tbl;
+<a name="l01092"></a>01092
+<a name="l01093"></a>01093 cleanup:
+<a name="l01094"></a>01094 <span class="keywordflow">return</span> NULL;
+<a name="l01095"></a>01095
<a name="l01096"></a>01096
-<a name="l01097"></a>01097
-<a name="l01098"></a>01098 }
+<a name="l01097"></a>01097 }
+<a name="l01098"></a>01098
<a name="l01099"></a>01099
-<a name="l01100"></a>01100
-<a name="l01101"></a>01101 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l01102"></a>01102 sinfo_get_strehl_from_ima(cpl_image* ima,
-<a name="l01103"></a>01103 cpl_frame* frame)
-<a name="l01104"></a>01104 {
-<a name="l01105"></a>01105
-<a name="l01106"></a>01106 <span class="keywordtype">double</span> dispersion=0.;
-<a name="l01107"></a>01107 <span class="keywordtype">double</span> centralWave=0.;
-<a name="l01108"></a>01108 <span class="keywordtype">double</span> wstart=0;
-<a name="l01109"></a>01109 <span class="keywordtype">double</span> wend=0;
-<a name="l01110"></a>01110 <span class="keywordtype">double</span> pscale = 0;
-<a name="l01111"></a>01111
-<a name="l01112"></a>01112 <span class="keywordtype">double</span> strehl_star_radius=0;
-<a name="l01113"></a>01113 <span class="keywordtype">double</span> strehl_bg_r1=0;
-<a name="l01114"></a>01114 <span class="keywordtype">double</span> strehl_bg_r2=0;
-<a name="l01115"></a>01115 <span class="keywordtype">double</span> strehl=0;
-<a name="l01116"></a>01116 <span class="keywordtype">double</span> strehl_err=0;
-<a name="l01117"></a>01117 <span class="keywordtype">double</span> exptime=0;
+<a name="l01100"></a>01100 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l01101"></a>01101 sinfo_get_strehl_from_ima(cpl_image* ima,
+<a name="l01102"></a>01102 cpl_frame* frame)
+<a name="l01103"></a>01103 {
+<a name="l01104"></a>01104
+<a name="l01105"></a>01105 <span class="keywordtype">double</span> dispersion=0.;
+<a name="l01106"></a>01106 <span class="keywordtype">double</span> centralWave=0.;
+<a name="l01107"></a>01107 <span class="keywordtype">double</span> wstart=0;
+<a name="l01108"></a>01108 <span class="keywordtype">double</span> wend=0;
+<a name="l01109"></a>01109 <span class="keywordtype">double</span> pscale = 0;
+<a name="l01110"></a>01110
+<a name="l01111"></a>01111 <span class="keywordtype">double</span> strehl_star_radius=0;
+<a name="l01112"></a>01112 <span class="keywordtype">double</span> strehl_bg_r1=0;
+<a name="l01113"></a>01113 <span class="keywordtype">double</span> strehl_bg_r2=0;
+<a name="l01114"></a>01114 <span class="keywordtype">double</span> strehl=0;
+<a name="l01115"></a>01115 <span class="keywordtype">double</span> strehl_err=0;
+<a name="l01116"></a>01116 <span class="keywordtype">double</span> exptime=0;
+<a name="l01117"></a>01117
<a name="l01118"></a>01118
<a name="l01119"></a>01119
-<a name="l01120"></a>01120
-<a name="l01121"></a>01121 ck0_nomsg(sinfo_get_strehl_input1(frame,&dispersion,¢ralWave,
-<a name="l01122"></a>01122 &wstart,&wend,&pscale,&exptime,
-<a name="l01123"></a>01123 &strehl_star_radius,&strehl_bg_r1,
-<a name="l01124"></a>01124 &strehl_bg_r2));
+<a name="l01120"></a>01120 ck0_nomsg(sinfo_get_strehl_input1(frame,&dispersion,¢ralWave,
+<a name="l01121"></a>01121 &wstart,&wend,&pscale,&exptime,
+<a name="l01122"></a>01122 &strehl_star_radius,&strehl_bg_r1,
+<a name="l01123"></a>01123 &strehl_bg_r2));
+<a name="l01124"></a>01124
<a name="l01125"></a>01125
-<a name="l01126"></a>01126
-<a name="l01127"></a>01127 check(sinfo_get_strehl_from_image(ima,
-<a name="l01128"></a>01128 wstart,
-<a name="l01129"></a>01129 wend,
-<a name="l01130"></a>01130 pscale,
-<a name="l01131"></a>01131 strehl_star_radius,
-<a name="l01132"></a>01132 strehl_bg_r1,
-<a name="l01133"></a>01133 strehl_bg_r2,
-<a name="l01134"></a>01134 &strehl,
-<a name="l01135"></a>01135 &strehl_err),<span class="stringliteral">"Computing Strehl"</span>);
+<a name="l01126"></a>01126 check(sinfo_get_strehl_from_image(ima,
+<a name="l01127"></a>01127 wstart,
+<a name="l01128"></a>01128 wend,
+<a name="l01129"></a>01129 pscale,
+<a name="l01130"></a>01130 strehl_star_radius,
+<a name="l01131"></a>01131 strehl_bg_r1,
+<a name="l01132"></a>01132 strehl_bg_r2,
+<a name="l01133"></a>01133 &strehl,
+<a name="l01134"></a>01134 &strehl_err),<span class="stringliteral">"Computing Strehl"</span>);
+<a name="l01135"></a>01135
<a name="l01136"></a>01136
<a name="l01137"></a>01137
<a name="l01138"></a>01138
<a name="l01139"></a>01139
-<a name="l01140"></a>01140
-<a name="l01141"></a>01141 cleanup:
-<a name="l01142"></a>01142 <span class="keywordflow">return</span> strehl;
+<a name="l01140"></a>01140 cleanup:
+<a name="l01141"></a>01141 <span class="keywordflow">return</span> strehl;
+<a name="l01142"></a>01142
<a name="l01143"></a>01143
-<a name="l01144"></a>01144
-<a name="l01145"></a>01145 }
-<a name="l01146"></a>01146
-<a name="l01147"></a>01147 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l01148"></a>01148 sinfo_get_frm12(cpl_frameset* sof,cpl_frame** frm1,cpl_frame** frm2){
-<a name="l01149"></a>01149
-<a name="l01150"></a>01150 cpl_frameset* obs=NULL;
-<a name="l01151"></a>01151 <span class="keywordtype">int</span> nobs=0;
-<a name="l01152"></a>01152 <span class="keywordtype">float</span> eps=0.0001;
-<a name="l01153"></a>01153 <span class="keywordtype">float</span>* pix_scale=NULL;
-<a name="l01154"></a>01154 <span class="keywordtype">int</span> i=0;
-<a name="l01155"></a>01155 cpl_frame* frame=NULL;
-<a name="l01156"></a>01156
-<a name="l01157"></a>01157 obs = cpl_frameset_new();
-<a name="l01158"></a>01158 sinfo_contains_frames_kind(sof,obs,PRO_OBS_PSF);
-<a name="l01159"></a>01159 nobs=cpl_frameset_get_size(obs);
-<a name="l01160"></a>01160 <span class="keywordflow">if</span> (nobs < 1) {
-<a name="l01161"></a>01161 sinfo_contains_frames_kind(sof,obs,PRO_OBS_STD);
-<a name="l01162"></a>01162 nobs=cpl_frameset_get_size(obs);
-<a name="l01163"></a>01163 }
-<a name="l01164"></a>01164
-<a name="l01165"></a>01165 nobs=cpl_frameset_get_size(obs);
+<a name="l01144"></a>01144 }
+<a name="l01145"></a>01145
+<a name="l01146"></a>01146 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l01147"></a>01147 sinfo_get_frm12(cpl_frameset* sof,cpl_frame** frm1,cpl_frame** frm2){
+<a name="l01148"></a>01148
+<a name="l01149"></a>01149 cpl_frameset* obs=NULL;
+<a name="l01150"></a>01150 <span class="keywordtype">int</span> nobs=0;
+<a name="l01151"></a>01151 <span class="keywordtype">float</span> eps=0.0001;
+<a name="l01152"></a>01152 <span class="keywordtype">float</span>* pix_scale=NULL;
+<a name="l01153"></a>01153 <span class="keywordtype">int</span> i=0;
+<a name="l01154"></a>01154 cpl_frame* frame=NULL;
+<a name="l01155"></a>01155
+<a name="l01156"></a>01156 obs = cpl_frameset_new();
+<a name="l01157"></a>01157 sinfo_contains_frames_kind(sof,obs,PRO_OBS_PSF);
+<a name="l01158"></a>01158 nobs=cpl_frameset_get_size(obs);
+<a name="l01159"></a>01159 <span class="keywordflow">if</span> (nobs < 1) {
+<a name="l01160"></a>01160 sinfo_contains_frames_kind(sof,obs,PRO_OBS_STD);
+<a name="l01161"></a>01161 nobs=cpl_frameset_get_size(obs);
+<a name="l01162"></a>01162 }
+<a name="l01163"></a>01163
+<a name="l01164"></a>01164 nobs=cpl_frameset_get_size(obs);
+<a name="l01165"></a>01165
<a name="l01166"></a>01166
-<a name="l01167"></a>01167
-<a name="l01168"></a>01168 <span class="keywordflow">if</span> (nobs < 1) {
-<a name="l01169"></a>01169 sinfo_contains_frames_kind(sof,obs,PRO_OBS_OBJ);
-<a name="l01170"></a>01170 nobs=cpl_frameset_get_size(obs);
-<a name="l01171"></a>01171 }
-<a name="l01172"></a>01172
-<a name="l01173"></a>01173 nobs=cpl_frameset_get_size(obs);
-<a name="l01174"></a>01174
-<a name="l01175"></a>01175 <span class="keywordflow">if</span> (nobs < 1) {
-<a name="l01176"></a>01176 <span class="keywordflow">return</span> -1;
-<a name="l01177"></a>01177 } <span class="keywordflow">else</span> {
-<a name="l01178"></a>01178 pix_scale=cpl_calloc(nobs,<span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));
-<a name="l01179"></a>01179 <span class="keywordflow">for</span>(i=0;i<nobs;i++) {
-<a name="l01180"></a>01180 frame=cpl_frameset_get_frame(obs,i);
-<a name="l01181"></a>01181 pix_scale[i]=sinfo_pfits_get_pixelscale(
-<a name="l01182"></a>01182 (<span class="keywordtype">char</span>*)cpl_frame_get_filename(frame));
-<a name="l01183"></a>01183 <span class="keywordflow">if</span>(fabs(pix_scale[i]-0.025)< eps) {
-<a name="l01184"></a>01184 *frm1=cpl_frame_duplicate(frame);
-<a name="l01185"></a>01185 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(pix_scale[i]-0.1) <eps) {
-<a name="l01186"></a>01186 *frm2=cpl_frame_duplicate(frame);
-<a name="l01187"></a>01187 } <span class="keywordflow">else</span> {
-<a name="l01188"></a>01188 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"No proper frame found for strehl computation"</span>);
-<a name="l01189"></a>01189 <span class="keywordflow">return</span> -1;
-<a name="l01190"></a>01190 }
-<a name="l01191"></a>01191 }
-<a name="l01192"></a>01192 }
-<a name="l01193"></a>01193 cpl_free(pix_scale);
-<a name="l01194"></a>01194 cpl_frameset_delete(obs);
-<a name="l01195"></a>01195
-<a name="l01196"></a>01196 <span class="keywordflow">return</span> 0;
-<a name="l01197"></a>01197
-<a name="l01198"></a>01198 }
+<a name="l01167"></a>01167 <span class="keywordflow">if</span> (nobs < 1) {
+<a name="l01168"></a>01168 sinfo_contains_frames_kind(sof,obs,PRO_OBS_OBJ);
+<a name="l01169"></a>01169 nobs=cpl_frameset_get_size(obs);
+<a name="l01170"></a>01170 }
+<a name="l01171"></a>01171
+<a name="l01172"></a>01172 nobs=cpl_frameset_get_size(obs);
+<a name="l01173"></a>01173
+<a name="l01174"></a>01174 <span class="keywordflow">if</span> (nobs < 1) {
+<a name="l01175"></a>01175 <span class="keywordflow">return</span> -1;
+<a name="l01176"></a>01176 } <span class="keywordflow">else</span> {
+<a name="l01177"></a>01177 pix_scale=cpl_calloc(nobs,<span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));
+<a name="l01178"></a>01178 <span class="keywordflow">for</span>(i=0;i<nobs;i++) {
+<a name="l01179"></a>01179 frame=cpl_frameset_get_frame(obs,i);
+<a name="l01180"></a>01180 pix_scale[i]=sinfo_pfits_get_pixelscale(
+<a name="l01181"></a>01181 (<span class="keywordtype">char</span>*)cpl_frame_get_filename(frame));
+<a name="l01182"></a>01182 <span class="keywordflow">if</span>(fabs(pix_scale[i]-0.025)< eps) {
+<a name="l01183"></a>01183 *frm1=cpl_frame_duplicate(frame);
+<a name="l01184"></a>01184 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fabs(pix_scale[i]-0.1) <eps) {
+<a name="l01185"></a>01185 *frm2=cpl_frame_duplicate(frame);
+<a name="l01186"></a>01186 } <span class="keywordflow">else</span> {
+<a name="l01187"></a>01187 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a>(<span class="stringliteral">"No proper frame found for strehl computation"</span>);
+<a name="l01188"></a>01188 <span class="keywordflow">return</span> -1;
+<a name="l01189"></a>01189 }
+<a name="l01190"></a>01190 }
+<a name="l01191"></a>01191 }
+<a name="l01192"></a>01192 cpl_free(pix_scale);
+<a name="l01193"></a>01193 cpl_frameset_delete(obs);
+<a name="l01194"></a>01194
+<a name="l01195"></a>01195 <span class="keywordflow">return</span> 0;
+<a name="l01196"></a>01196
+<a name="l01197"></a>01197 }
+<a name="l01198"></a>01198
<a name="l01199"></a>01199
<a name="l01200"></a>01200
<a name="l01201"></a>01201
-<a name="l01202"></a>01202
-<a name="l01203"></a>01203 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l01204"></a>01204 sinfo_get_strehl_input1(cpl_frame* frm,
-<a name="l01205"></a>01205 <span class="keywordtype">double</span>* dispersion,
-<a name="l01206"></a>01206 <span class="keywordtype">double</span>* centralWave,
-<a name="l01207"></a>01207 <span class="keywordtype">double</span>* wstart,
-<a name="l01208"></a>01208 <span class="keywordtype">double</span>* wend,
-<a name="l01209"></a>01209 <span class="keywordtype">double</span>* pscale,
-<a name="l01210"></a>01210 <span class="keywordtype">double</span>* exptime,
-<a name="l01211"></a>01211 <span class="keywordtype">double</span>* strehl_star_rad,
-<a name="l01212"></a>01212 <span class="keywordtype">double</span>* strehl_bg_rmin,
-<a name="l01213"></a>01213 <span class="keywordtype">double</span>* strehl_bg_rmax)
-<a name="l01214"></a>01214
-<a name="l01215"></a>01215 {
-<a name="l01216"></a>01216
-<a name="l01217"></a>01217 cpl_propertylist* plist=NULL;
-<a name="l01218"></a>01218 <span class="keywordtype">char</span> res[MAX_NAME_SIZE];
-<a name="l01219"></a>01219 <span class="keywordtype">double</span> pix_scale=0;
-<a name="l01220"></a>01220 <span class="keywordtype">double</span> wrange=0;
-<a name="l01221"></a>01221 <span class="keywordtype">char</span> fname[MAX_NAME_SIZE];
-<a name="l01222"></a>01222 <span class="keywordtype">int</span> naxis3=0;
-<a name="l01223"></a>01223
-<a name="l01224"></a>01224 sinfo_get_spatial_res(frm,res);
-<a name="l01225"></a>01225 pix_scale=atof(res);
-<a name="l01226"></a>01226
-<a name="l01227"></a>01227 <span class="comment">/* factor 2 due to change of detector to 2K</span>
-<a name="l01228"></a>01228 <span class="comment"> *pscale=0.5*pix_scale;</span>
-<a name="l01229"></a>01229 <span class="comment"> */</span>
+<a name="l01202"></a>01202 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l01203"></a>01203 sinfo_get_strehl_input1(cpl_frame* frm,
+<a name="l01204"></a>01204 <span class="keywordtype">double</span>* dispersion,
+<a name="l01205"></a>01205 <span class="keywordtype">double</span>* centralWave,
+<a name="l01206"></a>01206 <span class="keywordtype">double</span>* wstart,
+<a name="l01207"></a>01207 <span class="keywordtype">double</span>* wend,
+<a name="l01208"></a>01208 <span class="keywordtype">double</span>* pscale,
+<a name="l01209"></a>01209 <span class="keywordtype">double</span>* exptime,
+<a name="l01210"></a>01210 <span class="keywordtype">double</span>* strehl_star_rad,
+<a name="l01211"></a>01211 <span class="keywordtype">double</span>* strehl_bg_rmin,
+<a name="l01212"></a>01212 <span class="keywordtype">double</span>* strehl_bg_rmax)
+<a name="l01213"></a>01213
+<a name="l01214"></a>01214 {
+<a name="l01215"></a>01215
+<a name="l01216"></a>01216 cpl_propertylist* plist=NULL;
+<a name="l01217"></a>01217 <span class="keywordtype">char</span> res[MAX_NAME_SIZE];
+<a name="l01218"></a>01218 <span class="keywordtype">double</span> pix_scale=0;
+<a name="l01219"></a>01219 <span class="keywordtype">double</span> wrange=0;
+<a name="l01220"></a>01220 <span class="keywordtype">char</span> fname[MAX_NAME_SIZE];
+<a name="l01221"></a>01221 <span class="keywordtype">int</span> naxis3=0;
+<a name="l01222"></a>01222
+<a name="l01223"></a>01223 sinfo_get_spatial_res(frm,res);
+<a name="l01224"></a>01224 pix_scale=atof(res);
+<a name="l01225"></a>01225
+<a name="l01226"></a>01226 <span class="comment">/* factor 2 due to change of detector to 2K</span>
+<a name="l01227"></a>01227 <span class="comment"> *pscale=0.5*pix_scale;</span>
+<a name="l01228"></a>01228 <span class="comment"> */</span>
+<a name="l01229"></a>01229
<a name="l01230"></a>01230
-<a name="l01231"></a>01231
-<a name="l01232"></a>01232 *pscale=pix_scale;
-<a name="l01233"></a>01233
-<a name="l01234"></a>01234 *strehl_star_rad=SINFO_RSTAR*(*pscale);
-<a name="l01235"></a>01235 *strehl_bg_rmin=SINFO_BKG_R1*(*pscale);
-<a name="l01236"></a>01236 *strehl_bg_rmax=SINFO_BKG_R2*(*pscale);
-<a name="l01237"></a>01237
-<a name="l01238"></a>01238 strcpy(fname,cpl_frame_get_filename(frm));
-<a name="l01239"></a>01239 check_nomsg(plist=cpl_propertylist_load(fname,0));
-<a name="l01240"></a>01240 check_nomsg(*dispersion=sinfo_pfits_get_cdelt3(plist));
-<a name="l01241"></a>01241 *centralWave=sinfo_pfits_get_crval3(plist);
-<a name="l01242"></a>01242 check_nomsg(naxis3=sinfo_pfits_get_naxis3(plist));
-<a name="l01243"></a>01243 *exptime=sinfo_pfits_get_exp_time(plist);
-<a name="l01244"></a>01244 sinfo_free_propertylist(&plist);
-<a name="l01245"></a>01245
-<a name="l01246"></a>01246 wrange=(*dispersion)*naxis3;
-<a name="l01247"></a>01247
-<a name="l01248"></a>01248 *wstart = *centralWave - (wrange / 2) +(*dispersion);
-<a name="l01249"></a>01249 *wend = *wstart + wrange;
+<a name="l01231"></a>01231 *pscale=pix_scale;
+<a name="l01232"></a>01232
+<a name="l01233"></a>01233 *strehl_star_rad=SINFO_RSTAR*(*pscale);
+<a name="l01234"></a>01234 *strehl_bg_rmin=SINFO_BKG_R1*(*pscale);
+<a name="l01235"></a>01235 *strehl_bg_rmax=SINFO_BKG_R2*(*pscale);
+<a name="l01236"></a>01236
+<a name="l01237"></a>01237 strcpy(fname,cpl_frame_get_filename(frm));
+<a name="l01238"></a>01238 check_nomsg(plist=cpl_propertylist_load(fname,0));
+<a name="l01239"></a>01239 check_nomsg(*dispersion=sinfo_pfits_get_cdelt3(plist));
+<a name="l01240"></a>01240 *centralWave=sinfo_pfits_get_crval3(plist);
+<a name="l01241"></a>01241 check_nomsg(naxis3=sinfo_pfits_get_naxis3(plist));
+<a name="l01242"></a>01242 *exptime=sinfo_pfits_get_exp_time(plist);
+<a name="l01243"></a>01243 sinfo_free_propertylist(&plist);
+<a name="l01244"></a>01244
+<a name="l01245"></a>01245 wrange=(*dispersion)*naxis3;
+<a name="l01246"></a>01246
+<a name="l01247"></a>01247 *wstart = *centralWave - (wrange / 2) +(*dispersion);
+<a name="l01248"></a>01248 *wend = *wstart + wrange;
+<a name="l01249"></a>01249
<a name="l01250"></a>01250
-<a name="l01251"></a>01251
-<a name="l01252"></a>01252 cleanup:
-<a name="l01253"></a>01253 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l01254"></a>01254 <span class="keywordflow">return</span> -1;
-<a name="l01255"></a>01255 } <span class="keywordflow">else</span> {
-<a name="l01256"></a>01256 <span class="keywordflow">return</span> 0;
-<a name="l01257"></a>01257 }
-<a name="l01258"></a>01258
-<a name="l01259"></a>01259 }
+<a name="l01251"></a>01251 cleanup:
+<a name="l01252"></a>01252 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l01253"></a>01253 <span class="keywordflow">return</span> -1;
+<a name="l01254"></a>01254 } <span class="keywordflow">else</span> {
+<a name="l01255"></a>01255 <span class="keywordflow">return</span> 0;
+<a name="l01256"></a>01256 }
+<a name="l01257"></a>01257
+<a name="l01258"></a>01258 }
+<a name="l01259"></a>01259
<a name="l01260"></a>01260
-<a name="l01261"></a>01261
-<a name="l01262"></a>01262 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l01263"></a>01263 sinfo_get_strehl_input2(cpl_frame* frm1,
-<a name="l01264"></a>01264 cpl_frame* frm2,
-<a name="l01265"></a>01265 <span class="keywordtype">double</span>* dispersion,
-<a name="l01266"></a>01266 <span class="keywordtype">double</span>* centralWave,
-<a name="l01267"></a>01267 <span class="keywordtype">double</span>* wstart,
-<a name="l01268"></a>01268 <span class="keywordtype">double</span>* wend,
-<a name="l01269"></a>01269 <span class="keywordtype">double</span>* pscale1,
-<a name="l01270"></a>01270 <span class="keywordtype">double</span>* pscale2,
-<a name="l01271"></a>01271 <span class="keywordtype">double</span>* exptime1,
-<a name="l01272"></a>01272 <span class="keywordtype">double</span>* exptime2,
-<a name="l01273"></a>01273 <span class="keywordtype">double</span>* strehl_star_rad1,
-<a name="l01274"></a>01274 <span class="keywordtype">double</span>* strehl_star_rad2,
-<a name="l01275"></a>01275 <span class="keywordtype">double</span>* strehl_bg_rmin1,
-<a name="l01276"></a>01276 <span class="keywordtype">double</span>* strehl_bg_rmin2,
-<a name="l01277"></a>01277 <span class="keywordtype">double</span>* strehl_bg_rmax1,
-<a name="l01278"></a>01278 <span class="keywordtype">double</span>* strehl_bg_rmax2)
-<a name="l01279"></a>01279
-<a name="l01280"></a>01280 {
-<a name="l01281"></a>01281
-<a name="l01282"></a>01282 cpl_propertylist* plist=NULL;
-<a name="l01283"></a>01283 <span class="keywordtype">char</span> res1[MAX_NAME_SIZE];
-<a name="l01284"></a>01284 <span class="keywordtype">char</span> res2[MAX_NAME_SIZE];
-<a name="l01285"></a>01285 <span class="keywordtype">double</span> pix_scale1=0;
-<a name="l01286"></a>01286 <span class="keywordtype">double</span> pix_scale2=0;
-<a name="l01287"></a>01287 <span class="keywordtype">double</span> wrange=0;
-<a name="l01288"></a>01288 <span class="keywordtype">char</span> fname1[MAX_NAME_SIZE];
-<a name="l01289"></a>01289 <span class="keywordtype">char</span> fname2[MAX_NAME_SIZE];
-<a name="l01290"></a>01290 <span class="keywordtype">int</span> naxis3=0;
-<a name="l01291"></a>01291
-<a name="l01292"></a>01292 sinfo_get_spatial_res(frm1,res1);
-<a name="l01293"></a>01293 sinfo_get_spatial_res(frm2,res2);
-<a name="l01294"></a>01294 pix_scale1=atof(res1);
-<a name="l01295"></a>01295 pix_scale2=atof(res2);
-<a name="l01296"></a>01296 <span class="comment">/* factor 2 due to change of detector to 2K</span>
-<a name="l01297"></a>01297 <span class="comment"> *pscale1=0.5*pix_scale1;</span>
-<a name="l01298"></a>01298 <span class="comment"> *pscale2=0.5*pix_scale2;</span>
-<a name="l01299"></a>01299 <span class="comment"> */</span>
-<a name="l01300"></a>01300
-<a name="l01301"></a>01301 *pscale1=pix_scale1;
-<a name="l01302"></a>01302 *pscale2=pix_scale2;
+<a name="l01261"></a>01261 <span class="keyword">static</span> <span class="keywordtype">int</span>
+<a name="l01262"></a>01262 sinfo_get_strehl_input2(cpl_frame* frm1,
+<a name="l01263"></a>01263 cpl_frame* frm2,
+<a name="l01264"></a>01264 <span class="keywordtype">double</span>* dispersion,
+<a name="l01265"></a>01265 <span class="keywordtype">double</span>* centralWave,
+<a name="l01266"></a>01266 <span class="keywordtype">double</span>* wstart,
+<a name="l01267"></a>01267 <span class="keywordtype">double</span>* wend,
+<a name="l01268"></a>01268 <span class="keywordtype">double</span>* pscale1,
+<a name="l01269"></a>01269 <span class="keywordtype">double</span>* pscale2,
+<a name="l01270"></a>01270 <span class="keywordtype">double</span>* exptime1,
+<a name="l01271"></a>01271 <span class="keywordtype">double</span>* exptime2,
+<a name="l01272"></a>01272 <span class="keywordtype">double</span>* strehl_star_rad1,
+<a name="l01273"></a>01273 <span class="keywordtype">double</span>* strehl_star_rad2,
+<a name="l01274"></a>01274 <span class="keywordtype">double</span>* strehl_bg_rmin1,
+<a name="l01275"></a>01275 <span class="keywordtype">double</span>* strehl_bg_rmin2,
+<a name="l01276"></a>01276 <span class="keywordtype">double</span>* strehl_bg_rmax1,
+<a name="l01277"></a>01277 <span class="keywordtype">double</span>* strehl_bg_rmax2)
+<a name="l01278"></a>01278
+<a name="l01279"></a>01279 {
+<a name="l01280"></a>01280
+<a name="l01281"></a>01281 cpl_propertylist* plist=NULL;
+<a name="l01282"></a>01282 <span class="keywordtype">char</span> res1[MAX_NAME_SIZE];
+<a name="l01283"></a>01283 <span class="keywordtype">char</span> res2[MAX_NAME_SIZE];
+<a name="l01284"></a>01284 <span class="keywordtype">double</span> pix_scale1=0;
+<a name="l01285"></a>01285 <span class="keywordtype">double</span> pix_scale2=0;
+<a name="l01286"></a>01286 <span class="keywordtype">double</span> wrange=0;
+<a name="l01287"></a>01287 <span class="keywordtype">char</span> fname1[MAX_NAME_SIZE];
+<a name="l01288"></a>01288 <span class="keywordtype">char</span> fname2[MAX_NAME_SIZE];
+<a name="l01289"></a>01289 <span class="keywordtype">int</span> naxis3=0;
+<a name="l01290"></a>01290
+<a name="l01291"></a>01291 sinfo_get_spatial_res(frm1,res1);
+<a name="l01292"></a>01292 sinfo_get_spatial_res(frm2,res2);
+<a name="l01293"></a>01293 pix_scale1=atof(res1);
+<a name="l01294"></a>01294 pix_scale2=atof(res2);
+<a name="l01295"></a>01295 <span class="comment">/* factor 2 due to change of detector to 2K</span>
+<a name="l01296"></a>01296 <span class="comment"> *pscale1=0.5*pix_scale1;</span>
+<a name="l01297"></a>01297 <span class="comment"> *pscale2=0.5*pix_scale2;</span>
+<a name="l01298"></a>01298 <span class="comment"> */</span>
+<a name="l01299"></a>01299
+<a name="l01300"></a>01300 *pscale1=pix_scale1;
+<a name="l01301"></a>01301 *pscale2=pix_scale2;
+<a name="l01302"></a>01302
<a name="l01303"></a>01303
-<a name="l01304"></a>01304
-<a name="l01305"></a>01305 *strehl_star_rad1=SINFO_RSTAR*(*pscale1);
-<a name="l01306"></a>01306 *strehl_bg_rmin1=SINFO_BKG_R1*(*pscale1);
-<a name="l01307"></a>01307 *strehl_bg_rmax1=SINFO_BKG_R2*(*pscale1);
-<a name="l01308"></a>01308
-<a name="l01309"></a>01309 *strehl_star_rad2=SINFO_RSTAR*(*pscale2);
-<a name="l01310"></a>01310 *strehl_bg_rmin2=SINFO_BKG_R1*(*pscale2);
-<a name="l01311"></a>01311 *strehl_bg_rmax2=SINFO_BKG_R2*(*pscale2);
-<a name="l01312"></a>01312
-<a name="l01313"></a>01313 strcpy(fname1,cpl_frame_get_filename(frm1));
-<a name="l01314"></a>01314 check_nomsg(plist=cpl_propertylist_load(fname1,0));
-<a name="l01315"></a>01315 check_nomsg(*dispersion=sinfo_pfits_get_cdelt3(plist));
-<a name="l01316"></a>01316 *centralWave=sinfo_pfits_get_crval3(plist);
-<a name="l01317"></a>01317 check_nomsg(naxis3=sinfo_pfits_get_naxis3(plist));
-<a name="l01318"></a>01318 *exptime1=sinfo_pfits_get_exp_time(plist);
-<a name="l01319"></a>01319 sinfo_free_propertylist(&plist);
-<a name="l01320"></a>01320 strcpy(fname2,cpl_frame_get_filename(frm2));
+<a name="l01304"></a>01304 *strehl_star_rad1=SINFO_RSTAR*(*pscale1);
+<a name="l01305"></a>01305 *strehl_bg_rmin1=SINFO_BKG_R1*(*pscale1);
+<a name="l01306"></a>01306 *strehl_bg_rmax1=SINFO_BKG_R2*(*pscale1);
+<a name="l01307"></a>01307
+<a name="l01308"></a>01308 *strehl_star_rad2=SINFO_RSTAR*(*pscale2);
+<a name="l01309"></a>01309 *strehl_bg_rmin2=SINFO_BKG_R1*(*pscale2);
+<a name="l01310"></a>01310 *strehl_bg_rmax2=SINFO_BKG_R2*(*pscale2);
+<a name="l01311"></a>01311
+<a name="l01312"></a>01312 strcpy(fname1,cpl_frame_get_filename(frm1));
+<a name="l01313"></a>01313 check_nomsg(plist=cpl_propertylist_load(fname1,0));
+<a name="l01314"></a>01314 check_nomsg(*dispersion=sinfo_pfits_get_cdelt3(plist));
+<a name="l01315"></a>01315 *centralWave=sinfo_pfits_get_crval3(plist);
+<a name="l01316"></a>01316 check_nomsg(naxis3=sinfo_pfits_get_naxis3(plist));
+<a name="l01317"></a>01317 *exptime1=sinfo_pfits_get_exp_time(plist);
+<a name="l01318"></a>01318 sinfo_free_propertylist(&plist);
+<a name="l01319"></a>01319 strcpy(fname2,cpl_frame_get_filename(frm2));
+<a name="l01320"></a>01320
<a name="l01321"></a>01321
-<a name="l01322"></a>01322
-<a name="l01323"></a>01323 check_nomsg(plist=cpl_propertylist_load(fname2,0));
-<a name="l01324"></a>01324 *exptime2=sinfo_pfits_get_exp_time(plist);
-<a name="l01325"></a>01325 sinfo_free_propertylist(&plist);
+<a name="l01322"></a>01322 check_nomsg(plist=cpl_propertylist_load(fname2,0));
+<a name="l01323"></a>01323 *exptime2=sinfo_pfits_get_exp_time(plist);
+<a name="l01324"></a>01324 sinfo_free_propertylist(&plist);
+<a name="l01325"></a>01325
<a name="l01326"></a>01326
<a name="l01327"></a>01327
-<a name="l01328"></a>01328
-<a name="l01329"></a>01329 wrange=(*dispersion)*naxis3;
-<a name="l01330"></a>01330
-<a name="l01331"></a>01331 *wstart = *centralWave - (wrange / 2) +(*dispersion);
-<a name="l01332"></a>01332 *wend = *wstart + wrange;
+<a name="l01328"></a>01328 wrange=(*dispersion)*naxis3;
+<a name="l01329"></a>01329
+<a name="l01330"></a>01330 *wstart = *centralWave - (wrange / 2) +(*dispersion);
+<a name="l01331"></a>01331 *wend = *wstart + wrange;
+<a name="l01332"></a>01332
<a name="l01333"></a>01333
-<a name="l01334"></a>01334
-<a name="l01335"></a>01335 cleanup:
-<a name="l01336"></a>01336 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l01337"></a>01337 <span class="keywordflow">return</span> -1;
-<a name="l01338"></a>01338 } <span class="keywordflow">else</span> {
-<a name="l01339"></a>01339 <span class="keywordflow">return</span> 0;
-<a name="l01340"></a>01340 }
-<a name="l01341"></a>01341
-<a name="l01342"></a>01342 }
+<a name="l01334"></a>01334 cleanup:
+<a name="l01335"></a>01335 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l01336"></a>01336 <span class="keywordflow">return</span> -1;
+<a name="l01337"></a>01337 } <span class="keywordflow">else</span> {
+<a name="l01338"></a>01338 <span class="keywordflow">return</span> 0;
+<a name="l01339"></a>01339 }
+<a name="l01340"></a>01340
+<a name="l01341"></a>01341 }
+<a name="l01342"></a>01342
<a name="l01343"></a>01343
<a name="l01344"></a>01344
-<a name="l01345"></a>01345
-<a name="l01346"></a>01346 <span class="keyword">static</span> cpl_table*
-<a name="l01347"></a>01347 sinfo_get_strehl_from_2images(cpl_image* ima1,
-<a name="l01348"></a>01348 cpl_image* ima2,
-<a name="l01349"></a>01349 cpl_frame* frm1,
-<a name="l01350"></a>01350 cpl_frame* frm2)
-<a name="l01351"></a>01351 {
-<a name="l01352"></a>01352
-<a name="l01353"></a>01353 cpl_table* strehl_tbl=NULL;
+<a name="l01345"></a>01345 <span class="keyword">static</span> cpl_table*
+<a name="l01346"></a>01346 sinfo_get_strehl_from_2images(cpl_image* ima1,
+<a name="l01347"></a>01347 cpl_image* ima2,
+<a name="l01348"></a>01348 cpl_frame* frm1,
+<a name="l01349"></a>01349 cpl_frame* frm2)
+<a name="l01350"></a>01350 {
+<a name="l01351"></a>01351
+<a name="l01352"></a>01352 cpl_table* strehl_tbl=NULL;
+<a name="l01353"></a>01353
<a name="l01354"></a>01354
-<a name="l01355"></a>01355
-<a name="l01356"></a>01356 <span class="keywordtype">double</span> dispersion=0.;
-<a name="l01357"></a>01357 <span class="keywordtype">double</span> centralWave=0.;
-<a name="l01358"></a>01358 <span class="keywordtype">double</span> wstart=0;
-<a name="l01359"></a>01359 <span class="keywordtype">double</span> wstep=0;
-<a name="l01360"></a>01360 <span class="keywordtype">double</span> wend=0;
-<a name="l01361"></a>01361 <span class="keywordtype">double</span> lam=0;
-<a name="l01362"></a>01362 <span class="keywordtype">double</span> dlam=0;
-<a name="l01363"></a>01363 <span class="keywordtype">double</span> pscale1 = 0;
-<a name="l01364"></a>01364 <span class="keywordtype">double</span> pscale2 = 0;
-<a name="l01365"></a>01365
-<a name="l01366"></a>01366 <span class="keywordtype">double</span> strehl_star_rad1=0;
-<a name="l01367"></a>01367 <span class="keywordtype">double</span> strehl_star_rad2=0;
-<a name="l01368"></a>01368 <span class="keywordtype">double</span> strehl_bg_rmin1=0;
-<a name="l01369"></a>01369 <span class="keywordtype">double</span> strehl_bg_rmin2=0;
-<a name="l01370"></a>01370 <span class="keywordtype">double</span> strehl_bg_rmax1=0;
-<a name="l01371"></a>01371 <span class="keywordtype">double</span> strehl_bg_rmax2=0;
-<a name="l01372"></a>01372 <span class="keywordtype">double</span> strehl=0;
-<a name="l01373"></a>01373 <span class="keywordtype">double</span> strehl_err=0;
-<a name="l01374"></a>01374
-<a name="l01375"></a>01375 <span class="keywordtype">int</span> nsample=1;
-<a name="l01376"></a>01376 <span class="keywordtype">double</span> exptime1=0;
-<a name="l01377"></a>01377 <span class="keywordtype">double</span> exptime2=0;
-<a name="l01378"></a>01378 cpl_image* img_dup=NULL;
-<a name="l01379"></a>01379
-<a name="l01380"></a>01380 cpl_size max_ima1_x=0;
-<a name="l01381"></a>01381 cpl_size max_ima1_y=0;
-<a name="l01382"></a>01382
-<a name="l01383"></a>01383 cpl_size max_ima2_x=0;
+<a name="l01355"></a>01355 <span class="keywordtype">double</span> dispersion=0.;
+<a name="l01356"></a>01356 <span class="keywordtype">double</span> centralWave=0.;
+<a name="l01357"></a>01357 <span class="keywordtype">double</span> wstart=0;
+<a name="l01358"></a>01358 <span class="keywordtype">double</span> wstep=0;
+<a name="l01359"></a>01359 <span class="keywordtype">double</span> wend=0;
+<a name="l01360"></a>01360 <span class="keywordtype">double</span> lam=0;
+<a name="l01361"></a>01361 <span class="keywordtype">double</span> dlam=0;
+<a name="l01362"></a>01362 <span class="keywordtype">double</span> pscale1 = 0;
+<a name="l01363"></a>01363 <span class="keywordtype">double</span> pscale2 = 0;
+<a name="l01364"></a>01364
+<a name="l01365"></a>01365 <span class="keywordtype">double</span> strehl_star_rad1=0;
+<a name="l01366"></a>01366 <span class="keywordtype">double</span> strehl_star_rad2=0;
+<a name="l01367"></a>01367 <span class="keywordtype">double</span> strehl_bg_rmin1=0;
+<a name="l01368"></a>01368 <span class="keywordtype">double</span> strehl_bg_rmin2=0;
+<a name="l01369"></a>01369 <span class="keywordtype">double</span> strehl_bg_rmax1=0;
+<a name="l01370"></a>01370 <span class="keywordtype">double</span> strehl_bg_rmax2=0;
+<a name="l01371"></a>01371 <span class="keywordtype">double</span> strehl=0;
+<a name="l01372"></a>01372 <span class="keywordtype">double</span> strehl_err=0;
+<a name="l01373"></a>01373
+<a name="l01374"></a>01374 <span class="keywordtype">int</span> nsample=1;
+<a name="l01375"></a>01375 <span class="keywordtype">double</span> exptime1=0;
+<a name="l01376"></a>01376 <span class="keywordtype">double</span> exptime2=0;
+<a name="l01377"></a>01377 cpl_image* img_dup=NULL;
+<a name="l01378"></a>01378
+<a name="l01379"></a>01379 cpl_size max_ima1_x=0;
+<a name="l01380"></a>01380 cpl_size max_ima1_y=0;
+<a name="l01381"></a>01381
+<a name="l01382"></a>01382 cpl_size max_ima2_x=0;
+<a name="l01383"></a>01383
<a name="l01384"></a>01384
-<a name="l01385"></a>01385
-<a name="l01386"></a>01386 cpl_size max_ima2_y=0;
-<a name="l01387"></a>01387 <span class="keywordtype">double</span> star_bkg=0;
-<a name="l01388"></a>01388 <span class="keywordtype">double</span> star_peak=0;
-<a name="l01389"></a>01389 <span class="keywordtype">double</span> star_flux=0;
-<a name="l01390"></a>01390
-<a name="l01391"></a>01391 <span class="keywordtype">double</span> psf_peak=0;
-<a name="l01392"></a>01392 <span class="keywordtype">double</span> psf_flux=0;
-<a name="l01393"></a>01393 <span class="keywordtype">double</span> bkg_noise=0;
-<a name="l01394"></a>01394
-<a name="l01395"></a>01395 cpl_errorstate clean_state = cpl_errorstate_get();
-<a name="l01396"></a>01396
-<a name="l01397"></a>01397 ck0_nomsg(sinfo_get_strehl_input2(frm1,frm2,&dispersion, ¢ralWave,
-<a name="l01398"></a>01398 &wstart,&wend,&pscale1,&pscale2,
-<a name="l01399"></a>01399 &exptime1,&exptime2,
-<a name="l01400"></a>01400 &strehl_star_rad1,&strehl_star_rad2,
-<a name="l01401"></a>01401 &strehl_bg_rmin1,&strehl_bg_rmin2,
-<a name="l01402"></a>01402 &strehl_bg_rmax1,&strehl_bg_rmax2));
+<a name="l01385"></a>01385 cpl_size max_ima2_y=0;
+<a name="l01386"></a>01386 <span class="keywordtype">double</span> star_bkg=0;
+<a name="l01387"></a>01387 <span class="keywordtype">double</span> star_peak=0;
+<a name="l01388"></a>01388 <span class="keywordtype">double</span> star_flux=0;
+<a name="l01389"></a>01389
+<a name="l01390"></a>01390 <span class="keywordtype">double</span> psf_peak=0;
+<a name="l01391"></a>01391 <span class="keywordtype">double</span> psf_flux=0;
+<a name="l01392"></a>01392 <span class="keywordtype">double</span> bkg_noise=0;
+<a name="l01393"></a>01393
+<a name="l01394"></a>01394 cpl_errorstate clean_state = cpl_errorstate_get();
+<a name="l01395"></a>01395
+<a name="l01396"></a>01396 ck0_nomsg(sinfo_get_strehl_input2(frm1,frm2,&dispersion, ¢ralWave,
+<a name="l01397"></a>01397 &wstart,&wend,&pscale1,&pscale2,
+<a name="l01398"></a>01398 &exptime1,&exptime2,
+<a name="l01399"></a>01399 &strehl_star_rad1,&strehl_star_rad2,
+<a name="l01400"></a>01400 &strehl_bg_rmin1,&strehl_bg_rmin2,
+<a name="l01401"></a>01401 &strehl_bg_rmax1,&strehl_bg_rmax2));
+<a name="l01402"></a>01402
<a name="l01403"></a>01403
<a name="l01404"></a>01404
<a name="l01405"></a>01405
<a name="l01406"></a>01406
-<a name="l01407"></a>01407
-<a name="l01408"></a>01408 check_nomsg(img_dup=cpl_image_duplicate(ima1));
-<a name="l01409"></a>01409 sinfo_clean_nan(&img_dup);
-<a name="l01410"></a>01410 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima1_x,&max_ima1_y));
-<a name="l01411"></a>01411 sinfo_free_image(&img_dup);
+<a name="l01407"></a>01407 check_nomsg(img_dup=cpl_image_duplicate(ima1));
+<a name="l01408"></a>01408 sinfo_clean_nan(&img_dup);
+<a name="l01409"></a>01409 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima1_x,&max_ima1_y));
+<a name="l01410"></a>01410 sinfo_free_image(&img_dup);
+<a name="l01411"></a>01411
<a name="l01412"></a>01412
-<a name="l01413"></a>01413
-<a name="l01414"></a>01414 check_nomsg(img_dup=cpl_image_duplicate(ima2));
-<a name="l01415"></a>01415 sinfo_clean_nan(&img_dup);
-<a name="l01416"></a>01416 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima2_x,&max_ima2_y));
-<a name="l01417"></a>01417 sinfo_free_image(&img_dup);
-<a name="l01418"></a>01418
-<a name="l01419"></a>01419 <span class="comment">/*</span>
-<a name="l01420"></a>01420 <span class="comment"> note:</span>
-<a name="l01421"></a>01421 <span class="comment"> -wstep as we do not hit the borders where the</span>
-<a name="l01422"></a>01422 <span class="comment"> sinfo_gaussian fit has a problem</span>
-<a name="l01423"></a>01423 <span class="comment"> */</span>
+<a name="l01413"></a>01413 check_nomsg(img_dup=cpl_image_duplicate(ima2));
+<a name="l01414"></a>01414 sinfo_clean_nan(&img_dup);
+<a name="l01415"></a>01415 check_nomsg(cpl_image_get_maxpos(img_dup,&max_ima2_x,&max_ima2_y));
+<a name="l01416"></a>01416 sinfo_free_image(&img_dup);
+<a name="l01417"></a>01417
+<a name="l01418"></a>01418 <span class="comment">/*</span>
+<a name="l01419"></a>01419 <span class="comment"> note:</span>
+<a name="l01420"></a>01420 <span class="comment"> -wstep as we do not hit the borders where the</span>
+<a name="l01421"></a>01421 <span class="comment"> sinfo_gaussian fit has a problem</span>
+<a name="l01422"></a>01422 <span class="comment"> */</span>
+<a name="l01423"></a>01423
<a name="l01424"></a>01424
<a name="l01425"></a>01425
-<a name="l01426"></a>01426
-<a name="l01427"></a>01427 check_nomsg(strehl_tbl = cpl_table_new(nsample));
-<a name="l01428"></a>01428 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"wavelength"</span>,CPL_TYPE_DOUBLE));
-<a name="l01429"></a>01429 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl"</span>,CPL_TYPE_DOUBLE));
-<a name="l01430"></a>01430 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,CPL_TYPE_DOUBLE));
-<a name="l01431"></a>01431 wstep = wend-wstart;
+<a name="l01426"></a>01426 check_nomsg(strehl_tbl = cpl_table_new(nsample));
+<a name="l01427"></a>01427 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"wavelength"</span>,CPL_TYPE_DOUBLE));
+<a name="l01428"></a>01428 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl"</span>,CPL_TYPE_DOUBLE));
+<a name="l01429"></a>01429 check_nomsg(cpl_table_new_column(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,CPL_TYPE_DOUBLE));
+<a name="l01430"></a>01430 wstep = wend-wstart;
+<a name="l01431"></a>01431
<a name="l01432"></a>01432
<a name="l01433"></a>01433
-<a name="l01434"></a>01434
-<a name="l01435"></a>01435 lam = (double)0.5*(wstart+wend);
-<a name="l01436"></a>01436 dlam=wstep;
-<a name="l01437"></a>01437 sinfo_msg(<span class="stringliteral">"lambda=%f dlambda=%f"</span>,lam,dlam);
-<a name="l01438"></a>01438 sinfo_msg(<span class="stringliteral">"wstart=%f wend=%f"</span>,wstart,wend);
-<a name="l01439"></a>01439 sinfo_msg(<span class="stringliteral">"wstep=%f"</span>,wstep);
+<a name="l01434"></a>01434 lam = (double)0.5*(wstart+wend);
+<a name="l01435"></a>01435 dlam=wstep;
+<a name="l01436"></a>01436 sinfo_msg(<span class="stringliteral">"lambda=%f dlambda=%f"</span>,lam,dlam);
+<a name="l01437"></a>01437 sinfo_msg(<span class="stringliteral">"wstart=%f wend=%f"</span>,wstart,wend);
+<a name="l01438"></a>01438 sinfo_msg(<span class="stringliteral">"wstep=%f"</span>,wstep);
+<a name="l01439"></a>01439
<a name="l01440"></a>01440
-<a name="l01441"></a>01441
-<a name="l01442"></a>01442 <span class="keywordflow">if</span>(CPL_ERROR_NONE != sinfo_strehl_compute_two(ima1,ima2,
-<a name="l01443"></a>01443 SINFO_STREHL_M1,SINFO_STREHL_M2,
-<a name="l01444"></a>01444 lam,
-<a name="l01445"></a>01445 pscale1,pscale2,
-<a name="l01446"></a>01446 exptime1,exptime2,
-<a name="l01447"></a>01447 max_ima1_x,max_ima1_y,
-<a name="l01448"></a>01448 max_ima2_x,max_ima2_y,
-<a name="l01449"></a>01449 strehl_star_rad1,
-<a name="l01450"></a>01450 strehl_bg_rmin1,
-<a name="l01451"></a>01451 strehl_bg_rmax1,
-<a name="l01452"></a>01452 &strehl,&strehl_err,&star_bkg,
-<a name="l01453"></a>01453 &star_peak,&star_flux,
-<a name="l01454"></a>01454 &psf_peak,&psf_flux,&bkg_noise))
-<a name="l01455"></a>01455 {
-<a name="l01456"></a>01456
-<a name="l01457"></a>01457 strehl=-1;
-<a name="l01458"></a>01458 strehl_err=0;
-<a name="l01459"></a>01459 irplib_error_recover(clean_state,
-<a name="l01460"></a>01460 <span class="stringliteral">"Problem computing strehl, set it to -1"</span>);
-<a name="l01461"></a>01461
-<a name="l01462"></a>01462 }
+<a name="l01441"></a>01441 <span class="keywordflow">if</span>(CPL_ERROR_NONE != sinfo_strehl_compute_two(ima1,ima2,
+<a name="l01442"></a>01442 SINFO_STREHL_M1,SINFO_STREHL_M2,
+<a name="l01443"></a>01443 lam,
+<a name="l01444"></a>01444 pscale1,pscale2,
+<a name="l01445"></a>01445 exptime1,exptime2,
+<a name="l01446"></a>01446 max_ima1_x,max_ima1_y,
+<a name="l01447"></a>01447 max_ima2_x,max_ima2_y,
+<a name="l01448"></a>01448 strehl_star_rad1,
+<a name="l01449"></a>01449 strehl_bg_rmin1,
+<a name="l01450"></a>01450 strehl_bg_rmax1,
+<a name="l01451"></a>01451 &strehl,&strehl_err,&star_bkg,
+<a name="l01452"></a>01452 &star_peak,&star_flux,
+<a name="l01453"></a>01453 &psf_peak,&psf_flux,&bkg_noise))
+<a name="l01454"></a>01454 {
+<a name="l01455"></a>01455
+<a name="l01456"></a>01456 strehl=-1;
+<a name="l01457"></a>01457 strehl_err=0;
+<a name="l01458"></a>01458 irplib_error_recover(clean_state,
+<a name="l01459"></a>01459 <span class="stringliteral">"Problem computing strehl, set it to -1"</span>);
+<a name="l01460"></a>01460
+<a name="l01461"></a>01461 }
+<a name="l01462"></a>01462
<a name="l01463"></a>01463
-<a name="l01464"></a>01464
-<a name="l01465"></a>01465 <span class="keywordflow">if</span>((isnan(lam) ==0) &&
-<a name="l01466"></a>01466 (isnan(lam) ==0) &&
-<a name="l01467"></a>01467 (isnan(lam) ==0)) {
-<a name="l01468"></a>01468 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"wavelength"</span>,0,lam));
-<a name="l01469"></a>01469 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl"</span>,0,strehl));
-<a name="l01470"></a>01470 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,
-<a name="l01471"></a>01471 0,strehl_err));
-<a name="l01472"></a>01472
-<a name="l01473"></a>01473 }
+<a name="l01464"></a>01464 <span class="keywordflow">if</span>((isnan(lam) ==0) &&
+<a name="l01465"></a>01465 (isnan(lam) ==0) &&
+<a name="l01466"></a>01466 (isnan(lam) ==0)) {
+<a name="l01467"></a>01467 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"wavelength"</span>,0,lam));
+<a name="l01468"></a>01468 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl"</span>,0,strehl));
+<a name="l01469"></a>01469 check_nomsg(cpl_table_set_double(strehl_tbl,<span class="stringliteral">"strehl_error"</span>,
+<a name="l01470"></a>01470 0,strehl_err));
+<a name="l01471"></a>01471
+<a name="l01472"></a>01472 }
+<a name="l01473"></a>01473
<a name="l01474"></a>01474
<a name="l01475"></a>01475
-<a name="l01476"></a>01476
-<a name="l01477"></a>01477 <span class="keywordflow">return</span> strehl_tbl;
-<a name="l01478"></a>01478 cleanup:
+<a name="l01476"></a>01476 <span class="keywordflow">return</span> strehl_tbl;
+<a name="l01477"></a>01477 cleanup:
+<a name="l01478"></a>01478
<a name="l01479"></a>01479
-<a name="l01480"></a>01480
-<a name="l01481"></a>01481 <span class="keywordflow">return</span> NULL;
-<a name="l01482"></a>01482 }
+<a name="l01480"></a>01480 <span class="keywordflow">return</span> NULL;
+<a name="l01481"></a>01481 }
+<a name="l01482"></a>01482
<a name="l01483"></a>01483
<a name="l01484"></a>01484
-<a name="l01485"></a>01485
-<a name="l01486"></a>01486 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01521"></a>01521 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l01522"></a>01522 <span class="preprocessor">#define irplib_assure_code cpl_ensure_code</span>
-<a name="l01523"></a>01523 <span class="preprocessor"></span><span class="keywordtype">int</span> sinfo_strehl_compute_two(
-<a name="l01524"></a>01524 <span class="keyword">const</span> cpl_image * im1,
-<a name="l01525"></a>01525 <span class="keyword">const</span> cpl_image * im2,
-<a name="l01526"></a>01526 <span class="keywordtype">double</span> m1,
-<a name="l01527"></a>01527 <span class="keywordtype">double</span> m2,
-<a name="l01528"></a>01528 <span class="keywordtype">double</span> lam,
-<a name="l01529"></a>01529 <span class="keywordtype">double</span> pscale1,
-<a name="l01530"></a>01530 <span class="keywordtype">double</span> pscale2,
-<a name="l01531"></a>01531 <span class="keywordtype">double</span> exptime1,
-<a name="l01532"></a>01532 <span class="keywordtype">double</span> exptime2,
-<a name="l01533"></a>01533 <span class="keywordtype">int</span> xpos1,
-<a name="l01534"></a>01534 <span class="keywordtype">int</span> ypos1,
-<a name="l01535"></a>01535 <span class="keywordtype">int</span> xpos2,
-<a name="l01536"></a>01536 <span class="keywordtype">int</span> ypos2,
-<a name="l01537"></a>01537 <span class="keywordtype">double</span> r1,
-<a name="l01538"></a>01538 <span class="keywordtype">double</span> r2,
-<a name="l01539"></a>01539 <span class="keywordtype">double</span> r3,
-<a name="l01540"></a>01540 <span class="keywordtype">double</span> * strehl,
-<a name="l01541"></a>01541 <span class="keywordtype">double</span> * strehl_err,
-<a name="l01542"></a>01542 <span class="keywordtype">double</span> * star_bkg,
-<a name="l01543"></a>01543 <span class="keywordtype">double</span> * star_peak,
-<a name="l01544"></a>01544 <span class="keywordtype">double</span> * star_flux,
-<a name="l01545"></a>01545 <span class="keywordtype">double</span> * psf_peak,
-<a name="l01546"></a>01546 <span class="keywordtype">double</span> * psf_flux,
-<a name="l01547"></a>01547 <span class="keywordtype">double</span> * bg_noise)
-<a name="l01548"></a>01548 {
-<a name="l01549"></a>01549 <span class="keywordtype">double</span> psf_peak1=0;
-<a name="l01550"></a>01550 <span class="keywordtype">double</span> psf_peak2=0;
-<a name="l01551"></a>01551 <span class="keywordtype">double</span> psf_flux1=0;
-<a name="l01552"></a>01552 <span class="keywordtype">double</span> psf_flux2=0;
-<a name="l01553"></a>01553 <span class="keywordtype">double</span> star_bkg1=0;
-<a name="l01554"></a>01554 <span class="keywordtype">double</span> star_bkg2=0;
-<a name="l01555"></a>01555 <span class="keywordtype">double</span> star_flux1=0;
-<a name="l01556"></a>01556 <span class="keywordtype">double</span> star_flux2=0;
-<a name="l01557"></a>01557 <span class="keywordtype">double</span> star_peak1=0;
-<a name="l01558"></a>01558 <span class="keywordtype">double</span> star_peak2=0;
-<a name="l01559"></a>01559
-<a name="l01560"></a>01560 <span class="keyword">const</span> <span class="keywordtype">double</span> window_size = 5.0 ;
-<a name="l01561"></a>01561 <span class="keywordtype">double</span> star_radius, max_radius ;
-<a name="l01562"></a>01562 <span class="keywordtype">double</span> ring[4];
-<a name="l01563"></a>01563
-<a name="l01564"></a>01564 <span class="keywordtype">double</span> prat=pscale2/pscale1;
-<a name="l01565"></a>01565 <span class="keywordtype">double</span> prat2=prat*prat;
-<a name="l01566"></a>01566 <span class="keywordtype">double</span> trat=exptime1/exptime2;
-<a name="l01567"></a>01567 <span class="keywordtype">double</span> frat=sinfo_scale_flux(pscale1,pscale2,exptime1,exptime2);
-<a name="l01568"></a>01568 <span class="keywordtype">double</span> xc=0;
-<a name="l01569"></a>01569 <span class="keywordtype">double</span> yc=0;
-<a name="l01570"></a>01570
-<a name="l01571"></a>01571 <span class="keywordtype">int</span> sx=0;
-<a name="l01572"></a>01572 <span class="keywordtype">int</span> sy=0;
-<a name="l01573"></a>01573 <span class="keywordtype">int</span> d=16;
-<a name="l01574"></a>01574 cpl_errorstate initial_errorstate = cpl_errorstate_get();
+<a name="l01485"></a>01485 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01520"></a>01520 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l01521"></a>01521 <span class="preprocessor">#define irplib_assure_code cpl_ensure_code</span>
+<a name="l01522"></a>01522 <span class="preprocessor"></span><span class="keywordtype">int</span> sinfo_strehl_compute_two(
+<a name="l01523"></a>01523 <span class="keyword">const</span> cpl_image * im1,
+<a name="l01524"></a>01524 <span class="keyword">const</span> cpl_image * im2,
+<a name="l01525"></a>01525 <span class="keywordtype">double</span> m1,
+<a name="l01526"></a>01526 <span class="keywordtype">double</span> m2,
+<a name="l01527"></a>01527 <span class="keywordtype">double</span> lam,
+<a name="l01528"></a>01528 <span class="keywordtype">double</span> pscale1,
+<a name="l01529"></a>01529 <span class="keywordtype">double</span> pscale2,
+<a name="l01530"></a>01530 <span class="keywordtype">double</span> exptime1,
+<a name="l01531"></a>01531 <span class="keywordtype">double</span> exptime2,
+<a name="l01532"></a>01532 <span class="keywordtype">int</span> xpos1,
+<a name="l01533"></a>01533 <span class="keywordtype">int</span> ypos1,
+<a name="l01534"></a>01534 <span class="keywordtype">int</span> xpos2,
+<a name="l01535"></a>01535 <span class="keywordtype">int</span> ypos2,
+<a name="l01536"></a>01536 <span class="keywordtype">double</span> r1,
+<a name="l01537"></a>01537 <span class="keywordtype">double</span> r2,
+<a name="l01538"></a>01538 <span class="keywordtype">double</span> r3,
+<a name="l01539"></a>01539 <span class="keywordtype">double</span> * strehl,
+<a name="l01540"></a>01540 <span class="keywordtype">double</span> * strehl_err,
+<a name="l01541"></a>01541 <span class="keywordtype">double</span> * star_bkg,
+<a name="l01542"></a>01542 <span class="keywordtype">double</span> * star_peak,
+<a name="l01543"></a>01543 <span class="keywordtype">double</span> * star_flux,
+<a name="l01544"></a>01544 <span class="keywordtype">double</span> * psf_peak,
+<a name="l01545"></a>01545 <span class="keywordtype">double</span> * psf_flux,
+<a name="l01546"></a>01546 <span class="keywordtype">double</span> * bg_noise)
+<a name="l01547"></a>01547 {
+<a name="l01548"></a>01548 <span class="keywordtype">double</span> psf_peak1=0;
+<a name="l01549"></a>01549 <span class="keywordtype">double</span> psf_peak2=0;
+<a name="l01550"></a>01550 <span class="keywordtype">double</span> psf_flux1=0;
+<a name="l01551"></a>01551 <span class="keywordtype">double</span> psf_flux2=0;
+<a name="l01552"></a>01552 <span class="keywordtype">double</span> star_bkg1=0;
+<a name="l01553"></a>01553 <span class="keywordtype">double</span> star_bkg2=0;
+<a name="l01554"></a>01554 <span class="keywordtype">double</span> star_flux1=0;
+<a name="l01555"></a>01555 <span class="keywordtype">double</span> star_flux2=0;
+<a name="l01556"></a>01556 <span class="keywordtype">double</span> star_peak1=0;
+<a name="l01557"></a>01557 <span class="keywordtype">double</span> star_peak2=0;
+<a name="l01558"></a>01558
+<a name="l01559"></a>01559 <span class="keyword">const</span> <span class="keywordtype">double</span> window_size = 5.0 ;
+<a name="l01560"></a>01560 <span class="keywordtype">double</span> star_radius, max_radius ;
+<a name="l01561"></a>01561 <span class="keywordtype">double</span> ring[4];
+<a name="l01562"></a>01562
+<a name="l01563"></a>01563 <span class="keywordtype">double</span> prat=pscale2/pscale1;
+<a name="l01564"></a>01564 <span class="keywordtype">double</span> prat2=prat*prat;
+<a name="l01565"></a>01565 <span class="keywordtype">double</span> trat=exptime1/exptime2;
+<a name="l01566"></a>01566 <span class="keywordtype">double</span> frat=sinfo_scale_flux(pscale1,pscale2,exptime1,exptime2);
+<a name="l01567"></a>01567 <span class="keywordtype">double</span> xc=0;
+<a name="l01568"></a>01568 <span class="keywordtype">double</span> yc=0;
+<a name="l01569"></a>01569
+<a name="l01570"></a>01570 <span class="keywordtype">int</span> sx=0;
+<a name="l01571"></a>01571 <span class="keywordtype">int</span> sy=0;
+<a name="l01572"></a>01572 <span class="keywordtype">int</span> d=16;
+<a name="l01573"></a>01573 cpl_errorstate initial_errorstate = cpl_errorstate_get();
+<a name="l01574"></a>01574
<a name="l01575"></a>01575
-<a name="l01576"></a>01576
-<a name="l01577"></a>01577 <span class="comment">/* Test inputs */</span>
-<a name="l01578"></a>01578 irplib_assure_code(im1 != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01579"></a>01579 irplib_assure_code(im2 != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01580"></a>01580 irplib_assure_code(strehl != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01581"></a>01581 irplib_assure_code(strehl_err != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01582"></a>01582 irplib_assure_code(star_bkg != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01583"></a>01583 irplib_assure_code(star_peak != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01584"></a>01584 irplib_assure_code(star_flux != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01585"></a>01585 irplib_assure_code(psf_peak != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01586"></a>01586 irplib_assure_code(psf_flux != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01587"></a>01587
-<a name="l01588"></a>01588 irplib_assure_code(pscale1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01589"></a>01589 irplib_assure_code(pscale2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01590"></a>01590
-<a name="l01591"></a>01591 irplib_assure_code(xpos1-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01592"></a>01592 irplib_assure_code(ypos1-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01593"></a>01593 irplib_assure_code(xpos2-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01594"></a>01594 irplib_assure_code(ypos2-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01595"></a>01595
-<a name="l01596"></a>01596 irplib_assure_code(xpos1+window_size <= cpl_image_get_size_x(im1),
-<a name="l01597"></a>01597 CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01598"></a>01598 irplib_assure_code(ypos1+window_size <= cpl_image_get_size_y(im1),
-<a name="l01599"></a>01599 CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01600"></a>01600
-<a name="l01601"></a>01601 irplib_assure_code(xpos2+window_size <= cpl_image_get_size_x(im2),
-<a name="l01602"></a>01602 CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01603"></a>01603 irplib_assure_code(ypos2+window_size <= cpl_image_get_size_y(im2),
-<a name="l01604"></a>01604 CPL_ERROR_ACCESS_OUT_OF_RANGE);
-<a name="l01605"></a>01605
-<a name="l01606"></a>01606 irplib_assure_code(r1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01607"></a>01607 irplib_assure_code(r2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01608"></a>01608 irplib_assure_code(r3 > r2, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01609"></a>01609
-<a name="l01610"></a>01610 <span class="comment">/* Computing a Strehl ratio is a story between an ideal PSF */</span>
-<a name="l01611"></a>01611 <span class="comment">/* and a candidate image supposed to approximate this ideal PSF. */</span>
-<a name="l01612"></a>01612
-<a name="l01613"></a>01613 <span class="comment">/* Generate first appropriate PSF to find max peak: same pscale as</span>
-<a name="l01614"></a>01614 <span class="comment"> the one of the image where we compute the flux */</span>
+<a name="l01576"></a>01576 <span class="comment">/* Test inputs */</span>
+<a name="l01577"></a>01577 irplib_assure_code(im1 != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01578"></a>01578 irplib_assure_code(im2 != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01579"></a>01579 irplib_assure_code(strehl != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01580"></a>01580 irplib_assure_code(strehl_err != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01581"></a>01581 irplib_assure_code(star_bkg != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01582"></a>01582 irplib_assure_code(star_peak != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01583"></a>01583 irplib_assure_code(star_flux != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01584"></a>01584 irplib_assure_code(psf_peak != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01585"></a>01585 irplib_assure_code(psf_flux != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01586"></a>01586
+<a name="l01587"></a>01587 irplib_assure_code(pscale1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01588"></a>01588 irplib_assure_code(pscale2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01589"></a>01589
+<a name="l01590"></a>01590 irplib_assure_code(xpos1-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01591"></a>01591 irplib_assure_code(ypos1-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01592"></a>01592 irplib_assure_code(xpos2-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01593"></a>01593 irplib_assure_code(ypos2-window_size > 0, CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01594"></a>01594
+<a name="l01595"></a>01595 irplib_assure_code(xpos1+window_size <= cpl_image_get_size_x(im1),
+<a name="l01596"></a>01596 CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01597"></a>01597 irplib_assure_code(ypos1+window_size <= cpl_image_get_size_y(im1),
+<a name="l01598"></a>01598 CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01599"></a>01599
+<a name="l01600"></a>01600 irplib_assure_code(xpos2+window_size <= cpl_image_get_size_x(im2),
+<a name="l01601"></a>01601 CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01602"></a>01602 irplib_assure_code(ypos2+window_size <= cpl_image_get_size_y(im2),
+<a name="l01603"></a>01603 CPL_ERROR_ACCESS_OUT_OF_RANGE);
+<a name="l01604"></a>01604
+<a name="l01605"></a>01605 irplib_assure_code(r1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01606"></a>01606 irplib_assure_code(r2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01607"></a>01607 irplib_assure_code(r3 > r2, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01608"></a>01608
+<a name="l01609"></a>01609 <span class="comment">/* Computing a Strehl ratio is a story between an ideal PSF */</span>
+<a name="l01610"></a>01610 <span class="comment">/* and a candidate image supposed to approximate this ideal PSF. */</span>
+<a name="l01611"></a>01611
+<a name="l01612"></a>01612 <span class="comment">/* Generate first appropriate PSF to find max peak: same pscale as</span>
+<a name="l01613"></a>01613 <span class="comment"> the one of the image where we compute the flux */</span>
+<a name="l01614"></a>01614
<a name="l01615"></a>01615
-<a name="l01616"></a>01616
-<a name="l01617"></a>01617 sx=cpl_image_get_size_x(im1);
-<a name="l01618"></a>01618 sy=cpl_image_get_size_y(im1);
+<a name="l01616"></a>01616 sx=cpl_image_get_size_x(im1);
+<a name="l01617"></a>01617 sy=cpl_image_get_size_y(im1);
+<a name="l01618"></a>01618
<a name="l01619"></a>01619
-<a name="l01620"></a>01620
-<a name="l01621"></a>01621 psf_flux1 = 1.0; <span class="comment">// The psf flux, cpl_image_get_flux(psf), is always 1</span>
-<a name="l01622"></a>01622 psf_flux2 = 1.0; <span class="comment">// The psf flux, cpl_image_get_flux(psf), is always 1</span>
-<a name="l01623"></a>01623 *psf_flux=1.0;
-<a name="l01624"></a>01624 ring[0] = xpos2;
-<a name="l01625"></a>01625 ring[1] = ypos2;
-<a name="l01626"></a>01626 ring[2] = r2/pscale2;
-<a name="l01627"></a>01627 ring[3] = r3/pscale2;
-<a name="l01628"></a>01628
-<a name="l01629"></a>01629 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_pos=%d %d %d %d"</span>,xpos1,ypos1,xpos2,ypos2);
-<a name="l01630"></a>01630 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_ring=%f %f %f %f"</span>,ring[0],ring[1],ring[2],ring[3]);
-<a name="l01631"></a>01631
-<a name="l01632"></a>01632 <span class="comment">/* Compute star_radius in pixels */</span>
-<a name="l01633"></a>01633 star_radius = r1/pscale2;
-<a name="l01634"></a>01634
-<a name="l01635"></a>01635 <span class="comment">/* Find the peak value on the central part of the candidate image */</span>
+<a name="l01620"></a>01620 psf_flux1 = 1.0; <span class="comment">// The psf flux, cpl_image_get_flux(psf), is always 1</span>
+<a name="l01621"></a>01621 psf_flux2 = 1.0; <span class="comment">// The psf flux, cpl_image_get_flux(psf), is always 1</span>
+<a name="l01622"></a>01622 *psf_flux=1.0;
+<a name="l01623"></a>01623 ring[0] = xpos2;
+<a name="l01624"></a>01624 ring[1] = ypos2;
+<a name="l01625"></a>01625 ring[2] = r2/pscale2;
+<a name="l01626"></a>01626 ring[3] = r3/pscale2;
+<a name="l01627"></a>01627
+<a name="l01628"></a>01628 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_pos=%d %d %d %d"</span>,xpos1,ypos1,xpos2,ypos2);
+<a name="l01629"></a>01629 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_ring=%f %f %f %f"</span>,ring[0],ring[1],ring[2],ring[3]);
+<a name="l01630"></a>01630
+<a name="l01631"></a>01631 <span class="comment">/* Compute star_radius in pixels */</span>
+<a name="l01632"></a>01632 star_radius = r1/pscale2;
+<a name="l01633"></a>01633
+<a name="l01634"></a>01634 <span class="comment">/* Find the peak value on the central part of the candidate image */</span>
+<a name="l01635"></a>01635
<a name="l01636"></a>01636
-<a name="l01637"></a>01637
-<a name="l01638"></a>01638 <span class="comment">/* Find the peak value on the central part of the candidate image */</span>
-<a name="l01639"></a>01639 max_radius = window_size < star_radius ? window_size : star_radius;
-<a name="l01640"></a>01640
-<a name="l01641"></a>01641 check_nomsg(sinfo_get_star_features(im1,d,xpos1,ypos1,&xc,&yc,
-<a name="l01642"></a>01642 &star_peak1,&star_flux1,&star_bkg1));
+<a name="l01637"></a>01637 <span class="comment">/* Find the peak value on the central part of the candidate image */</span>
+<a name="l01638"></a>01638 max_radius = window_size < star_radius ? window_size : star_radius;
+<a name="l01639"></a>01639
+<a name="l01640"></a>01640 check_nomsg(sinfo_get_star_features(im1,d,xpos1,ypos1,&xc,&yc,
+<a name="l01641"></a>01641 &star_peak1,&star_flux1,&star_bkg1));
+<a name="l01642"></a>01642
<a name="l01643"></a>01643
-<a name="l01644"></a>01644
-<a name="l01645"></a>01645 *star_peak=star_peak1;
-<a name="l01646"></a>01646
-<a name="l01647"></a>01647 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale1,xc,yc,1.,
-<a name="l01648"></a>01648 &psf_peak1));
-<a name="l01649"></a>01649
-<a name="l01650"></a>01650 check_nomsg(sinfo_get_star_features(im2,d,xpos2,ypos2,&xc,&yc,
-<a name="l01651"></a>01651 &star_peak2,&star_flux2,&star_bkg2));
-<a name="l01652"></a>01652
-<a name="l01653"></a>01653 *star_flux=star_flux2;
-<a name="l01654"></a>01654 *star_bkg=star_bkg2;
-<a name="l01655"></a>01655
-<a name="l01656"></a>01656 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale2,xc,yc,1.,
-<a name="l01657"></a>01657 &psf_peak2));
+<a name="l01644"></a>01644 *star_peak=star_peak1;
+<a name="l01645"></a>01645
+<a name="l01646"></a>01646 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale1,xc,yc,1.,
+<a name="l01647"></a>01647 &psf_peak1));
+<a name="l01648"></a>01648
+<a name="l01649"></a>01649 check_nomsg(sinfo_get_star_features(im2,d,xpos2,ypos2,&xc,&yc,
+<a name="l01650"></a>01650 &star_peak2,&star_flux2,&star_bkg2));
+<a name="l01651"></a>01651
+<a name="l01652"></a>01652 *star_flux=star_flux2;
+<a name="l01653"></a>01653 *star_bkg=star_bkg2;
+<a name="l01654"></a>01654
+<a name="l01655"></a>01655 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale2,xc,yc,1.,
+<a name="l01656"></a>01656 &psf_peak2));
+<a name="l01657"></a>01657
<a name="l01658"></a>01658
<a name="l01659"></a>01659
<a name="l01660"></a>01660
-<a name="l01661"></a>01661
-<a name="l01662"></a>01662 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"p1=%g p2=%g"</span>,*star_peak,star_peak2);
-<a name="l01663"></a>01663 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"corr peak: p1=%g p2=%g"</span>,*star_peak,star_peak2/frat);
-<a name="l01664"></a>01664 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"corr bkg: bkg1=%g bkg2=%g"</span>,star_bkg1/frat,*star_bkg);
-<a name="l01665"></a>01665 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"rel diff: %g"</span>,
-<a name="l01666"></a>01666 fabs(star_peak2/frat- *star_peak)/(star_peak2/frat));
+<a name="l01661"></a>01661 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"p1=%g p2=%g"</span>,*star_peak,star_peak2);
+<a name="l01662"></a>01662 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"corr peak: p1=%g p2=%g"</span>,*star_peak,star_peak2/frat);
+<a name="l01663"></a>01663 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"corr bkg: bkg1=%g bkg2=%g"</span>,star_bkg1/frat,*star_bkg);
+<a name="l01664"></a>01664 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"rel diff: %g"</span>,
+<a name="l01665"></a>01665 fabs(star_peak2/frat- *star_peak)/(star_peak2/frat));
+<a name="l01666"></a>01666
<a name="l01667"></a>01667
<a name="l01668"></a>01668
-<a name="l01669"></a>01669
-<a name="l01670"></a>01670 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Rescaled star_flux1=%g star_flux2=%g"</span>,
-<a name="l01671"></a>01671 star_flux1*trat,*star_flux);
-<a name="l01672"></a>01672
-<a name="l01673"></a>01673 <span class="comment">//Check that flux value as measured on im1 and on 1m2 are close one</span>
-<a name="l01674"></a>01674 <span class="comment">//to another. Note that flux1, measured on im1, need to be rescaled</span>
-<a name="l01675"></a>01675 <span class="comment">//by exposure time to match to flux2=star_flux</span>
-<a name="l01676"></a>01676 <span class="keywordflow">if</span> ( fabs((star_flux1*frat-*star_flux)/(*star_flux)) > 0.25) {
-<a name="l01677"></a>01677 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star flux rel diff: %g"</span>,
-<a name="l01678"></a>01678 fabs((star_flux1*frat-*star_flux)/(*star_flux)));
-<a name="l01679"></a>01679 }
-<a name="l01680"></a>01680
-<a name="l01681"></a>01681 <span class="comment">//Check that pick value as measured on im1 and on 1m2 are close one</span>
-<a name="l01682"></a>01682 <span class="comment">//to another. Note that peak2, measured on im2, need to be rescaled</span>
-<a name="l01683"></a>01683 <span class="comment">//by exposure time and pixel scale to match to peak1=star_peak</span>
-<a name="l01684"></a>01684 <span class="keywordflow">if</span> ( fabs(star_peak2-star_peak1*frat)/(star_peak2) > 0.25) {
-<a name="l01685"></a>01685 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star pick rel diff: %g"</span>,
-<a name="l01686"></a>01686 fabs(star_peak2-star_peak1*frat)/(star_peak2));
-<a name="l01687"></a>01687 }
-<a name="l01688"></a>01688 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ak1 star peak=%g"</span>,*star_peak);
-<a name="l01689"></a>01689 irplib_assure_code(*star_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l01690"></a>01690 *star_peak=star_peak1;
-<a name="l01691"></a>01691
-<a name="l01692"></a>01692 *star_bkg=star_bkg2;
-<a name="l01693"></a>01693 *star_flux=star_flux2;
-<a name="l01694"></a>01694
-<a name="l01695"></a>01695 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ak2"</span>);
-<a name="l01696"></a>01696
-<a name="l01697"></a>01697 <span class="comment">//psf1 = irplib_strehl_generate_psf(m1, m2, lam, dlam, pscale1, size*4);</span>
-<a name="l01698"></a>01698 <span class="comment">//psf_peak1 = cpl_image_get_max(psf1) ;</span>
+<a name="l01669"></a>01669 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Rescaled star_flux1=%g star_flux2=%g"</span>,
+<a name="l01670"></a>01670 star_flux1*trat,*star_flux);
+<a name="l01671"></a>01671
+<a name="l01672"></a>01672 <span class="comment">//Check that flux value as measured on im1 and on 1m2 are close one</span>
+<a name="l01673"></a>01673 <span class="comment">//to another. Note that flux1, measured on im1, need to be rescaled</span>
+<a name="l01674"></a>01674 <span class="comment">//by exposure time to match to flux2=star_flux</span>
+<a name="l01675"></a>01675 <span class="keywordflow">if</span> ( fabs((star_flux1*frat-*star_flux)/(*star_flux)) > 0.25) {
+<a name="l01676"></a>01676 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star flux rel diff: %g"</span>,
+<a name="l01677"></a>01677 fabs((star_flux1*frat-*star_flux)/(*star_flux)));
+<a name="l01678"></a>01678 }
+<a name="l01679"></a>01679
+<a name="l01680"></a>01680 <span class="comment">//Check that pick value as measured on im1 and on 1m2 are close one</span>
+<a name="l01681"></a>01681 <span class="comment">//to another. Note that peak2, measured on im2, need to be rescaled</span>
+<a name="l01682"></a>01682 <span class="comment">//by exposure time and pixel scale to match to peak1=star_peak</span>
+<a name="l01683"></a>01683 <span class="keywordflow">if</span> ( fabs(star_peak2-star_peak1*frat)/(star_peak2) > 0.25) {
+<a name="l01684"></a>01684 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star pick rel diff: %g"</span>,
+<a name="l01685"></a>01685 fabs(star_peak2-star_peak1*frat)/(star_peak2));
+<a name="l01686"></a>01686 }
+<a name="l01687"></a>01687 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ak1 star peak=%g"</span>,*star_peak);
+<a name="l01688"></a>01688 irplib_assure_code(*star_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l01689"></a>01689 *star_peak=star_peak1;
+<a name="l01690"></a>01690
+<a name="l01691"></a>01691 *star_bkg=star_bkg2;
+<a name="l01692"></a>01692 *star_flux=star_flux2;
+<a name="l01693"></a>01693
+<a name="l01694"></a>01694 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ak2"</span>);
+<a name="l01695"></a>01695
+<a name="l01696"></a>01696 <span class="comment">//psf1 = irplib_strehl_generate_psf(m1, m2, lam, dlam, pscale1, size*4);</span>
+<a name="l01697"></a>01697 <span class="comment">//psf_peak1 = cpl_image_get_max(psf1) ;</span>
+<a name="l01698"></a>01698
<a name="l01699"></a>01699
<a name="l01700"></a>01700
-<a name="l01701"></a>01701
-<a name="l01702"></a>01702 <span class="comment">/* Compute Strehl */</span>
-<a name="l01703"></a>01703 <span class="comment">//*strehl = (*star_peak *prat2/trat/ *star_flux) / (*psf_peak / *psf_flux);</span>
-<a name="l01704"></a>01704 *strehl = (*star_peak/(*star_flux*trat)) / (psf_peak1 );
-<a name="l01705"></a>01705 <span class="comment">//*strehl = (*star_peak/(*star_flux)) / (psf_peak1 / *psf_flux) ;</span>
-<a name="l01706"></a>01706 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"peak=%g flux1=%f flux2=%f flux=%f cflux=%g "</span>
-<a name="l01707"></a>01707 <span class="stringliteral">"fct=%g psf_peak=%g"</span>,
-<a name="l01708"></a>01708 *star_peak,star_flux1,star_flux2,*star_flux,
-<a name="l01709"></a>01709 *star_flux/frat*prat2,prat2/frat,psf_peak1);
-<a name="l01710"></a>01710 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"=======strehl=%g"</span>,*strehl);
-<a name="l01711"></a>01711 <span class="comment">/*</span>
-<a name="l01712"></a>01712 <span class="comment"> if (*strehl > 1)</span>
-<a name="l01713"></a>01713 <span class="comment"> cpl_msg_warning(cpl_func, "Extreme Strehl-ratio=%g, star_peak=%g, "</span>
-<a name="l01714"></a>01714 <span class="comment"> "star_flux=%g, psf_peak=%g, psf_flux=%g", *strehl,</span>
-<a name="l01715"></a>01715 <span class="comment"> *star_peak, *star_flux, *psf_peak, *psf_flux);</span>
+<a name="l01701"></a>01701 <span class="comment">/* Compute Strehl */</span>
+<a name="l01702"></a>01702 <span class="comment">//*strehl = (*star_peak *prat2/trat/ *star_flux) / (*psf_peak / *psf_flux);</span>
+<a name="l01703"></a>01703 *strehl = (*star_peak/(*star_flux*trat)) / (psf_peak1 );
+<a name="l01704"></a>01704 <span class="comment">//*strehl = (*star_peak/(*star_flux)) / (psf_peak1 / *psf_flux) ;</span>
+<a name="l01705"></a>01705 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"peak=%g flux1=%f flux2=%f flux=%f cflux=%g "</span>
+<a name="l01706"></a>01706 <span class="stringliteral">"fct=%g psf_peak=%g"</span>,
+<a name="l01707"></a>01707 *star_peak,star_flux1,star_flux2,*star_flux,
+<a name="l01708"></a>01708 *star_flux/frat*prat2,prat2/frat,psf_peak1);
+<a name="l01709"></a>01709 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"=======strehl=%g"</span>,*strehl);
+<a name="l01710"></a>01710 <span class="comment">/*</span>
+<a name="l01711"></a>01711 <span class="comment"> if (*strehl > 1)</span>
+<a name="l01712"></a>01712 <span class="comment"> cpl_msg_warning(cpl_func, "Extreme Strehl-ratio=%g, star_peak=%g, "</span>
+<a name="l01713"></a>01713 <span class="comment"> "star_flux=%g, psf_peak=%g, psf_flux=%g", *strehl,</span>
+<a name="l01714"></a>01714 <span class="comment"> *star_peak, *star_flux, *psf_peak, *psf_flux);</span>
+<a name="l01715"></a>01715 <span class="comment"></span>
<a name="l01716"></a>01716 <span class="comment"></span>
-<a name="l01717"></a>01717 <span class="comment"></span>
-<a name="l01718"></a>01718 <span class="comment"> // Compute Strehl error</span>
-<a name="l01719"></a>01719 <span class="comment"> if (cpl_flux_get_noise_ring(im2, ring, noise_box_sz, noise_nsamples,</span>
-<a name="l01720"></a>01720 <span class="comment"> bg_noise, NULL) == CPL_ERROR_NONE) {</span>
-<a name="l01721"></a>01721 <span class="comment"> *strehl_err = SINFO_STREHL_ERROR_COEFFICIENT * (*bg_noise) * pscale2 *</span>
-<a name="l01722"></a>01722 <span class="comment"> star_radius * star_radius / *star_flux;</span>
-<a name="l01723"></a>01723 <span class="comment"> irplib_assure_code(*strehl_err >= 0.0, CPL_ERROR_ILLEGAL_OUTPUT);</span>
-<a name="l01724"></a>01724 <span class="comment"> } else {</span>
-<a name="l01725"></a>01725 <span class="comment"> sinfo_msg_warning("Problem computing noise");</span>
-<a name="l01726"></a>01726 <span class="comment"> }</span>
-<a name="l01727"></a>01727 <span class="comment"> */</span>
-<a name="l01728"></a>01728 *bg_noise=0;
-<a name="l01729"></a>01729
-<a name="l01730"></a>01730 cleanup:
+<a name="l01717"></a>01717 <span class="comment"> // Compute Strehl error</span>
+<a name="l01718"></a>01718 <span class="comment"> if (cpl_flux_get_noise_ring(im2, ring, noise_box_sz, noise_nsamples,</span>
+<a name="l01719"></a>01719 <span class="comment"> bg_noise, NULL) == CPL_ERROR_NONE) {</span>
+<a name="l01720"></a>01720 <span class="comment"> *strehl_err = SINFO_STREHL_ERROR_COEFFICIENT * (*bg_noise) * pscale2 *</span>
+<a name="l01721"></a>01721 <span class="comment"> star_radius * star_radius / *star_flux;</span>
+<a name="l01722"></a>01722 <span class="comment"> irplib_assure_code(*strehl_err >= 0.0, CPL_ERROR_ILLEGAL_OUTPUT);</span>
+<a name="l01723"></a>01723 <span class="comment"> } else {</span>
+<a name="l01724"></a>01724 <span class="comment"> sinfo_msg_warning("Problem computing noise");</span>
+<a name="l01725"></a>01725 <span class="comment"> }</span>
+<a name="l01726"></a>01726 <span class="comment"> */</span>
+<a name="l01727"></a>01727 *bg_noise=0;
+<a name="l01728"></a>01728
+<a name="l01729"></a>01729 cleanup:
+<a name="l01730"></a>01730
<a name="l01731"></a>01731
-<a name="l01732"></a>01732
-<a name="l01733"></a>01733 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(initial_errorstate)) {
-<a name="l01734"></a>01734 <span class="comment">/* Dump the error history since recipe execution start.</span>
-<a name="l01735"></a>01735 <span class="comment"> At this point the recipe cannot recover from the error */</span>
-<a name="l01736"></a>01736 cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
-<a name="l01737"></a>01737 }
-<a name="l01738"></a>01738
-<a name="l01739"></a>01739 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l01740"></a>01740 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01741"></a>01741 } <span class="keywordflow">else</span> {
-<a name="l01742"></a>01742 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01743"></a>01743 }
-<a name="l01744"></a>01744
-<a name="l01745"></a>01745 }
+<a name="l01732"></a>01732 <span class="keywordflow">if</span> (!cpl_errorstate_is_equal(initial_errorstate)) {
+<a name="l01733"></a>01733 <span class="comment">/* Dump the error history since recipe execution start.</span>
+<a name="l01734"></a>01734 <span class="comment"> At this point the recipe cannot recover from the error */</span>
+<a name="l01735"></a>01735 cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
+<a name="l01736"></a>01736 }
+<a name="l01737"></a>01737
+<a name="l01738"></a>01738 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l01739"></a>01739 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01740"></a>01740 } <span class="keywordflow">else</span> {
+<a name="l01741"></a>01741 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01742"></a>01742 }
+<a name="l01743"></a>01743
+<a name="l01744"></a>01744 }
+<a name="l01745"></a>01745
<a name="l01746"></a>01746
<a name="l01747"></a>01747
<a name="l01748"></a>01748
-<a name="l01749"></a>01749
-<a name="l01750"></a>01750 <span class="keyword">static</span> cpl_error_code
-<a name="l01751"></a>01751 sinfo_get_star_features(<span class="keyword">const</span> cpl_image* im,
-<a name="l01752"></a>01752 <span class="keyword">const</span> <span class="keywordtype">int</span> radius,
-<a name="l01753"></a>01753 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
-<a name="l01754"></a>01754 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
-<a name="l01755"></a>01755 <span class="keywordtype">double</span>* xc,
-<a name="l01756"></a>01756 <span class="keywordtype">double</span>* yc,
-<a name="l01757"></a>01757 <span class="keywordtype">double</span>* peak,
-<a name="l01758"></a>01758 <span class="keywordtype">double</span>* flux,
-<a name="l01759"></a>01759 <span class="keywordtype">double</span>* bkg)
-<a name="l01760"></a>01760 {
-<a name="l01761"></a>01761 <span class="keywordtype">int</span> sx=0;
-<a name="l01762"></a>01762 <span class="keywordtype">int</span> sy=0;
-<a name="l01763"></a>01763 <span class="keywordtype">int</span> ixm=0;
-<a name="l01764"></a>01764 <span class="keywordtype">int</span> iym=0;
-<a name="l01765"></a>01765 <span class="keywordtype">int</span> llx=0;
-<a name="l01766"></a>01766 <span class="keywordtype">int</span> lly=0;
-<a name="l01767"></a>01767 <span class="keywordtype">int</span> urx=0;
-<a name="l01768"></a>01768 <span class="keywordtype">int</span> ury=0;
-<a name="l01769"></a>01769 <span class="keywordtype">int</span> dim_new=0;
-<a name="l01770"></a>01770 <span class="keywordtype">double</span> kappa=2;
-<a name="l01771"></a>01771 <span class="keywordtype">double</span> xm=0;
-<a name="l01772"></a>01772 <span class="keywordtype">double</span> ym=0;
-<a name="l01773"></a>01773 <span class="keywordtype">double</span> bkg_stdev=0;
-<a name="l01774"></a>01774 <span class="keywordtype">int</span> bkg_sx=SINFO_BKG_BOX_SZ;
-<a name="l01775"></a>01775 <span class="keywordtype">int</span> bkg_sy=SINFO_BKG_BOX_SZ;
-<a name="l01776"></a>01776
-<a name="l01777"></a>01777 cpl_bivector* iqe=NULL;
-<a name="l01778"></a>01778 <span class="keywordtype">double</span>* piqe=NULL;
-<a name="l01779"></a>01779 cpl_image* im_new=NULL;
-<a name="l01780"></a>01780
-<a name="l01781"></a>01781 sx=cpl_image_get_size_x(im);
-<a name="l01782"></a>01782 sy=cpl_image_get_size_y(im);
-<a name="l01783"></a>01783
-<a name="l01784"></a>01784 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_radius=%d"</span>,radius);
-<a name="l01785"></a>01785 <span class="comment">//We find the image centroid</span>
-<a name="l01786"></a>01786 <span class="keywordflow">if</span>(NULL != (iqe=cpl_image_iqe(im,sx/2-radius,sy/2-radius,
-<a name="l01787"></a>01787 sx/2+radius,sy/2+radius))) {
+<a name="l01749"></a>01749 <span class="keyword">static</span> cpl_error_code
+<a name="l01750"></a>01750 sinfo_get_star_features(<span class="keyword">const</span> cpl_image* im,
+<a name="l01751"></a>01751 <span class="keyword">const</span> <span class="keywordtype">int</span> radius,
+<a name="l01752"></a>01752 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
+<a name="l01753"></a>01753 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
+<a name="l01754"></a>01754 <span class="keywordtype">double</span>* xc,
+<a name="l01755"></a>01755 <span class="keywordtype">double</span>* yc,
+<a name="l01756"></a>01756 <span class="keywordtype">double</span>* peak,
+<a name="l01757"></a>01757 <span class="keywordtype">double</span>* flux,
+<a name="l01758"></a>01758 <span class="keywordtype">double</span>* bkg)
+<a name="l01759"></a>01759 {
+<a name="l01760"></a>01760 <span class="keywordtype">int</span> sx=0;
+<a name="l01761"></a>01761 <span class="keywordtype">int</span> sy=0;
+<a name="l01762"></a>01762 <span class="keywordtype">int</span> ixm=0;
+<a name="l01763"></a>01763 <span class="keywordtype">int</span> iym=0;
+<a name="l01764"></a>01764 <span class="keywordtype">int</span> llx=0;
+<a name="l01765"></a>01765 <span class="keywordtype">int</span> lly=0;
+<a name="l01766"></a>01766 <span class="keywordtype">int</span> urx=0;
+<a name="l01767"></a>01767 <span class="keywordtype">int</span> ury=0;
+<a name="l01768"></a>01768 <span class="keywordtype">int</span> dim_new=0;
+<a name="l01769"></a>01769 <span class="keywordtype">double</span> kappa=2;
+<a name="l01770"></a>01770 <span class="keywordtype">double</span> xm=0;
+<a name="l01771"></a>01771 <span class="keywordtype">double</span> ym=0;
+<a name="l01772"></a>01772 <span class="keywordtype">double</span> bkg_stdev=0;
+<a name="l01773"></a>01773 <span class="keywordtype">int</span> bkg_sx=SINFO_BKG_BOX_SZ;
+<a name="l01774"></a>01774 <span class="keywordtype">int</span> bkg_sy=SINFO_BKG_BOX_SZ;
+<a name="l01775"></a>01775
+<a name="l01776"></a>01776 cpl_bivector* iqe=NULL;
+<a name="l01777"></a>01777 <span class="keywordtype">double</span>* piqe=NULL;
+<a name="l01778"></a>01778 cpl_image* im_new=NULL;
+<a name="l01779"></a>01779
+<a name="l01780"></a>01780 sx=cpl_image_get_size_x(im);
+<a name="l01781"></a>01781 sy=cpl_image_get_size_y(im);
+<a name="l01782"></a>01782
+<a name="l01783"></a>01783 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star_radius=%d"</span>,radius);
+<a name="l01784"></a>01784 <span class="comment">//We find the image centroid</span>
+<a name="l01785"></a>01785 <span class="keywordflow">if</span>(NULL != (iqe=cpl_image_iqe(im,sx/2-radius,sy/2-radius,
+<a name="l01786"></a>01786 sx/2+radius,sy/2+radius))) {
+<a name="l01787"></a>01787
<a name="l01788"></a>01788
-<a name="l01789"></a>01789
-<a name="l01790"></a>01790 piqe=cpl_bivector_get_x_data(iqe);
-<a name="l01791"></a>01791 <span class="comment">//*star_peak=piqe[5];</span>
-<a name="l01792"></a>01792 xm=piqe[0];
-<a name="l01793"></a>01793 ym=piqe[1];
-<a name="l01794"></a>01794 <span class="comment">//Extract a square sub-image of minimal size not to hit the image borders</span>
-<a name="l01795"></a>01795 <span class="comment">//centered on the previous image centroid</span>
-<a name="l01796"></a>01796 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Max ima: %g %g"</span>,xm,ym);
-<a name="l01797"></a>01797 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Find min of: %g %g %g %g"</span>,xm,sx-xm,ym,sy-ym);
-<a name="l01798"></a>01798 ixm=floor(xm);
-<a name="l01799"></a>01799 iym=floor(ym);
-<a name="l01800"></a>01800 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ixm=%d iym=%d"</span>,ixm,iym);
-<a name="l01801"></a>01801 dim_new=floor(sinfo_find_min_of_four(xm,sx-xm,ym,sy-ym));
-<a name="l01802"></a>01802 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dim_new=%d"</span>,dim_new);
-<a name="l01803"></a>01803 llx=(ixm-dim_new > 1) ? ixm-dim_new : 1;
-<a name="l01804"></a>01804 lly=(iym-dim_new > 1) ? iym-dim_new : 1;
-<a name="l01805"></a>01805 urx=(ixm+dim_new < sx) ? ixm+dim_new : sx;
-<a name="l01806"></a>01806 ury=(iym+dim_new < sy) ? iym+dim_new : sy;
-<a name="l01807"></a>01807 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"llx=%d lly=%d urx=%d ury=%d"</span>,llx,lly,urx,ury);
-<a name="l01808"></a>01808 check_nomsg(im_new=cpl_image_extract(im,llx,lly,urx,ury));
-<a name="l01809"></a>01809
-<a name="l01810"></a>01810 <span class="comment">//compute the background of this last image</span>
-<a name="l01811"></a>01811 check_nomsg(sinfo_get_bkg_4corners(im_new,bkg_sx,bkg_sy,bkg,&bkg_stdev));
+<a name="l01789"></a>01789 piqe=cpl_bivector_get_x_data(iqe);
+<a name="l01790"></a>01790 <span class="comment">//*star_peak=piqe[5];</span>
+<a name="l01791"></a>01791 xm=piqe[0];
+<a name="l01792"></a>01792 ym=piqe[1];
+<a name="l01793"></a>01793 <span class="comment">//Extract a square sub-image of minimal size not to hit the image borders</span>
+<a name="l01794"></a>01794 <span class="comment">//centered on the previous image centroid</span>
+<a name="l01795"></a>01795 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Max ima: %g %g"</span>,xm,ym);
+<a name="l01796"></a>01796 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Find min of: %g %g %g %g"</span>,xm,sx-xm,ym,sy-ym);
+<a name="l01797"></a>01797 ixm=floor(xm);
+<a name="l01798"></a>01798 iym=floor(ym);
+<a name="l01799"></a>01799 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ixm=%d iym=%d"</span>,ixm,iym);
+<a name="l01800"></a>01800 dim_new=floor(sinfo_find_min_of_four(xm,sx-xm,ym,sy-ym));
+<a name="l01801"></a>01801 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dim_new=%d"</span>,dim_new);
+<a name="l01802"></a>01802 llx=(ixm-dim_new > 1) ? ixm-dim_new : 1;
+<a name="l01803"></a>01803 lly=(iym-dim_new > 1) ? iym-dim_new : 1;
+<a name="l01804"></a>01804 urx=(ixm+dim_new < sx) ? ixm+dim_new : sx;
+<a name="l01805"></a>01805 ury=(iym+dim_new < sy) ? iym+dim_new : sy;
+<a name="l01806"></a>01806 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"llx=%d lly=%d urx=%d ury=%d"</span>,llx,lly,urx,ury);
+<a name="l01807"></a>01807 check_nomsg(im_new=cpl_image_extract(im,llx,lly,urx,ury));
+<a name="l01808"></a>01808
+<a name="l01809"></a>01809 <span class="comment">//compute the background of this last image</span>
+<a name="l01810"></a>01810 check_nomsg(sinfo_get_bkg_4corners(im_new,bkg_sx,bkg_sy,bkg,&bkg_stdev));
+<a name="l01811"></a>01811
<a name="l01812"></a>01812
<a name="l01813"></a>01813
-<a name="l01814"></a>01814
-<a name="l01815"></a>01815 sinfo_free_bivector(&iqe);
-<a name="l01816"></a>01816
-<a name="l01817"></a>01817 <span class="comment">//Determine the image pick on the new coordinate system</span>
-<a name="l01818"></a>01818 iqe=cpl_image_iqe(im_new,dim_new-radius,dim_new-radius,
-<a name="l01819"></a>01819 dim_new+radius,dim_new+radius);
-<a name="l01820"></a>01820 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,piqe[0],piqe[1]);
-<a name="l01821"></a>01821 *xc=piqe[0]-dim_new-1;
-<a name="l01822"></a>01822 *yc=piqe[1]-dim_new-1;
+<a name="l01814"></a>01814 sinfo_free_bivector(&iqe);
+<a name="l01815"></a>01815
+<a name="l01816"></a>01816 <span class="comment">//Determine the image pick on the new coordinate system</span>
+<a name="l01817"></a>01817 iqe=cpl_image_iqe(im_new,dim_new-radius,dim_new-radius,
+<a name="l01818"></a>01818 dim_new+radius,dim_new+radius);
+<a name="l01819"></a>01819 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,piqe[0],piqe[1]);
+<a name="l01820"></a>01820 *xc=piqe[0]-dim_new-1;
+<a name="l01821"></a>01821 *yc=piqe[1]-dim_new-1;
+<a name="l01822"></a>01822
<a name="l01823"></a>01823
-<a name="l01824"></a>01824
-<a name="l01825"></a>01825 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,*xc,*yc);
-<a name="l01826"></a>01826 <span class="comment">//*peak=piqe[5];</span>
-<a name="l01827"></a>01827 *peak=cpl_image_get_max_window(im_new,dim_new-radius,dim_new-radius,
-<a name="l01828"></a>01828 dim_new+radius,dim_new+radius);
-<a name="l01829"></a>01829
-<a name="l01830"></a>01830 sinfo_get_flux_above_bkg(im_new,kappa,bkg_stdev,flux);
-<a name="l01831"></a>01831 *peak -= (*bkg);
-<a name="l01832"></a>01832 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star peak=%g bkg=%g"</span>,*peak,*bkg);
+<a name="l01824"></a>01824 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,*xc,*yc);
+<a name="l01825"></a>01825 <span class="comment">//*peak=piqe[5];</span>
+<a name="l01826"></a>01826 *peak=cpl_image_get_max_window(im_new,dim_new-radius,dim_new-radius,
+<a name="l01827"></a>01827 dim_new+radius,dim_new+radius);
+<a name="l01828"></a>01828
+<a name="l01829"></a>01829 sinfo_get_flux_above_bkg(im_new,kappa,bkg_stdev,flux);
+<a name="l01830"></a>01830 *peak -= (*bkg);
+<a name="l01831"></a>01831 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star peak=%g bkg=%g"</span>,*peak,*bkg);
+<a name="l01832"></a>01832
<a name="l01833"></a>01833
-<a name="l01834"></a>01834
-<a name="l01835"></a>01835 sinfo_free_bivector(&iqe);
+<a name="l01834"></a>01834 sinfo_free_bivector(&iqe);
+<a name="l01835"></a>01835
<a name="l01836"></a>01836
-<a name="l01837"></a>01837
-<a name="l01838"></a>01838 } <span class="keywordflow">else</span> {
-<a name="l01839"></a>01839 <a class="code" href="group__sinfo__msg.html#ga885dfc1c23dbdf3ea2051b42341a52a6" title="Print an warning message.">sinfo_msg_warning</a>(<span class="stringliteral">"IQE fit failed"</span>);
-<a name="l01840"></a>01840 cpl_error_reset();
-<a name="l01841"></a>01841 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%d yc=%d radius=%d"</span>,xpos,ypos,radius);
-<a name="l01842"></a>01842 *xc=xpos-sx/2;
-<a name="l01843"></a>01843 *yc=ypos-sy/2;
-<a name="l01844"></a>01844 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,*xc,*yc);
-<a name="l01845"></a>01845 check_nomsg(sinfo_get_bkg_4corners(im,bkg_sx,bkg_sy,bkg,&bkg_stdev));
-<a name="l01846"></a>01846 check_nomsg(sinfo_get_safe_box(&llx, &lly, &urx, &ury, xpos,ypos,radius,
-<a name="l01847"></a>01847 64,64));
-<a name="l01848"></a>01848 check_nomsg(*peak=cpl_image_get_max_window(im,llx,lly,urx,ury)-(*bkg));
-<a name="l01849"></a>01849 sinfo_get_flux_above_bkg(im,kappa,bkg_stdev,flux);
-<a name="l01850"></a>01850 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star peak=%g bkg=%g"</span>,*peak,*bkg);
+<a name="l01837"></a>01837 } <span class="keywordflow">else</span> {
+<a name="l01838"></a>01838 <a class="code" href="group__sinfo__msg.html#ga885dfc1c23dbdf3ea2051b42341a52a6" title="Print an warning message.">sinfo_msg_warning</a>(<span class="stringliteral">"IQE fit failed"</span>);
+<a name="l01839"></a>01839 cpl_error_reset();
+<a name="l01840"></a>01840 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%d yc=%d radius=%d"</span>,xpos,ypos,radius);
+<a name="l01841"></a>01841 *xc=xpos-sx/2;
+<a name="l01842"></a>01842 *yc=ypos-sy/2;
+<a name="l01843"></a>01843 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"xc=%g yc=%g"</span>,*xc,*yc);
+<a name="l01844"></a>01844 check_nomsg(sinfo_get_bkg_4corners(im,bkg_sx,bkg_sy,bkg,&bkg_stdev));
+<a name="l01845"></a>01845 check_nomsg(sinfo_get_safe_box(&llx, &lly, &urx, &ury, xpos,ypos,radius,
+<a name="l01846"></a>01846 64,64));
+<a name="l01847"></a>01847 check_nomsg(*peak=cpl_image_get_max_window(im,llx,lly,urx,ury)-(*bkg));
+<a name="l01848"></a>01848 sinfo_get_flux_above_bkg(im,kappa,bkg_stdev,flux);
+<a name="l01849"></a>01849 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"star peak=%g bkg=%g"</span>,*peak,*bkg);
+<a name="l01850"></a>01850
<a name="l01851"></a>01851
-<a name="l01852"></a>01852
-<a name="l01853"></a>01853 }
+<a name="l01852"></a>01852 }
+<a name="l01853"></a>01853
<a name="l01854"></a>01854
<a name="l01855"></a>01855
-<a name="l01856"></a>01856
-<a name="l01857"></a>01857 cleanup:
-<a name="l01858"></a>01858 sinfo_free_image(&im_new);
-<a name="l01859"></a>01859 sinfo_free_bivector(&iqe);
+<a name="l01856"></a>01856 cleanup:
+<a name="l01857"></a>01857 sinfo_free_image(&im_new);
+<a name="l01858"></a>01858 sinfo_free_bivector(&iqe);
+<a name="l01859"></a>01859
<a name="l01860"></a>01860
<a name="l01861"></a>01861
<a name="l01862"></a>01862
-<a name="l01863"></a>01863
-<a name="l01864"></a>01864 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l01865"></a>01865 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l01866"></a>01866 } <span class="keywordflow">else</span> {
-<a name="l01867"></a>01867 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l01868"></a>01868 }
-<a name="l01869"></a>01869
-<a name="l01870"></a>01870 }
+<a name="l01863"></a>01863 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l01864"></a>01864 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l01865"></a>01865 } <span class="keywordflow">else</span> {
+<a name="l01866"></a>01866 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l01867"></a>01867 }
+<a name="l01868"></a>01868
+<a name="l01869"></a>01869 }
+<a name="l01870"></a>01870
<a name="l01871"></a>01871
<a name="l01872"></a>01872
<a name="l01873"></a>01873
<a name="l01874"></a>01874
<a name="l01875"></a>01875
-<a name="l01876"></a>01876
-<a name="l01877"></a>01877 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01904"></a>01904 <span class="comment">/*----------------------------------------------------------------------------*/</span>
-<a name="l01905"></a>01905 cpl_error_code
-<a name="l01906"></a>01906 sinfo_strehl_compute_one(<span class="keyword">const</span> cpl_image * im,
-<a name="l01907"></a>01907 <span class="keywordtype">double</span> m1,
-<a name="l01908"></a>01908 <span class="keywordtype">double</span> m2,
-<a name="l01909"></a>01909 <span class="keywordtype">double</span> lam,
-<a name="l01910"></a>01910 <span class="keywordtype">double</span> dlam,
-<a name="l01911"></a>01911 <span class="keywordtype">double</span> pscale,
-<a name="l01912"></a>01912 <span class="keywordtype">int</span> xpos,
-<a name="l01913"></a>01913 <span class="keywordtype">int</span> ypos,
-<a name="l01914"></a>01914 <span class="keywordtype">double</span> r1,
-<a name="l01915"></a>01915 <span class="keywordtype">double</span> r2,
-<a name="l01916"></a>01916 <span class="keywordtype">double</span> r3,
-<a name="l01917"></a>01917 <span class="keywordtype">int</span> size,
-<a name="l01918"></a>01918 <span class="keywordtype">double</span> * strehl,
-<a name="l01919"></a>01919 <span class="keywordtype">double</span> * strehl_err,
-<a name="l01920"></a>01920 <span class="keywordtype">double</span> * star_bkg,
-<a name="l01921"></a>01921 <span class="keywordtype">double</span> * star_peak,
-<a name="l01922"></a>01922 <span class="keywordtype">double</span> * star_flux,
-<a name="l01923"></a>01923 <span class="keywordtype">double</span> * psf_peak,
-<a name="l01924"></a>01924 <span class="keywordtype">double</span> * psf_flux,
-<a name="l01925"></a>01925 <span class="keywordtype">double</span> * bg_noise)
-<a name="l01926"></a>01926 {
-<a name="l01927"></a>01927 cpl_image * psf;
-<a name="l01928"></a>01928 <span class="keywordtype">double</span> star_radius;
-<a name="l01929"></a>01929
-<a name="l01930"></a>01930 <span class="comment">/* FIXME: Arbitrary choice of image border */</span>
-<a name="l01931"></a>01931 <span class="keyword">const</span> <span class="keywordtype">double</span> window_size = (double)(SINFO_STREHL_RAD_CENTRAL);
-<a name="l01932"></a>01932
-<a name="l01933"></a>01933 <span class="comment">/* Determined empirically by C. Lidman for Strehl error computation */</span>
-<a name="l01934"></a>01934 <span class="comment">//Commented as not used</span>
-<a name="l01935"></a>01935 <span class="comment">//const double strehl_error_coefficient = SINFO_MATH_PI * 0.007 / 0.0271;</span>
-<a name="l01936"></a>01936
-<a name="l01937"></a>01937 <span class="preprocessor">#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(4, 0, 0)</span>
-<a name="l01938"></a>01938 <span class="preprocessor"></span> <span class="keywordtype">double</span> ring[4];
-<a name="l01939"></a>01939 <span class="preprocessor">#else</span>
-<a name="l01940"></a>01940 <span class="preprocessor"></span> <span class="comment">/* FIXME: Remove this branch once CPL 3.X is no longer supported */</span>
-<a name="l01941"></a>01941 <span class="keywordtype">int</span> ring[4];
-<a name="l01942"></a>01942 <span class="preprocessor">#endif</span>
-<a name="l01943"></a>01943 <span class="preprocessor"></span> cpl_bivector* iqe1=NULL;
-<a name="l01944"></a>01944 <span class="keywordtype">double</span> xc=0;
-<a name="l01945"></a>01945 <span class="keywordtype">double</span> yc=0;
-<a name="l01946"></a>01946 <span class="keywordtype">int</span> d=16;
+<a name="l01876"></a>01876 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01903"></a>01903 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l01904"></a>01904 cpl_error_code
+<a name="l01905"></a>01905 sinfo_strehl_compute_one(<span class="keyword">const</span> cpl_image * im,
+<a name="l01906"></a>01906 <span class="keywordtype">double</span> m1,
+<a name="l01907"></a>01907 <span class="keywordtype">double</span> m2,
+<a name="l01908"></a>01908 <span class="keywordtype">double</span> lam,
+<a name="l01909"></a>01909 <span class="keywordtype">double</span> dlam,
+<a name="l01910"></a>01910 <span class="keywordtype">double</span> pscale,
+<a name="l01911"></a>01911 <span class="keywordtype">int</span> xpos,
+<a name="l01912"></a>01912 <span class="keywordtype">int</span> ypos,
+<a name="l01913"></a>01913 <span class="keywordtype">double</span> r1,
+<a name="l01914"></a>01914 <span class="keywordtype">double</span> r2,
+<a name="l01915"></a>01915 <span class="keywordtype">double</span> r3,
+<a name="l01916"></a>01916 <span class="keywordtype">int</span> size,
+<a name="l01917"></a>01917 <span class="keywordtype">double</span> * strehl,
+<a name="l01918"></a>01918 <span class="keywordtype">double</span> * strehl_err,
+<a name="l01919"></a>01919 <span class="keywordtype">double</span> * star_bkg,
+<a name="l01920"></a>01920 <span class="keywordtype">double</span> * star_peak,
+<a name="l01921"></a>01921 <span class="keywordtype">double</span> * star_flux,
+<a name="l01922"></a>01922 <span class="keywordtype">double</span> * psf_peak,
+<a name="l01923"></a>01923 <span class="keywordtype">double</span> * psf_flux,
+<a name="l01924"></a>01924 <span class="keywordtype">double</span> * bg_noise)
+<a name="l01925"></a>01925 {
+<a name="l01926"></a>01926 cpl_image * psf;
+<a name="l01927"></a>01927 <span class="keywordtype">double</span> star_radius;
+<a name="l01928"></a>01928
+<a name="l01929"></a>01929 <span class="comment">/* FIXME: Arbitrary choice of image border */</span>
+<a name="l01930"></a>01930 <span class="keyword">const</span> <span class="keywordtype">double</span> window_size = (double)(SINFO_STREHL_RAD_CENTRAL);
+<a name="l01931"></a>01931
+<a name="l01932"></a>01932 <span class="comment">/* Determined empirically by C. Lidman for Strehl error computation */</span>
+<a name="l01933"></a>01933 <span class="comment">//Commented as not used</span>
+<a name="l01934"></a>01934 <span class="comment">//const double strehl_error_coefficient = SINFO_MATH_PI * 0.007 / 0.0271;</span>
+<a name="l01935"></a>01935
+<a name="l01936"></a>01936 <span class="preprocessor">#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(4, 0, 0)</span>
+<a name="l01937"></a>01937 <span class="preprocessor"></span> <span class="keywordtype">double</span> ring[4];
+<a name="l01938"></a>01938 <span class="preprocessor">#else</span>
+<a name="l01939"></a>01939 <span class="preprocessor"></span> <span class="comment">/* FIXME: Remove this branch once CPL 3.X is no longer supported */</span>
+<a name="l01940"></a>01940 <span class="keywordtype">int</span> ring[4];
+<a name="l01941"></a>01941 <span class="preprocessor">#endif</span>
+<a name="l01942"></a>01942 <span class="preprocessor"></span> cpl_bivector* iqe1=NULL;
+<a name="l01943"></a>01943 <span class="keywordtype">double</span> xc=0;
+<a name="l01944"></a>01944 <span class="keywordtype">double</span> yc=0;
+<a name="l01945"></a>01945 <span class="keywordtype">int</span> d=16;
+<a name="l01946"></a>01946
<a name="l01947"></a>01947
<a name="l01948"></a>01948
-<a name="l01949"></a>01949
-<a name="l01950"></a>01950 <span class="comment">/* Check compile-time constant */</span>
-<a name="l01951"></a>01951 cpl_ensure_code(window_size > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01952"></a>01952
-<a name="l01953"></a>01953 <span class="comment">/* Test inputs */</span>
-<a name="l01954"></a>01954 cpl_ensure_code(im != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01955"></a>01955 cpl_ensure_code(strehl != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01956"></a>01956 cpl_ensure_code(strehl_err != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01957"></a>01957 cpl_ensure_code(star_bkg != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01958"></a>01958 cpl_ensure_code(star_peak != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01959"></a>01959 cpl_ensure_code(star_flux != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01960"></a>01960 cpl_ensure_code(psf_peak != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01961"></a>01961 cpl_ensure_code(psf_flux != NULL, CPL_ERROR_NULL_INPUT);
-<a name="l01962"></a>01962
-<a name="l01963"></a>01963 cpl_ensure_code(pscale > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01949"></a>01949 <span class="comment">/* Check compile-time constant */</span>
+<a name="l01950"></a>01950 cpl_ensure_code(window_size > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01951"></a>01951
+<a name="l01952"></a>01952 <span class="comment">/* Test inputs */</span>
+<a name="l01953"></a>01953 cpl_ensure_code(im != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01954"></a>01954 cpl_ensure_code(strehl != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01955"></a>01955 cpl_ensure_code(strehl_err != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01956"></a>01956 cpl_ensure_code(star_bkg != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01957"></a>01957 cpl_ensure_code(star_peak != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01958"></a>01958 cpl_ensure_code(star_flux != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01959"></a>01959 cpl_ensure_code(psf_peak != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01960"></a>01960 cpl_ensure_code(psf_flux != NULL, CPL_ERROR_NULL_INPUT);
+<a name="l01961"></a>01961
+<a name="l01962"></a>01962 cpl_ensure_code(pscale > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01963"></a>01963
<a name="l01964"></a>01964
-<a name="l01965"></a>01965
-<a name="l01966"></a>01966 cpl_ensure_code(r1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01967"></a>01967 cpl_ensure_code(r2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
-<a name="l01968"></a>01968
-<a name="l01969"></a>01969 cpl_ensure_code(r3 > r2, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01965"></a>01965 cpl_ensure_code(r1 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01966"></a>01966 cpl_ensure_code(r2 > 0.0, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01967"></a>01967
+<a name="l01968"></a>01968 cpl_ensure_code(r3 > r2, CPL_ERROR_ILLEGAL_INPUT);
+<a name="l01969"></a>01969
<a name="l01970"></a>01970
-<a name="l01971"></a>01971
-<a name="l01972"></a>01972 <span class="comment">/* Computing a Strehl ratio is a story between an ideal PSF */</span>
-<a name="l01973"></a>01973 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale,xc,yc,
-<a name="l01974"></a>01974 1.,psf_peak));
-<a name="l01975"></a>01975 <span class="comment">/* and a candidate image supposed to approximate this ideal PSF. */</span>
-<a name="l01976"></a>01976
-<a name="l01977"></a>01977 <span class="comment">/* Generate first appropriate PSF to find max peak */</span>
-<a name="l01978"></a>01978
-<a name="l01979"></a>01979 psf = irplib_strehl_generate_psf(m1, m2, lam, dlam, pscale, size);
-<a name="l01980"></a>01980 cpl_ensure_code(psf != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
-<a name="l01981"></a>01981
-<a name="l01982"></a>01982 <span class="comment">/* Compute flux in PSF and find max peak */</span>
-<a name="l01983"></a>01983 *psf_peak = cpl_image_get_max(psf);
-<a name="l01984"></a>01984
-<a name="l01985"></a>01985 cpl_image_delete(psf);
+<a name="l01971"></a>01971 <span class="comment">/* Computing a Strehl ratio is a story between an ideal PSF */</span>
+<a name="l01972"></a>01972 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale,xc,yc,
+<a name="l01973"></a>01973 1.,psf_peak));
+<a name="l01974"></a>01974 <span class="comment">/* and a candidate image supposed to approximate this ideal PSF. */</span>
+<a name="l01975"></a>01975
+<a name="l01976"></a>01976 <span class="comment">/* Generate first appropriate PSF to find max peak */</span>
+<a name="l01977"></a>01977
+<a name="l01978"></a>01978 psf = irplib_strehl_generate_psf(m1, m2, lam, dlam, pscale, size);
+<a name="l01979"></a>01979 cpl_ensure_code(psf != NULL, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l01980"></a>01980
+<a name="l01981"></a>01981 <span class="comment">/* Compute flux in PSF and find max peak */</span>
+<a name="l01982"></a>01982 *psf_peak = cpl_image_get_max(psf);
+<a name="l01983"></a>01983
+<a name="l01984"></a>01984 cpl_image_delete(psf);
+<a name="l01985"></a>01985
<a name="l01986"></a>01986
<a name="l01987"></a>01987
<a name="l01988"></a>01988
-<a name="l01989"></a>01989
-<a name="l01990"></a>01990 assert( *psf_peak > 0.0); <span class="comment">/* The ideal PSF has a positive maximum */</span>
-<a name="l01991"></a>01991 *psf_flux = 1.0; <span class="comment">/* The psf flux, cpl_image_get_flux(psf), is always 1 */</span>
+<a name="l01989"></a>01989 cpl_ensure( *psf_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT,CPL_ERROR_ILLEGAL_OUTPUT); <span class="comment">/* The ideal PSF has a positive maximum */</span>
+<a name="l01990"></a>01990 *psf_flux = 1.0; <span class="comment">/* The psf flux, cpl_image_get_flux(psf), is always 1 */</span>
+<a name="l01991"></a>01991
<a name="l01992"></a>01992
-<a name="l01993"></a>01993
-<a name="l01994"></a>01994 <span class="comment">/* Compute star_radius in pixels */</span>
-<a name="l01995"></a>01995 star_radius = r1/pscale;
+<a name="l01993"></a>01993 <span class="comment">/* Compute star_radius in pixels */</span>
+<a name="l01994"></a>01994 star_radius = r1/pscale;
+<a name="l01995"></a>01995
<a name="l01996"></a>01996
-<a name="l01997"></a>01997
-<a name="l01998"></a>01998 check_nomsg(sinfo_get_star_features(im,d,xpos,ypos,&xc,&yc,
-<a name="l01999"></a>01999 star_peak,star_flux,star_bkg));
+<a name="l01997"></a>01997 check_nomsg(sinfo_get_star_features(im,d,xpos,ypos,&xc,&yc,
+<a name="l01998"></a>01998 star_peak,star_flux,star_bkg));
+<a name="l01999"></a>01999
<a name="l02000"></a>02000
-<a name="l02001"></a>02001
-<a name="l02002"></a>02002 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale,xc,yc,1.,psf_peak));
+<a name="l02001"></a>02001 check_nomsg(sinfo_compute_psf(m1,m2/m1,lam*1.e-6,pscale,xc,yc,1.,psf_peak));
+<a name="l02002"></a>02002
<a name="l02003"></a>02003
<a name="l02004"></a>02004
-<a name="l02005"></a>02005
-<a name="l02006"></a>02006 *star_peak -= *star_bkg;
+<a name="l02005"></a>02005 *star_peak -= *star_bkg;
+<a name="l02006"></a>02006
<a name="l02007"></a>02007
-<a name="l02008"></a>02008
-<a name="l02009"></a>02009 cpl_ensure_code(*star_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l02008"></a>02008 cpl_ensure_code(*star_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT);
+<a name="l02009"></a>02009
<a name="l02010"></a>02010
-<a name="l02011"></a>02011
-<a name="l02012"></a>02012 <span class="comment">/* Compute Strehl */</span>
-<a name="l02013"></a>02013 <span class="comment">/* (StarPeak / StarFlux) / (PsfPeak / PsfFlux) */</span>
-<a name="l02014"></a>02014 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star flux=%g"</span>, *star_flux);
-<a name="l02015"></a>02015 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star peak=%g"</span>, *star_peak);
-<a name="l02016"></a>02016 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"PSF flux=%g"</span>, *psf_flux);
-<a name="l02017"></a>02017 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"PSF peak=%g"</span>, *psf_peak);
-<a name="l02018"></a>02018
-<a name="l02019"></a>02019 *strehl = (*star_peak * *psf_flux ) / ( *star_flux * *psf_peak);
+<a name="l02011"></a>02011 <span class="comment">/* Compute Strehl */</span>
+<a name="l02012"></a>02012 <span class="comment">/* (StarPeak / StarFlux) / (PsfPeak / PsfFlux) */</span>
+<a name="l02013"></a>02013 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star flux=%g"</span>, *star_flux);
+<a name="l02014"></a>02014 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"Star peak=%g"</span>, *star_peak);
+<a name="l02015"></a>02015 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"PSF flux=%g"</span>, *psf_flux);
+<a name="l02016"></a>02016 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"PSF peak=%g"</span>, *psf_peak);
+<a name="l02017"></a>02017
+<a name="l02018"></a>02018 *strehl = (*star_peak * *psf_flux ) / ( *star_flux * *psf_peak);
+<a name="l02019"></a>02019
<a name="l02020"></a>02020
<a name="l02021"></a>02021
-<a name="l02022"></a>02022
-<a name="l02023"></a>02023 <span class="keywordflow">if</span> (*strehl > 1)
-<a name="l02024"></a>02024 cpl_msg_warning(cpl_func, <span class="stringliteral">"Extreme Strehl-ratio=%g, star_peak=%g, "</span>
-<a name="l02025"></a>02025 <span class="stringliteral">"star_flux=%g, psf_peak=%g, psf_flux=%g"</span>, *strehl,
-<a name="l02026"></a>02026 *star_peak, *star_flux, *psf_peak, *psf_flux);
-<a name="l02027"></a>02027
-<a name="l02028"></a>02028 <span class="comment">/* Compute Strehl error */</span>
-<a name="l02029"></a>02029 ring[0] = xpos;
-<a name="l02030"></a>02030 ring[1] = ypos;
-<a name="l02031"></a>02031 ring[2] = r2/pscale;
-<a name="l02032"></a>02032 ring[3] = r3/pscale;
-<a name="l02033"></a>02033 <span class="comment">/*</span>
-<a name="l02034"></a>02034 <span class="comment"> *strehl_err = strehl_error_coefficient * (*bg_noise) * pscale *</span>
-<a name="l02035"></a>02035 <span class="comment"> star_radius * star_radius / *star_flux;</span>
-<a name="l02036"></a>02036 <span class="comment"></span>
-<a name="l02037"></a>02037 <span class="comment"> // This check should not be able to fail, but just to be sure</span>
-<a name="l02038"></a>02038 <span class="comment"> cpl_ensure_code(*strehl_err >= 0.0, CPL_ERROR_ILLEGAL_OUTPUT);</span>
-<a name="l02039"></a>02039 <span class="comment"> */</span>
-<a name="l02040"></a>02040 *bg_noise=0;
+<a name="l02022"></a>02022 <span class="keywordflow">if</span> (*strehl > 1)
+<a name="l02023"></a>02023 cpl_msg_warning(cpl_func, <span class="stringliteral">"Extreme Strehl-ratio=%g, star_peak=%g, "</span>
+<a name="l02024"></a>02024 <span class="stringliteral">"star_flux=%g, psf_peak=%g, psf_flux=%g"</span>, *strehl,
+<a name="l02025"></a>02025 *star_peak, *star_flux, *psf_peak, *psf_flux);
+<a name="l02026"></a>02026
+<a name="l02027"></a>02027 <span class="comment">/* Compute Strehl error */</span>
+<a name="l02028"></a>02028 ring[0] = xpos;
+<a name="l02029"></a>02029 ring[1] = ypos;
+<a name="l02030"></a>02030 ring[2] = r2/pscale;
+<a name="l02031"></a>02031 ring[3] = r3/pscale;
+<a name="l02032"></a>02032 <span class="comment">/*</span>
+<a name="l02033"></a>02033 <span class="comment"> *strehl_err = strehl_error_coefficient * (*bg_noise) * pscale *</span>
+<a name="l02034"></a>02034 <span class="comment"> star_radius * star_radius / *star_flux;</span>
+<a name="l02035"></a>02035 <span class="comment"></span>
+<a name="l02036"></a>02036 <span class="comment"> // This check should not be able to fail, but just to be sure</span>
+<a name="l02037"></a>02037 <span class="comment"> cpl_ensure_code(*strehl_err >= 0.0, CPL_ERROR_ILLEGAL_OUTPUT);</span>
+<a name="l02038"></a>02038 <span class="comment"> */</span>
+<a name="l02039"></a>02039 *bg_noise=0;
+<a name="l02040"></a>02040
<a name="l02041"></a>02041
-<a name="l02042"></a>02042
-<a name="l02043"></a>02043 cleanup:
-<a name="l02044"></a>02044 sinfo_free_bivector(&iqe1);
-<a name="l02045"></a>02045 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l02046"></a>02046 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l02047"></a>02047 } <span class="keywordflow">else</span> {
-<a name="l02048"></a>02048 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l02049"></a>02049 }
+<a name="l02042"></a>02042 cleanup:
+<a name="l02043"></a>02043 sinfo_free_bivector(&iqe1);
+<a name="l02044"></a>02044 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l02045"></a>02045 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l02046"></a>02046 } <span class="keywordflow">else</span> {
+<a name="l02047"></a>02047 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l02048"></a>02048 }
+<a name="l02049"></a>02049
<a name="l02050"></a>02050
-<a name="l02051"></a>02051
-<a name="l02052"></a>02052 }
+<a name="l02051"></a>02051 }
+<a name="l02052"></a>02052
<a name="l02053"></a>02053
<a name="l02054"></a>02054
-<a name="l02055"></a>02055
-<a name="l02056"></a>02056 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l02057"></a>02057 sinfo_check_borders(cpl_size* val,<span class="keyword">const</span> <span class="keywordtype">int</span> max,<span class="keyword">const</span> <span class="keywordtype">int</span> thresh)
-<a name="l02058"></a>02058 {
-<a name="l02059"></a>02059
-<a name="l02060"></a>02060 *val = ((*val-thresh) > 0) ? *val : thresh;
-<a name="l02061"></a>02061 *val = ((*val+thresh) < max) ? *val : max-thresh-1;
-<a name="l02062"></a>02062 <span class="keywordflow">return</span>;
-<a name="l02063"></a>02063 }
-<a name="l02064"></a>02064
-<a name="l02065"></a>02065 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l02066"></a>02066 sinfo_get_safe_box(<span class="keywordtype">int</span>* llx,
-<a name="l02067"></a>02067 <span class="keywordtype">int</span>* lly,
-<a name="l02068"></a>02068 <span class="keywordtype">int</span>* urx,
-<a name="l02069"></a>02069 <span class="keywordtype">int</span>* ury,
-<a name="l02070"></a>02070 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
-<a name="l02071"></a>02071 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
-<a name="l02072"></a>02072 <span class="keyword">const</span> <span class="keywordtype">int</span> box,
-<a name="l02073"></a>02073 <span class="keyword">const</span> <span class="keywordtype">int</span> szx,
-<a name="l02074"></a>02074 <span class="keyword">const</span> <span class="keywordtype">int</span> szy)
-<a name="l02075"></a>02075
-<a name="l02076"></a>02076 {
-<a name="l02077"></a>02077 *llx= ((xpos-box)>0) ? (xpos-box) : 1;
-<a name="l02078"></a>02078 *lly= ((ypos-box)>0) ? (ypos-box) : 1;
-<a name="l02079"></a>02079 *urx= ((xpos+box)<szx) ? (xpos+box) : szx-1 ;
-<a name="l02080"></a>02080 *ury= ((ypos+box)<szy) ? (ypos+box) : szy-1 ;
-<a name="l02081"></a>02081
-<a name="l02082"></a>02082 <span class="keywordflow">return</span>;
-<a name="l02083"></a>02083 }
+<a name="l02055"></a>02055 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l02056"></a>02056 sinfo_check_borders(cpl_size* val,<span class="keyword">const</span> <span class="keywordtype">int</span> max,<span class="keyword">const</span> <span class="keywordtype">int</span> thresh)
+<a name="l02057"></a>02057 {
+<a name="l02058"></a>02058
+<a name="l02059"></a>02059 *val = ((*val-thresh) > 0) ? *val : thresh;
+<a name="l02060"></a>02060 *val = ((*val+thresh) < max) ? *val : max-thresh-1;
+<a name="l02061"></a>02061 <span class="keywordflow">return</span>;
+<a name="l02062"></a>02062 }
+<a name="l02063"></a>02063
+<a name="l02064"></a>02064 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l02065"></a>02065 sinfo_get_safe_box(<span class="keywordtype">int</span>* llx,
+<a name="l02066"></a>02066 <span class="keywordtype">int</span>* lly,
+<a name="l02067"></a>02067 <span class="keywordtype">int</span>* urx,
+<a name="l02068"></a>02068 <span class="keywordtype">int</span>* ury,
+<a name="l02069"></a>02069 <span class="keyword">const</span> <span class="keywordtype">int</span> xpos,
+<a name="l02070"></a>02070 <span class="keyword">const</span> <span class="keywordtype">int</span> ypos,
+<a name="l02071"></a>02071 <span class="keyword">const</span> <span class="keywordtype">int</span> box,
+<a name="l02072"></a>02072 <span class="keyword">const</span> <span class="keywordtype">int</span> szx,
+<a name="l02073"></a>02073 <span class="keyword">const</span> <span class="keywordtype">int</span> szy)
+<a name="l02074"></a>02074
+<a name="l02075"></a>02075 {
+<a name="l02076"></a>02076 *llx= ((xpos-box)>0) ? (xpos-box) : 1;
+<a name="l02077"></a>02077 *lly= ((ypos-box)>0) ? (ypos-box) : 1;
+<a name="l02078"></a>02078 *urx= ((xpos+box)<szx) ? (xpos+box) : szx-1 ;
+<a name="l02079"></a>02079 *ury= ((ypos+box)<szy) ? (ypos+box) : szy-1 ;
+<a name="l02080"></a>02080
+<a name="l02081"></a>02081 <span class="keywordflow">return</span>;
+<a name="l02082"></a>02082 }
+<a name="l02083"></a>02083
<a name="l02084"></a>02084
<a name="l02085"></a>02085
<a name="l02086"></a>02086
<a name="l02087"></a>02087
-<a name="l02088"></a>02088
-<a name="l02089"></a>02089 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02099"></a>02099 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02100"></a>02100 cpl_error_code
-<a name="l02101"></a>02101 sinfo_get_bkg_4corners(<span class="keyword">const</span> cpl_image *img,
-<a name="l02102"></a>02102 <span class="keyword">const</span> <span class="keywordtype">int</span> bkg_sx,
-<a name="l02103"></a>02103 <span class="keyword">const</span> <span class="keywordtype">int</span> bkg_sy,
-<a name="l02104"></a>02104 <span class="keywordtype">double</span>* bkg,
-<a name="l02105"></a>02105 <span class="keywordtype">double</span>* std)
-<a name="l02106"></a>02106 {
-<a name="l02107"></a>02107
-<a name="l02108"></a>02108 <span class="keywordtype">int</span> sx=0;
-<a name="l02109"></a>02109 <span class="keywordtype">int</span> sy=0;
-<a name="l02110"></a>02110 cpl_image* img_bkg=NULL;
-<a name="l02111"></a>02111 *bkg=0;
-<a name="l02112"></a>02112
-<a name="l02113"></a>02113 cknull(img,<span class="stringliteral">"NULL input image!"</span>);
-<a name="l02114"></a>02114 check_nomsg(sx=cpl_image_get_size_x(img));
-<a name="l02115"></a>02115 check_nomsg(sy=cpl_image_get_size_y(img));
-<a name="l02116"></a>02116
-<a name="l02117"></a>02117 check_nomsg(img_bkg=cpl_image_new(2*bkg_sx,2*bkg_sy,CPL_TYPE_FLOAT));
-<a name="l02118"></a>02118 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,1,1,bkg_sx,bkg_sy),
-<a name="l02119"></a>02119 1,1));
-<a name="l02120"></a>02120
-<a name="l02121"></a>02121 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,sx-bkg_sx,1,
-<a name="l02122"></a>02122 sx,bkg_sy),bkg_sx+1,1));
-<a name="l02123"></a>02123 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,1,sy-bkg_sy,
-<a name="l02124"></a>02124 bkg_sx,sy),1,bkg_sy+1));
-<a name="l02125"></a>02125
-<a name="l02126"></a>02126 check_nomsg(cpl_image_copy(img_bkg,
-<a name="l02127"></a>02127 cpl_image_extract(img,sx-bkg_sx,sy-bkg_sy,sx,sy),
-<a name="l02128"></a>02128 bkg_sx+1,bkg_sy+1));
-<a name="l02129"></a>02129
-<a name="l02130"></a>02130 check_nomsg(*bkg=cpl_image_get_median(img_bkg));
-<a name="l02131"></a>02131 check_nomsg(*std=cpl_image_get_stdev(img_bkg));
-<a name="l02132"></a>02132 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"sky bkg: %f"</span>,*bkg);
-<a name="l02133"></a>02133 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"sky stdev: %f"</span>,*std);
+<a name="l02088"></a>02088 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02098"></a>02098 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02099"></a>02099 cpl_error_code
+<a name="l02100"></a>02100 sinfo_get_bkg_4corners(<span class="keyword">const</span> cpl_image *img,
+<a name="l02101"></a>02101 <span class="keyword">const</span> <span class="keywordtype">int</span> bkg_sx,
+<a name="l02102"></a>02102 <span class="keyword">const</span> <span class="keywordtype">int</span> bkg_sy,
+<a name="l02103"></a>02103 <span class="keywordtype">double</span>* bkg,
+<a name="l02104"></a>02104 <span class="keywordtype">double</span>* std)
+<a name="l02105"></a>02105 {
+<a name="l02106"></a>02106
+<a name="l02107"></a>02107 <span class="keywordtype">int</span> sx=0;
+<a name="l02108"></a>02108 <span class="keywordtype">int</span> sy=0;
+<a name="l02109"></a>02109 cpl_image* img_bkg=NULL;
+<a name="l02110"></a>02110 *bkg=0;
+<a name="l02111"></a>02111
+<a name="l02112"></a>02112 cknull(img,<span class="stringliteral">"NULL input image!"</span>);
+<a name="l02113"></a>02113 check_nomsg(sx=cpl_image_get_size_x(img));
+<a name="l02114"></a>02114 check_nomsg(sy=cpl_image_get_size_y(img));
+<a name="l02115"></a>02115
+<a name="l02116"></a>02116 check_nomsg(img_bkg=cpl_image_new(2*bkg_sx,2*bkg_sy,CPL_TYPE_FLOAT));
+<a name="l02117"></a>02117 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,1,1,bkg_sx,bkg_sy),
+<a name="l02118"></a>02118 1,1));
+<a name="l02119"></a>02119
+<a name="l02120"></a>02120 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,sx-bkg_sx,1,
+<a name="l02121"></a>02121 sx,bkg_sy),bkg_sx+1,1));
+<a name="l02122"></a>02122 check_nomsg(cpl_image_copy(img_bkg,cpl_image_extract(img,1,sy-bkg_sy,
+<a name="l02123"></a>02123 bkg_sx,sy),1,bkg_sy+1));
+<a name="l02124"></a>02124
+<a name="l02125"></a>02125 check_nomsg(cpl_image_copy(img_bkg,
+<a name="l02126"></a>02126 cpl_image_extract(img,sx-bkg_sx,sy-bkg_sy,sx,sy),
+<a name="l02127"></a>02127 bkg_sx+1,bkg_sy+1));
+<a name="l02128"></a>02128
+<a name="l02129"></a>02129 check_nomsg(*bkg=cpl_image_get_median(img_bkg));
+<a name="l02130"></a>02130 check_nomsg(*std=cpl_image_get_stdev(img_bkg));
+<a name="l02131"></a>02131 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"sky bkg: %f"</span>,*bkg);
+<a name="l02132"></a>02132 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"sky stdev: %f"</span>,*std);
+<a name="l02133"></a>02133
<a name="l02134"></a>02134
-<a name="l02135"></a>02135
-<a name="l02136"></a>02136 cleanup:
-<a name="l02137"></a>02137 sinfo_free_image(&img_bkg);
-<a name="l02138"></a>02138
-<a name="l02139"></a>02139 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l02140"></a>02140 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l02141"></a>02141 } <span class="keywordflow">else</span> {
-<a name="l02142"></a>02142 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l02143"></a>02143 }
+<a name="l02135"></a>02135 cleanup:
+<a name="l02136"></a>02136 sinfo_free_image(&img_bkg);
+<a name="l02137"></a>02137
+<a name="l02138"></a>02138 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l02139"></a>02139 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l02140"></a>02140 } <span class="keywordflow">else</span> {
+<a name="l02141"></a>02141 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l02142"></a>02142 }
+<a name="l02143"></a>02143
<a name="l02144"></a>02144
-<a name="l02145"></a>02145
-<a name="l02146"></a>02146 }
-<a name="l02147"></a>02147
-<a name="l02160"></a>02160 <span class="comment">/*---------------------------------------------------------------------------*/</span>
-<a name="l02161"></a>02161 cpl_error_code
-<a name="l02162"></a>02162 sinfo_compute_psf(<span class="keyword">const</span> <span class="keywordtype">double</span> dia,
-<a name="l02163"></a>02163 <span class="keyword">const</span> <span class="keywordtype">double</span> occ,
-<a name="l02164"></a>02164 <span class="keyword">const</span> <span class="keywordtype">double</span> lambda,
-<a name="l02165"></a>02165 <span class="keyword">const</span> <span class="keywordtype">double</span> psize,
-<a name="l02166"></a>02166 <span class="keyword">const</span> <span class="keywordtype">double</span> cx,
-<a name="l02167"></a>02167 <span class="keyword">const</span> <span class="keywordtype">double</span> cy,
-<a name="l02168"></a>02168 <span class="keyword">const</span> <span class="keywordtype">double</span> anamorph,
-<a name="l02169"></a>02169 <span class="keywordtype">double</span>* psf_peak)
-<a name="l02170"></a>02170 {
-<a name="l02171"></a>02171
-<a name="l02172"></a>02172 <span class="keywordtype">int</span> bin=SINFO_PSF_BIN;
-<a name="l02173"></a>02173 <span class="keywordtype">int</span> npoints=SINFO_PSF_NPOINT;
-<a name="l02174"></a>02174
-<a name="l02175"></a>02175 <span class="keywordtype">int</span> dim=SINFO_PSF_DIM;
-<a name="l02176"></a>02176 <span class="keywordtype">int</span> blocks=SINFO_PSF_BLOCKS;
-<a name="l02177"></a>02177 <span class="keywordtype">int</span> sx=dim;
-<a name="l02178"></a>02178 <span class="keywordtype">int</span> sy=dim;
+<a name="l02145"></a>02145 }
+<a name="l02146"></a>02146
+<a name="l02159"></a>02159 <span class="comment">/*---------------------------------------------------------------------------*/</span>
+<a name="l02160"></a>02160 cpl_error_code
+<a name="l02161"></a>02161 sinfo_compute_psf(<span class="keyword">const</span> <span class="keywordtype">double</span> dia,
+<a name="l02162"></a>02162 <span class="keyword">const</span> <span class="keywordtype">double</span> occ,
+<a name="l02163"></a>02163 <span class="keyword">const</span> <span class="keywordtype">double</span> lambda,
+<a name="l02164"></a>02164 <span class="keyword">const</span> <span class="keywordtype">double</span> psize,
+<a name="l02165"></a>02165 <span class="keyword">const</span> <span class="keywordtype">double</span> cx,
+<a name="l02166"></a>02166 <span class="keyword">const</span> <span class="keywordtype">double</span> cy,
+<a name="l02167"></a>02167 <span class="keyword">const</span> <span class="keywordtype">double</span> anamorph,
+<a name="l02168"></a>02168 <span class="keywordtype">double</span>* psf_peak)
+<a name="l02169"></a>02169 {
+<a name="l02170"></a>02170
+<a name="l02171"></a>02171 <span class="keywordtype">int</span> bin=SINFO_PSF_BIN;
+<a name="l02172"></a>02172 <span class="keywordtype">int</span> npoints=SINFO_PSF_NPOINT;
+<a name="l02173"></a>02173
+<a name="l02174"></a>02174 <span class="keywordtype">int</span> dim=SINFO_PSF_DIM;
+<a name="l02175"></a>02175 <span class="keywordtype">int</span> blocks=SINFO_PSF_BLOCKS;
+<a name="l02176"></a>02176 <span class="keywordtype">int</span> sx=dim;
+<a name="l02177"></a>02177 <span class="keywordtype">int</span> sy=dim;
+<a name="l02178"></a>02178
<a name="l02179"></a>02179
-<a name="l02180"></a>02180
-<a name="l02181"></a>02181 <span class="keywordtype">int</span> i=0;
-<a name="l02182"></a>02182 <span class="keywordtype">int</span> j=0;
-<a name="l02183"></a>02183 <span class="keywordtype">double</span> k=0;
-<a name="l02184"></a>02184
-<a name="l02185"></a>02185 <span class="keywordtype">int</span> ii=0;
-<a name="l02186"></a>02186 <span class="keywordtype">int</span> jj=0;
-<a name="l02187"></a>02187 <span class="keywordtype">int</span> start=0;
-<a name="l02188"></a>02188
-<a name="l02189"></a>02189 <span class="keywordtype">double</span> nyquist=lambda/dia/2.*206265/psize*bin;
-<a name="l02190"></a>02190 <span class="keywordtype">double</span> cor=0.;
-<a name="l02191"></a>02191 <span class="keywordtype">double</span> v0=0;
-<a name="l02192"></a>02192 <span class="keywordtype">double</span> ll[npoints];
-<a name="l02193"></a>02193 <span class="keywordtype">double</span> part[npoints];
-<a name="l02194"></a>02194 <span class="keywordtype">double</span> ee;
-<a name="l02195"></a>02195 <span class="keywordtype">double</span> dll=0;
-<a name="l02196"></a>02196 <span class="keywordtype">double</span> tot1=0;
-<a name="l02197"></a>02197 <span class="keywordtype">double</span> tot2=0;
+<a name="l02180"></a>02180 <span class="keywordtype">int</span> i=0;
+<a name="l02181"></a>02181 <span class="keywordtype">int</span> j=0;
+<a name="l02182"></a>02182 <span class="keywordtype">double</span> k=0;
+<a name="l02183"></a>02183
+<a name="l02184"></a>02184 <span class="keywordtype">int</span> ii=0;
+<a name="l02185"></a>02185 <span class="keywordtype">int</span> jj=0;
+<a name="l02186"></a>02186 <span class="keywordtype">int</span> start=0;
+<a name="l02187"></a>02187
+<a name="l02188"></a>02188 <span class="keywordtype">double</span> nyquist=lambda/dia/2.*206265/psize*bin;
+<a name="l02189"></a>02189 <span class="keywordtype">double</span> cor=0.;
+<a name="l02190"></a>02190 <span class="keywordtype">double</span> v0=0;
+<a name="l02191"></a>02191 <span class="keywordtype">double</span> ll[npoints];
+<a name="l02192"></a>02192 <span class="keywordtype">double</span> part[npoints];
+<a name="l02193"></a>02193 <span class="keywordtype">double</span> ee;
+<a name="l02194"></a>02194 <span class="keywordtype">double</span> dll=0;
+<a name="l02195"></a>02195 <span class="keywordtype">double</span> tot1=0;
+<a name="l02196"></a>02196 <span class="keywordtype">double</span> tot2=0;
+<a name="l02197"></a>02197
<a name="l02198"></a>02198
-<a name="l02199"></a>02199
-<a name="l02200"></a>02200 <span class="keywordtype">double</span> fct=0;
-<a name="l02201"></a>02201
-<a name="l02202"></a>02202 <span class="keywordtype">double</span>* pxx=NULL;
-<a name="l02203"></a>02203 <span class="keywordtype">double</span>* pyy=NULL;
-<a name="l02204"></a>02204 <span class="keywordtype">double</span>* prr=NULL;
-<a name="l02205"></a>02205 <span class="keywordtype">double</span>* ppsf0=NULL;
-<a name="l02206"></a>02206
-<a name="l02207"></a>02207 <span class="keywordtype">double</span>* pcor=NULL;
-<a name="l02208"></a>02208 <span class="keywordtype">double</span>* pairy=NULL;
-<a name="l02209"></a>02209 <span class="keywordtype">double</span>* pw=NULL;
-<a name="l02210"></a>02210
-<a name="l02211"></a>02211 cpl_image* img_xx=NULL;
-<a name="l02212"></a>02212 cpl_image* img_yy=NULL;
-<a name="l02213"></a>02213 cpl_image* img_rr=NULL;
-<a name="l02214"></a>02214 cpl_image* img_rrcor=NULL;
-<a name="l02215"></a>02215 cpl_image* img_airy=NULL;
-<a name="l02216"></a>02216 cpl_image* img_w=NULL;
-<a name="l02217"></a>02217 cpl_image* img_psf0=NULL;
+<a name="l02199"></a>02199 <span class="keywordtype">double</span> fct=0;
+<a name="l02200"></a>02200
+<a name="l02201"></a>02201 <span class="keywordtype">double</span>* pxx=NULL;
+<a name="l02202"></a>02202 <span class="keywordtype">double</span>* pyy=NULL;
+<a name="l02203"></a>02203 <span class="keywordtype">double</span>* prr=NULL;
+<a name="l02204"></a>02204 <span class="keywordtype">double</span>* ppsf0=NULL;
+<a name="l02205"></a>02205
+<a name="l02206"></a>02206 <span class="keywordtype">double</span>* pcor=NULL;
+<a name="l02207"></a>02207 <span class="keywordtype">double</span>* pairy=NULL;
+<a name="l02208"></a>02208 <span class="keywordtype">double</span>* pw=NULL;
+<a name="l02209"></a>02209
+<a name="l02210"></a>02210 cpl_image* img_xx=NULL;
+<a name="l02211"></a>02211 cpl_image* img_yy=NULL;
+<a name="l02212"></a>02212 cpl_image* img_rr=NULL;
+<a name="l02213"></a>02213 cpl_image* img_rrcor=NULL;
+<a name="l02214"></a>02214 cpl_image* img_airy=NULL;
+<a name="l02215"></a>02215 cpl_image* img_w=NULL;
+<a name="l02216"></a>02216 cpl_image* img_psf0=NULL;
+<a name="l02217"></a>02217
<a name="l02218"></a>02218
<a name="l02219"></a>02219
-<a name="l02220"></a>02220
-<a name="l02221"></a>02221 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"lambda=%g"</span>,lambda);
-<a name="l02222"></a>02222 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dia=%f"</span>,dia);
-<a name="l02223"></a>02223 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"psize=%f"</span>,psize);
-<a name="l02224"></a>02224 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"bin=%d"</span>,bin);
-<a name="l02225"></a>02225 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"nyquist=%f"</span>,nyquist);
-<a name="l02226"></a>02226
-<a name="l02227"></a>02227 check_nomsg(img_xx=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE));
-<a name="l02228"></a>02228 img_yy=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
-<a name="l02229"></a>02229 img_rr=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
-<a name="l02230"></a>02230 img_rrcor=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
-<a name="l02231"></a>02231
-<a name="l02232"></a>02232 pxx=cpl_image_get_data_double(img_xx);
-<a name="l02233"></a>02233 pyy=cpl_image_get_data_double(img_yy);
-<a name="l02234"></a>02234 prr=cpl_image_get_data_double(img_rr);
-<a name="l02235"></a>02235
-<a name="l02236"></a>02236 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
-<a name="l02237"></a>02237 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
-<a name="l02238"></a>02238 <span class="comment">//xz plane increasing along y</span>
-<a name="l02239"></a>02239 pxx[j*sx+i]=(i-sx/2-cx*bin)/nyquist*SINFO_MATH_PI/2;
-<a name="l02240"></a>02240 <span class="comment">//yz plane increasing along x</span>
-<a name="l02241"></a>02241 pyy[j*sx+i]=(j-sy/2-cy*bin)/nyquist*SINFO_MATH_PI/2*anamorph;
-<a name="l02242"></a>02242
-<a name="l02243"></a>02243 <span class="comment">//combinex xyz surface</span>
-<a name="l02244"></a>02244 prr[j*sx+i]=sqrt(pxx[j*sx+i]*pxx[j*sx+i]+pyy[j*sx+i]*pyy[j*sx+i]);
-<a name="l02245"></a>02245 }
-<a name="l02246"></a>02246 }
-<a name="l02247"></a>02247
-<a name="l02248"></a>02248 <span class="comment">/*</span>
-<a name="l02249"></a>02249 <span class="comment"> check_nomsg(cpl_image_save(img_xx,"out_xx.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02250"></a>02250 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02251"></a>02251 <span class="comment"></span>
-<a name="l02252"></a>02252 <span class="comment"> check_nomsg(cpl_image_save(img_yy,"out_yy.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02253"></a>02253 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02254"></a>02254 <span class="comment"></span>
-<a name="l02255"></a>02255 <span class="comment"> check_nomsg(cpl_image_save(img_rr,"out_rr.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02256"></a>02256 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02257"></a>02257 <span class="comment"></span>
-<a name="l02258"></a>02258 <span class="comment"> */</span>
-<a name="l02259"></a>02259
-<a name="l02260"></a>02260 img_rrcor=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
-<a name="l02261"></a>02261
-<a name="l02262"></a>02262 cor=1./(1.-occ*occ);
-<a name="l02263"></a>02263 cor*=cor;
-<a name="l02264"></a>02264
-<a name="l02265"></a>02265 img_rrcor=cpl_image_duplicate(img_rr);
-<a name="l02266"></a>02266 cpl_image_multiply_scalar(img_rrcor,cor);
-<a name="l02267"></a>02267 pcor=cpl_image_get_data_double(img_rrcor);
-<a name="l02268"></a>02268
-<a name="l02269"></a>02269 <span class="comment">/*</span>
-<a name="l02270"></a>02270 <span class="comment"> check_nomsg(cpl_image_save(img_rrcor,"out_rrcor.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02271"></a>02271 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02272"></a>02272 <span class="comment"> */</span>
-<a name="l02273"></a>02273
-<a name="l02274"></a>02274 img_airy=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
-<a name="l02275"></a>02275 pairy=cpl_image_get_data_double(img_airy);
+<a name="l02220"></a>02220 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"lambda=%g"</span>,lambda);
+<a name="l02221"></a>02221 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dia=%f"</span>,dia);
+<a name="l02222"></a>02222 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"psize=%f"</span>,psize);
+<a name="l02223"></a>02223 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"bin=%d"</span>,bin);
+<a name="l02224"></a>02224 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"nyquist=%f"</span>,nyquist);
+<a name="l02225"></a>02225
+<a name="l02226"></a>02226 check_nomsg(img_xx=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE));
+<a name="l02227"></a>02227 img_yy=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
+<a name="l02228"></a>02228 img_rr=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
+<a name="l02229"></a>02229 img_rrcor=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
+<a name="l02230"></a>02230
+<a name="l02231"></a>02231 pxx=cpl_image_get_data_double(img_xx);
+<a name="l02232"></a>02232 pyy=cpl_image_get_data_double(img_yy);
+<a name="l02233"></a>02233 prr=cpl_image_get_data_double(img_rr);
+<a name="l02234"></a>02234
+<a name="l02235"></a>02235 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
+<a name="l02236"></a>02236 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
+<a name="l02237"></a>02237 <span class="comment">//xz plane increasing along y</span>
+<a name="l02238"></a>02238 pxx[j*sx+i]=(i-sx/2-cx*bin)/nyquist*SINFO_MATH_PI/2;
+<a name="l02239"></a>02239 <span class="comment">//yz plane increasing along x</span>
+<a name="l02240"></a>02240 pyy[j*sx+i]=(j-sy/2-cy*bin)/nyquist*SINFO_MATH_PI/2*anamorph;
+<a name="l02241"></a>02241
+<a name="l02242"></a>02242 <span class="comment">//combinex xyz surface</span>
+<a name="l02243"></a>02243 prr[j*sx+i]=sqrt(pxx[j*sx+i]*pxx[j*sx+i]+pyy[j*sx+i]*pyy[j*sx+i]);
+<a name="l02244"></a>02244 }
+<a name="l02245"></a>02245 }
+<a name="l02246"></a>02246
+<a name="l02247"></a>02247 <span class="comment">/*</span>
+<a name="l02248"></a>02248 <span class="comment"> check_nomsg(cpl_image_save(img_xx,"out_xx.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02249"></a>02249 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02250"></a>02250 <span class="comment"></span>
+<a name="l02251"></a>02251 <span class="comment"> check_nomsg(cpl_image_save(img_yy,"out_yy.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02252"></a>02252 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02253"></a>02253 <span class="comment"></span>
+<a name="l02254"></a>02254 <span class="comment"> check_nomsg(cpl_image_save(img_rr,"out_rr.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02255"></a>02255 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02256"></a>02256 <span class="comment"></span>
+<a name="l02257"></a>02257 <span class="comment"> */</span>
+<a name="l02258"></a>02258
+<a name="l02259"></a>02259 img_rrcor=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
+<a name="l02260"></a>02260
+<a name="l02261"></a>02261 cor=1./(1.-occ*occ);
+<a name="l02262"></a>02262 cor*=cor;
+<a name="l02263"></a>02263
+<a name="l02264"></a>02264 img_rrcor=cpl_image_duplicate(img_rr);
+<a name="l02265"></a>02265 cpl_image_multiply_scalar(img_rrcor,cor);
+<a name="l02266"></a>02266 pcor=cpl_image_get_data_double(img_rrcor);
+<a name="l02267"></a>02267
+<a name="l02268"></a>02268 <span class="comment">/*</span>
+<a name="l02269"></a>02269 <span class="comment"> check_nomsg(cpl_image_save(img_rrcor,"out_rrcor.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02270"></a>02270 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02271"></a>02271 <span class="comment"> */</span>
+<a name="l02272"></a>02272
+<a name="l02273"></a>02273 img_airy=cpl_image_new(sx,sy,CPL_TYPE_DOUBLE);
+<a name="l02274"></a>02274 pairy=cpl_image_get_data_double(img_airy);
+<a name="l02275"></a>02275
<a name="l02276"></a>02276
-<a name="l02277"></a>02277
-<a name="l02278"></a>02278 <span class="keywordflow">if</span> (occ == 0.0) {
-<a name="l02279"></a>02279
-<a name="l02280"></a>02280 <span class="keywordflow">for</span>(j=0;j<sx;j++) {
-<a name="l02281"></a>02281 <span class="keywordflow">for</span>(i=0;i<sy;i++) {
-<a name="l02282"></a>02282 fct=(2.*j1(prr[j*sx+i])/prr[j*sx+i]);
-<a name="l02283"></a>02283 pairy[j*sx+i]=fct*fct;
-<a name="l02284"></a>02284
-<a name="l02285"></a>02285 }
-<a name="l02286"></a>02286 }
-<a name="l02287"></a>02287
-<a name="l02288"></a>02288 } <span class="keywordflow">else</span> {
-<a name="l02289"></a>02289 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
-<a name="l02290"></a>02290 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
-<a name="l02291"></a>02291
-<a name="l02292"></a>02292 fct=(2.*j1(prr[j*sx+i])/prr[j*sx+i]-occ*occ*2.*j1(pcor[j*sx+i])/pcor[j*sx+i]);
-<a name="l02293"></a>02293 pairy[j*sx+i]=cor*fct*fct;
-<a name="l02294"></a>02294
-<a name="l02295"></a>02295 }
-<a name="l02296"></a>02296 }
-<a name="l02297"></a>02297 }
-<a name="l02298"></a>02298
-<a name="l02299"></a>02299 <span class="comment">/*</span>
-<a name="l02300"></a>02300 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02301"></a>02301 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02302"></a>02302 <span class="comment"></span>
-<a name="l02303"></a>02303 <span class="comment"> */</span>
-<a name="l02304"></a>02304
-<a name="l02305"></a>02305 <span class="comment">//To remove an expected NAN value at the PSF centre we re-set PSF(centre)=1</span>
-<a name="l02306"></a>02306 img_w=cpl_image_duplicate(img_airy);
-<a name="l02307"></a>02307 pw=cpl_image_get_data_double(img_w);
-<a name="l02308"></a>02308 pairy=cpl_image_get_data_double(img_airy);
-<a name="l02309"></a>02309
-<a name="l02310"></a>02310 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
-<a name="l02311"></a>02311 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
-<a name="l02312"></a>02312 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[i+j*sx]) && (pairy[i+j*sx] ==0)) {
-<a name="l02313"></a>02313 pairy[i+j*sx]=1.;
-<a name="l02314"></a>02314 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"====> %f"</span>,pairy[i+j*sx]);
-<a name="l02315"></a>02315 }
-<a name="l02316"></a>02316 }
-<a name="l02317"></a>02317 }
-<a name="l02318"></a>02318 pairy[sx/2+sy/2*sx]=1.;
-<a name="l02319"></a>02319
-<a name="l02320"></a>02320 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"total-airy=%f"</span>,cpl_image_get_flux(img_airy));
-<a name="l02321"></a>02321
-<a name="l02322"></a>02322 <span class="comment">/*</span>
-<a name="l02323"></a>02323 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy1.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02324"></a>02324 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02325"></a>02325 <span class="comment"></span>
-<a name="l02326"></a>02326 <span class="comment"> */</span>
+<a name="l02277"></a>02277 <span class="keywordflow">if</span> (occ == 0.0) {
+<a name="l02278"></a>02278
+<a name="l02279"></a>02279 <span class="keywordflow">for</span>(j=0;j<sx;j++) {
+<a name="l02280"></a>02280 <span class="keywordflow">for</span>(i=0;i<sy;i++) {
+<a name="l02281"></a>02281 fct=(2.*j1(prr[j*sx+i])/prr[j*sx+i]);
+<a name="l02282"></a>02282 pairy[j*sx+i]=fct*fct;
+<a name="l02283"></a>02283
+<a name="l02284"></a>02284 }
+<a name="l02285"></a>02285 }
+<a name="l02286"></a>02286
+<a name="l02287"></a>02287 } <span class="keywordflow">else</span> {
+<a name="l02288"></a>02288 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
+<a name="l02289"></a>02289 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
+<a name="l02290"></a>02290
+<a name="l02291"></a>02291 fct=(2.*j1(prr[j*sx+i])/prr[j*sx+i]-occ*occ*2.*j1(pcor[j*sx+i])/pcor[j*sx+i]);
+<a name="l02292"></a>02292 pairy[j*sx+i]=cor*fct*fct;
+<a name="l02293"></a>02293
+<a name="l02294"></a>02294 }
+<a name="l02295"></a>02295 }
+<a name="l02296"></a>02296 }
+<a name="l02297"></a>02297
+<a name="l02298"></a>02298 <span class="comment">/*</span>
+<a name="l02299"></a>02299 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02300"></a>02300 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02301"></a>02301 <span class="comment"></span>
+<a name="l02302"></a>02302 <span class="comment"> */</span>
+<a name="l02303"></a>02303
+<a name="l02304"></a>02304 <span class="comment">//To remove an expected NAN value at the PSF centre we re-set PSF(centre)=1</span>
+<a name="l02305"></a>02305 img_w=cpl_image_duplicate(img_airy);
+<a name="l02306"></a>02306 pw=cpl_image_get_data_double(img_w);
+<a name="l02307"></a>02307 pairy=cpl_image_get_data_double(img_airy);
+<a name="l02308"></a>02308
+<a name="l02309"></a>02309 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
+<a name="l02310"></a>02310 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
+<a name="l02311"></a>02311 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[i+j*sx]) && (pairy[i+j*sx] ==0)) {
+<a name="l02312"></a>02312 pairy[i+j*sx]=1.;
+<a name="l02313"></a>02313 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"====> %f"</span>,pairy[i+j*sx]);
+<a name="l02314"></a>02314 }
+<a name="l02315"></a>02315 }
+<a name="l02316"></a>02316 }
+<a name="l02317"></a>02317 pairy[sx/2+sy/2*sx]=1.;
+<a name="l02318"></a>02318
+<a name="l02319"></a>02319 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"total-airy=%f"</span>,cpl_image_get_flux(img_airy));
+<a name="l02320"></a>02320
+<a name="l02321"></a>02321 <span class="comment">/*</span>
+<a name="l02322"></a>02322 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy1.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02323"></a>02323 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02324"></a>02324 <span class="comment"></span>
+<a name="l02325"></a>02325 <span class="comment"> */</span>
+<a name="l02326"></a>02326
<a name="l02327"></a>02327
-<a name="l02328"></a>02328
-<a name="l02329"></a>02329 <span class="comment">// Computation of EE</span>
+<a name="l02328"></a>02328 <span class="comment">// Computation of EE</span>
+<a name="l02329"></a>02329
<a name="l02330"></a>02330
-<a name="l02331"></a>02331
-<a name="l02332"></a>02332 v0=prr[0+dim/4-1];
-<a name="l02333"></a>02333 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"v0=%12.10g"</span>,v0);
-<a name="l02334"></a>02334 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
-<a name="l02335"></a>02335 ll[i]=(double)i/npoints*v0;
-<a name="l02336"></a>02336 }
-<a name="l02337"></a>02337 dll=ll[1]-ll[0];
-<a name="l02338"></a>02338 cor=1./(1.-occ*occ);
-<a name="l02339"></a>02339
-<a name="l02340"></a>02340 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
-<a name="l02341"></a>02341 part[i]=2.*j1(ll[i])/ll[i];
-<a name="l02342"></a>02342 }
-<a name="l02343"></a>02343 part[0]=1.0;
-<a name="l02344"></a>02344
-<a name="l02345"></a>02345 tot1=0.;
-<a name="l02346"></a>02346 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
-<a name="l02347"></a>02347 tot1+=j1(occ*ll[i])*part[i]*dll;
-<a name="l02348"></a>02348 }
-<a name="l02349"></a>02349 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot=%10.8f"</span>,tot1);
+<a name="l02331"></a>02331 v0=prr[0+dim/4-1];
+<a name="l02332"></a>02332 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"v0=%12.10g"</span>,v0);
+<a name="l02333"></a>02333 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
+<a name="l02334"></a>02334 ll[i]=(double)i/npoints*v0;
+<a name="l02335"></a>02335 }
+<a name="l02336"></a>02336 dll=ll[1]-ll[0];
+<a name="l02337"></a>02337 cor=1./(1.-occ*occ);
+<a name="l02338"></a>02338
+<a name="l02339"></a>02339 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
+<a name="l02340"></a>02340 part[i]=2.*j1(ll[i])/ll[i];
+<a name="l02341"></a>02341 }
+<a name="l02342"></a>02342 part[0]=1.0;
+<a name="l02343"></a>02343
+<a name="l02344"></a>02344 tot1=0.;
+<a name="l02345"></a>02345 <span class="keywordflow">for</span>(i=0;i<npoints;i++) {
+<a name="l02346"></a>02346 tot1+=j1(occ*ll[i])*part[i]*dll;
+<a name="l02347"></a>02347 }
+<a name="l02348"></a>02348 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot=%10.8f"</span>,tot1);
+<a name="l02349"></a>02349
<a name="l02350"></a>02350
-<a name="l02351"></a>02351
-<a name="l02352"></a>02352 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"cor=%10.8f"</span>,cor);
-<a name="l02353"></a>02353
-<a name="l02354"></a>02354 ee=(1.-j0(v0)*j0(v0));
-<a name="l02355"></a>02355
-<a name="l02356"></a>02356 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"(1-j0(v0)*j0(v0))=%10.8f"</span>,ee);
+<a name="l02351"></a>02351 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"cor=%10.8f"</span>,cor);
+<a name="l02352"></a>02352
+<a name="l02353"></a>02353 ee=(1.-j0(v0)*j0(v0));
+<a name="l02354"></a>02354
+<a name="l02355"></a>02355 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"(1-j0(v0)*j0(v0))=%10.8f"</span>,ee);
+<a name="l02356"></a>02356
<a name="l02357"></a>02357
-<a name="l02358"></a>02358
-<a name="l02359"></a>02359 ee-=(j1(v0))*(j1(v0));
-<a name="l02360"></a>02360 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"j1^2=%10.8f"</span>,(j1(v0))*(j1(v0)));
-<a name="l02361"></a>02361 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
-<a name="l02362"></a>02362
-<a name="l02363"></a>02363 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"factor=%10.8f"</span>,
-<a name="l02364"></a>02364 occ*occ*(1-j0(occ*v0)*j0(occ*v0)-j1(occ*v0)*j1(occ*v0)));
+<a name="l02358"></a>02358 ee-=(j1(v0))*(j1(v0));
+<a name="l02359"></a>02359 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"j1^2=%10.8f"</span>,(j1(v0))*(j1(v0)));
+<a name="l02360"></a>02360 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
+<a name="l02361"></a>02361
+<a name="l02362"></a>02362 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"factor=%10.8f"</span>,
+<a name="l02363"></a>02363 occ*occ*(1-j0(occ*v0)*j0(occ*v0)-j1(occ*v0)*j1(occ*v0)));
+<a name="l02364"></a>02364
<a name="l02365"></a>02365
-<a name="l02366"></a>02366
-<a name="l02367"></a>02367 ee+=occ*occ*(1-j0(occ*v0)*j0(occ*v0)-j1(occ*v0)*j1(occ*v0));
-<a name="l02368"></a>02368 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
-<a name="l02369"></a>02369
-<a name="l02370"></a>02370 ee-=2.*occ*tot1;
-<a name="l02371"></a>02371 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
-<a name="l02372"></a>02372
-<a name="l02373"></a>02373 ee*=cor;
-<a name="l02374"></a>02374 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
+<a name="l02366"></a>02366 ee+=occ*occ*(1-j0(occ*v0)*j0(occ*v0)-j1(occ*v0)*j1(occ*v0));
+<a name="l02367"></a>02367 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
+<a name="l02368"></a>02368
+<a name="l02369"></a>02369 ee-=2.*occ*tot1;
+<a name="l02370"></a>02370 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
+<a name="l02371"></a>02371
+<a name="l02372"></a>02372 ee*=cor;
+<a name="l02373"></a>02373 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"ee=%10.8f"</span>,ee);
+<a name="l02374"></a>02374
<a name="l02375"></a>02375
-<a name="l02376"></a>02376
-<a name="l02377"></a>02377 tot1=0;
-<a name="l02378"></a>02378 pairy=cpl_image_get_data_double(img_airy);
-<a name="l02379"></a>02379 prr=cpl_image_get_data_double(img_rr);
-<a name="l02380"></a>02380 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
-<a name="l02381"></a>02381 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
-<a name="l02382"></a>02382 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[i+j*sx]) && (prr[i+j*sx] <v0)) {
-<a name="l02383"></a>02383 tot1+=pairy[i+j*sx]*ee;
-<a name="l02384"></a>02384 <span class="comment">//sinfo_msg_debug("tot=%f",tot1);</span>
-<a name="l02385"></a>02385
-<a name="l02386"></a>02386 }
-<a name="l02387"></a>02387 }
-<a name="l02388"></a>02388 }
-<a name="l02389"></a>02389
-<a name="l02390"></a>02390 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot=%10.8f"</span>,tot1);
-<a name="l02391"></a>02391 cpl_image_divide_scalar(img_airy,tot1);
-<a name="l02392"></a>02392
-<a name="l02393"></a>02393 <span class="comment">/*</span>
-<a name="l02394"></a>02394 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy2.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02395"></a>02395 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02396"></a>02396 <span class="comment"></span>
-<a name="l02397"></a>02397 <span class="comment"> */</span>
+<a name="l02376"></a>02376 tot1=0;
+<a name="l02377"></a>02377 pairy=cpl_image_get_data_double(img_airy);
+<a name="l02378"></a>02378 prr=cpl_image_get_data_double(img_rr);
+<a name="l02379"></a>02379 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
+<a name="l02380"></a>02380 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
+<a name="l02381"></a>02381 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[i+j*sx]) && (prr[i+j*sx] <v0)) {
+<a name="l02382"></a>02382 tot1+=pairy[i+j*sx]*ee;
+<a name="l02383"></a>02383 <span class="comment">//sinfo_msg_debug("tot=%f",tot1);</span>
+<a name="l02384"></a>02384
+<a name="l02385"></a>02385 }
+<a name="l02386"></a>02386 }
+<a name="l02387"></a>02387 }
+<a name="l02388"></a>02388
+<a name="l02389"></a>02389 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot=%10.8f"</span>,tot1);
+<a name="l02390"></a>02390 cpl_image_divide_scalar(img_airy,tot1);
+<a name="l02391"></a>02391
+<a name="l02392"></a>02392 <span class="comment">/*</span>
+<a name="l02393"></a>02393 <span class="comment"> check_nomsg(cpl_image_save(img_airy,"out_airy2.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02394"></a>02394 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02395"></a>02395 <span class="comment"></span>
+<a name="l02396"></a>02396 <span class="comment"> */</span>
+<a name="l02397"></a>02397
<a name="l02398"></a>02398
-<a name="l02399"></a>02399
-<a name="l02400"></a>02400 <span class="comment">// Computation of maximum</span>
-<a name="l02401"></a>02401
-<a name="l02402"></a>02402 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dim=%d blocks=%d,bin=%d"</span>,dim,blocks,bin);
-<a name="l02403"></a>02403 start=(dim/2-1)-(blocks/2*bin-1)-bin/2;
-<a name="l02404"></a>02404 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"start=%d"</span>,start);
-<a name="l02405"></a>02405
-<a name="l02406"></a>02406 img_psf0=cpl_image_new(blocks,blocks,CPL_TYPE_DOUBLE);
-<a name="l02407"></a>02407 ppsf0=cpl_image_get_data_double(img_psf0);
-<a name="l02408"></a>02408 tot1=0.;
-<a name="l02409"></a>02409 tot2=0.;
-<a name="l02410"></a>02410
-<a name="l02411"></a>02411 <span class="keywordflow">for</span>(j=0;j<blocks;j++) {
-<a name="l02412"></a>02412 <span class="keywordflow">for</span>(i=0;i<blocks;i++) {
-<a name="l02413"></a>02413 tot1=0;
-<a name="l02414"></a>02414 <span class="keywordflow">for</span>(jj=start+j*bin;jj<start+(j+1)*bin-1;jj++){
-<a name="l02415"></a>02415 <span class="keywordflow">for</span>(ii=start+i*bin;ii<start+(i+1)*bin-1;ii++){
-<a name="l02416"></a>02416 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[ii+jj*sx])) {
-<a name="l02417"></a>02417 tot1+=pairy[ii+jj*sx];
-<a name="l02418"></a>02418 }
-<a name="l02419"></a>02419 }
-<a name="l02420"></a>02420 }
-<a name="l02421"></a>02421 ppsf0[i+j*blocks]=tot1;
-<a name="l02422"></a>02422 tot2+=tot1;
-<a name="l02423"></a>02423 }
-<a name="l02424"></a>02424 }
-<a name="l02425"></a>02425
-<a name="l02426"></a>02426 cpl_image_divide_scalar(img_psf0,tot2);
-<a name="l02427"></a>02427 <span class="comment">/*</span>
-<a name="l02428"></a>02428 <span class="comment"> check_nomsg(cpl_image_save(img_psf0,"out_psf0.fits", CPL_BPP_IEEE_DOUBLE,</span>
-<a name="l02429"></a>02429 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
-<a name="l02430"></a>02430 <span class="comment"></span>
-<a name="l02431"></a>02431 <span class="comment"> */</span>
-<a name="l02432"></a>02432 k=180.*3600./SINFO_MATH_PI;
-<a name="l02433"></a>02433 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"k=%f"</span>,k);
-<a name="l02434"></a>02434 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"radius of first zero: 1.22*lambda/d*k:=%f"</span>,
-<a name="l02435"></a>02435 1.22*lambda/dia*k);
-<a name="l02436"></a>02436 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot: %f"</span>,tot2);
-<a name="l02437"></a>02437 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"max: %f"</span>,cpl_image_get_max(img_psf0)*tot2);
-<a name="l02438"></a>02438 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"max/tot: %f"</span>,cpl_image_get_max(img_psf0));
-<a name="l02439"></a>02439 *psf_peak=cpl_image_get_max(img_psf0);
-<a name="l02440"></a>02440
-<a name="l02441"></a>02441 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"d=%g ob=%g w=%g ps=%g cx=%g cy=%g a=%g peak=%10.8g"</span>,
-<a name="l02442"></a>02442 dia,occ,lambda,psize,cx,cy,anamorph,*psf_peak);
+<a name="l02399"></a>02399 <span class="comment">// Computation of maximum</span>
+<a name="l02400"></a>02400
+<a name="l02401"></a>02401 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"dim=%d blocks=%d,bin=%d"</span>,dim,blocks,bin);
+<a name="l02402"></a>02402 start=(dim/2-1)-(blocks/2*bin-1)-bin/2;
+<a name="l02403"></a>02403 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"start=%d"</span>,start);
+<a name="l02404"></a>02404
+<a name="l02405"></a>02405 img_psf0=cpl_image_new(blocks,blocks,CPL_TYPE_DOUBLE);
+<a name="l02406"></a>02406 ppsf0=cpl_image_get_data_double(img_psf0);
+<a name="l02407"></a>02407 tot1=0.;
+<a name="l02408"></a>02408 tot2=0.;
+<a name="l02409"></a>02409
+<a name="l02410"></a>02410 <span class="keywordflow">for</span>(j=0;j<blocks;j++) {
+<a name="l02411"></a>02411 <span class="keywordflow">for</span>(i=0;i<blocks;i++) {
+<a name="l02412"></a>02412 tot1=0;
+<a name="l02413"></a>02413 <span class="keywordflow">for</span>(jj=start+j*bin;jj<start+(j+1)*bin-1;jj++){
+<a name="l02414"></a>02414 <span class="keywordflow">for</span>(ii=start+i*bin;ii<start+(i+1)*bin-1;ii++){
+<a name="l02415"></a>02415 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pairy[ii+jj*sx])) {
+<a name="l02416"></a>02416 tot1+=pairy[ii+jj*sx];
+<a name="l02417"></a>02417 }
+<a name="l02418"></a>02418 }
+<a name="l02419"></a>02419 }
+<a name="l02420"></a>02420 ppsf0[i+j*blocks]=tot1;
+<a name="l02421"></a>02421 tot2+=tot1;
+<a name="l02422"></a>02422 }
+<a name="l02423"></a>02423 }
+<a name="l02424"></a>02424
+<a name="l02425"></a>02425 cpl_image_divide_scalar(img_psf0,tot2);
+<a name="l02426"></a>02426 <span class="comment">/*</span>
+<a name="l02427"></a>02427 <span class="comment"> check_nomsg(cpl_image_save(img_psf0,"out_psf0.fits", CPL_BPP_IEEE_DOUBLE,</span>
+<a name="l02428"></a>02428 <span class="comment"> NULL,CPL_IO_DEFAULT));</span>
+<a name="l02429"></a>02429 <span class="comment"></span>
+<a name="l02430"></a>02430 <span class="comment"> */</span>
+<a name="l02431"></a>02431 k=180.*3600./SINFO_MATH_PI;
+<a name="l02432"></a>02432 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"k=%f"</span>,k);
+<a name="l02433"></a>02433 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"radius of first zero: 1.22*lambda/d*k:=%f"</span>,
+<a name="l02434"></a>02434 1.22*lambda/dia*k);
+<a name="l02435"></a>02435 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"tot: %f"</span>,tot2);
+<a name="l02436"></a>02436 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"max: %f"</span>,cpl_image_get_max(img_psf0)*tot2);
+<a name="l02437"></a>02437 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"max/tot: %f"</span>,cpl_image_get_max(img_psf0));
+<a name="l02438"></a>02438 *psf_peak=cpl_image_get_max(img_psf0);
+<a name="l02439"></a>02439
+<a name="l02440"></a>02440 <a class="code" href="group__sinfo__msg.html#ga5011f548e1cbc15d52154469a63343c8" title="Print a debug message.">sinfo_msg_debug</a>(<span class="stringliteral">"d=%g ob=%g w=%g ps=%g cx=%g cy=%g a=%g peak=%10.8g"</span>,
+<a name="l02441"></a>02441 dia,occ,lambda,psize,cx,cy,anamorph,*psf_peak);
+<a name="l02442"></a>02442
<a name="l02443"></a>02443
<a name="l02444"></a>02444
-<a name="l02445"></a>02445
-<a name="l02446"></a>02446 cleanup:
-<a name="l02447"></a>02447 sinfo_free_image(&img_xx);
-<a name="l02448"></a>02448 sinfo_free_image(&img_yy);
-<a name="l02449"></a>02449 sinfo_free_image(&img_rr);
-<a name="l02450"></a>02450 sinfo_free_image(&img_rrcor);
-<a name="l02451"></a>02451 sinfo_free_image(&img_airy);
+<a name="l02445"></a>02445 cleanup:
+<a name="l02446"></a>02446 sinfo_free_image(&img_xx);
+<a name="l02447"></a>02447 sinfo_free_image(&img_yy);
+<a name="l02448"></a>02448 sinfo_free_image(&img_rr);
+<a name="l02449"></a>02449 sinfo_free_image(&img_rrcor);
+<a name="l02450"></a>02450 sinfo_free_image(&img_airy);
+<a name="l02451"></a>02451
<a name="l02452"></a>02452
-<a name="l02453"></a>02453
-<a name="l02454"></a>02454 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l02455"></a>02455 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l02456"></a>02456 } <span class="keywordflow">else</span> {
-<a name="l02457"></a>02457 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l02458"></a>02458 }
-<a name="l02459"></a>02459
-<a name="l02460"></a>02460 }
+<a name="l02453"></a>02453 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l02454"></a>02454 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l02455"></a>02455 } <span class="keywordflow">else</span> {
+<a name="l02456"></a>02456 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l02457"></a>02457 }
+<a name="l02458"></a>02458
+<a name="l02459"></a>02459 }
+<a name="l02460"></a>02460
<a name="l02461"></a>02461
-<a name="l02462"></a>02462
-<a name="l02463"></a>02463 cpl_error_code
-<a name="l02464"></a>02464 sinfo_get_flux_above_bkg(<span class="keyword">const</span> cpl_image* img,
-<a name="l02465"></a>02465 <span class="keyword">const</span> <span class="keywordtype">float</span> kappa,
-<a name="l02466"></a>02466 <span class="keyword">const</span> <span class="keywordtype">float</span> std,
-<a name="l02467"></a>02467 <span class="keywordtype">double</span>* f)
-<a name="l02468"></a>02468 {
-<a name="l02469"></a>02469
-<a name="l02470"></a>02470 <span class="keyword">const</span> <span class="keywordtype">float</span>* pimg=NULL;
-<a name="l02471"></a>02471 <span class="keywordtype">int</span> sx=0;
-<a name="l02472"></a>02472 <span class="keywordtype">int</span> sy=0;
-<a name="l02473"></a>02473 <span class="keywordtype">int</span> i=0;
-<a name="l02474"></a>02474 <span class="keywordtype">int</span> j=0;
-<a name="l02475"></a>02475 <span class="keywordtype">int</span> k=0;
-<a name="l02476"></a>02476 <span class="keywordtype">float</span> tot=0;
-<a name="l02477"></a>02477
-<a name="l02478"></a>02478 cpl_image* timg=NULL;
-<a name="l02479"></a>02479 <span class="keywordtype">double</span> sky_bkg=0;
-<a name="l02480"></a>02480 <span class="keywordtype">double</span> sky_std=0;
-<a name="l02481"></a>02481
-<a name="l02482"></a>02482 timg=cpl_image_duplicate(img);
-<a name="l02483"></a>02483 cpl_image_subtract_scalar(timg,std);
-<a name="l02484"></a>02484 check_nomsg(sinfo_get_bkg_4corners(timg,SINFO_BKG_BOX_SZ,SINFO_BKG_BOX_SZ,
-<a name="l02485"></a>02485 &sky_bkg,&sky_std));
-<a name="l02486"></a>02486
-<a name="l02487"></a>02487 check_nomsg(pimg=cpl_image_get_data_float_const(timg));
-<a name="l02488"></a>02488
-<a name="l02489"></a>02489 sx=cpl_image_get_size_x(img);
-<a name="l02490"></a>02490 sy=cpl_image_get_size_y(img);
-<a name="l02491"></a>02491
-<a name="l02492"></a>02492 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
-<a name="l02493"></a>02493 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
-<a name="l02494"></a>02494 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pimg[i+j*sx]) &&
-<a name="l02495"></a>02495 (pimg[i+j*sx]>(sky_bkg+kappa*sky_std))) {
-<a name="l02496"></a>02496 tot+=(double)pimg[i+j*sx];
-<a name="l02497"></a>02497 k++;
-<a name="l02498"></a>02498 }
-<a name="l02499"></a>02499 }
-<a name="l02500"></a>02500 }
-<a name="l02501"></a>02501
-<a name="l02502"></a>02502 *f=(double)(tot-k*sky_bkg);
-<a name="l02503"></a>02503
-<a name="l02504"></a>02504 cleanup:
-<a name="l02505"></a>02505 sinfo_free_image(&timg);
-<a name="l02506"></a>02506
-<a name="l02507"></a>02507 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
-<a name="l02508"></a>02508 <span class="keywordflow">return</span> cpl_error_get_code();
-<a name="l02509"></a>02509 } <span class="keywordflow">else</span> {
-<a name="l02510"></a>02510 <span class="keywordflow">return</span> CPL_ERROR_NONE;
-<a name="l02511"></a>02511 }
-<a name="l02512"></a>02512
-<a name="l02513"></a>02513 }
+<a name="l02462"></a>02462 cpl_error_code
+<a name="l02463"></a>02463 sinfo_get_flux_above_bkg(<span class="keyword">const</span> cpl_image* img,
+<a name="l02464"></a>02464 <span class="keyword">const</span> <span class="keywordtype">float</span> kappa,
+<a name="l02465"></a>02465 <span class="keyword">const</span> <span class="keywordtype">float</span> std,
+<a name="l02466"></a>02466 <span class="keywordtype">double</span>* f)
+<a name="l02467"></a>02467 {
+<a name="l02468"></a>02468
+<a name="l02469"></a>02469 <span class="keyword">const</span> <span class="keywordtype">float</span>* pimg=NULL;
+<a name="l02470"></a>02470 <span class="keywordtype">int</span> sx=0;
+<a name="l02471"></a>02471 <span class="keywordtype">int</span> sy=0;
+<a name="l02472"></a>02472 <span class="keywordtype">int</span> i=0;
+<a name="l02473"></a>02473 <span class="keywordtype">int</span> j=0;
+<a name="l02474"></a>02474 <span class="keywordtype">int</span> k=0;
+<a name="l02475"></a>02475 <span class="keywordtype">float</span> tot=0;
+<a name="l02476"></a>02476
+<a name="l02477"></a>02477 cpl_image* timg=NULL;
+<a name="l02478"></a>02478 <span class="keywordtype">double</span> sky_bkg=0;
+<a name="l02479"></a>02479 <span class="keywordtype">double</span> sky_std=0;
+<a name="l02480"></a>02480
+<a name="l02481"></a>02481 timg=cpl_image_duplicate(img);
+<a name="l02482"></a>02482 cpl_image_subtract_scalar(timg,std);
+<a name="l02483"></a>02483 check_nomsg(sinfo_get_bkg_4corners(timg,SINFO_BKG_BOX_SZ,SINFO_BKG_BOX_SZ,
+<a name="l02484"></a>02484 &sky_bkg,&sky_std));
+<a name="l02485"></a>02485
+<a name="l02486"></a>02486 check_nomsg(pimg=cpl_image_get_data_float_const(timg));
+<a name="l02487"></a>02487
+<a name="l02488"></a>02488 sx=cpl_image_get_size_x(img);
+<a name="l02489"></a>02489 sy=cpl_image_get_size_y(img);
+<a name="l02490"></a>02490
+<a name="l02491"></a>02491 <span class="keywordflow">for</span>(j=0;j<sy;j++) {
+<a name="l02492"></a>02492 <span class="keywordflow">for</span>(i=0;i<sx;i++) {
+<a name="l02493"></a>02493 <span class="keywordflow">if</span>(!<a class="code" href="group__irplib__utils.html#ga804bfc739b5d55f9797ab881b1034ae4" title="portable isnan">irplib_isnan</a>(pimg[i+j*sx]) &&
+<a name="l02494"></a>02494 (pimg[i+j*sx]>(sky_bkg+kappa*sky_std))) {
+<a name="l02495"></a>02495 tot+=(double)pimg[i+j*sx];
+<a name="l02496"></a>02496 k++;
+<a name="l02497"></a>02497 }
+<a name="l02498"></a>02498 }
+<a name="l02499"></a>02499 }
+<a name="l02500"></a>02500
+<a name="l02501"></a>02501 *f=(double)(tot-k*sky_bkg);
+<a name="l02502"></a>02502
+<a name="l02503"></a>02503 cleanup:
+<a name="l02504"></a>02504 sinfo_free_image(&timg);
+<a name="l02505"></a>02505
+<a name="l02506"></a>02506 <span class="keywordflow">if</span> (cpl_error_get_code() != CPL_ERROR_NONE) {
+<a name="l02507"></a>02507 <span class="keywordflow">return</span> cpl_error_get_code();
+<a name="l02508"></a>02508 } <span class="keywordflow">else</span> {
+<a name="l02509"></a>02509 <span class="keywordflow">return</span> CPL_ERROR_NONE;
+<a name="l02510"></a>02510 }
+<a name="l02511"></a>02511
+<a name="l02512"></a>02512 }
+<a name="l02513"></a>02513
<a name="l02514"></a>02514
<a name="l02515"></a>02515
-<a name="l02516"></a>02516
-<a name="l02517"></a>02517 <span class="comment">/*</span>
-<a name="l02518"></a>02518 <span class="comment">cpl_error_code</span>
-<a name="l02519"></a>02519 <span class="comment">sinfo_get_centroid(const cpl_image* img,</span>
-<a name="l02520"></a>02520 <span class="comment"> const int d,</span>
-<a name="l02521"></a>02521 <span class="comment"> const double xc,</span>
-<a name="l02522"></a>02522 <span class="comment"> const double yc,</span>
-<a name="l02523"></a>02523 <span class="comment"> double* xcen,</span>
-<a name="l02524"></a>02524 <span class="comment"> double* ycen,</span>
-<a name="l02525"></a>02525 <span class="comment"> double* xfwhm,</span>
-<a name="l02526"></a>02526 <span class="comment"> double* yfwhm,</span>
-<a name="l02527"></a>02527 <span class="comment"> double* angle)</span>
-<a name="l02528"></a>02528 <span class="comment">{</span>
-<a name="l02529"></a>02529 <span class="comment"></span>
-<a name="l02530"></a>02530 <span class="comment"> cpl_bivector* q=NULL;</span>
-<a name="l02531"></a>02531 <span class="comment"> int sx=0;</span>
-<a name="l02532"></a>02532 <span class="comment"> int sy=0;</span>
-<a name="l02533"></a>02533 <span class="comment"> double* pq=NULL;</span>
-<a name="l02534"></a>02534 <span class="comment"> double peak=0;</span>
-<a name="l02535"></a>02535 <span class="comment"> double bkg=0;</span>
-<a name="l02536"></a>02536 <span class="comment"></span>
-<a name="l02537"></a>02537 <span class="comment"> check_nomsg(sx=cpl_image_get_size_x(img));</span>
-<a name="l02538"></a>02538 <span class="comment"> check_nomsg(sy=cpl_image_get_size_y(img));</span>
-<a name="l02539"></a>02539 <span class="comment"></span>
-<a name="l02540"></a>02540 <span class="comment"> check_nomsg(q=cpl_image_iqe(img,sx/2-d,sy/2-d,sx/2+d,sy/2+d));</span>
-<a name="l02541"></a>02541 <span class="comment"> pq=cpl_bivector_get_data(q);</span>
-<a name="l02542"></a>02542 <span class="comment"></span>
-<a name="l02543"></a>02543 <span class="comment"> *xcen=pq[0];</span>
-<a name="l02544"></a>02544 <span class="comment"> *ycen=pq[1];</span>
-<a name="l02545"></a>02545 <span class="comment"> *xfwhm=pq[2];</span>
-<a name="l02546"></a>02546 <span class="comment"> *yfwhm=pq[3];</span>
-<a name="l02547"></a>02547 <span class="comment"> *angle=pq[4];</span>
-<a name="l02548"></a>02548 <span class="comment"> peak=pq[5];</span>
-<a name="l02549"></a>02549 <span class="comment"> bkg=pq[6];</span>
+<a name="l02516"></a>02516 <span class="comment">/*</span>
+<a name="l02517"></a>02517 <span class="comment">cpl_error_code</span>
+<a name="l02518"></a>02518 <span class="comment">sinfo_get_centroid(const cpl_image* img,</span>
+<a name="l02519"></a>02519 <span class="comment"> const int d,</span>
+<a name="l02520"></a>02520 <span class="comment"> const double xc,</span>
+<a name="l02521"></a>02521 <span class="comment"> const double yc,</span>
+<a name="l02522"></a>02522 <span class="comment"> double* xcen,</span>
+<a name="l02523"></a>02523 <span class="comment"> double* ycen,</span>
+<a name="l02524"></a>02524 <span class="comment"> double* xfwhm,</span>
+<a name="l02525"></a>02525 <span class="comment"> double* yfwhm,</span>
+<a name="l02526"></a>02526 <span class="comment"> double* angle)</span>
+<a name="l02527"></a>02527 <span class="comment">{</span>
+<a name="l02528"></a>02528 <span class="comment"></span>
+<a name="l02529"></a>02529 <span class="comment"> cpl_bivector* q=NULL;</span>
+<a name="l02530"></a>02530 <span class="comment"> int sx=0;</span>
+<a name="l02531"></a>02531 <span class="comment"> int sy=0;</span>
+<a name="l02532"></a>02532 <span class="comment"> double* pq=NULL;</span>
+<a name="l02533"></a>02533 <span class="comment"> double peak=0;</span>
+<a name="l02534"></a>02534 <span class="comment"> double bkg=0;</span>
+<a name="l02535"></a>02535 <span class="comment"></span>
+<a name="l02536"></a>02536 <span class="comment"> check_nomsg(sx=cpl_image_get_size_x(img));</span>
+<a name="l02537"></a>02537 <span class="comment"> check_nomsg(sy=cpl_image_get_size_y(img));</span>
+<a name="l02538"></a>02538 <span class="comment"></span>
+<a name="l02539"></a>02539 <span class="comment"> check_nomsg(q=cpl_image_iqe(img,sx/2-d,sy/2-d,sx/2+d,sy/2+d));</span>
+<a name="l02540"></a>02540 <span class="comment"> pq=cpl_bivector_get_data(q);</span>
+<a name="l02541"></a>02541 <span class="comment"></span>
+<a name="l02542"></a>02542 <span class="comment"> *xcen=pq[0];</span>
+<a name="l02543"></a>02543 <span class="comment"> *ycen=pq[1];</span>
+<a name="l02544"></a>02544 <span class="comment"> *xfwhm=pq[2];</span>
+<a name="l02545"></a>02545 <span class="comment"> *yfwhm=pq[3];</span>
+<a name="l02546"></a>02546 <span class="comment"> *angle=pq[4];</span>
+<a name="l02547"></a>02547 <span class="comment"> peak=pq[5];</span>
+<a name="l02548"></a>02548 <span class="comment"> bkg=pq[6];</span>
+<a name="l02549"></a>02549 <span class="comment"></span>
<a name="l02550"></a>02550 <span class="comment"></span>
-<a name="l02551"></a>02551 <span class="comment"></span>
-<a name="l02552"></a>02552 <span class="comment"> cleanup:</span>
-<a name="l02553"></a>02553 <span class="comment"></span>
-<a name="l02554"></a>02554 <span class="comment"> sinfo_free_bivector(&q);</span>
-<a name="l02555"></a>02555 <span class="comment"></span>
-<a name="l02556"></a>02556 <span class="comment"> if (cpl_error_get_code() != CPL_ERROR_NONE) {</span>
-<a name="l02557"></a>02557 <span class="comment"> return cpl_error_get_code();</span>
-<a name="l02558"></a>02558 <span class="comment"> } else {</span>
-<a name="l02559"></a>02559 <span class="comment"> return CPL_ERROR_NONE;</span>
-<a name="l02560"></a>02560 <span class="comment"> }</span>
-<a name="l02561"></a>02561 <span class="comment"></span>
-<a name="l02562"></a>02562 <span class="comment">}</span>
-<a name="l02563"></a>02563 <span class="comment">*/</span>
+<a name="l02551"></a>02551 <span class="comment"> cleanup:</span>
+<a name="l02552"></a>02552 <span class="comment"></span>
+<a name="l02553"></a>02553 <span class="comment"> sinfo_free_bivector(&q);</span>
+<a name="l02554"></a>02554 <span class="comment"></span>
+<a name="l02555"></a>02555 <span class="comment"> if (cpl_error_get_code() != CPL_ERROR_NONE) {</span>
+<a name="l02556"></a>02556 <span class="comment"> return cpl_error_get_code();</span>
+<a name="l02557"></a>02557 <span class="comment"> } else {</span>
+<a name="l02558"></a>02558 <span class="comment"> return CPL_ERROR_NONE;</span>
+<a name="l02559"></a>02559 <span class="comment"> }</span>
+<a name="l02560"></a>02560 <span class="comment"></span>
+<a name="l02561"></a>02561 <span class="comment">}</span>
+<a name="l02562"></a>02562 <span class="comment">*/</span>
+<a name="l02563"></a>02563
<a name="l02564"></a>02564
<a name="l02565"></a>02565
-<a name="l02566"></a>02566
-<a name="l02567"></a>02567 <span class="keyword">static</span> <span class="keywordtype">double</span>
-<a name="l02568"></a>02568 sinfo_find_min_of_four(<span class="keyword">const</span> <span class="keywordtype">double</span> n1,
-<a name="l02569"></a>02569 <span class="keyword">const</span> <span class="keywordtype">double</span> n2,
-<a name="l02570"></a>02570 <span class="keyword">const</span> <span class="keywordtype">double</span> n3,
-<a name="l02571"></a>02571 <span class="keyword">const</span> <span class="keywordtype">double</span> n4)
-<a name="l02572"></a>02572 {
-<a name="l02573"></a>02573 <span class="keywordtype">double</span> min=0;
-<a name="l02574"></a>02574 min = (n1 < n2) ? n1 : n2;
-<a name="l02575"></a>02575 min = (min < n3) ? min : n3;
-<a name="l02576"></a>02576 min = (min < n4) ? min : n4;
-<a name="l02577"></a>02577 <span class="keywordflow">return</span> min;
-<a name="l02578"></a>02578 }
-<a name="l02579"></a>02579
-<a name="l02580"></a>02580 <span class="keywordtype">double</span>
-<a name="l02581"></a>02581 sinfo_scale_flux(<span class="keyword">const</span> <span class="keywordtype">double</span> p1,
-<a name="l02582"></a>02582 <span class="keyword">const</span> <span class="keywordtype">double</span> p2,
-<a name="l02583"></a>02583 <span class="keyword">const</span> <span class="keywordtype">double</span> t1,
-<a name="l02584"></a>02584 <span class="keyword">const</span> <span class="keywordtype">double</span> t2)
-<a name="l02585"></a>02585 {
-<a name="l02586"></a>02586
-<a name="l02587"></a>02587 <span class="keywordflow">return</span> (p2/p1)*(p2/p1)*(t2/t1);
-<a name="l02588"></a>02588
-<a name="l02589"></a>02589 }
+<a name="l02566"></a>02566 <span class="keyword">static</span> <span class="keywordtype">double</span>
+<a name="l02567"></a>02567 sinfo_find_min_of_four(<span class="keyword">const</span> <span class="keywordtype">double</span> n1,
+<a name="l02568"></a>02568 <span class="keyword">const</span> <span class="keywordtype">double</span> n2,
+<a name="l02569"></a>02569 <span class="keyword">const</span> <span class="keywordtype">double</span> n3,
+<a name="l02570"></a>02570 <span class="keyword">const</span> <span class="keywordtype">double</span> n4)
+<a name="l02571"></a>02571 {
+<a name="l02572"></a>02572 <span class="keywordtype">double</span> min=0;
+<a name="l02573"></a>02573 min = (n1 < n2) ? n1 : n2;
+<a name="l02574"></a>02574 min = (min < n3) ? min : n3;
+<a name="l02575"></a>02575 min = (min < n4) ? min : n4;
+<a name="l02576"></a>02576 <span class="keywordflow">return</span> min;
+<a name="l02577"></a>02577 }
+<a name="l02578"></a>02578
+<a name="l02579"></a>02579 <span class="keywordtype">double</span>
+<a name="l02580"></a>02580 sinfo_scale_flux(<span class="keyword">const</span> <span class="keywordtype">double</span> p1,
+<a name="l02581"></a>02581 <span class="keyword">const</span> <span class="keywordtype">double</span> p2,
+<a name="l02582"></a>02582 <span class="keyword">const</span> <span class="keywordtype">double</span> t1,
+<a name="l02583"></a>02583 <span class="keyword">const</span> <span class="keywordtype">double</span> t2)
+<a name="l02584"></a>02584 {
+<a name="l02585"></a>02585
+<a name="l02586"></a>02586 <span class="keywordflow">return</span> (p2/p1)*(p2/p1)*(t2/t1);
+<a name="l02587"></a>02587
+<a name="l02588"></a>02588 }
+<a name="l02589"></a>02589
<a name="l02590"></a>02590
-<a name="l02591"></a>02591
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__psf_8h_source.html b/html/sinfo__new__psf_8h_source.html
index f755a25..e29f354 100644
--- a/html/sinfo__new__psf_8h_source.html
+++ b/html/sinfo__new__psf_8h_source.html
@@ -164,7 +164,7 @@
<a name="l00154"></a>00154 <span class="preprocessor"></span>
<a name="l00155"></a>00155 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__resampling_8c_source.html b/html/sinfo__new__resampling_8c_source.html
index 6bfccb6..a4e230a 100644
--- a/html/sinfo__new__resampling_8c_source.html
+++ b/html/sinfo__new__resampling_8c_source.html
@@ -445,7 +445,7 @@
<a name="l00553"></a>00553 return ;
<a name="l00554"></a>00554 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__resampling_8h_source.html b/html/sinfo__new__resampling_8h_source.html
index ee18479..3a1e5e2 100644
--- a/html/sinfo__new__resampling_8h_source.html
+++ b/html/sinfo__new__resampling_8h_source.html
@@ -128,7 +128,7 @@
<a name="l00208"></a>00208
<a name="l00209"></a>00209 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__slit__pos_8c_source.html b/html/sinfo__new__slit__pos_8c_source.html
index 20ac143..fb31058 100644
--- a/html/sinfo__new__slit__pos_8c_source.html
+++ b/html/sinfo__new__slit__pos_8c_source.html
@@ -727,7 +727,7 @@
<a name="l00724"></a>00724 }
<a name="l00725"></a>00725
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__slit__pos_8h_source.html b/html/sinfo__new__slit__pos_8h_source.html
index 40a143b..b817500 100644
--- a/html/sinfo__new__slit__pos_8h_source.html
+++ b/html/sinfo__new__slit__pos_8h_source.html
@@ -139,7 +139,7 @@
<a name="l00129"></a>00129 <span class="preprocessor"></span>
<a name="l00130"></a>00130 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__stdstar_8c_source.html b/html/sinfo__new__stdstar_8c_source.html
index feb4159..3c3afcd 100644
--- a/html/sinfo__new__stdstar_8c_source.html
+++ b/html/sinfo__new__stdstar_8c_source.html
@@ -661,7 +661,7 @@
<a name="l00658"></a>00658
<a name="l00659"></a>00659
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__stdstar_8h_source.html b/html/sinfo__new__stdstar_8h_source.html
index 717e651..3b13019 100644
--- a/html/sinfo__new__stdstar_8h_source.html
+++ b/html/sinfo__new__stdstar_8h_source.html
@@ -77,7 +77,7 @@
<a name="l00067"></a>00067 <span class="preprocessor">#endif </span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__wave__cal__slit2_8c_source.html b/html/sinfo__new__wave__cal__slit2_8c_source.html
index 35c9353..918393e 100644
--- a/html/sinfo__new__wave__cal__slit2_8c_source.html
+++ b/html/sinfo__new__wave__cal__slit2_8c_source.html
@@ -856,7 +856,7 @@
<a name="l00908"></a>00908
<a name="l00909"></a>00909 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__new__wave__cal__slit2_8h_source.html b/html/sinfo__new__wave__cal__slit2_8h_source.html
index 8318ed9..f3455cd 100644
--- a/html/sinfo__new__wave__cal__slit2_8h_source.html
+++ b/html/sinfo__new__wave__cal__slit2_8h_source.html
@@ -142,7 +142,7 @@
<a name="l00132"></a>00132 <span class="preprocessor"></span>
<a name="l00133"></a>00133 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__north__south__test__config_8c_source.html b/html/sinfo__north__south__test__config_8c_source.html
index 6bd3929..711fa43 100644
--- a/html/sinfo__north__south__test__config_8c_source.html
+++ b/html/sinfo__north__south__test__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 09:50:08 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -157,7 +157,7 @@
<a name="l00161"></a>00161
<a name="l00162"></a>00162 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__north__south__test__config_8h_source.html b/html/sinfo__north__south__test__config_8h_source.html
index 7c410f4..61d343a 100644
--- a/html/sinfo__north__south__test__config_8h_source.html
+++ b/html/sinfo__north__south__test__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -43,7 +43,7 @@
<a name="l00033"></a>00033 sinfo_north_south_test_config_add(cpl_parameterlist *list);
<a name="l00034"></a>00034
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ns__cfg_8c_source.html b/html/sinfo__ns__cfg_8c_source.html
index 84306f4..1679634 100644
--- a/html/sinfo__ns__cfg_8c_source.html
+++ b/html/sinfo__ns__cfg_8c_source.html
@@ -83,7 +83,7 @@
<a name="l00080"></a>00080 }
<a name="l00081"></a>00081
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ns__cfg_8h_source.html b/html/sinfo__ns__cfg_8h_source.html
index cde4550..f23aa40 100644
--- a/html/sinfo__ns__cfg_8h_source.html
+++ b/html/sinfo__ns__cfg_8h_source.html
@@ -113,7 +113,7 @@
<a name="l00117"></a>00117
<a name="l00118"></a>00118 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ns__ini_8h_source.html b/html/sinfo__ns__ini_8h_source.html
index 732a642..99eaae5 100644
--- a/html/sinfo__ns__ini_8h_source.html
+++ b/html/sinfo__ns__ini_8h_source.html
@@ -60,7 +60,7 @@
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ns__ini__by__cpl_8c_source.html b/html/sinfo__ns__ini__by__cpl_8c_source.html
index 1910e38..8dc16cd 100644
--- a/html/sinfo__ns__ini__by__cpl_8c_source.html
+++ b/html/sinfo__ns__ini__by__cpl_8c_source.html
@@ -353,7 +353,7 @@
<a name="l00362"></a>00362
<a name="l00363"></a>00363 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ns__ini__by__cpl_8h_source.html b/html/sinfo__ns__ini__by__cpl_8h_source.html
index 6f9786f..d1653a2 100644
--- a/html/sinfo__ns__ini__by__cpl_8h_source.html
+++ b/html/sinfo__ns__ini__by__cpl_8h_source.html
@@ -60,7 +60,7 @@
<a name="l00068"></a>00068 <span class="keywordtype">void</span> sinfo_ns_free(ns_config ** cfg);
<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__object__cfg_8c_source.html b/html/sinfo__object__cfg_8c_source.html
index e53bbeb..d8ee3f1 100644
--- a/html/sinfo__object__cfg_8c_source.html
+++ b/html/sinfo__object__cfg_8c_source.html
@@ -84,7 +84,7 @@
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__object__cfg_8h_source.html b/html/sinfo__object__cfg_8h_source.html
index a5d5ecb..9b53b0b 100644
--- a/html/sinfo__object__cfg_8h_source.html
+++ b/html/sinfo__object__cfg_8h_source.html
@@ -155,7 +155,7 @@
<a name="l00158"></a>00158
<a name="l00159"></a>00159 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__object__ini_8h_source.html b/html/sinfo__object__ini_8h_source.html
index 376eb93..0fb5b6a 100644
--- a/html/sinfo__object__ini_8h_source.html
+++ b/html/sinfo__object__ini_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objnod__config_8c_source.html b/html/sinfo__objnod__config_8c_source.html
index 6fe3e2f..5372694 100644
--- a/html/sinfo__objnod__config_8c_source.html
+++ b/html/sinfo__objnod__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 09:50:08 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.11 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -407,7 +407,7 @@
<a name="l00410"></a>00410
<a name="l00411"></a>00411 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objnod__config_8h_source.html b/html/sinfo__objnod__config_8h_source.html
index e5b005b..c81ee15 100644
--- a/html/sinfo__objnod__config_8h_source.html
+++ b/html/sinfo__objnod__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -41,7 +41,7 @@
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keywordtype">void</span> sinfo_objnod_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objnod__ini__by__cpl_8c_source.html b/html/sinfo__objnod__ini__by__cpl_8c_source.html
index 89110be..9ac5aff 100644
--- a/html/sinfo__objnod__ini__by__cpl_8c_source.html
+++ b/html/sinfo__objnod__ini__by__cpl_8c_source.html
@@ -414,7 +414,7 @@
<a name="l00423"></a>00423 <span class="keywordflow">return</span>;
<a name="l00424"></a>00424 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objnod__ini__by__cpl_8h_source.html b/html/sinfo__objnod__ini__by__cpl_8h_source.html
index b7590f3..ad4078f 100644
--- a/html/sinfo__objnod__ini__by__cpl_8h_source.html
+++ b/html/sinfo__objnod__ini__by__cpl_8h_source.html
@@ -58,7 +58,7 @@
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objspider__config_8c_source.html b/html/sinfo__objspider__config_8c_source.html
index 2a97b90..b3763c1 100644
--- a/html/sinfo__objspider__config_8c_source.html
+++ b/html/sinfo__objspider__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 09:50:08 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -307,7 +307,7 @@
<a name="l00311"></a>00311
<a name="l00312"></a>00312 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objspider__config_8h_source.html b/html/sinfo__objspider__config_8h_source.html
index 1659a4f..02f8c6b 100644
--- a/html/sinfo__objspider__config_8h_source.html
+++ b/html/sinfo__objspider__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:32 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -42,7 +42,7 @@
<a name="l00032"></a>00032 <span class="keywordtype">void</span>
<a name="l00033"></a>00033 sinfo_objspider_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objspider__ini__by__cpl_8c_source.html b/html/sinfo__objspider__ini__by__cpl_8c_source.html
index 0ee80e4..a01166d 100644
--- a/html/sinfo__objspider__ini__by__cpl_8c_source.html
+++ b/html/sinfo__objspider__ini__by__cpl_8c_source.html
@@ -387,7 +387,7 @@
<a name="l00396"></a>00396 <span class="keywordflow">return</span>;
<a name="l00397"></a>00397 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__objspider__ini__by__cpl_8h_source.html b/html/sinfo__objspider__ini__by__cpl_8h_source.html
index 33316f5..da13060 100644
--- a/html/sinfo__objspider__ini__by__cpl_8h_source.html
+++ b/html/sinfo__objspider__ini__by__cpl_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pfits_8c_source.html b/html/sinfo__pfits_8c_source.html
index b203cc5..b86afef 100644
--- a/html/sinfo__pfits_8c_source.html
+++ b/html/sinfo__pfits_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/04 08:11:07 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.14 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -736,7 +736,7 @@
<a name="l01074"></a>01074 }
<a name="l01075"></a>01075
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pfits_8h_source.html b/html/sinfo__pfits_8h_source.html
index 84e9e0c..f72203d 100644
--- a/html/sinfo__pfits_8h_source.html
+++ b/html/sinfo__pfits_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/22 15:26:10 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_PFITS_H</span>
@@ -136,7 +136,7 @@
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pixel__handling_8c_source.html b/html/sinfo__pixel__handling_8c_source.html
index ad3e779..c3197d3 100644
--- a/html/sinfo__pixel__handling_8c_source.html
+++ b/html/sinfo__pixel__handling_8c_source.html
@@ -129,7 +129,7 @@
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#undef PIX_SWAP</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pixel__handling_8h_source.html b/html/sinfo__pixel__handling_8h_source.html
index df211ba..9456d6c 100644
--- a/html/sinfo__pixel__handling_8h_source.html
+++ b/html/sinfo__pixel__handling_8h_source.html
@@ -54,7 +54,7 @@
<a name="l00056"></a>00056 sinfo_pixel_qsort(pixelvalue *pix_arr, <span class="keywordtype">int</span> npix) ;
<a name="l00057"></a>00057 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__poly2d_8c_source.html b/html/sinfo__poly2d_8c_source.html
index 31c23ad..ca1ca1b 100644
--- a/html/sinfo__poly2d_8c_source.html
+++ b/html/sinfo__poly2d_8c_source.html
@@ -65,7 +65,7 @@
<a name="l00077"></a>00077 <span class="keywordflow">return</span> z ;
<a name="l00078"></a>00078 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__poly2d_8h_source.html b/html/sinfo__poly2d_8h_source.html
index a79e447..245559c 100644
--- a/html/sinfo__poly2d_8h_source.html
+++ b/html/sinfo__poly2d_8h_source.html
@@ -83,7 +83,7 @@
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__prepare__stacked__frames__config_8c_source.html b/html/sinfo__prepare__stacked__frames__config_8c_source.html
index e58dedb..cc526da 100644
--- a/html/sinfo__prepare__stacked__frames__config_8c_source.html
+++ b/html/sinfo__prepare__stacked__frames__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2008/02/27 15:10:05 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/**************************************************************************</span>
@@ -352,7 +352,7 @@
<a name="l00355"></a>00355
<a name="l00356"></a>00356 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__prepare__stacked__frames__config_8h_source.html b/html/sinfo__prepare__stacked__frames__config_8h_source.html
index 5830aeb..87b0024 100644
--- a/html/sinfo__prepare__stacked__frames__config_8h_source.html
+++ b/html/sinfo__prepare__stacked__frames__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -42,7 +42,7 @@
<a name="l00032"></a>00032 <span class="keywordtype">void</span>
<a name="l00033"></a>00033 sinfo_prepare_stacked_frames_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pro__save_8c_source.html b/html/sinfo__pro__save_8c_source.html
index d5d6f6a..bdbfa36 100644
--- a/html/sinfo__pro__save_8c_source.html
+++ b/html/sinfo__pro__save_8c_source.html
@@ -1042,7 +1042,7 @@
<a name="l01143"></a>01143
<a name="l01144"></a>01144
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pro__save_8h_source.html b/html/sinfo__pro__save_8h_source.html
index 05903f6..f536c83 100644
--- a/html/sinfo__pro__save_8h_source.html
+++ b/html/sinfo__pro__save_8h_source.html
@@ -221,7 +221,7 @@
<a name="l00326"></a>00326
<a name="l00327"></a>00327 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_PRO_SAVE */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__pro__types_8h_source.html b/html/sinfo__pro__types_8h_source.html
index 7ba4a33..d891c67 100644
--- a/html/sinfo__pro__types_8h_source.html
+++ b/html/sinfo__pro__types_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2010/02/12 17:57:38 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.10 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_PRO_TYPES_H</span>
@@ -200,7 +200,7 @@
<a name="l00190"></a>00190 <span class="preprocessor"></span>CPL_END_DECLS
<a name="l00191"></a>00191 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__product__config_8c_source.html b/html/sinfo__product__config_8c_source.html
index 41717d5..9b09d10 100644
--- a/html/sinfo__product__config_8c_source.html
+++ b/html/sinfo__product__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 09:50:08 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -74,7 +74,7 @@
<a name="l00082"></a>00082
<a name="l00083"></a>00083 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__product__config_8h_source.html b/html/sinfo__product__config_8h_source.html
index f61d2f2..8e55020 100644
--- a/html/sinfo__product__config_8h_source.html
+++ b/html/sinfo__product__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__cfg_8c_source.html b/html/sinfo__psf__cfg_8c_source.html
index 156d9f2..b42f232 100644
--- a/html/sinfo__psf__cfg_8c_source.html
+++ b/html/sinfo__psf__cfg_8c_source.html
@@ -81,7 +81,7 @@
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__cfg_8h_source.html b/html/sinfo__psf__cfg_8h_source.html
index f1534cc..1355bb3 100644
--- a/html/sinfo__psf__cfg_8h_source.html
+++ b/html/sinfo__psf__cfg_8h_source.html
@@ -101,7 +101,7 @@
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__config_8c_source.html b/html/sinfo__psf__config_8c_source.html
index b793264..952c691 100644
--- a/html/sinfo__psf__config_8c_source.html
+++ b/html/sinfo__psf__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 09:50:08 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -67,7 +67,7 @@
<a name="l00071"></a>00071
<a name="l00072"></a>00072 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__config_8h_source.html b/html/sinfo__psf__config_8h_source.html
index d28365e..9af00b1 100644
--- a/html/sinfo__psf__config_8h_source.html
+++ b/html/sinfo__psf__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -41,7 +41,7 @@
<a name="l00031"></a>00031 <span class="keywordtype">void</span>
<a name="l00032"></a>00032 sinfo_psf_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__ini_8h_source.html b/html/sinfo__psf__ini_8h_source.html
index 5b76cdb..44ba3ff 100644
--- a/html/sinfo__psf__ini_8h_source.html
+++ b/html/sinfo__psf__ini_8h_source.html
@@ -56,7 +56,7 @@
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__ini__by__cpl_8c_source.html b/html/sinfo__psf__ini__by__cpl_8c_source.html
index 9509a3b..26c55c9 100644
--- a/html/sinfo__psf__ini__by__cpl_8c_source.html
+++ b/html/sinfo__psf__ini__by__cpl_8c_source.html
@@ -198,7 +198,7 @@
<a name="l00206"></a>00206 <span class="keywordflow">return</span>;
<a name="l00207"></a>00207 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__psf__ini__by__cpl_8h_source.html b/html/sinfo__psf__ini__by__cpl_8h_source.html
index e45445d..19d7c09 100644
--- a/html/sinfo__psf__ini__by__cpl_8h_source.html
+++ b/html/sinfo__psf__ini__by__cpl_8h_source.html
@@ -52,7 +52,7 @@
<a name="l00062"></a>00062 sinfo_free_psf(psf_config ** cfg);
<a name="l00063"></a>00063 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__qr_8c_source.html b/html/sinfo__qr_8c_source.html
index 982ee7b..0358070 100644
--- a/html/sinfo__qr_8c_source.html
+++ b/html/sinfo__qr_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
@@ -270,7 +270,7 @@
<a name="l00268"></a>00268 <span class="keywordflow">goto</span> next_iteration;
<a name="l00269"></a>00269 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__raw__types_8h_source.html b/html/sinfo__raw__types_8h_source.html
index 9a1ce58..ca4d050 100644
--- a/html/sinfo__raw__types_8h_source.html
+++ b/html/sinfo__raw__types_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/07/04 13:06:02 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_RAW_TYPES_H</span>
@@ -122,7 +122,7 @@
<a name="l00112"></a>00112
<a name="l00113"></a>00113 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__detlin_8c_source.html b/html/sinfo__rec__detlin_8c_source.html
index 83d66f1..f85ee12 100644
--- a/html/sinfo__rec__detlin_8c_source.html
+++ b/html/sinfo__rec__detlin_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/04 17:23:02 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.21 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00031"></a>00031 <span class="comment">/*---------------------------------------------------------------------------*/</span>
@@ -261,7 +261,7 @@
<a name="l00301"></a>00301 }
<a name="l00302"></a>00302
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__distortion_8c_source.html b/html/sinfo__rec__distortion_8c_source.html
index a8199d3..cd4674b 100644
--- a/html/sinfo__rec__distortion_8c_source.html
+++ b/html/sinfo__rec__distortion_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/11/16 13:36:19 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.42 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -821,7 +821,7 @@
<a name="l00846"></a>00846 <span class="keywordflow">return</span> 0;
<a name="l00847"></a>00847 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__jitter_8c_source.html b/html/sinfo__rec__jitter_8c_source.html
index d928772..82cfbb4 100644
--- a/html/sinfo__rec__jitter_8c_source.html
+++ b/html/sinfo__rec__jitter_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: kmirny $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2009/10/20 14:32:56 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.33 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -359,7 +359,7 @@
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__lingain_8c_source.html b/html/sinfo__rec__lingain_8c_source.html
index a855cef..ce2573b 100644
--- a/html/sinfo__rec__lingain_8c_source.html
+++ b/html/sinfo__rec__lingain_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:38:03 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.22 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -176,7 +176,7 @@
<a name="l00170"></a>00170 }
<a name="l00171"></a>00171
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__mdark_8c_source.html b/html/sinfo__rec__mdark_8c_source.html
index b518bcc..a6f4a35 100644
--- a/html/sinfo__rec__mdark_8c_source.html
+++ b/html/sinfo__rec__mdark_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/28 10:36:10 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.22 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -417,7 +417,7 @@
<a name="l00442"></a>00442 }
<a name="l00443"></a>00443
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__mdark__detmon_8c_source.html b/html/sinfo__rec__mdark__detmon_8c_source.html
index 51b8bfb..dba407b 100644
--- a/html/sinfo__rec__mdark__detmon_8c_source.html
+++ b/html/sinfo__rec__mdark__detmon_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/01/12 11:53:24 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include <config.h></span>
@@ -96,7 +96,7 @@
<a name="l00086"></a>00086 <span class="keywordflow">return</span> CPL_ERROR_NONE;
<a name="l00087"></a>00087 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__mflat_8c_source.html b/html/sinfo__rec__mflat_8c_source.html
index 7916662..548ab21 100644
--- a/html/sinfo__rec__mflat_8c_source.html
+++ b/html/sinfo__rec__mflat_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2008/02/05 08:13:05 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.22 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -289,7 +289,7 @@
<a name="l00314"></a>00314 }
<a name="l00315"></a>00315
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__objnod_8c_source.html b/html/sinfo__rec__objnod_8c_source.html
index c06181b..41cefa7 100644
--- a/html/sinfo__rec__objnod_8c_source.html
+++ b/html/sinfo__rec__objnod_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.24 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -292,7 +292,7 @@
<a name="l00317"></a>00317
<a name="l00318"></a>00318 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__psf_8c_source.html b/html/sinfo__rec__psf_8c_source.html
index ad08f8f..8352d32 100644
--- a/html/sinfo__rec__psf_8c_source.html
+++ b/html/sinfo__rec__psf_8c_source.html
@@ -33,7 +33,7 @@
<a name="l00023"></a>00023 <span class="comment"> * $Author: amodigli $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Date: 2008/02/12 14:56:50 $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Revision: 1.22 $</span>
-<a name="l00026"></a>00026 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00026"></a>00026 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00027"></a>00027 <span class="comment"> */</span>
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="comment">/****************************************************************</span>
@@ -300,7 +300,7 @@
<a name="l00325"></a>00325
<a name="l00326"></a>00326 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__pupil_8c_source.html b/html/sinfo__rec__pupil_8c_source.html
index c55725e..ac78f70 100644
--- a/html/sinfo__rec__pupil_8c_source.html
+++ b/html/sinfo__rec__pupil_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/12 14:56:50 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.17 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -273,7 +273,7 @@
<a name="l00298"></a>00298
<a name="l00299"></a>00299 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__stdstar_8c_source.html b/html/sinfo__rec__stdstar_8c_source.html
index 371c783..7139c9a 100644
--- a/html/sinfo__rec__stdstar_8c_source.html
+++ b/html/sinfo__rec__stdstar_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/12 14:56:50 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.22 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -309,7 +309,7 @@
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__utils_8c_source.html b/html/sinfo__rec__utils_8c_source.html
index 29150e0..0c2578e 100644
--- a/html/sinfo__rec__utils_8c_source.html
+++ b/html/sinfo__rec__utils_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.14 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -1374,7 +1374,7 @@
<a name="l01368"></a>01368 <span class="comment">}</span>
<a name="l01369"></a>01369 <span class="comment">*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__utils_8h_source.html b/html/sinfo__rec__utils_8h_source.html
index 9eb6e68..04bbb1e 100644
--- a/html/sinfo__rec__utils_8h_source.html
+++ b/html/sinfo__rec__utils_8h_source.html
@@ -34,7 +34,7 @@
<a name="l00024"></a>00024 <span class="comment"> * $Author: amodigli $</span>
<a name="l00025"></a>00025 <span class="comment"> * $Date: 2007/06/06 07:10:45 $</span>
<a name="l00026"></a>00026 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00027"></a>00027 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00027"></a>00027 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00028"></a>00028 <span class="comment"> */</span>
<a name="l00029"></a>00029
<a name="l00030"></a>00030 <span class="comment">/****************************************************************</span>
@@ -117,7 +117,7 @@
<a name="l00107"></a>00107 <span class="keyword">const</span> <span class="keywordtype">char</span>* plugin_id);
<a name="l00108"></a>00108 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__rec__wavecal_8c_source.html b/html/sinfo__rec__wavecal_8c_source.html
index 228ff48..2aaac95 100644
--- a/html/sinfo__rec__wavecal_8c_source.html
+++ b/html/sinfo__rec__wavecal_8c_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>sinfo_rec_wavecal.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_rec_wavecal.c,v 1.30 2009/09/02 12:00:56 kmirny Exp $</span>
+<h1>sinfo_rec_wavecal.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_rec_wavecal.c,v 1.31 2012/09/17 09:06:39 amodigli Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the SINFONI Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -29,10 +29,10 @@
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * $Author: kmirny $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/09/02 12:00:56 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.30 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/09/17 09:06:39 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.31 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -281,7 +281,7 @@
<a name="l00306"></a>00306 check_nomsg(p=cpl_parameterlist_find(config,
<a name="l00307"></a>00307 <span class="stringliteral">"sinfoni.wavecal.slitpos_boostrap"</span>));
<a name="l00308"></a>00308 check_nomsg(sw=cpl_parameter_get_bool(p));
-<a name="l00309"></a>00309 <span class="keywordflow">if</span>( (sw == 1) ) {
+<a name="l00309"></a>00309 <span class="keywordflow">if</span>( sw == 1 ) {
<a name="l00310"></a>00310 check_nomsg(wrk_set=cpl_frameset_duplicate(<span class="keyword">set</span>));
<a name="l00311"></a>00311
<a name="l00312"></a>00312 check_nomsg(p=cpl_parameterlist_find(config,<span class="stringliteral">"sinfoni.stacked.ind_index"</span>));
@@ -422,7 +422,7 @@
<a name="l00447"></a>00447
<a name="l00448"></a>00448 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__recipes_8c_source.html b/html/sinfo__recipes_8c_source.html
index c527090..05295ce 100644
--- a/html/sinfo__recipes_8c_source.html
+++ b/html/sinfo__recipes_8c_source.html
@@ -1250,7 +1250,7 @@
<a name="l01514"></a>01514
<a name="l01515"></a>01515 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__recipes_8h_source.html b/html/sinfo__recipes_8h_source.html
index 8e23a33..4a2c011 100644
--- a/html/sinfo__recipes_8h_source.html
+++ b/html/sinfo__recipes_8h_source.html
@@ -156,7 +156,7 @@
<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
<a name="l00303"></a>00303
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__ref__types_8h_source.html b/html/sinfo__ref__types_8h_source.html
index 2722882..b646d2b 100644
--- a/html/sinfo__ref__types_8h_source.html
+++ b/html/sinfo__ref__types_8h_source.html
@@ -8,7 +8,7 @@
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
-<h1>sinfo_ref_types.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_ref_types.h,v 1.4 2010/02/12 17:56:53 amodigli Exp $</span>
+<h1>sinfo_ref_types.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_ref_types.h,v 1.5 2012/08/10 07:55:23 amodigli Exp $</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the SINFONI Pipeline</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
@@ -30,9 +30,9 @@
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*</span>
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Date: 2010/02/12 17:56:53 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.4 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/08/10 07:55:23 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_REF_TYPES_H</span>
@@ -42,19 +42,20 @@
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="preprocessor">#define RAW_REF "REF"</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define REF_LINE_ARC "REF_LINE_ARC"</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define REF_BP_MAP "REF_BP_MAP"</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define REF_SLIT_POS "REF_SLIT_POS"</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define DRS_SETUP_WAVE "DRS_SETUP_WAVE"</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define EXTCOEFF_TABLE "EXTCOEFF_TABLE"</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define FLUX_STD_TABLE "FLUX_STD_TABLE"</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="comment">/* catalog of flux of standard stars*/</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#define FLUX_STD_CATALOG "FLUX_STD_CATALOG"</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span>
-<a name="l00043"></a>00043 CPL_END_DECLS
-<a name="l00044"></a>00044
-<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
+<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define REF_LINE_OH "REF_LINE_OH"</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define REF_BP_MAP "REF_BP_MAP"</span>
+<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define REF_SLIT_POS "REF_SLIT_POS"</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define DRS_SETUP_WAVE "DRS_SETUP_WAVE"</span>
+<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define EXTCOEFF_TABLE "EXTCOEFF_TABLE"</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define FLUX_STD_TABLE "FLUX_STD_TABLE"</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="comment">/* catalog of flux of standard stars*/</span>
+<a name="l00042"></a>00042 <span class="preprocessor">#define FLUX_STD_CATALOG "FLUX_STD_CATALOG"</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span>
+<a name="l00044"></a>00044 CPL_END_DECLS
+<a name="l00045"></a>00045
+<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__remove__crh__single_8c_source.html b/html/sinfo__remove__crh__single_8c_source.html
index f2d0664..751b50d 100644
--- a/html/sinfo__remove__crh__single_8c_source.html
+++ b/html/sinfo__remove__crh__single_8c_source.html
@@ -476,7 +476,7 @@
<a name="l00494"></a>00494 <span class="keywordflow">return</span> res_image;
<a name="l00495"></a>00495 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__remove__crh__single_8h_source.html b/html/sinfo__remove__crh__single_8h_source.html
index 544fdfb..6a5e209 100644
--- a/html/sinfo__remove__crh__single_8h_source.html
+++ b/html/sinfo__remove__crh__single_8h_source.html
@@ -16,7 +16,7 @@
<a name="l00006"></a>00006 <span class="keywordtype">double</span> gain,
<a name="l00007"></a>00007 <span class="keywordtype">double</span> ron);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__resampling_8c_source.html b/html/sinfo__resampling_8c_source.html
index 99e7bc1..db6391c 100644
--- a/html/sinfo__resampling_8c_source.html
+++ b/html/sinfo__resampling_8c_source.html
@@ -282,7 +282,7 @@
<a name="l00386"></a>00386 <span class="keywordflow">return</span> i_trans ;
<a name="l00387"></a>00387 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__resampling_8h_source.html b/html/sinfo__resampling_8h_source.html
index 9ee725d..0c379ed 100644
--- a/html/sinfo__resampling_8h_source.html
+++ b/html/sinfo__resampling_8h_source.html
@@ -94,7 +94,7 @@
<a name="l00156"></a>00156 sinfo_invert_linear_transform(<span class="keywordtype">double</span> *trans) ;
<a name="l00157"></a>00157 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__shift__images_8c_source.html b/html/sinfo__shift__images_8c_source.html
index d4dd1e8..2ddbd3a 100644
--- a/html/sinfo__shift__images_8c_source.html
+++ b/html/sinfo__shift__images_8c_source.html
@@ -742,7 +742,7 @@
<a name="l00788"></a>00788
<a name="l00789"></a>00789 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__shift__images_8h_source.html b/html/sinfo__shift__images_8h_source.html
index 819f434..9196245 100644
--- a/html/sinfo__shift__images_8h_source.html
+++ b/html/sinfo__shift__images_8h_source.html
@@ -90,7 +90,7 @@
<a name="l00133"></a>00133 <span class="preprocessor">#endif </span>
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__skycor_8c_source.html b/html/sinfo__skycor_8c_source.html
index a8cb022..b73f185 100644
--- a/html/sinfo__skycor_8c_source.html
+++ b/html/sinfo__skycor_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/04 08:11:35 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.50 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -6534,7 +6534,7 @@
<a name="l07232"></a>07232 }
<a name="l07233"></a>07233
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__skycor_8h_source.html b/html/sinfo__skycor_8h_source.html
index cdeb8f4..9e2bc7f 100644
--- a/html/sinfo__skycor_8h_source.html
+++ b/html/sinfo__skycor_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/03/05 07:21:54 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -116,7 +116,7 @@
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__skycor__config_8c_source.html b/html/sinfo__skycor__config_8c_source.html
index b8395b1..76a94c2 100644
--- a/html/sinfo__skycor__config_8c_source.html
+++ b/html/sinfo__skycor__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.17 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027
@@ -218,7 +218,7 @@
<a name="l00227"></a>00227
<a name="l00228"></a>00228 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__skycor__config_8h_source.html b/html/sinfo__skycor__config_8h_source.html
index 8d31bd0..1b90332 100644
--- a/html/sinfo__skycor__config_8h_source.html
+++ b/html/sinfo__skycor__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/11/27 16:55:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__solve__poly__root_8c_source.html b/html/sinfo__solve__poly__root_8c_source.html
index 4cf7868..cd193de 100644
--- a/html/sinfo__solve__poly__root_8c_source.html
+++ b/html/sinfo__solve__poly__root_8c_source.html
@@ -130,7 +130,7 @@
<a name="l00128"></a>00128 }
<a name="l00129"></a>00129
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__solve__poly__root_8h_source.html b/html/sinfo__solve__poly__root_8h_source.html
index 078a0a3..1ce87ec 100644
--- a/html/sinfo__solve__poly__root_8h_source.html
+++ b/html/sinfo__solve__poly__root_8h_source.html
@@ -86,7 +86,7 @@
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="preprocessor">#endif </span><span class="comment">/* SINFO_SOLVE_POLY_ROOT_H */</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__spectrum__ops_8c_source.html b/html/sinfo__spectrum__ops_8c_source.html
index bde50cf..b238732 100644
--- a/html/sinfo__spectrum__ops_8c_source.html
+++ b/html/sinfo__spectrum__ops_8c_source.html
@@ -2413,7 +2413,7 @@
<a name="l02672"></a>02672
<a name="l02673"></a>02673 <span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__spectrum__ops_8h_source.html b/html/sinfo__spectrum__ops_8h_source.html
index 0c047da..e3569b5 100644
--- a/html/sinfo__spectrum__ops_8h_source.html
+++ b/html/sinfo__spectrum__ops_8h_source.html
@@ -203,7 +203,7 @@
<a name="l00474"></a>00474
<a name="l00475"></a>00475 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__spiffi__types_8h_source.html b/html/sinfo__spiffi__types_8h_source.html
index e2fcff3..c8e624a 100644
--- a/html/sinfo__spiffi__types_8h_source.html
+++ b/html/sinfo__spiffi__types_8h_source.html
@@ -161,7 +161,7 @@
<a name="l00152"></a>00152
<a name="l00153"></a>00153
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stack__cfg_8c_source.html b/html/sinfo__stack__cfg_8c_source.html
index 9ac3515..0ec1515 100644
--- a/html/sinfo__stack__cfg_8c_source.html
+++ b/html/sinfo__stack__cfg_8c_source.html
@@ -68,7 +68,7 @@
<a name="l00080"></a>00080 return ;
<a name="l00081"></a>00081 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stack__cfg_8h_source.html b/html/sinfo__stack__cfg_8h_source.html
index 1ce9308..b809afc 100644
--- a/html/sinfo__stack__cfg_8h_source.html
+++ b/html/sinfo__stack__cfg_8h_source.html
@@ -172,7 +172,7 @@
<a name="l00175"></a>00175
<a name="l00176"></a>00176 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stack__ini_8h_source.html b/html/sinfo__stack__ini_8h_source.html
index 98188c6..ef35213 100644
--- a/html/sinfo__stack__ini_8h_source.html
+++ b/html/sinfo__stack__ini_8h_source.html
@@ -80,7 +80,7 @@
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stack__ini__by__cpl_8c_source.html b/html/sinfo__stack__ini__by__cpl_8c_source.html
index 3ff2bf0..443da42 100644
--- a/html/sinfo__stack__ini__by__cpl_8c_source.html
+++ b/html/sinfo__stack__ini__by__cpl_8c_source.html
@@ -637,7 +637,7 @@
<a name="l00710"></a>00710 }
<a name="l00711"></a>00711 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stack__ini__by__cpl_8h_source.html b/html/sinfo__stack__ini__by__cpl_8h_source.html
index cdcda5a..87c3f19 100644
--- a/html/sinfo__stack__ini__by__cpl_8h_source.html
+++ b/html/sinfo__stack__ini__by__cpl_8h_source.html
@@ -66,7 +66,7 @@
<a name="l00068"></a>00068
<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stacked__hidden__config_8c_source.html b/html/sinfo__stacked__hidden__config_8c_source.html
index 436623d..165862f 100644
--- a/html/sinfo__stacked__hidden__config_8c_source.html
+++ b/html/sinfo__stacked__hidden__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/**************************************************************************</span>
@@ -79,7 +79,7 @@
<a name="l00082"></a>00082
<a name="l00083"></a>00083 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__stacked__hidden__config_8h_source.html b/html/sinfo__stacked__hidden__config_8h_source.html
index b40e9cd..fab6878 100644
--- a/html/sinfo__stacked__hidden__config_8h_source.html
+++ b/html/sinfo__stacked__hidden__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -42,7 +42,7 @@
<a name="l00032"></a>00032 <span class="keywordtype">void</span>
<a name="l00033"></a>00033 sinfo_stacked_hidden_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standard__star__config_8c_source.html b/html/sinfo__standard__star__config_8c_source.html
index 150bd57..71d8391 100644
--- a/html/sinfo__standard__star__config_8c_source.html
+++ b/html/sinfo__standard__star__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -149,7 +149,7 @@
<a name="l00152"></a>00152
<a name="l00153"></a>00153 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standard__star__config_8h_source.html b/html/sinfo__standard__star__config_8h_source.html
index 3b00a57..14bb82c 100644
--- a/html/sinfo__standard__star__config_8h_source.html
+++ b/html/sinfo__standard__star__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -42,7 +42,7 @@
<a name="l00032"></a>00032 sinfo_standard_star_config_add(cpl_parameterlist *list);
<a name="l00033"></a>00033
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standstar__cfg_8c_source.html b/html/sinfo__standstar__cfg_8c_source.html
index cd1f911..799b64a 100644
--- a/html/sinfo__standstar__cfg_8c_source.html
+++ b/html/sinfo__standstar__cfg_8c_source.html
@@ -85,7 +85,7 @@
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standstar__cfg_8h_source.html b/html/sinfo__standstar__cfg_8h_source.html
index 2003fdc..bed8326 100644
--- a/html/sinfo__standstar__cfg_8h_source.html
+++ b/html/sinfo__standstar__cfg_8h_source.html
@@ -144,7 +144,7 @@
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standstar__ini_8h_source.html b/html/sinfo__standstar__ini_8h_source.html
index 290a3a6..453b56d 100644
--- a/html/sinfo__standstar__ini_8h_source.html
+++ b/html/sinfo__standstar__ini_8h_source.html
@@ -71,7 +71,7 @@
<a name="l00087"></a>00087
<a name="l00088"></a>00088 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standstar__ini__by__cpl_8c_source.html b/html/sinfo__standstar__ini__by__cpl_8c_source.html
index 5ff7ac1..ee09106 100644
--- a/html/sinfo__standstar__ini__by__cpl_8c_source.html
+++ b/html/sinfo__standstar__ini__by__cpl_8c_source.html
@@ -241,7 +241,7 @@
<a name="l00250"></a>00250 }
<a name="l00251"></a>00251 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__standstar__ini__by__cpl_8h_source.html b/html/sinfo__standstar__ini__by__cpl_8h_source.html
index 1bb4811..1e50efa 100644
--- a/html/sinfo__standstar__ini__by__cpl_8h_source.html
+++ b/html/sinfo__standstar__ini__by__cpl_8h_source.html
@@ -71,7 +71,7 @@
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__star__index_8c_source.html b/html/sinfo__star__index_8c_source.html
index 2b0cf0e..2d7f69d 100644
--- a/html/sinfo__star__index_8c_source.html
+++ b/html/sinfo__star__index_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:18:26 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.9 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027
@@ -331,7 +331,7 @@
<a name="l00323"></a>00323 cpl_table_dump(pindex->index_table, 0, cpl_table_get_nrow(pindex->index_table), pfile);
<a name="l00324"></a>00324 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__star__index_8h_source.html b/html/sinfo__star__index_8h_source.html
index de6d9d2..580642a 100644
--- a/html/sinfo__star__index_8h_source.html
+++ b/html/sinfo__star__index_8h_source.html
@@ -71,7 +71,7 @@
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__step__distortion_8c_source.html b/html/sinfo__step__distortion_8c_source.html
index 538915b..7f6d269 100644
--- a/html/sinfo__step__distortion_8c_source.html
+++ b/html/sinfo__step__distortion_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/12 14:56:50 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.20 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -311,7 +311,7 @@
<a name="l00304"></a>00304 }
<a name="l00305"></a>00305
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__step__jitter_8c_source.html b/html/sinfo__step__jitter_8c_source.html
index 200241c..b8af20c 100644
--- a/html/sinfo__step__jitter_8c_source.html
+++ b/html/sinfo__step__jitter_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/10/08 13:26:50 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -359,7 +359,7 @@
<a name="l00384"></a>00384
<a name="l00385"></a>00385
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__step__objnod_8c_source.html b/html/sinfo__step__objnod_8c_source.html
index 5233ea9..5143904 100644
--- a/html/sinfo__step__objnod_8c_source.html
+++ b/html/sinfo__step__objnod_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/06/06 07:09:56 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.9 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -176,7 +176,7 @@
<a name="l00169"></a>00169 }
<a name="l00170"></a>00170
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__step__psf_8c_source.html b/html/sinfo__step__psf_8c_source.html
index 6b2dec5..eddd790 100644
--- a/html/sinfo__step__psf_8c_source.html
+++ b/html/sinfo__step__psf_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2007/06/06 07:09:56 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -190,7 +190,7 @@
<a name="l00214"></a>00214 <span class="keywordflow">return</span> 0 ;
<a name="l00215"></a>00215 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__step__stdstar_8c_source.html b/html/sinfo__step__stdstar_8c_source.html
index 13a8094..28e97ae 100644
--- a/html/sinfo__step__stdstar_8c_source.html
+++ b/html/sinfo__step__stdstar_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/06/11 13:41:24 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="comment">/****************************************************************</span>
@@ -275,7 +275,7 @@
<a name="l00299"></a>00299 }
<a name="l00300"></a>00300
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__svd_8c_source.html b/html/sinfo__svd_8c_source.html
index a6da77e..855ec2f 100644
--- a/html/sinfo__svd_8c_source.html
+++ b/html/sinfo__svd_8c_source.html
@@ -434,7 +434,7 @@
<a name="l00431"></a>00431 }
<a name="l00432"></a>00432
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__svd_8h_source.html b/html/sinfo__svd_8h_source.html
index 6baa86c..975d0bf 100644
--- a/html/sinfo__svd_8h_source.html
+++ b/html/sinfo__svd_8h_source.html
@@ -93,7 +93,7 @@
<a name="l00083"></a>00083 <span class="preprocessor">#endif </span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="comment">/*--------------------------------------------------------------------------*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tilt__cfg_8c_source.html b/html/sinfo__tilt__cfg_8c_source.html
index 80f2a4a..c68df62 100644
--- a/html/sinfo__tilt__cfg_8c_source.html
+++ b/html/sinfo__tilt__cfg_8c_source.html
@@ -84,7 +84,7 @@
<a name="l00081"></a>00081
<a name="l00082"></a>00082
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tilt__cfg_8h_source.html b/html/sinfo__tilt__cfg_8h_source.html
index 72c3fe0..69aaf4f 100644
--- a/html/sinfo__tilt__cfg_8h_source.html
+++ b/html/sinfo__tilt__cfg_8h_source.html
@@ -98,7 +98,7 @@
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tilt__ini_8h_source.html b/html/sinfo__tilt__ini_8h_source.html
index 6e40120..4ce8255 100644
--- a/html/sinfo__tilt__ini_8h_source.html
+++ b/html/sinfo__tilt__ini_8h_source.html
@@ -61,7 +61,7 @@
<a name="l00077"></a>00077
<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__time_8c_source.html b/html/sinfo__time_8c_source.html
index 5375d1e..e42f9dd 100644
--- a/html/sinfo__time_8c_source.html
+++ b/html/sinfo__time_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor"># include <config.h></span>
@@ -194,7 +194,7 @@
<a name="l00243"></a>00243 }
<a name="l00244"></a>00244
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__time_8h_source.html b/html/sinfo__time_8h_source.html
index 3d3733e..919f649 100644
--- a/html/sinfo__time_8h_source.html
+++ b/html/sinfo__time_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/11/11 14:13:03 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_TIME_H</span>
@@ -46,7 +46,7 @@
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tpl__dfs_8c_source.html b/html/sinfo__tpl__dfs_8c_source.html
index e6c6977..d183c67 100644
--- a/html/sinfo__tpl__dfs_8c_source.html
+++ b/html/sinfo__tpl__dfs_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -235,7 +235,7 @@
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tpl__dfs_8h_source.html b/html/sinfo__tpl__dfs_8h_source.html
index c498417..ef774f2 100644
--- a/html/sinfo__tpl__dfs_8h_source.html
+++ b/html/sinfo__tpl__dfs_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/07/09 09:53:23 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_TPL_DFS_H</span>
@@ -83,7 +83,7 @@
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tpl__utils_8c_source.html b/html/sinfo__tpl__utils_8c_source.html
index 48686e4..fe00921 100644
--- a/html/sinfo__tpl__utils_8c_source.html
+++ b/html/sinfo__tpl__utils_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -153,7 +153,7 @@
<a name="l00173"></a>00173 }
<a name="l00174"></a>00174
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__tpl__utils_8h_source.html b/html/sinfo__tpl__utils_8h_source.html
index c8bc957..0a81bef 100644
--- a/html/sinfo__tpl__utils_8h_source.html
+++ b/html/sinfo__tpl__utils_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/08/20 10:03:49 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SINFO_TPL_UTILS_H</span>
@@ -74,7 +74,7 @@
<a name="l00064"></a>00064 <span class="keyword">const</span> <span class="keywordtype">char</span> * sinfo_std_band_name(sinfo_band) ;
<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utilities_8c_source.html b/html/sinfo__utilities_8c_source.html
index 659d527..1c0873d 100644
--- a/html/sinfo__utilities_8c_source.html
+++ b/html/sinfo__utilities_8c_source.html
@@ -1068,7 +1068,7 @@
<a name="l01150"></a>01150
<a name="l01151"></a>01151
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utilities_8h_source.html b/html/sinfo__utilities_8h_source.html
index ce60daf..3bd233f 100644
--- a/html/sinfo__utilities_8h_source.html
+++ b/html/sinfo__utilities_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2011/12/09 07:47:42 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef SINFO_UTILITIES_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_UTILITIES_H</span>
@@ -223,7 +223,7 @@
<a name="l00213"></a>00213
<a name="l00214"></a>00214 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utilities__scired_8c_source.html b/html/sinfo__utilities__scired_8c_source.html
index 6151bc3..44ece1f 100644
--- a/html/sinfo__utilities__scired_8c_source.html
+++ b/html/sinfo__utilities__scired_8c_source.html
@@ -1862,7 +1862,7 @@
<a name="l02163"></a>02163
<a name="l02164"></a>02164
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utilities__scired_8h_source.html b/html/sinfo__utilities__scired_8h_source.html
index ffd77e4..114df27 100644
--- a/html/sinfo__utilities__scired_8h_source.html
+++ b/html/sinfo__utilities__scired_8h_source.html
@@ -155,7 +155,7 @@
<a name="l00145"></a>00145
<a name="l00146"></a>00146 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utils_8c_source.html b/html/sinfo__utils_8c_source.html
index 399fc0f..fa1540a 100644
--- a/html/sinfo__utils_8c_source.html
+++ b/html/sinfo__utils_8c_source.html
@@ -30,7 +30,7 @@
<a name="l00020"></a>00020 <span class="comment"> * $Author: amodigli $</span>
<a name="l00021"></a>00021 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Revision: 1.7 $</span>
-<a name="l00023"></a>00023 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Log: sinfo_utils.c,v $</span>
<a name="l00025"></a>00025 <span class="comment"> * Revision 1.7 2012/03/03 10:17:31 amodigli</span>
<a name="l00026"></a>00026 <span class="comment"> * fixed some doxygen warnings</span>
@@ -121,7 +121,7 @@
<a name="l00137"></a>00137 <span class="keywordflow">return</span> flag;
<a name="l00138"></a>00138 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utils_8h_source.html b/html/sinfo__utils_8h_source.html
index a2bb6fe..c97dd00 100644
--- a/html/sinfo__utils_8h_source.html
+++ b/html/sinfo__utils_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: kmirny $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2010/09/30 14:00:03 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> *</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef SINFO_UTILS_H</span>
@@ -108,7 +108,7 @@
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utils__wrappers_8c_source.html b/html/sinfo__utils__wrappers_8c_source.html
index 1ae6a25..80d95a1 100644
--- a/html/sinfo__utils__wrappers_8c_source.html
+++ b/html/sinfo__utils__wrappers_8c_source.html
@@ -328,7 +328,7 @@
<a name="l00494"></a>00494 {<span class="keywordflow">if</span>(b){cpl_bivector_unwrap_vectors(*b); *b = NULL;}}
<a name="l00495"></a>00495
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utils__wrappers_8h_source.html b/html/sinfo__utils__wrappers_8h_source.html
index 4a76cea..258a037 100644
--- a/html/sinfo__utils__wrappers_8h_source.html
+++ b/html/sinfo__utils__wrappers_8h_source.html
@@ -93,7 +93,7 @@
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__bp__mask__add_8c_source.html b/html/sinfo__utl__bp__mask__add_8c_source.html
index 91b65b9..7ec6729 100644
--- a/html/sinfo__utl__bp__mask__add_8c_source.html
+++ b/html/sinfo__utl__bp__mask__add_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2008/08/21 09:46:47 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.18 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -245,7 +245,7 @@
<a name="l00269"></a>00269
<a name="l00270"></a>00270 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube2ima_8h_source.html b/html/sinfo__utl__cube2ima_8h_source.html
index 73413ed..314d12c 100644
--- a/html/sinfo__utl__cube2ima_8h_source.html
+++ b/html/sinfo__utl__cube2ima_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -51,7 +51,7 @@
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube2spectrum_8h_source.html b/html/sinfo__utl__cube2spectrum_8h_source.html
index 69a4bc8..e998709 100644
--- a/html/sinfo__utl__cube2spectrum_8h_source.html
+++ b/html/sinfo__utl__cube2spectrum_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -53,7 +53,7 @@
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube__arith_8h_source.html b/html/sinfo__utl__cube__arith_8h_source.html
index 75155ac..20ce082 100644
--- a/html/sinfo__utl__cube__arith_8h_source.html
+++ b/html/sinfo__utl__cube__arith_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -52,7 +52,7 @@
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube__combine_8h_source.html b/html/sinfo__utl__cube__combine_8h_source.html
index 6ebf1bb..d423763 100644
--- a/html/sinfo__utl__cube__combine_8h_source.html
+++ b/html/sinfo__utl__cube__combine_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -52,7 +52,7 @@
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube__create_8c_source.html b/html/sinfo__utl__cube__create_8c_source.html
index 0423208..1a769eb 100644
--- a/html/sinfo__utl__cube__create_8c_source.html
+++ b/html/sinfo__utl__cube__create_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/08/29 11:34:03 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -649,7 +649,7 @@
<a name="l00674"></a>00674
<a name="l00675"></a>00675
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__cube__test_8c_source.html b/html/sinfo__utl__cube__test_8c_source.html
index 8c72022..ee21f05 100644
--- a/html/sinfo__utl__cube__test_8c_source.html
+++ b/html/sinfo__utl__cube__test_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/02/12 09:11:10 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -250,7 +250,7 @@
<a name="l00269"></a>00269 }
<a name="l00270"></a>00270
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__eff_8c_source.html b/html/sinfo__utl__eff_8c_source.html
index 4363504..1a883a3 100644
--- a/html/sinfo__utl__eff_8c_source.html
+++ b/html/sinfo__utl__eff_8c_source.html
@@ -272,7 +272,7 @@
<a name="l00297"></a>00297 <span class="keywordflow">return</span> (cpl_error_get_code()) ? -1 : 0;
<a name="l00298"></a>00298 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__efficiency_8c_source.html b/html/sinfo__utl__efficiency_8c_source.html
index 8131941..7efa81b 100644
--- a/html/sinfo__utl__efficiency_8c_source.html
+++ b/html/sinfo__utl__efficiency_8c_source.html
@@ -668,7 +668,7 @@
<a name="l00732"></a>00732
<a name="l00733"></a>00733 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__efficiency_8h_source.html b/html/sinfo__utl__efficiency_8h_source.html
index 0f664fe..1da7583 100644
--- a/html/sinfo__utl__efficiency_8h_source.html
+++ b/html/sinfo__utl__efficiency_8h_source.html
@@ -100,7 +100,7 @@
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__illumcorr_8c_source.html b/html/sinfo__utl__illumcorr_8c_source.html
index 20e90b9..15d10ca 100644
--- a/html/sinfo__utl__illumcorr_8c_source.html
+++ b/html/sinfo__utl__illumcorr_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:38:03 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.18 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -1938,7 +1938,7 @@
<a name="l02001"></a>02001 <span class="keywordflow">return</span> (median);
<a name="l02002"></a>02002 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__ima__arith_8c_source.html b/html/sinfo__utl__ima__arith_8c_source.html
index d56cb8f..c556d19 100644
--- a/html/sinfo__utl__ima__arith_8c_source.html
+++ b/html/sinfo__utl__ima__arith_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/01/30 14:56:12 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.14 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -396,7 +396,7 @@
<a name="l00421"></a>00421
<a name="l00422"></a>00422 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__ima__cube__ks__test_8c_source.html b/html/sinfo__utl__ima__cube__ks__test_8c_source.html
index e1eb966..75e112e 100644
--- a/html/sinfo__utl__ima__cube__ks__test_8c_source.html
+++ b/html/sinfo__utl__ima__cube__ks__test_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/04 08:11:55 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.12 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> * $Log: sinfo_utl_ima_cube_ks_test.c,v $</span>
<a name="l00027"></a>00027 <span class="comment"> * Revision 1.12 2012/05/04 08:11:55 amodigli</span>
<a name="l00028"></a>00028 <span class="comment"> * fixed errors fromn cpptest</span>
@@ -868,7 +868,7 @@
<a name="l00894"></a>00894 }
<a name="l00895"></a>00895
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__ima__gauss_8c_source.html b/html/sinfo__utl__ima__gauss_8c_source.html
index 3fa6afa..ebee123 100644
--- a/html/sinfo__utl__ima__gauss_8c_source.html
+++ b/html/sinfo__utl__ima__gauss_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: kmirny $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/05/20 15:22:42 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -428,7 +428,7 @@
<a name="l00454"></a>00454
<a name="l00455"></a>00455 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__ima__line__corr_8c_source.html b/html/sinfo__utl__ima__line__corr_8c_source.html
index d56e7e8..0088ba6 100644
--- a/html/sinfo__utl__ima__line__corr_8c_source.html
+++ b/html/sinfo__utl__ima__line__corr_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/06/05 08:18:55 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.3 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -314,7 +314,7 @@
<a name="l00339"></a>00339
<a name="l00340"></a>00340 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__line__oh__select_8c_source.html b/html/sinfo__utl__line__oh__select_8c_source.html
new file mode 100644
index 0000000..60d4b52
--- /dev/null
+++ b/html/sinfo__utl__line__oh__select_8c_source.html
@@ -0,0 +1,277 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>SINFONI Pipeline Reference Manual: sinfo_utl_line_oh_select.c Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.6.1 -->
+<h1>sinfo_utl_line_oh_select.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* $Id: sinfo_utl_line_oh_select.c,v 1.2 2012/08/10 07:55:03 amodigli Exp $</span>
+<a name="l00002"></a>00002 <span class="comment"> *</span>
+<a name="l00003"></a>00003 <span class="comment"> * This file is part of the SINFONI Pipeline</span>
+<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002,2003 European Southern Observatory</span>
+<a name="l00005"></a>00005 <span class="comment"> *</span>
+<a name="l00006"></a>00006 <span class="comment"> * This program is free software; you can redistribute it and/or modify</span>
+<a name="l00007"></a>00007 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
+<a name="l00008"></a>00008 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span>
+<a name="l00009"></a>00009 <span class="comment"> * (at your option) any later version.</span>
+<a name="l00010"></a>00010 <span class="comment"> *</span>
+<a name="l00011"></a>00011 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
+<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
+<a name="l00014"></a>00014 <span class="comment"> * GNU General Public License for more details.</span>
+<a name="l00015"></a>00015 <span class="comment"> *</span>
+<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
+<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software</span>
+<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<a name="l00019"></a>00019 <span class="comment"> */</span>
+<a name="l00020"></a>00020
+<a name="l00021"></a>00021 <span class="comment">/*</span>
+<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
+<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/08/10 07:55:03 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
+<a name="l00026"></a>00026 <span class="comment"> */</span>
+<a name="l00027"></a>00027
+<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include <config.h></span>
+<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span>
+<a name="l00032"></a>00032 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00033"></a>00033 <span class="comment"> Includes</span>
+<a name="l00034"></a>00034 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00035"></a>00035
+<a name="l00036"></a>00036 <span class="preprocessor">#include <math.h></span>
+<a name="l00037"></a>00037 <span class="preprocessor">#include <cpl.h></span>
+<a name="l00038"></a>00038
+<a name="l00039"></a>00039 <span class="preprocessor">#include "irplib_utils.h"</span>
+<a name="l00040"></a>00040 <span class="preprocessor">#include <sinfo_utils_wrappers.h></span>
+<a name="l00041"></a>00041 <span class="preprocessor">#include <sinfo_msg.h></span>
+<a name="l00042"></a>00042
+<a name="l00043"></a>00043 <span class="preprocessor">#include "sinfo_raw_types.h"</span>
+<a name="l00044"></a>00044 <span class="preprocessor">#include "sinfo_pro_types.h"</span>
+<a name="l00045"></a>00045 <span class="preprocessor">#include "sinfo_tpl_utils.h"</span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include "sinfo_tpl_dfs.h"</span>
+<a name="l00047"></a>00047
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00050"></a>00050 <span class="comment"> Functions prototypes</span>
+<a name="l00051"></a>00051 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00052"></a>00052
+<a name="l00053"></a>00053 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_create(cpl_plugin *) ;
+<a name="l00054"></a>00054 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_exec(cpl_plugin *) ;
+<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_destroy(cpl_plugin *) ;
+<a name="l00056"></a>00056 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select(cpl_parameterlist *, cpl_frameset *) ;
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00059"></a>00059 <span class="comment"> Static variables</span>
+<a name="l00060"></a>00060 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00061"></a>00061
+<a name="l00062"></a>00062 <span class="keyword">static</span> <span class="keywordtype">char</span> sinfo_utl_line_oh_select_description[] =
+<a name="l00063"></a>00063 <span class="stringliteral">"sinfo_utl_line_oh_select -- SINFONI OH LINE table creation.\n"</span>
+<a name="l00064"></a>00064 <span class="stringliteral">"The files listed in the Set Of Frames (sof-file) must be tagged:\n"</span>
+<a name="l00065"></a>00065 <span class="stringliteral">"raw-file.fits REF_LINE_OH \n"</span> ;
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 <span class="comment">/*-----------------------------------------------------------------------------</span>
+<a name="l00068"></a>00068 <span class="comment"> Functions code</span>
+<a name="l00069"></a>00069 <span class="comment"> -----------------------------------------------------------------------------*/</span>
+<a name="l00070"></a>00070
+<a name="l00071"></a>00071 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00079"></a>00079 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00080"></a>00080 <span class="keywordtype">int</span> <a class="code" href="group__sinfo__rec__detlin.html#ga31d1fccd4cd15b1c1f3c5edc8cb18693" title="Build the list of available plugins, for this module.">cpl_plugin_get_info</a>(cpl_pluginlist * list)
+<a name="l00081"></a>00081 {
+<a name="l00082"></a>00082 cpl_recipe * recipe = cpl_calloc(1, <span class="keyword">sizeof</span>(*recipe)) ;
+<a name="l00083"></a>00083 cpl_plugin * plugin = &recipe->interface ;
+<a name="l00084"></a>00084
+<a name="l00085"></a>00085 cpl_plugin_init(plugin,
+<a name="l00086"></a>00086 CPL_PLUGIN_API,
+<a name="l00087"></a>00087 SINFONI_BINARY_VERSION,
+<a name="l00088"></a>00088 CPL_PLUGIN_TYPE_RECIPE,
+<a name="l00089"></a>00089 <span class="stringliteral">"sinfo_utl_line_oh_select"</span>,
+<a name="l00090"></a>00090 <span class="stringliteral">"OH line table creation"</span>,
+<a name="l00091"></a>00091 sinfo_utl_line_oh_select_description,
+<a name="l00092"></a>00092 <span class="stringliteral">"Andrea Modigliani"</span>,
+<a name="l00093"></a>00093 <span class="stringliteral">"amodigli at eso.org"</span>,
+<a name="l00094"></a>00094 sinfo_get_license(),
+<a name="l00095"></a>00095 sinfo_utl_line_oh_select_create,
+<a name="l00096"></a>00096 sinfo_utl_line_oh_select_exec,
+<a name="l00097"></a>00097 sinfo_utl_line_oh_select_destroy) ;
+<a name="l00098"></a>00098
+<a name="l00099"></a>00099 cpl_pluginlist_append(list, plugin) ;
+<a name="l00100"></a>00100
+<a name="l00101"></a>00101 <span class="keywordflow">return</span> 0;
+<a name="l00102"></a>00102 }
+<a name="l00103"></a>00103
+<a name="l00104"></a>00104 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00113"></a>00113 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00114"></a>00114 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_create(cpl_plugin * plugin)
+<a name="l00115"></a>00115 {
+<a name="l00116"></a>00116 cpl_recipe * recipe ;
+<a name="l00117"></a>00117 cpl_parameter* p=NULL;
+<a name="l00118"></a>00118
+<a name="l00119"></a>00119 <span class="comment">/* Get the recipe out of the plugin */</span>
+<a name="l00120"></a>00120 <span class="keywordflow">if</span> (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+<a name="l00121"></a>00121 recipe = (cpl_recipe *)plugin ;
+<a name="l00122"></a>00122 <span class="keywordflow">else</span> <span class="keywordflow">return</span> -1 ;
+<a name="l00123"></a>00123
+<a name="l00124"></a>00124 <span class="comment">/* Create the parameters list in the cpl_recipe object */</span>
+<a name="l00125"></a>00125 recipe->parameters = cpl_parameterlist_new() ;
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 <span class="comment">/* --doubleopt */</span>
+<a name="l00128"></a>00128 p = cpl_parameter_new_range(<span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.wmin"</span>,
+<a name="l00129"></a>00129 CPL_TYPE_DOUBLE, <span class="stringliteral">"wmin"</span>,
+<a name="l00130"></a>00130 <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select"</span>,
+<a name="l00131"></a>00131 1040.,1000.,2500.) ;
+<a name="l00132"></a>00132 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, <span class="stringliteral">"wmin"</span>) ;
+<a name="l00133"></a>00133 cpl_parameterlist_append(recipe->parameters, p) ;
+<a name="l00134"></a>00134
+<a name="l00135"></a>00135
+<a name="l00136"></a>00136 p = cpl_parameter_new_range(<span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.wmax"</span>,
+<a name="l00137"></a>00137 CPL_TYPE_DOUBLE, <span class="stringliteral">"wmax"</span>,
+<a name="l00138"></a>00138 <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select"</span>,
+<a name="l00139"></a>00139 1880.,1000.,2500.) ;
+<a name="l00140"></a>00140 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, <span class="stringliteral">"wmax"</span>) ;
+<a name="l00141"></a>00141 cpl_parameterlist_append(recipe->parameters, p) ;
+<a name="l00142"></a>00142
+<a name="l00143"></a>00143 p = cpl_parameter_new_value(<span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.intnorm"</span>,
+<a name="l00144"></a>00144 CPL_TYPE_DOUBLE, <span class="stringliteral">"intnorm"</span>,
+<a name="l00145"></a>00145 <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select"</span>,
+<a name="l00146"></a>00146 4.) ;
+<a name="l00147"></a>00147 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, <span class="stringliteral">"intnorm"</span>) ;
+<a name="l00148"></a>00148 cpl_parameterlist_append(recipe->parameters, p) ;
+<a name="l00149"></a>00149
+<a name="l00150"></a>00150 p = cpl_parameter_new_value(<span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.intlimit"</span>,
+<a name="l00151"></a>00151 CPL_TYPE_DOUBLE, <span class="stringliteral">"intlimit"</span>,
+<a name="l00152"></a>00152 <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select"</span>,
+<a name="l00153"></a>00153 50.) ;
+<a name="l00154"></a>00154 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, <span class="stringliteral">"intlimit"</span>) ;
+<a name="l00155"></a>00155 cpl_parameterlist_append(recipe->parameters, p) ;
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157
+<a name="l00158"></a>00158
+<a name="l00159"></a>00159
+<a name="l00160"></a>00160 <span class="comment">/* Return */</span>
+<a name="l00161"></a>00161 <span class="keywordflow">return</span> 0;
+<a name="l00162"></a>00162 }
+<a name="l00163"></a>00163
+<a name="l00164"></a>00164 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00170"></a>00170 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00171"></a>00171 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_exec(cpl_plugin * plugin)
+<a name="l00172"></a>00172 {
+<a name="l00173"></a>00173 cpl_recipe * recipe ;
+<a name="l00174"></a>00174
+<a name="l00175"></a>00175 <span class="comment">/* Get the recipe out of the plugin */</span>
+<a name="l00176"></a>00176 <span class="keywordflow">if</span> (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+<a name="l00177"></a>00177 recipe = (cpl_recipe *)plugin ;
+<a name="l00178"></a>00178 <span class="keywordflow">else</span> <span class="keywordflow">return</span> -1 ;
+<a name="l00179"></a>00179
+<a name="l00180"></a>00180 <span class="keywordflow">return</span> sinfo_utl_line_oh_select(recipe->parameters, recipe->frames) ;
+<a name="l00181"></a>00181 }
+<a name="l00182"></a>00182
+<a name="l00183"></a>00183 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00189"></a>00189 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00190"></a>00190 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select_destroy(cpl_plugin * plugin)
+<a name="l00191"></a>00191 {
+<a name="l00192"></a>00192 cpl_recipe * recipe ;
+<a name="l00193"></a>00193
+<a name="l00194"></a>00194 <span class="comment">/* Get the recipe out of the plugin */</span>
+<a name="l00195"></a>00195 <span class="keywordflow">if</span> (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+<a name="l00196"></a>00196 recipe = (cpl_recipe *)plugin ;
+<a name="l00197"></a>00197 <span class="keywordflow">else</span> <span class="keywordflow">return</span> -1 ;
+<a name="l00198"></a>00198
+<a name="l00199"></a>00199 cpl_parameterlist_delete(recipe->parameters) ;
+<a name="l00200"></a>00200 <span class="keywordflow">return</span> 0 ;
+<a name="l00201"></a>00201 }
+<a name="l00202"></a>00202
+<a name="l00203"></a>00203 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00210"></a>00210 <span class="comment">/*----------------------------------------------------------------------------*/</span>
+<a name="l00211"></a>00211 <span class="keyword">static</span> <span class="keywordtype">int</span> sinfo_utl_line_oh_select(
+<a name="l00212"></a>00212 cpl_parameterlist * parlist,
+<a name="l00213"></a>00213 cpl_frameset * framelist)
+<a name="l00214"></a>00214 {
+<a name="l00215"></a>00215 cpl_parameter* p=NULL;
+<a name="l00216"></a>00216 cpl_frame* frame=NULL;
+<a name="l00217"></a>00217
+<a name="l00218"></a>00218 cpl_frameset * rawframes ;
+<a name="l00219"></a>00219 <span class="keywordtype">int</span> nframes;
+<a name="l00220"></a>00220 cpl_propertylist* phead=NULL;
+<a name="l00221"></a>00221 cpl_table * tab_in ;
+<a name="l00222"></a>00222 cpl_table * tab_ou ;
+<a name="l00223"></a>00223
+<a name="l00224"></a>00224 <span class="keywordtype">int</span> nm2AA=10.;
+<a name="l00225"></a>00225
+<a name="l00226"></a>00226
+<a name="l00227"></a>00227 <span class="keywordtype">double</span> wmin=0;
+<a name="l00228"></a>00228 <span class="keywordtype">double</span> wmax=0;
+<a name="l00229"></a>00229 <span class="keywordtype">double</span> intnorm=0;
+<a name="l00230"></a>00230 <span class="keywordtype">double</span> intlimit=0;
+<a name="l00231"></a>00231 <span class="keywordtype">int</span> next=0;
+<a name="l00232"></a>00232 <span class="keywordtype">int</span> nrow=0;
+<a name="l00233"></a>00233 <span class="comment">/* Identify the RAW and CALIB frames in the input frameset */</span>
+<a name="l00234"></a>00234 <span class="keywordflow">if</span> (sinfo_dfs_set_groups(framelist)) {
+<a name="l00235"></a>00235 cpl_msg_error(__func__, <span class="stringliteral">"Cannot identify RAW and CALIB frames"</span>) ;
+<a name="l00236"></a>00236 <span class="keywordflow">return</span> -1 ;
+<a name="l00237"></a>00237 }
+<a name="l00238"></a>00238
+<a name="l00239"></a>00239 <span class="comment">/* Retrieve raw frames */</span>
+<a name="l00240"></a>00240 <span class="keywordflow">if</span> ((rawframes = sinfo_extract_frameset(framelist,
+<a name="l00241"></a>00241 <span class="stringliteral">"REF_LINE_OH"</span>)) == NULL) {
+<a name="l00242"></a>00242 cpl_msg_error(__func__, <span class="stringliteral">"Cannot find raw frames in the input list"</span>) ;
+<a name="l00243"></a>00243 <span class="keywordflow">return</span> -1 ;
+<a name="l00244"></a>00244 }
+<a name="l00245"></a>00245
+<a name="l00246"></a>00246 p=cpl_parameterlist_find(parlist, <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.wmin"</span>);
+<a name="l00247"></a>00247 wmin = cpl_parameter_get_double(p);
+<a name="l00248"></a>00248
+<a name="l00249"></a>00249 p=cpl_parameterlist_find(parlist, <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.wmax"</span>);
+<a name="l00250"></a>00250 wmax = cpl_parameter_get_double(p);
+<a name="l00251"></a>00251
+<a name="l00252"></a>00252 p=cpl_parameterlist_find(parlist, <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.intnorm"</span>);
+<a name="l00253"></a>00253 intnorm = cpl_parameter_get_double(p);
+<a name="l00254"></a>00254 p=cpl_parameterlist_find(parlist, <span class="stringliteral">"sinfoni.sinfo_utl_line_oh_select.intlimit"</span>);
+<a name="l00255"></a>00255 intlimit = cpl_parameter_get_double(p);
+<a name="l00256"></a>00256
+<a name="l00257"></a>00257 nframes = cpl_frameset_get_size(rawframes) ;
+<a name="l00258"></a>00258
+<a name="l00259"></a>00259 <span class="comment">/* Load */</span>
+<a name="l00260"></a>00260 <span class="keywordflow">if</span>(nframes > 0) {
+<a name="l00261"></a>00261 frame=cpl_frameset_get_frame(rawframes,0);
+<a name="l00262"></a>00262 }
+<a name="l00263"></a>00263 tab_in=cpl_table_load(cpl_frame_get_filename(frame),1,0);
+<a name="l00264"></a>00264 nrow=cpl_table_get_nrow(tab_in);
+<a name="l00265"></a>00265
+<a name="l00266"></a>00266 cpl_table_divide_scalar(tab_in,<span class="stringliteral">"wave"</span>,nm2AA);
+<a name="l00267"></a>00267 cpl_table_divide_scalar(tab_in,<span class="stringliteral">"int"</span>,intnorm);
+<a name="l00268"></a>00268 sinfo_msg(<span class="stringliteral">"wmin=%g wmax=%g"</span>,wmin,wmax);
+<a name="l00269"></a>00269 sinfo_msg(<span class="stringliteral">"nrow=%d"</span>,nrow);
+<a name="l00270"></a>00270 cpl_table_dump(tab_in,1,2,stdout);
+<a name="l00271"></a>00271 cpl_table_dump(tab_in,nrow-10,2,stdout);
+<a name="l00272"></a>00272 next=cpl_table_and_selected_double(tab_in,<span class="stringliteral">"wave"</span>,CPL_GREATER_THAN,wmin);
+<a name="l00273"></a>00273 sinfo_msg(<span class="stringliteral">"next=%d"</span>,next);
+<a name="l00274"></a>00274 next=cpl_table_and_selected_double(tab_in,<span class="stringliteral">"wave"</span>,CPL_LESS_THAN,wmax);
+<a name="l00275"></a>00275 sinfo_msg(<span class="stringliteral">"next=%d"</span>,next);
+<a name="l00276"></a>00276 next=cpl_table_and_selected_double(tab_in,<span class="stringliteral">"int"</span>,CPL_GREATER_THAN,intlimit);
+<a name="l00277"></a>00277 sinfo_msg(<span class="stringliteral">"next=%d"</span>,next);
+<a name="l00278"></a>00278 tab_ou=cpl_table_extract_selected(tab_in);
+<a name="l00279"></a>00279
+<a name="l00280"></a>00280 cpl_table_save(tab_ou,phead,NULL,<span class="stringliteral">"oh_selected.fits"</span>,CPL_IO_DEFAULT);
+<a name="l00281"></a>00281
+<a name="l00282"></a>00282 <span class="comment">/* Free and return */</span>
+<a name="l00283"></a>00283 sinfo_free_table(&tab_in);
+<a name="l00284"></a>00284 sinfo_free_table(&tab_ou);
+<a name="l00285"></a>00285 sinfo_free_propertylist(&phead);
+<a name="l00286"></a>00286
+<a name="l00287"></a>00287
+<a name="l00288"></a>00288 <span class="keywordflow">return</span> 0 ;
+<a name="l00289"></a>00289 }
+<a name="l00290"></a>00290
+<a name="l00291"></a>00291
+<a name="l00292"></a>00292
+</pre></div></div>
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
+</body>
+</html>
diff --git a/html/sinfo__utl__remove__crh__single_8c_source.html b/html/sinfo__utl__remove__crh__single_8c_source.html
index 398ec22..f3a40ba 100644
--- a/html/sinfo__utl__remove__crh__single_8c_source.html
+++ b/html/sinfo__utl__remove__crh__single_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/01/30 14:56:12 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -424,7 +424,7 @@
<a name="l00449"></a>00449
<a name="l00450"></a>00450 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__seds_8c_source.html b/html/sinfo__utl__seds_8c_source.html
index 412c552..38aed47 100644
--- a/html/sinfo__utl__seds_8c_source.html
+++ b/html/sinfo__utl__seds_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2008/06/11 13:42:20 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -277,7 +277,7 @@
<a name="l00305"></a>00305
<a name="l00306"></a>00306
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__skycor_8c_source.html b/html/sinfo__utl__skycor_8c_source.html
index 390426f..687f47c 100644
--- a/html/sinfo__utl__skycor_8c_source.html
+++ b/html/sinfo__utl__skycor_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2007/10/26 09:40:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -332,7 +332,7 @@
<a name="l00357"></a>00357
<a name="l00358"></a>00358 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__skymap_8c_source.html b/html/sinfo__utl__skymap_8c_source.html
index 801afa4..a521391 100644
--- a/html/sinfo__utl__skymap_8c_source.html
+++ b/html/sinfo__utl__skymap_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/01/30 14:56:12 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.13 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -414,7 +414,7 @@
<a name="l00433"></a>00433 }
<a name="l00434"></a>00434 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__spectrum__divide__by__blackbody_8h_source.html b/html/sinfo__utl__spectrum__divide__by__blackbody_8h_source.html
index 4a5617a..c54b64e 100644
--- a/html/sinfo__utl__spectrum__divide__by__blackbody_8h_source.html
+++ b/html/sinfo__utl__spectrum__divide__by__blackbody_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -55,7 +55,7 @@
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__spectrum__wavelength__shift_8h_source.html b/html/sinfo__utl__spectrum__wavelength__shift_8h_source.html
index ba09481..997b08d 100644
--- a/html/sinfo__utl__spectrum__wavelength__shift_8h_source.html
+++ b/html/sinfo__utl__spectrum__wavelength__shift_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="comment">/*-----------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 <span class="comment"> Includes</span>
@@ -54,7 +54,7 @@
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__stdstars_8c_source.html b/html/sinfo__utl__stdstars_8c_source.html
index e023459..0575089 100644
--- a/html/sinfo__utl__stdstars_8c_source.html
+++ b/html/sinfo__utl__stdstars_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/05/04 08:12:07 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.5 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -181,7 +181,7 @@
<a name="l00204"></a>00204 }
<a name="l00205"></a>00205
<a name="l00206"></a>00206 <span class="comment">/* Write the catalog */</span>
-<a name="l00207"></a>00207 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#ga1d798cc23ce72891460133af03ee21ba" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(framelist,
+<a name="l00207"></a>00207 <span class="keywordflow">if</span> (<a class="code" href="group__irplib__stdstar.html#gac18c92be3d3c96ba57804b074a2abb7d" title="Write the ASCII catalogs as FITS files.">irplib_stdstar_write_catalogs</a>(framelist,
<a name="l00208"></a>00208 rawframes,
<a name="l00209"></a>00209 <span class="stringliteral">"sinfo_utl_stdstars"</span>,
<a name="l00210"></a>00210 SINFO_UTL_STDSTARS_RES, NULL,
@@ -276,7 +276,7 @@
<a name="l00319"></a>00319 }
<a name="l00320"></a>00320
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__table__ex_8c_source.html b/html/sinfo__utl__table__ex_8c_source.html
index 701bc9a..80082cc 100644
--- a/html/sinfo__utl__table__ex_8c_source.html
+++ b/html/sinfo__utl__table__ex_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: kmirny $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2009/05/20 15:22:42 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -324,7 +324,7 @@
<a name="l00350"></a>00350
<a name="l00351"></a>00351 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__utl__table__test_8c_source.html b/html/sinfo__utl__table__test_8c_source.html
index 840e430..6f47cf8 100644
--- a/html/sinfo__utl__table__test_8c_source.html
+++ b/html/sinfo__utl__table__test_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:38:03 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -1126,7 +1126,7 @@
<a name="l01169"></a>01169
<a name="l01170"></a>01170
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__vltPort_8h_source.html b/html/sinfo__vltPort_8h_source.html
index 667af44..828dcf6 100644
--- a/html/sinfo__vltPort_8h_source.html
+++ b/html/sinfo__vltPort_8h_source.html
@@ -110,7 +110,7 @@
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wave__calibration_8c_source.html b/html/sinfo__wave__calibration_8c_source.html
index 1af6eb5..a028793 100644
--- a/html/sinfo__wave__calibration_8c_source.html
+++ b/html/sinfo__wave__calibration_8c_source.html
@@ -2631,7 +2631,7 @@
<a name="l02917"></a>02917
<a name="l02919"></a>02919 <span class="comment">/*___oOo___*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wave__calibration_8h_source.html b/html/sinfo__wave__calibration_8h_source.html
index 75fafaa..5f90a9e 100644
--- a/html/sinfo__wave__calibration_8h_source.html
+++ b/html/sinfo__wave__calibration_8h_source.html
@@ -178,7 +178,7 @@
<a name="l00449"></a>00449
<a name="l00450"></a>00450 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal_8c_source.html b/html/sinfo__wavecal_8c_source.html
index 5169074..5a530e0 100644
--- a/html/sinfo__wavecal_8c_source.html
+++ b/html/sinfo__wavecal_8c_source.html
@@ -3583,7 +3583,7 @@
<a name="l03887"></a>03887
<a name="l03889"></a>03889 <span class="comment">/*___oOo___*/</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal_8h_source.html b/html/sinfo__wavecal_8h_source.html
index 1d0450b..b55c8c1 100644
--- a/html/sinfo__wavecal_8h_source.html
+++ b/html/sinfo__wavecal_8h_source.html
@@ -163,7 +163,7 @@
<a name="l00374"></a>00374
<a name="l00375"></a>00375 <span class="preprocessor">#endif </span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__cfg_8c_source.html b/html/sinfo__wavecal__cfg_8c_source.html
index f75a5eb..22e9eb7 100644
--- a/html/sinfo__wavecal__cfg_8c_source.html
+++ b/html/sinfo__wavecal__cfg_8c_source.html
@@ -82,7 +82,7 @@
<a name="l00079"></a>00079 return ;
<a name="l00080"></a>00080 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__cfg_8h_source.html b/html/sinfo__wavecal__cfg_8h_source.html
index 6caa63d..4c937f1 100644
--- a/html/sinfo__wavecal__cfg_8h_source.html
+++ b/html/sinfo__wavecal__cfg_8h_source.html
@@ -166,7 +166,7 @@
<a name="l00170"></a>00170
<a name="l00171"></a>00171 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__config_8c_source.html b/html/sinfo__wavecal__config_8c_source.html
index 1658d4d..717148c 100644
--- a/html/sinfo__wavecal__config_8c_source.html
+++ b/html/sinfo__wavecal__config_8c_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2012/03/03 10:35:14 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.6 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -427,7 +427,7 @@
<a name="l00426"></a>00426
<a name="l00427"></a>00427 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__config_8h_source.html b/html/sinfo__wavecal__config_8h_source.html
index f52e51a..089d4cc 100644
--- a/html/sinfo__wavecal__config_8h_source.html
+++ b/html/sinfo__wavecal__config_8h_source.html
@@ -31,7 +31,7 @@
<a name="l00021"></a>00021 <span class="comment"> * $Author: amodigli $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2006/10/20 08:06:33 $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Revision: 1.1 $</span>
-<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00024"></a>00024 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/****************************************************************</span>
@@ -41,7 +41,7 @@
<a name="l00031"></a>00031 <span class="keywordtype">void</span>
<a name="l00032"></a>00032 sinfo_wavecal_config_add(cpl_parameterlist *list);
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__ini_8h_source.html b/html/sinfo__wavecal__ini_8h_source.html
index bf43fc9..1cea952 100644
--- a/html/sinfo__wavecal__ini_8h_source.html
+++ b/html/sinfo__wavecal__ini_8h_source.html
@@ -58,7 +58,7 @@
<a name="l00077"></a>00077
<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__ini__by__cpl_8c_source.html b/html/sinfo__wavecal__ini__by__cpl_8c_source.html
index b96192b..7e06b37 100644
--- a/html/sinfo__wavecal__ini__by__cpl_8c_source.html
+++ b/html/sinfo__wavecal__ini__by__cpl_8c_source.html
@@ -316,224 +316,229 @@
<a name="l00341"></a>00341 }
<a name="l00342"></a>00342
<a name="l00343"></a>00343
-<a name="l00344"></a>00344 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,REF_LINE_ARC ) )
+<a name="l00344"></a>00344 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,REF_LINE_OH ) )
<a name="l00345"></a>00345 {
-<a name="l00346"></a>00346 frame = cpl_frameset_find ( sof,REF_LINE_ARC );
+<a name="l00346"></a>00346 frame = cpl_frameset_find ( sof,REF_LINE_OH );
<a name="l00347"></a>00347 strcpy ( cfg -> lineList,cpl_frame_get_filename ( frame ) );
<a name="l00348"></a>00348 }
-<a name="l00349"></a>00349 <span class="keywordflow">else</span>
+<a name="l00349"></a>00349 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,REF_LINE_ARC ) )
<a name="l00350"></a>00350 {
-<a name="l00351"></a>00351 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a> ( <span class="stringliteral">"Frame %s not found! Exit!"</span>, REF_LINE_ARC );
-<a name="l00352"></a>00352 ( *status ) ++;
-<a name="l00353"></a>00353 <span class="keywordflow">return</span>;
-<a name="l00354"></a>00354 }
-<a name="l00355"></a>00355
-<a name="l00356"></a>00356
-<a name="l00357"></a>00357 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_SLIT_POS_GUESS ) )
-<a name="l00358"></a>00358 {
-<a name="l00359"></a>00359 frame = cpl_frameset_find ( sof,PRO_SLIT_POS_GUESS );
-<a name="l00360"></a>00360 strcpy ( cfg -> slitposGuessName,cpl_frame_get_filename ( frame ) );
-<a name="l00361"></a>00361 }
-<a name="l00362"></a>00362 <span class="keywordflow">else</span>
+<a name="l00351"></a>00351 frame = cpl_frameset_find ( sof,REF_LINE_ARC );
+<a name="l00352"></a>00352 strcpy ( cfg -> lineList,cpl_frame_get_filename ( frame ) );
+<a name="l00353"></a>00353 }
+<a name="l00354"></a>00354 <span class="keywordflow">else</span>
+<a name="l00355"></a>00355 {
+<a name="l00356"></a>00356 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a> ( <span class="stringliteral">"Frame %s not found! Exit!"</span>, REF_LINE_ARC );
+<a name="l00357"></a>00357 ( *status ) ++;
+<a name="l00358"></a>00358 <span class="keywordflow">return</span>;
+<a name="l00359"></a>00359 }
+<a name="l00360"></a>00360
+<a name="l00361"></a>00361
+<a name="l00362"></a>00362 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_SLIT_POS_GUESS ) )
<a name="l00363"></a>00363 {
-<a name="l00364"></a>00364 sinfo_msg ( <span class="stringliteral">"Frame %s not found!"</span>, PRO_SLIT_POS_GUESS );
-<a name="l00365"></a>00365 }
-<a name="l00366"></a>00366
-<a name="l00367"></a>00367 <span class="keywordflow">if</span> ( cfg -> writeParInd ==0 )
+<a name="l00364"></a>00364 frame = cpl_frameset_find ( sof,PRO_SLIT_POS_GUESS );
+<a name="l00365"></a>00365 strcpy ( cfg -> slitposGuessName,cpl_frame_get_filename ( frame ) );
+<a name="l00366"></a>00366 }
+<a name="l00367"></a>00367 <span class="keywordflow">else</span>
<a name="l00368"></a>00368 {
-<a name="l00369"></a>00369 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_WAVE_PAR_LIST ) )
-<a name="l00370"></a>00370 {
-<a name="l00371"></a>00371 frame = cpl_frameset_find ( sof,PRO_WAVE_PAR_LIST );
-<a name="l00372"></a>00372 strcpy ( cfg -> paramsList,cpl_frame_get_filename ( frame ) );
-<a name="l00373"></a>00373 }
-<a name="l00374"></a>00374 <span class="keywordflow">else</span>
+<a name="l00369"></a>00369 sinfo_msg ( <span class="stringliteral">"Frame %s not found!"</span>, PRO_SLIT_POS_GUESS );
+<a name="l00370"></a>00370 }
+<a name="l00371"></a>00371
+<a name="l00372"></a>00372 <span class="keywordflow">if</span> ( cfg -> writeParInd ==0 )
+<a name="l00373"></a>00373 {
+<a name="l00374"></a>00374 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_WAVE_PAR_LIST ) )
<a name="l00375"></a>00375 {
-<a name="l00376"></a>00376 sinfo_msg ( <span class="stringliteral">"Frame %s not found!"</span>, PRO_WAVE_PAR_LIST );
-<a name="l00377"></a>00377 ( *status ) ++;
-<a name="l00378"></a>00378 return ;
-<a name="l00379"></a>00379 }
-<a name="l00380"></a>00380
-<a name="l00381"></a>00381 }
-<a name="l00382"></a>00382 <span class="keywordflow">else</span>
-<a name="l00383"></a>00383 {
-<a name="l00384"></a>00384
-<a name="l00385"></a>00385 strcpy ( cfg -> paramsList, WAVECAL_FIT_PARAMS_OUT_FILENAME );
-<a name="l00386"></a>00386 sinfo_msg ( <span class="stringliteral">"cfg -> paramsList %s not given\n"</span>,cfg -> paramsList );
-<a name="l00387"></a>00387
-<a name="l00388"></a>00388 }
+<a name="l00376"></a>00376 frame = cpl_frameset_find ( sof,PRO_WAVE_PAR_LIST );
+<a name="l00377"></a>00377 strcpy ( cfg -> paramsList,cpl_frame_get_filename ( frame ) );
+<a name="l00378"></a>00378 }
+<a name="l00379"></a>00379 <span class="keywordflow">else</span>
+<a name="l00380"></a>00380 {
+<a name="l00381"></a>00381 sinfo_msg ( <span class="stringliteral">"Frame %s not found!"</span>, PRO_WAVE_PAR_LIST );
+<a name="l00382"></a>00382 ( *status ) ++;
+<a name="l00383"></a>00383 return ;
+<a name="l00384"></a>00384 }
+<a name="l00385"></a>00385
+<a name="l00386"></a>00386 }
+<a name="l00387"></a>00387 <span class="keywordflow">else</span>
+<a name="l00388"></a>00388 {
<a name="l00389"></a>00389
-<a name="l00390"></a>00390
-<a name="l00391"></a>00391
-<a name="l00392"></a>00392 <span class="keywordflow">if</span> ( cfg -> calibIndicator == 0 )
-<a name="l00393"></a>00393 {
-<a name="l00394"></a>00394 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_WAVE_COEF_SLIT ) )
-<a name="l00395"></a>00395 {
-<a name="l00396"></a>00396 frame = cpl_frameset_find ( sof,PRO_WAVE_COEF_SLIT );
-<a name="l00397"></a>00397 strcpy ( cfg -> coeffsName,cpl_frame_get_filename ( frame ) );
-<a name="l00398"></a>00398 }
-<a name="l00399"></a>00399 <span class="keywordflow">else</span>
+<a name="l00390"></a>00390 strcpy ( cfg -> paramsList, WAVECAL_FIT_PARAMS_OUT_FILENAME );
+<a name="l00391"></a>00391 sinfo_msg ( <span class="stringliteral">"cfg -> paramsList %s not given\n"</span>,cfg -> paramsList );
+<a name="l00392"></a>00392
+<a name="l00393"></a>00393 }
+<a name="l00394"></a>00394
+<a name="l00395"></a>00395
+<a name="l00396"></a>00396
+<a name="l00397"></a>00397 <span class="keywordflow">if</span> ( cfg -> calibIndicator == 0 )
+<a name="l00398"></a>00398 {
+<a name="l00399"></a>00399 <span class="keywordflow">if</span> ( NULL != cpl_frameset_find ( sof,PRO_WAVE_COEF_SLIT ) )
<a name="l00400"></a>00400 {
-<a name="l00401"></a>00401 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a> ( <span class="stringliteral">"Frame %s not found! Exit!"</span>, PRO_WAVE_COEF_SLIT );
-<a name="l00402"></a>00402 ( *status ) ++;
-<a name="l00403"></a>00403 <span class="keywordflow">return</span>;
-<a name="l00404"></a>00404 }
-<a name="l00405"></a>00405 }
-<a name="l00406"></a>00406 <span class="keywordflow">else</span>
-<a name="l00407"></a>00407 {
-<a name="l00408"></a>00408
-<a name="l00409"></a>00409 strcpy ( cfg -> coeffsName, WAVECAL_COEFF_SLIT_OUT_FILENAME );
-<a name="l00410"></a>00410 sinfo_msg ( <span class="stringliteral">"cfg -> coeffsName %s not given\n"</span>,cfg -> coeffsName );
-<a name="l00411"></a>00411
-<a name="l00412"></a>00412 }
+<a name="l00401"></a>00401 frame = cpl_frameset_find ( sof,PRO_WAVE_COEF_SLIT );
+<a name="l00402"></a>00402 strcpy ( cfg -> coeffsName,cpl_frame_get_filename ( frame ) );
+<a name="l00403"></a>00403 }
+<a name="l00404"></a>00404 <span class="keywordflow">else</span>
+<a name="l00405"></a>00405 {
+<a name="l00406"></a>00406 <a class="code" href="group__sinfo__msg.html#ga207c781e45c0904f20faa13fdf08c789" title="Print an error message.">sinfo_msg_error</a> ( <span class="stringliteral">"Frame %s not found! Exit!"</span>, PRO_WAVE_COEF_SLIT );
+<a name="l00407"></a>00407 ( *status ) ++;
+<a name="l00408"></a>00408 <span class="keywordflow">return</span>;
+<a name="l00409"></a>00409 }
+<a name="l00410"></a>00410 }
+<a name="l00411"></a>00411 <span class="keywordflow">else</span>
+<a name="l00412"></a>00412 {
<a name="l00413"></a>00413
-<a name="l00414"></a>00414 strcpy ( cfg -> outName, WAVECAL_OUT_FILENAME );
-<a name="l00415"></a>00415 strcpy ( cfg -> slitposName, WAVECAL_SLIT_POS_OUT_FILENAME );
+<a name="l00414"></a>00414 strcpy ( cfg -> coeffsName, WAVECAL_COEFF_SLIT_OUT_FILENAME );
+<a name="l00415"></a>00415 sinfo_msg ( <span class="stringliteral">"cfg -> coeffsName %s not given\n"</span>,cfg -> coeffsName );
<a name="l00416"></a>00416
-<a name="l00417"></a>00417 <span class="keywordflow">return</span>;
-<a name="l00418"></a>00418 }
-<a name="l00419"></a>00419
-<a name="l00420"></a>00420
-<a name="l00421"></a>00421 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00422"></a>00422 parse_section_findlines ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
-<a name="l00423"></a>00423 {
+<a name="l00417"></a>00417 }
+<a name="l00418"></a>00418
+<a name="l00419"></a>00419 strcpy ( cfg -> outName, WAVECAL_OUT_FILENAME );
+<a name="l00420"></a>00420 strcpy ( cfg -> slitposName, WAVECAL_SLIT_POS_OUT_FILENAME );
+<a name="l00421"></a>00421
+<a name="l00422"></a>00422 <span class="keywordflow">return</span>;
+<a name="l00423"></a>00423 }
<a name="l00424"></a>00424
-<a name="l00425"></a>00425 cpl_parameter* p;
-<a name="l00426"></a>00426
-<a name="l00427"></a>00427 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.calib_indicator"</span> );
-<a name="l00428"></a>00428 cfg -> calibIndicator = cpl_parameter_get_bool ( p );
+<a name="l00425"></a>00425
+<a name="l00426"></a>00426 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00427"></a>00427 parse_section_findlines ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
+<a name="l00428"></a>00428 {
<a name="l00429"></a>00429
-<a name="l00430"></a>00430 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.min_diff"</span> );
-<a name="l00431"></a>00431 cfg -> mindiff = cpl_parameter_get_double ( p );
-<a name="l00432"></a>00432
-<a name="l00433"></a>00433 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.half_width"</span> );
-<a name="l00434"></a>00434 cfg -> halfWidth = cpl_parameter_get_int ( p );
-<a name="l00435"></a>00435
-<a name="l00436"></a>00436 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.sigma"</span> );
-<a name="l00437"></a>00437 cfg -> sigma = cpl_parameter_get_double ( p );
-<a name="l00438"></a>00438
-<a name="l00439"></a>00439 return ;
-<a name="l00440"></a>00440 }
-<a name="l00441"></a>00441
-<a name="l00442"></a>00442 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00443"></a>00443 parse_section_wavecalib ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
-<a name="l00444"></a>00444 {
-<a name="l00445"></a>00445 cpl_parameter* p;
+<a name="l00430"></a>00430 cpl_parameter* p;
+<a name="l00431"></a>00431
+<a name="l00432"></a>00432 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.calib_indicator"</span> );
+<a name="l00433"></a>00433 cfg -> calibIndicator = cpl_parameter_get_bool ( p );
+<a name="l00434"></a>00434
+<a name="l00435"></a>00435 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.min_diff"</span> );
+<a name="l00436"></a>00436 cfg -> mindiff = cpl_parameter_get_double ( p );
+<a name="l00437"></a>00437
+<a name="l00438"></a>00438 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.half_width"</span> );
+<a name="l00439"></a>00439 cfg -> halfWidth = cpl_parameter_get_int ( p );
+<a name="l00440"></a>00440
+<a name="l00441"></a>00441 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.sigma"</span> );
+<a name="l00442"></a>00442 cfg -> sigma = cpl_parameter_get_double ( p );
+<a name="l00443"></a>00443
+<a name="l00444"></a>00444 return ;
+<a name="l00445"></a>00445 }
<a name="l00446"></a>00446
-<a name="l00447"></a>00447 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fwhm"</span> );
-<a name="l00448"></a>00448 cfg -> fwhm = cpl_parameter_get_double ( p );
-<a name="l00449"></a>00449
-<a name="l00450"></a>00450 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.min_amplitude"</span> );
-<a name="l00451"></a>00451 cfg -> minAmplitude = cpl_parameter_get_double ( p );
-<a name="l00452"></a>00452
-<a name="l00453"></a>00453 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.max_residual"</span> );
-<a name="l00454"></a>00454 cfg -> maxResidual = cpl_parameter_get_double ( p );
-<a name="l00455"></a>00455
-<a name="l00456"></a>00456 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.n_a_coefficients"</span> );
-<a name="l00457"></a>00457 cfg -> nrDispCoefficients = cpl_parameter_get_int ( p );
-<a name="l00458"></a>00458
-<a name="l00459"></a>00459 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.n_b_coefficients"</span> );
-<a name="l00460"></a>00460 cfg -> nrCoefCoefficients = cpl_parameter_get_int ( p );
-<a name="l00461"></a>00461
-<a name="l00462"></a>00462 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.sigma_factor"</span> );
-<a name="l00463"></a>00463 cfg -> sigmaFactor = cpl_parameter_get_double ( p );
-<a name="l00464"></a>00464
-<a name="l00465"></a>00465 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.write_coeffs_ind"</span> );
-<a name="l00466"></a>00466 cfg -> writeCoeffsInd = cpl_parameter_get_bool ( p );
-<a name="l00467"></a>00467
-<a name="l00468"></a>00468 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.write_par_ind"</span> );
-<a name="l00469"></a>00469 cfg -> writeParInd = cpl_parameter_get_bool ( p );
-<a name="l00470"></a>00470
-<a name="l00471"></a>00471 cfg -> nslitlets = NSLITLETS;
+<a name="l00447"></a>00447 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00448"></a>00448 parse_section_wavecalib ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
+<a name="l00449"></a>00449 {
+<a name="l00450"></a>00450 cpl_parameter* p;
+<a name="l00451"></a>00451
+<a name="l00452"></a>00452 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fwhm"</span> );
+<a name="l00453"></a>00453 cfg -> fwhm = cpl_parameter_get_double ( p );
+<a name="l00454"></a>00454
+<a name="l00455"></a>00455 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.min_amplitude"</span> );
+<a name="l00456"></a>00456 cfg -> minAmplitude = cpl_parameter_get_double ( p );
+<a name="l00457"></a>00457
+<a name="l00458"></a>00458 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.max_residual"</span> );
+<a name="l00459"></a>00459 cfg -> maxResidual = cpl_parameter_get_double ( p );
+<a name="l00460"></a>00460
+<a name="l00461"></a>00461 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.n_a_coefficients"</span> );
+<a name="l00462"></a>00462 cfg -> nrDispCoefficients = cpl_parameter_get_int ( p );
+<a name="l00463"></a>00463
+<a name="l00464"></a>00464 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.n_b_coefficients"</span> );
+<a name="l00465"></a>00465 cfg -> nrCoefCoefficients = cpl_parameter_get_int ( p );
+<a name="l00466"></a>00466
+<a name="l00467"></a>00467 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.sigma_factor"</span> );
+<a name="l00468"></a>00468 cfg -> sigmaFactor = cpl_parameter_get_double ( p );
+<a name="l00469"></a>00469
+<a name="l00470"></a>00470 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.write_coeffs_ind"</span> );
+<a name="l00471"></a>00471 cfg -> writeCoeffsInd = cpl_parameter_get_bool ( p );
<a name="l00472"></a>00472
-<a name="l00473"></a>00473 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.pixel_dist"</span> );
-<a name="l00474"></a>00474 cfg -> pixeldist = cpl_parameter_get_int ( p );
+<a name="l00473"></a>00473 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.write_par_ind"</span> );
+<a name="l00474"></a>00474 cfg -> writeParInd = cpl_parameter_get_bool ( p );
<a name="l00475"></a>00475
-<a name="l00476"></a>00476 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.pixel_tol"</span> );
-<a name="l00477"></a>00477 cfg -> pixel_tolerance = cpl_parameter_get_double ( p );
-<a name="l00478"></a>00478
-<a name="l00479"></a>00479 }
+<a name="l00476"></a>00476 cfg -> nslitlets = NSLITLETS;
+<a name="l00477"></a>00477
+<a name="l00478"></a>00478 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.pixel_dist"</span> );
+<a name="l00479"></a>00479 cfg -> pixeldist = cpl_parameter_get_int ( p );
<a name="l00480"></a>00480
-<a name="l00481"></a>00481 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00482"></a>00482 parse_section_wavemap ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
-<a name="l00483"></a>00483 {
-<a name="l00484"></a>00484 cpl_parameter* p;
+<a name="l00481"></a>00481 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.pixel_tol"</span> );
+<a name="l00482"></a>00482 cfg -> pixel_tolerance = cpl_parameter_get_double ( p );
+<a name="l00483"></a>00483
+<a name="l00484"></a>00484 }
<a name="l00485"></a>00485
-<a name="l00486"></a>00486 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.wave_map_ind"</span> );
-<a name="l00487"></a>00487 cfg -> wavemapInd = cpl_parameter_get_bool ( p );
-<a name="l00488"></a>00488
-<a name="l00489"></a>00489 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.mag_factor"</span> );
-<a name="l00490"></a>00490 cfg -> magFactor = cpl_parameter_get_int ( p );
-<a name="l00491"></a>00491
-<a name="l00492"></a>00492
-<a name="l00493"></a>00493 }
-<a name="l00494"></a>00494
-<a name="l00495"></a>00495 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00496"></a>00496 parse_section_fitslits ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
-<a name="l00497"></a>00497 {
-<a name="l00498"></a>00498
-<a name="l00499"></a>00499 cpl_parameter* p;
-<a name="l00500"></a>00500
-<a name="l00501"></a>00501 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.slit_pos_indicator"</span> );
-<a name="l00502"></a>00502 cfg -> slitposIndicator = cpl_parameter_get_bool ( p );
+<a name="l00486"></a>00486 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00487"></a>00487 parse_section_wavemap ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
+<a name="l00488"></a>00488 {
+<a name="l00489"></a>00489 cpl_parameter* p;
+<a name="l00490"></a>00490
+<a name="l00491"></a>00491 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.wave_map_ind"</span> );
+<a name="l00492"></a>00492 cfg -> wavemapInd = cpl_parameter_get_bool ( p );
+<a name="l00493"></a>00493
+<a name="l00494"></a>00494 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.mag_factor"</span> );
+<a name="l00495"></a>00495 cfg -> magFactor = cpl_parameter_get_int ( p );
+<a name="l00496"></a>00496
+<a name="l00497"></a>00497
+<a name="l00498"></a>00498 }
+<a name="l00499"></a>00499
+<a name="l00500"></a>00500 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00501"></a>00501 parse_section_fitslits ( wave_config * cfg,cpl_parameterlist* cpl_cfg )
+<a name="l00502"></a>00502 {
<a name="l00503"></a>00503
-<a name="l00504"></a>00504 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fit_boltz_indicator"</span> );
-<a name="l00505"></a>00505 cfg -> fitBoltzIndicator = cpl_parameter_get_bool ( p );
-<a name="l00506"></a>00506
-<a name="l00507"></a>00507 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fit_edge_indicator"</span> );
-<a name="l00508"></a>00508 cfg -> fitEdgeIndicator = cpl_parameter_get_bool ( p );
-<a name="l00509"></a>00509
-<a name="l00510"></a>00510 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.estimate_indicator"</span> );
-<a name="l00511"></a>00511 cfg -> estimateIndicator = cpl_parameter_get_bool ( p );
-<a name="l00512"></a>00512
-<a name="l00513"></a>00513 cfg -> loPos = 750;
-<a name="l00514"></a>00514 cfg -> hiPos = 1000;
-<a name="l00515"></a>00515
-<a name="l00516"></a>00516 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.box_length"</span> );
-<a name="l00517"></a>00517 cfg -> boxLength = cpl_parameter_get_int ( p );
-<a name="l00518"></a>00518
-<a name="l00519"></a>00519 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.y_box"</span> );
-<a name="l00520"></a>00520 cfg -> yBox = cpl_parameter_get_double ( p );
-<a name="l00521"></a>00521
-<a name="l00522"></a>00522 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.diff_tol"</span> );
-<a name="l00523"></a>00523 cfg -> diffTol = cpl_parameter_get_double ( p );
-<a name="l00524"></a>00524
-<a name="l00525"></a>00525 <span class="comment">/* input CDB</span>
-<a name="l00526"></a>00526 <span class="comment"> p = cpl_parameterlist_find(cpl_cfg, "sinfoni.wavecal.slit_pos_guess_name");</span>
-<a name="l00527"></a>00527 <span class="comment"> strcpy(cfg -> slitposGuessName, cpl_parameter_get_default_string(p));</span>
-<a name="l00528"></a>00528 <span class="comment"> */</span>
+<a name="l00504"></a>00504 cpl_parameter* p;
+<a name="l00505"></a>00505
+<a name="l00506"></a>00506 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.slit_pos_indicator"</span> );
+<a name="l00507"></a>00507 cfg -> slitposIndicator = cpl_parameter_get_bool ( p );
+<a name="l00508"></a>00508
+<a name="l00509"></a>00509 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fit_boltz_indicator"</span> );
+<a name="l00510"></a>00510 cfg -> fitBoltzIndicator = cpl_parameter_get_bool ( p );
+<a name="l00511"></a>00511
+<a name="l00512"></a>00512 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.fit_edge_indicator"</span> );
+<a name="l00513"></a>00513 cfg -> fitEdgeIndicator = cpl_parameter_get_bool ( p );
+<a name="l00514"></a>00514
+<a name="l00515"></a>00515 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.estimate_indicator"</span> );
+<a name="l00516"></a>00516 cfg -> estimateIndicator = cpl_parameter_get_bool ( p );
+<a name="l00517"></a>00517
+<a name="l00518"></a>00518 cfg -> loPos = 750;
+<a name="l00519"></a>00519 cfg -> hiPos = 1000;
+<a name="l00520"></a>00520
+<a name="l00521"></a>00521 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.box_length"</span> );
+<a name="l00522"></a>00522 cfg -> boxLength = cpl_parameter_get_int ( p );
+<a name="l00523"></a>00523
+<a name="l00524"></a>00524 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.y_box"</span> );
+<a name="l00525"></a>00525 cfg -> yBox = cpl_parameter_get_double ( p );
+<a name="l00526"></a>00526
+<a name="l00527"></a>00527 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.diff_tol"</span> );
+<a name="l00528"></a>00528 cfg -> diffTol = cpl_parameter_get_double ( p );
<a name="l00529"></a>00529
-<a name="l00530"></a>00530 }
-<a name="l00531"></a>00531
-<a name="l00532"></a>00532 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00533"></a>00533 parse_section_qclog ( wave_config * cfg, cpl_parameterlist* cpl_cfg )
-<a name="l00534"></a>00534 {
-<a name="l00535"></a>00535 cpl_parameter* p;
+<a name="l00530"></a>00530 <span class="comment">/* input CDB</span>
+<a name="l00531"></a>00531 <span class="comment"> p = cpl_parameterlist_find(cpl_cfg, "sinfoni.wavecal.slit_pos_guess_name");</span>
+<a name="l00532"></a>00532 <span class="comment"> strcpy(cfg -> slitposGuessName, cpl_parameter_get_default_string(p));</span>
+<a name="l00533"></a>00533 <span class="comment"> */</span>
+<a name="l00534"></a>00534
+<a name="l00535"></a>00535 }
<a name="l00536"></a>00536
-<a name="l00537"></a>00537 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.qc_thresh_min"</span> );
-<a name="l00538"></a>00538 cfg -> qc_thresh_min = cpl_parameter_get_int ( p );
-<a name="l00539"></a>00539
-<a name="l00540"></a>00540
-<a name="l00541"></a>00541 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.qc_thresh_max"</span> );
-<a name="l00542"></a>00542 cfg -> qc_thresh_max = cpl_parameter_get_int ( p );
-<a name="l00543"></a>00543
+<a name="l00537"></a>00537 <span class="keyword">static</span> <span class="keywordtype">void</span>
+<a name="l00538"></a>00538 parse_section_qclog ( wave_config * cfg, cpl_parameterlist* cpl_cfg )
+<a name="l00539"></a>00539 {
+<a name="l00540"></a>00540 cpl_parameter* p;
+<a name="l00541"></a>00541
+<a name="l00542"></a>00542 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.qc_thresh_min"</span> );
+<a name="l00543"></a>00543 cfg -> qc_thresh_min = cpl_parameter_get_int ( p );
<a name="l00544"></a>00544
-<a name="l00545"></a>00545 }
-<a name="l00546"></a>00546
-<a name="l00547"></a>00547 <span class="keywordtype">void</span>
-<a name="l00548"></a>00548 sinfo_wavecal_free ( wave_config ** cfg )
-<a name="l00549"></a>00549 {
-<a name="l00550"></a>00550 <span class="keywordflow">if</span> ( *cfg != NULL )
-<a name="l00551"></a>00551 {
-<a name="l00552"></a>00552 sinfo_wave_cfg_destroy ( *cfg );
-<a name="l00553"></a>00553 *cfg=NULL;
-<a name="l00554"></a>00554 }
-<a name="l00555"></a>00555 <span class="keywordflow">return</span>;
-<a name="l00556"></a>00556
-<a name="l00557"></a>00557 }
-<a name="l00558"></a>00558
-<a name="l00559"></a>00559
+<a name="l00545"></a>00545
+<a name="l00546"></a>00546 p = cpl_parameterlist_find ( cpl_cfg, <span class="stringliteral">"sinfoni.wavecal.qc_thresh_max"</span> );
+<a name="l00547"></a>00547 cfg -> qc_thresh_max = cpl_parameter_get_int ( p );
+<a name="l00548"></a>00548
+<a name="l00549"></a>00549
+<a name="l00550"></a>00550 }
+<a name="l00551"></a>00551
+<a name="l00552"></a>00552 <span class="keywordtype">void</span>
+<a name="l00553"></a>00553 sinfo_wavecal_free ( wave_config ** cfg )
+<a name="l00554"></a>00554 {
+<a name="l00555"></a>00555 <span class="keywordflow">if</span> ( *cfg != NULL )
+<a name="l00556"></a>00556 {
+<a name="l00557"></a>00557 sinfo_wave_cfg_destroy ( *cfg );
+<a name="l00558"></a>00558 *cfg=NULL;
+<a name="l00559"></a>00559 }
+<a name="l00560"></a>00560 <span class="keywordflow">return</span>;
+<a name="l00561"></a>00561
+<a name="l00562"></a>00562 }
+<a name="l00563"></a>00563
+<a name="l00564"></a>00564
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wavecal__ini__by__cpl_8h_source.html b/html/sinfo__wavecal__ini__by__cpl_8h_source.html
index f8ee3a0..5118df5 100644
--- a/html/sinfo__wavecal__ini__by__cpl_8h_source.html
+++ b/html/sinfo__wavecal__ini__by__cpl_8h_source.html
@@ -54,7 +54,7 @@
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wcal__functions_8c_source.html b/html/sinfo__wcal__functions_8c_source.html
index 8d85c0e..5d9ff7b 100644
--- a/html/sinfo__wcal__functions_8c_source.html
+++ b/html/sinfo__wcal__functions_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:35:14 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.9 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028
@@ -415,7 +415,7 @@
<a name="l00412"></a>00412
<a name="l00413"></a>00413
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfo__wcal__functions_8h_source.html b/html/sinfo__wcal__functions_8h_source.html
index 0ee676d..4b34b0f 100644
--- a/html/sinfo__wcal__functions_8h_source.html
+++ b/html/sinfo__wcal__functions_8h_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2006/10/22 14:12:28 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.2 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef SINFO_WCAL_FUNCTIONS_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define SINFO_WCAL_FUNCTIONS_H</span>
@@ -77,7 +77,7 @@
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="preprocessor">#endif</span>
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__cube2ima_8c_source.html b/html/sinfoni_2sinfo__utl__cube2ima_8c_source.html
index e453a8e..a6170f2 100644
--- a/html/sinfoni_2sinfo__utl__cube2ima_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__cube2ima_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -239,7 +239,7 @@
<a name="l00242"></a>00242 <span class="keywordflow">return</span> 0 ;
<a name="l00243"></a>00243 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__cube2spectrum_8c_source.html b/html/sinfoni_2sinfo__utl__cube2spectrum_8c_source.html
index aeaa2b1..f5030c7 100644
--- a/html/sinfoni_2sinfo__utl__cube2spectrum_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__cube2spectrum_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.11 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -482,7 +482,7 @@
<a name="l00486"></a>00486
<a name="l00487"></a>00487 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__cube__arith_8c_source.html b/html/sinfoni_2sinfo__utl__cube__arith_8c_source.html
index 657c9d4..531f45b 100644
--- a/html/sinfoni_2sinfo__utl__cube__arith_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__cube__arith_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.14 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028
@@ -326,7 +326,7 @@
<a name="l00329"></a>00329 <span class="keywordflow">return</span> 0 ;
<a name="l00330"></a>00330 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__cube__combine_8c_source.html b/html/sinfoni_2sinfo__utl__cube__combine_8c_source.html
index 78c4e8e..6919431 100644
--- a/html/sinfoni_2sinfo__utl__cube__combine_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__cube__combine_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.20 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -374,7 +374,7 @@
<a name="l00379"></a>00379 }
<a name="l00380"></a>00380 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html b/html/sinfoni_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
index b6bb976..0d65f2e 100644
--- a/html/sinfoni_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__spectrum__divide__by__blackbody_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028
@@ -155,7 +155,7 @@
<a name="l00159"></a>00159 <span class="keywordflow">return</span> 0 ;
<a name="l00160"></a>00160 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/html/sinfoni_2sinfo__utl__spectrum__wavelength__shift_8c_source.html b/html/sinfoni_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
index 2ba38f8..d849823 100644
--- a/html/sinfoni_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
+++ b/html/sinfoni_2sinfo__utl__spectrum__wavelength__shift_8c_source.html
@@ -32,7 +32,7 @@
<a name="l00022"></a>00022 <span class="comment"> * $Author: amodigli $</span>
<a name="l00023"></a>00023 <span class="comment"> * $Date: 2012/03/03 10:17:31 $</span>
<a name="l00024"></a>00024 <span class="comment"> * $Revision: 1.8 $</span>
-<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_2 $</span>
+<a name="l00025"></a>00025 <span class="comment"> * $Name: sinfo-2_3_3 $</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
@@ -183,7 +183,7 @@
<a name="l00187"></a>00187 <span class="keywordflow">return</span> 0 ;
<a name="l00188"></a>00188 }
</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on 22 May 2012 for SINFONI Pipeline Reference Manual by
+<hr size="1"/><address style="text-align: right;"><small>Generated on 22 Apr 2013 for SINFONI Pipeline Reference Manual by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
diff --git a/irplib/Makefile.am b/irplib/Makefile.am
index 2a5e64e..d4172e4 100644
--- a/irplib/Makefile.am
+++ b/irplib/Makefile.am
@@ -30,7 +30,7 @@ MAINTAINERCLEANFILES = Makefile.in
endif
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes) $(GSL_INCLUDES)
noinst_HEADERS = irplib_flat.h \
irplib_calib.h \
@@ -82,6 +82,6 @@ libirplib_la_SOURCES = irplib_flat.c \
irplib_mkmaster.c \
irplib_ksigma_clip.c
-libirplib_la_LDFLAGS = $(CPL_LDFLAGS)
-libirplib_la_LIBADD = $(LIBCPLDFS) $(LIBCPLUI) $(LIBCPLDRS) $(LIBCPLCORE)
+libirplib_la_LDFLAGS = $(CPL_LDFLAGS) $(GSL_LDFLAGS)
+libirplib_la_LIBADD = $(LIBCPLDFS) $(LIBCPLUI) $(LIBCPLDRS) $(LIBCPLCORE) $(GSL_LIBS)
libirplib_la_DEPENDENCIES =
diff --git a/irplib/Makefile.in b/irplib/Makefile.in
index 19cb9dc..eed3f9f 100644
--- a/irplib/Makefile.in
+++ b/irplib/Makefile.in
@@ -302,7 +302,7 @@ AUTOMAKE_OPTIONS = 1.8 foreign
DISTCLEANFILES = *~
SUBDIRS = . tests
@MAINTAINER_MODE_TRUE at MAINTAINERCLEANFILES = Makefile.in
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes) $(GSL_INCLUDES)
noinst_HEADERS = irplib_flat.h \
irplib_calib.h \
irplib_cat.h \
@@ -351,8 +351,8 @@ libirplib_la_SOURCES = irplib_flat.c \
irplib_mkmaster.c \
irplib_ksigma_clip.c
-libirplib_la_LDFLAGS = $(CPL_LDFLAGS)
-libirplib_la_LIBADD = $(LIBCPLDFS) $(LIBCPLUI) $(LIBCPLDRS) $(LIBCPLCORE)
+libirplib_la_LDFLAGS = $(CPL_LDFLAGS) $(GSL_LDFLAGS)
+libirplib_la_LIBADD = $(LIBCPLDFS) $(LIBCPLUI) $(LIBCPLDRS) $(LIBCPLCORE) $(GSL_LIBS)
libirplib_la_DEPENDENCIES =
all: all-recursive
diff --git a/irplib/irplib_calib.c b/irplib/irplib_calib.c
index 35aef8c..4792cf3 100644
--- a/irplib/irplib_calib.c
+++ b/irplib/irplib_calib.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_calib.c,v 1.17 2009/02/17 08:05:25 amodigli Exp $
+/* $Id: irplib_calib.c,v 1.19 2013/03/01 10:26:22 llundin Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: amodigli $
- * $Date: 2009/02/17 08:05:25 $
- * $Revision: 1.17 $
- * $Name: sinfo-2_3_2 $
+ * $Author: llundin $
+ * $Date: 2013/03/01 10:26:22 $
+ * $Revision: 1.19 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -48,6 +48,18 @@ irplib_get_clean_mean_window(cpl_image* img,
double* clean_mean,
double* clean_stdev);
+/*-----------------------------------------------------------------------------
+ Defines
+ -----------------------------------------------------------------------------*/
+
+#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(6, 3, 0)
+#define IRPLIB_FRAMESET_GET cpl_frameset_get_position
+#else
+/* Remove this branch once CPL versions less than 6.3 are no longer supported */
+#define IRPLIB_FRAMESET_GET cpl_frameset_get_frame
+#endif
+
+
static double irplib_pfits_get_dit(const cpl_propertylist * plist);
static double irplib_pfits_get_exp_time(const cpl_propertylist* plist);
/*----------------------------------------------------------------------------*/
@@ -219,7 +231,7 @@ irplib_compute_gain(
double sig_on_dif=0;
double sig_of_dif=0;
- char* name=NULL;
+ const char* name=NULL;
int i=0;
int m=0;
@@ -241,8 +253,8 @@ irplib_compute_gain(
for(i=0;i<nfr;i++) {
- frm=cpl_frameset_get_frame(son,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(son,i);
+ name=cpl_frame_get_filename(frm);
plist=cpl_propertylist_load(name,0);
dit_ref=irplib_pfits_get_dit(plist);
exptime_ref=(double)irplib_pfits_get_exp_time(plist);
@@ -250,8 +262,8 @@ irplib_compute_gain(
cpl_vector_set(dit_on,i,dit_ref);
cpl_vector_set(exptime_on,i,exptime_ref);
- frm=cpl_frameset_get_frame(sof,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(sof,i);
+ name=cpl_frame_get_filename(frm);
plist=cpl_propertylist_load(name,0);
dit_ref=irplib_pfits_get_dit(plist);
exptime_ref=(double)irplib_pfits_get_exp_time(plist);
@@ -274,12 +286,12 @@ irplib_compute_gain(
cpl_table_new_column(res_tbl,"gain", CPL_TYPE_DOUBLE);
for(i=0;i<nfr;i++) {
- frm=cpl_frameset_get_frame(son,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(son,i);
+ name=cpl_frame_get_filename(frm);
img_on1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
- frm=cpl_frameset_get_frame(sof,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(sof,i);
+ name=cpl_frame_get_filename(frm);
img_of1=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
@@ -289,14 +301,14 @@ irplib_compute_gain(
for(m=0;m<nfr; m++) {
if(m != i) {
- frm=cpl_frameset_get_frame(son,m);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(son,m);
+ name=cpl_frame_get_filename(frm);
dit_tmp=cpl_vector_get(dit_on,m);
exptime_tmp=cpl_vector_get(exptime_on,m);
if(dit_tmp == dit_ref && exptime_tmp == exptime_ref) {
img_on2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
- frm=cpl_frameset_get_frame(sof,m);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(sof,m);
+ name=cpl_frame_get_filename(frm);
img_of2=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
img_on_dif=cpl_image_subtract_create(img_on1,img_on2);
@@ -378,7 +390,7 @@ cpl_table* irplib_compute_linearity(cpl_frameset* son, cpl_frameset* sof)
double med=0;
double avg=0;
- char* name=NULL;
+ const char* name=NULL;
cpl_image* img=NULL;
cpl_vector* vec_adl=NULL;
cpl_vector* vec_dit=NULL;
@@ -409,15 +421,15 @@ cpl_table* irplib_compute_linearity(cpl_frameset* son, cpl_frameset* sof)
vec_dit=cpl_vector_new(nfr);
vec_adl=cpl_vector_new(nfr);
for(i=0;i<nfr;i++) {
- frm=cpl_frameset_get_frame(son,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(son,i);
+ name=cpl_frame_get_filename(frm);
img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
med_on=cpl_image_get_median(img);
avg_on=cpl_image_get_mean(img);
cpl_image_delete(img);
- frm=cpl_frameset_get_frame(sof,i);
- name=(char*)cpl_frame_get_filename(frm);
+ frm=IRPLIB_FRAMESET_GET(sof,i);
+ name=cpl_frame_get_filename(frm);
img=cpl_image_load(name,CPL_TYPE_FLOAT,0,0);
med_of=cpl_image_get_median(img);
avg_of=cpl_image_get_mean(img);
diff --git a/irplib/irplib_calib.h b/irplib/irplib_calib.h
index a05d5e9..59a0c5d 100644
--- a/irplib/irplib_calib.h
+++ b/irplib/irplib_calib.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/02/12 10:34:51 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_CALIB_H
diff --git a/irplib/irplib_cat.c b/irplib/irplib_cat.c
index 39300a2..060eb5d 100644
--- a/irplib/irplib_cat.c
+++ b/irplib/irplib_cat.c
@@ -22,7 +22,7 @@
* $Author: cgarcia $
* $Date: 2009/12/01 12:34:25 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_cat.h b/irplib/irplib_cat.h
index 7d9fe46..7dc6eaf 100644
--- a/irplib/irplib_cat.h
+++ b/irplib/irplib_cat.h
@@ -22,7 +22,7 @@
* $Author: cgarcia $
* $Date: 2009/12/16 14:49:52 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_CAT_H
diff --git a/irplib/irplib_distortion.c b/irplib/irplib_distortion.c
index 16938ce..5e15391 100644
--- a/irplib/irplib_distortion.c
+++ b/irplib/irplib_distortion.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_distortion.c,v 1.51 2012/02/03 15:08:14 llundin Exp $
+/* $Id: irplib_distortion.c,v 1.52 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2012/02/03 15:08:14 $
- * $Revision: 1.51 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.52 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_distortion.h b/irplib/irplib_distortion.h
index 54bdee0..8d07995 100644
--- a/irplib/irplib_distortion.h
+++ b/irplib/irplib_distortion.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_distortion.h,v 1.5 2006/07/26 14:47:34 yjung Exp $
+/* $Id: irplib_distortion.h,v 1.6 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: yjung $
- * $Date: 2006/07/26 14:47:34 $
- * $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.6 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_DISTORTION_H
diff --git a/irplib/irplib_flat.c b/irplib/irplib_flat.c
index 3ea57c7..9837769 100644
--- a/irplib/irplib_flat.c
+++ b/irplib/irplib_flat.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2007/08/07 12:15:41 $
* $Revision: 1.15 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_flat.h b/irplib/irplib_flat.h
index 62d855a..2fc2fb1 100644
--- a/irplib/irplib_flat.h
+++ b/irplib/irplib_flat.h
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2005/09/15 11:47:16 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_FLAT_H
diff --git a/irplib/irplib_framelist.c b/irplib/irplib_framelist.c
index d3ac8d6..810da08 100644
--- a/irplib/irplib_framelist.c
+++ b/irplib/irplib_framelist.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_framelist.c,v 1.29 2012/02/03 13:55:14 llundin Exp $
+/* $Id: irplib_framelist.c,v 1.30 2013/02/27 16:05:13 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: llundin $
- * $Date: 2012/02/03 13:55:14 $
- * $Revision: 1.29 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/02/27 16:05:13 $
+ * $Revision: 1.30 $
+ * $Name: sinfo-2_3_3 $
*/
@@ -35,6 +35,10 @@
Includes
-----------------------------------------------------------------------------*/
+#include "irplib_framelist.h"
+#include "irplib_utils.h"
+#include <cpl.h>
+
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
@@ -42,10 +46,6 @@
#include <math.h>
#include <assert.h>
-#include <cpl.h>
-
-#include "irplib_framelist.h"
-
/*-----------------------------------------------------------------------------
New types
@@ -455,8 +455,9 @@ int irplib_framelist_get_size(const irplib_framelist * self)
/*----------------------------------------------------------------------------*/
cpl_frame * irplib_framelist_get(irplib_framelist * self, int pos)
{
+ IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
return (cpl_frame *)irplib_framelist_get_const(self, pos);
-
+ IRPLIB_DIAG_PRAGMA_POP;
}
@@ -529,9 +530,10 @@ cpl_propertylist * irplib_framelist_get_propertylist(irplib_framelist * self,
int pos)
{
+ IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
return (cpl_propertylist *)irplib_framelist_get_propertylist_const(self,
pos);
-
+ IRPLIB_DIAG_PRAGMA_POP;
}
diff --git a/irplib/irplib_framelist.h b/irplib/irplib_framelist.h
index 69ce19c..8edca2c 100644
--- a/irplib/irplib_framelist.h
+++ b/irplib/irplib_framelist.h
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2008/11/20 10:24:47 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_FRAMELIST_H
diff --git a/irplib/irplib_hist.c b/irplib/irplib_hist.c
index 90f96ff..bf86213 100644
--- a/irplib/irplib_hist.c
+++ b/irplib/irplib_hist.c
@@ -24,7 +24,7 @@
* $Id: irplib_hist.c,v 1.7 2009/10/15 14:02:18 kmirny Exp $
* $Date: 2009/10/15 14:02:18 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_hist.h b/irplib/irplib_hist.h
index 0a8ccf3..5b34eed 100644
--- a/irplib/irplib_hist.h
+++ b/irplib/irplib_hist.h
@@ -22,7 +22,7 @@
* $Author: lbilbao $
* $Date: 2007/09/07 14:23:50 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_HIST_H
diff --git a/irplib/irplib_ksigma_clip.c b/irplib/irplib_ksigma_clip.c
index c84874b..bad97b2 100644
--- a/irplib/irplib_ksigma_clip.c
+++ b/irplib/irplib_ksigma_clip.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/11/02 13:18:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_ksigma_clip.h b/irplib/irplib_ksigma_clip.h
index 58bf567..e45ce99 100644
--- a/irplib/irplib_ksigma_clip.h
+++ b/irplib/irplib_ksigma_clip.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/11/02 13:18:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_KSIGMA_CLIP_H
diff --git a/irplib/irplib_ksigma_clip_body.h b/irplib/irplib_ksigma_clip_body.h
index 033c835..0e21107 100644
--- a/irplib/irplib_ksigma_clip_body.h
+++ b/irplib/irplib_ksigma_clip_body.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/11/02 13:18:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#define TYPE_ADD(a) CONCAT2X(a, CPL_TYPE)
diff --git a/irplib/irplib_match_cats.c b/irplib/irplib_match_cats.c
index c37c750..bc18c77 100644
--- a/irplib/irplib_match_cats.c
+++ b/irplib/irplib_match_cats.c
@@ -22,7 +22,7 @@
* $Author: cgarcia $
* $Date: 2009/12/18 10:44:48 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_match_cats.h b/irplib/irplib_match_cats.h
index 99ed5ce..707ec96 100644
--- a/irplib/irplib_match_cats.h
+++ b/irplib/irplib_match_cats.h
@@ -22,7 +22,7 @@
* $Author: cgarcia $
* $Date: 2009/12/18 10:44:48 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_MATCH_CATS_H
diff --git a/irplib/irplib_mkmaster.c b/irplib/irplib_mkmaster.c
index dbb26bf..9a4e08a 100644
--- a/irplib/irplib_mkmaster.c
+++ b/irplib/irplib_mkmaster.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_mkmaster.c,v 1.5 2012/01/12 14:29:41 amodigli Exp $
+/* $Id: irplib_mkmaster.c,v 1.6 2013/02/27 16:00:51 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: amodigli $
- * $Date: 2012/01/12 14:29:41 $
- * $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/02/27 16:00:51 $
+ * $Revision: 1.6 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -401,6 +401,8 @@ irplib_mkmaster_dark_qc(const cpl_imagelist* raw_images,
/* UVES specific stuff: may be this function should not be put in irplib
irplib_mdark_region_qc(current_dark, parameters, raw_images, recipe_id,qclog);
*/
+ /* FIXME: still safe if irplib_mdark_region_qc is commented in? */
+ cpl_image_delete(current_dark);
}
}
return cpl_error_get_code();
diff --git a/irplib/irplib_mkmaster.h b/irplib/irplib_mkmaster.h
index 27f35dd..8c3a99d 100644
--- a/irplib/irplib_mkmaster.h
+++ b/irplib/irplib_mkmaster.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/11/02 13:17:25 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_MKMASTER_H
diff --git a/irplib/irplib_oddeven.c b/irplib/irplib_oddeven.c
index f19b293..f410fd1 100644
--- a/irplib/irplib_oddeven.c
+++ b/irplib/irplib_oddeven.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2012/01/12 11:50:41 $
* $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_oddeven.h b/irplib/irplib_oddeven.h
index 70fc11f..8421d5e 100644
--- a/irplib/irplib_oddeven.h
+++ b/irplib/irplib_oddeven.h
@@ -22,7 +22,7 @@
* $Author: yjung $
* $Date: 2006/10/06 20:46:04 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_ODDEVEN_H
diff --git a/irplib/irplib_plugin.c b/irplib/irplib_plugin.c
index feba345..521adb7 100644
--- a/irplib/irplib_plugin.c
+++ b/irplib/irplib_plugin.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2012/02/03 14:19:06 $
* $Revision: 1.39 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
diff --git a/irplib/irplib_plugin.h b/irplib/irplib_plugin.h
index 434d905..9e12640 100644
--- a/irplib/irplib_plugin.h
+++ b/irplib/irplib_plugin.h
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2012/01/11 08:03:37 $
* $Revision: 1.23 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_PLUGIN_H
diff --git a/irplib/irplib_polynomial.c b/irplib/irplib_polynomial.c
index ecd0abf..04df4ba 100644
--- a/irplib/irplib_polynomial.c
+++ b/irplib/irplib_polynomial.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_polynomial.c,v 1.34 2012/02/03 14:54:06 llundin Exp $
+/* $Id: irplib_polynomial.c,v 1.35 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2004 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2012/02/03 14:54:06 $
- * $Revision: 1.34 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.35 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_polynomial.h b/irplib/irplib_polynomial.h
index 78c947d..cea1c13 100644
--- a/irplib/irplib_polynomial.h
+++ b/irplib/irplib_polynomial.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_polynomial.h,v 1.9 2012/01/12 10:40:21 llundin Exp $
+/* $Id: irplib_polynomial.h,v 1.10 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2007 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2012/01/12 10:40:21 $
- * $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.10 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_POLYNOMIAL_H
diff --git a/irplib/irplib_ppm.c b/irplib/irplib_ppm.c
index 5f74061..5c30b1e 100644
--- a/irplib/irplib_ppm.c
+++ b/irplib/irplib_ppm.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_ppm.c,v 1.30 2011/11/23 13:58:45 yjung Exp $
+/* $Id: irplib_ppm.c,v 1.31 2012/06/11 07:24:09 llundin Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: yjung $
- * $Date: 2011/11/23 13:58:45 $
- * $Revision: 1.30 $
- * $Name: sinfo-2_3_2 $
+ * $Author: llundin $
+ * $Date: 2012/06/11 07:24:09 $
+ * $Revision: 1.31 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -440,7 +440,7 @@ static cpl_vector * irplib_ppm_detect_lines(
while ((max = cpl_vector_get_max(spec_loc)) > threshold) {
/* Find the max position */
max_ind = 0 ;
- while (pspec_loc[max_ind]<max && max_ind<spec_loc_sz) max_ind++ ;
+ while (max_ind < spec_loc_sz && pspec_loc[max_ind] < max) max_ind++ ;
if (max_ind == spec_loc_sz) {
cpl_msg_error(cpl_func, "Cannot find maximum") ;
cpl_vector_delete(spec_loc) ;
diff --git a/irplib/irplib_ppm.h b/irplib/irplib_ppm.h
index f531d0f..d19e7b9 100644
--- a/irplib/irplib_ppm.h
+++ b/irplib/irplib_ppm.h
@@ -22,7 +22,7 @@
* $Author: yjung $
* $Date: 2007/07/23 09:27:07 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_PPM_H
diff --git a/irplib/irplib_slitpos.c b/irplib/irplib_slitpos.c
index 37d3e63..3ab07dd 100644
--- a/irplib/irplib_slitpos.c
+++ b/irplib/irplib_slitpos.c
@@ -22,7 +22,7 @@
* $Author: yjung $
* $Date: 2011/11/23 13:58:45 $
* $Revision: 1.30 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_slitpos.h b/irplib/irplib_slitpos.h
index be63807..3d8bd0b 100644
--- a/irplib/irplib_slitpos.h
+++ b/irplib/irplib_slitpos.h
@@ -22,7 +22,7 @@
* $Author: yjung $
* $Date: 2006/11/29 13:22:59 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_SLITPOS_H
diff --git a/irplib/irplib_spectrum.c b/irplib/irplib_spectrum.c
index 53dae07..a44d1bb 100644
--- a/irplib/irplib_spectrum.c
+++ b/irplib/irplib_spectrum.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2012/01/12 11:50:41 $
* $Revision: 1.29 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_spectrum.h b/irplib/irplib_spectrum.h
index 6babc08..7280b5e 100644
--- a/irplib/irplib_spectrum.h
+++ b/irplib/irplib_spectrum.h
@@ -22,7 +22,7 @@
* $Author: yjung $
* $Date: 2009/07/30 12:38:37 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_SPECTRUM_H
diff --git a/irplib/irplib_stdstar.c b/irplib/irplib_stdstar.c
index b051659..ec74986 100644
--- a/irplib/irplib_stdstar.c
+++ b/irplib/irplib_stdstar.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_stdstar.c,v 1.41 2012/05/04 13:58:12 cgarcia Exp $
+/* $Id: irplib_stdstar.c,v 1.45 2013/03/01 10:27:07 llundin Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: cgarcia $
- * $Date: 2012/05/04 13:58:12 $
- * $Revision: 1.41 $
- * $Name: sinfo-2_3_2 $
+ * $Author: llundin $
+ * $Date: 2013/03/01 10:27:07 $
+ * $Revision: 1.45 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -33,15 +33,25 @@
Includes
-----------------------------------------------------------------------------*/
+#include "irplib_stdstar.h"
+#include "irplib_utils.h"
+#include "irplib_wcs.h"
+#include <cpl.h>
+
#include <string.h>
#include <math.h>
#include <float.h>
-#include <cpl.h>
+/*-----------------------------------------------------------------------------
+ Defines
+ -----------------------------------------------------------------------------*/
-#include "irplib_stdstar.h"
-#include "irplib_utils.h"
-#include "irplib_wcs.h"
+#if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(6, 3, 0)
+#define IRPLIB_FRAMESET_GET_CONST cpl_frameset_get_position_const
+#else
+/* Remove this branch once CPL versions less than 6.3 are no longer supported */
+#define IRPLIB_FRAMESET_GET_CONST cpl_frameset_get_frame_const
+#endif
/*----------------------------------------------------------------------------*/
@@ -58,7 +68,7 @@
/*----------------------------------------------------------------------------*/
/**
@brief Write the ASCII catalogs as FITS files
- @param set_in Input frameset wher the product is registered
+ @param set_in Input frameset where the product is registered
@param set_raw Set of ASCII catalogs
@param recipe_name Recipe name
@param pro_cat PRO.CATG
@@ -66,7 +76,7 @@
@param package_name Usually PACKAGE "/" PACKAGE_VERSION
@param ins_name Instrument name
@param convert_ascii_table Conversion function
- @return 0 if ok, -1 in error case
+ @return CPL_ERROR_NONE if ok or else the relevant CPL error code
Every catalog will be written in a different extension, where EXTNAME
is the name of the catalog ASCII file name.
@@ -75,98 +85,97 @@
should be defined in each instrument
*/
/*----------------------------------------------------------------------------*/
-int irplib_stdstar_write_catalogs(
- cpl_frameset * set_in,
- const cpl_frameset * set_raw,
- const char * recipe_name,
- const char * pro_cat,
- const char * pro_type,
- const char * package_name,
- const char * ins_name,
- cpl_table * (*convert_ascii_table)(const char *))
+cpl_error_code
+irplib_stdstar_write_catalogs(cpl_frameset * set_in,
+ const cpl_frameset * set_raw,
+ const char * recipe_name,
+ const char * pro_cat,
+ const char * pro_type,
+ const char * package_name,
+ const char * ins_name,
+ cpl_table * (*convert_ascii_table)(const char *))
{
- cpl_table * out ;
- cpl_propertylist * plist ;
- cpl_propertylist * plist_ext ;
- cpl_parameterlist * parlist ;
- const char * cat_name ;
- char * out_name ;
- int nb_catalogs ;
- const cpl_frame * cur_frame ;
- int i ;
+ /* Number of catalogs */
+ const cpl_size nb_catalogs = cpl_frameset_get_size(set_raw);
+ cpl_propertylist * plist_ext;
+ char * out_name;
+ cpl_error_code error = CPL_ERROR_NONE;
+ cpl_size i;
/* Check entries */
- if (set_in == NULL) return CPL_ERROR_NULL_INPUT;
- if (set_raw == NULL) return CPL_ERROR_NULL_INPUT;
- if (recipe_name == NULL) return CPL_ERROR_NULL_INPUT;
- if (pro_cat == NULL) return CPL_ERROR_NULL_INPUT;
- if (ins_name == NULL) return CPL_ERROR_NULL_INPUT;
+ if (set_in == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+ if (set_raw == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+ if (recipe_name == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+ if (pro_cat == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+ if (ins_name == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+ if (convert_ascii_table == NULL) return
+ cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
/* Define the file name */
- out_name = cpl_sprintf("%s.fits", recipe_name) ;
+ out_name = cpl_sprintf("%s" CPL_DFS_FITS, recipe_name);
- /* Number of catalogs */
- nb_catalogs = cpl_frameset_get_size(set_raw) ;
-
- /* Get the catalog name */
- cur_frame = cpl_frameset_get_frame_const(set_raw, 0) ;
- cat_name = cpl_frame_get_filename(cur_frame) ;
-
- /* Create the output table */
- if ((out = convert_ascii_table(cat_name)) == NULL) {
- cpl_free(out_name) ;
- return CPL_ERROR_UNSPECIFIED;
- }
-
- /* Some keywords */
- plist = cpl_propertylist_new() ;
- cpl_propertylist_append_string(plist, "INSTRUME", ins_name) ;
- cpl_propertylist_append_string(plist, CPL_DFS_PRO_CATG, pro_cat) ;
- if (pro_type != NULL) {
- cpl_propertylist_append_string(plist, CPL_DFS_PRO_TYPE, pro_type) ;
- }
- plist_ext = cpl_propertylist_new() ;
- cpl_propertylist_append_string(plist_ext, "EXTNAME", cat_name) ;
-
- /* Write the table */
- parlist = cpl_parameterlist_new() ;
- cpl_dfs_save_table(set_in,
- NULL,
- parlist,
- set_raw,
- NULL,
- out,
- plist_ext,
- recipe_name,
- plist,
- NULL,
- package_name,
- out_name) ;
- cpl_parameterlist_delete(parlist) ;
- cpl_propertylist_delete(plist) ;
- cpl_propertylist_delete(plist_ext) ;
- cpl_table_delete(out) ;
+ plist_ext = cpl_propertylist_new();
- /* Append the next catalogs */
- for (i=1 ; i<nb_catalogs ; i++) {
+ /* Process the catalogs */
+ for (i = 0; i < nb_catalogs; i++) {
/* Get the catalog name */
- cur_frame = cpl_frameset_get_frame_const(set_raw, i) ;
- cat_name = cpl_frame_get_filename(cur_frame) ;
+ const cpl_frame * cur_frame = IRPLIB_FRAMESET_GET_CONST(set_raw, i);
+ const char * cat_name = cpl_frame_get_filename(cur_frame);
+
+ cpl_table * out = convert_ascii_table(cat_name);
/* Create the output table */
- if ((out = convert_ascii_table(cat_name)) == NULL) {
- cpl_free(out_name) ;
- return CPL_ERROR_UNSPECIFIED;
+ if (out == NULL) {
+ error = cpl_error_get_code() ? cpl_error_set_where(cpl_func)
+ : cpl_error_set(cpl_func, CPL_ERROR_UNSPECIFIED);
+ break;
}
- plist_ext = cpl_propertylist_new() ;
- cpl_propertylist_append_string(plist_ext, "EXTNAME", cat_name) ;
- cpl_table_save(out, NULL, plist_ext, out_name, CPL_IO_EXTEND) ;
- cpl_table_delete(out) ;
- cpl_propertylist_delete(plist_ext) ;
+ if (cpl_table_get_nrow(out) == 0) {
+ cpl_table_delete(out);
+ error = cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
+ "Empty catalogue %d in '%s'",
+ (int)i+1, cat_name);
+ break;
+ }
+
+ cpl_propertylist_update_string(plist_ext, "EXTNAME", cat_name);
+
+ /* Write the table */
+ if (i == 0) {
+ cpl_parameterlist * parlist = cpl_parameterlist_new();
+ cpl_propertylist * plist = cpl_propertylist_new();
+
+ /* Mandatory keywords */
+ cpl_propertylist_append_string(plist, "INSTRUME", ins_name);
+ cpl_propertylist_append_string(plist, CPL_DFS_PRO_CATG, pro_cat);
+ if (pro_type != NULL) {
+ cpl_propertylist_append_string(plist, CPL_DFS_PRO_TYPE,
+ pro_type);
+ }
+
+ error = cpl_dfs_save_table(set_in, NULL, parlist, set_raw, NULL,
+ out, plist_ext, recipe_name, plist,
+ NULL, package_name, out_name);
+ cpl_parameterlist_delete(parlist);
+ cpl_propertylist_delete(plist);
+ } else {
+ error = cpl_table_save(out, NULL, plist_ext, out_name,
+ CPL_IO_EXTEND);
+ }
+
+ cpl_table_delete(out);
+
+ if (error) {
+ (void)cpl_error_set_where(cpl_func);
+ break;
+ }
}
- cpl_free(out_name) ;
- return 0 ;
+
+ cpl_propertylist_delete(plist_ext);
+ cpl_free(out_name);
+
+ return error;
}
/*----------------------------------------------------------------------------*/
@@ -187,75 +196,75 @@ cpl_table * irplib_stdstar_load_catalog(
const char * filename,
const char * ext_name)
{
- int next ;
- cpl_propertylist * plist ;
- const char * cur_name ;
- cpl_table * out ;
- cpl_table * out_cur ;
- cpl_frame * cur_frame ;
- int i ;
+ int next;
+ cpl_propertylist * plist;
+ const char * cur_name;
+ cpl_table * out;
+ cpl_table * out_cur;
+ cpl_frame * cur_frame;
+ int i;
/* Check entries */
- if (filename == NULL) return NULL ;
- if (ext_name == NULL) return NULL ;
+ if (filename == NULL) return NULL;
+ if (ext_name == NULL) return NULL;
/* Initialise */
- out = NULL ;
+ out = NULL;
/* Get the number of extensions in the catalog */
- cur_frame = cpl_frame_new() ;
- cpl_frame_set_filename(cur_frame, filename) ;
- next = cpl_frame_get_nextensions(cur_frame) ;
- cpl_frame_delete(cur_frame) ;
+ cur_frame = cpl_frame_new();
+ cpl_frame_set_filename(cur_frame, filename);
+ next = cpl_frame_get_nextensions(cur_frame);
+ cpl_frame_delete(cur_frame);
/* Loop on the extentions */
- for (i=0 ; i<next ; i++) {
+ for (i=0; i<next; i++) {
/* Check the name of the current extension */
if ((plist = cpl_propertylist_load_regexp(filename, i+1, "EXTNAME",
0)) == NULL) {
cpl_msg_error(cpl_func, "Cannot load header of %d th extension",
i+1);
- return NULL ;
+ return NULL;
}
- cur_name = cpl_propertylist_get_string(plist, "EXTNAME") ;
+ cur_name = cpl_propertylist_get_string(plist, "EXTNAME");
/* Check the current extension */
if (!strcmp(cur_name, ext_name)) {
/* Load the table */
if (out == NULL) {
- out = cpl_table_load(filename, i+1, 1) ;
+ out = cpl_table_load(filename, i+1, 1);
cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
0, cpl_table_get_nrow(out),
cur_name);
if (out == NULL) {
- cpl_msg_error(cpl_func, "Cannot load extension %d", i+1) ;
- cpl_propertylist_delete(plist) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot load extension %d", i+1);
+ cpl_propertylist_delete(plist);
+ return NULL;
}
}
} else if (!strcmp(ext_name, "all")) {
/* Load the table and append it */
if (i==0) {
/* Load the first table */
- out = cpl_table_load(filename, i+1, 1) ;
+ out = cpl_table_load(filename, i+1, 1);
cpl_table_new_column(out, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
cpl_table_fill_column_window_string(out, IRPLIB_STDSTAR_CAT_COL,
0, cpl_table_get_nrow(out),
cur_name);
if (out == NULL) {
- cpl_msg_error(cpl_func, "Cannot load extension %d", i+1) ;
- cpl_propertylist_delete(plist) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot load extension %d", i+1);
+ cpl_propertylist_delete(plist);
+ return NULL;
}
} else {
/* Load the current table */
- out_cur = cpl_table_load(filename, i+1, 1) ;
+ out_cur = cpl_table_load(filename, i+1, 1);
if (out_cur == NULL) {
- cpl_msg_error(cpl_func, "Cannot load extension %d", i+1) ;
- cpl_table_delete(out) ;
- cpl_propertylist_delete(plist) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot load extension %d", i+1);
+ cpl_table_delete(out);
+ cpl_propertylist_delete(plist);
+ return NULL;
}
cpl_table_new_column(out_cur, IRPLIB_STDSTAR_CAT_COL, CPL_TYPE_STRING);
cpl_table_fill_column_window_string(out_cur, IRPLIB_STDSTAR_CAT_COL,
@@ -264,18 +273,18 @@ cpl_table * irplib_stdstar_load_catalog(
/* Append the table */
if (cpl_table_insert(out, out_cur,
cpl_table_get_nrow(out)) != CPL_ERROR_NONE) {
- cpl_msg_error(cpl_func, "Cannot merge table %d", i+1) ;
- cpl_table_delete(out) ;
- cpl_table_delete(out_cur) ;
- cpl_propertylist_delete(plist) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot merge table %d", i+1);
+ cpl_table_delete(out);
+ cpl_table_delete(out_cur);
+ cpl_propertylist_delete(plist);
+ return NULL;
}
- cpl_table_delete(out_cur) ;
+ cpl_table_delete(out_cur);
}
}
- cpl_propertylist_delete(plist) ;
+ cpl_propertylist_delete(plist);
}
- return out ;
+ return out;
}
/*----------------------------------------------------------------------------*/
@@ -342,34 +351,34 @@ int irplib_stdstar_select_stars_dist(
double dec,
double dist)
{
- double distance ;
- int nrows ;
- int i ;
+ double distance;
+ int nrows;
+ int i;
/* Check entries */
if (cat == NULL) return -1;
/* Get the number of selected rows */
- nrows = cpl_table_get_nrow(cat) ;
+ nrows = cpl_table_get_nrow(cat);
/* Check if the columns are there */
if (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
- cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_RA_COL) ;
- return -1 ;
+ cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_RA_COL);
+ return -1;
}
if (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
- cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_DEC_COL) ;
- return -1 ;
+ cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_DEC_COL);
+ return -1;
}
/* Compute distances of the selected rows */
- for (i=0 ; i<nrows ; i++) {
+ for (i=0; i<nrows; i++) {
if (cpl_table_is_selected(cat, i)) {
/* The row is selected - compute the distance */
distance = irplib_wcs_great_circle_dist(ra, dec,
cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
- if (distance > dist) cpl_table_unselect_row(cat, i) ;
+ if (distance > dist) cpl_table_unselect_row(cat, i);
}
}
return 0;
@@ -390,24 +399,24 @@ int irplib_stdstar_select_stars_mag(
const char * mag_colname)
{
/* Check entries */
- if (cat == NULL) return -1 ;
- if (mag_colname == NULL) return -1 ;
+ if (cat == NULL) return -1;
+ if (mag_colname == NULL) return -1;
/* Check that the table has the mag column */
if (!cpl_table_has_column(cat, mag_colname)) {
cpl_msg_error(cpl_func, "Column %s does not exist in the catalog",
- mag_colname) ;
- return -1 ;
+ mag_colname);
+ return -1;
}
/* Apply the selection */
if (cpl_table_and_selected_double(cat, mag_colname, CPL_NOT_GREATER_THAN,
98.0) <= 0) {
cpl_msg_error(cpl_func, "Column %s does not exist in the catalog",
- mag_colname) ;
- return -1 ;
+ mag_colname);
+ return -1;
}
- return 0 ;
+ return 0;
}
/*----------------------------------------------------------------------------*/
@@ -426,45 +435,45 @@ int irplib_stdstar_find_closest(
double ra,
double dec)
{
- double min_dist, distance ;
- int nrows ;
- int ind ;
- int i ;
+ double min_dist, distance;
+ int nrows;
+ int ind;
+ int i;
/* Check entries */
- if (cat == NULL) return -1 ;
+ if (cat == NULL) return -1;
/* Initialize */
- min_dist = 1000.0 ;
- ind = -1 ;
+ min_dist = 1000.0;
+ ind = -1;
/* Get the number of selected rows */
- nrows = cpl_table_get_nrow(cat) ;
+ nrows = cpl_table_get_nrow(cat);
/* Check if the columns are there */
if (!cpl_table_has_column(cat, IRPLIB_STDSTAR_RA_COL)) {
- cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_RA_COL) ;
- return -1 ;
+ cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_RA_COL);
+ return -1;
}
if (!cpl_table_has_column(cat, IRPLIB_STDSTAR_DEC_COL)) {
- cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_DEC_COL) ;
- return -1 ;
+ cpl_msg_error(cpl_func, "Missing %s column", IRPLIB_STDSTAR_DEC_COL);
+ return -1;
}
/* Compute distances of the selected rows */
- for (i=0 ; i<nrows ; i++) {
+ for (i=0; i<nrows; i++) {
if (cpl_table_is_selected(cat, i)) {
/* The row is selected - compute the distance */
distance = irplib_wcs_great_circle_dist(ra, dec,
cpl_table_get_double(cat, IRPLIB_STDSTAR_RA_COL, i, NULL),
cpl_table_get_double(cat, IRPLIB_STDSTAR_DEC_COL, i, NULL));
if (distance <= min_dist) {
- min_dist = distance ;
- ind = i ;
+ min_dist = distance;
+ ind = i;
}
}
}
- return ind ;
+ return ind;
}
/*----------------------------------------------------------------------------*/
@@ -481,7 +490,7 @@ int irplib_stdstar_find_closest(
@param star_ra the star RA from the catalog (output)
@param star_dec the star DEC from the catalog (output)
@param dist_am the distance in arc minutes
- @return CPL_ERROR_NONE if ok, or an appropiate error case otherwise
+ @return CPL_ERROR_NONE if ok or else the relevant CPL error code
The closest star to ra, dec with defined magnitude is search in all the
catalogues included in catfile.
@@ -504,9 +513,9 @@ cpl_error_code irplib_stdstar_find_star(
double dist_am)
{
cpl_errorstate prestate = cpl_errorstate_get();
- cpl_table * catal ;
- const double dist = dist_am / 60.0 ;
- int ind ;
+ cpl_table * catal;
+ const double dist = dist_am / 60.0;
+ int ind;
/* Check entries */
if (catfile == NULL) return cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
@@ -528,28 +537,28 @@ cpl_error_code irplib_stdstar_find_star(
/* Select stars with known magnitude */
if (irplib_stdstar_select_stars_mag(catal, band) == -1) {
- cpl_table_delete(catal) ;
+ cpl_table_delete(catal);
return cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
"Cannot select stars in that band");
}
/* Select stars within a given distance */
if (irplib_stdstar_select_stars_dist(catal, ra, dec, dist) == -1) {
- cpl_table_delete(catal) ;
+ cpl_table_delete(catal);
return cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
"Cannot select close stars");
}
/* Take the closest */
if ((ind=irplib_stdstar_find_closest(catal, ra, dec)) < 0) {
- cpl_table_delete(catal) ;
+ cpl_table_delete(catal);
return cpl_error_set_message(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
"Cannot get the closest star with "
"known %s magnitude",band);
}
if(mag != NULL)
- *mag = cpl_table_get_double(catal, band, ind, NULL) ;
+ *mag = cpl_table_get_double(catal, band, ind, NULL);
if(name != NULL)
{
@@ -604,47 +613,47 @@ cpl_vector * irplib_stdstar_get_conversion(
double gain,
double mag)
{
- double h = 6.62e-27 ;
- double c = 3e18 ;
- const cpl_vector * wave ;
- const cpl_vector * extr ;
- cpl_vector * out ;
- double factor ;
+ double h = 6.62e-27;
+ double c = 3e18;
+ const cpl_vector * wave;
+ const cpl_vector * extr;
+ cpl_vector * out;
+ double factor;
/* Test entries */
- if (spec == NULL) return NULL ;
- if (dit <= 0.0) return NULL ;
+ if (spec == NULL) return NULL;
+ if (dit <= 0.0) return NULL;
/* Get the extracted spectrum */
- wave = cpl_bivector_get_x_const(spec) ;
- extr = cpl_bivector_get_y_const(spec) ;
+ wave = cpl_bivector_get_x_const(spec);
+ extr = cpl_bivector_get_y_const(spec);
/* Get the spectrum */
- out = cpl_vector_duplicate(extr) ;
+ out = cpl_vector_duplicate(extr);
/* Divide by DIT */
- cpl_vector_divide_scalar(out, dit) ;
+ cpl_vector_divide_scalar(out, dit);
/* Divide by the surface */
- cpl_vector_divide_scalar(out, surface) ;
+ cpl_vector_divide_scalar(out, surface);
/* Multiply by the gain */
- cpl_vector_multiply_scalar(out, gain) ;
+ cpl_vector_multiply_scalar(out, gain);
/* Multiply by the difference magnitude */
- factor = pow(10, mag/2.5) ;
- cpl_vector_multiply_scalar(out, factor) ;
+ factor = pow(10, mag/2.5);
+ cpl_vector_multiply_scalar(out, factor);
/* Divide by the dispersion */
factor = (cpl_vector_get(wave, cpl_vector_get_size(wave)-1) -
- cpl_vector_get(wave, 0)) / cpl_vector_get_size(wave) ;
- cpl_vector_divide_scalar(out, factor) ;
+ cpl_vector_get(wave, 0)) / cpl_vector_get_size(wave);
+ cpl_vector_divide_scalar(out, factor);
/* Multiply by the energy of the photon */
- cpl_vector_multiply_scalar(out, h*c) ;
- cpl_vector_divide(out, wave) ;
+ cpl_vector_multiply_scalar(out, h*c);
+ cpl_vector_divide(out, wave);
- return out ;
+ return out;
}
/*----------------------------------------------------------------------------*/
@@ -661,91 +670,93 @@ cpl_vector * irplib_stdstar_get_mag_zero(
const cpl_vector * waves,
double cent_wl)
{
- double wmin, wmax, wstep ;
- int nb_sed ;
- const double * sed_x ;
- const double * sed_y ;
- cpl_bivector * sed_loc ;
- double * sed_loc_x ;
- double * sed_loc_y ;
- cpl_vector * out ;
- cpl_bivector * out_biv ;
- double f0_jan, f0_erg, cent_val ;
- int i ;
+ double wmin, wmax, wstep;
+ int nb_sed;
+ const double * sed_x;
+ const double * sed_y;
+ cpl_bivector * sed_loc;
+ double * sed_loc_x;
+ double * sed_loc_y;
+ cpl_vector * out;
+ cpl_bivector * out_biv;
+ double f0_jan, f0_erg, cent_val;
+ int i;
/* Test entries */
- if (sed == NULL) return NULL ;
- if (waves == NULL) return NULL ;
+ if (sed == NULL) return NULL;
+ if (waves == NULL) return NULL;
/* Initialise */
- nb_sed = cpl_bivector_get_size(sed) ;
- sed_x = cpl_bivector_get_x_data_const(sed) ;
- sed_y = cpl_bivector_get_y_data_const(sed) ;
- wstep = sed_x[1] - sed_x[0] ;
- wmin = cpl_vector_get(waves, 0) ;
- wmax = cpl_vector_get(waves, cpl_vector_get_size(waves)-1) ;
+ nb_sed = cpl_bivector_get_size(sed);
+ sed_x = cpl_bivector_get_x_data_const(sed);
+ sed_y = cpl_bivector_get_y_data_const(sed);
+ wstep = sed_x[1] - sed_x[0];
+ wmin = cpl_vector_get(waves, 0);
+ wmax = cpl_vector_get(waves, cpl_vector_get_size(waves)-1);
/* Expand sed with 0 to have it bigger than the required wavelengths */
- sed_loc = cpl_bivector_new(nb_sed + 4) ;
- sed_loc_x = cpl_bivector_get_x_data(sed_loc) ;
- sed_loc_y = cpl_bivector_get_y_data(sed_loc) ;
- for (i=0 ; i<nb_sed ; i++) {
- sed_loc_x[i+2] = sed_x[i] ;
- sed_loc_y[i+2] = sed_y[i] ;
+ sed_loc = cpl_bivector_new(nb_sed + 4);
+ sed_loc_x = cpl_bivector_get_x_data(sed_loc);
+ sed_loc_y = cpl_bivector_get_y_data(sed_loc);
+ for (i=0; i<nb_sed; i++) {
+ sed_loc_x[i+2] = sed_x[i];
+ sed_loc_y[i+2] = sed_y[i];
}
/* Low bound */
- sed_loc_x[1] = sed_loc_x[2] - wstep ;
+ sed_loc_x[1] = sed_loc_x[2] - wstep;
if (sed_loc_x[2] < wmin) {
- sed_loc_x[0] = sed_loc_x[1] - wstep ;
+ sed_loc_x[0] = sed_loc_x[1] - wstep;
} else {
- sed_loc_x[0] = wmin - wstep ;
+ sed_loc_x[0] = wmin - wstep;
}
- sed_loc_y[0] = 1e-20 ;
- sed_loc_y[1] = 1e-20 ;
+ sed_loc_y[0] = 1e-20;
+ sed_loc_y[1] = 1e-20;
/* High bound */
- sed_loc_x[nb_sed+2] = sed_loc_x[nb_sed+1] + wstep ;
+ sed_loc_x[nb_sed+2] = sed_loc_x[nb_sed+1] + wstep;
if (sed_loc_x[nb_sed+1] > wmax) {
- sed_loc_x[nb_sed+3] = sed_loc_x[nb_sed+2] + wstep ;
+ sed_loc_x[nb_sed+3] = sed_loc_x[nb_sed+2] + wstep;
} else {
- sed_loc_x[nb_sed+3] = wmax + wstep ;
+ sed_loc_x[nb_sed+3] = wmax + wstep;
}
- sed_loc_y[nb_sed+2] = 1e-20 ;
- sed_loc_y[nb_sed+3] = 1e-20 ;
+ sed_loc_y[nb_sed+2] = 1e-20;
+ sed_loc_y[nb_sed+3] = 1e-20;
/* Create the output bivector */
- out = cpl_vector_duplicate(waves) ;
- out_biv = cpl_bivector_wrap_vectors((cpl_vector*)waves, out) ;
-
+ out = cpl_vector_duplicate(waves);
+ IRPLIB_DIAG_PRAGMA_PUSH_IGN(-Wcast-qual);
+ /* the X entry (waves) is not modified by cpl_bivector_interpolate_linear */
+ out_biv = cpl_bivector_wrap_vectors((cpl_vector*)waves, out);
+ IRPLIB_DIAG_PRAGMA_POP;
/* Interpolate */
if (cpl_bivector_interpolate_linear(out_biv, sed_loc) != CPL_ERROR_NONE) {
- cpl_msg_error(cpl_func, "Cannot interpolate the wavelength") ;
- cpl_bivector_unwrap_vectors(out_biv) ;
- cpl_vector_delete(out) ;
- cpl_bivector_delete(sed_loc) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot interpolate the wavelength");
+ cpl_bivector_unwrap_vectors(out_biv);
+ cpl_vector_delete(out);
+ cpl_bivector_delete(sed_loc);
+ return NULL;
}
- cpl_bivector_unwrap_vectors(out_biv) ;
- cpl_bivector_delete(sed_loc) ;
+ cpl_bivector_unwrap_vectors(out_biv);
+ cpl_bivector_delete(sed_loc);
/* Compute f0_jan */
- f0_jan = 5513.15 / ( pow(cent_wl,3) * (exp(1.2848/cent_wl)-1) ) ;
+ f0_jan = 5513.15 / ( pow(cent_wl,3) * (exp(1.2848/cent_wl)-1) );
/* Convert f0 Jansky -> ergs/s/cm^2/Angstrom */
- f0_erg = f0_jan * 1e-26 * 1e7 * 3e18 / (1e4 * cent_wl*cent_wl*1e4*1e4) ;
+ f0_erg = f0_jan * 1e-26 * 1e7 * 3e18 / (1e4 * cent_wl*cent_wl*1e4*1e4);
/* Scale out so that the central value is f0 */
- cent_val = cpl_vector_get(out, cpl_vector_get_size(out)/2) ;
+ cent_val = cpl_vector_get(out, cpl_vector_get_size(out)/2);
if (cent_val <= 0.0) {
- cpl_msg_error(cpl_func, "Negative or 0 central value") ;
- cpl_vector_delete(out) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Negative or 0 central value");
+ cpl_vector_delete(out);
+ return NULL;
}
- cpl_vector_multiply_scalar(out, f0_erg/cent_val) ;
+ cpl_vector_multiply_scalar(out, f0_erg/cent_val);
/* Return */
- return out ;
+ return out;
}
/*----------------------------------------------------------------------------*/
@@ -763,61 +774,61 @@ cpl_bivector * irplib_stdstar_get_sed(
const char * seds_file,
const char * sptype)
{
- cpl_table * seds ;
- cpl_bivector * out ;
- cpl_vector * wave ;
- cpl_vector * sed ;
- cpl_bivector * tmp ;
- int nlines ;
+ cpl_table * seds;
+ cpl_bivector * out;
+ cpl_vector * wave;
+ cpl_vector * sed;
+ cpl_bivector * tmp;
+ int nlines;
/* Test entries */
- if (seds_file == NULL) return NULL ;
- if (sptype == NULL) return NULL ;
+ if (seds_file == NULL) return NULL;
+ if (sptype == NULL) return NULL;
/* Load the table */
if ((seds = cpl_table_load(seds_file, 1, 0)) == NULL) {
- cpl_msg_error(cpl_func, "Cannot load the table") ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot load the table");
+ return NULL;
}
/* Check if the column is there */
if (!cpl_table_has_column(seds, sptype)) {
- cpl_msg_error(cpl_func, "SED of the requested star not available") ;
- cpl_table_delete(seds) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "SED of the requested star not available");
+ cpl_table_delete(seds);
+ return NULL;
}
/* Get the nb lines */
- nlines = cpl_table_get_nrow(seds) ;
+ nlines = cpl_table_get_nrow(seds);
/* Get the wavelength as a vector */
if ((wave = cpl_vector_wrap(nlines,
cpl_table_get_data_double(seds, "Wavelength"))) == NULL) {
- cpl_msg_error(cpl_func, "Cannot get the Wavelength column") ;
- cpl_table_delete(seds) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot get the Wavelength column");
+ cpl_table_delete(seds);
+ return NULL;
}
/* Get the SED as a vector */
if ((sed = cpl_vector_wrap(nlines,
cpl_table_get_data_double(seds, sptype))) == NULL) {
- cpl_msg_error(cpl_func, "Cannot get the SED column") ;
- cpl_table_delete(seds) ;
- cpl_vector_unwrap(wave) ;
- return NULL ;
+ cpl_msg_error(cpl_func, "Cannot get the SED column");
+ cpl_table_delete(seds);
+ cpl_vector_unwrap(wave);
+ return NULL;
}
- tmp = cpl_bivector_wrap_vectors(wave, sed) ;
+ tmp = cpl_bivector_wrap_vectors(wave, sed);
/* Create the output bivector */
- out = cpl_bivector_duplicate(tmp) ;
+ out = cpl_bivector_duplicate(tmp);
/* Free */
- cpl_bivector_unwrap_vectors(tmp) ;
- cpl_vector_unwrap(wave) ;
- cpl_vector_unwrap(sed) ;
- cpl_table_delete(seds) ;
+ cpl_bivector_unwrap_vectors(tmp);
+ cpl_vector_unwrap(wave);
+ cpl_vector_unwrap(sed);
+ cpl_table_delete(seds);
/* Return */
- return out ;
+ return out;
}
/**@}*/
diff --git a/irplib/irplib_stdstar.h b/irplib/irplib_stdstar.h
index d537390..343d32b 100644
--- a/irplib/irplib_stdstar.h
+++ b/irplib/irplib_stdstar.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_stdstar.h,v 1.15 2011/12/14 08:53:04 cgarcia Exp $
+/* $Id: irplib_stdstar.h,v 1.16 2013/02/27 10:37:52 llundin Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: cgarcia $
- * $Date: 2011/12/14 08:53:04 $
- * $Revision: 1.15 $
- * $Name: sinfo-2_3_2 $
+ * $Author: llundin $
+ * $Date: 2013/02/27 10:37:52 $
+ * $Revision: 1.16 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_STDSTAR_H
@@ -58,14 +58,16 @@
Function prototypes
-----------------------------------------------------------------------------*/
-int irplib_stdstar_write_catalogs(cpl_frameset *, const cpl_frameset *,
- const char *, const char *, const char *, const char *,
- const char *, cpl_table * (*convert_ascii_table)(const char *)) ;
-cpl_table * irplib_stdstar_load_catalog(const char *, const char *) ;
+cpl_error_code
+irplib_stdstar_write_catalogs(cpl_frameset *, const cpl_frameset *,
+ const char *, const char *, const char *,
+ const char *, const char *,
+ cpl_table * (*)(const char *));
+cpl_table * irplib_stdstar_load_catalog(const char *, const char *);
cpl_error_code irplib_stdstar_check_columns_exist(const cpl_table *);
-int irplib_stdstar_select_stars_dist(cpl_table *, double, double, double) ;
-int irplib_stdstar_select_stars_mag(cpl_table *, const char *) ;
-int irplib_stdstar_find_closest(const cpl_table *, double, double) ;
+int irplib_stdstar_select_stars_dist(cpl_table *, double, double, double);
+int irplib_stdstar_select_stars_mag(cpl_table *, const char *);
+int irplib_stdstar_find_closest(const cpl_table *, double, double);
cpl_error_code irplib_stdstar_find_star(const char *, double, double, const char *,
const char *, double *, char **, char **, char **,
double *, double * , double);
diff --git a/irplib/irplib_strehl.c b/irplib/irplib_strehl.c
index 5f02d2c..0328f86 100644
--- a/irplib/irplib_strehl.c
+++ b/irplib/irplib_strehl.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2009/11/18 21:37:48 $
* $Revision: 1.43 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_strehl.h b/irplib/irplib_strehl.h
index 9e1032b..40d38b2 100644
--- a/irplib/irplib_strehl.h
+++ b/irplib/irplib_strehl.h
@@ -22,7 +22,7 @@
* $Author: kmirny $
* $Date: 2009/06/29 14:32:53 $
* $Revision: 1.12 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_STREHL_H
diff --git a/irplib/irplib_utils.c b/irplib/irplib_utils.c
index 76925ca..e166c28 100644
--- a/irplib/irplib_utils.c
+++ b/irplib/irplib_utils.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_utils.c,v 1.78 2012/05/08 13:56:09 llundin Exp $
+/* $Id: irplib_utils.c,v 1.82 2013/02/27 16:00:29 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: llundin $
- * $Date: 2012/05/08 13:56:09 $
- * $Revision: 1.78 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/02/27 16:00:29 $
+ * $Revision: 1.82 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -32,6 +32,7 @@
/*-----------------------------------------------------------------------------
Includes
-----------------------------------------------------------------------------*/
+#include "irplib_utils.h"
#include <math.h>
@@ -40,7 +41,6 @@
#include <cpl.h>
-#include "irplib_utils.h"
/*-----------------------------------------------------------------------------
Defines
@@ -891,6 +891,7 @@ irplib_dfs_table_convert(cpl_table * self,
cpl_propertylist * applist = NULL;
cpl_errorstate prestate = cpl_errorstate_get();
cpl_error_code error;
+ char * fallback_filename = NULL;
cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(allframes != NULL, CPL_ERROR_NULL_INPUT);
@@ -914,8 +915,8 @@ irplib_dfs_table_convert(cpl_table * self,
"Consistency check of table failed");
}
- filename = product_name != NULL
- ? product_name : cpl_sprintf("%s" CPL_DFS_FITS, recipe_name);
+ fallback_filename = cpl_sprintf("%s" CPL_DFS_FITS, recipe_name);
+ filename = product_name != NULL ? product_name : fallback_filename;
applist = mainlist == NULL
? cpl_propertylist_new() : cpl_propertylist_duplicate(mainlist);
@@ -928,7 +929,7 @@ irplib_dfs_table_convert(cpl_table * self,
remregexp, pipe_id, filename);
cpl_propertylist_delete(applist);
- if (filename != product_name) cpl_free((char*)filename);
+ cpl_free(fallback_filename);
/* Propagate the error, if any */
cpl_ensure_code(!error, error);
@@ -1153,15 +1154,15 @@ int irplib_compare_tags(
cpl_frame * frame1,
cpl_frame * frame2)
{
- char * v1 ;
- char * v2 ;
+ const char * v1 ;
+ const char * v2 ;
/* Test entries */
if (frame1==NULL || frame2==NULL) return -1 ;
/* Get the tags */
- if ((v1 = (char*)cpl_frame_get_tag(frame1)) == NULL) return -1 ;
- if ((v2 = (char*)cpl_frame_get_tag(frame2)) == NULL) return -1 ;
+ if ((v1 = cpl_frame_get_tag(frame1)) == NULL) return -1 ;
+ if ((v2 = cpl_frame_get_tag(frame2)) == NULL) return -1 ;
/* Compare the tags */
if (strcmp(v1, v2)) return 0 ;
@@ -1317,59 +1318,6 @@ int irplib_isnan(double value)
#endif
}
-
-
-/*----------------------------------------------------------------------------*/
-/**
- @brief Dump a single CPL error
- @param self The number of the current error to be dumped
- @param first The number of the first error to be dumped
- @param last The number of the last error to be dumped
- @return void
- @note This function differs from cpl_errorstate_dump_one only in message level
- @see cpl_errorstate_dump_one
-
- */
-/*----------------------------------------------------------------------------*/
-void irplib_errorstate_warning(unsigned self, unsigned first, unsigned last)
-{
-
- const cpl_boolean is_reverse = first > last ? CPL_TRUE : CPL_FALSE;
- const unsigned newest = is_reverse ? first : last;
- const unsigned oldest = is_reverse ? last : first;
- const char * revmsg = is_reverse ? " in reverse order" : "";
-
-
- assert( oldest <= self );
- assert( newest >= self );
-
- if (newest == 0) {
- cpl_msg_info(cpl_func, "No error(s) to dump");
- assert( oldest == 0);
- } else {
- assert( oldest > 0);
- assert( newest >= oldest);
- if (self == first) {
- if (oldest == 1) {
- cpl_msg_warning(cpl_func, "Dumping all %u error(s)%s:", newest,
- revmsg);
- } else {
- cpl_msg_warning(cpl_func, "Dumping the %u most recent error(s) "
- "out of a total of %u errors%s:",
- newest - oldest + 1, newest, revmsg);
- }
- cpl_msg_indent_more();
- }
-
- cpl_msg_warning(cpl_func, "[%u/%u] '%s' (%u) at %s", self, newest,
- cpl_error_get_message(), cpl_error_get_code(),
- cpl_error_get_where());
-
- if (self == last) cpl_msg_indent_less();
- }
-}
-
-
/**@}*/
@@ -1554,27 +1502,27 @@ static cpl_polynomial * irplib_polynomial_fit_1d_create_common(
x_size = cpl_vector_get_size(x_pos);
if(fit1d != NULL && x_size > 1)
{
- cpl_matrix * samppos = NULL;
- cpl_vector * fitresidual = NULL;
- cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
- samppos = cpl_matrix_wrap(1, x_size,
- (double*)cpl_vector_get_data_const(x_pos));
- cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
- fitresidual = cpl_vector_new(x_size);
- cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
- cpl_polynomial_fit(fit1d, samppos, NULL, values, NULL,
- CPL_FALSE, NULL, &loc_degree);
- cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
- cpl_vector_fill_polynomial_fit_residual(fitresidual, values, NULL, fit1d,
- samppos, rechisq);
- cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
- if (mse)
- {
- *mse = cpl_vector_product(fitresidual, fitresidual)
- / cpl_vector_get_size(fitresidual);
- }
- cpl_matrix_unwrap(samppos);
- cpl_vector_delete(fitresidual);
+ cpl_matrix * samppos = NULL;
+ cpl_vector * fitresidual = NULL;
+ cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+ samppos = cpl_matrix_wrap(1, x_size,
+ (double*)cpl_vector_get_data_const(x_pos));
+ cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+ fitresidual = cpl_vector_new(x_size);
+ cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+ cpl_polynomial_fit(fit1d, samppos, NULL, values, NULL,
+ CPL_FALSE, NULL, &loc_degree);
+ cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+ cpl_vector_fill_polynomial_fit_residual(fitresidual, values, NULL,
+ fit1d, samppos, rechisq);
+ cpl_ensure(!cpl_error_get_code(), cpl_error_get_code(), NULL);
+ if (mse)
+ {
+ *mse = cpl_vector_product(fitresidual, fitresidual)
+ / cpl_vector_get_size(fitresidual);
+ }
+ cpl_matrix_unwrap(samppos);
+ cpl_vector_delete(fitresidual);
}
return fit1d;
}
diff --git a/irplib/irplib_utils.h b/irplib/irplib_utils.h
index 252e96a..60f3ba5 100644
--- a/irplib/irplib_utils.h
+++ b/irplib/irplib_utils.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_utils.h,v 1.55 2011/06/01 06:47:56 llundin Exp $
+/* $Id: irplib_utils.h,v 1.57 2013/02/27 16:02:02 jtaylor Exp $
*
* This file is part of the irplib package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,11 +19,17 @@
*/
/*
- * $Author: llundin $
- * $Date: 2011/06/01 06:47:56 $
- * $Revision: 1.55 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/02/27 16:02:02 $
+ * $Revision: 1.57 $
+ * $Name: sinfo-2_3_3 $
* $Log: irplib_utils.h,v $
+ * Revision 1.57 2013/02/27 16:02:02 jtaylor
+ * add diagnostic pragma macros
+ *
+ * Revision 1.56 2012/08/06 06:14:18 llundin
+ * irplib_errorstate_warning(): Replaced by cpl_errorstate_dump_one_warning() from CPL 6.X
+ *
* Revision 1.55 2011/06/01 06:47:56 llundin
* skip_if_lt(): Fix previous edits switch of A and B in error message
*
@@ -52,10 +58,10 @@
Includes
-----------------------------------------------------------------------------*/
-#include <stdarg.h>
-
#include <cpl.h>
+#include <stdarg.h>
+
/*-----------------------------------------------------------------------------
Define
-----------------------------------------------------------------------------*/
@@ -63,6 +69,23 @@
#define IRPLIB_XSTRINGIFY(TOSTRING) #TOSTRING
#define IRPLIB_STRINGIFY(TOSTRING) IRPLIB_XSTRINGIFY(TOSTRING)
+
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#define IRPLIB_DIAG_PRAGMA_PUSH_IGN(x) \
+ _Pragma("GCC diagnostic push") \
+ _Pragma(IRPLIB_STRINGIFY(GCC diagnostic ignored #x))
+#define IRPLIB_DIAG_PRAGMA_PUSH_ERR(x) \
+ _Pragma("GCC diagnostic push") \
+ _Pragma(IRPLIB_STRINGIFY(GCC diagnostic error #x))
+#define IRPLIB_DIAG_PRAGMA_POP \
+ _Pragma("GCC diagnostic pop")
+#else
+#define IRPLIB_DIAG_PRAGMA_PUSH_IGN(x)
+#define IRPLIB_DIAG_PRAGMA_PUSH_ERR(x)
+#define IRPLIB_DIAG_PRAGMA_POP
+#endif
+
+
/* FIXME: Remove when no longer used by any irplib-based pipelines */
/* Useful for debugging */
#define irplib_trace() do if (cpl_error_get_code()) { \
@@ -72,13 +95,14 @@
cpl_msg_debug(cpl_func, __FILE__ " at line %d: OK", __LINE__); \
} while (0)
-#define irplib_error_recover(ESTATE, ...) \
- do if (!cpl_errorstate_is_equal(ESTATE)) { \
- cpl_msg_warning(cpl_func, __VA_ARGS__); \
- cpl_msg_indent_more(); \
- cpl_errorstate_dump(ESTATE, CPL_FALSE, irplib_errorstate_warning); \
- cpl_msg_indent_less(); \
- cpl_errorstate_set(ESTATE); \
+#define irplib_error_recover(ESTATE, ...) \
+ do if (!cpl_errorstate_is_equal(ESTATE)) { \
+ cpl_msg_warning(cpl_func, __VA_ARGS__); \
+ cpl_msg_indent_more(); \
+ cpl_errorstate_dump(ESTATE, CPL_FALSE, \
+ cpl_errorstate_dump_one_warning); \
+ cpl_msg_indent_less(); \
+ cpl_errorstate_set(ESTATE); \
} while (0)
@@ -400,8 +424,6 @@ cpl_error_code irplib_apertures_find_max_flux(const cpl_apertures *, int *,
int irplib_isinf(double value);
int irplib_isnan(double value);
-void irplib_errorstate_warning(unsigned, unsigned, unsigned);
-
cpl_error_code
irplib_dfs_table_convert(cpl_table *, cpl_frameset *, const cpl_frameset *,
int, char, const char *, const char *,
diff --git a/irplib/irplib_wavecal.c b/irplib/irplib_wavecal.c
index ed5d472..ddeaa91 100644
--- a/irplib/irplib_wavecal.c
+++ b/irplib/irplib_wavecal.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_wavecal.c,v 1.46 2012/03/02 09:01:04 amodigli Exp $
+/* $Id: irplib_wavecal.c,v 1.52 2012/08/03 21:05:32 llundin Exp $
*
* This file is part of the IRPLIB Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: amodigli $
- * $Date: 2012/03/02 09:01:04 $
- * $Revision: 1.46 $
- * $Name: sinfo-2_3_2 $
+ * $Author: llundin $
+ * $Date: 2012/08/03 21:05:32 $
+ * $Revision: 1.52 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -65,7 +65,7 @@ typedef struct {
cpl_vector * spectrum;
irplib_base_spectrum_model * param;
cpl_error_code (* filler)(cpl_vector *, const cpl_polynomial *,
- irplib_base_spectrum_model *, int);
+ irplib_base_spectrum_model *);
cpl_vector * vxc;
double xc;
int maxxc;
@@ -94,6 +94,18 @@ typedef struct {
static double irplib_gsl_correlation(const gsl_vector *, void *);
#endif
+static cpl_error_code
+irplib_polynomial_find_1d_from_correlation_(cpl_polynomial *, int,
+ const cpl_vector *,
+ irplib_base_spectrum_model *,
+ cpl_error_code (*)
+ (cpl_vector *,
+ const cpl_polynomial *,
+ irplib_base_spectrum_model *),
+ double, double, int, int,
+ double *, cpl_boolean *);
+
+
/*----------------------------------------------------------------------------*/
/**
* @defgroup irplib_wavecal Spectro functionality
@@ -236,13 +248,61 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
cpl_error_code (* filler)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
double pixtol,
double pixstep,
int hsize,
int maxite,
double * pxc)
{
+ cpl_boolean restart = CPL_FALSE;
+ const cpl_error_code error = irplib_polynomial_find_1d_from_correlation_
+ (self, maxdeg, obs, model, filler, pixtol, pixstep, hsize, maxite, pxc,
+ &restart);
+
+ return error ? cpl_error_set_where(cpl_func) :
+ (restart ? cpl_error_set(cpl_func, CPL_ERROR_CONTINUE)
+ : CPL_ERROR_NONE);
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+ @internal
+ @brief Modify self by maximizing the cross-correlation
+ @param self 1D-Dispersion relation to modify, at least of degree 1
+ @param maxdeg Maximize the cross-correlation by modifying maxdeg degree
+ @param obs The observed spectrum to correlate against
+ @param model The model of the lines/OTF etc.
+ @param filler The function to fill the model spectrum
+ @param pixtol The (positive) dispersion tolerance, e.g. 1e-6
+ @param pixstep The step length used in the maximization, e.g. 0.5 [pixel]
+ @param hsize Half the search-distance to ensure a global-maximum, hsize >= 0
+ @param maxite Maximum number of iterations, e.g. 100 * maxdeg
+ @param pxc On sucess, *pxc is the cross-correlation
+ @param prestart CPL_TRUE, iff the call can be redone
+ @return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
+ @see irplib_polynomial_find_1d_from_correlation
+ @note Fails with CPL_ERROR_UNSUPPORTED_MODE if compiled without GSL.
+ self must be increasing in the interval from 1 to the length of obs.
+
+ */
+/*----------------------------------------------------------------------------*/
+static cpl_error_code
+irplib_polynomial_find_1d_from_correlation_(cpl_polynomial * self,
+ int maxdeg,
+ const cpl_vector * obs,
+ irplib_base_spectrum_model * model,
+ cpl_error_code (* filler)
+ (cpl_vector *,
+ const cpl_polynomial *,
+ irplib_base_spectrum_model *),
+ double pixtol,
+ double pixstep,
+ int hsize,
+ int maxite,
+ double * pxc,
+ cpl_boolean * prestart)
+{
#ifdef HAVE_GSL
const gsl_multimin_fminimizer_type * T = gsl_multimin_fminimizer_nmsimplex;
@@ -267,11 +327,13 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
#endif
- cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure_code(prestart != NULL, CPL_ERROR_NULL_INPUT);
+ *prestart = CPL_FALSE;
+ cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure_code(obs != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure_code(model != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure_code(pxc != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(cpl_polynomial_get_dimension(self) == 1,
CPL_ERROR_ILLEGAL_INPUT);
@@ -372,7 +434,7 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
data.mxc, data.ishift, -minimizer->fval);
cpl_polynomial_shift_1d(data.mdisp, 0, (double)data.ishift);
cpl_polynomial_copy(self, data.mdisp);
- status = GSL_CONTINUE;
+ *prestart = CPL_TRUE;
} else {
*pxc = -minimizer->fval;
for (i=0; i < nfit; i++) {
@@ -405,7 +467,6 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
@param self Vector to fill with spectrum
@param disp 1D-Dispersion relation, at least of degree 1
@param lsslamp Pointer to irplib_line_spectrum_model struct
- @param hsize The 1st intensity in self will be disp(1-hsize), hsize >= 0
@return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
The model comprises these elements:
@@ -418,8 +479,8 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
cpl_vector * linepix; // NULL, or temporary work-space of size
// equal to the lines bivector
// - should be uninitialized to zero
- unsigned cost; // Will be incremented for each call
- unsigned xcost; // Will be incremented for each OK call
+ cpl_size cost; // Will be incremented for each call
+ cpl_size xcost; // Will be incremented for each OK call
@endcode
The units of the X-values of the lines is assumed to be the same as
@@ -432,8 +493,7 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial * self,
cpl_error_code
irplib_vector_fill_line_spectrum(cpl_vector * self,
const cpl_polynomial * disp,
- irplib_base_spectrum_model * lsslamp,
- int hsize)
+ irplib_base_spectrum_model * lsslamp)
{
irplib_line_spectrum_model * arclamp
@@ -452,7 +512,7 @@ irplib_vector_fill_line_spectrum(cpl_vector * self,
arclamp->wslit,
arclamp->wfwhm,
arclamp->xtrunc,
- hsize, CPL_FALSE, CPL_FALSE,
+ 0, CPL_FALSE, CPL_FALSE,
&(arclamp->ulines));
cpl_ensure_code(!error, error);
@@ -467,7 +527,6 @@ irplib_vector_fill_line_spectrum(cpl_vector * self,
@param self Vector to fill with spectrum
@param disp 1D-Dispersion relation, at least of degree 1
@param lsslamp Pointer to irplib_line_spectrum_model struct
- @param hsize The 1st intensity in self will be disp(1-hsize), hsize >= 0
@return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
@note The logarithm is taken on the intensities
@see irplib_vector_fill_line_spectrum
@@ -479,8 +538,7 @@ irplib_vector_fill_line_spectrum(cpl_vector * self,
cpl_error_code
irplib_vector_fill_logline_spectrum(cpl_vector * self,
const cpl_polynomial * disp,
- irplib_base_spectrum_model * lsslamp,
- int hsize)
+ irplib_base_spectrum_model * lsslamp)
{
irplib_line_spectrum_model * arclamp
@@ -499,7 +557,7 @@ irplib_vector_fill_logline_spectrum(cpl_vector * self,
arclamp->wslit,
arclamp->wfwhm,
arclamp->xtrunc,
- hsize, CPL_FALSE, CPL_TRUE,
+ 0, CPL_FALSE, CPL_TRUE,
&(arclamp->ulines));
cpl_ensure_code(!error, error);
@@ -515,7 +573,6 @@ irplib_vector_fill_logline_spectrum(cpl_vector * self,
@param self Vector to fill with spectrum
@param disp 1D-Dispersion relation, at least of degree 1
@param lsslamp Pointer to irplib_line_spectrum_model struct
- @param hsize The 1st intensity in self will be disp(1-hsize), hsize >= 0
@return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
@see irplib_vector_fill_line_spectrum()
@@ -527,8 +584,7 @@ irplib_vector_fill_logline_spectrum(cpl_vector * self,
cpl_error_code
irplib_vector_fill_line_spectrum_fast(cpl_vector * self,
const cpl_polynomial * disp,
- irplib_base_spectrum_model * lsslamp,
- int hsize)
+ irplib_base_spectrum_model * lsslamp)
{
irplib_line_spectrum_model * arclamp
@@ -547,7 +603,7 @@ irplib_vector_fill_line_spectrum_fast(cpl_vector * self,
arclamp->wslit,
arclamp->wfwhm,
arclamp->xtrunc,
- hsize, CPL_TRUE, CPL_FALSE,
+ 0, CPL_TRUE, CPL_FALSE,
&(arclamp->ulines));
cpl_ensure_code(!error, error);
@@ -562,7 +618,6 @@ irplib_vector_fill_line_spectrum_fast(cpl_vector * self,
@param self Vector to fill with spectrum
@param disp 1D-Dispersion relation, at least of degree 1
@param lsslamp Pointer to irplib_line_spectrum_model struct
- @param hsize The 1st intensity in self will be disp(1-hsize), hsize >= 0
@return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
@note The logarithm is taken on the intensities
@see irplib_vector_fill_line_spectrum_fast()
@@ -574,8 +629,7 @@ irplib_vector_fill_line_spectrum_fast(cpl_vector * self,
cpl_error_code
irplib_vector_fill_logline_spectrum_fast(cpl_vector * self,
const cpl_polynomial * disp,
- irplib_base_spectrum_model * lsslamp,
- int hsize)
+ irplib_base_spectrum_model * lsslamp)
{
irplib_line_spectrum_model * arclamp
@@ -594,7 +648,7 @@ irplib_vector_fill_logline_spectrum_fast(cpl_vector * self,
arclamp->wslit,
arclamp->wfwhm,
arclamp->xtrunc,
- hsize, CPL_TRUE, CPL_TRUE,
+ 0, CPL_TRUE, CPL_TRUE,
&(arclamp->ulines));
cpl_ensure_code(!error, error);
@@ -621,8 +675,7 @@ cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector * self,
cpl_error_code (* filler)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int))
+ irplib_base_spectrum_model *))
{
cpl_errorstate prestate = cpl_errorstate_get();
@@ -650,7 +703,7 @@ cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector * self,
vxc = cpl_vector_new(1);
error |= (int)cpl_vector_fill_polynomial(wl, disp1d, 1.0, 1.0);
- error |= filler(spectrum, disp1d, model, 0);
+ error |= filler(spectrum, disp1d, model);
ixc = cpl_vector_correlate(vxc, self, spectrum);
xc = cpl_vector_get(vxc, ixc);
@@ -698,6 +751,8 @@ cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector * self,
The shifts are listed in order of decreasing cross-correlation. If pxc is
non-NULL, *pxc will be set to the cross-correlation at shift 0.
+ The shifts may include the extrema -hsize and hsize.
+
*/
/*----------------------------------------------------------------------------*/
cpl_error_code
@@ -708,22 +763,23 @@ irplib_bivector_find_shift_from_correlation(cpl_bivector * self,
cpl_error_code (*filler)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
int hsize,
cpl_boolean doplot,
double *pxc)
{
- const int nobs = cpl_vector_get_size(obs);
- const int nmodel = 2 * hsize + nobs;
- cpl_vector * xself = cpl_bivector_get_x(self);
- cpl_vector * yself = cpl_bivector_get_y(self);
- cpl_vector * mspec1d;
- cpl_vector * xcorr;
- cpl_error_code error = CPL_ERROR_NONE;
- double xcprev, xcnext;
- int ixc, imax = 0;
- int i;
+ const int nobs = cpl_vector_get_size(obs);
+ const int nmodel = 2 * hsize + nobs;
+ cpl_polynomial * shdisp;
+ cpl_vector * xself = cpl_bivector_get_x(self);
+ cpl_vector * yself = cpl_bivector_get_y(self);
+ cpl_vector * mspec1d;
+ cpl_vector * xcorr;
+ cpl_error_code error = CPL_ERROR_NONE;
+ double xcprev, xcnext;
+ int ixc, imax = 0;
+ int i;
cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
@@ -732,9 +788,17 @@ irplib_bivector_find_shift_from_correlation(cpl_bivector * self,
cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
+ shdisp = cpl_polynomial_duplicate(disp);
+
+ /* Shift reference by -hsize so filler can be used without offset */
+ if (cpl_polynomial_shift_1d(shdisp, 0, -hsize)) {
+ cpl_polynomial_delete(shdisp);
+ return cpl_error_set_where(cpl_func);
+ }
+
mspec1d = cpl_vector_new(nmodel);
- if (filler(mspec1d, disp, model, hsize)) {
+ if (filler(mspec1d, shdisp, model)) {
cpl_vector_delete(mspec1d);
return cpl_error_set_where(cpl_func);
}
@@ -745,10 +809,11 @@ irplib_bivector_find_shift_from_correlation(cpl_bivector * self,
#ifdef IRPLIB_SPC_DUMP
/* Need irplib_wavecal.c rev. 1.12 through 1.15 */
- irplib_polynomial_dump_corr_step(disp, xcorr, "Shift");
+ irplib_polynomial_dump_corr_step(shdisp, xcorr, "Shift");
#endif
cpl_vector_delete(mspec1d);
+ cpl_polynomial_delete(shdisp);
/* Find local maxima. */
/* FIXME(?): Also include stationary points */
@@ -818,6 +883,7 @@ irplib_bivector_find_shift_from_correlation(cpl_bivector * self,
}
if (doplot) {
+ /* Vector of -hsize, 1-hsize, 2-hsize, ..., 0, ..., hsize */
cpl_vector * xvals = cpl_vector_new(1 + 2 * hsize);
cpl_bivector * bcorr = cpl_bivector_wrap_vectors(xvals, xcorr);
double x = (double)-hsize;
@@ -873,7 +939,7 @@ irplib_polynomial_shift_1d_from_correlation(cpl_polynomial * self,
cpl_error_code (*filler)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
int hsize,
cpl_boolean doplot,
double * pxc)
@@ -893,9 +959,13 @@ irplib_polynomial_shift_1d_from_correlation(cpl_polynomial * self,
cpl_ensure_code(filler != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(hsize > 0, CPL_ERROR_ILLEGAL_INPUT);
+ /* Shift reference by -hsize so filler can be used without offset */
+ cpl_ensure_code(!cpl_polynomial_shift_1d(self, 0, -hsize),
+ cpl_error_get_code());
+
mspec1d = cpl_vector_new(nmodel);
- if (filler(mspec1d, self, model, hsize)) {
+ if (filler(mspec1d, self, model)) {
cpl_vector_delete(mspec1d);
cpl_ensure_code(0, cpl_error_get_code());
}
@@ -911,12 +981,12 @@ irplib_polynomial_shift_1d_from_correlation(cpl_polynomial * self,
cpl_vector_delete(mspec1d);
- xxc = ixc - hsize;
-
- error = cpl_polynomial_shift_1d(self, 0, (double)xxc);
+ error = cpl_polynomial_shift_1d(self, 0, (double)ixc);
xc = cpl_vector_get(xcorr, ixc);
+ xxc = ixc - hsize; /* The effect of the two shifts */
+
cpl_msg_info(cpl_func, "Shifting %d pixels (%g < %g)", xxc,
cpl_vector_get(xcorr, hsize), xc);
@@ -984,7 +1054,7 @@ irplib_vector_fill_line_spectrum_model(cpl_vector * self,
int hsize,
cpl_boolean dofast,
cpl_boolean dolog,
- unsigned * pulines)
+ cpl_size * pulines)
{
cpl_errorstate prestate;
@@ -1007,7 +1077,7 @@ irplib_vector_fill_line_spectrum_model(cpl_vector * self,
double xderiv, xextreme;
cpl_error_code error = CPL_ERROR_NONE;
int iline;
- unsigned ulines = 0;
+ cpl_size ulines = 0;
cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(disp != NULL, CPL_ERROR_NULL_INPUT);
@@ -1305,7 +1375,6 @@ inline double irplib_erf_antideriv(double x, double sigma)
@param self The 1D-dispersion relation
@param data Pointer to a irplib_multimin struct
@return Minus the cross-correlation or GSL_NAN on error
- @note Just a stub so far
*/
/*----------------------------------------------------------------------------*/
static double irplib_gsl_correlation(const gsl_vector * self, void * data)
@@ -1339,8 +1408,13 @@ static double irplib_gsl_correlation(const gsl_vector * self, void * data)
cpl_polynomial_set_coeff(mindata->disp1d, &i, value);
}
+ /* Shift reference by -ndiff so filler can be used without offset.
+ The subsequent polynomial shift is reduced by -ndiff. */
+ cpl_ensure_code(!cpl_polynomial_shift_1d(mindata->disp1d, 0, -ndiff),
+ cpl_error_get_code());
+
if (mindata->filler(mindata->spectrum, mindata->disp1d,
- mindata->param, ndiff)
+ mindata->param)
|| !cpl_errorstate_is_equal(prestate)) {
/* The fill failed. Ensure the discarding of this candidate by
@@ -1382,10 +1456,11 @@ static double irplib_gsl_correlation(const gsl_vector * self, void * data)
cpl_polynomial_copy(mindata->mdisp, mindata->disp1d);
}
mindata->mxc = cpl_vector_get(mindata->vxc, mindata->maxxc);
- mindata->ishift = mindata->maxxc - ndiff;
+ mindata->ishift = mindata->maxxc; /* Offset -ndiff pre-shifted above */
cpl_msg_debug(cpl_func, "Local maximum: %g(%d) > %g(%d) (cost=%u:%u. "
"lines=%u)", mindata->mxc, mindata->maxxc, mindata->xc,
- ndiff, arclamp->cost, arclamp->xcost, arclamp->ulines);
+ ndiff, (unsigned)arclamp->cost, (unsigned)arclamp->xcost,
+ (unsigned)arclamp->ulines);
}
return -mindata->xc;
@@ -1410,7 +1485,7 @@ static double irplib_gsl_correlation(const gsl_vector * self, void * data)
@param maxfail Number of retries on failure
@param maxcont Number of retries on non-convergence
@param doplot Plot the cross-correlation as a function of pixel shift
- @param pxc On sucess, *pxc is the cross-correlation
+ @param pxc On success, *pxc is the cross-correlation
@return CPL_ERROR_NONE on success, otherwise the relevant CPL error code
@note Fails with CPL_ERROR_UNSUPPORTED_MODE if compiled without GSL.
self must be increasing in the interval from 1 to the length of obs.
@@ -1427,8 +1502,7 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial * self,
cpl_error_code (* filler)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int),
+ irplib_base_spectrum_model *),
double pixtol,
double pixstep,
int hsize,
@@ -1493,13 +1567,14 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial * self,
return cpl_error_set_where(cpl_func);
}
- if (model->ulines > (unsigned)linelim) {
+ if (model->ulines > (cpl_size)linelim) {
/* The initial, optimal (integer) shift */
const double xxc = cpl_vector_get(xtshiftx, 0);
const double xc0 = cpl_vector_get(xtshifty, 0);
cpl_msg_warning(cpl_func, "Doing only shift=%g pixels with lines=%u > "
- "%d and XC=%g", xxc, model->ulines, linelim, xc0);
+ "%d and XC=%g", xxc, (unsigned)model->ulines, linelim,
+ xc0);
cpl_polynomial_shift_1d(self, 0, xxc);
@@ -1541,49 +1616,69 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial * self,
for (nfail = 0; nfail < maxfail; nfail++, xtpixtol *= 2.0,
xtpixstep *= 2.0) {
int restart = maxcont;
+ cpl_boolean redo;
+
do {
- error = irplib_polynomial_find_1d_from_correlation
+ if (error) {
+ cpl_errorstate_dump(prestate, CPL_FALSE,
+ irplib_errorstate_dump_debug);
+ cpl_errorstate_set(prestate);
+ }
+ error = irplib_polynomial_find_1d_from_correlation_
(cand, maxdeg, obs, model,
filler, xtpixtol, xtpixstep, 2,
- maxite, &xtxc);
- } while (error == CPL_ERROR_CONTINUE && --restart);
+ maxite, &xtxc, &redo);
+ if (redo && !error) error = CPL_ERROR_CONTINUE;
+ } while (((!error && redo) || error == CPL_ERROR_CONTINUE)
+ && --restart);
- if (!error) {
+ if (!error && !redo) {
cpl_msg_debug(cpl_func, "XC(imax=%d/%d:xtpixtol=%g): %g "
"(cost=%u:%u)", 1+imaxima, nmaxima, xtpixtol,
- xtxc, model->cost, model->xcost);
+ xtxc, (unsigned)model->cost,
+ (unsigned)model->xcost);
break;
}
cpl_msg_warning(cpl_func, "Increasing xtpixtol from %g (%g, imax="
"%d/%d)", xtpixtol, xtpixstep, 1+imaxima, nmaxima);
- if (model->ulines > (unsigned)linelim) {
+ if (model->ulines > (cpl_size)linelim) {
cpl_msg_warning(cpl_func, "Stopping search-refinement via "
- "catalogue with %u lines > %u", model->ulines,
- linelim);
+ "catalogue with %u lines > %d",
+ (unsigned)model->ulines, linelim);
break;
}
cpl_polynomial_copy(cand, start);
}
- /* Decrease tolerance until inconvergence, keep previous */
+ /* Decrease tolerance until divergence, keep previous */
for (; !error && xtpixtol > 0.0; xtpixtol *= 0.25, xtpixstep *= 0.5) {
int restart = maxcont;
+ cpl_boolean redo;
cpl_polynomial_copy(backup, cand);
do {
- error = irplib_polynomial_find_1d_from_correlation
+ if (error) {
+ cpl_errorstate_dump(prestate, CPL_FALSE,
+ irplib_errorstate_dump_debug);
+ cpl_errorstate_set(prestate);
+ }
+ error = irplib_polynomial_find_1d_from_correlation_
(cand, maxdeg, obs, model, filler,
- xtpixtol, xtpixstep, 2, maxite, &xtxc);
- } while (error == CPL_ERROR_CONTINUE && --restart);
+ xtpixtol, xtpixstep, 2, maxite, &xtxc, &redo);
+ if (redo && !error) error = CPL_ERROR_CONTINUE;
+ } while (((!error && redo) || error == CPL_ERROR_CONTINUE)
+ && --restart);
if (error) break;
ok = CPL_TRUE;
+ if (redo) break;
cpl_msg_debug(cpl_func, "XC(imax=%d/%d:xtpixtol=%g): %g (cost=%u:%u"
". ulines=%u)", 1+imaxima, nmaxima, xtpixtol, xtxc,
- model->cost, model->xcost, model->ulines);
- if (model->ulines > (unsigned)linelim) {
+ (unsigned)model->cost, (unsigned)model->xcost,
+ (unsigned)model->ulines);
+ if (model->ulines > (cpl_size)linelim) {
cpl_msg_info(cpl_func, "Stopping search-refinement via "
- "catalogue with %u lines > %u", model->ulines,
- linelim);
+ "catalogue with %u lines > %u",
+ (unsigned)model->ulines, linelim);
break;
}
}
@@ -1603,14 +1698,16 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial * self,
cpl_msg_info(cpl_func, "XC(imax=%d/%d): %g -> %g (initial-shift=%g. "
"cost=%u:%u. lines=%u)", 1+imaxima, nmaxima,
cpl_vector_get(xtshifty, imaxima), xtxc,
- cpl_vector_get(xtshiftx, imaxima), model->cost,
- model->xcost, model->ulines);
+ cpl_vector_get(xtshiftx, imaxima),
+ (unsigned)model->cost, (unsigned)model->xcost,
+ (unsigned)model->ulines);
} else {
cpl_msg_info(cpl_func, "xc(imax=%d/%d): %g -> %g (initial-shift=%g. "
"cost=%u:%u. lines=%u)", 1+imaxima, nmaxima,
cpl_vector_get(xtshifty, imaxima), xtxc,
cpl_vector_get(xtshiftx, imaxima),
- model->cost, model->xcost, model->ulines);
+ (unsigned)model->cost, (unsigned)model->xcost,
+ (unsigned)model->ulines);
}
}
@@ -1619,9 +1716,14 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial * self,
cpl_polynomial_delete(cand);
if (imaximum < 0) {
+ /* The initial, optimal (integer) shift */
+ const double xxc = cpl_vector_get(xtshiftx, 0);
+ const double xc0 = cpl_vector_get(xtshifty, 0);
+
error = cpl_error_set_message(cpl_func, CPL_ERROR_DATA_NOT_FOUND,
- "XC could not be optimized over %d "
- "local shift-maxima (xc=%g)", nmaxima, xc);
+ "Could not improve XC=%g over %d "
+ "local shift-maxima, best at shift %g",
+ xc0, nmaxima, xxc);
} else {
cpl_msg_info(cpl_func, "Maximal XC=%g (up from %g, with initial pixel-"
"shift of %g) at %d/%d local shift-maximi", xc,
diff --git a/irplib/irplib_wavecal.h b/irplib/irplib_wavecal.h
index 64368b6..f334271 100644
--- a/irplib/irplib_wavecal.h
+++ b/irplib/irplib_wavecal.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_wavecal.h,v 1.16 2009/10/21 14:49:42 llundin Exp $
+/* $Id: irplib_wavecal.h,v 1.18 2012/08/03 21:05:33 llundin Exp $
*
* This file is part of the IRPLIB Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -20,9 +20,9 @@
/*
* $Author: llundin $
- * $Date: 2009/10/21 14:49:42 $
- * $Revision: 1.16 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/08/03 21:05:33 $
+ * $Revision: 1.18 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_WAVECAL_H
@@ -63,16 +63,16 @@
/* Any spectrum model must have these members first! */
typedef struct {
- unsigned cost; /* May be incremented for cost counting */
- unsigned xcost; /* Ditto (can exclude failed fills) */
- unsigned ulines; /* May be set to number of lines used */
+ cpl_size cost; /* May be incremented for cost counting */
+ cpl_size xcost; /* Ditto (can exclude failed fills) */
+ cpl_size ulines; /* May be set to number of lines used */
} irplib_base_spectrum_model;
typedef struct {
- unsigned cost; /* May be incremented for cost counting */
- unsigned xcost; /* Ditto (can exclude failed fills) */
- unsigned ulines; /* May be set to number of lines used */
+ cpl_size cost; /* May be incremented for cost counting */
+ cpl_size xcost; /* Ditto (can exclude failed fills) */
+ cpl_size ulines; /* May be set to number of lines used */
double wslit; /* Slit Width */
double wfwhm; /* FWHM of transfer function */
@@ -99,8 +99,7 @@ irplib_polynomial_find_1d_from_correlation_all(cpl_polynomial *,
cpl_error_code (*)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int),
+ irplib_base_spectrum_model *),
double,
double,
int,
@@ -118,7 +117,7 @@ irplib_bivector_find_shift_from_correlation(cpl_bivector *,
cpl_error_code (*)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
int,
cpl_boolean,
double *);
@@ -130,7 +129,7 @@ irplib_polynomial_shift_1d_from_correlation(cpl_polynomial *,
cpl_error_code (*)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
int, cpl_boolean, double *);
cpl_error_code
@@ -140,31 +139,27 @@ irplib_polynomial_find_1d_from_correlation(cpl_polynomial *, int,
cpl_error_code (*)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *, int),
+ irplib_base_spectrum_model *),
double, double,
int, int, double *);
cpl_error_code irplib_vector_fill_line_spectrum(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int);
+ irplib_base_spectrum_model *);
cpl_error_code irplib_vector_fill_logline_spectrum(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int);
+ irplib_base_spectrum_model *);
cpl_error_code
irplib_vector_fill_line_spectrum_fast(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int);
+ irplib_base_spectrum_model *);
cpl_error_code
irplib_vector_fill_logline_spectrum_fast(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int);
+ irplib_base_spectrum_model *);
cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector *,
const cpl_polynomial *,
@@ -172,8 +167,7 @@ cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector *,
cpl_error_code (*)
(cpl_vector *,
const cpl_polynomial *,
- irplib_base_spectrum_model *,
- int));
+ irplib_base_spectrum_model *));
cpl_error_code irplib_polynomial_fit_2d_dispersion(cpl_polynomial *,
const cpl_image *,
diff --git a/irplib/irplib_wavecal_impl.h b/irplib/irplib_wavecal_impl.h
index cc046c6..41e4715 100644
--- a/irplib/irplib_wavecal_impl.h
+++ b/irplib/irplib_wavecal_impl.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_wavecal_impl.h,v 1.6 2009/10/21 14:49:42 llundin Exp $
+/* $Id: irplib_wavecal_impl.h,v 1.7 2012/08/03 21:05:34 llundin Exp $
*
* This file is part of the IRPLIB Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -20,9 +20,9 @@
/*
* $Author: llundin $
- * $Date: 2009/10/21 14:49:42 $
- * $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/08/03 21:05:34 $
+ * $Revision: 1.7 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_WAVECAL_IMPL_H
@@ -49,7 +49,7 @@ cpl_error_code irplib_vector_fill_line_spectrum_model(cpl_vector *,
int,
cpl_boolean,
cpl_boolean,
- unsigned *);
+ cpl_size *);
double irplib_erf_antideriv(double, double);
diff --git a/irplib/irplib_wcs.c b/irplib/irplib_wcs.c
index cb47d03..6c82253 100644
--- a/irplib/irplib_wcs.c
+++ b/irplib/irplib_wcs.c
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2010/10/07 14:10:55 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/irplib/irplib_wcs.h b/irplib/irplib_wcs.h
index cce3c3b..4adb6ad 100644
--- a/irplib/irplib_wcs.h
+++ b/irplib/irplib_wcs.h
@@ -22,7 +22,7 @@
* $Author: llundin $
* $Date: 2010/10/07 14:10:55 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_WCS_H
diff --git a/irplib/irplib_wlxcorr.c b/irplib/irplib_wlxcorr.c
index 592aaf2..4d07615 100644
--- a/irplib/irplib_wlxcorr.c
+++ b/irplib/irplib_wlxcorr.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_wlxcorr.c,v 1.55 2012/01/12 11:50:41 llundin Exp $
+/* $Id: irplib_wlxcorr.c,v 1.58 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the IRPLIB package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2012/01/12 11:50:41 $
- * $Revision: 1.55 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.58 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -493,12 +493,25 @@ cpl_bivector * irplib_wlxcorr_cat_extract(
cpl_ensure(lines_catalog != NULL, CPL_ERROR_NULL_INPUT, NULL);
/* Find the 1st line */
- wave_min_id = cpl_vector_find(xlines, wave_min);
+ wave_min_id = (int)cpl_vector_find(xlines, wave_min);
+ if (wave_min_id < 0) {
+ cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+ __FILE__, __LINE__,
+ "The starting wavelength cannot be found") ;
+ return NULL ;
+ }
+
/* The first line must be greater than (at least?) wave_min */
if (dxlines[wave_min_id] <= wave_min) wave_min_id++;
/* Find the last line */
- wave_max_id = cpl_vector_find(xlines, wave_max);
+ wave_max_id = (int)cpl_vector_find(xlines, wave_max);
+ if (wave_max_id < 0) {
+ cpl_error_set_message_macro(cpl_func, CPL_ERROR_ILLEGAL_INPUT,
+ __FILE__, __LINE__,
+ "The ending wavelength cannot be found") ;
+ return NULL ;
+ }
/* The last line must be less than wave_max */
if (dxlines[wave_max_id] >= wave_min) wave_max_id--;
@@ -724,12 +737,18 @@ int irplib_wlxcorr_plot_solution(
@brief Plot the spectral table
@param spc_table The spectral table
@param title A title
+ @param first_plotted_line idx of the first line to plot (strongest to
+ weakest, 1 is the strongest)
+ @param last_plotted_line idx of the last line to plot (strongest to
+ weakest, 1 is the strongest). If 0, no line is plotted.
@return 0 if ok, -1 otherwise
*/
/*----------------------------------------------------------------------------*/
int irplib_wlxcorr_plot_spc_table(
const cpl_table * spc_table,
- const char * title)
+ const char * title,
+ int first_plotted_line,
+ int last_plotted_line)
{
char title_loc[1024] ;
cpl_vector ** vectors ;
@@ -737,16 +756,17 @@ int irplib_wlxcorr_plot_spc_table(
cpl_vector * tmp_vec ;
int nsamples ;
double max, mean1, mean3 ;
- int start_ind, stop_ind, nblines, hsize_pix ;
+ int start_ind, stop_ind, hsize_pix ;
int i, j ;
/* Test entries */
+ if (first_plotted_line > last_plotted_line) return -1 ;
if (spc_table == NULL) return -1 ;
/* Initialise */
nsamples = cpl_table_get_nrow(spc_table) ;
hsize_pix = 10 ;
- nblines = 0 ;
+
sprintf(title_loc,
"t '%s - 1-Initial catalog/2-Corrected catalog/3-Observed' w lines",
title) ;
@@ -785,10 +805,10 @@ int irplib_wlxcorr_plot_spc_table(
title) ;
title_loc[1023] = (char)0 ;
tmp_vec = cpl_vector_duplicate(vectors[2]) ;
- for (i=0 ; i<nblines ; i++) {
+ for (i=0 ; i<last_plotted_line ; i++) {
/* Find the brightest line */
if ((max = cpl_vector_get_max(tmp_vec)) <= 0.0) break ;
- for (j=0 ; i<nsamples ; j++) {
+ for (j=0 ; j<nsamples ; j++) {
if (cpl_vector_get(tmp_vec, j) == max) break ;
}
if (j-hsize_pix < 0) start_ind = 0 ;
@@ -797,20 +817,22 @@ int irplib_wlxcorr_plot_spc_table(
else stop_ind = j+hsize_pix ;
for (j=start_ind ; j<=stop_ind ; j++) cpl_vector_set(tmp_vec, j, 0.0) ;
- sub_vectors = cpl_malloc(4*sizeof(cpl_vector*)) ;
- sub_vectors[0]=cpl_vector_extract(vectors[0],start_ind,stop_ind,1);
- sub_vectors[1]=cpl_vector_extract(vectors[1],start_ind,stop_ind,1);
- sub_vectors[2]=cpl_vector_extract(vectors[2],start_ind,stop_ind,1);
- sub_vectors[3]=cpl_vector_extract(vectors[3],start_ind,stop_ind,1);
-
- cpl_plot_vectors("set grid;set xlabel 'Wavelength (nm)';", title_loc,
- "", (const cpl_vector **)sub_vectors, 4);
-
- cpl_vector_delete(sub_vectors[0]) ;
- cpl_vector_delete(sub_vectors[1]) ;
- cpl_vector_delete(sub_vectors[2]) ;
- cpl_vector_delete(sub_vectors[3]) ;
- cpl_free(sub_vectors) ;
+ if (i+1 >= first_plotted_line) {
+ sub_vectors = cpl_malloc(4*sizeof(cpl_vector*)) ;
+ sub_vectors[0]=cpl_vector_extract(vectors[0],start_ind,stop_ind,1);
+ sub_vectors[1]=cpl_vector_extract(vectors[1],start_ind,stop_ind,1);
+ sub_vectors[2]=cpl_vector_extract(vectors[2],start_ind,stop_ind,1);
+ sub_vectors[3]=cpl_vector_extract(vectors[3],start_ind,stop_ind,1);
+
+ cpl_plot_vectors("set grid;set xlabel 'Wavelength (nm)';",
+ title_loc, "", (const cpl_vector **)sub_vectors, 4);
+
+ cpl_vector_delete(sub_vectors[0]) ;
+ cpl_vector_delete(sub_vectors[1]) ;
+ cpl_vector_delete(sub_vectors[2]) ;
+ cpl_vector_delete(sub_vectors[3]) ;
+ cpl_free(sub_vectors) ;
+ }
}
cpl_vector_delete(tmp_vec) ;
diff --git a/irplib/irplib_wlxcorr.h b/irplib/irplib_wlxcorr.h
index ede71eb..5b5ae24 100644
--- a/irplib/irplib_wlxcorr.h
+++ b/irplib/irplib_wlxcorr.h
@@ -1,4 +1,4 @@
-/* $Id: irplib_wlxcorr.h,v 1.20 2008/11/06 12:45:28 llundin Exp $
+/* $Id: irplib_wlxcorr.h,v 1.22 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the IRPLIB package
* Copyright (C) 2002,2003 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2008/11/06 12:45:28 $
- * $Revision: 1.20 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.22 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef IRPLIB_WLXCORR_H
@@ -48,7 +48,7 @@
Functions prototypes
-----------------------------------------------------------------------------*/
-int irplib_wlxcorr_plot_spc_table(const cpl_table *, const char *) ;
+int irplib_wlxcorr_plot_spc_table(const cpl_table *, const char *, int, int) ;
int irplib_wlxcorr_catalog_plot(const cpl_bivector *, double, double) ;
int irplib_wlxcorr_plot_solution(const cpl_polynomial *, const cpl_polynomial *,
const cpl_polynomial *, int, int) ;
diff --git a/irplib/tests/Makefile.am b/irplib/tests/Makefile.am
index 893d5b8..d9a33d8 100644
--- a/irplib/tests/Makefile.am
+++ b/irplib/tests/Makefile.am
@@ -28,9 +28,9 @@ MAINTAINERCLEANFILES = Makefile.in
endif
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes) -I../../irplib/
-LDADD = $(LIBIRPLIB)
+LDADD = $(LIBIRPLIB) $(LIBCPLCORE) $(LIBCPLUI) $(LIBCPLDFS) $(LIBCPLDRS)
pkginclude_HEADERS =
@@ -45,33 +45,37 @@ check_PROGRAMS = irplib_wlxcorr-test \
irplib_wcs-test \
irplib_cat-test
-irplib_framelist_test_SOURCES = irplib_framelist-test.c
-irplib_framelist_test_DEPENDENCIES = $(LIBIRPLIB)
-
-irplib_utils_test_SOURCES = irplib_utils-test.c
-irplib_utils_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_wlxcorr_test_SOURCES = irplib_wlxcorr-test.c
+irplib_wlxcorr_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_wlxcorr_test_LDADD = $(LDADD)
irplib_hist_test_SOURCES = irplib_hist-test.c
-irplib_hist_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_hist_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_hist_test_LDADD = $(LDADD)
irplib_polynomial_test_SOURCES = irplib_polynomial-test.c
-irplib_polynomial_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_polynomial_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_polynomial_test_LDADD = $(LDADD)
irplib_plugin_test_SOURCES = irplib_plugin-test.c
-irplib_plugin_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_plugin_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_plugin_test_LDADD = $(LDADD)
-irplib_wlxcorr_test_SOURCES = irplib_wlxcorr-test.c
-irplib_wlxcorr_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_utils_test_SOURCES = irplib_utils-test.c
+irplib_utils_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_utils_test_LDADD = $(LDADD)
+
+irplib_framelist_test_SOURCES = irplib_framelist-test.c
+irplib_framelist_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_framelist_test_LDADD = $(LDADD)
irplib_wcs_test_SOURCES = irplib_wcs-test.c
-irplib_wcs_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_wcs_test_LDADD = $(LIBIRPLIB) $(LIBWCSLIB)
-irplib_wcs_test_LDFLAGS = $(WCSLIB_LDFLAGS)
+irplib_wcs_test_LDFLAGS = $(CPL_LDFLAGS) $(WCSLIB_LDFLAGS)
+irplib_wcs_test_LDADD = $(LDADD) $(LIBWCSLIB)
irplib_cat_test_SOURCES = irplib_cat-test.c
-irplib_cat_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_cat_test_LDADD = $(LIBIRPLIB) $(LIBWCSLIB)
-irplib_cat_test_LDFLAGS = $(WCSLIB_LDFLAGS)
+irplib_cat_test_LDFLAGS = $(CPL_LDFLAGS) $(WCSLIB_LDFLAGS)
+irplib_cat_test_LDADD = $(LDADD) $(LIBWCSLIB)
TESTS = $(check_PROGRAMS)
@@ -79,7 +83,8 @@ TESTS = $(check_PROGRAMS)
TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
- OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)"
+ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
+ MALLOC_PERTURB_=137 MALLOC_CHECK_=2
# We need to remove any files that the above tests created.
clean-local:
diff --git a/irplib/tests/Makefile.in b/irplib/tests/Makefile.in
index 4eac43c..195ffb6 100644
--- a/irplib/tests/Makefile.in
+++ b/irplib/tests/Makefile.in
@@ -62,32 +62,55 @@ CONFIG_CLEAN_VPATH_FILES =
am_irplib_cat_test_OBJECTS = irplib_cat-test.$(OBJEXT)
irplib_cat_test_OBJECTS = $(am_irplib_cat_test_OBJECTS)
am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+irplib_cat_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
irplib_cat_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(irplib_cat_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_framelist_test_OBJECTS = irplib_framelist-test.$(OBJEXT)
irplib_framelist_test_OBJECTS = $(am_irplib_framelist_test_OBJECTS)
-irplib_framelist_test_LDADD = $(LDADD)
+irplib_framelist_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_framelist_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_framelist_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_hist_test_OBJECTS = irplib_hist-test.$(OBJEXT)
irplib_hist_test_OBJECTS = $(am_irplib_hist_test_OBJECTS)
-irplib_hist_test_LDADD = $(LDADD)
+irplib_hist_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_hist_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_hist_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_plugin_test_OBJECTS = irplib_plugin-test.$(OBJEXT)
irplib_plugin_test_OBJECTS = $(am_irplib_plugin_test_OBJECTS)
-irplib_plugin_test_LDADD = $(LDADD)
+irplib_plugin_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_plugin_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_plugin_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_polynomial_test_OBJECTS = irplib_polynomial-test.$(OBJEXT)
irplib_polynomial_test_OBJECTS = $(am_irplib_polynomial_test_OBJECTS)
-irplib_polynomial_test_LDADD = $(LDADD)
+irplib_polynomial_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_polynomial_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_polynomial_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_utils_test_OBJECTS = irplib_utils-test.$(OBJEXT)
irplib_utils_test_OBJECTS = $(am_irplib_utils_test_OBJECTS)
-irplib_utils_test_LDADD = $(LDADD)
+irplib_utils_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_utils_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_utils_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_wcs_test_OBJECTS = irplib_wcs-test.$(OBJEXT)
irplib_wcs_test_OBJECTS = $(am_irplib_wcs_test_OBJECTS)
+irplib_wcs_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
irplib_wcs_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(irplib_wcs_test_LDFLAGS) $(LDFLAGS) -o $@
am_irplib_wlxcorr_test_OBJECTS = irplib_wlxcorr-test.$(OBJEXT)
irplib_wlxcorr_test_OBJECTS = $(am_irplib_wlxcorr_test_OBJECTS)
-irplib_wlxcorr_test_LDADD = $(LDADD)
+irplib_wlxcorr_test_DEPENDENCIES = $(am__DEPENDENCIES_2)
+irplib_wlxcorr_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(irplib_wlxcorr_test_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
am__depfiles_maybe = depfiles
@@ -292,37 +315,42 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.8 foreign
DISTCLEANFILES = *~
@MAINTAINER_MODE_TRUE at MAINTAINERCLEANFILES = Makefile.in
-INCLUDES = $(all_includes)
-LDADD = $(LIBIRPLIB)
+AM_CPPFLAGS = $(all_includes) -I../../irplib/
+LDADD = $(LIBIRPLIB) $(LIBCPLCORE) $(LIBCPLUI) $(LIBCPLDFS) $(LIBCPLDRS)
pkginclude_HEADERS =
noinst_HEADERS =
-irplib_framelist_test_SOURCES = irplib_framelist-test.c
-irplib_framelist_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_utils_test_SOURCES = irplib_utils-test.c
-irplib_utils_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_wlxcorr_test_SOURCES = irplib_wlxcorr-test.c
+irplib_wlxcorr_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_wlxcorr_test_LDADD = $(LDADD)
irplib_hist_test_SOURCES = irplib_hist-test.c
-irplib_hist_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_hist_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_hist_test_LDADD = $(LDADD)
irplib_polynomial_test_SOURCES = irplib_polynomial-test.c
-irplib_polynomial_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_polynomial_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_polynomial_test_LDADD = $(LDADD)
irplib_plugin_test_SOURCES = irplib_plugin-test.c
-irplib_plugin_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_wlxcorr_test_SOURCES = irplib_wlxcorr-test.c
-irplib_wlxcorr_test_DEPENDENCIES = $(LIBIRPLIB)
+irplib_plugin_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_plugin_test_LDADD = $(LDADD)
+irplib_utils_test_SOURCES = irplib_utils-test.c
+irplib_utils_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_utils_test_LDADD = $(LDADD)
+irplib_framelist_test_SOURCES = irplib_framelist-test.c
+irplib_framelist_test_LDFLAGS = $(CPL_LDFLAGS)
+irplib_framelist_test_LDADD = $(LDADD)
irplib_wcs_test_SOURCES = irplib_wcs-test.c
-irplib_wcs_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_wcs_test_LDADD = $(LIBIRPLIB) $(LIBWCSLIB)
-irplib_wcs_test_LDFLAGS = $(WCSLIB_LDFLAGS)
+irplib_wcs_test_LDFLAGS = $(CPL_LDFLAGS) $(WCSLIB_LDFLAGS)
+irplib_wcs_test_LDADD = $(LDADD) $(LIBWCSLIB)
irplib_cat_test_SOURCES = irplib_cat-test.c
-irplib_cat_test_DEPENDENCIES = $(LIBIRPLIB)
-irplib_cat_test_LDADD = $(LIBIRPLIB) $(LIBWCSLIB)
-irplib_cat_test_LDFLAGS = $(WCSLIB_LDFLAGS)
+irplib_cat_test_LDFLAGS = $(CPL_LDFLAGS) $(WCSLIB_LDFLAGS)
+irplib_cat_test_LDADD = $(LDADD) $(LIBWCSLIB)
TESTS = $(check_PROGRAMS)
# Be sure to reexport important environment variables.
TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
- OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)"
+ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
+ MALLOC_PERTURB_=137 MALLOC_CHECK_=2
all: all-am
@@ -372,25 +400,25 @@ irplib_cat-test$(EXEEXT): $(irplib_cat_test_OBJECTS) $(irplib_cat_test_DEPENDENC
$(irplib_cat_test_LINK) $(irplib_cat_test_OBJECTS) $(irplib_cat_test_LDADD) $(LIBS)
irplib_framelist-test$(EXEEXT): $(irplib_framelist_test_OBJECTS) $(irplib_framelist_test_DEPENDENCIES)
@rm -f irplib_framelist-test$(EXEEXT)
- $(LINK) $(irplib_framelist_test_OBJECTS) $(irplib_framelist_test_LDADD) $(LIBS)
+ $(irplib_framelist_test_LINK) $(irplib_framelist_test_OBJECTS) $(irplib_framelist_test_LDADD) $(LIBS)
irplib_hist-test$(EXEEXT): $(irplib_hist_test_OBJECTS) $(irplib_hist_test_DEPENDENCIES)
@rm -f irplib_hist-test$(EXEEXT)
- $(LINK) $(irplib_hist_test_OBJECTS) $(irplib_hist_test_LDADD) $(LIBS)
+ $(irplib_hist_test_LINK) $(irplib_hist_test_OBJECTS) $(irplib_hist_test_LDADD) $(LIBS)
irplib_plugin-test$(EXEEXT): $(irplib_plugin_test_OBJECTS) $(irplib_plugin_test_DEPENDENCIES)
@rm -f irplib_plugin-test$(EXEEXT)
- $(LINK) $(irplib_plugin_test_OBJECTS) $(irplib_plugin_test_LDADD) $(LIBS)
+ $(irplib_plugin_test_LINK) $(irplib_plugin_test_OBJECTS) $(irplib_plugin_test_LDADD) $(LIBS)
irplib_polynomial-test$(EXEEXT): $(irplib_polynomial_test_OBJECTS) $(irplib_polynomial_test_DEPENDENCIES)
@rm -f irplib_polynomial-test$(EXEEXT)
- $(LINK) $(irplib_polynomial_test_OBJECTS) $(irplib_polynomial_test_LDADD) $(LIBS)
+ $(irplib_polynomial_test_LINK) $(irplib_polynomial_test_OBJECTS) $(irplib_polynomial_test_LDADD) $(LIBS)
irplib_utils-test$(EXEEXT): $(irplib_utils_test_OBJECTS) $(irplib_utils_test_DEPENDENCIES)
@rm -f irplib_utils-test$(EXEEXT)
- $(LINK) $(irplib_utils_test_OBJECTS) $(irplib_utils_test_LDADD) $(LIBS)
+ $(irplib_utils_test_LINK) $(irplib_utils_test_OBJECTS) $(irplib_utils_test_LDADD) $(LIBS)
irplib_wcs-test$(EXEEXT): $(irplib_wcs_test_OBJECTS) $(irplib_wcs_test_DEPENDENCIES)
@rm -f irplib_wcs-test$(EXEEXT)
$(irplib_wcs_test_LINK) $(irplib_wcs_test_OBJECTS) $(irplib_wcs_test_LDADD) $(LIBS)
irplib_wlxcorr-test$(EXEEXT): $(irplib_wlxcorr_test_OBJECTS) $(irplib_wlxcorr_test_DEPENDENCIES)
@rm -f irplib_wlxcorr-test$(EXEEXT)
- $(LINK) $(irplib_wlxcorr_test_OBJECTS) $(irplib_wlxcorr_test_LDADD) $(LIBS)
+ $(irplib_wlxcorr_test_LINK) $(irplib_wlxcorr_test_OBJECTS) $(irplib_wlxcorr_test_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
diff --git a/irplib/tests/irplib_cat-test.c b/irplib/tests/irplib_cat-test.c
index 9c80a66..97c89ed 100644
--- a/irplib/tests/irplib_cat-test.c
+++ b/irplib/tests/irplib_cat-test.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_cat-test.c,v 1.9 2009/08/12 14:26:44 cgarcia Exp $
+/* $Id: irplib_cat-test.c,v 1.10 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2008 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: cgarcia $
- * $Date: 2009/08/12 14:26:44 $
- * $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.10 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
diff --git a/irplib/tests/irplib_polynomial-test.c b/irplib/tests/irplib_polynomial-test.c
index 2013cbe..4f470b3 100644
--- a/irplib/tests/irplib_polynomial-test.c
+++ b/irplib/tests/irplib_polynomial-test.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_polynomial-test.c,v 1.35 2011/12/14 13:05:01 llundin Exp $
+/* $Id: irplib_polynomial-test.c,v 1.37 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2004 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2011/12/14 13:05:01 $
- * $Revision: 1.35 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.37 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
@@ -202,7 +202,7 @@ static void irplib_polynomial_solve_1d_all_test(void)
DBL_EPSILON, 2.0*DBL_EPSILON);
/* A more extreme case: Same with negative roots */
- (void)cpl_vector_fill(xtrue, -2.0e-4 * FLT_EPSILON);
+ (void)cpl_vector_fill(xtrue, -2.0e-3 * FLT_EPSILON);
(void)cpl_vector_set(xtrue, 0, -1.0);
irplib_polynomial_test_root_all(xtrue, nreal, CPL_MATH_PI,
@@ -253,7 +253,7 @@ static void irplib_polynomial_solve_1d_all_test(void)
cpl_vector_set_size(xtrue, nreal);
- /* -2, epsilon, 1 */
+ /* -2, epsilon, 1.5 */
(void)cpl_vector_set(xtrue, 0, -2.0);
(void)cpl_vector_set(xtrue, 1, 2.0 * DBL_EPSILON);
(void)cpl_vector_set(xtrue, 2, 1.5);
diff --git a/irplib/tests/irplib_utils-test.c b/irplib/tests/irplib_utils-test.c
index 7d75f3f..66f8696 100644
--- a/irplib/tests/irplib_utils-test.c
+++ b/irplib/tests/irplib_utils-test.c
@@ -122,13 +122,13 @@ static cpl_boolean my_table_set_row(cpl_table * self,
const cpl_parameterlist * parlist)
{
- cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(line != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(irow >= 0, CPL_ERROR_ILLEGAL_INPUT);
- cpl_ensure_code(rawframe != NULL, CPL_ERROR_NULL_INPUT);
- cpl_ensure_code(parlist != NULL, CPL_ERROR_NULL_INPUT);
+ cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
+ cpl_ensure(line != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
+ cpl_ensure(irow >= 0, CPL_ERROR_ILLEGAL_INPUT, CPL_FALSE);
+ cpl_ensure(rawframe != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
+ cpl_ensure(parlist != NULL, CPL_ERROR_NULL_INPUT, CPL_FALSE);
- return CPL_ERROR_NONE;
+ return CPL_TRUE;
}
diff --git a/irplib/tests/irplib_wcs-test.c b/irplib/tests/irplib_wcs-test.c
index aaf2973..3a1235f 100644
--- a/irplib/tests/irplib_wcs-test.c
+++ b/irplib/tests/irplib_wcs-test.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_wcs-test.c,v 1.8 2010/10/07 14:10:55 llundin Exp $
+/* $Id: irplib_wcs-test.c,v 1.9 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2008 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2010/10/07 14:10:55 $
- * $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.9 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
diff --git a/irplib/tests/irplib_wlxcorr-test.c b/irplib/tests/irplib_wlxcorr-test.c
index b9651d8..033b39a 100644
--- a/irplib/tests/irplib_wlxcorr-test.c
+++ b/irplib/tests/irplib_wlxcorr-test.c
@@ -1,4 +1,4 @@
-/* $Id: irplib_wlxcorr-test.c,v 1.15 2012/01/12 12:38:38 llundin Exp $
+/* $Id: irplib_wlxcorr-test.c,v 1.16 2013/01/29 08:43:33 jtaylor Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2004 European Southern Observatory
@@ -15,14 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: llundin $
- * $Date: 2012/01/12 12:38:38 $
- * $Revision: 1.15 $
- * $Name: sinfo-2_3_2 $
+ * $Author: jtaylor $
+ * $Date: 2013/01/29 08:43:33 $
+ * $Revision: 1.16 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
diff --git a/recipes/Makefile.am b/recipes/Makefile.am
index 7761add..79a5e02 100644
--- a/recipes/Makefile.am
+++ b/recipes/Makefile.am
@@ -52,9 +52,10 @@ plugin_LTLIBRARIES = \
sinfo_utl_skycor.la \
sinfo_utl_skymap.la \
sinfo_utl_spectrum_divide_by_blackbody.la \
- sinfo_utl_eff.la \
- sinfo_utl_spectrum_wavelength_shift.la
+ sinfo_utl_spectrum_wavelength_shift.la \
+ sinfo_utl_line_oh_select.la
+# sinfo_utl_eff.la \
# sinfo_rec_lingain.la \
# sinfo_rec_mdark_detmon.la \
# sinfo_img_noise.la
@@ -182,10 +183,10 @@ sinfo_utl_cube2ima_la_DEPENDENCIES = $(LIBSINFONI)
#sinfo_utl_ima_cube_ks_test_la_LDFLAGS = -module -avoid-version
#sinfo_utl_ima_cube_ks_test_la_DEPENDENCIES = $(LIBSINFONI)
-sinfo_utl_eff_la_SOURCES = sinfo_utl_eff.c
-sinfo_utl_eff_la_LIBADD = $(LIBSINFONI)
-sinfo_utl_eff_la_LDFLAGS = -module -avoid-version
-sinfo_utl_eff_la_DEPENDENCIES = $(LIBSINFONI)
+#sinfo_utl_eff_la_SOURCES = sinfo_utl_eff.c
+#sinfo_utl_eff_la_LIBADD = $(LIBSINFONI)
+#sinfo_utl_eff_la_LDFLAGS = -module -avoid-version
+#sinfo_utl_eff_la_DEPENDENCIES = $(LIBSINFONI)
sinfo_utl_cube2spectrum_la_SOURCES = sinfo_utl_cube2spectrum.c
sinfo_utl_cube2spectrum_la_LIBADD = $(LIBSINFONI)
@@ -271,6 +272,12 @@ sinfo_utl_spectrum_wavelength_shift_la_DEPENDENCIES = $(LIBSINFONI)
#sinfo_utl_seds_la_DEPENDENCIES = $(LIBSINFONI)
+sinfo_utl_line_oh_select_la_SOURCES = sinfo_utl_line_oh_select.c
+sinfo_utl_line_oh_select_la_LIBADD = $(LIBSINFONI)
+sinfo_utl_line_oh_select_la_LDFLAGS = -module -avoid-version
+sinfo_utl_line_oh_select_la_DEPENDENCIES = $(LIBSINFONI)
+
+
diff --git a/recipes/Makefile.in b/recipes/Makefile.in
index 3e11a06..566dbbe 100644
--- a/recipes/Makefile.in
+++ b/recipes/Makefile.in
@@ -153,11 +153,6 @@ sinfo_utl_cube_create_la_OBJECTS = \
sinfo_utl_cube_create_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(sinfo_utl_cube_create_la_LDFLAGS) $(LDFLAGS) -o $@
-am_sinfo_utl_eff_la_OBJECTS = sinfo_utl_eff.lo
-sinfo_utl_eff_la_OBJECTS = $(am_sinfo_utl_eff_la_OBJECTS)
-sinfo_utl_eff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(sinfo_utl_eff_la_LDFLAGS) $(LDFLAGS) -o $@
am_sinfo_utl_ima_arith_la_OBJECTS = sinfo_utl_ima_arith.lo
sinfo_utl_ima_arith_la_OBJECTS = $(am_sinfo_utl_ima_arith_la_OBJECTS)
sinfo_utl_ima_arith_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -170,6 +165,13 @@ sinfo_utl_ima_line_corr_la_LINK = $(LIBTOOL) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(sinfo_utl_ima_line_corr_la_LDFLAGS) \
$(LDFLAGS) -o $@
+am_sinfo_utl_line_oh_select_la_OBJECTS = sinfo_utl_line_oh_select.lo
+sinfo_utl_line_oh_select_la_OBJECTS = \
+ $(am_sinfo_utl_line_oh_select_la_OBJECTS)
+sinfo_utl_line_oh_select_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(sinfo_utl_line_oh_select_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
am_sinfo_utl_skycor_la_OBJECTS = sinfo_utl_skycor.lo
sinfo_utl_skycor_la_OBJECTS = $(am_sinfo_utl_skycor_la_OBJECTS)
sinfo_utl_skycor_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -222,8 +224,9 @@ SOURCES = $(sinfo_rec_detlin_la_SOURCES) \
$(sinfo_utl_cube_arith_la_SOURCES) \
$(sinfo_utl_cube_combine_la_SOURCES) \
$(sinfo_utl_cube_create_la_SOURCES) \
- $(sinfo_utl_eff_la_SOURCES) $(sinfo_utl_ima_arith_la_SOURCES) \
+ $(sinfo_utl_ima_arith_la_SOURCES) \
$(sinfo_utl_ima_line_corr_la_SOURCES) \
+ $(sinfo_utl_line_oh_select_la_SOURCES) \
$(sinfo_utl_skycor_la_SOURCES) $(sinfo_utl_skymap_la_SOURCES) \
$(sinfo_utl_spectrum_divide_by_blackbody_la_SOURCES) \
$(sinfo_utl_spectrum_wavelength_shift_la_SOURCES)
@@ -238,8 +241,9 @@ DIST_SOURCES = $(sinfo_rec_detlin_la_SOURCES) \
$(sinfo_utl_cube_arith_la_SOURCES) \
$(sinfo_utl_cube_combine_la_SOURCES) \
$(sinfo_utl_cube_create_la_SOURCES) \
- $(sinfo_utl_eff_la_SOURCES) $(sinfo_utl_ima_arith_la_SOURCES) \
+ $(sinfo_utl_ima_arith_la_SOURCES) \
$(sinfo_utl_ima_line_corr_la_SOURCES) \
+ $(sinfo_utl_line_oh_select_la_SOURCES) \
$(sinfo_utl_skycor_la_SOURCES) $(sinfo_utl_skymap_la_SOURCES) \
$(sinfo_utl_spectrum_divide_by_blackbody_la_SOURCES) \
$(sinfo_utl_spectrum_wavelength_shift_la_SOURCES)
@@ -462,10 +466,11 @@ plugin_LTLIBRARIES = \
sinfo_utl_skycor.la \
sinfo_utl_skymap.la \
sinfo_utl_spectrum_divide_by_blackbody.la \
- sinfo_utl_eff.la \
- sinfo_utl_spectrum_wavelength_shift.la
+ sinfo_utl_spectrum_wavelength_shift.la \
+ sinfo_utl_line_oh_select.la
+# sinfo_utl_eff.la \
# sinfo_rec_lingain.la \
# sinfo_rec_mdark_detmon.la \
# sinfo_img_noise.la
@@ -579,10 +584,11 @@ sinfo_utl_cube2ima_la_DEPENDENCIES = $(LIBSINFONI)
#sinfo_utl_ima_cube_ks_test_la_LIBADD = $(LIBSINFONI)
#sinfo_utl_ima_cube_ks_test_la_LDFLAGS = -module -avoid-version
#sinfo_utl_ima_cube_ks_test_la_DEPENDENCIES = $(LIBSINFONI)
-sinfo_utl_eff_la_SOURCES = sinfo_utl_eff.c
-sinfo_utl_eff_la_LIBADD = $(LIBSINFONI)
-sinfo_utl_eff_la_LDFLAGS = -module -avoid-version
-sinfo_utl_eff_la_DEPENDENCIES = $(LIBSINFONI)
+
+#sinfo_utl_eff_la_SOURCES = sinfo_utl_eff.c
+#sinfo_utl_eff_la_LIBADD = $(LIBSINFONI)
+#sinfo_utl_eff_la_LDFLAGS = -module -avoid-version
+#sinfo_utl_eff_la_DEPENDENCIES = $(LIBSINFONI)
sinfo_utl_cube2spectrum_la_SOURCES = sinfo_utl_cube2spectrum.c
sinfo_utl_cube2spectrum_la_LIBADD = $(LIBSINFONI)
sinfo_utl_cube2spectrum_la_LDFLAGS = -module -avoid-version
@@ -643,6 +649,20 @@ sinfo_utl_spectrum_wavelength_shift_la_SOURCES = sinfo_utl_spectrum_wavelength_s
sinfo_utl_spectrum_wavelength_shift_la_LIBADD = $(LIBSINFONI)
sinfo_utl_spectrum_wavelength_shift_la_LDFLAGS = -module -avoid-version
sinfo_utl_spectrum_wavelength_shift_la_DEPENDENCIES = $(LIBSINFONI)
+
+#sinfo_utl_stdstars_la_SOURCES = sinfo_utl_stdstars.c
+#sinfo_utl_stdstars_la_LIBADD = $(LIBSINFONI)
+#sinfo_utl_stdstars_la_LDFLAGS = -module -avoid-version
+#sinfo_utl_stdstars_la_DEPENDENCIES = $(LIBSINFONI)
+
+#sinfo_utl_seds_la_SOURCES = sinfo_utl_seds.c
+#sinfo_utl_seds_la_LIBADD = $(LIBSINFONI)
+#sinfo_utl_seds_la_LDFLAGS = -module -avoid-version
+#sinfo_utl_seds_la_DEPENDENCIES = $(LIBSINFONI)
+sinfo_utl_line_oh_select_la_SOURCES = sinfo_utl_line_oh_select.c
+sinfo_utl_line_oh_select_la_LIBADD = $(LIBSINFONI)
+sinfo_utl_line_oh_select_la_LDFLAGS = -module -avoid-version
+sinfo_utl_line_oh_select_la_DEPENDENCIES = $(LIBSINFONI)
all: all-recursive
.SUFFIXES:
@@ -734,12 +754,12 @@ sinfo_utl_cube_combine.la: $(sinfo_utl_cube_combine_la_OBJECTS) $(sinfo_utl_cube
$(sinfo_utl_cube_combine_la_LINK) -rpath $(plugindir) $(sinfo_utl_cube_combine_la_OBJECTS) $(sinfo_utl_cube_combine_la_LIBADD) $(LIBS)
sinfo_utl_cube_create.la: $(sinfo_utl_cube_create_la_OBJECTS) $(sinfo_utl_cube_create_la_DEPENDENCIES)
$(sinfo_utl_cube_create_la_LINK) -rpath $(plugindir) $(sinfo_utl_cube_create_la_OBJECTS) $(sinfo_utl_cube_create_la_LIBADD) $(LIBS)
-sinfo_utl_eff.la: $(sinfo_utl_eff_la_OBJECTS) $(sinfo_utl_eff_la_DEPENDENCIES)
- $(sinfo_utl_eff_la_LINK) -rpath $(plugindir) $(sinfo_utl_eff_la_OBJECTS) $(sinfo_utl_eff_la_LIBADD) $(LIBS)
sinfo_utl_ima_arith.la: $(sinfo_utl_ima_arith_la_OBJECTS) $(sinfo_utl_ima_arith_la_DEPENDENCIES)
$(sinfo_utl_ima_arith_la_LINK) -rpath $(plugindir) $(sinfo_utl_ima_arith_la_OBJECTS) $(sinfo_utl_ima_arith_la_LIBADD) $(LIBS)
sinfo_utl_ima_line_corr.la: $(sinfo_utl_ima_line_corr_la_OBJECTS) $(sinfo_utl_ima_line_corr_la_DEPENDENCIES)
$(sinfo_utl_ima_line_corr_la_LINK) -rpath $(plugindir) $(sinfo_utl_ima_line_corr_la_OBJECTS) $(sinfo_utl_ima_line_corr_la_LIBADD) $(LIBS)
+sinfo_utl_line_oh_select.la: $(sinfo_utl_line_oh_select_la_OBJECTS) $(sinfo_utl_line_oh_select_la_DEPENDENCIES)
+ $(sinfo_utl_line_oh_select_la_LINK) -rpath $(plugindir) $(sinfo_utl_line_oh_select_la_OBJECTS) $(sinfo_utl_line_oh_select_la_LIBADD) $(LIBS)
sinfo_utl_skycor.la: $(sinfo_utl_skycor_la_OBJECTS) $(sinfo_utl_skycor_la_DEPENDENCIES)
$(sinfo_utl_skycor_la_LINK) -rpath $(plugindir) $(sinfo_utl_skycor_la_OBJECTS) $(sinfo_utl_skycor_la_LIBADD) $(LIBS)
sinfo_utl_skymap.la: $(sinfo_utl_skymap_la_OBJECTS) $(sinfo_utl_skymap_la_DEPENDENCIES)
@@ -768,9 +788,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_cube_arith.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_cube_combine.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_cube_create.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_eff.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_ima_arith.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_ima_line_corr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_line_oh_select.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_skycor.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_skymap.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_utl_spectrum_divide_by_blackbody.Plo at am__quote@
@@ -1143,16 +1163,6 @@ uninstall-am: uninstall-pkgincludeHEADERS uninstall-pluginLTLIBRARIES
uninstall-pluginLTLIBRARIES
-#sinfo_utl_stdstars_la_SOURCES = sinfo_utl_stdstars.c
-#sinfo_utl_stdstars_la_LIBADD = $(LIBSINFONI)
-#sinfo_utl_stdstars_la_LDFLAGS = -module -avoid-version
-#sinfo_utl_stdstars_la_DEPENDENCIES = $(LIBSINFONI)
-
-#sinfo_utl_seds_la_SOURCES = sinfo_utl_seds.c
-#sinfo_utl_seds_la_LIBADD = $(LIBSINFONI)
-#sinfo_utl_seds_la_LDFLAGS = -module -avoid-version
-#sinfo_utl_seds_la_DEPENDENCIES = $(LIBSINFONI)
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/recipes/sinfo_rec_detlin.c b/recipes/sinfo_rec_detlin.c
index 818ebb6..b0eefbc 100644
--- a/recipes/sinfo_rec_detlin.c
+++ b/recipes/sinfo_rec_detlin.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/02/04 17:23:02 $
* $Revision: 1.21 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/**
diff --git a/recipes/sinfo_rec_distortion.c b/recipes/sinfo_rec_distortion.c
index e8a61ac..4378c56 100644
--- a/recipes/sinfo_rec_distortion.c
+++ b/recipes/sinfo_rec_distortion.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/11/16 13:36:19 $
* $Revision: 1.42 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_rec_jitter.c b/recipes/sinfo_rec_jitter.c
index e6b73d6..b2e3abf 100644
--- a/recipes/sinfo_rec_jitter.c
+++ b/recipes/sinfo_rec_jitter.c
@@ -21,7 +21,7 @@
* $Author: kmirny $
* $Date: 2009/10/20 14:32:56 $
* $Revision: 1.33 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_rec_mdark.c b/recipes/sinfo_rec_mdark.c
index 985ebac..86255a7 100644
--- a/recipes/sinfo_rec_mdark.c
+++ b/recipes/sinfo_rec_mdark.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/02/28 10:36:10 $
* $Revision: 1.22 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_rec_mflat.c b/recipes/sinfo_rec_mflat.c
index 0bdf278..bdf0a59 100644
--- a/recipes/sinfo_rec_mflat.c
+++ b/recipes/sinfo_rec_mflat.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2008/02/05 08:13:05 $
* $Revision: 1.22 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_rec_pupil.c b/recipes/sinfo_rec_pupil.c
index 8478747..4aa045e 100644
--- a/recipes/sinfo_rec_pupil.c
+++ b/recipes/sinfo_rec_pupil.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/02/12 14:56:50 $
* $Revision: 1.17 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_rec_wavecal.c b/recipes/sinfo_rec_wavecal.c
index 6ee81eb..fa4ee03 100644
--- a/recipes/sinfo_rec_wavecal.c
+++ b/recipes/sinfo_rec_wavecal.c
@@ -1,4 +1,4 @@
-/* $Id: sinfo_rec_wavecal.c,v 1.30 2009/09/02 12:00:56 kmirny Exp $
+/* $Id: sinfo_rec_wavecal.c,v 1.31 2012/09/17 09:06:39 amodigli Exp $
*
* This file is part of the SINFONI Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -19,10 +19,10 @@
*/
/*
- * $Author: kmirny $
- * $Date: 2009/09/02 12:00:56 $
- * $Revision: 1.30 $
- * $Name: sinfo-2_3_2 $
+ * $Author: amodigli $
+ * $Date: 2012/09/17 09:06:39 $
+ * $Revision: 1.31 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
@@ -306,7 +306,7 @@ static int sinfo_rec_wavecal(cpl_parameterlist *config, cpl_frameset *set)
check_nomsg(p=cpl_parameterlist_find(config,
"sinfoni.wavecal.slitpos_boostrap"));
check_nomsg(sw=cpl_parameter_get_bool(p));
- if( (sw == 1) ) {
+ if( sw == 1 ) {
check_nomsg(wrk_set=cpl_frameset_duplicate(set));
check_nomsg(p=cpl_parameterlist_find(config,"sinfoni.stacked.ind_index"));
diff --git a/recipes/sinfo_utl_bp_mask_add.c b/recipes/sinfo_utl_bp_mask_add.c
index 7b86036..8ed8c25 100644
--- a/recipes/sinfo_utl_bp_mask_add.c
+++ b/recipes/sinfo_utl_bp_mask_add.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2008/08/21 09:46:47 $
* $Revision: 1.18 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/recipes/sinfo_utl_cube2ima.c b/recipes/sinfo_utl_cube2ima.c
index d43b803..5dd612e 100644
--- a/recipes/sinfo_utl_cube2ima.c
+++ b/recipes/sinfo_utl_cube2ima.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_cube2spectrum.c b/recipes/sinfo_utl_cube2spectrum.c
index b7a1f76..c6b4295 100644
--- a/recipes/sinfo_utl_cube2spectrum.c
+++ b/recipes/sinfo_utl_cube2spectrum.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 08:33:11 $
* $Revision: 1.12 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_cube_arith.c b/recipes/sinfo_utl_cube_arith.c
index 42aad66..8ccacda 100644
--- a/recipes/sinfo_utl_cube_arith.c
+++ b/recipes/sinfo_utl_cube_arith.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_cube_combine.c b/recipes/sinfo_utl_cube_combine.c
index 2a51c13..88b83a7 100644
--- a/recipes/sinfo_utl_cube_combine.c
+++ b/recipes/sinfo_utl_cube_combine.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.12 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_cube_create.c b/recipes/sinfo_utl_cube_create.c
index fb27e22..8b76ef3 100644
--- a/recipes/sinfo_utl_cube_create.c
+++ b/recipes/sinfo_utl_cube_create.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/08/29 11:34:03 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_eff.c b/recipes/sinfo_utl_eff.c
deleted file mode 100644
index 0c344d2..0000000
--- a/recipes/sinfo_utl_eff.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/* $Id: sinfo_utl_eff.c,v 1.7 2010/02/18 19:14:41 amodigli Exp $
- *
- * This file is part of the SINFONI Pipeline
- * Copyright (C) 2002,2003 European Southern Observatory
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * $Author: amodigli $
- * $Date: 2010/02/18 19:14:41 $
- * $Revision: 1.7 $
- * $Log: sinfo_utl_eff.c,v $
- * Revision 1.7 2010/02/18 19:14:41 amodigli
- * some bug fixes
- *
- * Revision 1.6 2010/02/08 07:14:34 amodigli
- * changed sinfo_utl_efficiency API
- *
- * Revision 1.5 2009/12/15 15:07:32 kmirny
- * efficiency update
- *
- * Revision 1.4 2009/07/27 12:37:43 amodigli
- * removed parlist from sinfo_utl_efficiency() API as not used
- *
- * Revision 1.3 2009/07/14 14:45:03 kmirny
- * new recipe parameters
- *
- * Revision 1.2 2009/06/12 14:20:20 kmirny
- * updating SINFONI efficiency calculation
- *
- * Revision 1.1 2009/06/10 14:57:14 kmirny
- * sinfoni efficiency utility recipe
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/*-----------------------------------------------------------------------------
- Includes
- ----------------------------------------------------------------------------*/
-#include <string.h>
-
-/* cpl */
-#include <cpl.h>
-
-/* irplib */
-#include <irplib_utils.h>
-
-#include <sinfo_tpl_utils.h>
-#include <sinfo_pfits.h>
-#include <sinfo_tpl_dfs.h>
-#include <sinfo_key_names.h>
-#include <sinfo_pro_types.h>
-#include <sinfo_ref_types.h>
-#include <sinfo_functions.h>
-#include <sinfo_msg.h>
-#include <sinfo_error.h>
-#include <sinfo_utils_wrappers.h>
-#include <sinfo_utl_efficiency.h>
-
-/*-----------------------------------------------------------------------------
- Functions prototypes
- ----------------------------------------------------------------------------*/
-
-static int sinfo_utl_eff_create(cpl_plugin *) ;
-static int sinfo_utl_eff_exec(cpl_plugin *) ;
-static int sinfo_utl_eff_destroy(cpl_plugin *) ;
-static int sinfo_utl_eff(cpl_parameterlist *, cpl_frameset *) ;
-
-/*-----------------------------------------------------------------------------
- Static variables
- ----------------------------------------------------------------------------*/
-
-static char sinfo_utl_eff_description[] =
-"This recipe calculate a efficiency\n"
-"esorex --params sinfo_utl_eff\n"
-"esorex --help sinfo_utl_eff\n"
-"\n";
-
-
-
-/*-----------------------------------------------------------------------------
- Functions code
- ----------------------------------------------------------------------------*/
-/*---------------------------------------------------------------------------*/
-/**
- * @defgroup sinfo_utl_eff Recipe to do operations on an image
- */
-/*---------------------------------------------------------------------------*/
-
-/**@{*/
-/*---------------------------------------------------------------------------*/
-/**
- @brief Build the list of available plugins, for this module.
- @param list the plugin list
- @return 0 if everything is ok
-
- This function is exported.
- */
-/*---------------------------------------------------------------------------*/
-int cpl_plugin_get_info(cpl_pluginlist * list)
-{
- cpl_recipe * recipe = cpl_calloc(1, sizeof *recipe ) ;
- cpl_plugin * plugin = &recipe->interface ;
-
- cpl_plugin_init(plugin,
- CPL_PLUGIN_API,
- SINFONI_BINARY_VERSION,
- CPL_PLUGIN_TYPE_RECIPE,
- "sinfo_utl_eff",
- "Produce a table with efficiency",
- sinfo_utl_eff_description,
- "Konstantin Mirny",
- "kmirny at eso.org",
- sinfo_get_license(),
- sinfo_utl_eff_create,
- sinfo_utl_eff_exec,
- sinfo_utl_eff_destroy) ;
-
- cpl_pluginlist_append(list, plugin) ;
-
- return 0;
-}
-
-/*---------------------------------------------------------------------------*/
-/**
- @brief Setup the recipe options
- @param plugin the plugin
- @return 0 if everything is ok
-
- Create the recipe instance and make it available to the application using
- the interface.
- */
-/*---------------------------------------------------------------------------*/
-static int sinfo_utl_eff_create(cpl_plugin * plugin)
-{
- cpl_recipe * recipe ;
-
- /* Get the recipe out of the plugin */
- if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
- recipe = (cpl_recipe *)plugin ;
- else return -1 ;
- cpl_error_reset();
- irplib_reset();
-
- /* Create the parameters list in the cpl_recipe object */
- recipe->parameters = cpl_parameterlist_new() ;
-
- /* Fill the parameters list */
-
-
- /* Return */
- return 0;
-}
-
-/*---------------------------------------------------------------------------*/
-/**
- @brief Execute the plugin instance given by the interface
- @param plugin the plugin
- @return 0 if everything is ok
- */
-/*---------------------------------------------------------------------------*/
-static int sinfo_utl_eff_exec(cpl_plugin * plugin)
-{
- cpl_recipe * recipe ;
- int code=0;
- cpl_errorstate initial_errorstate = cpl_errorstate_get();
-
- /* Get the recipe out of the plugin */
- if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
- recipe = (cpl_recipe *)plugin ;
- else return -1 ;
- cpl_error_reset();
- irplib_reset();
- code = sinfo_utl_eff(recipe->parameters, recipe->frames) ;
-
-
- if (!cpl_errorstate_is_equal(initial_errorstate)) {
- /* Dump the error history since recipe execution start.
- At this point the recipe cannot recover from the error */
- cpl_errorstate_dump(initial_errorstate, CPL_FALSE, NULL);
- }
-
- return code ;
-}
-
-/*---------------------------------------------------------------------------*/
-/**
- @brief Destroy what has been created by the 'create' function
- @param plugin the plugin
- @return 0 if everything is ok
- */
-/*---------------------------------------------------------------------------*/
-static int sinfo_utl_eff_destroy(cpl_plugin * plugin)
-{
- cpl_recipe * recipe ;
-
- /* Get the recipe out of the plugin */
- if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
- recipe = (cpl_recipe *)plugin ;
- else return -1 ;
-
- cpl_parameterlist_delete(recipe->parameters) ;
- return 0 ;
-}
-
-/*---------------------------------------------------------------------------*/
-/**
- @brief Get the command line options and execute the data reduction
- @param parlist the parameters list
- @param framelist the frames list
- @return 0 if everything is ok
- */
-/*---------------------------------------------------------------------------*/
-static int
-sinfo_utl_eff( cpl_parameterlist * parlist,
- cpl_frameset * framelist)
-{
-
- const char * name_o = NULL ;
-
- cpl_frame* product_frame = 0;
- cpl_propertylist * plist = NULL ;
- int pos = 0;
- int npos = 0;
- cpl_frame* frm_sci=NULL;
- cpl_frame* frm_atm_ext=NULL;
- cpl_frame* frm_std_cat=NULL;
- cpl_table* eff_tbl=NULL;
-
- sinfo_msg("Welcome to SINFONI Pipeline release %d.%d.%d",
- SINFONI_MAJOR_VERSION,SINFONI_MINOR_VERSION,SINFONI_MICRO_VERSION);
- ck0(sinfo_dfs_set_groups(framelist),"Cannot indentify RAW and CALIB frames");
-
- /* HOW TO GET THE VALUE OF A FITS KEYWORD */
- check(plist=cpl_propertylist_new(),"Cannot create a Property List");
-
-
- /* Now performing the data reduction */
- name_o = "eff_res.fits" ;
-
- check_nomsg(frm_sci=cpl_frameset_find (framelist, PRO_STD_STAR_SPECTRA));
- check_nomsg(frm_std_cat=cpl_frameset_find (framelist, FLUX_STD_CATALOG));
- check_nomsg(frm_atm_ext=cpl_frameset_find (framelist, EXTCOEFF_TABLE));
- sinfo_msg("frm_sci=%p frm_std=%p frm_atm_ext=%p",frm_sci,frm_std_cat,frm_atm_ext);
- check_nomsg(eff_tbl=sinfo_efficiency_compute(frm_sci,frm_std_cat,frm_atm_ext));
- npos = cpl_frameset_get_size(framelist);
- for (pos = 0; pos < npos; pos++)
- {
- cpl_frame* pframe = cpl_frameset_get_frame(framelist, pos);
- cpl_frame_group group = cpl_frame_get_group(pframe);
- if (CPL_FRAME_GROUP_PRODUCT == group)
- {
- check_nomsg(cpl_frame_set_group (pframe, CPL_FRAME_GROUP_CALIB));
- }
- }
- /* Create product frame */
- check_nomsg(product_frame = cpl_frame_new());
- check_nomsg(cpl_frame_set_filename(product_frame, name_o)) ;
- check_nomsg(cpl_frame_set_tag(product_frame,"sinfo_efficiency" )) ;
- check_nomsg(cpl_frame_set_type(product_frame, CPL_FRAME_TYPE_TABLE)) ;
- check_nomsg(cpl_frame_set_group(product_frame, CPL_FRAME_GROUP_PRODUCT)) ;
- check(cpl_frame_set_level(product_frame, CPL_FRAME_LEVEL_FINAL),
- "Error while initialising the product frame") ;
-
- /* Add DataFlow keywords */
- check_nomsg(cpl_propertylist_erase_regexp(plist, "^ESO PRO CATG",0));
- /* Log the saved file in the input frameset */
- check_nomsg(cpl_frameset_insert(framelist, product_frame)) ;
- check(cpl_dfs_setup_product_header(plist,
- product_frame,
- framelist,
- parlist,
- "sinfo_utl_eff",
- "SINFONI",
- KEY_VALUE_HPRO_DID,NULL),
- "Problem in the product DFS-compliance") ;
- sinfo_free_propertylist(&plist) ;
-
- cleanup:
- sinfo_free_propertylist(&plist) ;
- return (cpl_error_get_code()) ? -1 : 0;
-}
-/**@}*/
diff --git a/recipes/sinfo_utl_ima_arith.c b/recipes/sinfo_utl_ima_arith.c
index f042371..30faf12 100644
--- a/recipes/sinfo_utl_ima_arith.c
+++ b/recipes/sinfo_utl_ima_arith.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2009/01/30 14:56:12 $
* $Revision: 1.14 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_ima_line_corr.c b/recipes/sinfo_utl_ima_line_corr.c
index d0edb84..27b0955 100644
--- a/recipes/sinfo_utl_ima_line_corr.c
+++ b/recipes/sinfo_utl_ima_line_corr.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 08:18:55 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_line_oh_select.c b/recipes/sinfo_utl_line_oh_select.c
new file mode 100644
index 0000000..6521044
--- /dev/null
+++ b/recipes/sinfo_utl_line_oh_select.c
@@ -0,0 +1,292 @@
+/* $Id: sinfo_utl_line_oh_select.c,v 1.2 2012/08/10 07:55:03 amodigli Exp $
+ *
+ * This file is part of the SINFONI Pipeline
+ * Copyright (C) 2002,2003 European Southern Observatory
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * $Author: amodigli $
+ * $Date: 2012/08/10 07:55:03 $
+ * $Revision: 1.2 $
+ * $Name: sinfo-2_3_3 $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/*-----------------------------------------------------------------------------
+ Includes
+ -----------------------------------------------------------------------------*/
+
+#include <math.h>
+#include <cpl.h>
+
+#include "irplib_utils.h"
+#include <sinfo_utils_wrappers.h>
+#include <sinfo_msg.h>
+
+#include "sinfo_raw_types.h"
+#include "sinfo_pro_types.h"
+#include "sinfo_tpl_utils.h"
+#include "sinfo_tpl_dfs.h"
+
+
+/*-----------------------------------------------------------------------------
+ Functions prototypes
+ -----------------------------------------------------------------------------*/
+
+static int sinfo_utl_line_oh_select_create(cpl_plugin *) ;
+static int sinfo_utl_line_oh_select_exec(cpl_plugin *) ;
+static int sinfo_utl_line_oh_select_destroy(cpl_plugin *) ;
+static int sinfo_utl_line_oh_select(cpl_parameterlist *, cpl_frameset *) ;
+
+/*-----------------------------------------------------------------------------
+ Static variables
+ -----------------------------------------------------------------------------*/
+
+static char sinfo_utl_line_oh_select_description[] =
+"sinfo_utl_line_oh_select -- SINFONI OH LINE table creation.\n"
+"The files listed in the Set Of Frames (sof-file) must be tagged:\n"
+"raw-file.fits REF_LINE_OH \n" ;
+
+/*-----------------------------------------------------------------------------
+ Functions code
+ -----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/**
+ @brief Build the list of available plugins, for this module.
+ @param list the plugin list
+ @return 0 if everything is ok
+
+ This function is exported.
+ */
+/*----------------------------------------------------------------------------*/
+int cpl_plugin_get_info(cpl_pluginlist * list)
+{
+ cpl_recipe * recipe = cpl_calloc(1, sizeof(*recipe)) ;
+ cpl_plugin * plugin = &recipe->interface ;
+
+ cpl_plugin_init(plugin,
+ CPL_PLUGIN_API,
+ SINFONI_BINARY_VERSION,
+ CPL_PLUGIN_TYPE_RECIPE,
+ "sinfo_utl_line_oh_select",
+ "OH line table creation",
+ sinfo_utl_line_oh_select_description,
+ "Andrea Modigliani",
+ "amodigli at eso.org",
+ sinfo_get_license(),
+ sinfo_utl_line_oh_select_create,
+ sinfo_utl_line_oh_select_exec,
+ sinfo_utl_line_oh_select_destroy) ;
+
+ cpl_pluginlist_append(list, plugin) ;
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+ @brief Setup the recipe options
+ @param plugin the plugin
+ @return 0 if everything is ok
+
+ Create the recipe instance and make it available to the application using the
+ interface.
+ */
+/*----------------------------------------------------------------------------*/
+static int sinfo_utl_line_oh_select_create(cpl_plugin * plugin)
+{
+ cpl_recipe * recipe ;
+ cpl_parameter* p=NULL;
+
+ /* Get the recipe out of the plugin */
+ if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+ recipe = (cpl_recipe *)plugin ;
+ else return -1 ;
+
+ /* Create the parameters list in the cpl_recipe object */
+ recipe->parameters = cpl_parameterlist_new() ;
+
+ /* --doubleopt */
+ p = cpl_parameter_new_range("sinfoni.sinfo_utl_line_oh_select.wmin",
+ CPL_TYPE_DOUBLE, "wmin",
+ "sinfoni.sinfo_utl_line_oh_select",
+ 1040.,1000.,2500.) ;
+ cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "wmin") ;
+ cpl_parameterlist_append(recipe->parameters, p) ;
+
+
+ p = cpl_parameter_new_range("sinfoni.sinfo_utl_line_oh_select.wmax",
+ CPL_TYPE_DOUBLE, "wmax",
+ "sinfoni.sinfo_utl_line_oh_select",
+ 1880.,1000.,2500.) ;
+ cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "wmax") ;
+ cpl_parameterlist_append(recipe->parameters, p) ;
+
+ p = cpl_parameter_new_value("sinfoni.sinfo_utl_line_oh_select.intnorm",
+ CPL_TYPE_DOUBLE, "intnorm",
+ "sinfoni.sinfo_utl_line_oh_select",
+ 4.) ;
+ cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "intnorm") ;
+ cpl_parameterlist_append(recipe->parameters, p) ;
+
+ p = cpl_parameter_new_value("sinfoni.sinfo_utl_line_oh_select.intlimit",
+ CPL_TYPE_DOUBLE, "intlimit",
+ "sinfoni.sinfo_utl_line_oh_select",
+ 50.) ;
+ cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "intlimit") ;
+ cpl_parameterlist_append(recipe->parameters, p) ;
+
+
+
+
+ /* Return */
+ return 0;
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+ @brief Execute the plugin instance given by the interface
+ @param plugin the plugin
+ @return 0 if everything is ok
+ */
+/*----------------------------------------------------------------------------*/
+static int sinfo_utl_line_oh_select_exec(cpl_plugin * plugin)
+{
+ cpl_recipe * recipe ;
+
+ /* Get the recipe out of the plugin */
+ if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+ recipe = (cpl_recipe *)plugin ;
+ else return -1 ;
+
+ return sinfo_utl_line_oh_select(recipe->parameters, recipe->frames) ;
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+ @brief Destroy what has been created by the 'create' function
+ @param plugin the plugin
+ @return 0 if everything is ok
+ */
+/*----------------------------------------------------------------------------*/
+static int sinfo_utl_line_oh_select_destroy(cpl_plugin * plugin)
+{
+ cpl_recipe * recipe ;
+
+ /* Get the recipe out of the plugin */
+ if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
+ recipe = (cpl_recipe *)plugin ;
+ else return -1 ;
+
+ cpl_parameterlist_delete(recipe->parameters) ;
+ return 0 ;
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+ @brief The recipe data reduction part is implemented here
+ @param parlist the parameters list
+ @param framelist the frames list
+ @return 0 if everything is ok
+ */
+/*----------------------------------------------------------------------------*/
+static int sinfo_utl_line_oh_select(
+ cpl_parameterlist * parlist,
+ cpl_frameset * framelist)
+{
+ cpl_parameter* p=NULL;
+ cpl_frame* frame=NULL;
+
+ cpl_frameset * rawframes ;
+ int nframes;
+ cpl_propertylist* phead=NULL;
+ cpl_table * tab_in ;
+ cpl_table * tab_ou ;
+
+ int nm2AA=10.;
+
+
+ double wmin=0;
+ double wmax=0;
+ double intnorm=0;
+ double intlimit=0;
+ int next=0;
+ int nrow=0;
+ /* Identify the RAW and CALIB frames in the input frameset */
+ if (sinfo_dfs_set_groups(framelist)) {
+ cpl_msg_error(__func__, "Cannot identify RAW and CALIB frames") ;
+ return -1 ;
+ }
+
+ /* Retrieve raw frames */
+ if ((rawframes = sinfo_extract_frameset(framelist,
+ "REF_LINE_OH")) == NULL) {
+ cpl_msg_error(__func__, "Cannot find raw frames in the input list") ;
+ return -1 ;
+ }
+
+ p=cpl_parameterlist_find(parlist, "sinfoni.sinfo_utl_line_oh_select.wmin");
+ wmin = cpl_parameter_get_double(p);
+
+ p=cpl_parameterlist_find(parlist, "sinfoni.sinfo_utl_line_oh_select.wmax");
+ wmax = cpl_parameter_get_double(p);
+
+ p=cpl_parameterlist_find(parlist, "sinfoni.sinfo_utl_line_oh_select.intnorm");
+ intnorm = cpl_parameter_get_double(p);
+ p=cpl_parameterlist_find(parlist, "sinfoni.sinfo_utl_line_oh_select.intlimit");
+ intlimit = cpl_parameter_get_double(p);
+
+ nframes = cpl_frameset_get_size(rawframes) ;
+
+ /* Load */
+ if(nframes > 0) {
+ frame=cpl_frameset_get_frame(rawframes,0);
+ }
+ tab_in=cpl_table_load(cpl_frame_get_filename(frame),1,0);
+ nrow=cpl_table_get_nrow(tab_in);
+
+ cpl_table_divide_scalar(tab_in,"wave",nm2AA);
+ cpl_table_divide_scalar(tab_in,"int",intnorm);
+ sinfo_msg("wmin=%g wmax=%g",wmin,wmax);
+ sinfo_msg("nrow=%d",nrow);
+ cpl_table_dump(tab_in,1,2,stdout);
+ cpl_table_dump(tab_in,nrow-10,2,stdout);
+ next=cpl_table_and_selected_double(tab_in,"wave",CPL_GREATER_THAN,wmin);
+ sinfo_msg("next=%d",next);
+ next=cpl_table_and_selected_double(tab_in,"wave",CPL_LESS_THAN,wmax);
+ sinfo_msg("next=%d",next);
+ next=cpl_table_and_selected_double(tab_in,"int",CPL_GREATER_THAN,intlimit);
+ sinfo_msg("next=%d",next);
+ tab_ou=cpl_table_extract_selected(tab_in);
+
+ cpl_table_save(tab_ou,phead,NULL,"oh_selected.fits",CPL_IO_DEFAULT);
+
+ /* Free and return */
+ sinfo_free_table(&tab_in);
+ sinfo_free_table(&tab_ou);
+ sinfo_free_propertylist(&phead);
+
+
+ return 0 ;
+}
+
+
+
diff --git a/recipes/sinfo_utl_skycor.c b/recipes/sinfo_utl_skycor.c
index dafaef8..64c6177 100644
--- a/recipes/sinfo_utl_skycor.c
+++ b/recipes/sinfo_utl_skycor.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_skymap.c b/recipes/sinfo_utl_skymap.c
index cac24fa..bb37f38 100644
--- a/recipes/sinfo_utl_skymap.c
+++ b/recipes/sinfo_utl_skymap.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2009/01/30 14:56:12 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_spectrum_divide_by_blackbody.c b/recipes/sinfo_utl_spectrum_divide_by_blackbody.c
index 383e7ca..d59c060 100644
--- a/recipes/sinfo_utl_spectrum_divide_by_blackbody.c
+++ b/recipes/sinfo_utl_spectrum_divide_by_blackbody.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/sinfo_utl_spectrum_wavelength_shift.c b/recipes/sinfo_utl_spectrum_wavelength_shift.c
index aeb7755..2ec5f6e 100644
--- a/recipes/sinfo_utl_spectrum_wavelength_shift.c
+++ b/recipes/sinfo_utl_spectrum_wavelength_shift.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:40:28 $
* $Revision: 1.11 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/recipes/tests/recipe_main.c b/recipes/tests/recipe_main.c
index a3b5d5d..11725a6 100644
--- a/recipes/tests/recipe_main.c
+++ b/recipes/tests/recipe_main.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2009/09/15 08:13:38 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/regtests/Makefile.am b/regtests/Makefile.am
index c19c6fa..5b23528 100644
--- a/regtests/Makefile.am
+++ b/regtests/Makefile.am
@@ -15,7 +15,7 @@
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
AUTOMAKE_OPTIONS = 1.8 foreign
diff --git a/regtests/tests/Makefile.am b/regtests/tests/Makefile.am
index 290494d..f7b7b4c 100644
--- a/regtests/tests/Makefile.am
+++ b/regtests/tests/Makefile.am
@@ -15,7 +15,7 @@
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
AUTOMAKE_OPTIONS = 1.8 foreign
diff --git a/setup b/setup
index fa17752..d257b06 100755
--- a/setup
+++ b/setup
@@ -19,7 +19,7 @@
# $Author: amodigli $
# $Date: 2003/08/18 12:42:44 $
# $Revision: 1.1.1.1 $
-# $Name: sinfo-2_3_2 $
+# $Name: sinfo-2_3_3 $
# This script is the autoinstaller for the VLT instrument pipeline
diff --git a/sinfoni/sinfo_baryvel.c b/sinfoni/sinfo_baryvel.c
index b0ea20e..9f11924 100644
--- a/sinfoni/sinfo_baryvel.c
+++ b/sinfoni/sinfo_baryvel.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_baryvel.c,v $
* Revision 1.3 2012/03/02 08:42:20 amodigli
* fixed some typos on doxygen
diff --git a/sinfoni/sinfo_baryvel.h b/sinfoni/sinfo_baryvel.h
index b8d558e..aa02835 100644
--- a/sinfoni/sinfo_baryvel.h
+++ b/sinfoni/sinfo_baryvel.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/04/28 11:42:18 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_baryvel.h,v $
* Revision 1.2 2009/04/28 11:42:18 amodigli
* now return cpl_error_code
diff --git a/sinfoni/sinfo_bp_config.c b/sinfoni/sinfo_bp_config.c
index 08075ae..4a0fe6a 100644
--- a/sinfoni/sinfo_bp_config.c
+++ b/sinfoni/sinfo_bp_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_config.h b/sinfoni/sinfo_bp_config.h
index 0621f06..860b7ce 100644
--- a/sinfoni/sinfo_bp_config.h
+++ b/sinfoni/sinfo_bp_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_bp_dist_config.c b/sinfoni/sinfo_bp_dist_config.c
index a0641ba..0161c71 100644
--- a/sinfoni/sinfo_bp_dist_config.c
+++ b/sinfoni/sinfo_bp_dist_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2007/06/06 07:10:45 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_dist_config.h b/sinfoni/sinfo_bp_dist_config.h
index 92ff437..8607fb1 100644
--- a/sinfoni/sinfo_bp_dist_config.h
+++ b/sinfoni/sinfo_bp_dist_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_bp_lin_config.c b/sinfoni/sinfo_bp_lin_config.c
index 0164187..cad6599 100644
--- a/sinfoni/sinfo_bp_lin_config.c
+++ b/sinfoni/sinfo_bp_lin_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_lin_config.h b/sinfoni/sinfo_bp_lin_config.h
index b6b6715..8e4fdf6 100644
--- a/sinfoni/sinfo_bp_lin_config.h
+++ b/sinfoni/sinfo_bp_lin_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:27 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_bp_noise_config.c b/sinfoni/sinfo_bp_noise_config.c
index ce94d92..481ddc9 100644
--- a/sinfoni/sinfo_bp_noise_config.c
+++ b/sinfoni/sinfo_bp_noise_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2008/01/17 07:54:04 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_noise_config.h b/sinfoni/sinfo_bp_noise_config.h
index 45b7122..84095cf 100644
--- a/sinfoni/sinfo_bp_noise_config.h
+++ b/sinfoni/sinfo_bp_noise_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:27 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_bp_norm.c b/sinfoni/sinfo_bp_norm.c
index 38a53ff..e7ed2d7 100644
--- a/sinfoni/sinfo_bp_norm.c
+++ b/sinfoni/sinfo_bp_norm.c
@@ -332,6 +332,8 @@ sinfo_new_bp_search_normal (const char* plugin_id,
sinfo_free_table(&qclog_tbl);
sinfo_free_image(&maskImage);
sinfo_free_image(&compImage);
+ sinfo_free_image_array(&med,cfg->iterations);
+ /*
if (med != NULL) {
for ( i = 0 ; i < cfg->iterations ; i++ ) {
if(med[i] != NULL) {
@@ -342,6 +344,7 @@ sinfo_new_bp_search_normal (const char* plugin_id,
cpl_free(med) ;
med=NULL;
}
+ */
if (stats != NULL) {
cpl_free(stats) ;
stats=NULL;
@@ -358,7 +361,8 @@ sinfo_new_bp_search_normal (const char* plugin_id,
cleanup:
-
+ sinfo_free_image_array(&med,cfg->iterations);
+ /*
if (med != NULL) {
for ( i = 0 ; i < cfg->iterations ; i++ ) {
if(med[i] != NULL) {
@@ -369,6 +373,7 @@ sinfo_new_bp_search_normal (const char* plugin_id,
cpl_free(med) ;
med=NULL;
}
+ */
sinfo_free_image(&compImage) ;
sinfo_free_image(&maskImage) ;
sinfo_free_image(&threshIm) ;
@@ -378,6 +383,7 @@ sinfo_new_bp_search_normal (const char* plugin_id,
cpl_free(stats) ;
stats=NULL;
}
+
sinfo_free_image(&medIm);
sinfo_free_image(&medImage);
sinfo_free_image(&colImage);
diff --git a/sinfoni/sinfo_bp_norm_config.c b/sinfoni/sinfo_bp_norm_config.c
index d7f9548..88b84ac 100644
--- a/sinfoni/sinfo_bp_norm_config.c
+++ b/sinfoni/sinfo_bp_norm_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2007/06/06 07:10:45 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_norm_config.h b/sinfoni/sinfo_bp_norm_config.h
index b2c7f5d..a9b95d8 100644
--- a/sinfoni/sinfo_bp_norm_config.h
+++ b/sinfoni/sinfo_bp_norm_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_bp_sky_config.c b/sinfoni/sinfo_bp_sky_config.c
index 0b9c4d4..738f40d 100644
--- a/sinfoni/sinfo_bp_sky_config.c
+++ b/sinfoni/sinfo_bp_sky_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2007/06/06 07:10:45 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_bp_sky_config.h b/sinfoni/sinfo_bp_sky_config.h
index 889c516..cc53a1f 100644
--- a/sinfoni/sinfo_bp_sky_config.h
+++ b/sinfoni/sinfo_bp_sky_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_cube_construct.c b/sinfoni/sinfo_cube_construct.c
index 6ec70bb..296cfb4 100644
--- a/sinfoni/sinfo_cube_construct.c
+++ b/sinfoni/sinfo_cube_construct.c
@@ -1078,7 +1078,7 @@ sinfo_sort_slitlets(const int kslit)
sinfo_msg_error("wrong slitlet index: couldn't be a "
"spiffi image, there must be 32 slitlets!") ;
return -1 ;
- break ;
+
}
return slit_index;
diff --git a/sinfoni/sinfo_dark_config.c b/sinfoni/sinfo_dark_config.c
index 3bb02ad..500ac1e 100644
--- a/sinfoni/sinfo_dark_config.c
+++ b/sinfoni/sinfo_dark_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_dark_config.h b/sinfoni/sinfo_dark_config.h
index cb8dfb9..c30b92c 100644
--- a/sinfoni/sinfo_dark_config.h
+++ b/sinfoni/sinfo_dark_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_dfs.c b/sinfoni/sinfo_dfs.c
index c529a3e..b5ed345 100644
--- a/sinfoni/sinfo_dfs.c
+++ b/sinfoni/sinfo_dfs.c
@@ -1,4 +1,4 @@
-/* $Id: sinfo_dfs.c,v 1.41 2012/04/26 14:44:48 amodigli Exp $
+/* $Id: sinfo_dfs.c,v 1.43 2013/01/24 15:56:40 amodigli Exp $
*
* This file is part of the SINFONI Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -20,9 +20,9 @@
/*
* $Author: amodigli $
- * $Date: 2012/04/26 14:44:48 $
- * $Revision: 1.41 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2013/01/24 15:56:40 $
+ * $Revision: 1.43 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
@@ -42,7 +42,6 @@
Includes
----------------------------------------------------------------------------*/
#include "sinfo_dfs.h"
-#include <assert.h>
#include <cpl.h>
#include <math.h>
#include "sinfo_error.h"
@@ -424,7 +423,7 @@ get_candidate(const double *a, const int ia[],
}
}
- assert( imfit == Mfit );
+ cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
}
/* Create upper-right part of alpha */
@@ -436,11 +435,11 @@ get_candidate(const double *a, const int ia[],
jmfit += 1;
}
}
- assert( jmfit == Mfit );
+ cpl_ensure( jmfit == Mfit,CPL_ERROR_ILLEGAL_INPUT,-1 );
imfit += 1;
}
}
- assert( imfit == Mfit );
+ cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
da = cpl_matrix_solve(alpha, beta);
@@ -463,7 +462,7 @@ get_candidate(const double *a, const int ia[],
}
}
- assert( imfit == Mfit );
+ cpl_ensure( imfit == Mfit ,CPL_ERROR_ILLEGAL_INPUT,-1);
cpl_matrix_delete(da);
@@ -1054,12 +1053,12 @@ sinfo_fit_lm(const cpl_matrix *x,
imfit += 1;
}
- assert( imfit == Mfit );
+ cpl_ensure( imfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1);
jmfit += 1;
}
- assert( jmfit == Mfit );
+ cpl_ensure( jmfit == Mfit, CPL_ERROR_ILLEGAL_INPUT,-1 );
}
cpl_matrix_delete(cov);
@@ -2652,6 +2651,7 @@ int sinfo_frame_is_cdb(char * tag)
*/
if (!strcmp(tag, REF_LINE_ARC)) return 1 ;
+ if (!strcmp(tag, REF_LINE_OH)) return 1 ;
if (!strcmp(tag, PRO_BP_MAP)) return 1 ;
if (!strcmp(tag, PRO_BP_MAP_HP)) return 1 ;
if (!strcmp(tag, PRO_BP_MAP_DI)) return 1 ;
diff --git a/sinfoni/sinfo_dfs.h b/sinfoni/sinfo_dfs.h
index a9805d3..6355cc3 100644
--- a/sinfoni/sinfo_dfs.h
+++ b/sinfoni/sinfo_dfs.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2010/02/17 09:23:43 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_DFS_H
diff --git a/sinfoni/sinfo_distortion.c b/sinfoni/sinfo_distortion.c
index 9c39328..e0fbf0b 100644
--- a/sinfoni/sinfo_distortion.c
+++ b/sinfoni/sinfo_distortion.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/05 16:34:06 $
* $Revision: 1.37 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_distortion.h b/sinfoni/sinfo_distortion.h
index e169fe6..f95f559 100644
--- a/sinfoni/sinfo_distortion.h
+++ b/sinfoni/sinfo_distortion.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/06/06 07:10:45 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_DISTORTION_H
diff --git a/sinfoni/sinfo_distortion_config.c b/sinfoni/sinfo_distortion_config.c
index 6e294f4..14f4402 100644
--- a/sinfoni/sinfo_distortion_config.c
+++ b/sinfoni/sinfo_distortion_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
diff --git a/sinfoni/sinfo_distortion_config.h b/sinfoni/sinfo_distortion_config.h
index 4041927..f9c606f 100644
--- a/sinfoni/sinfo_distortion_config.h
+++ b/sinfoni/sinfo_distortion_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_dump.c b/sinfoni/sinfo_dump.c
index c064edc..8b9d534 100644
--- a/sinfoni/sinfo_dump.c
+++ b/sinfoni/sinfo_dump.c
@@ -19,10 +19,13 @@
/*
* $Author: amodigli $
- * $Date: 2012/03/02 08:42:20 $
- * $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/09/21 10:55:19 $
+ * $Revision: 1.9 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_dump.c,v $
+ * Revision 1.9 2012/09/21 10:55:19 amodigli
+ * removed warning from clang
+ *
* Revision 1.8 2012/03/02 08:42:20 amodigli
* fixed some typos on doxygen
*
@@ -317,10 +320,10 @@ sinfo_tostring_cpl_frame_type(cpl_frame_type ft)
{
switch(ft)
{
- case CPL_FRAME_TYPE_NONE: return "NONE"; break;
- case CPL_FRAME_TYPE_IMAGE: return "IMAGE"; break;
- case CPL_FRAME_TYPE_MATRIX: return "MATRIX"; break;
- case CPL_FRAME_TYPE_TABLE: return "TABLE"; break;
+ case CPL_FRAME_TYPE_NONE: return "NONE";
+ case CPL_FRAME_TYPE_IMAGE: return "IMAGE";
+ case CPL_FRAME_TYPE_MATRIX: return "MATRIX";
+ case CPL_FRAME_TYPE_TABLE: return "TABLE";
default: return "unrecognized frame type";
}
}
@@ -337,10 +340,10 @@ sinfo_tostring_cpl_frame_group(cpl_frame_group fg)
{
switch(fg)
{
- case CPL_FRAME_GROUP_NONE: return "NONE"; break;
- case CPL_FRAME_GROUP_RAW: return CPL_FRAME_GROUP_RAW_ID; break;
- case CPL_FRAME_GROUP_CALIB: return CPL_FRAME_GROUP_CALIB_ID; break;
- case CPL_FRAME_GROUP_PRODUCT: return CPL_FRAME_GROUP_PRODUCT_ID;break;
+ case CPL_FRAME_GROUP_NONE: return "NONE";
+ case CPL_FRAME_GROUP_RAW: return CPL_FRAME_GROUP_RAW_ID;
+ case CPL_FRAME_GROUP_CALIB: return CPL_FRAME_GROUP_CALIB_ID;
+ case CPL_FRAME_GROUP_PRODUCT: return CPL_FRAME_GROUP_PRODUCT_ID;
default:
return "unrecognized frame group";
}
@@ -359,10 +362,10 @@ sinfo_tostring_cpl_frame_level(cpl_frame_level fl)
switch(fl)
{
- case CPL_FRAME_LEVEL_NONE: return "NONE"; break;
- case CPL_FRAME_LEVEL_TEMPORARY: return "TEMPORARY"; break;
- case CPL_FRAME_LEVEL_INTERMEDIATE:return "INTERMEDIATE";break;
- case CPL_FRAME_LEVEL_FINAL: return "FINAL"; break;
+ case CPL_FRAME_LEVEL_NONE: return "NONE";
+ case CPL_FRAME_LEVEL_TEMPORARY: return "TEMPORARY";
+ case CPL_FRAME_LEVEL_INTERMEDIATE:return "INTERMEDIATE";
+ case CPL_FRAME_LEVEL_FINAL: return "FINAL";
default: return "unrecognized frame level";
}
}
@@ -385,36 +388,36 @@ sinfo_tostring_cpl_type(cpl_type t)
if (!(t & CPL_TYPE_FLAG_ARRAY))
switch(t & (~CPL_TYPE_FLAG_ARRAY))
{
- case CPL_TYPE_CHAR: return "char"; break;
- case CPL_TYPE_UCHAR: return "uchar"; break;
- case CPL_TYPE_BOOL: return "boolean"; break;
- case CPL_TYPE_INT: return "int"; break;
- case CPL_TYPE_UINT: return "uint"; break;
- case CPL_TYPE_LONG: return "long"; break;
- case CPL_TYPE_ULONG: return "ulong"; break;
- case CPL_TYPE_FLOAT: return "float"; break;
- case CPL_TYPE_DOUBLE: return "double"; break;
- case CPL_TYPE_POINTER: return "pointer"; break;
-/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex"; break; */
- case CPL_TYPE_INVALID: return "invalid"; break;
+ case CPL_TYPE_CHAR: return "char";
+ case CPL_TYPE_UCHAR: return "uchar";
+ case CPL_TYPE_BOOL: return "boolean";
+ case CPL_TYPE_INT: return "int";
+ case CPL_TYPE_UINT: return "uint";
+ case CPL_TYPE_LONG: return "long";
+ case CPL_TYPE_ULONG: return "ulong";
+ case CPL_TYPE_FLOAT: return "float";
+ case CPL_TYPE_DOUBLE: return "double";
+ case CPL_TYPE_POINTER: return "pointer";
+/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex"; */
+ case CPL_TYPE_INVALID: return "invalid";
default:
return "unrecognized type";
}
else
switch(t & (~CPL_TYPE_FLAG_ARRAY))
{
- case CPL_TYPE_CHAR: return "string (char array)"; break;
- case CPL_TYPE_UCHAR: return "uchar array"; break;
- case CPL_TYPE_BOOL: return "boolean array"; break;
- case CPL_TYPE_INT: return "int array"; break;
- case CPL_TYPE_UINT: return "uint array"; break;
- case CPL_TYPE_LONG: return "long array"; break;
- case CPL_TYPE_ULONG: return "ulong array"; break;
- case CPL_TYPE_FLOAT: return "float array"; break;
- case CPL_TYPE_DOUBLE: return "double array"; break;
- case CPL_TYPE_POINTER: return "pointer array"; break;
-/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex array"; break; */
- case CPL_TYPE_INVALID: return "invalid (array)"; break;
+ case CPL_TYPE_CHAR: return "string (char array)";
+ case CPL_TYPE_UCHAR: return "uchar array";
+ case CPL_TYPE_BOOL: return "boolean array";
+ case CPL_TYPE_INT: return "int array";
+ case CPL_TYPE_UINT: return "uint array";
+ case CPL_TYPE_LONG: return "long array";
+ case CPL_TYPE_ULONG: return "ulong array";
+ case CPL_TYPE_FLOAT: return "float array";
+ case CPL_TYPE_DOUBLE: return "double array";
+ case CPL_TYPE_POINTER: return "pointer array";
+/* not in CPL3.0: case CPL_TYPE_COMPLEX: return "complex array"; */
+ case CPL_TYPE_INVALID: return "invalid (array)";
default:
return "unrecognized type";
}
diff --git a/sinfoni/sinfo_dump.h b/sinfoni/sinfo_dump.h
index 5e39994..75fafcd 100644
--- a/sinfoni/sinfo_dump.h
+++ b/sinfoni/sinfo_dump.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2011/11/23 17:29:09 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_dump.h,v $
* Revision 1.6 2011/11/23 17:29:09 amodigli
* fix warning with cpl6
diff --git a/sinfoni/sinfo_error.h b/sinfoni/sinfo_error.h
index 0f03831..156412a 100644
--- a/sinfoni/sinfo_error.h
+++ b/sinfoni/sinfo_error.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2007/10/26 09:42:36 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_error.h,v $
* Revision 1.13 2007/10/26 09:42:36 amodigli
* removed check on CPL_VERSION_CODE (now works only for CPL4)
diff --git a/sinfoni/sinfo_focus.c b/sinfoni/sinfo_focus.c
index ca1f122..1bd0137 100644
--- a/sinfoni/sinfo_focus.c
+++ b/sinfoni/sinfo_focus.c
@@ -1053,14 +1053,14 @@ sinfo_new_fit_2d_gaussian ( cpl_image * image,
}
if ( ( llx + 2*halfbox_x) < ilx-1 ) {
- halfbox_x=halfbox_x;
+ //halfbox_x=halfbox_x;
} else {
halfbox_x=(int) (ilx-2-llx)/2;
check++;
}
if ( ( lly + 2*halfbox_y) < ily-1 ) {
- halfbox_y= halfbox_y;
+ //halfbox_y= halfbox_y;
} else {
halfbox_y=(int) (ily-2-lly)/2;
check++;
diff --git a/sinfoni/sinfo_focus_determination_config.c b/sinfoni/sinfo_focus_determination_config.c
index 80107b3..25d7b83 100644
--- a/sinfoni/sinfo_focus_determination_config.c
+++ b/sinfoni/sinfo_focus_determination_config.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
diff --git a/sinfoni/sinfo_focus_determination_config.h b/sinfoni/sinfo_focus_determination_config.h
index 99a87d7..e09cd55 100644
--- a/sinfoni/sinfo_focus_determination_config.h
+++ b/sinfoni/sinfo_focus_determination_config.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_functions.h b/sinfoni/sinfo_functions.h
index eeb71b7..fb7ce43 100644
--- a/sinfoni/sinfo_functions.h
+++ b/sinfoni/sinfo_functions.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2009/03/04 10:17:38 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_FUNCTIONS_H
#define SINFO_FUNCTIONS_H
diff --git a/sinfoni/sinfo_general_config.c b/sinfoni/sinfo_general_config.c
index 08a9717..95f3ca3 100644
--- a/sinfoni/sinfo_general_config.c
+++ b/sinfoni/sinfo_general_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_general_config.h b/sinfoni/sinfo_general_config.h
index 0796500..6d652b2 100644
--- a/sinfoni/sinfo_general_config.h
+++ b/sinfoni/sinfo_general_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_globals.h b/sinfoni/sinfo_globals.h
index 56c1e8f..0198057 100644
--- a/sinfoni/sinfo_globals.h
+++ b/sinfoni/sinfo_globals.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/10/09 15:58:00 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_GLOBALS_H
diff --git a/sinfoni/sinfo_hidden.h b/sinfoni/sinfo_hidden.h
index 7fcd870..19a7f01 100644
--- a/sinfoni/sinfo_hidden.h
+++ b/sinfoni/sinfo_hidden.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2010/02/12 17:56:35 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_image_ops.c b/sinfoni/sinfo_image_ops.c
index c05c210..b2d9081 100644
--- a/sinfoni/sinfo_image_ops.c
+++ b/sinfoni/sinfo_image_ops.c
@@ -1497,7 +1497,7 @@ cpl_image * sinfo_new_interpol_image ( cpl_image * im,
mly=cpl_image_get_size_y(mask);
pmdata=cpl_image_get_data_float(mask);
- if ( mlx != ilx || mly != mly )
+ if ( mlx != ilx || mly != ily )
{
sinfo_msg_error("images not compatible !") ;
return NULL ;
diff --git a/sinfoni/sinfo_key_names.h b/sinfoni/sinfo_key_names.h
index acb1487..fdd0dcf 100644
--- a/sinfoni/sinfo_key_names.h
+++ b/sinfoni/sinfo_key_names.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_KEY_NAMES_H
diff --git a/sinfoni/sinfo_lamp_flats_config.c b/sinfoni/sinfo_lamp_flats_config.c
index d4f0ef7..c82b0ed 100644
--- a/sinfoni/sinfo_lamp_flats_config.c
+++ b/sinfoni/sinfo_lamp_flats_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_lamp_flats_config.h b/sinfoni/sinfo_lamp_flats_config.h
index ae31eaf..5da137d 100644
--- a/sinfoni/sinfo_lamp_flats_config.h
+++ b/sinfoni/sinfo_lamp_flats_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_lamp_spec_config.c b/sinfoni/sinfo_lamp_spec_config.c
index 8f45763..879ee6f 100644
--- a/sinfoni/sinfo_lamp_spec_config.c
+++ b/sinfoni/sinfo_lamp_spec_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/02 08:42:20 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_lamp_spec_config.h b/sinfoni/sinfo_lamp_spec_config.h
index 9248fb4..aff1e2c 100644
--- a/sinfoni/sinfo_lamp_spec_config.h
+++ b/sinfoni/sinfo_lamp_spec_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_msg.c b/sinfoni/sinfo_msg.c
index 9811125..ef5de1a 100644
--- a/sinfoni/sinfo_msg.c
+++ b/sinfoni/sinfo_msg.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2008/02/12 14:57:39 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_msg.h b/sinfoni/sinfo_msg.h
index 85da8c0..5728427 100644
--- a/sinfoni/sinfo_msg.h
+++ b/sinfoni/sinfo_msg.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/11/21 11:56:10 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_MSG_H
#define SINFO_MSG_H
diff --git a/sinfoni/sinfo_new_cube_ops.c b/sinfoni/sinfo_new_cube_ops.c
index 161d1b2..51e4f01 100644
--- a/sinfoni/sinfo_new_cube_ops.c
+++ b/sinfoni/sinfo_new_cube_ops.c
@@ -1,4 +1,4 @@
-/*$Id: sinfo_new_cube_ops.c,v 1.44 2012/03/03 09:50:51 amodigli Exp $
+/*$Id: sinfo_new_cube_ops.c,v 1.45 2012/09/21 10:55:38 amodigli Exp $
* This file is part of the ESO SINFONI Pipeline
* Copyright (C) 2004,2005 European Southern Observatory
*
@@ -27,9 +27,9 @@
*/
/*
* $Author: amodigli $
- * $Date: 2012/03/03 09:50:51 $
- * $Revision: 1.44 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/09/21 10:55:38 $
+ * $Revision: 1.45 $
+ * $Name: sinfo-2_3_3 $
*/
/************************************************************************
@@ -413,18 +413,18 @@ sinfo_new_cube_ops(
{
case '+':
return sinfo_new_cube_add(cube1, cube2) ;
- break ;
+
case '-':
return sinfo_new_cube_sub(cube1, cube2) ;
- break ;
+
case '*':
return sinfo_new_cube_mul(cube1, cube2) ;
- break ;
+
case '/':
return sinfo_new_cube_div(cube1, cube2) ;
- break ;
+
default:
sinfo_msg_error("illegal requested operation: aborting cube arithmetic") ;
@@ -3861,7 +3861,7 @@ sinfo_new_scale_cube(cpl_imagelist *cu,
char * kernel_type)
{
cpl_imagelist * cube ;
- int i, j, k, l ;
+ int i=0, j=0, k=0, l=0 ;
int lx_out, ly_out ;
double cur ;
double * invert_transform ;
@@ -3923,7 +3923,7 @@ sinfo_new_scale_cube(cpl_imagelist *cu,
ly_out = (int) ily*yscale ;
cube=cpl_imagelist_new();
- for ( l = 0 ; l < inp ; i++ ) {
+ for ( l = 0 ; l < inp ; l++ ) {
in_img = cpl_image_new(ilx,ily,CPL_TYPE_FLOAT);
cpl_imagelist_set(cube,in_img,l);
}
diff --git a/sinfoni/sinfo_new_psf.c b/sinfoni/sinfo_new_psf.c
index 3e9252e..b366c8c 100644
--- a/sinfoni/sinfo_new_psf.c
+++ b/sinfoni/sinfo_new_psf.c
@@ -39,7 +39,6 @@
#define _GNU_SOURCE
#include <math.h>
-#include <assert.h>
#include <sinfo_cpl_size.h>
#include <irplib_utils.h>
@@ -1987,7 +1986,7 @@ sinfo_strehl_compute_one(const cpl_image * im,
- assert( *psf_peak > 0.0); /* The ideal PSF has a positive maximum */
+ cpl_ensure( *psf_peak > 0.0, CPL_ERROR_ILLEGAL_OUTPUT,CPL_ERROR_ILLEGAL_OUTPUT); /* The ideal PSF has a positive maximum */
*psf_flux = 1.0; /* The psf flux, cpl_image_get_flux(psf), is always 1 */
diff --git a/sinfoni/sinfo_north_south_test_config.c b/sinfoni/sinfo_north_south_test_config.c
index fc6c234..93f2eab 100644
--- a/sinfoni/sinfo_north_south_test_config.c
+++ b/sinfoni/sinfo_north_south_test_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 09:50:08 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_north_south_test_config.h b/sinfoni/sinfo_north_south_test_config.h
index bc29e17..0409574 100644
--- a/sinfoni/sinfo_north_south_test_config.h
+++ b/sinfoni/sinfo_north_south_test_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_objnod_config.c b/sinfoni/sinfo_objnod_config.c
index 655ff23..83e18f4 100644
--- a/sinfoni/sinfo_objnod_config.c
+++ b/sinfoni/sinfo_objnod_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 09:50:08 $
* $Revision: 1.11 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_objnod_config.h b/sinfoni/sinfo_objnod_config.h
index bde66bb..5c15ff9 100644
--- a/sinfoni/sinfo_objnod_config.h
+++ b/sinfoni/sinfo_objnod_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_objspider_config.c b/sinfoni/sinfo_objspider_config.c
index 7beff07..15d936a 100644
--- a/sinfoni/sinfo_objspider_config.c
+++ b/sinfoni/sinfo_objspider_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 09:50:08 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_objspider_config.h b/sinfoni/sinfo_objspider_config.h
index 4171be7..0de8b85 100644
--- a/sinfoni/sinfo_objspider_config.h
+++ b/sinfoni/sinfo_objspider_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:32 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_pfits.c b/sinfoni/sinfo_pfits.c
index 4b8317b..e376c34 100644
--- a/sinfoni/sinfo_pfits.c
+++ b/sinfoni/sinfo_pfits.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/05/04 08:11:07 $
* $Revision: 1.14 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_pfits.h b/sinfoni/sinfo_pfits.h
index 2ad9acc..ffc18ea 100644
--- a/sinfoni/sinfo_pfits.h
+++ b/sinfoni/sinfo_pfits.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/22 15:26:10 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_PFITS_H
diff --git a/sinfoni/sinfo_prepare_stacked_frames_config.c b/sinfoni/sinfo_prepare_stacked_frames_config.c
index c6d45b4..e43f996 100644
--- a/sinfoni/sinfo_prepare_stacked_frames_config.c
+++ b/sinfoni/sinfo_prepare_stacked_frames_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2008/02/27 15:10:05 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/**************************************************************************
diff --git a/sinfoni/sinfo_prepare_stacked_frames_config.h b/sinfoni/sinfo_prepare_stacked_frames_config.h
index becddd5..a4c5204 100644
--- a/sinfoni/sinfo_prepare_stacked_frames_config.h
+++ b/sinfoni/sinfo_prepare_stacked_frames_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_pro_types.h b/sinfoni/sinfo_pro_types.h
index 4d3203d..a42eff0 100644
--- a/sinfoni/sinfo_pro_types.h
+++ b/sinfoni/sinfo_pro_types.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2010/02/12 17:57:38 $
* $Revision: 1.10 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_PRO_TYPES_H
diff --git a/sinfoni/sinfo_product_config.c b/sinfoni/sinfo_product_config.c
index 66bcd9e..aa511d5 100644
--- a/sinfoni/sinfo_product_config.c
+++ b/sinfoni/sinfo_product_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 09:50:08 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_product_config.h b/sinfoni/sinfo_product_config.h
index 2e1eb4f..fe5ea74 100644
--- a/sinfoni/sinfo_product_config.h
+++ b/sinfoni/sinfo_product_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_psf_config.c b/sinfoni/sinfo_psf_config.c
index bc9b139..2dc5659 100644
--- a/sinfoni/sinfo_psf_config.c
+++ b/sinfoni/sinfo_psf_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 09:50:08 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_psf_config.h b/sinfoni/sinfo_psf_config.h
index 10a0b4d..f8647c5 100644
--- a/sinfoni/sinfo_psf_config.h
+++ b/sinfoni/sinfo_psf_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_qr.c b/sinfoni/sinfo_qr.c
index cd41c2e..4d2946a 100644
--- a/sinfoni/sinfo_qr.c
+++ b/sinfoni/sinfo_qr.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/**@{*/
/**
diff --git a/sinfoni/sinfo_raw_types.h b/sinfoni/sinfo_raw_types.h
index 6a4a5b9..a43f942 100644
--- a/sinfoni/sinfo_raw_types.h
+++ b/sinfoni/sinfo_raw_types.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/07/04 13:06:02 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_RAW_TYPES_H
diff --git a/sinfoni/sinfo_rec_utils.c b/sinfoni/sinfo_rec_utils.c
index 3e7085e..566ab8d 100644
--- a/sinfoni/sinfo_rec_utils.c
+++ b/sinfoni/sinfo_rec_utils.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.14 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_rec_utils.h b/sinfoni/sinfo_rec_utils.h
index 807a08b..9babcb9 100644
--- a/sinfoni/sinfo_rec_utils.h
+++ b/sinfoni/sinfo_rec_utils.h
@@ -24,7 +24,7 @@
* $Author: amodigli $
* $Date: 2007/06/06 07:10:45 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_ref_types.h b/sinfoni/sinfo_ref_types.h
index 5596cb4..deb1df4 100644
--- a/sinfoni/sinfo_ref_types.h
+++ b/sinfoni/sinfo_ref_types.h
@@ -1,4 +1,4 @@
-/* $Id: sinfo_ref_types.h,v 1.4 2010/02/12 17:56:53 amodigli Exp $
+/* $Id: sinfo_ref_types.h,v 1.5 2012/08/10 07:55:23 amodigli Exp $
*
* This file is part of the SINFONI Pipeline
* Copyright (C) 2002,2003 European Southern Observatory
@@ -20,9 +20,9 @@
/*
* $Author: amodigli $
- * $Date: 2010/02/12 17:56:53 $
- * $Revision: 1.4 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/08/10 07:55:23 $
+ * $Revision: 1.5 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_REF_TYPES_H
@@ -32,6 +32,7 @@ CPL_BEGIN_DECLS
#define RAW_REF "REF"
#define REF_LINE_ARC "REF_LINE_ARC"
+#define REF_LINE_OH "REF_LINE_OH"
#define REF_BP_MAP "REF_BP_MAP"
#define REF_SLIT_POS "REF_SLIT_POS"
#define DRS_SETUP_WAVE "DRS_SETUP_WAVE"
diff --git a/sinfoni/sinfo_skycor.c b/sinfoni/sinfo_skycor.c
index 973204b..5a23cc3 100644
--- a/sinfoni/sinfo_skycor.c
+++ b/sinfoni/sinfo_skycor.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/05/04 08:11:35 $
* $Revision: 1.50 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_skycor.h b/sinfoni/sinfo_skycor.h
index 8e6a697..a84448a 100644
--- a/sinfoni/sinfo_skycor.h
+++ b/sinfoni/sinfo_skycor.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/03/05 07:21:54 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_skycor_config.c b/sinfoni/sinfo_skycor_config.c
index 9081e0a..37c07f3 100644
--- a/sinfoni/sinfo_skycor_config.c
+++ b/sinfoni/sinfo_skycor_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.17 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
diff --git a/sinfoni/sinfo_skycor_config.h b/sinfoni/sinfo_skycor_config.h
index ba20f10..400dc01 100644
--- a/sinfoni/sinfo_skycor_config.h
+++ b/sinfoni/sinfo_skycor_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/11/27 16:55:26 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_stacked_hidden_config.c b/sinfoni/sinfo_stacked_hidden_config.c
index b40214e..c2a4e4d 100644
--- a/sinfoni/sinfo_stacked_hidden_config.c
+++ b/sinfoni/sinfo_stacked_hidden_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/**************************************************************************
diff --git a/sinfoni/sinfo_stacked_hidden_config.h b/sinfoni/sinfo_stacked_hidden_config.h
index 1de4b29..8ca5e96 100644
--- a/sinfoni/sinfo_stacked_hidden_config.h
+++ b/sinfoni/sinfo_stacked_hidden_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_standard_star_config.c b/sinfoni/sinfo_standard_star_config.c
index f5c6369..3dcd9e1 100644
--- a/sinfoni/sinfo_standard_star_config.c
+++ b/sinfoni/sinfo_standard_star_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_standard_star_config.h b/sinfoni/sinfo_standard_star_config.h
index d1647c4..fa92bb6 100644
--- a/sinfoni/sinfo_standard_star_config.h
+++ b/sinfoni/sinfo_standard_star_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_star_index.c b/sinfoni/sinfo_star_index.c
index ef65718..fa8ca6b 100644
--- a/sinfoni/sinfo_star_index.c
+++ b/sinfoni/sinfo_star_index.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:18:26 $
* $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
diff --git a/sinfoni/sinfo_time.c b/sinfoni/sinfo_time.c
index 101c74c..9bc0e58 100644
--- a/sinfoni/sinfo_time.c
+++ b/sinfoni/sinfo_time.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
diff --git a/sinfoni/sinfo_time.h b/sinfoni/sinfo_time.h
index 27a5898..720b042 100644
--- a/sinfoni/sinfo_time.h
+++ b/sinfoni/sinfo_time.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/11/11 14:13:03 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_TIME_H
diff --git a/sinfoni/sinfo_tpl_dfs.c b/sinfoni/sinfo_tpl_dfs.c
index 9f2cdda..1b81b74 100644
--- a/sinfoni/sinfo_tpl_dfs.c
+++ b/sinfoni/sinfo_tpl_dfs.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_tpl_dfs.h b/sinfoni/sinfo_tpl_dfs.h
index 225371f..a384140 100644
--- a/sinfoni/sinfo_tpl_dfs.h
+++ b/sinfoni/sinfo_tpl_dfs.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2008/07/09 09:53:23 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_TPL_DFS_H
diff --git a/sinfoni/sinfo_tpl_utils.c b/sinfoni/sinfo_tpl_utils.c
index cdef69c..dc861ea 100644
--- a/sinfoni/sinfo_tpl_utils.c
+++ b/sinfoni/sinfo_tpl_utils.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.3 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_tpl_utils.h b/sinfoni/sinfo_tpl_utils.h
index ef89752..1f3b733 100644
--- a/sinfoni/sinfo_tpl_utils.h
+++ b/sinfoni/sinfo_tpl_utils.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2007/08/20 10:03:49 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_TPL_UTILS_H
diff --git a/sinfoni/sinfo_utilities.h b/sinfoni/sinfo_utilities.h
index 171d6cd..d0a7eba 100644
--- a/sinfoni/sinfo_utilities.h
+++ b/sinfoni/sinfo_utilities.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2011/12/09 07:47:42 $
* $Revision: 1.13 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_UTILITIES_H
#define SINFO_UTILITIES_H
diff --git a/sinfoni/sinfo_utils.c b/sinfoni/sinfo_utils.c
index 68053ae..5d2571e 100644
--- a/sinfoni/sinfo_utils.c
+++ b/sinfoni/sinfo_utils.c
@@ -20,7 +20,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.7 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_utils.c,v $
* Revision 1.7 2012/03/03 10:17:31 amodigli
* fixed some doxygen warnings
diff --git a/sinfoni/sinfo_utils.h b/sinfoni/sinfo_utils.h
index ce283ba..29f472d 100644
--- a/sinfoni/sinfo_utils.h
+++ b/sinfoni/sinfo_utils.h
@@ -21,7 +21,7 @@
* $Author: kmirny $
* $Date: 2010/09/30 14:00:03 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*
*/
#ifndef SINFO_UTILS_H
diff --git a/sinfoni/sinfo_utl_cube2ima.c b/sinfoni/sinfo_utl_cube2ima.c
index 9616fed..ca92c70 100644
--- a/sinfoni/sinfo_utl_cube2ima.c
+++ b/sinfoni/sinfo_utl_cube2ima.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_utl_cube2ima.h b/sinfoni/sinfo_utl_cube2ima.h
index b85d706..89933d6 100644
--- a/sinfoni/sinfo_utl_cube2ima.h
+++ b/sinfoni/sinfo_utl_cube2ima.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_utl_cube2spectrum.c b/sinfoni/sinfo_utl_cube2spectrum.c
index 59a2c36..9b1c498 100644
--- a/sinfoni/sinfo_utl_cube2spectrum.c
+++ b/sinfoni/sinfo_utl_cube2spectrum.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.11 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_utl_cube2spectrum.h b/sinfoni/sinfo_utl_cube2spectrum.h
index 966ac6f..ec2809f 100644
--- a/sinfoni/sinfo_utl_cube2spectrum.h
+++ b/sinfoni/sinfo_utl_cube2spectrum.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_utl_cube_arith.c b/sinfoni/sinfo_utl_cube_arith.c
index efee5b2..45efd4f 100644
--- a/sinfoni/sinfo_utl_cube_arith.c
+++ b/sinfoni/sinfo_utl_cube_arith.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.14 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
diff --git a/sinfoni/sinfo_utl_cube_arith.h b/sinfoni/sinfo_utl_cube_arith.h
index a241655..117e8bd 100644
--- a/sinfoni/sinfo_utl_cube_arith.h
+++ b/sinfoni/sinfo_utl_cube_arith.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_utl_cube_combine.c b/sinfoni/sinfo_utl_cube_combine.c
index 482c1d6..d347599 100644
--- a/sinfoni/sinfo_utl_cube_combine.c
+++ b/sinfoni/sinfo_utl_cube_combine.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.20 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_utl_cube_combine.h b/sinfoni/sinfo_utl_cube_combine.h
index 1dc0f5a..e852eaa 100644
--- a/sinfoni/sinfo_utl_cube_combine.h
+++ b/sinfoni/sinfo_utl_cube_combine.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.c b/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.c
index 0bb5a6a..4ba5d7a 100644
--- a/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.c
+++ b/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
diff --git a/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.h b/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.h
index 74bf296..b1303e8 100644
--- a/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.h
+++ b/sinfoni/sinfo_utl_spectrum_divide_by_blackbody.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_utl_spectrum_wavelength_shift.c b/sinfoni/sinfo_utl_spectrum_wavelength_shift.c
index 6b4fb64..3729bb5 100644
--- a/sinfoni/sinfo_utl_spectrum_wavelength_shift.c
+++ b/sinfoni/sinfo_utl_spectrum_wavelength_shift.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:17:31 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifdef HAVE_CONFIG_H
diff --git a/sinfoni/sinfo_utl_spectrum_wavelength_shift.h b/sinfoni/sinfo_utl_spectrum_wavelength_shift.h
index 70019ef..0207209 100644
--- a/sinfoni/sinfo_utl_spectrum_wavelength_shift.h
+++ b/sinfoni/sinfo_utl_spectrum_wavelength_shift.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/*-----------------------------------------------------------------------------
Includes
diff --git a/sinfoni/sinfo_wavecal_config.c b/sinfoni/sinfo_wavecal_config.c
index 8ffc662..1cc2d35 100644
--- a/sinfoni/sinfo_wavecal_config.c
+++ b/sinfoni/sinfo_wavecal_config.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:35:14 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_wavecal_config.h b/sinfoni/sinfo_wavecal_config.h
index 0d7cf33..f3cee1a 100644
--- a/sinfoni/sinfo_wavecal_config.h
+++ b/sinfoni/sinfo_wavecal_config.h
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2006/10/20 08:06:33 $
* $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
/****************************************************************
diff --git a/sinfoni/sinfo_wavecal_ini_by_cpl.c b/sinfoni/sinfo_wavecal_ini_by_cpl.c
index 418ab4a..4ec6138 100644
--- a/sinfoni/sinfo_wavecal_ini_by_cpl.c
+++ b/sinfoni/sinfo_wavecal_ini_by_cpl.c
@@ -341,7 +341,12 @@ parse_section_frames ( wave_config * cfg,cpl_parameterlist* cpl_cfg, cpl_framese
}
- if ( NULL != cpl_frameset_find ( sof,REF_LINE_ARC ) )
+ if ( NULL != cpl_frameset_find ( sof,REF_LINE_OH ) )
+ {
+ frame = cpl_frameset_find ( sof,REF_LINE_OH );
+ strcpy ( cfg -> lineList,cpl_frame_get_filename ( frame ) );
+ }
+ else if ( NULL != cpl_frameset_find ( sof,REF_LINE_ARC ) )
{
frame = cpl_frameset_find ( sof,REF_LINE_ARC );
strcpy ( cfg -> lineList,cpl_frame_get_filename ( frame ) );
diff --git a/sinfoni/sinfo_wcal_functions.c b/sinfoni/sinfo_wcal_functions.c
index eec099a..2cb5179 100644
--- a/sinfoni/sinfo_wcal_functions.c
+++ b/sinfoni/sinfo_wcal_functions.c
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2012/03/03 10:35:14 $
* $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
diff --git a/sinfoni/sinfo_wcal_functions.h b/sinfoni/sinfo_wcal_functions.h
index 13464b0..29a5c76 100644
--- a/sinfoni/sinfo_wcal_functions.h
+++ b/sinfoni/sinfo_wcal_functions.h
@@ -22,7 +22,7 @@
* $Author: amodigli $
* $Date: 2006/10/22 14:12:28 $
* $Revision: 1.2 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
*/
#ifndef SINFO_WCAL_FUNCTIONS_H
#define SINFO_WCAL_FUNCTIONS_H
diff --git a/sinfoni/tests/sinfo_cube_coadd_test.c b/sinfoni/tests/sinfo_cube_coadd_test.c
index 28467fc..2726f2a 100644
--- a/sinfoni/tests/sinfo_cube_coadd_test.c
+++ b/sinfoni/tests/sinfo_cube_coadd_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 06:06:11 $
* $Revision: 1.9 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_cube_coadd_test.c,v $
* Revision 1.9 2009/06/05 06:06:11 amodigli
* updated init/end to cpl5
diff --git a/sinfoni/tests/sinfo_cube_ops_test.c b/sinfoni/tests/sinfo_cube_ops_test.c
index dc9817c..8ab1567 100644
--- a/sinfoni/tests/sinfo_cube_ops_test.c
+++ b/sinfoni/tests/sinfo_cube_ops_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 06:06:11 $
* $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_cube_ops_test.c,v $
* Revision 1.6 2009/06/05 06:06:11 amodigli
* updated init/end to cpl5
diff --git a/sinfoni/tests/sinfo_efficiency_test.c b/sinfoni/tests/sinfo_efficiency_test.c
index 6450e9b..408fb57 100644
--- a/sinfoni/tests/sinfo_efficiency_test.c
+++ b/sinfoni/tests/sinfo_efficiency_test.c
@@ -18,9 +18,12 @@
*/
/*
* $Author: amodigli $
- * $Date: 2010/02/08 07:20:41 $
- * $Revision: 1.8 $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.9 $
* $Log: sinfo_efficiency_test.c,v $
+ * Revision 1.9 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
* Revision 1.8 2010/02/08 07:20:41 amodigli
* several changes to reflect efficiency functions API changes
*
@@ -86,7 +89,7 @@ struct _Interpol_test_data_odd
typedef struct _Interpol_test_data_odd Interpol_test_data_odd;
-const char* SINFO_EFF_BUG_REPORT = "kmirny at eso.org";
+const char* SINFO_EFF_BUG_REPORT = "amodigli at eso.org";
static const char COL_NAME_WAVELENGTH[] = "WAVELENGTH";
@@ -96,7 +99,7 @@ static const char COL_NAME_LA_SILLA[] = "LA_SILLA";
static const char COL_NAME_EFF[] = "EFF";
static const double C_GAIN = 2.42;
-void interpolation_test_even(void)
+static void interpolation_test_even(void)
{
Interpol_test_data_even test_data[] = {
{
@@ -144,7 +147,7 @@ void interpolation_test_even(void)
return;
}
-void interpolation_test_odd(void)
+static void interpolation_test_odd(void)
{
Interpol_test_data_odd test_data[] = {
{
@@ -192,7 +195,7 @@ void interpolation_test_odd(void)
return;
}
-void fill_table(cpl_table* ptable, int nrows, const double* data, const char* col_name )
+static void fill_table(cpl_table* ptable, int nrows, const double* data, const char* col_name )
{
cpl_table_new_column(ptable, col_name, CPL_TYPE_DOUBLE);
int i = 0;
@@ -200,11 +203,13 @@ void fill_table(cpl_table* ptable, int nrows, const double* data, const char* co
{
cpl_table_set(ptable,col_name, i,data[i]);
};
+ return;
}
+
const int NROWS_SPECTRUM = 10;
const int NROWS_ATMEXT = 10;
const int NROWS_REF = 10;
-cpl_table* prepare_spectrum(void)
+static cpl_table* prepare_spectrum(void)
{
const double wavelength_buf[] = {0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4}; // should be ordered
const double flux_buf[] = {2e-13 , 2.1e-13, 2.2e-13, 2.3e-13, 2.4e-13, 2.5e-13, 2.6e-13, 2.7e-13, 2.8e-13, 2.9e-13};
@@ -217,7 +222,8 @@ cpl_table* prepare_spectrum(void)
fill_table(retval,NROWS_SPECTRUM,flux_buf, COL_NAME_FLUX);
return retval;
}
-cpl_table* prepare_atmext(void)
+
+static cpl_table* prepare_atmext(void)
{
const double wavelength_buf[] = {0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4}; // should be ordered
const double flux_buf[] = {1,1,1,1,1,1,1,1,1,1};
@@ -230,7 +236,8 @@ cpl_table* prepare_atmext(void)
fill_table(retval,NROWS_ATMEXT,flux_buf, COL_NAME_LA_SILLA);
return retval;
}
-cpl_table* prepare_ref(double exp_time, double tel_area)
+
+static cpl_table* prepare_ref(double exp_time, double tel_area)
{
const double wavelength_buf[] = {0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4}; // should be ordered
double flux_buf[] = {2e-13, 2.1e-13, 2.2e-13, 2.3e-13, 2.4e-13, 2.5e-13, 2.6e-13, 2.7e-13, 2.8e-13, 2.9e-13};
@@ -248,7 +255,8 @@ cpl_table* prepare_ref(double exp_time, double tel_area)
fill_table(retval,NROWS_REF,flux_buf, COL_NAME_FLUX);
return retval;
}
-void eff_test(void)
+
+static void eff_test(void)
{
cpl_table* tbl_obj_spectrum = 0;
cpl_table* tbl_atmext = 0;
@@ -302,6 +310,7 @@ cleanup:
cpl_table_delete(tbl_result);
return;
}
+
int main(void)
{
cpl_test_init(SINFO_EFF_BUG_REPORT, CPL_MSG_WARNING);
diff --git a/sinfoni/tests/sinfo_gauss_fit_test.c b/sinfoni/tests/sinfo_gauss_fit_test.c
index 99bc5e3..1f601db 100644
--- a/sinfoni/tests/sinfo_gauss_fit_test.c
+++ b/sinfoni/tests/sinfo_gauss_fit_test.c
@@ -18,9 +18,12 @@
*/
/*
* $Author: amodigli $
- * $Date: 2010/06/18 06:55:06 $
- * $Revision: 1.4 $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.5 $
* $Log: sinfo_gauss_fit_test.c,v $
+ * Revision 1.5 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
* Revision 1.4 2010/06/18 06:55:06 amodigli
* added comment to make this test working
*
@@ -62,7 +65,7 @@
//const char* FITS_FILE_IMAGE = "bad_gauss_fit_psf.fits";
const char* FITS_FILE_IMAGE = "__img.fits";
-const char* SINFO_GAUSS_BUG_REPORT = "kmirny at eso.org";
+const char* SINFO_GAUSS_BUG_REPORT = "amodigli at eso.org";
void fit_test()
{
double norm = 0;
diff --git a/sinfoni/tests/sinfo_image_ops_test.c b/sinfoni/tests/sinfo_image_ops_test.c
index 0e7b48f..985dbf8 100644
--- a/sinfoni/tests/sinfo_image_ops_test.c
+++ b/sinfoni/tests/sinfo_image_ops_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 06:06:11 $
* $Revision: 1.8 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_image_ops_test.c,v $
* Revision 1.8 2009/06/05 06:06:11 amodigli
* updated init/end to cpl5
diff --git a/sinfoni/tests/sinfo_kappa_sigma_test.c b/sinfoni/tests/sinfo_kappa_sigma_test.c
index faeb352..3af4b06 100644
--- a/sinfoni/tests/sinfo_kappa_sigma_test.c
+++ b/sinfoni/tests/sinfo_kappa_sigma_test.c
@@ -18,10 +18,16 @@
* */
/*
* $Author: amodigli $
- * $Date: 2012/04/26 15:23:49 $
- * $Revision: 1.6 $
- * $Name: sinfo-2_3_2 $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.8 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_kappa_sigma_test.c,v $
+ * Revision 1.8 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
+ * Revision 1.7 2012/09/18 06:40:28 amodigli
+ * fixed some warnings from clang
+ *
* Revision 1.6 2012/04/26 15:23:49 amodigli
* cleaned errors from Jenkins static checks
*
@@ -60,7 +66,7 @@
const int BUF_ARRAY_SIZE = 10;
const double EPSILON = 1E-5;
-const char* KAPPA_SIGMA_BUG_REPORT = "kmirny at eso.org";
+const char* KAPPA_SIGMA_BUG_REPORT = "amodigli at eso.org";
const double GAUSS_NORM = 1E7;
const int GAUSS_FWHM = 30;
@@ -502,7 +508,7 @@ int kappa_sigma_gauss_narrow_test()
return 1;
}
-void kappa_sigma_round_shift_test()
+static int kappa_sigma_round_shift_test()
{
const int sizeX = 8;
const int sizeY = 8;
@@ -527,6 +533,7 @@ void kappa_sigma_round_shift_test()
cpl_image* imMask = cpl_image_new(globalSizeX, globalSizeY, CPL_TYPE_DOUBLE);
int x = 0;
int z = 0;
+ int y = 0;
check_nomsg(imResult = cpl_image_new(globalSizeX, globalSizeY, CPL_TYPE_DOUBLE));
check_nomsg(cpl_imagelist_set(ilResult, imResult ,0));
//1. prepare the cubes
@@ -536,8 +543,8 @@ void kappa_sigma_round_shift_test()
cpl_imagelist* pImList = cpl_imagelist_new();
cpl_image* pImage = cpl_image_new(sizeX, sizeY, CPL_TYPE_DOUBLE);
- int x = 0;
- int y = 0;
+ x = 0;
+ y = 0;
int value_index = 0;
for (x = 1; x <= sizeX; x++)
{
@@ -608,13 +615,13 @@ void kappa_sigma_round_shift_test()
{
cpl_imagelist_delete(ppCubes[z]);
}
- return;
+ return 0;
cleanup:
cpl_assert(!"error in cpl function");
- return;
+ return 0;
}
-void kappa_sigma_outlier_test()
+static int kappa_sigma_outlier_test()
{
// make a defect on the image with noise. kappa-sigma should remove the defect, defect should appear
// then on the mask image
@@ -725,10 +732,10 @@ void kappa_sigma_outlier_test()
{
cpl_imagelist_delete(ppCubes[z]);
}
- return;
+ return 0;
cleanup:
cpl_assert(!"error in cpl function");
- return;
+ return 0;
}
int main(void)
diff --git a/sinfoni/tests/sinfo_line_corr_test.c b/sinfoni/tests/sinfo_line_corr_test.c
index 5e45307..b3b9aee 100644
--- a/sinfoni/tests/sinfo_line_corr_test.c
+++ b/sinfoni/tests/sinfo_line_corr_test.c
@@ -18,11 +18,14 @@
* */
/*
- * $Author: kmirny $
- * $Date: 2009/09/02 12:18:02 $
- * $Revision: 1.1 $
- * $Name: sinfo-2_3_2 $
+ * $Author: amodigli $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_line_corr_test.c,v $
+ * Revision 1.2 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
* Revision 1.1 2009/09/02 12:18:02 kmirny
* updating unit tests
*
@@ -35,8 +38,9 @@
#include <cpl_test.h>
#include <sinfo_image_ops.h>
-const char* SINFO_EFF_BUG_REPORT = "kmirny at eso.org";
-cpl_image* prepare_image(double* sigma)
+const char* SINFO_EFF_BUG_REPORT = "amodigli at eso.org";
+
+static cpl_image* prepare_image(double* sigma)
{
const int IMG_SZX = 500;
const int IMG_SZY = 500;
@@ -71,12 +75,14 @@ cpl_image* prepare_image(double* sigma)
return pimage;
}
-void check_image(cpl_image* pimage, double sigma)
+
+static void check_image(cpl_image* pimage, double sigma)
{
double new_sigma = cpl_image_get_stdev(pimage);
cpl_msg_warning(cpl_func, "old sigma [%f], new [%f]", sigma, new_sigma);
}
-void line_correction_test()
+
+static void line_correction_test()
{
int width = 4;
int filt_rad = 3;
@@ -95,6 +101,7 @@ void line_correction_test()
cpl_image_save(poutput, "corr_out.fits", CPL_BPP_IEEE_FLOAT, NULL, CPL_IO_CREATE);
cpl_image_delete(pimage);
cpl_image_delete(poutput);
+ return;
}
diff --git a/sinfoni/tests/sinfo_skycor_test.c b/sinfoni/tests/sinfo_skycor_test.c
index ed247e1..f1614e9 100644
--- a/sinfoni/tests/sinfo_skycor_test.c
+++ b/sinfoni/tests/sinfo_skycor_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 06:06:11 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_skycor_test.c,v $
* Revision 1.5 2009/06/05 06:06:11 amodigli
* updated init/end to cpl5
diff --git a/sinfoni/tests/sinfo_star_catalog.c b/sinfoni/tests/sinfo_star_catalog.c
index 26ffddb..d1940c8 100644
--- a/sinfoni/tests/sinfo_star_catalog.c
+++ b/sinfoni/tests/sinfo_star_catalog.c
@@ -17,10 +17,13 @@
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: kmirny $
- * $Date: 2010/08/20 08:59:16 $
- * $Revision: 1.3 $
+ * $Author: amodigli $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.4 $
* $Log: sinfo_star_catalog.c,v $
+ * Revision 1.4 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
* Revision 1.3 2010/08/20 08:59:16 kmirny
* fixing problem with removing from catalog
*
@@ -47,7 +50,7 @@
#include <sinfo_star_index.h>
#include <getopt.h>
-const char* SINFO_STAR_BUG_REPORT = "kmirny at eso.org";
+const char* SINFO_STAR_BUG_REPORT = "amodigli at eso.org";
const double EPSILON = 1E-5;
const double DATA_1 = 209384.23;
const double DATA_2 = 378455.4398;
@@ -76,13 +79,15 @@ const STAR_COORD coords2[] = {
{2.234434, 45.2239, 8746.1236, "STAR_CIN"},
};
-void create_empty_test()
+static void create_empty_test()
{
star_index* pindex = star_index_create();
cpl_test(pindex);
star_index_delete(pindex);
+ return;
}
-cpl_table* create_data_table(double data_value)
+
+static cpl_table* create_data_table(double data_value)
{
cpl_table* retval = cpl_table_new(1);
cpl_test(retval);
@@ -90,7 +95,8 @@ cpl_table* create_data_table(double data_value)
cpl_table_set_double(retval, COL_NAME_DATA, 0, data_value);
return retval;
}
-void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
+
+static void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
{
int i = 0;
for (i = 0; i < size; i++)
@@ -102,8 +108,10 @@ void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
cpl_test_abs(result_data, pcoords[i].data_value, EPSILON);
cpl_table_delete(presult_data);
}
+ return;
}
-void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
+
+static void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
{
int i = 0;
for (i = 0; i < size; i++ )
@@ -112,8 +120,10 @@ void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
star_index_add(pindex, pcoords[i].RA, pcoords[i].DEC, pcoords[i].STAR_NAME, pdata);
cpl_table_delete(pdata);
};
+ return;
}
-void add_data_test()
+
+static void add_data_test()
{
star_index* pindex = star_index_create();
@@ -123,9 +133,10 @@ void add_data_test()
check_index(pindex,coords, sizeof(coords) / sizeof(coords[0]));
star_index_save(pindex, FILE_NAME_FITS);
star_index_delete(pindex);
+ return;
}
-void load_file_test()
+static void load_file_test()
{
star_index* pindex = star_index_load(FILE_NAME_FITS);
check_index(pindex, coords, sizeof(coords) / sizeof(coords[0]));
@@ -145,8 +156,11 @@ void load_file_test()
check_index(pindex2, coords + 1, sizeof(coords) / sizeof(coords[0]) - 1);
star_index_delete(pindex);
star_index_delete(pindex2);
+ return;
+
}
-void create()
+
+static void create()
{
star_index* pindex = star_index_load("star_index.fits");
if (pindex)
@@ -160,8 +174,10 @@ void create()
}
star_index_delete(pindex);
}
+ return;
}
-cpl_error_code add_star(star_index* pindex, const char*name, double RA, double DEC, const char* fits_file_name)
+
+static cpl_error_code add_star(star_index* pindex, const char*name, double RA, double DEC, const char* fits_file_name)
{
cpl_error_code err = CPL_ERROR_NONE;
cpl_table* tbl = 0;
@@ -183,17 +199,17 @@ cpl_error_code add_star(star_index* pindex, const char*name, double RA, double D
return err;
}
-void list_catalog(star_index* pindex, FILE* file)
+static void list_catalog(star_index* pindex, FILE* file)
{
star_index_dump(pindex, file);
}
-void remove_star(star_index* pindex, const char* star_name)
+static void remove_star(star_index* pindex, const char* star_name)
{
star_index_remove_by_name(pindex, star_name);
}
-void save_catalog(star_index* pindex, const char* fits_file_name)
+static void save_catalog(star_index* pindex, const char* fits_file_name)
{
const char* TMP_FILE_NAME = "star_index_tmp.fits";
const char* EXT_BAK = ".bak";
@@ -207,7 +223,9 @@ void save_catalog(star_index* pindex, const char* fits_file_name)
//3. rename new file
rename(TMP_FILE_NAME, fits_file_name);
cpl_free(bak_filename);
+ return;
}
+
int main(int argc, char * const argv[])
{
cpl_test_init(SINFO_STAR_BUG_REPORT, CPL_MSG_WARNING);
diff --git a/sinfoni/tests/sinfo_star_index_test.c b/sinfoni/tests/sinfo_star_index_test.c
index 9dddb09..0eeea4b 100644
--- a/sinfoni/tests/sinfo_star_index_test.c
+++ b/sinfoni/tests/sinfo_star_index_test.c
@@ -17,10 +17,13 @@
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
*/
/*
- * $Author: kmirny $
- * $Date: 2009/07/13 14:40:39 $
- * $Revision: 1.2 $
+ * $Author: amodigli $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.3 $
* $Log: sinfo_star_index_test.c,v $
+ * Revision 1.3 2012/09/18 06:53:36 amodigli
+ * fixed warnings from clang
+ *
* Revision 1.2 2009/07/13 14:40:39 kmirny
* fixing unit test failure in star catalog
*
@@ -41,7 +44,7 @@
#include <sinfo_utils_wrappers.h>
#include <sinfo_star_index.h>
-const char* SINFO_STAR_BUG_REPORT = "kmirny at eso.org";
+const char* SINFO_STAR_BUG_REPORT = "amodigli at eso.org";
const double EPSILON = 1E-5;
const double DATA_1 = 209384.23;
const double DATA_2 = 378455.4398;
@@ -70,13 +73,15 @@ const STAR_COORD coords2[] = {
{2.234434, 45.2239, 8746.1236, "STAR_CIN"},
};
-void create_empty_test()
+static void create_empty_test()
{
star_index* pindex = star_index_create();
cpl_test(pindex);
star_index_delete(pindex);
+ return;
}
-cpl_table* create_data_table(double data_value)
+
+static cpl_table* create_data_table(double data_value)
{
cpl_table* retval = cpl_table_new(1);
cpl_test(retval);
@@ -84,7 +89,8 @@ cpl_table* create_data_table(double data_value)
cpl_table_set_double(retval, COL_NAME_DATA, 0, data_value);
return retval;
}
-void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
+
+static void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
{
int i = 0;
for (i = 0; i < size; i++)
@@ -96,8 +102,10 @@ void check_index(star_index* pindex, STAR_COORD* pcoords, int size)
cpl_test_abs(result_data, pcoords[i].data_value, EPSILON);
cpl_table_delete(presult_data);
}
+ return;
}
-void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
+
+static void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
{
int i = 0;
for (i = 0; i < size; i++ )
@@ -106,8 +114,10 @@ void fill_index(star_index* pindex, STAR_COORD* pcoords, int size)
star_index_add(pindex, pcoords[i].RA, pcoords[i].DEC, pcoords[i].STAR_NAME, pdata);
cpl_table_delete(pdata);
};
+ return;
}
-void add_data_test()
+
+static void add_data_test()
{
star_index* pindex = star_index_create();
cpl_test(pindex);
@@ -116,9 +126,10 @@ void add_data_test()
check_index(pindex,coords, sizeof(coords) / sizeof(coords[0]));
star_index_save(pindex, FILE_NAME_FITS);
star_index_delete(pindex);
+ return;
}
-void load_file_test()
+static void load_file_test()
{
star_index* pindex = star_index_load(FILE_NAME_FITS);
check_index(pindex, coords, sizeof(coords) / sizeof(coords[0]));
@@ -138,8 +149,10 @@ void load_file_test()
check_index(pindex2, coords + 1, sizeof(coords) / sizeof(coords[0]) - 1);
star_index_delete(pindex);
star_index_delete(pindex2);
+ return;
}
-void create()
+
+static void create()
{
star_index* pindex = star_index_load("star_index.fits");
star_index_delete(pindex);
@@ -157,6 +170,7 @@ void create()
cpl_error_reset();
}
star_index_delete(pindex);
+ return;
}
int main(void)
diff --git a/sinfoni/tests/sinfo_strehl_test.c b/sinfoni/tests/sinfo_strehl_test.c
index c694a7b..5086ff8 100644
--- a/sinfoni/tests/sinfo_strehl_test.c
+++ b/sinfoni/tests/sinfo_strehl_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2009/06/05 06:06:11 $
* $Revision: 1.17 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_strehl_test.c,v $
* Revision 1.17 2009/06/05 06:06:11 amodigli
* updated init/end to cpl5
diff --git a/sinfoni/tests/sinfo_table_ops_test.c b/sinfoni/tests/sinfo_table_ops_test.c
index d97d2e5..ea13b69 100644
--- a/sinfoni/tests/sinfo_table_ops_test.c
+++ b/sinfoni/tests/sinfo_table_ops_test.c
@@ -21,7 +21,7 @@
* $Author: amodigli $
* $Date: 2012/04/26 15:23:49 $
* $Revision: 1.5 $
- * $Name: sinfo-2_3_2 $
+ * $Name: sinfo-2_3_3 $
* $Log: sinfo_table_ops_test.c,v $
* Revision 1.5 2012/04/26 15:23:49 amodigli
* cleaned errors from Jenkins static checks
diff --git a/sinfoni/tests/test_atmo_disp.c b/sinfoni/tests/test_atmo_disp.c
index 3e20d8e..c1438e6 100644
--- a/sinfoni/tests/test_atmo_disp.c
+++ b/sinfoni/tests/test_atmo_disp.c
@@ -19,8 +19,8 @@
/*
* $Author: amodigli $
- * $Date: 2010/02/08 07:20:07 $
- * $Revision: 1.8 $
+ * $Date: 2012/09/18 06:53:36 $
+ * $Revision: 1.9 $
*/
#ifdef HAVE_CONFIG_H
@@ -35,7 +35,7 @@
#include <sinfo_utilities.h>
#include <sinfo_msg.h>
-const char* SINFO_STAR_BUG_REPORT = "kmirny at eso.org";
+const char* SINFO_STAR_BUG_REPORT = "amodigli at eso.org";
const double EPSILON = 1E-8;
const char* COL_NAME_ID = "id";
const char* COL_NAME_CENTRE_X = "center_x";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-sinfo.git
More information about the debian-science-commits
mailing list