COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_centroider_wcog.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 
18 #ifndef _SUTRA_CENTROIDER_WCOG_H_
19 #define _SUTRA_CENTROIDER_WCOG_H_
20 
21 #include <sutra_centroider.h>
22 
23 template <class Tin, class T>
24 class SutraCentroiderWcog : public SutraCentroider<Tin, T> {
25  public:
26  float threshold;
28 
29  public:
31  float offset, float scale, bool filter_TT, int device);
34 
35  string get_type();
36 
38 
39  int init_weights();
40  int load_weights(float *weights, int ndim);
41 
42  int get_cog(float *cube, float *intensities, T *centroids, int nvalid,
43  int npix, int ntot, cudaStream_t stream=0);
44  int get_cog(float *intensities, T *slopes, bool noise);
45  int get_cog();
46 };
47 
48 template <class T>
49 void get_centroids(int size, int threads, int blocks, int n, float *d_idata,
50  T *d_odata, T *ref, int *validx, int *validy,
51  float *intensities, float *d_weights, float threshold, float scale,
52  float offset,
54  CarmaDevice *device);
55 
56 template <class T>
57 int fill_weights(T *d_out, T *d_in, int npix, int N, CarmaDevice *device);
58 #endif // _SUTRA_CENTROIDER_WCOG_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides the centroider features to COMPASS
this class provides the centroider_wcog features to COMPASS
int set_threshold(float threshold)
CarmaObj< float > * d_weights
int load_weights(float *weights, int ndim)
SutraCentroiderWcog(CarmaContext *context, SutraWfs *wfs, long nvalid, float offset, float scale, bool filter_TT, int device)
int get_cog(float *intensities, T *slopes, bool noise)
int get_cog(float *cube, float *intensities, T *centroids, int nvalid, int npix, int ntot, cudaStream_t stream=0)
SutraCentroiderWcog(const SutraCentroiderWcog &centroider)
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 *d_weights, float threshold, float scale, float offset, SlopeOrder slope_order, CarmaDevice *device)
int fill_weights(T *d_out, T *d_in, int npix, int N, CarmaDevice *device)