COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_centroider_corr.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_CORR_H_
19 #define _SUTRA_CENTROIDER_CORR_H_
20 
21 #include <sutra_centroider.h>
22 
23 template <class Tin, class T>
24 class SutraCentroiderCorr : public SutraCentroider<Tin, T> {
25  public:
34 
35  public:
37  float offset, float scale, bool filter_TT, int device);
40 
41  string get_type();
42  int fill_bincube(T *img);
43 
44  int init_corr(int isizex, int isizey, T *interpmat);
45  int load_corr(T *corr, T *corr_norm, int ndim);
46 
47  int get_cog(float *cube, float *intensities, T *centroids, int nvalid,
48  int npix, int ntot, cudaStream_t stream=0);
49  int get_cog(float *intensities, T *slopes, bool noise);
50  int get_cog();
51 };
52 
53 template <class T>
54 void subap_sortmaxi(int threads, int blocks, T *d_idata, int *values, int nmax,
55  int offx, int offy, int npix, int Npix);
56 template <class T>
57 void subap_pinterp(int threads, int blocks, T *d_idata, int *values,
58  T *d_centroids, T *d_matinterp, int sizex, int sizey,
59  int nvalid, int Npix, float scale, float offset);
60 
61 template <class Tcu, class T>
62 int fillcorr(Tcu *d_out, T *d_in, int npix_in, int npix_out, int N, int nvalid,
63  CarmaDevice *device);
64 
65 template <class T>
66 int correl(T *d_odata, T *d_idata, int N, CarmaDevice *device);
67 
68 template <class Tcu, class T>
69 int roll2real(T *d_odata, Tcu *d_idata, int n, int Npix, int N,
70  CarmaDevice *device);
71 
72 template <class T>
73 int corr_norm(T *d_odata, T *d_idata, int Npix, int N, CarmaDevice *device);
74 
75 #endif // _SUTRA_CENTROIDER_CORR_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides the centroider_corr features to COMPASS
int init_corr(int isizex, int isizey, T *interpmat)
SutraCentroiderCorr(CarmaContext *context, SutraWfs *wfs, long nvalid, float offset, float scale, bool filter_TT, int device)
int load_corr(T *corr, T *corr_norm, int ndim)
SutraCentroiderCorr(const SutraCentroiderCorr &centroider)
int get_cog(float *intensities, T *slopes, bool noise)
CarmaObj< cuFloatComplex > * d_corrspot
CarmaObj< T > * d_corrnorm
CarmaObj< int > * d_corrmax
CarmaObj< T > * d_interpmat
int fill_bincube(T *img)
CarmaObj< cuFloatComplex > * d_corrfnct
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
int correl(T *d_odata, T *d_idata, int N, CarmaDevice *device)
int corr_norm(T *d_odata, T *d_idata, int Npix, int N, CarmaDevice *device)
int fillcorr(Tcu *d_out, T *d_in, int npix_in, int npix_out, int N, int nvalid, CarmaDevice *device)
int roll2real(T *d_odata, Tcu *d_idata, int n, int Npix, int N, CarmaDevice *device)
void subap_pinterp(int threads, int blocks, T *d_idata, int *values, T *d_centroids, T *d_matinterp, int sizex, int sizey, int nvalid, int Npix, float scale, float offset)
void subap_sortmaxi(int threads, int blocks, T *d_idata, int *values, int nmax, int offx, int offy, int npix, int Npix)