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
00029
00030
00031 #ifndef APLUSPLUS_RECONSTRUCTOR_H
00032 #define APLUSPLUS_RECONSTRUCTOR_H
00033
00034 #include "zernike_projected_zonal_reconstructor.h"
00035
00036 namespace Arroyo {
00037
00045
00046 class a_plusplus_reconstructor :
00047 public zernike_projected_zonal_reconstructor,
00048 public Arroyo::pixel_array<double> {
00049
00050 private:
00051
00052 static const bool factory_registration;
00053
00056 std::string unique_name() const {return(std::string("A++ reconstructor"));};
00057
00058 protected:
00059
00069 std::map<int, std::pair<char, std::vector<long> > > reconstructor_to_zernike_mode_map;
00070
00073 a_plusplus_reconstructor(){};
00074
00075 public:
00076
00079 a_plusplus_reconstructor(const a_plusplus_reconstructor & appr);
00080
00083 a_plusplus_reconstructor(const char * filename);
00084
00107 a_plusplus_reconstructor(const char * APP_zonal_reconstructor_file,
00108 int nactuators, int nslopes);
00109
00148 a_plusplus_reconstructor(const char * APP_zonal_reconstructor_file,
00149 int nactuators, int nslopes,
00150 const char * APP_zernike_reconstructor_file,
00151 int nzernike_modes);
00152
00155 a_plusplus_reconstructor(const Arroyo::iofits & iof);
00156
00159 ~a_plusplus_reconstructor(){};
00160
00163 a_plusplus_reconstructor & operator=(const a_plusplus_reconstructor & appr);
00164
00167 void read(const char * filename);
00168
00171 void read(const Arroyo::iofits & iof);
00172
00175 void write(const char * filename) const;
00176
00179 void write(Arroyo::iofits & iof) const;
00180
00183 void print(std::ostream & os, const char * prefix="") const;
00184
00188 vector<long> get_centroid_axes() const;
00189
00193 vector<long> get_actuator_axes() const;
00194
00203 Arroyo::zernike get_zernike_modes() const;
00204
00211 void reconstruct_zernike_residuals(const Arroyo::Shack_Hartmann_centroids & shcentroids,
00212 Arroyo::zernike & znke) const;
00213
00217 void reconstruct_zonal_residuals(const Arroyo::Shack_Hartmann_centroids & shcentroids,
00218 Arroyo::pixel_array<double> & pixarr) const;
00219
00227 void reconstruct_residuals(const Arroyo::Shack_Hartmann_centroids & shcentroids,
00228 Arroyo::zernike & znke,
00229 Arroyo::pixel_array<double> & pixarr) const;
00230 };
00231
00232
00233 }
00234
00235 #endif