fors_flat_normalise.h

00001 /* $Id: fors_flat_normalise.h,v 1.3 2013-09-09 12:14:12 cgarcia Exp $
00002  *
00003  * This file is part of the VIMOS Pipeline
00004  * Copyright (C) 2002-2010 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00019  */
00020 
00021 /*
00022  * $Author: cgarcia $
00023  * $Date: 2013-09-09 12:14:12 $
00024  * $Revision: 1.3 $
00025  * $Name: not supported by cvs2svn $
00026  */
00027 
00028 #ifndef FORS_FLAT_NORMALISE_H
00029 #define FORS_FLAT_NORMALISE_H
00030 
00031 #include <cpl.h>
00032 #include "mosca_image.h"
00033 #include "fors_detected_slits.h"
00034 #include "wavelength_calibration.h"
00035 
00036 namespace fors
00037 {
00038 
00039 class flat_normaliser
00040 {
00041     
00042 public:
00043 
00044     flat_normaliser();
00045     ~flat_normaliser();
00046     
00047     int mos_normalise(mosca::image& flat, 
00048                       const mosca::wavelength_calibration& wave_cal,
00049                       cpl_image *spatial, 
00050                       cpl_table *slits, cpl_table *polytraces, 
00051                       double blue, double red, 
00052                       double dispersion,
00053                       int spa_smooth_radius, int disp_smooth_radius, 
00054                       int spa_fit_polyorder, int disp_fit_nknots,
00055                       double fit_threshold);
00056     
00057     int lss_normalise(mosca::image& flat, 
00058                       const mosca::wavelength_calibration& wave_cal,
00059                       int spa_smooth_radius, int disp_smooth_radius, 
00060                       int spa_fit_polyorder, int disp_fit_nknots,
00061                       double fit_threshold);
00062 
00063     const mosca::image& get_normalisation_image() const;
00064     
00065     const std::vector<std::vector<float> >& get_wave_profiles() const;
00066     
00067     std::vector<float> get_wave_profiles_norm(double mflat_exptime,
00068                                               const std::vector<float>& slit_widths,
00069                                               const std::vector<float>& slit_lengths) const;
00070     
00071     cpl_image * get_wave_profiles_im() const;
00072 
00073     cpl_image * get_wave_profiles_im_mapped(const fors::detected_slits& det_slits,
00074                                             const mosca::wavelength_calibration& wave_cal,
00075                                             double firstLambda, 
00076                                             double lastLambda, 
00077                                             double dispersion) const;
00078 
00079     static int get_middle_slit_valid_calib
00080        (const mosca::wavelength_calibration& wave_cal, 
00081         int slit_end_pos, int slit_begin_pos);
00082 
00083 private:
00084     
00085     mosca::image m_normalisation_image;
00086     
00087     std::vector<std::vector<float> > m_wave_profiles;
00088     
00089     std::vector<float> m_wave_profiles_norm;
00090     
00091 };
00092 
00093 }
00094 
00095 #endif   /* FORS_FLAT_NORMALISE_H */

Generated on 12 Feb 2016 for FORS Pipeline Reference Manual by  doxygen 1.6.1