3.3.19 Update  for adari
3.3.12 Update  for adari, edps
       fixed possible seg fault problem in case of long paths  PIPE-12342
       Updated recipe regressions details
       updated to set src.net on skysub columns when they have physical units
       changed sprintf with cpl_sprintf and fixed problem with comment on orderdef QC
       Fixed problems NIRPS INF in SDP product
3.3.11 Update espd wkf and reflex oca to fix PIPE-11908
3.3.10 Removed adari on science
3.3.9 Public release 
3.3.6 Public release 
3.3.3 Public release 12/03/2025 candidate
3.3.1 Public release 12/02/2025 candidate
3.3.0 Public release 21/11/2024
3.2.10 Preparing new release: Switch off STD,RV,OBJECT_FP data reduction
3.2.9 Preparing new release: remove HARPS, NIRPS oca and reflex wkf
3.2.8 Preparing new release: fix PIPE-11835
3.2.7 Preparing new release 
3.2.6 Merged May-2024 branch
Danuta 25/07/2024 new version 3.2.5, added proper MASTER DARK error propagation in the extraction
	- Added extensions to the MASTER DARK with number of pixels used for the computation
	- Changed the espdr_extract_real_outputs() to read separately the master dark extensions with pixels nb, because they are of type CPL_TYPE_INT
	- Added the master_dark_pxl_nb argument to the extraction functions (except in espdr_shifted_extraction_one_fibre())
	- Added the master dark error in the extracted pixel error, when MASTER DARK is used
	- All the recipes, except mbias, were touched by this change
3.2.5 Removed one unit test on bad pixels as espdr_bad_pixels API changed significantly (we should fix that sometimes)
3.2.4 removed target CALCHECKER (from Lodo)
3.2.3 Updated EDPS workflow with changed from Lodo as agreed at IOT
      "fixed computation of ESO QC AIRM AVG,ESO QC AIRM AVG params" espdr/espdr_utils.c
3.2.2 Updates EDPS Workflow, included recent changes IDPS (for NIRPS) and some changes from Danuta
3.2.0 Public release
3.1.6 Merge with devealopment branch
3.1.5 Merge with devealopment branch
3.1.3 Pop up number for public release
3.1.2 Update the ADARI reports to the latest version
3.1.1 Update the ADARI reports to the latest version
3.1.0 Public release with EDPS workflows
3.0.8  To be able to test macports
3.1.0a Merge from espdr_reports, create 3.1.0a candidate new pub release
3.0.2 Fixed PIPE-10683

3.0.0 Public release
Andrea 18/01/2022 Fix  few typos for DFS
Andrea 17/01/2022 Fix PIPE-10118 (to have QC parameters of individual readouts
                   in the proper FITS extension for QC-Flow)
Xavier 16/01/2022 optimised some params for HARPS & NIRPS
Andrea 12/12/2022 moved main functionality from recipes to corresponding library functions (as agreed with Danuta)
Andrea 08/12/2022 Crea 3.0.0b4 before moving top level recipe functions to the library
Andrea 01/12/2022 Crea 3.0.0b3 to test commissioning 2
Andrea 25/11/2022 Crea 3.0.0b2 to make test on vagrant
Danuta 25/08/2022
	- Increased the limit for the SNR in SKY FLATs from 20.0 to 80.0 for all instruments/modes, because now we compare the mean SNR and not the min
	- Added the inst_configs for NIRPS f0r 2022, the were lost in the merging

Danuta 24/08/2022
	- Corrected the master_dark error propagation in the extraction: No MASTER DARK noise propagation, it is negligible for 10 raw DARKs

Danuta 10/08/2022
	- Changed the fit of the FP cavity size (D), removed all the polynomial fits and the offset computation, leaving only the Savitzky-Golay with sigma clipping, all changes are in the function espdr_fit_d_lambda(), in espdr_wave_THAR_cal.c

Andrea 14/07/2022 Latest commits from Danuta before merging to main trunk
Andrea 20/06/2022 Release for Valentin
Andrea 13/06/2022 Danuta asked to create a new RPM with updates she did
Andrea 07/06/2022 Danuta reverted changes for NIRPS com1
Andrea 06/06/2022 Updated Reflex, OCA to support NIRPS com1
Andrea 12/04/2022 New release for NIRSP AIV at La silla
Danuta 28/03/2022
	- Put the saving of drift QC keywords in the dedicated function: espdr_full_drift_QC() in espdr_drift.c
	- replace the saving of the drift QC keywords by this function in espdr_wave_THAR_cal.c & espdr_science.c

Andrea: 2.4.6b1
  Prepared version to start NIRPS AIV
  Refactored espdr_instruent.c
Andrea: 2.4.6
  Realigned NIRPS branch to main trunk: 2022 03 17
Andrea: 2.4.3
  April 2022 CoP release
  Fixed PIPE-9973
  Realigned NIRPS branch to main trunk
Danuta 09/03/2021
	- made uniform the sizes of background boxes between recipes:
		- NIRPS all modes and epochs, CORALIE -> *_BKGR_GRID_SIZE_X & *_BKGR_GRID_SIZE_Y made the same

Danuta 09/03/2021
	- made uniform the sizes of background boxes between recipes:
		- MR42, MR84 & HR42 -> SCI_BKGR_GRID_SIZE_X & SCI_BKGR_GRID_SIZE_Y aligned on other sizes

Danuta 09/03/2021
	- re-organised the extraction parameters in the inst_config files:
		- one, common extraction method instead of one per recipe
		- extraction ksigma per source (TUN, FP, THAR, LFC, OBJECT, SKY, DARK), instead of one per recipe
		- one extraction window size per fibre, instead of one per recipe, per fibre
		- one, common, tolerance rejection, instead of one per recipe

Danuta 07/03/2021
	- refactoring cal_contam & cal_eff_ab:
		- espdr_process_calib_till_extraction() - getting input calibrations and processing utils the extraction

Danuta 03/03/2022
	- refactoring sci_red & cal_flux:
		- espdr_get_berv_params() - get parameters necessary to BERV calculation
		- espdr_get_seeing() - get the seeing form the FITS header 
		- espdr_process_raw_till_extraction() - getting input calibrations and processing utils the extraction
		- espdr_compute_snr() - compute the SNR, then passed to the QC function

	- refactoring sci_red:
		- espdr_science_get_static_tables() - getting static calibration tables form the input set of frames
		- espdr_process_cosmics() - LA cosmics processing embedding function
		- espdr_save_science_products() - saving of recipe products
	- refactoring cal_flux:
		- espdr_flux_get_static_tables() - getting static calibration tables form the input set of frames
		- espdr_save_cal_flux_products() - saving of recipe products		

Danuta 04/02/2022
	- refactored the wave_LFC recipe
		- espdr_process_wave_till_extraction(): getting of input products from the frameset
		- espdr_save_debug_table_RDB(): saving of the debug products
		- espdr_save_wave_LFC_products: saving of recipe products

Danuta 04/02/2022
	- refactored the wave_LFC_LFC recipe
		- espdr_process_wave_till_extraction(): getting of input products from the frameset

Danuta 04/02/2022
	- refactored the wave_THAR_THAR recipe
		- espdr_process_wave_till_extraction(): getting of input products from the frameset
Andrea 06/02/2022 Created 2.4.1b5 to fix PIPE-9929
Andrea 03/02/2022 Created 2.4.1b4 to fix PIPE-9929
Andrea 27/01/2022 Created 2.4.1b3 to provide to Geneva machine + DFS+ pipeline
installed

Danuta 04/02/2022
	- refactored the wave_FP, wave_THAR & wave_TH_drift recipes:
		- espdr_process_wave_till_extraction(): getting of input products from the frameset
		- espdr_extract_lines_tables(): getting of the input FITS lines tables (only in wave_THAR & wave_TH_drift)
		- espdr_drift_table_init(): initialising of the drift table (only in wave_THAR)
		- espdr_save_debug_*table_RDB*(): saving of the debug products
		- espdr_save_wave_THAR/TH_drift_products: saving of recipe products (only in wave_THAR & wave_TH_drift)

Danuta 18/01/2022
	- refactored the mflat recipe, files concerned: recipes/espdr_mflat.c, espdr/espdr_flat.c, espdr/espdr_flat.h, espdr_espdr_dfs.c, espdr_espdr_dfs.h

Andrea 17/01/2022 update id to tag version to be tested with EDPS
Danuta 22/12/2021
	- Added DLL MATRIXes to the espdr_rebin() function and all the calling functions: espdr_rebin_and_merge_orders(), espdr_select_orders_and_create_rebin_image(), espdr_process_sky()
	- Added the DLL_MATRIX_A/B product in the input set of cal_flux recipe

Danuta 21/12/2021
	- Added condition of execution only for ESPRESSO in the recipes: mbias, mdark, led_ff, wave_FP, wave_THAR, wave_LFC, sci_red
	- Added the check of the correct execution of the espdr_add_extra_qc() function
	- Added the use of PIXEL_SIZE_<fibre> in wave_THAR & wave_LFC recipes
	- Added the STATIC_DLL_MATRIX as input to the mflat recipe, used in the espdr_correct_s2d_instrumental() function

Andrea 18/12/2021 Aligned NIRPS branch to main trunk

Danuta 08/12/2021
	- Corrected bug in the extraction: provided Texp of the frame was 0.0 in science, flux, contam & eff_ab (already corrected in the NIRPS branch)

Danuta 10/11/2021
	- corrected a bug in the extraction, DARK used in the extraction was in ADUs, instead of el-

Danuta 03/12/2021
	- The adding of fake FP peaks is necessary for NIRPS to get the wavelength solution, for other instruments, especially ESPRESSO, the algorithm is not fiable for the very noisy parts of blue orders, therefore this adding of fake peaks is allowed only for NIRPS
	- Added if (strcmp(inst_config->instrument, "NIRPS") == 0) condition when adding fake FP peaks.
	- To do so, added the inst_config parameter to espdr_search_lines() function, instead of a list of parameters coming from the inst_config, to have the access to all the inst_config parameters

Danuta 05/11/2021
	- Adjusted parameters for hot & bad pixel mask calculation: mdark: HOTPIXELS_KSIGMA,led_ff: FLUX_MIN_LIMIT, DEAD_PIXEL_FLUX_LIMIT, BADPIXELS_KSIGMA 

Danuta 05/11/2021
	- Added the preprocessing to the led_ff recipe
	- Refactored the espdr_preprocess_img function to be used by mflat & led_ff

Danuta 04/11/2021
	- Improved preprocessing by computing the background on masked frame, with median off nans instead of minlevel_factor, this gives results closer to the preprocessing script

Danuta 02/11/2021
	- Added the use of FLAT mask to mdark for preprocessing validation
	- Adapted the inst_config for NIRPS to get correct orders localisation for both modes and epochs

Danuta 25/10/2021
	- Found and corrected a bug in the preprocessing, was catching a real pixel in the median calculation for the top-bottom slope correction, should be computed only on artificial pixels

Danuta 25/10/2021
	- Inverted the top & the bottom in the median calculation in the preprocessing in the top-bottom correction
	- Removed the elimination of inf pixels from the median_off_nans calculation




Danuta 18/10/2021
	- Moved the RON conversion into the extraction function


	- corrected a bug in the extraction, RON used in the extraction was in ADUs, instead of el-, added GAIN as extraction parameter to convert RON in electrons inside the extraction function
	- updated the inst_config_HARPN_HARPNCCD1.c according to the HARPN commissioning
	- updated the ccd_geom_HARPN.c according to the HARPN commissioning
	- removed the espdr_reg/std_tables - it is present in the espdr-calib 

Danuta 17/10/2021
	- corrected a bug in the extraction, RON used in the extraction was in ADUs, instead of el-
	- tested OK for HARPN

Danuta 16/10/2021
	- Added a condition on the FWHM returned by the gaussian fit of the order profile in the orders localisation, function espdr_bissector_one_image()
	- If the FWHM < 1.5 (in pixels) than the error is set to DBL_MAX

Danuta 07/10/2021
	- Added master dark errors in the extraction error calculation, only for valid pixels (Horne extraction)
	- Added DARK error in the extraction error in the simple extraction
	- Removed the hot-bad pixels interpolation in the simple extraction
	- Added CRH mask to the simple extraction (only marking the extracted pixel with the COSMIC flag, pixel not discarded from the extraction)
	- Corrected bug in the extraction: provided Texp of the frame was 0.0 in science, flux, contam & eff_ab
	- Added master dark errors in the extraction error calculation, only for valid pixels (simple extraction)





Danuta 27/09/2021
	- Corrected a bug in the extraction: check if the flux is < 0 --> flux = 0.0, unless err could be nan, will be immediately propagated into the main trunk
	- Added RON calculation in the remove_det_signature, in case of preprocessing 
Andrea 05/08/2021 aligned with NIRPS (to support NIRPS,HARPS and fix an error on PIPEFILE prefix, fixed PIPE-9712:  espdr/espdr_sdp_spectrum.c

Danuta 27/09/2021
	- Added the preprocessing for cal_contam recipe

Danuta 24/09/2021
	- Preprocessing included in the pipeline, tested only in HA mode

Danuta 24/08/2021
	- Added the possibility to reduce the frames THAR_DARK & DARK_THAR by wave_THAR recipe, changes in: recipes/wave_THAR.c, espdr/espdr_dfs.h, espdr/espdr_wave_cal.h

Danuta 29/06/2021
	- Removed the order 45 (physical nb 105) form the numbering for NIRPS
	- Transparent for ESPRESSO
	- Corrected the order physical numbers in the inst_config files

Danuta 29/06/2021
	- Replaced code by the existing function espdr_get_order_phys_numbers() in espdr_orderdef_QC()
	- Tested OK for ESPRESSO

Danuta 28/06/2021
	- For NIRPS, static hot & bad pixel masks will be used, therefore the dark current has to be taken from the master_dark frame
	- If present the KWs are taken form the MASTER_DARK, so transparent for ESPRESSO, HARPS & HARPS-N

Danuta 08/06/2021
	- Due to the detector defects felling on the orders after the spectrum shift a patch to fill the gaps in FP peaks was added in espdr_wave_cal.c, function espdr_search_lines()
	- It is failing for recent HE FP-FP frames, due to the strange, single, very high FP peak in order 70 on fibre A
	- This could be also used for other instruments, but needs testing
	- a new, more robust algorithm is foreseen at a later time 

Danuta 07/06/2021
	- Added a parameter to the inst_config, for the orders localisations to reject orders too close to the upper detector edge (MAX_ORDER_Y) - this is compatible with ESPRESSO, HARPS & HARPN
	- Parameters adapted for the new spectral format in HA (after 1st May 2021)

Danuta 02/06/2021
	- espdr/espdr_wave_THAR_cal.c: small changes in the espdr_read_REF_LINES_TABLE_CSV() & espdr_find_first_FP_ll()
	- espdr/espdr_wave_cal.c: adjustment of the filename for nirps in espdr_save_static_matrixes()
	- recipes/espdr_wave_THAR.c: added dates to save NIRPS static calibrations

Danuta 02/06/2021
	- instrument_config_NIRPS_HE_aug2020.c: adjusted the residuals limits (big & small) for d fit
	- instrument_config_NIRPS_HE_may2021.c: adjusted the residuals limits (stdefv, min & max) of orders localisation, limits of the flat rms, tolerance of searching UNe lines, residuals limits (big & small) for d fit, extraction window size for fibre B 6 --> 3
	- instrument_config_general.c: added print of residuals limits (min & max) of orders localisation

Danuta 25/05/2021
	- Due to the NIRPS spectral format change, the inst_config for both modes were splitter into before may 2021 (inst_config_NIRPS_H<A,E>_aug2020.c, time-stamp 2020-08-01) and after may 2021 (inst_config_NIRPS_H<A,E>_may2021.c, time-stamp 2021-05-01)

Danuta 25/05/2021
	- Due to the NIRPS spectral format change in May 2021, had to add a supplementary condition to the orders numbering: now they have to start no further then an X coordinate specified in the inst_config (MIN_ORDER_X). For other instruments this coordinate is set to a big value (10000), so it has no incidence on other instruments

Danuta 25/05/2021
	- Adapted the led_ff recipe for NIRPS, even if it will not be used: bad pixels detection - standard, conversion factor saved in the FITS header is taken from the nominal gain in the raw frame, which for NIRPS only is saved in the main FOTS header. For all the other instruments it is save din the extension headers. SO, the code as it is works fr all the instruments.


Danuta 20/05/2021
	- Completed management of the TAGs for MASTER_DARK input calibration for all recipes 
	  except mbias, mdark, wave_TH_drift, wave_THAR_THAR & wave_LFC_LFC - no impact for ESPRESSO or HARPS

Danuta 17/05/2021
	- Updated to 2.2.9 to start PAE verification process

Danuta 06/05/2021
	- Made the reading of the header KWs in SDP function more general
	- Now the SDP can be created for all ESO instruments

Danuta 04/05/2021
	- Adjusted inst_config parameters to exclude the order 43 (gap) from the orders localisation
	- Split the min order length between fibres fro more flexibility
	- QC limits adjusted for the new localisation

Danuta 30/04/2021
	- Orders not in order in ORDER_TABLEs, because of the gap and shorter orders, issue solved by sorting the orders.
	- It should not impact ESPRESSO, HARPS & HARPN, but to be tested before merging

Danuta 29/04/2021
	- Adjusted inst_config for the QC values for recipes: mflat & wave_FP
Danuta 28/04/2021
	- Orders localisations OK for the complete images for both modes HA & HE, same algorithm as ESPRESSO, only inst_config tuning
Danuta 28/04/2021
	- Aligned on the last change in the main trunk, before the release: remove the optional PIXEL_GEOM form the meal recipe
Danuta 27/04/2021
	- New version 2.3.1, aligned on the main trunk, no differences
	- limit QC values adapted
Danuta 27/04/2021 Added checks on the user provided CRH map:
	- If ARCFILE, BIX or BINY differ from the science raw frame or the extensions number is different than the nb of CCDs, the recipe continues as if the CRH mask was not provided
Danuta 27/04/2021 Split the extraction window size between fibres
Danuta 22/04/2021 Added the optional PIXEL_GEOM input to the mflat recipe: each FLAT is divided by the corresponding PIXEL_GEOM if provided (per fiber)
		  Small corrections in wave_FP, wave_THAR & wave_DRIFT to read correctly the PIXEL_GEOM maps
Danuta 20/04/2021 Version 2.3.1: changed the algorithm for orders localisation for the one developed for NIRPS, cleaned-up the orderdef/order code & inst_configs

Danuta 10/03/2021
	- Split the extraction window size between the fibres for the HE mode, files affected:
		- espdr_reg/inst_config/instrument_config_NIRPS_HE_redcut.c
		- espdr/espdr_instrument.c|h
		- espdr/espdr_extraction.c|h
		- espdr/espdr_flat.c
		- espdr/espdr_science.c
		- espdr/espdr_flux.c
		- espdr/espdr_contam.cs
		- espdr/espdr_eff_ab.c
		- recipes/wave_THAR.c
		- recipes/wave_TH_drift.c
		- recipes/wave_LFC.c
	- wrong type of the window_size, when taking the right one for the calibration type for the extraction, was double, changed to int:
		- recipes/wave_THAR.c
		- recipes/wave_TH_drift.c
		- recipes/wave_LFC.c
		
Danuta 10/03/2021
	- Put the latest changes form the main trunk into the airs branch:
		- changed the COL_NAME_FP_EXTRACTION_KSIGMA from 5.0 to 9.0 for ESPRESSO_MULTIMR_8x4_oct2018 inst_config
		- added the debug product to the espdr_wave_FP.c: extracted spectrum

Andrea 30/04/2021 Tagging candidate May 2021 public release: 2.3.2
Andrea 30/04/2021 Tagging candidate May 2021 public release: 2.3.1
Danuta 28/04/2021 Removed the optional PIXEL_GEOM input from the mflat recipe: the conclusion after testing on HARPS data was to not use it in mflat
Danuta 27/04/2021 Added checks on the user provided CRH map:
	- If ARCFILE, BIX or BINY differ from the science raw frame or the extensions number is different than the nb of CCDs, the recipe continues as if the CRH mask was not provided
Danuta 27/04/2021 Split the extraction window size between fibres
Danuta 22/04/2021 Added the optional PIXEL_GEOM input to the mflat recipe: each FLAT is divided by the corresponding PIXEL_GEOM if provided (per fiber)
		  Small corrections in wave_FP, wave_THAR & wave_DRIFT to read correctly the PIXEL_GEOM maps
Danuta 20/04/2021 Version 2.3.1: changed the algorithm for orders localisation for the one developed for NIRPS, cleaned-up the orderdef/order code & inst_configs

-------------------->>>>>>>> started NIRPS branch
Andrea 19/02/2021 Version 2.2.9: fix PIPE-9409 reflex interactive window of espr_sci_red does not display the correct plots - not present in this branch, nor the main trunk
Andrea 19/02/2021 Version 2.2.9: fix PIPE-9409 reflex interactive window of espr_sci_red does not display the correct plots
Danuta 17/02/2021 Version 2.2.8: finalised LA Cosmic & some other corrections:
	- Changes related to LA Cosmic as provided by Andrea:
		- espdr/espdr_instrument.c: clarified parameter as agreed to 'cosmic_detection_sw'
		- espdr/espdr_parameters.h|c: added extra_products_sw to scired param structure, added functions to handle boolean params
		- espdr/espdr_science.c: changes to handle possibility that user post-filter mask, and possibility the user save extra products. The extraction uses the appropriate (eventually post-filtered CRH map). Note that in the saving of the product I had (as one should) defined a property-list to have proper FITS header and PRO.CATG. Previous way of saving (previously used only in debug mode) used a property list that was screwing the FITS header correctness of other products.
		- recipes/espdr_sci_red.c: updated man page listing the optional products. Registered value of bias_res_removal_sw in corresponding FITS header key. Note that parameters changed by user requires both check that a parameter has been touched (cpl_parameter_get_default_flag) and that has changed value (espdr_param_has_changed). The second check is required in order to make Reflex work as the esorex command executed by this tool takes parameter not from the command line but from a recipe configuration file (created on the fly by Reflex).
		- espdr/espdr_dfs.c: fixed possible seg-fault evidenced by compilation and run time with gcc sanitiser (the problem was with a pointer that need extra parenthesis around it)
	- corrected in extraction in cosmics sigma clipping to not go with good_pxls_nb below 0 & set the error in this case to RON (flux is 0 - no good pixels), before error was set to INF
	- changed the  cpl_propertylist_set_string to  cpl_propertylist_update_string for the PRO.CATG KW

Danuta 12/02/2021 New version 2.2.8 - ready for the whole reprocessing
	- small correction in espdr_compute_derivative()
	- added Andrea's correction for IDP (remove the electrons as units)

Danuta 09/02/2021 Corrected long time bug in the extraction (MAX_FLUX value too small, no set to DBL_MAX)

Danuta 02/02/2021 Aligning the NIRPS branch on the main trunk
	- Added the background calculation to the orderdef (under if NIRPS condition)
	- Added the orders detection with use of the background in orderdef (user if NIRPS condition) & orders
	- Added debug products: background and CCD cleaned with subtracted background (under if NIRPS condition)
	- inst_config->bkgr_map_blaze_fwhm & inst_config->order_flux_factor split per fibre in espdr_instrument.c & espdr_instrument.h
	- Added PRO_CATG_FF_BKG_MAP to espdr_dfs.h

Danuta 01/02/2021 Aligning the NIRPS branch on the main trunk - new version 2.2.7
	- Added the removal of the MASTER_DARK, MASTER-DARK is only removed if present in SOF, no incidence on ESPRESSO/HARPS & HARPS-N reduction
	- Added the reading of the THAR/UNE lines tables in CSV format

Danuta	11/01/2021 LA Cosmic integrated with correct parameters management

Danuta	13/10/2020 Simplified extraction, no more interpolation of hot/bad pixels

Danuta	02/10/2020 Several changes to the wave_TH_drift recipe:
	- Added sigma clipping of the lines with residuals bigger than KSIGMA * MAD
	- Removed the fitting of the REF TH line table on the STATIC S2D, instead the right values of the fit are in the STATIC_LINE_TABLE
	- The fit of the TH lines on the S2D is done with the REF_LINE_TBLE
	- Added FITS header KWs: MAD of residuals, fraction of rejected lines, KSIGMA for sigma clipping, MAD value check, fraction check
	- Added the MAD upper limit and rejected lines fraction limit to the inst_config
	- Adjusted TAGs management to the new static products

Andrea  10/09/2020 Change default of background_sw for OBJ_SKY to 'on'" reflex/espresso.xml.in
Andrea	31/07/2020 Pop up to 2.2.3   updated id
Danuta	20/07/2020 Extraction: corrected extraction for large number of hot/bad pixels in the extraction window
Andrea	03/07/2020 Pop up to 2.2.2   updated id to test IDP input on python reflex 
Xavier	12/06/2020 Update drift measurement, with order by order renormalisation
Andrea	28/05/2020 Pop up to 2.2.1   For public release, fixed pdf figure positioning
Andrea	26/05/2020 Pop up to 2.2.0   For public release
Andrea	19/05/2020 Pop up to 2.1.4   In preparation of public release (removed external dependency from espdr-calib-extra)
Andrea	13/05/2020 Pop up to 2.1.3   In preparation of public release (including slit_loss param in Reflex Workflow)
Andrea	06/05/2020 Pop up to 2.1.2   In preparation of public release (including first implementation of IDPs)
Andrea	26/02/2020 Pop up to 2.0.0b3 To fix PIPE-8940 Reflex: Science GUI-on scientific linux pressing S1D_B make disappear control buttons
Andrea	24/02/2020 Pop up to 2.0.0b2 To fix PIPE-8939 (remove input MASTER_BIAS_RES from recipes that do not use it)
Andrea	17/02/2020 Pop up to 2.0.0b1 For SEG testing
Andrea	16/11/2019 Pop up to 2.0.0 For public release
Andrea	16/11/2019 Pop up to 1.6.4 Fixed typos PSO OCA rules on LFC products
Andrea	16/11/2019 Pop up to 1.6.3 Fixed typos PSO OCA rules on LFC
Andrea	15/11/2019 Pop up to 1.6.2 Unified PSO OCA rules to Reflex one (and to documentation)
Andrea	14/11/2019 Pop up to 1.6.1 Fixed problem if LFC raw input data are missing
Andrea	13/11/2019 Pop up to 1.6.0 Fixed problem sired python to display CXCF gauss fit, updated tutorial
Andrea	11/11/2019 Pop up to 1.5.9 Updated Reflex OCA rules to fix skip problems, added sky subtraction params to scired
Andrea	10/11/2019 Pop up to 1.5.8 Updated Reflex OCA rules
Andrea	09/11/2019 Pop up to 1.5.7 Updated Reflex OCA rules
Andrea	08/11/2019 Pop up to 1.5.6 Updated Reflex OCA rules
Andrea	07/11/2019 Pop up to 1.5.5 Updated PSO OCA rules
Andrea	31/10/2019 Pop up to 1.5.4 Comments from Andrea, Wolfram, lfc only workflow
Andrea	22/10/2019 Pop up to 1.5.3 additional changes for LFC support, changed demo data
Andrea	16/10/2019 Pop up to 1.5.2 to add lfc support and tes
Andrea	15/09/2019 Pop up to 1.4.4 to allow testing on devel

Danuta	05/04/2019 Several changes to the science and cal_eff_ab recipes:
		   - Added DLL extensions (AIR and VAC) to the S2D science products
		   - Added header KW to save the actual mask used in science reduction
		   - Added a second cosmic removal with the 4 bins histogram method just before computing the CCF. The product is not saved, only the number f cosmic is save in the header as ORDERn.COSMIC.NB2
		   - Changed the CCF flux balance calculation
		   - Corrected the sky subtraction function: bug in the orders/slices pairing
		   - Added the smoothing of the sky for alternative sky subtraction
		   - Corrected the relative efficiency calculation: corrected bug in orders/slices pairing, changed the smoothing of the ratio
		   - Updated the version to 1.1.5

Andrea   22/03/2019 Updated id to 1.2.2 Public release as Paranal release but bumped ID to fix help of rv_center and mask_table_id
Andrea   21/03/2019 Updated id to 1.2.1 Public release as Paranal release but bumped ID to overcome jenkins build problems
Andrea   14/03/2019 Updated id to 1.2.0 Final release to Paranal
Andrea   08/03/2019 Updated id to 1.2.0b5 Fixed typo in RV_CENTER default in workflow
Andrea   08/03/2019 Updated id to 1.2.0b4 Updated rv_center default to -9999 (better a negative dummy default as for extragalactic center sources even 9999 might be a valid value)
Andrea   03/03/2019 Updated id to 1.2.0b3 Added products needed for DAS workflow to pipeline reflex products
Andrea   01/03/2019 Updated id to 1.2.0b2 Added DATE-OBS in Reflex products file names
Andrea   24/02/2019 Updated id to 1.2.0b1 To prepare for PSO/PUB release
Andrea   20/02/2019 Updated id to 1.1.5 To mark changes to fix PIPE-8264
Andrea   11/02/2019 Updated id to 1.1.4 Before merging to main trunk
Andrea   17/12/2018 Updated id to 1.1.3 Pop up number with improvements on Workflow from Wolfram
Andrea   11/12/2018 Updated id to 1.1.1 Pop up number for PSO release: changed OCA rules to use long term calibrations (HOT, BAD pixel masks and REL_EFF_B and ABS_EFF_A) from local CDB and not from virtual products
Andrea   10/12/2018 Updated id to 1.1.0 Pop up number for release
Andrea   07/12/2018 Updated id to 1.1.0b1 Pop up number for release
Andrea   06/12/2018 Updated id to 1.0.15 Comments from Richard on reflex workflow and from Danuta on user manual
Andrea   05/12/2018 Updated id to 1.0.14 Removed skip workflow
Andrea   04/12/2018 Updated id to 1.0.13 Static masks in SVN , fixed problems with bad pixels representation in Reflex GUI
Andrea   03/12/2018 Updated id to 1.0.12 Fixed params on darl and led-ff for reflex GUI
Andrea   29/11/2018 Updated id to 1.0.11 Fixed some params that were ins mode dep (extraction-ksigma in contam, rv_step in science) both in recipes and reflex
Andrea   27/11/2018 Updated id to 1.0.10 release to QC
Andrea   26/11/2018 Updated id to 1.0.9b3 Fix PIPE-8121
Andrea   26/11/2018 Updated id to 1.0.9b2 Fix some typo in reflex INIT parameter setting, and WLC param setting
Andrea   18/11/2018 Updated id to 1.0.9b1 
Andrea   13/11/2018 Updated id to 1.0.9a4 Fix problem reflex python on wavecal
Andrea   11/11/2018 Updated id to 1.0.9 For QC
Andrea   11/11/2018 Updated id to 1.0.93 Fix problem reflex oca rules with input MASK_TABLE
Andrea   11/11/2018 Updated id to 1.0.9a2 Added FLUX_TEMPLATE as required input of scired,in Paranal & Reflex OCA fixed errors from code sanitiser, aligned a QC COSMIC NB index
Andrea   08/11/2018 Updated id to 1.0.9a1 tagging release after last changes from Danuta
Andrea   23/10/2018 Updated id to 1.0.9 Main release for Oct 22
Andrea   18/10/2018 Updated id to 1.0.8 Main release for Oct 19
Andrea   09/10/2018 Updated id to 1.0.8a1 After main commissioning Oct
Andrea   25/09/2018 Updated id to 1.0.7b7 Candidate for PSO updated new period
Andrea   20/09/2018 Updated id to 1.0.7b6 To make a tag version with last changes from Danuta and Alex (QC params)
Andrea   18/09/2018 Updated id to 1.0.7b5 To make a tag version with last changes from Danuta and Alex (QC params)
Andrea   05/09/2018 Updated id to 1.0.7b4 To make a tag version with last changes from Danuta and Alex (frame saturation, problems venus, orderdef and stack size)
Andrea   03/09/2018 Updated id to 1.0.7b3 To make a tag version with last changes from Danuta (last Friday 31 August) for frame saturation
Andrea   07/08/2018 Updated id to 1.0.7b2 To make a tag version with last changes to be used as reference
Andrea   07/07/2018 Updated id to 1.0.7b1 For Paranal commissioning end
Andrea   29/06/2018 Updated id to 1.0.7a9 For Paranal commissioning
Andrea   27/06/2018 Updated id to 1.0.7a8 To fix some problems on Ubunto revealed by sanity checks
Andrea   18/06/2018 Updated id to 1.0.7a7 for internal release 
Andrea   25/05/2018 Updated id to 1.0.7a6 
Andrea   21/05/2018 Updated id to 1.0.7a5 
Andrea   21/04/2018 Updated id to 1.0.7a4 at end of com4 in preparation of Paranal release
Andrea   21/04/2018 Updated id to 1.0.7a2 in preparation of Paranal
Andrea   18/04/2018 Updated id to 1.0.7a1 for Delivery 18 April 2018
Andrea   13/03/2018 Updated id for DFS02018 (same as b5)
Andrea   12/03/2018 Updated id to prepare DFS02018 (same as b4)
Andrea   06/03/2018 Updated id to tag during com3 Danuta updates for MULTIMR
Andrea   05/03/2018 Updated id to tag during com3 Danuta updates for MULTIMR
Andrea   04/03/2018 Updated id to tag during com3
Andrea   02/03/2018 Updated id to tag during com3
Andrea   01/03/2018 Updated id to tag during com3 to remove pointing to DRS and RBSConfiguration.properties
Andrea   01/03/2018 Updated id to tag during com3 to include bug fix on eff_ab recipe
Andrea   22/02/2018 Updated id to tag new version before com3
Andrea   15/02/2018 Updated id to tag new version before com3
Andrea   23/01/2018 Updated id to tag new version before com2
Andrea   18/01/2018 Updated id to test new version with  some fixes on workflow
Andrea   10/01/2018 Updated id to test new version with DFS
Andrea   22/12/2017 Updated id to test new workflow
Andrea   18/12/2017 Updated id to test new workflow
Andrea   14/12/2017 Updated id After com1
Danuta   05/12/2017 Changed the GAIN KW name to CONAD, to reflect the reality
                    Changed the led_ff recoep behaviour, to not to abort when too any pixels in the oputput,
                    only set the CONAD = 0.0
Andrea   03/12/2017 Updated id to reflect Danuta's changes and create new RPM
Andrea   02/12/2017 Updated id to reflect Danuta's changes and create new RPM
Danuta	 01/12/2017 The patch for ORDERDEF had to be generalized per fibre and per order.
                    The inst_config was update daccordingly, and so the code.
Andrea   01/12/2017 Updated id to reflect Danuta's changes and create new RPM
Danuta   27/11/2017 Due to the shift of orders on the CCD, an additional order appeared for fibre B on the BLUE CCD.
                    The patch with a parameter was applied to the orderdef recipe to not detect this order.
                    Later on this parameter will be moved to the inst_config files.
Andrea   23/11/2017 Updated id to test RPM creation with (partially) cleaned espdr-calib
Andrea   21/11/2017 Updated id to test RPM creation with recent support till flat of HR21 and UHR
Andrea   17/11/2017 Updated id with Reflex updated
Andrea   16/11/2017 Updated id to be able to tag release corresponding to SVN version 211595
Andrea   07/11/2017 Updated id to reflect changes and later create a tagged version/SVN
Danuta   07/11/2017 Updated orderdef to fix problems on order tracing (to be verified on more data) 
Andrea   28/10/2017 Updated version to 1.0.3a9 to test kit and RPM creation
Andrea   26/10/2017 Updated version to 1.0.3a8 to test kit and RPM creation
Andrea   13/10/2017 Updated version to 1.0.3a6 to reflect fixes of RP_SEARCHED_LINE_TABLE_FP_FP PRO.CATG
Andrea   11/10/2017 Updated version to 1.0.3a5 to reflect updated OCA and GSL & ERFA dependency
Andrea   10/10/2017 Updated version to 1.0.3a4 to reflect updated OCA and Reflex
Andrea   10/10/2017 Updated version to 1.0.3a3 to reflect updated product PRO.CATGs (and expected recipe input tags) from Danuta
Andrea   09/10/2017 Updated version to 1.0.3a2 to reflect updated configure.ac to properly check GSL and ERFA installation dirs
Andrea   09/10/2017 Updated version to 1.0.3a1 to reflect updated OCA rules and Reflex
Andrea   06/10/2017 Updated version to 1.0.2 To reflect fix of ASCII ref table input now changed to FITS
asegovia 03/10/2017 Updated version to 1.0.1 September 30th release:
- Recipes parameters migrated to _inst_config_*.fits files.
- WAVE recipes implemented.
- Drit calculation included on sci_red, drift matrix image and drift results
table included, drift correction pending. 
Andrea 29/09/2017 Updated version to 1.0.1b7 to reflect minor changes made on unit tests to make them compile
Andrea 27/09/2017 Updated version to 1.0.1b6 to reflect minor changes made on libbepop Makefile.am for RPM creation
Andrea 25/09/2017 Updated version to 1.0.1b3 to reflect minor changes made on libbepop cfg files
Andrea 25/09/2017 Changes on BEPOP config files to allow build with new autotools
Andrea 19/09/2017 Updated version to 1.0.1b2 to reflect minor changes made on libbepop cfg files to allow build on paranal machine (old autotools)
Andrea 18/09/2017 Updated version to 1.0.1b1 to make a tag after merging bepop branch 
Andrea 18/09/2017 Updated version to 1.0.1b 
Andrea 16/09/2017 Updated version to 1.0.1a1 to test rpm generation
Danuta 17/07/2017
Added background information for error computation in simple extraction, changed in:
- espdr/espdr_extraction.c
- espdr/espdr_extraction.h
- espdr/espdr_flat.c
- espdr/espdr_wave.c
- espdr/espdr_contam.c
- espdr/espdr_eff_ab.c
- espdr/espdr_flux.c
- espdr/espdr_science.c
Changed the extraction input to the background subtracted image in:
- espdr/espdr_extraction.c
- espdr/espdr_flat.c
- espdr/espdr_wave.c
- espdr/espdr_contam.c
- espdr/espdr_eff_ab.c
- espdr/espdr_flux.c
- espdr/espdr_science.c


Andrea 15/05/2017 updated reflex workflows for ESPRESSO
Andrea 03/03/2017 updated id to 0.6.0
Andrea 25/02/2017 updated id to 0.5.2
Danuta 21/02/2017
Danuta 15/02/2017
Andrea updated id to 0.5.0
Danuta 07/02/2017
Added the possibility to extract the order slices separately.
In order to to this, the instrument configuration files had to be changed.
Also the .rc files are now split between HARPS and ESPRESSO.

Andrea 31/01/2017 Updated version to 0.4.5b3, to include Reflex interactivity
Andrea 14/12/2016 Updated version to 0.4.5b2, to include changes requested from Alex: rename espdr_skip.xml-->espdr_standard.xml, remove 2015 HARPS files, remove Bias actor in espdr_standard.xml
Andrea 22/11/2016 Updated version to 0.4.5b1, in order to create an svn branch to implement new BEPOP dependency
Andrea 10/11/2016 Updated version to 0.4.5, cleaned workflow, updated oca rules, updated reflex demo data set
Andrea 03/11/2016 Added reflex workflows to run full chain (or skip some steps)
Andrea 13/09/2016
Changed version to 0.4.1 to make some checks of rpm creation
Danuta 28/07/2016
Error was triggered in the extraction function when less orders were detected then nominal. Corrected in the Horne and simple extraction functions.
Extraction window for wave changed to 8 (was 9) in the wave.rc
The limit for correct orders is now >= min_y_distance, instead of > min_y_distance.
min_y_distance = 3 in the inst_config file, corrected in the function 
espdr_number_valid_orders_one_image().

Danuta 24/06/2016
Correction in espdr_dark.c, function espdr_stack_sigma:
 - the outputs management was not correct, always the same output was taken, it is corrected now.
In espdr_overscan.c, in functions espdr_overscan & espdr_remove_overscan
- revert to the version before Andrea’s simplification, since the simplification is wrong.

ASE/AMO increased espdrp version to 0.4.0 which contains the TAG modicated from 
ABS_EFF ABS_EFF_A

Andrea 24/03/2016 Updated ID to prepare next release
Alex 02/12/2015
Updated to last BEPOP version:
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 180559)
+++ Makefile.am	(working copy)
@@ -57,12 +57,12 @@
 # */
 # /*-----------------------------------------------------------------*/

-SUBDIRS = calceph-2.2.20150504 src src/tests src/examples
+SUBDIRS = calceph-2.2.4 src src/tests src/examples doc
 # ACLOCAL_AMFLAGS = -I m4

 nobase_dist_pkgdata_DATA =
 nobase_dist_pkgdata_DATA += data/ephemerides/inpop13c_TDB_m100_p100_tt.dat
-nobase_dist_pkgdata_DATA += data/eop/eopc04_IAU2000.62-now.20150611
+nobase_dist_pkgdata_DATA += data/eop/eopc04_IAU2000.62-now.20150922
 nobase_dist_pkgdata_DATA += data/eop/download_EOP_hpiers.sh

 EXTRA_DIST = COPYING_CECILL_B.LIB COPYING_CECILL_C.LIB COPYING_CECILL_V2.LIB
NEWS readme.txt
@@ -70,6 +70,8 @@
 EXTRA_DIST += src/erfa/sofa_deriver.py src/erfa/update_ERFA.sh

 install-data-hook:
-	$(LN_S) -f
	$(DESTDIR)$(pkgdatadir)/data/eop/eopc04_IAU2000.62-now.20150611
$(DESTDIR)$(pkgdatadir)/data/eop/eopc04_IAU2000.62-now
+	$(LN_S) $(DESTDIR)$(pkgdatadir)/data/eop/eopc04_IAU2000.62-now.20150922
$(DESTDIR)$(pkgdatadir)/data/eop/eopc04_IAU2000.62-now
 updateEOPs:
 	(cd $(DESTDIR)$(pkgdatadir)/data/eop && bash download_EOP_hpiers.sh)
+uninstall-hook:
+	rm -f $(DESTDIR)$(pkgdatadir)/data/eop/eopc04_IAU2000.62-now
Index: configure.ac
===================================================================
--- configure.ac	(revision 180559)
+++ configure.ac	(working copy)
@@ -62,7 +62,7 @@

 dnl configuration file for BEPOP

-AC_INIT([bepop], [0.0.20150620], [herve.manche@obspm.fr])
+AC_INIT([bepop], [0.0.20150928], [herve.manche@obspm.fr])

 ## Verification que .configure n'est pas execute "dans le vide" (p64)
 AC_CONFIG_SRCDIR([src/bepop.c])
@@ -72,10 +72,7 @@


 ## Pour la creation de bibliotheques
-
-# for non-POSIX archivers like the one on OS X
-# use m4_ifdef to work on older automake (1.11)
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+AM_PROG_AR
 LT_INIT

 AM_INIT_AUTOMAKE([foreign -Wall -Werror subdir-objects])
@@ -90,6 +87,12 @@
 AM_PROG_CC_C_O

 AC_CONFIG_HEADERS([bepopconfig.h])
-AC_CONFIG_FILES([Makefile src/Makefile src/tests/Makefile
src/examples/Makefile])
-AC_CONFIG_SUBDIRS([calceph-2.2.20150504])
+AC_CONFIG_FILES([src/bepop.h Makefile src/Makefile src/tests/Makefile
src/examples/Makefile doc/Makefile])
+AC_CONFIG_SUBDIRS([calceph-2.2.4])
+
+AX_SPLIT_VERSION
+AC_SUBST([BEPOP_VERSION_MAJOR],[$AX_MAJOR_VERSION])
+AC_SUBST([BEPOP_VERSION_MINOR],[$AX_MINOR_VERSION])
+AC_SUBST([BEPOP_VERSION_PATCH],[$AX_POINT_VERSION])
+
 AC_OUTPUT
Index: data/eop/download_EOP_hpiers.sh
===================================================================
--- data/eop/download_EOP_hpiers.sh	(revision 180559)
+++ data/eop/download_EOP_hpiers.sh	(working copy)
@@ -1,7 +1,8 @@
 # !/bin/bash
 # Script to download the Earth Orientation Parameters (EOP)
 # from http://hpiers.obspm.fr/iers/eop/eopc04/eopc04_IAU2000.62-now
-# The script doesn't do anything if the file is up to date
+# The script doesn't download the file if it exists already
+# The script updates the symbolic link eopc04_IAU2000.62-now

 # Date definition
 strDate=`date '+%Y%m%d'` # && echo ${strDate}
@@ -10,6 +11,9 @@
 fileName="eopc04_IAU2000.62-now.${strDate}"
 if [ ! -e ./${fileName} ] ; then # if file doesn't exist
   wget -O ${fileName} hpiers.obspm.fr/iers/eop/eopc04/eopc04_IAU2000.62-now #
Download latest values
+fi
+
+if [ -e ./${fileName} ] ; then # if file exists
   ln -fs ${fileName} eopc04_IAU2000.62-now # update the symbolic link
 fi

Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 180559)
+++ src/Makefile.am	(working copy)
@@ -61,43 +61,43 @@

 lib_LTLIBRARIES = libbepop.la

-LIST_FILES_ERFA= ./erfa/v20150209/erfa.h ./erfa/v20150209/erfam.h \
-                 ./erfa/v20150209/utctai.c ./erfa/v20150209/dat.c \
-                 ./erfa/v20150209/taitt.c \
-                 ./erfa/v20150209/jd2cal.c ./erfa/v20150209/cal2jd.c \
-                 ./erfa/v20150209/s00.c ./erfa/v20150209/era00.c \
-                 ./erfa/v20150209/c2ixys.c ./erfa/v20150209/tttai.c \
-                 ./erfa/v20150209/xys00a.c ./erfa/v20150209/xys00b.c \
-                 ./erfa/v20150209/xys06a.c ./erfa/v20150209/ttut1.c \
-                 ./erfa/v20150209/rxr.c ./erfa/v20150209/c2tcio.c \
-                 ./erfa/v20150209/taiutc.c ./erfa/v20150209/sp00.c \
-                 ./erfa/v20150209/pom00.c ./erfa/v20150209/s06.c \
-                 ./erfa/v20150209/fad03.c ./erfa/v20150209/pnm06a.c \
-                 ./erfa/v20150209/ir.c ./erfa/v20150209/ry.c \
-                 ./erfa/v20150209/pnm00a.c ./erfa/v20150209/pnm00b.c \
-                 ./erfa/v20150209/falp03.c ./erfa/v20150209/rz.c \
-                 ./erfa/v20150209/bpn2xy.c ./erfa/v20150209/rx.c \
-                 ./erfa/v20150209/anp.c ./erfa/v20150209/cr.c \
-                 ./erfa/v20150209/pfw06.c ./erfa/v20150209/fw2m.c \
-                 ./erfa/v20150209/pn00a.c ./erfa/v20150209/pn00b.c \
-                 ./erfa/v20150209/cp.c ./erfa/v20150209/pn00.c \
-                 ./erfa/v20150209/bp00.c ./erfa/v20150209/pr00.c \
-                 ./erfa/v20150209/numat.c ./erfa/v20150209/bi00.c \
-                 ./erfa/v20150209/dtf2d.c ./erfa/v20150209/tttdb.c \
-                 ./erfa/v20150209/dtdb.c  \
-                 ./erfa/v20150209/rxp.c  \
-                 ./erfa/v20150209/zp.c  \
-                 ./erfa/v20150209/gd2gc.c ./erfa/v20150209/gd2gce.c  \
-                 ./erfa/v20150209/eform.c \
-                 ./erfa/v20150209/fal03.c ./erfa/v20150209/faf03.c \
-                 ./erfa/v20150209/faom03.c ./erfa/v20150209/fave03.c \
-                 ./erfa/v20150209/fae03.c ./erfa/v20150209/fapa03.c \
-                 ./erfa/v20150209/obl80.c ./erfa/v20150209/nut00a.c \
-                 ./erfa/v20150209/nut00b.c ./erfa/v20150209/obl06.c \
-                 ./erfa/v20150209/fame03.c ./erfa/v20150209/fama03.c\
-                 ./erfa/v20150209/faju03.c ./erfa/v20150209/fasa03.c \
-                 ./erfa/v20150209/faur03.c ./erfa/v20150209/nut06a.c \
-                 ./erfa/v20150209/s2c.c ./erfa/v20150209/c2s.c
+LIST_FILES_ERFA= ./erfa/v20150209_a/erfa.h ./erfa/v20150209_a/erfam.h \
+                 ./erfa/v20150209_a/utctai.c ./erfa/v20150209_a/dat.c \
+                 ./erfa/v20150209_a/taitt.c \
+                 ./erfa/v20150209_a/jd2cal.c ./erfa/v20150209_a/cal2jd.c \
+                 ./erfa/v20150209_a/s00.c ./erfa/v20150209_a/era00.c \
+                 ./erfa/v20150209_a/c2ixys.c ./erfa/v20150209_a/tttai.c \
+                 ./erfa/v20150209_a/xys00a.c ./erfa/v20150209_a/xys00b.c \
+                 ./erfa/v20150209_a/xys06a.c ./erfa/v20150209_a/ttut1.c \
+                 ./erfa/v20150209_a/rxr.c ./erfa/v20150209_a/c2tcio.c \
+                 ./erfa/v20150209_a/taiutc.c ./erfa/v20150209_a/sp00.c \
+                 ./erfa/v20150209_a/pom00.c ./erfa/v20150209_a/s06.c \
+                 ./erfa/v20150209_a/fad03.c ./erfa/v20150209_a/pnm06a.c \
+                 ./erfa/v20150209_a/ir.c ./erfa/v20150209_a/ry.c \
+                 ./erfa/v20150209_a/pnm00a.c ./erfa/v20150209_a/pnm00b.c \
+                 ./erfa/v20150209_a/falp03.c ./erfa/v20150209_a/rz.c \
+                 ./erfa/v20150209_a/bpn2xy.c ./erfa/v20150209_a/rx.c \
+                 ./erfa/v20150209_a/anp.c ./erfa/v20150209_a/cr.c \
+                 ./erfa/v20150209_a/pfw06.c ./erfa/v20150209_a/fw2m.c \
+                 ./erfa/v20150209_a/pn00a.c ./erfa/v20150209_a/pn00b.c \
+                 ./erfa/v20150209_a/cp.c ./erfa/v20150209_a/pn00.c \
+                 ./erfa/v20150209_a/bp00.c ./erfa/v20150209_a/pr00.c \
+                 ./erfa/v20150209_a/numat.c ./erfa/v20150209_a/bi00.c \
+                 ./erfa/v20150209_a/dtf2d.c ./erfa/v20150209_a/tttdb.c \
+                 ./erfa/v20150209_a/dtdb.c  \
+                 ./erfa/v20150209_a/rxp.c  \
+                 ./erfa/v20150209_a/zp.c  \
+                 ./erfa/v20150209_a/gd2gc.c ./erfa/v20150209_a/gd2gce.c  \
+                 ./erfa/v20150209_a/eform.c \
+                 ./erfa/v20150209_a/fal03.c ./erfa/v20150209_a/faf03.c \
+                 ./erfa/v20150209_a/faom03.c ./erfa/v20150209_a/fave03.c \
+                 ./erfa/v20150209_a/fae03.c ./erfa/v20150209_a/fapa03.c \
+                 ./erfa/v20150209_a/obl80.c ./erfa/v20150209_a/nut00a.c \
+                 ./erfa/v20150209_a/nut00b.c ./erfa/v20150209_a/obl06.c \
+                 ./erfa/v20150209_a/fame03.c ./erfa/v20150209_a/fama03.c\
+                 ./erfa/v20150209_a/faju03.c ./erfa/v20150209_a/fasa03.c \
+                 ./erfa/v20150209_a/faur03.c ./erfa/v20150209_a/nut06a.c \
+                 ./erfa/v20150209_a/s2c.c ./erfa/v20150209_a/c2s.c


 libbepop_la_SOURCES = vec_utils.c vec_utils.h \
@@ -111,11 +111,11 @@

 libbepop_la_CPPFLAGS =
 # Needs to include erfa.h and erfam.h
-libbepop_la_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209
+libbepop_la_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209_a
 # Needs to include calceph.h
-libbepop_la_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.20150504/src
+libbepop_la_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.4/src
 # To let the C sources know  where the data files (ephemeris and eop) are
 # installed
 libbepop_la_CPPFLAGS += -D_DATAINSTALLDIRECTORY='"$(pkgdatadir)/data"'

-libbepop_la_LIBADD = $(top_builddir)/calceph-2.2.20150504/src/libcalceph.la
+libbepop_la_LIBADD = $(top_builddir)/calceph-2.2.4/src/libcalceph.la

Index: src/bepop.c
===================================================================
--- src/bepop.c	(revision 180559)
+++ src/bepop.c	(working copy)
@@ -127,16 +127,25 @@
  * typeInit = 3 : less precise (simplified nutations, no EOPs taken into
  * account)
 */
   /* Local variables */
+  const char * dirEphem = "%s/ephemerides/%s" ;
+  const char * fileEOPs = "%s/eop/eopc04_IAU2000.62-now" ;
   char *ephemerisFileFullName ;
   char *EOPsFileFullName ;

+
   /* Location of the default ephemeris file */
-  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATAINSTALLDIRECTORY)+13+strlen(_DEFAULT_EPHEMERIS_FILE_NAME) ));
-  sprintf(ephemerisFileFullName,"%s/ephemerides/%s", _DATAINSTALLDIRECTORY,
   _DEFAULT_EPHEMERIS_FILE_NAME);
+  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
strlen(_DATAINSTALLDIRECTORY)
+                                                      +strlen(dirEphem)
+
+strlen(_DEFAULT_EPHEMERIS_FILE_NAME)
+                                                      +1 ));
+  sprintf(ephemerisFileFullName,dirEphem, _DATAINSTALLDIRECTORY,
_DEFAULT_EPHEMERIS_FILE_NAME);

+
   /* Location of the default EOPs file */
-  EOPsFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATAINSTALLDIRECTORY)+5+strlen("eopc04_IAU2000.62-now") ));
-  sprintf(EOPsFileFullName,"%s/eop/eopc04_IAU2000.62-now",
   _DATAINSTALLDIRECTORY);
+  EOPsFileFullName = (char*)malloc(sizeof(char)*( strlen(_DATAINSTALLDIRECTORY)
+                                                 +strlen(fileEOPs)
+                                                 +1 ));
+  sprintf(EOPsFileFullName,fileEOPs, _DATAINSTALLDIRECTORY);

   if (ptrBEPOP!=NULL)
   {
@@ -245,9 +254,6 @@
     FatalError("Name of ephemeris file missing in
BEPOP_initEphemeris",__FILE__,__LINE__) ;
   }

-  /* initialize the name of the file*/
-  strcpy(ptrBEPOP->EphemFile,FileName);
-
   /* if necessary, free memory if the pointer was already allocated */
   if (ptrBEPOP->PTR_eph!=NULL)
   {
@@ -254,6 +260,9 @@
     BEPOP_closeEphemeris(ptrBEPOP) ; ptrBEPOP->PTR_eph=NULL;
   }

+  /* initialize the name of the file*/
+  strcpy(ptrBEPOP->EphemFile,FileName);
+
   /* initialize the pointer to the ephemeris */
   ptrBEPOP->PTR_eph = calceph_open(ptrBEPOP->EphemFile);
   if (ptrBEPOP->PTR_eph==NULL) FatalError("Unable to affect pointer to
ephemeris",
@@ -528,7 +537,7 @@
   int j ;
   /*double ERFA_DJ00 is defined in erfam.h (J2000.0) */

-  /* is ephemeris correctly opened */
+  /* is the ephemeris file correctly opened */
   if (ptrBEPOP->PTR_eph==NULL) FatalError("Ephemeris not
initilized",__FILE__,__LINE__) ;
   test=calceph_compute(ptrBEPOP->PTR_eph, ERFA_DJ00, 0.0, 3, 12, vec6);
   if (!test) FatalError("Ephemeris file does not contains the BSS-Earth vector
at J2000.0",
@@ -656,7 +665,6 @@
   @param delta_J2000 (in): declinaison of target at J2000 in ICRF (in degree)
   @param mua(in): proper motion in right ascension (arcsec/year)
   @param mud(in): proper motion in declinaison (arcsec/year)
-
   @param year (in): year of the observation
   @param month (in): month of the observation
   @param day (in): day of the observation
@@ -724,7 +732,6 @@
   @param delta_J2000 (in): declinaison of target at J2000 in ICRF (in degree)
   @param mua(in): proper motion in right ascension (arcsec/year)
   @param mud(in): proper motion in declinaison (arcsec/year)
-
   @param JulianDay_TT[2] (in);  julian day (Terrestrial Time), in two parts
   @param StationLongitude (in): longitude of the station, positive East (in
degree)
   @param StationLongitude (in): longitude of the station, positive East (in
degree)
Index: src/bepop.h
===================================================================
--- src/bepop.h	(revision 180559)
+++ src/bepop.h	(working copy)
@@ -67,6 +67,18 @@
 #define BEPOP_H


+/*----------------------------------------------------------------------------------------------*/
+/* definition of the BePOP library version */
+/*----------------------------------------------------------------------------------------------*/
+/*! version : major number of BePOP library */
+#define BEPOP_VERSION_MAJOR 0
+/*! version : minor number of BePOP library */
+#define BEPOP_VERSION_MINOR 0
+/*! version : patch number of BePOP library */
+#define BEPOP_VERSION_PATCH 20150928
+
+
+
 typedef struct strucParamBEPOPprivate typeParamBEPOP;


@@ -110,8 +122,6 @@
                           const typeParamBEPOP *ptrBEPOP,
                           typeOutBEPOP *outBEPOP);

-void BEPOP_closeEphemeris(typeParamBEPOP *ptrBEPOP);
-void BEPOP_closeEOPs(typeParamBEPOP *ptrBEPOP);
 typeParamBEPOP* BEPOP_close(typeParamBEPOP *ptrBEPOP) ;
 double BEPOP_getGMSun(const typeParamBEPOP *ptrBEPOP);
 double BEPOP_getGMEarth(const typeParamBEPOP *ptrBEPOP);
Index: src/bepopinternal.h
===================================================================
--- src/bepopinternal.h	(revision 180559)
+++ src/bepopinternal.h	(working copy)
@@ -111,6 +111,8 @@
 struct strucParamBEPOPprivate * BEPOP_initDefault2(const char
*EphemerisFileName,
                                          const char *EOPsFileName, const int
typeInit,
                                          struct strucParamBEPOPprivate
*ptrBEPOP);
+void BEPOP_closeEphemeris(struct strucParamBEPOPprivate *ptrBEPOP);
+void BEPOP_closeEOPs(struct strucParamBEPOPprivate *ptrBEPOP);

 #endif

Index: src/examples/Makefile.am
===================================================================
--- src/examples/Makefile.am	(revision 180559)
+++ src/examples/Makefile.am	(working copy)
@@ -57,19 +57,22 @@
 # */
 # /*-----------------------------------------------------------------*/

-AUTOMAKE_OPTIONS =
+AUTOMAKE_OPTIONS = serial-tests
 ACLOCAL_AMFLAGS = -I m4

 AM_CPPFLAGS = -I$(top_srcdir)/src
-AM_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209
-AM_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.20150504/src
+AM_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209_a
+AM_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.4/src
+# Needs to include bepop.h (built in $(top_builddir)/src from
$(top_srcdir)/src/bepop.h.in)
+AM_CPPFLAGS += -I$(top_builddir)/src
 AM_CPPFLAGS += -D_DATA_TARGZ_DIRECTORY='"$(top_srcdir)/data"'

-LDADD = $(top_builddir)/calceph-2.2.20150504/src/libcalceph.la
$(top_builddir)/src/libbepop.la
+LDADD = $(top_builddir)/calceph-2.2.4/src/libcalceph.la
$(top_builddir)/src/libbepop.la

-noinst_PROGRAMS = genresfile genresfile_jd example1 example2
+noinst_PROGRAMS = genresfile genresfile_jd example1 example2 example3

 genresfile_SOURCES = genresfile.c computeandprint.h
 genresfile_jd_SOURCES = genresfile_jd.c computeandprint.h
 example1_SOURCES = example1.c
 example2_SOURCES = example2.c
+example3_SOURCES = example3.c
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 180559)
+++ src/tests/Makefile.am	(working copy)
@@ -57,7 +57,7 @@
 # */
 # /*-----------------------------------------------------------------*/

-AUTOMAKE_OPTIONS =
+AUTOMAKE_OPTIONS = serial-tests
 ACLOCAL_AMFLAGS = -I m4

 AM_CPPFLAGS =
@@ -64,13 +64,15 @@
 #To include bepop.h and bepopinternal.h:
 AM_CPPFLAGS += -I$(top_srcdir)/src
 #To include erfa.h and erfam.h
-AM_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209
+AM_CPPFLAGS += -I$(top_srcdir)/src/erfa/v20150209_a
 #To include calceph.h
-AM_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.20150504/src
+AM_CPPFLAGS += -I$(top_srcdir)/calceph-2.2.4/src
+# Needs to include bepop.h (built in $(top_builddir)/src from
$(top_srcdir)/src/bepop.h.in)
+AM_CPPFLAGS += -I$(top_builddir)/src
 # to define where data file are available before installation
 AM_CPPFLAGS += -D_DATA_TARGZ_DIRECTORY='"$(top_srcdir)/data"'

-LDADD = $(top_builddir)/calceph-2.2.20150504/src/libcalceph.la
$(top_builddir)/src/libbepop.la
+LDADD = $(top_builddir)/calceph-2.2.4/src/libcalceph.la
$(top_builddir)/src/libbepop.la

 check_PROGRAMS = test_bidon test1 test2
 test_bidon_SOURCES = test_bidon.c
@@ -81,5 +83,5 @@

 $(check_PROGRAMS): eopc04_IAU2000.62-now
 eopc04_IAU2000.62-now:
-	$(LN_S) $(top_srcdir)/data/eop/eopc04_IAU2000.62-now.20150611
	eopc04_IAU2000.62-now
+	$(LN_S) $(top_srcdir)/data/eop/eopc04_IAU2000.62-now.20150922
eopc04_IAU2000.62-now

Index: src/tests/test1.c
===================================================================
--- src/tests/test1.c	(revision 180559)
+++ src/tests/test1.c	(working copy)
@@ -89,6 +89,9 @@

   FILE *referenceFile;

+  const char * dir_ephem = "%s/ephemerides/%s" ;
+  const char * file_check = "%s/checkfiles/check1.txt" ;
+
   /* structure containing the output of BEPOP_compute routine */
   typeOutBEPOP resBEPOP ;

@@ -96,8 +99,11 @@

   res = 0 ;
   /* Location of the default ephemeris file */
-  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATA_TARGZ_DIRECTORY)+14+strlen(_DEFAULT_EPHEMERIS_FILE_NAME) ));
-  sprintf(ephemerisFileFullName,"%s/ephemerides/%s", _DATA_TARGZ_DIRECTORY,
   _DEFAULT_EPHEMERIS_FILE_NAME);
+  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
strlen(_DATA_TARGZ_DIRECTORY)
+                                                      +strlen(dir_ephem)
+
+strlen(_DEFAULT_EPHEMERIS_FILE_NAME)
+                                                      +1 ));
+  sprintf(ephemerisFileFullName,dir_ephem, _DATA_TARGZ_DIRECTORY,
_DEFAULT_EPHEMERIS_FILE_NAME);

   /* Initialisation of the pointer */
   ptrBEPOP=BEPOP_initDefault2(ephemerisFileFullName,"eopc04_IAU2000.62-now",1,ptrBEPOP)
;
@@ -104,8 +110,9 @@
   BEPOP_checkInit( ptrBEPOP);

   /* Open the file containing the results */
-  resultsFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATA_TARGZ_DIRECTORY)+13+strlen("check1.txt") ));
-  sprintf(resultsFileFullName,"%s/checkfiles/%s", _DATA_TARGZ_DIRECTORY,
   "check1.txt");
+  resultsFileFullName = (char*)malloc(sizeof(char)*(
strlen(_DATA_TARGZ_DIRECTORY)
+
+strlen(file_check)+1 ));
+  sprintf(resultsFileFullName,file_check, _DATA_TARGZ_DIRECTORY);
   if (  (referenceFile = fopen(resultsFileFullName,"r"))==NULL  )
   {
     printf("Error: cannot open file '%s'\n",resultsFileFullName);
@@ -119,7 +126,8 @@
   {
     fscanf(referenceFile, "%d %d %d %d %d %lf", &year, &month, &day, &hour,
&minute, &second);
     fscanf(referenceFile, "%lf", &TimeToMidExposure);
-    fscanf(referenceFile, "%lf %lf %lf %lf",
     &RightAscension,&Declinaison,&ProperMotionRightAscension,&ProperMotionDeclinaison);
+    fscanf(referenceFile, "%lf %lf %lf %lf", &RightAscension,&Declinaison,
+
&ProperMotionRightAscension,&ProperMotionDeclinaison);
     fscanf(referenceFile, "%lf %lf %lf",
&StationLongitude,&StationLatitude,&StationAltitude);
     fscanf(referenceFile, "%lf %lf %lf %lf %lf", &BERV, &BERVMX, &BTLA, &BOV,
&SED);
     if (feof(referenceFile))
Index: src/tests/test2.c
===================================================================
--- src/tests/test2.c	(revision 180559)
+++ src/tests/test2.c	(working copy)
@@ -86,6 +86,8 @@
   int res ;

   FILE *referenceFile;
+  const char * dir_ephem = "%s/ephemerides/%s" ;
+  const char * file_check = "%s/checkfiles/check2.txt" ;

   /* structure containing the output of BEPOP_compute routine */
   typeOutBEPOP resBEPOP ;
@@ -92,8 +94,11 @@

   res = 0 ;
   /* Location of the default ephemeris file */
-  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATA_TARGZ_DIRECTORY)+14+strlen(_DEFAULT_EPHEMERIS_FILE_NAME) ));
-  sprintf(ephemerisFileFullName,"%s/ephemerides/%s", _DATA_TARGZ_DIRECTORY,
   _DEFAULT_EPHEMERIS_FILE_NAME);
+  ephemerisFileFullName = (char*)malloc(sizeof(char)*(
strlen(_DATA_TARGZ_DIRECTORY)
+                                                      +strlen(dir_ephem)
+
+strlen(_DEFAULT_EPHEMERIS_FILE_NAME)
+                                                      +1 ));
+  sprintf(ephemerisFileFullName,dir_ephem, _DATA_TARGZ_DIRECTORY,
_DEFAULT_EPHEMERIS_FILE_NAME);

   /* Initialisation of the pointer */
   ptrBEPOP=BEPOP_initDefault2(ephemerisFileFullName,"eopc04_IAU2000.62-now",1,ptrBEPOP)
;
@@ -100,8 +105,9 @@
   BEPOP_checkInit( ptrBEPOP);

   /* Open the file containing the results */
-  resultsFileFullName = (char*)malloc(sizeof(char)*(
   strlen(_DATA_TARGZ_DIRECTORY)+13+strlen("check2.txt") ));
-  sprintf(resultsFileFullName,"%s/checkfiles/%s", _DATA_TARGZ_DIRECTORY,
   "check2.txt");
+  resultsFileFullName = (char*)malloc(sizeof(char)*(
strlen(_DATA_TARGZ_DIRECTORY)
+                                                    +strlen(file_check)+1 ));
+  sprintf(resultsFileFullName,file_check, _DATA_TARGZ_DIRECTORY);
   if (  (referenceFile = fopen(resultsFileFullName,"r"))==NULL  )
   {
     printf("Error: cannot open file '%s'\n",resultsFileFullName);
@@ -114,7 +120,8 @@
   while (!feof(referenceFile))
   {
     fscanf(referenceFile, "%lf %lf", &JulianDay_TT[0], &JulianDay_TT[1]);
-    fscanf(referenceFile, "%lf %lf %lf %lf",
     &RightAscension,&Declinaison,&ProperMotionRightAscension,&ProperMotionDeclinaison);
+    fscanf(referenceFile, "%lf %lf %lf %lf", &RightAscension,&Declinaison,
+
&ProperMotionRightAscension,&ProperMotionDeclinaison);
     fscanf(referenceFile, "%lf %lf %lf",
&StationLongitude,&StationLatitude,&StationAltitude);
     fscanf(referenceFile, "%lf %lf %lf %lf %lf", &BERV, &BERVMX, &BTLA, &BOV,
&SED);
     if (feof(referenceFile))

Danuta 21/07/2015
Source code of the old version of the led_ff added to the SVN.
It is not under compilation.

Danuta 20/07/2015
espdr_led_ff replaced by espdr_led_ff2, ancient espdr_led_ff removed.

Danuta 20/07/2015
espdr_mdark replaced by espdr_mdark2, ancient espdr_mdark removed.

Danuta 20/07/2015
espdr_mbias replaced by espdr_mbias2, ancient espdr_mbias removed.

Danuta 16/07/2015
Most memory leaks are cleaned.

Danuta 02/07/2015
All the QC KWs added for the WAVE recipe.

Danuta 01/07/2015
WAVE recipe almost completed, working for all the three wavelength sources: THAR, LFC and FP. Things still to be done:
- drift function to be coded
- QC CHECK KWs to be added

Danuta 26/06/2015
espdr_fit_raw_lines finished.

Danuta 18/06/2015
espdr_correct_lamp_offset written, not fully tested.

Danuta 15/06/2015
espdr_create_res_map finished

Danuta 12/06/2015
espdr_create_res_map partially coded and tested.

Danuta 11/06/2015
espdr_fit_lines, espdr_lines_qc & espdr_filter_lines finished and tested.

Danuta 09/06/2015
espdr_fit_ll_sol - finished & shortly tested
espdr_wave_QC - partly finished & shortly tested

Danuta 04/06/2015
Added functions to espdr_wave: espdr_fit_ll_sol & espdr_wave_QC.
Code compiles but results are not correct - to be tested.

Danuta 22/05/2015
Function espdr_filter_lines added to espdr_wave recipe. Not fully tested.

Andrea 20/05/2015 Updated to 0.3.0
Andrea 30/04/2015 Updated hdrl dependency to 0.2.0 (to reduce compilation warnings)
Danuta 02/04/2015
The espdr_fit_lines function completed for all the wave source types: THAR, FP and LC.

Danuta 30/03/2015
Function espdr_fit_lines completed without pixel geometry.
Reading RDB wave table and saving RDB LINES_TABLE.

Danuta 13/03/2015
Added treatment of ORDER_PROFILE by fibre.
HARPS_CCD_geometry changed.

Danuta 10/03/2015
Function espdr_assign_comb_wavelengths completed.

Danuta 04/03/2015
Function espdr_search_lines completed.
Product LINE_TABLE_FIBER is created.

Danuta 24/02/2015
The optimal (Horne) extraction with contamination correction finished.

Danuta 17/02/2015
The optimal (Horne) extraction added to the espdr_wave recipe.


Alex 17/02/2015
Background computation adde in the espdr_mflat recipe.

Danuta 26/01/2015
Memory leaks in espdrp_simple_extraction_one_fibre() removed.

Danuta 23/01/2015
espdr_create_saturation_mask corrected.

Danuta 22/01/2015
The simple extraction finished in the espdr_wave recipe.

Danuta 16/01/2015
All the configuration files and sof files are added to espdrp/espdr_reg/

Danuta 15/01/2015
Start if the WAVE recipe: cleaning form the detector signature and the beginning of simple extraction.

Danuta 15/01/2015
Code cleaned from part of warning, still a lot of warnings because of use of deprecated functions.
Some unity tests are not passing.

Andrea 18/12/2014 Updated to version 0.2.1 to tag it with reference latest commits from consortium

Andrea 25/11/2014 "changed default compiler options to -O0 in order to be able to run dark and lef-ff recipe on linux and mac"

Andrea 25/11/2014 Updated id to 0.2.0 and set SVN tag

Danuta 24/11/2014
The orderdef recipe corrected according to CLO tests:
- the CCD configuration is now split between instruments
- several parameters were added to the instrument configuration table
- orders physical numbers were aded to the keywords
- the cpl_polynomial_fit was replaced by the GSL polynomial fit, because the cpl one does not treat errors


Danuta 14/11/2014
The orderdef recipe finished.
- The order profile fit is done with GSL Levenberg-Marquardt for N gaussians
- The hot, bad pixels and cosmics are removed from the fitting
- The errors are computed according to the RON for each output

Andrea 27/10/2014 Updated configure id to 0.1.8

Danuta 20/10/2014
The instrument configuration file added.
One order brought back.
The multi-slices fit still to be coded.

Danuta 02/09/2014
According to Andrea, header is corrected.
MAD_SIGMA_CONVERT_FACTOR replaced by  CPL_MATH_STD_MAD.

Danuta-29/08/2014
espdr_orderdef:
Added all the QC KWs on max flux, nb of orders, orders position and orders residuals stdev.
The Primary header non-hierarchical KWs are wrong in the second product frame,
they stay the same as in the first one.
Added params of sigma clipping of residuals to the recipe parameters. 

Andrea-29/07/2014
Updated id to 0.1.7

Danuta-29/07/2014
espdr_orderdef:
Orders positions fitted with polynomials; coeffs of polynomials saved in the FITS table extension of the orders map FITS frames.
The only fit on the orders shape is the Gaussian. The n-gaussian and fat-top have still to be added.
There’s no yet the QC parameters computed.

Danuta-28/07/2014
espdr_orderdef:
Orders found, numbered and bisector computed.
Problem with fitting a polynomial on the orders.

Andrea-30/06/2014
First version of espdr_mbias2 and espdr_mdark2 to save RAM.
Bias recipe gives same results on HARPS data (with same input rc file)
Dark recipe has still some small diffs

Danuta-25/06/2014
The branch 0.1.5-devel merged into the main trunk.
The new version is 0.1.6

Danuta-23/06/2014
espdr_orderdef:
Geometry correction added: turn & flip. Orders are horizontal and start at the bottom
Orders identified and saved in a frame. They are not numbered yet.

Danuta-17/06/2014
espdr_orderdef:
CCD signature removed: bais, dark, gain applied.
Still geometry to be corrected.

Danuta-13/06/2014
Set ID to 0.1.5
Danuta-30/05/2014
espdr_led_ff:
The coordinates of the gain windows were moved to the static FITS table.

Danuta-28/05/2014
espdr_mbias:
KSTest removed - it can’t be used on discret data with repeating values.
It is replaced by the test on mean and std dev of residuals.

Danuta-14/05/2014
espdrp_mbias:
- RON & MEAN are computed using sigma_clipping to eliminate the hot/cold pixels
- the new set of parameters espdr_mbias.stats_* was added

Danuta-13/05/2014
Small corrections in espdr_mbias & espdr_mdark.
espdr_mbias:
- QC BIAS RON KW was treated as integer - corrected to double
- changed the computation of BIAS RON
- added [ADU] in the KWs comments (RON & MEAN KWs)
espdr_mdark:
- added [ADU] in the KWs comments (MEAN)

Danuta-05/05/2014
Incorporated all the AMO changes from branch to the main trunk, 
except putting the function espdr_parameters_BIAS_get() static.
The new version is: 0.1.4

Danuta-04/04/2014
Wrong hot pixels image size - corrected.
Wrong probability computation in the KS_Test - corrected.

Danuta-03/04/2014
espdr_mdark recipe with the new CCD config is working with even more memory leaks that the bias…

Danuta-01/04/2014
espdr_mbias recipe with the new CCD config is working with a lot of memory leaks
(It is not a Prima Aprilis…)

Danuta-26/03/2014
First version with the new CCD configuration table. 
Compiling, not working.

Danuta-25/02/2014
The division of images for the bad pixel computation done manually.
The cpl_image_divide() function doesn’t take care of pixels with value 0.0.
All the pixels with flux < 100 are rejected as dead pixels.

Danuta-22/02/2014
Corrected the espdr_correct_bias function
- split the image into outputs for master bias correction
Corrected the gain computation
- wrong input images, should be raw led_ff images

Danuta-13/02/2014
Added the gain commutation on windows for espdr_led_ff - not tested
The led_ff.rc has to contain the gain windows coordinates for each output.

Danuta-07/02/2014
Next DRS release: espdrp-0.1.2
Contains:
- recipe espdr_led_ff
- unit test: espdr_bad_pixels-test

Danuta-05/02/2014
The led_ff recipe finished. It is not fully tested, neither time optimised.

Danuta-04/02/2014
The led_ff recipe almost done, still need to finish the QC KWs computation.
In addition to the previous version it does:
- compute the gain
- evaluate the flux
- compute the GAIN, MIN_FLUX & MAX_FLUX KWs per output

Danuta-24/01/2014
The led-ff recipe in progress. It does:
- check of exposure times
- split of the input frames into frame sets according to the exposure time
- framesets are sorted according to the exposure time
- a master frame is computed for each exposure time and cosmics removed
- bad pixels map is created from the first two master frames
- the bad pixel product is archived with some QC keywords


Danuta-19/12/2013
Bug corrected in recipes/espdr_mdark.c
Wrong image list was saved in the master dark product

The led_ff recipe started. It does:
- the check of exposure times in the input frames (there should be at least twice 5 frames with the same Texp)
- bias correction on all input frames
- sigma-stacking of all input frames
- merging the obtained master
- saving the master product


Danuta-18/12/2013
CPL_VERSION_CODE check removed from unitary tests
espdr_led_ff recipe added, but for now it is just a copy of the mark recipe

Danuta-11/12/2013
New version: espdrp-0.1.1
Corrections of AIs raised on the first espdrp release espdrp-0.1.0
DRL-010-A1: compilation warnings removed.
DRL-010-A2: Added more clear comments
DRL-010-A3: Man page corrected
DRL-010-A4: Correction not needed
DRL-010-A5: Corrected behaviour, when less the 5 raw bias input frames; for the rest waiting for ESO to clarify the possibilities
DRL-010-A6: Added range check to the input parameters
DRL-010-A7: Range control for Ksigma added
DRL-010-A8: Default for bias_correction_method added
DRL-010-A9: Better error message added
DRL-010-A10: Parameters help clarified
DRL-010-A15: Comments added to keywords
DRL-010-A19: Keyword names corrected according to the document
DRL-010-A22: Code refactored
DRL-010-A23: Code refactored (except for the sigma clipping method type)
DRL-010-A26: espdr_mbias man page corrected
DRL-010-A27: espdr_mdark man page corrected
DRL-010-A29: Memory leaks in espdr_mdark fixed
