COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_sensors.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_SENSORS_H_
18 #define _SUTRA_SENSORS_H_
19 
20 #include <carma_utils.h>
21 #include <sutra_telescope.h>
22 #include <sutra_utils.h>
23 #include <sutra_wfs.h>
24 #include <sutra_wfs_pyr_pyrhr.h>
25 #include <sutra_wfs_sh.h>
26 
27 #include <map>
28 #include <vector>
29 
30 using std::map;
31 using std::string;
32 using std::vector;
33 
34 class SutraSensors {
35  public:
36  int device;
37  bool roket;
39  size_t nsensors() { return d_wfs.size(); }
40  vector<SutraWfs *> d_wfs;
41  map<vector<int>, cufftHandle *> campli_plans;
42  map<vector<int>, cufftHandle *> fttotim_plans;
43  map<vector<int>, cufftHandle *> ftlgskern_plans;
44  map<vector<int>, cufftHandle *> field_stop_plans;
45 
51 
52  public:
54  vector<string> type, int nwfs, long *nxsub, long *nvalid,
55  long *npupils, long *npix, long *nphase, long *nrebin,
56  long *nfft, long *ntot, long *npup, float *pdiam, float *nphot,
57  float *nphot4imat, int *lgs, bool *fakecam, int *max_flux_per_pix,
58  int *max_pix_value, int device, bool roket);
60 
62  int define_mpi_rank(int rank, int size);
63  int set_noise(int nwfs, float noise, long seed);
64  int set_field_stop(int nwfs, float* field_stop, int N);
65 
66  int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop,
67  long *size, float *noise, long *seed, float *G, float *thetaML,
68  float *dx, float *dy);
69  int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop,
70  long *size, float *noise, float *G, float *thetaML, float *dx,
71  float *dy);
72  int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop,
73  long *size, float *G, float *thetaML, float *dx, float *dy);
74 };
75 
76 // General utilities
77 
78 #endif // _SUTRA_SENSORS_H_
this file provides tools to CarmaObj
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides the sensors features to COMPASS
Definition: sutra_sensors.h:34
int set_field_stop(int nwfs, float *field_stop, int N)
map< vector< int >, cufftHandle * > ftlgskern_plans
Definition: sutra_sensors.h:43
CarmaObj< cuFloatComplex > * d_camplifoc
Definition: sutra_sensors.h:47
map< vector< int >, cufftHandle * > field_stop_plans
Definition: sutra_sensors.h:44
CarmaObj< float > * d_lgskern
Definition: sutra_sensors.h:50
int allocate_buffers()
map< vector< int >, cufftHandle * > fttotim_plans
Definition: sutra_sensors.h:42
CarmaObj< cuFloatComplex > * d_camplipup
Definition: sutra_sensors.h:46
SutraSensors(CarmaContext *context, SutraTelescope *d_tel, vector< string > type, int nwfs, long *nxsub, long *nvalid, long *npupils, long *npix, long *nphase, long *nrebin, long *nfft, long *ntot, long *npup, float *pdiam, float *nphot, float *nphot4imat, int *lgs, bool *fakecam, int *max_flux_per_pix, int *max_pix_value, int device, bool roket)
int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop, long *size, float *noise, long *seed, float *G, float *thetaML, float *dx, float *dy)
int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop, long *size, float *noise, float *G, float *thetaML, float *dx, float *dy)
CarmaContext * current_context
Definition: sutra_sensors.h:38
size_t nsensors()
Definition: sutra_sensors.h:39
CarmaObj< cuFloatComplex > * d_fttotim
Definition: sutra_sensors.h:48
CarmaObj< cuFloatComplex > * d_ftlgskern
Definition: sutra_sensors.h:49
int define_mpi_rank(int rank, int size)
map< vector< int >, cufftHandle * > campli_plans
Definition: sutra_sensors.h:41
int initgs(float *xpos, float *ypos, float *lambda, float *mag, float zerop, long *size, float *G, float *thetaML, float *dx, float *dy)
vector< SutraWfs * > d_wfs
Definition: sutra_sensors.h:40
int set_noise(int nwfs, float noise, long seed)
this class provides the telescope features to COMPASS