COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
sutra_acquisim.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-2019 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 // Distributed under GNU - LGPL
7 //
8 // COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
9 // General Public License as published by the Free Software Foundation, either version 3 of the License,
10 // or any later version.
11 //
12 // COMPASS: End-to-end AO simulation tool using GPU acceleration
13 // The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.
14 //
15 // The final product includes a software package for simulating all the critical subcomponents of AO,
16 // particularly in the context of the ELT and a real-time core based on several control approaches,
17 // with performances consistent with its integration into an instrument. Taking advantage of the specific
18 // hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to
19 // conduct large simulation campaigns called to the ELT.
20 //
21 // The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components
22 // of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and
23 // various systems configurations such as multi-conjugate AO.
24 //
25 // COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
26 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 // See the GNU Lesser General Public License for more details.
28 //
29 // You should have received a copy of the GNU Lesser General Public License along with COMPASS.
30 // If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
31 // -----------------------------------------------------------------------------
32 
41 
42 #ifndef SUTRA_ACQUISIM_H_
43 #define SUTRA_ACQUISIM_H_
44 
45 #include <sutra_sensors.h>
46 #include <sutra_wfs_sh.h>
47 
49  public:
50  int device;
51  string type;
52  long nxsub;
53  long nvalid;
54  long npix;
55 
57 
61 
62  public:
63  SutraAcquisim(SutraSensors *sensors, int wfs_num);
64  SutraAcquisim(const SutraAcquisim &acquisim);
66 
67  int set_validsubs(int64_t nvalid, int32_t *validsubsx, int32_t *validsubsy);
68 
69  int comp_image_tele(long *dims, float *bimage);
70  int comp_image(long *dims, float *bimage);
71  int comp_image(long *dims, float *bimage, CarmaObj<float> *d_bincube);
72  int comp_image_2D(long *dims, float *bimage, int *num_ssp);
73 
74  private:
75 };
76 
77 // General utilities
78 template <class T>
79 int fillbincube_2D(T *bimage, T *bcube, int npix, int nsub, int *valid);
80 
81 template <class T>
82 int fillbincube(T *bimage, T *bcube, int npix, int nsub, int Nsub, int *ivalid,
83  int *jvalid, CarmaDevice *device);
84 
85 template <class T>
87  CarmaObj<T> *bcube, int npix, int nsub, int Nsub,
88  int *ivalid, int *jvalid, CarmaDevice *device);
89 
90 template <class T>
91 int fillbincube_async(CarmaHostObj<T> *image_telemetry, T *bimage, T *bcube,
92  int npix, int nsub, int Nsub, int *ivalid, int *jvalid,
93  int nim, CarmaDevice *device);
94 
95 #endif /* SUTRA_ACQUISIM_H_ */
CarmaDevice
Definition: carma_context.h:57
SutraAcquisim::comp_image
int comp_image(long *dims, float *bimage)
fillbincube
int fillbincube(T *bimage, T *bcube, int npix, int nsub, int Nsub, int *ivalid, int *jvalid, CarmaDevice *device)
SutraAcquisim
this class provides the acquisition simulator to COMPASS
Definition: sutra_acquisim.h:48
SutraAcquisim::wfs
SutraWfsSH * wfs
Definition: sutra_acquisim.h:58
SutraAcquisim::nvalid
long nvalid
Definition: sutra_acquisim.h:53
SutraAcquisim::d_validsubsx
CarmaObj< int32_t > * d_validsubsx
Definition: sutra_acquisim.h:59
SutraAcquisim::npix
long npix
Definition: sutra_acquisim.h:54
SutraAcquisim::set_validsubs
int set_validsubs(int64_t nvalid, int32_t *validsubsx, int32_t *validsubsy)
SutraAcquisim::device
int device
Definition: sutra_acquisim.h:50
SutraAcquisim::comp_image
int comp_image(long *dims, float *bimage, CarmaObj< float > *d_bincube)
SutraAcquisim::current_context
CarmaContext * current_context
Definition: sutra_acquisim.h:56
CarmaStreams
this class provides the stream features to CarmaObj
Definition: carma_streams.h:49
sutra_sensors.h
SutraAcquisim::SutraAcquisim
SutraAcquisim(SutraSensors *sensors, int wfs_num)
CarmaObj< int32_t >
SutraAcquisim::type
string type
Definition: sutra_acquisim.h:51
CarmaContext
this class provides the context in which CarmaObj are created
Definition: carma_context.h:104
sutra_wfs_sh.h
SutraAcquisim::~SutraAcquisim
~SutraAcquisim()
CarmaHostObj
this class provides wrappers to the generic carma host object
Definition: carma_host_obj.h:68
SutraAcquisim::comp_image_2D
int comp_image_2D(long *dims, float *bimage, int *num_ssp)
SutraSensors
this class provides the sensors features to COMPASS
Definition: sutra_sensors.h:59
SutraWfsSH
this class provides the wfs_sh features to COMPASS
Definition: sutra_wfs_sh.h:54
SutraAcquisim::d_validsubsy
CarmaObj< int32_t > * d_validsubsy
Definition: sutra_acquisim.h:60
fillbincube_async
int fillbincube_async(CarmaStreams *streams, CarmaObj< T > *bimage, CarmaObj< T > *bcube, int npix, int nsub, int Nsub, int *ivalid, int *jvalid, CarmaDevice *device)
SutraAcquisim::comp_image_tele
int comp_image_tele(long *dims, float *bimage)
SutraAcquisim::SutraAcquisim
SutraAcquisim(const SutraAcquisim &acquisim)
fillbincube_2D
int fillbincube_2D(T *bimage, T *bcube, int npix, int nsub, int *valid)
SutraAcquisim::nxsub
long nxsub
Definition: sutra_acquisim.h:52