 |
COMPASS
5.0.0
End-to-end AO simulation tool using GPU acceleration
|
Go to the documentation of this file.
43 #ifndef _SUTRA_CENTROIDER_H_
44 #define _SUTRA_CENTROIDER_H_
50 template <
class Tin,
class Tout>
88 template <
typename Q = Tout>
89 typename std::enable_if<std::is_same<Q, float>::value,
int>::type
90 apply_TT_filter_impl(Tout *centroids, std::true_type);
91 int apply_TT_filter_impl(Tout *centroids, std::false_type);
110 int load_img(Tin *img,
int m,
int n,
int location);
120 virtual int get_cog(
float *img,
float *intensities, Tout *centroids,
121 int nvalid,
int npix,
int ntot, cudaStream_t stream=0) = 0;
122 virtual int get_cog(
float *intensities, Tout *slopes,
bool noise) = 0;
126 int calibration(Tin *img_raw,
float *img_cal,
float *dark,
float *flat,
int *lutPix,
int N,
129 template <
typename T>
135 #endif // _SUTRA_CENTROIDER_H_
int set_dark(float *dark, int n)
virtual int get_cog(float *intensities, Tout *slopes, bool noise)=0
int apply_TT_filter(Tout *centroids)
CarmaObj< float > * d_centro_filtered
CarmaObj< int > * d_validx
SutraCentroider(CarmaContext *context, SutraWfs *wfs, long nvalid, float offset, float scale, bool filter_TT, int device)
int set_scale(float scale)
int set_offset(float offset)
CarmaObj< float > * d_dark
int convert_centro(T *d_odata, T *d_idata, float offset, float scale, int N, CarmaDevice *device)
CarmaObj< float > * d_ref_Tilt
CarmaObj< int > * d_validy
this class provides the wfs features to COMPASS
CarmaObj< Tout > * d_centroids_ref
int set_lutPix(int *lutPix, int n)
int load_img(Tin *img, int m, int n, int location)
CarmaObj< int > * d_validMask
int set_flat(float *flat, int n)
virtual int get_cog(float *img, float *intensities, Tout *centroids, int nvalid, int npix, int ntot, cudaStream_t stream=0)=0
CarmaObj< float > * d_flat
int load_img(Tin *img, int n, int location)
int init_img_raw(int m, int n)
int fill_validMask(int size, int npix, int blocks, int *d_validMask, int *validx, int *validy, CarmaDevice *device)
int init_calib(int n, int m)
CarmaContext * current_context
int load_validpos(int *ivalid, int *jvalid, int N)
this class provides the context in which CarmaObj are created
this class provides the centroider features to COMPASS
virtual string get_type()=0
CarmaObj< float > * d_img
bool is_type(string typec)
CarmaObj< float > * d_TT_slopes
int calibration(Tin *img_raw, float *img_cal, float *dark, float *flat, int *lutPix, int N, CarmaDevice *device, cudaStream_t stream=0)
int load_img(CarmaObj< Tin > *img)
int load_img(Tin *img, int n)
int calibrate_img(cudaStream_t stream)
CarmaObj< float > * d_intensities
CarmaObj< float > * d_ref_Tip
int set_centroids_ref(float *centroids_ref)
CarmaObj< Tout > * d_bincube
CarmaObj< int > * d_lutPix
CarmaObj< Tin > * d_img_raw
virtual ~SutraCentroider()