COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_centroider_bpcog.h
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_CENTROIDER_BPCOG_H_
18 #define _SUTRA_CENTROIDER_BPCOG_H_
19 
20 #include <sutra_centroider.h>
21 
22 template <class Tin, class T>
23 class SutraCentroiderBpcog : public SutraCentroider<Tin, T> {
24  public:
25  int nmax;
28 
29  public:
31  float offset, float scale, bool filter_TT, int device,
32  int nmax);
35 
36  string get_type();
37 
38  int init_nmax(int nmax);
39  int set_nmax(int nmax);
40 
41  int get_cog(float *cube, float *intensities, T *centroids, int nvalid,
42  int npix, int ntot, cudaStream_t stream=0);
43  int get_cog(float *intensities, T *slopes, bool noise);
44  int get_cog();
45 };
46 template <class T>
47 void get_centroids(int size, int threads, int blocks, int n, float *d_idata,
48  T *d_odata, T *ref, int *validx, int *validy,
49  float *intensities, int nbpix, float scale, float offset,
51  CarmaDevice *device);
52 
53 template <class T>
54 void subap_sortmax(int threads, int blocks, T *d_idata, T *d_odata,
55  unsigned int *values, int nmax, CarmaDevice *device);
56 template <class T>
57 void subap_bpcentro(int threads, int blocks, int npix, T *d_idata,
58  unsigned int *values, T *d_odata, float scale,
59  float offset);
60 
61 #endif // _SUTRA_CENTROIDER_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
CarmaObj< uint > * d_bpind
int init_nmax(int nmax)
SutraCentroiderBpcog(CarmaContext *context, SutraWfs *wfs, long nvalid, float offset, float scale, bool filter_TT, int device, int nmax)
int get_cog(float *intensities, T *slopes, bool noise)
SutraCentroiderBpcog(const SutraCentroiderBpcog &centroider)
int set_nmax(int nmax)
int get_cog(float *cube, float *intensities, T *centroids, int nvalid, int npix, int ntot, cudaStream_t stream=0)
this class provides the centroider features to COMPASS
this class provides the wfs features to COMPASS
Definition: sutra_wfs.h:35
SlopeOrder
SlopeOrder slope_order(std::size_t value)
void get_centroids(int size, int threads, int blocks, int n, float *d_idata, T *d_odata, T *ref, int *validx, int *validy, float *intensities, float scale, float offset, SlopeOrder slope_order, CarmaDevice *device, cudaStream_t stream=0)