COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_telescope.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2023 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 
7 // -----------------------------------------------------------------------------
8 
16 
17 #ifndef _SUTRA_TELESCOPE_H_
18 #define _SUTRA_TELESCOPE_H_
19 
20 #include <carma.h>
21 #include <sutra_phase.h>
22 #include <map>
23 #include <string>
24 #include <vector>
25 
26 using std::string;
27 
29  public:
31  int device; // device #
32 
33  long pup_size; // size of pupil
34  long num_eleme_pup; // number of points in the pupil
35 
36  CarmaObj<float> *d_pupil; // the pupil mask
37  CarmaObj<float> *d_phase_ab_M1; // the phase aberration for M1
38 
39  long pup_size_m; // size of pupil
40 
41  CarmaObj<float> *d_pupil_m; // the pupil mask
42  CarmaObj<float> *d_phase_ab_M1_m; // the phase aberration for M1
43 
44  CarmaObj<float> *d_input_phase; // Circular buffer of phase screens to be played
45  int input_phase_counter; // Current input phase screen in the circular buffer
46 
47 
48  public:
50  float *pupil, long pup_size_m, float *pupil_m);
52  int set_phase_ab_M1(float *phase_ab_M1, int size);
53  int set_phase_ab_M1_m(float *phase_ab_M1_m, int size);
63  int set_input_phase(float *input_phase, int size, int N);
77 };
78 
79 #endif // _SUTRA_TELESCOPE_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides the telescope features to COMPASS
CarmaContext * current_context
CarmaObj< float > * d_pupil_m
int update_input_phase()
Update input_phase_counter to take the next phase screen in the circular buffer d_input_phase.
int set_phase_ab_M1_m(float *phase_ab_M1_m, int size)
int reset_input_phase()
Reset circular buffer d_input_phase.
SutraTelescope(CarmaContext *context, long pup_size, long num_eleme_pup, float *pupil, long pup_size_m, float *pupil_m)
CarmaObj< float > * d_phase_ab_M1_m
CarmaObj< float > * d_input_phase
int set_input_phase(float *input_phase, int size, int N)
Set a 3D cube of phase screens to be played. Each phase screen is shown to sources as an additional l...
CarmaObj< float > * d_phase_ab_M1
CarmaObj< float > * d_pupil
int set_phase_ab_M1(float *phase_ab_M1, int size)