Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

arcadia_mcao_reconstructor.h

Go to the documentation of this file.
00001 /*
00002 Arroyo - software for the simulation of electromagnetic wave propagation
00003 through turbulence and optics.
00004 
00005 Copyright (c) 2000-2004 California Institute of Technology.  Written by
00006 Dr. Matthew Britton.  For comments or questions about this software,
00007 please contact the author at mbritton@astro.caltech.edu.
00008 
00009 This program is free software; you can redistribute it and/or modify it
00010 under the terms of the GNU General Public License as  published by the
00011 Free Software Foundation; either version 2 of the License, or (at your
00012 option) any later version.
00013 
00014 This program is provided "as is" and distributed in the hope that it
00015 will be useful, but WITHOUT ANY WARRANTY; without even the implied
00016 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  In no
00017 event shall California Institute of Technology be liable to any party
00018 for direct, indirect, special, incidental or consequential damages,
00019 including lost profits, arising out of the use of this software and its
00020 documentation, even if the California Institute of Technology has been
00021 advised of the possibility of such damage.   The California Institute of
00022 Technology has no obligation to provide maintenance, support, updates,
00023 enhancements or modifications.  See the GNU General Public License for
00024 more details.
00025 
00026 You should have received a copy of the GNU General Public License along
00027 with this program; if not, write to the Free Software
00028 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00029 */
00030 
00031 #ifndef ARCADIA_MCAO_RECONSTRUCTOR_H
00032 #define ARCADIA_MCAO_RECONSTRUCTOR_H
00033 
00034 #include <AO_sim_base.h>
00035 #include <pixel_array.h>
00036 #include <vector>
00037 #include "aperture.h"
00038 #include "refractive_atmosphere.h"
00039 #include "lenslet_array.h"
00040 #include "tip_tilt_mirror.h"
00041 #include "deformable_mirror.h"
00042 #include "zernike.h"
00043 #include "Shack_Hartmann_centroids.h"
00044  
00045 namespace Arroyo {
00046 
00050 
00051   class arcadia_mcao_reconstructor :
00052     public AO_sim_base {
00053 
00054     private:
00055 
00056     static const bool factory_registration;
00057 
00060     std::string unique_name() const {return(std::string("Arcadia MCAO reconstructor"));};
00061 
00062     protected:
00063 
00066     arcadia_mcao_reconstructor(){};
00067 
00068     Arroyo::circular_aperture circ_ap;
00069     Arroyo::refractive_atmospheric_model * ref_atm_model;
00070     std::vector<Arroyo::emitter *> guide_stars;
00071     std::vector<bool> tilt_removal_flags;
00072     std::vector<Arroyo::square_lenslet_array> lenslet_arrays;
00073     std::vector<Arroyo::ideal_tip_tilt_mirror<circular_aperture> > ttms;
00074     std::vector<Arroyo::ideal_deformable_mirror<circular_aperture> > dms;
00075     std::vector<std::string> slaving_files;
00076 
00077     Arroyo::pixel_array<double> mcao_reconstructor;
00078 
00079     public:
00080 
00083     arcadia_mcao_reconstructor(const arcadia_mcao_reconstructor & arcadia_mcao_recon);
00084 
00087     arcadia_mcao_reconstructor(const char * filename);
00088 
00091     arcadia_mcao_reconstructor(const Arroyo::iofits & iof);
00092 
00095     arcadia_mcao_reconstructor(const char * arcadia_input_file,
00096                                const char * arcadia_mcao_reconstructor_file);
00097 
00100     ~arcadia_mcao_reconstructor(){};
00101 
00104     arcadia_mcao_reconstructor & operator=(const arcadia_mcao_reconstructor & arcadia_mcao_recon);
00105 
00108     void read(const char * filename);
00109 
00112     void read(const Arroyo::iofits & iof);
00113 
00116     void write(const char * filename) const;
00117  
00120     void write(Arroyo::iofits & iof) const;
00121  
00124     void print(std::ostream & os, const char * prefix="") const;
00125 
00129     void reconstruct_zernike_residuals(const std::vector<Arroyo::Shack_Hartmann_centroids> & shcentroids, 
00130                                        std::vector<Arroyo::zernike> & znkes) const;
00131 
00135     void reconstruct_residuals(const std::vector<Arroyo::Shack_Hartmann_centroids> & shcentroids,
00136                                std::vector<Arroyo::zernike> & znke, 
00137                                std::vector<Arroyo::pixel_array<double> > & pixarrs) const;
00138 
00139     static int verbose_level;
00140   };
00141 
00142 
00143   // Slaving thresholds correspond to areal overlap of edge supapertures.  This may permit
00144   // us to utilize tiled primaries by computing areal overlap with hexagons.
00145   // 
00146   // We need a variable to pass along that specifies whether slaving should be nearest neighbor
00147   // or komolgorov extrapolation.  The example arcadia.in file uses the latter.
00148   void write_arcadia_input_file(const Arroyo::refractive_atmospheric_model & ref_atm_model,
00149                                 const Arroyo::circular_aperture & circ_ap,
00150                                 const std::vector<Arroyo::emitter *> & guide_stars,
00151                                 const std::vector<Arroyo::square_lenslet_array> & lenslet_arrays,
00152                                 const std::vector<bool> & tilt_removal_flags,
00153                                 const std::vector<Arroyo::ideal_tip_tilt_mirror<circular_aperture> > & ttms,
00154                                 const std::vector<Arroyo::ideal_deformable_mirror<circular_aperture> > & dms,
00155                                 const std::vector<double> & slaving_thresholds,
00156                                 const char * filename);
00157 
00158 }
00159 
00160 #endif

Generated on Thu Nov 29 17:16:28 2007 for arroyo by  doxygen 1.3.9.1