fors_flat_normalise.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #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