COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
SutraRtc< Tin, T, Tout > Class Template Reference

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

#include <sutra_rtc.h>

Inheritance diagram for SutraRtc< Tin, T, Tout >:
Collaboration diagram for SutraRtc< Tin, T, Tout >:

Public Member Functions

 SutraRtc ()
 
 ~SutraRtc ()
 
int add_centroider (CarmaContext *context, long nvalid, float offset, float scale, bool filter_TT, long device, std::string typec)
 
int add_centroider (CarmaContext *context, long nvalid, float offset, float scale, bool filter_TT, long device, std::string typec, SutraWfs *wfs)
 
int add_controller (CarmaContext *context, std::string typec, long device, float delay, int nslope, int nactu, int nslope_buffers=0, int nstates=0, int nstate_buffers=0, int nmodes=0, int niir_in=0, int niir_out=0, bool polc=false, bool is_modal=false, SutraDms *dms=nullptr, int *idx_dms=nullptr, int ndm=0, int *idx_centro=nullptr, int ncentro=0, int Nphi=0, bool wfs_direction=false)
 Add a SutraController object in the RTC. More...
 
int remove_centroider (int ncentro)
 
int remove_controller (int ncontrol)
 
int do_imat (int ncntrl, SutraDms *ydms, int kernconv)
 
int do_imat_basis (int ncntrl, SutraDms *ydm, int nModes, T *m2v, T *pushAmpl, int kernconv)
 
int do_imat_geom (int ncntrl, SutraDms *ydm, int type)
 
int comp_images_imat (SutraDms *ydm, int kernconv)
 
int do_calibrate_img ()
 
int do_calibrate_img (int ncntrl)
 
int do_centroids ()
 
int do_centroids (int ncntrl)
 
int do_centroids (int ncntrl, bool noise)
 
int do_centroids_geom (int ncntrl, int type=0)
 
int do_centroids_ref (int ncntrl)
 
int do_control (int ncntrl)
 
int do_clipping (int ncntrl)
 
int apply_control (int ncntrl, bool compVoltage=true)
 
int comp_voltage (int ncntrl)
 
int remove_ref (int ncntrl)
 
int set_centroids_ref (float *centroids_ref)
 

Public Attributes

vector< SutraCentroider< Tin, T > * > d_centro
 
vector< SutraController< T, Tout > * > d_control
 

Detailed Description

template<typename Tin, typename T, typename Tout>
class SutraRtc< Tin, T, Tout >

this class provides the rtc features to COMPASS

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.4.4
Date
2022/01/24

Definition at line 36 of file sutra_rtc.h.

Constructor & Destructor Documentation

◆ SutraRtc()

template<typename Tin , typename T , typename Tout >
SutraRtc< Tin, T, Tout >::SutraRtc ( )

◆ ~SutraRtc()

template<typename Tin , typename T , typename Tout >
SutraRtc< Tin, T, Tout >::~SutraRtc ( )

Member Function Documentation

◆ add_centroider() [1/2]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::add_centroider ( CarmaContext context,
long  nvalid,
float  offset,
float  scale,
bool  filter_TT,
long  device,
std::string  typec 
)

◆ add_centroider() [2/2]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::add_centroider ( CarmaContext context,
long  nvalid,
float  offset,
float  scale,
bool  filter_TT,
long  device,
std::string  typec,
SutraWfs wfs 
)

◆ add_controller()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::add_controller ( CarmaContext context,
std::string  typec,
long  device,
float  delay,
int  nslope,
int  nactu,
int  nslope_buffers = 0,
int  nstates = 0,
int  nstate_buffers = 0,
int  nmodes = 0,
int  niir_in = 0,
int  niir_out = 0,
bool  polc = false,
bool  is_modal = false,
SutraDms dms = nullptr,
int *  idx_dms = nullptr,
int  ndm = 0,
int *  idx_centro = nullptr,
int  ncentro = 0,
int  Nphi = 0,
bool  wfs_direction = false 
)

Add a SutraController object in the RTC.

Parameters
context: CarmaContext: carma context
typec: string : Controller type
device: long : GPU device index
delay: float : Loop delay [frames]
nslope: int : Number of slopes
nactu: int : Number of actuators to command
nslope_buffersint : (optional) Number of historic slopes vectors to use
nstates: int : (optional) Number of states in state vector
nstate_buffersint : (optional) Number of historic state vectors to use
nmodes: int : (optional) Number of modes in mode vector
niir_in: int : (optional) Number of input mode vectors for iir filter
niir_out: int : (optional) Number of output mode vectors for iir filter
polc: bool : (optional) Activate the Pseudo Open Loop Control if available
is_modal: bool : (optional) Activate projection from modes to actu if available
dms: SutraDms* : (optional) SutraDms object
idx_dms: int* : (optional) index of DM in SutraDms to command
ndm: int : (optional) Number of DM to command
idx_centro: int* : (optional) Index of centoiders in sutra_rtc.d_centro to handle
ncentro: int : (optional) Number of centroiders handled
Nphi: int : (optional) Number of pixels in the pupil
wfs_direction: bool : (optional) Flag for ROKET
Returns
int : exit status

◆ apply_control()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::apply_control ( int  ncntrl,
bool  compVoltage = true 
)

◆ comp_images_imat()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::comp_images_imat ( SutraDms ydm,
int  kernconv 
)

◆ comp_voltage()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::comp_voltage ( int  ncntrl)

◆ do_calibrate_img() [1/2]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_calibrate_img ( )

◆ do_calibrate_img() [2/2]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_calibrate_img ( int  ncntrl)

◆ do_centroids() [1/3]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_centroids ( )

◆ do_centroids() [2/3]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_centroids ( int  ncntrl)

◆ do_centroids() [3/3]

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_centroids ( int  ncntrl,
bool  noise 
)

◆ do_centroids_geom()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_centroids_geom ( int  ncntrl,
int  type = 0 
)
Here is the caller graph for this function:

◆ do_centroids_ref()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_centroids_ref ( int  ncntrl)

◆ do_clipping()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_clipping ( int  ncntrl)

◆ do_control()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_control ( int  ncntrl)

◆ do_imat()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_imat ( int  ncntrl,
SutraDms ydms,
int  kernconv 
)

◆ do_imat_basis()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_imat_basis ( int  ncntrl,
SutraDms ydm,
int  nModes,
T *  m2v,
T *  pushAmpl,
int  kernconv 
)

◆ do_imat_geom()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::do_imat_geom ( int  ncntrl,
SutraDms ydm,
int  type 
)

◆ remove_centroider()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::remove_centroider ( int  ncentro)

◆ remove_controller()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::remove_controller ( int  ncontrol)

◆ remove_ref()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::remove_ref ( int  ncntrl)

◆ set_centroids_ref()

template<typename Tin , typename T , typename Tout >
int SutraRtc< Tin, T, Tout >::set_centroids_ref ( float *  centroids_ref)

Member Data Documentation

◆ d_centro

template<typename Tin , typename T , typename Tout >
vector<SutraCentroider<Tin, T> *> SutraRtc< Tin, T, Tout >::d_centro

Definition at line 38 of file sutra_rtc.h.

◆ d_control

template<typename Tin , typename T , typename Tout >
vector<SutraController<T, Tout> *> SutraRtc< Tin, T, Tout >::d_control

Definition at line 39 of file sutra_rtc.h.


The documentation for this class was generated from the following file: