COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
SutraCentroider< Tin, Tout > Class Template Referenceabstract

this class provides the centroider features to COMPASS More...

#include <sutra_centroider.h>

Inheritance diagram for SutraCentroider< Tin, Tout >:
Collaboration diagram for SutraCentroider< Tin, Tout >:

Public Member Functions

virtual ~SutraCentroider ()
 
int set_scale (float scale)
 
int set_offset (float offset)
 
int set_dark (float *dark, int n)
 
int set_flat (float *flat, int n)
 
int set_lutPix (int *lutPix, int n)
 
int init_calib (int n, int m)
 
int init_roi (int N)
 
int set_centroids_ref (float *centroids_ref)
 
int calibrate_img ()
 
int calibrate_img (cudaStream_t stream)
 
int load_validpos (int *ivalid, int *jvalid, int N)
 
int set_npix (int npix)
 
int set_nxsub (int nxsub)
 
int load_img (Tin *img, int n)
 
int load_img (Tin *img, int n, int location)
 
int load_img (Tin *img, int m, int n, int location)
 
int load_img (CarmaObj< Tin > *img)
 
int init_img_raw (int m, int n)
 
int get_validMask ()
 
bool is_type (string typec)
 
int init_TT_filter ()
 
int apply_TT_filter (Tout *centroids)
 
virtual string get_type ()=0
 
virtual int get_cog (float *img, float *intensities, Tout *centroids, int nvalid, int npix, int ntot, cudaStream_t stream=0)=0
 
virtual int get_cog (float *intensities, Tout *slopes, bool noise)=0
 
virtual int get_cog ()=0
 

Public Attributes

int device
 
SutraWfswfs
 
int nvalid
 
int nslopes
 
int npix
 
int nxsub
 
bool filter_TT
 
float offset
 
float scale
 
CarmaContextcurrent_context
 
CarmaObj< Tout > * d_bincube
 
CarmaObj< float > * d_intensities
 
CarmaObj< Tout > * d_centroids_ref
 
CarmaObj< float > * d_img
 
CarmaObj< Tin > * d_img_raw
 
CarmaObj< float > * d_dark
 
CarmaObj< float > * d_flat
 
CarmaObj< int > * d_lutPix
 
CarmaObj< int > * d_validx
 
CarmaObj< int > * d_validy
 
CarmaObj< int > * d_validMask
 
CarmaObj< float > * d_centro_filtered
 
CarmaObj< float > * d_ref_Tip
 
CarmaObj< float > * d_ref_Tilt
 
CarmaObj< float > * d_TT_slopes
 

Protected Member Functions

 SutraCentroider (CarmaContext *context, SutraWfs *wfs, long nvalid, float offset, float scale, bool filter_TT, int device)
 

Detailed Description

template<class Tin, class Tout>
class SutraCentroider< Tin, Tout >

this class provides the centroider features to COMPASS

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.0.0
Date
2011/01/28

Definition at line 51 of file sutra_centroider.h.

Constructor & Destructor Documentation

◆ SutraCentroider()

template<class Tin , class Tout >
SutraCentroider< Tin, Tout >::SutraCentroider ( CarmaContext context,
SutraWfs wfs,
long  nvalid,
float  offset,
float  scale,
bool  filter_TT,
int  device 
)
protected

◆ ~SutraCentroider()

template<class Tin , class Tout >
virtual SutraCentroider< Tin, Tout >::~SutraCentroider ( )
virtual

Member Function Documentation

◆ apply_TT_filter()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::apply_TT_filter ( Tout *  centroids)

◆ calibrate_img() [1/2]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::calibrate_img ( )

Definition at line 103 of file sutra_centroider.h.

103 {return calibrate_img(0);};
Here is the caller graph for this function:

◆ calibrate_img() [2/2]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::calibrate_img ( cudaStream_t  stream)

◆ get_cog() [1/3]

◆ get_cog() [2/3]

template<class Tin , class Tout >
virtual int SutraCentroider< Tin, Tout >::get_cog ( float *  img,
float *  intensities,
Tout *  centroids,
int  nvalid,
int  npix,
int  ntot,
cudaStream_t  stream = 0 
)
pure virtual

◆ get_cog() [3/3]

template<class Tin , class Tout >
virtual int SutraCentroider< Tin, Tout >::get_cog ( float *  intensities,
Tout *  slopes,
bool  noise 
)
pure virtual

◆ get_type()

template<class Tin , class Tout >
virtual string SutraCentroider< Tin, Tout >::get_type ( )
pure virtual

Implemented in SutraCentroiderPyr< Tin, T >, SutraCentroiderCorr< Tin, T >, SutraCentroiderMaskedPix< Tin, T >, SutraCentroiderBpcog< Tin, T >, SutraCentroiderWcog< Tin, T >, SutraCentroiderTcog< Tin, T >, and SutraCentroiderCog< Tin, T >.

Here is the caller graph for this function:

◆ get_validMask()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::get_validMask ( )

◆ init_calib()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::init_calib ( int  n,
int  m 
)

◆ init_img_raw()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::init_img_raw ( int  m,
int  n 
)

◆ init_roi()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::init_roi ( int  N)

◆ init_TT_filter()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::init_TT_filter ( )

◆ is_type()

template<class Tin , class Tout >
bool SutraCentroider< Tin, Tout >::is_type ( string  typec)

Definition at line 114 of file sutra_centroider.h.

114 { return (typec.compare(get_type()) == 0); }

◆ load_img() [1/4]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::load_img ( CarmaObj< Tin > *  img)

◆ load_img() [2/4]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::load_img ( Tin *  img,
int  m,
int  n,
int  location 
)

◆ load_img() [3/4]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::load_img ( Tin *  img,
int  n 
)

◆ load_img() [4/4]

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::load_img ( Tin *  img,
int  n,
int  location 
)

◆ load_validpos()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::load_validpos ( int *  ivalid,
int *  jvalid,
int  N 
)

◆ set_centroids_ref()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_centroids_ref ( float *  centroids_ref)

◆ set_dark()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_dark ( float *  dark,
int  n 
)

◆ set_flat()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_flat ( float *  flat,
int  n 
)

◆ set_lutPix()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_lutPix ( int *  lutPix,
int  n 
)

◆ set_npix()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_npix ( int  npix)

◆ set_nxsub()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_nxsub ( int  nxsub)

◆ set_offset()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_offset ( float  offset)

◆ set_scale()

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::set_scale ( float  scale)

Member Data Documentation

◆ current_context

template<class Tin , class Tout >
CarmaContext* SutraCentroider< Tin, Tout >::current_context

Definition at line 64 of file sutra_centroider.h.

◆ d_bincube

template<class Tin , class Tout >
CarmaObj<Tout>* SutraCentroider< Tin, Tout >::d_bincube

Definition at line 66 of file sutra_centroider.h.

◆ d_centro_filtered

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_centro_filtered

Definition at line 78 of file sutra_centroider.h.

◆ d_centroids_ref

template<class Tin , class Tout >
CarmaObj<Tout>* SutraCentroider< Tin, Tout >::d_centroids_ref

Definition at line 68 of file sutra_centroider.h.

◆ d_dark

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_dark

Definition at line 71 of file sutra_centroider.h.

◆ d_flat

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_flat

Definition at line 72 of file sutra_centroider.h.

◆ d_img

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_img

Definition at line 69 of file sutra_centroider.h.

◆ d_img_raw

template<class Tin , class Tout >
CarmaObj<Tin>* SutraCentroider< Tin, Tout >::d_img_raw

Definition at line 70 of file sutra_centroider.h.

◆ d_intensities

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_intensities

Definition at line 67 of file sutra_centroider.h.

◆ d_lutPix

template<class Tin , class Tout >
CarmaObj<int>* SutraCentroider< Tin, Tout >::d_lutPix

Definition at line 73 of file sutra_centroider.h.

◆ d_ref_Tilt

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_ref_Tilt

Definition at line 80 of file sutra_centroider.h.

◆ d_ref_Tip

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_ref_Tip

Definition at line 79 of file sutra_centroider.h.

◆ d_TT_slopes

template<class Tin , class Tout >
CarmaObj<float>* SutraCentroider< Tin, Tout >::d_TT_slopes

Definition at line 81 of file sutra_centroider.h.

◆ d_validMask

template<class Tin , class Tout >
CarmaObj<int>* SutraCentroider< Tin, Tout >::d_validMask

Definition at line 76 of file sutra_centroider.h.

◆ d_validx

template<class Tin , class Tout >
CarmaObj<int>* SutraCentroider< Tin, Tout >::d_validx

Definition at line 74 of file sutra_centroider.h.

◆ d_validy

template<class Tin , class Tout >
CarmaObj<int>* SutraCentroider< Tin, Tout >::d_validy

Definition at line 75 of file sutra_centroider.h.

◆ device

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::device

Definition at line 53 of file sutra_centroider.h.

◆ filter_TT

template<class Tin , class Tout >
bool SutraCentroider< Tin, Tout >::filter_TT

Definition at line 59 of file sutra_centroider.h.

◆ npix

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::npix

Definition at line 57 of file sutra_centroider.h.

◆ nslopes

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::nslopes

Definition at line 56 of file sutra_centroider.h.

◆ nvalid

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::nvalid

Definition at line 55 of file sutra_centroider.h.

◆ nxsub

template<class Tin , class Tout >
int SutraCentroider< Tin, Tout >::nxsub

Definition at line 58 of file sutra_centroider.h.

◆ offset

template<class Tin , class Tout >
float SutraCentroider< Tin, Tout >::offset

Definition at line 61 of file sutra_centroider.h.

◆ scale

template<class Tin , class Tout >
float SutraCentroider< Tin, Tout >::scale

Definition at line 62 of file sutra_centroider.h.

◆ wfs

template<class Tin , class Tout >
SutraWfs* SutraCentroider< Tin, Tout >::wfs

Definition at line 54 of file sutra_centroider.h.


The documentation for this class was generated from the following file:
SutraCentroider::calibrate_img
int calibrate_img()
Definition: sutra_centroider.h:103
SutraCentroider::get_type
virtual string get_type()=0