COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutraWrap.Rtc_UFU Class Reference
Collaboration diagram for sutraWrap.Rtc_UFU:

Public Member Functions

None __init__ (self)
 Initialize a void rtc object. More...
 
int add_centroider (self, carmaWrap.context context, int nvalid, float offset, float scale, bool filter_TT, int device, str typec, Wfs wfs)
 Add a SutraCentroider object in the RTC. More...
 
int add_centroider (self, carmaWrap.context context, int nvalid, float offset, float scale, bool filter_TT, int device, str typec)
 
int add_controller (self, carmaWrap.context context, str typec, int 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, Dms dms=None, numpy.ndarray[numpy.int32] idx_dms=[], int ndm=0, numpy.ndarray[numpy.int32] idx_centro=[], int ncentro=0, int Nphi=0, bool wfs_direction=False)
 Add a SutraController object in the RTC. More...
 
None add_controller (self, carmaWrap.context context, str typec, int 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)
 
int apply_control (self, int ncontrol, bool compVoltage=True)
 Apply the commands on the DM and shape it. More...
 
None build_cmat (self, int ncontrol, int nfilt, bool filt_tt=False)
 Computes cmat. More...
 
int comp_voltage (self, int ncontrol)
 Compute the commands on the DM. More...
 
int do_calibrate_img (self, int ncontrol)
 Computes the calibrated image. More...
 
int do_centroids (self, int ncontrol)
 Computes the centroids. More...
 
int do_centroids_geom (self, int ncontrol, int type=0)
 Computes the centroids geom. More...
 
int do_centroids_ref (self, int ncontrol)
 Computes the centroids ref. More...
 
int do_clipping (self, int ncontrol)
 Clip the command to apply on the DMs on a SutraController object. More...
 
int do_control (self, int ncontrol)
 Computes the commands. More...
 
int do_imat (self, int ncontrol, Dms dms, int kernconv)
 Computes interaction matrix. More...
 
int do_imat_basis (self, int ncontrol, Dms dms, int nModes, numpy.ndarray[numpy.float32] m2v, numpy.ndarray[numpy.float32] pushAmpl, int kernconv)
 Computes a modal interaction matrix. More...
 
None imat_svd (self, int ncontrol)
 Computes imat svd. More...
 
int remove_centroider (self, int ncentro)
 Remove the specified centroider from the RTC. More...
 
int remove_controller (self, int ncontrol)
 Remove the specified controller from the RTC. More...
 
int set_centroids_ref (self, numpy.ndarray[numpy.float32] centroidsRef)
 Set the reference centroids. More...
 
None set_gain (self, int ncontrol, float gain)
 Set the loop gain in the controller. More...
 
None set_modal_gains (self, int ncontrol, numpy.ndarray[numpy.float32] mgain)
 Set the modal gain in the controller. More...
 

Properties

 d_centro = property
 Vector of centroiders. More...
 
 d_control = property
 Vector of controllers. More...
 

Detailed Description

Definition at line 7457 of file sutraWrap.py.

Constructor & Destructor Documentation

◆ __init__()

None sutraWrap.Rtc_UFU.__init__ (   self)

Initialize a void rtc object.

Definition at line 7461 of file sutraWrap.py.

Member Function Documentation

◆ add_centroider() [1/2]

int sutraWrap.Rtc_UFU.add_centroider (   self,
carmaWrap.context  context,
int  nvalid,
float  offset,
float  scale,
bool  filter_TT,
int  device,
str  typec 
)

Definition at line 7505 of file sutraWrap.py.

Here is the call graph for this function:

◆ add_centroider() [2/2]

int sutraWrap.Rtc_UFU.add_centroider (   self,
carmaWrap.context  context,
int  nvalid,
float  offset,
float  scale,
bool  filter_TT,
int  device,
str  typec,
Wfs  wfs 
)

Add a SutraCentroider object in the RTC.

Parameters
context(CarmaContext): carma context
nvalidNumber of WFS valid ssp
offset(float): offset for centroiding computation
scale(float): scale factor to get the right unit, ie. arcsec
filt_TT(bool): flag to control TT filtering
device(int): GPU device index
typec(str): Centroider type
wfs(SutraWfs): SutraWfs handled by the centroider
     Add a SutraCentroider object in the RTC
Parameters
context(CarmaContext): carma context
nvalidNumber of WFS valid ssp
offset(float): offset for centroiding computation
scale(float): scale factor to get the right unit, ie. arcsec
filt_TT(bool): flag to control TT filtering
device(int): GPU device index
typec(str): Centroider type

Definition at line 7503 of file sutraWrap.py.

Here is the caller graph for this function:

◆ add_controller() [1/2]

None sutraWrap.Rtc_UFU.add_controller (   self,
carmaWrap.context  context,
str  typec,
int  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 
)

Definition at line 7608 of file sutraWrap.py.

Here is the call graph for this function:

◆ add_controller() [2/2]

int sutraWrap.Rtc_UFU.add_controller (   self,
carmaWrap.context  context,
str  typec,
int  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,
Dms   dms = None,
numpy.ndarray[numpy.int32]   idx_dms = [],
int   ndm = 0,
numpy.ndarray[numpy.int32]   idx_centro = [],
int   ncentro = 0,
int   Nphi = 0,
bool   wfs_direction = False 
)

Add a SutraController object in the RTC.

Parameters
context(CarmaContext): carma context
typec(str): Controller type
device(int): GPU device index
delay(float): Loop delay [frames]
nslope(int): Number of slopes
nactuNumber of actuators to command
nslope_buffers(int) : Number of historic slopes vectors to use
nstates(int) : Number of states in state vector
nstate_buffers(int) : Number of historic state vectors to use
nmodes(int) : Number of modes in mode vector
niir_in(int) : Number of input mode vectors for iir filter
niir_out(int) : Number of output mode vectors for iir filter
polc(bool) : Activate the Pseudo Open Loop Control if available
is_modal(bool) : Activate projection from modes to actu if available
dms(SutraDms) : SutraDms object
idx_dms(np.array[ndim=1,dtype=np.int64]) : index of DM in SutraDms to command
ndm(int) : Number of DM to command
idx_centro(np.array[ndim=1,dtype=np.int64]): (optional) Index of centoiders in sutra_rtc.d_centro to handle
ncentro(int) : Number of centroiders handled
Nphi(int) : umber of pixels in the pupil
wfs_direction(bool) : Flag for ROKET
     Add a SutraController object in the RTC
Parameters
context(CarmaContext): carma context
typec(str): Controller type
device(int): GPU device index
delay(float): Loop delay [frames]
nslope(int): Number of slopes
nactuNumber of actuators to command
nslope_buffers(int) : Number of historic slopes vectors to use
nstates(int) : Number of states in state vector
nstate_buffers(int) : Number of historic state vectors to use
nmodes(int) : Number of modes in mode vector
niir_in(int) : Number of input mode vectors for iir filter
niir_out(int) : Number of output mode vectors for iir filter
polc(bool) : Activate the Pseudo Open Loop Control if available
is_modal(bool) : Activate projection from modes to actu if available
dms(SutraDms) : SutraDms object
idx_dms(np.array[ndim=1,dtype=np.int64]) : index of DM in SutraDms to command
ndm(int) : Number of DM to command
idx_centro(np.array[ndim=1,dtype=np.int64]): (optional) Index of centoiders in sutra_rtc.d_centro to handle
ncentro(int) : Number of centroiders handled
Nphi(int) : umber of pixels in the pupil
wfs_direction(bool) : Flag for ROKET

Definition at line 7606 of file sutraWrap.py.

Here is the caller graph for this function:

◆ apply_control()

int sutraWrap.Rtc_UFU.apply_control (   self,
int  ncontrol,
bool   compVoltage = True 
)

Apply the commands on the DM and shape it.

Parameters
ncontrol(int): Index of the controller
compVoltage(bool): if True (default), computes delay and perturb voltages. Else, applies just the vector command

Definition at line 7617 of file sutraWrap.py.

◆ build_cmat()

None sutraWrap.Rtc_UFU.build_cmat (   self,
int  ncontrol,
int  nfilt,
bool   filt_tt = False 
)

Computes cmat.

Parameters
ncontrol(int): controller index
nfilt(int): number of modes to filter
filt_tt(bool): Flag for TT filter

Definition at line 7628 of file sutraWrap.py.

◆ comp_voltage()

int sutraWrap.Rtc_UFU.comp_voltage (   self,
int  ncontrol 
)

Compute the commands on the DM.

Parameters
ncontrol(int): Index of the controller

Definition at line 7635 of file sutraWrap.py.

◆ do_calibrate_img()

int sutraWrap.Rtc_UFU.do_calibrate_img (   self,
int  ncontrol 
)

Computes the calibrated image.

Parameters
ncontrol(int): Index of the controller

Definition at line 7642 of file sutraWrap.py.

◆ do_centroids()

int sutraWrap.Rtc_UFU.do_centroids (   self,
int  ncontrol 
)

Computes the centroids.

Parameters
ncontrol(int): Index of the controller

Definition at line 7649 of file sutraWrap.py.

◆ do_centroids_geom()

int sutraWrap.Rtc_UFU.do_centroids_geom (   self,
int  ncontrol,
int   type = 0 
)

Computes the centroids geom.

Parameters
ncontrol(int): Index of the controller
type(int): Centroiding method of geom wfs

Definition at line 7657 of file sutraWrap.py.

Here is the caller graph for this function:

◆ do_centroids_ref()

int sutraWrap.Rtc_UFU.do_centroids_ref (   self,
int  ncontrol 
)

Computes the centroids ref.

Parameters
ncontrol(int): Index of the controller

Definition at line 7664 of file sutraWrap.py.

◆ do_clipping()

int sutraWrap.Rtc_UFU.do_clipping (   self,
int  ncontrol 
)

Clip the command to apply on the DMs on a SutraController object.

Parameters
ncontrol(int) : controller index

Definition at line 7671 of file sutraWrap.py.

◆ do_control()

int sutraWrap.Rtc_UFU.do_control (   self,
int  ncontrol 
)

Computes the commands.

Parameters
ncontrol(int): Index of the controller

Definition at line 7678 of file sutraWrap.py.

◆ do_imat()

int sutraWrap.Rtc_UFU.do_imat (   self,
int  ncontrol,
Dms  dms,
int  kernconv 
)

Computes interaction matrix.

Parameters
ncontrol(int): Index of the controller
dms(SutraDms): SutraDms object
kernconv(bool) : Flag for WFS spot convolution

Definition at line 7689 of file sutraWrap.py.

◆ do_imat_basis()

int sutraWrap.Rtc_UFU.do_imat_basis (   self,
int  ncontrol,
Dms  dms,
int  nModes,
numpy.ndarray[numpy.float32]  m2v,
numpy.ndarray[numpy.float32]  pushAmpl,
int  kernconv 
)

Computes a modal interaction matrix.

Parameters
ncontrol(int): Index of the controller
dms(SutraDms): SutraDms object
nModes(int): number of modes in the basis
m2v(np.array[ndim=2,dtype=np.float32]): modeToActu matrix
pushAmpl(np.array[ndim=1,dtype=np.float32]): pushpull strength in mode units
kernconv(bool) : Flag for WFS spot convolution

Definition at line 7707 of file sutraWrap.py.

◆ imat_svd()

None sutraWrap.Rtc_UFU.imat_svd (   self,
int  ncontrol 
)

Computes imat svd.

Parameters
ncontrol(int): controller index

Definition at line 7714 of file sutraWrap.py.

◆ remove_centroider()

int sutraWrap.Rtc_UFU.remove_centroider (   self,
int  ncentro 
)

Remove the specified centroider from the RTC.

Parameters
ncentro(int): index of the centroider to remove

Definition at line 7721 of file sutraWrap.py.

◆ remove_controller()

int sutraWrap.Rtc_UFU.remove_controller (   self,
int  ncontrol 
)

Remove the specified controller from the RTC.

Parameters
ncontrol(int): index of the controller to remove

Definition at line 7728 of file sutraWrap.py.

◆ set_centroids_ref()

int sutraWrap.Rtc_UFU.set_centroids_ref (   self,
numpy.ndarray[numpy.float32]  centroidsRef 
)

Set the reference centroids.

Parameters
centroids_ref(np.array(ndim=1, dtype=np.float32)): ref centroids

Definition at line 7735 of file sutraWrap.py.

◆ set_gain()

None sutraWrap.Rtc_UFU.set_gain (   self,
int  ncontrol,
float  gain 
)

Set the loop gain in the controller.

Parameters
ncontrol(int): controller index
gain(float): gain to set

Definition at line 7744 of file sutraWrap.py.

◆ set_modal_gains()

None sutraWrap.Rtc_UFU.set_modal_gains (   self,
int  ncontrol,
numpy.ndarray[numpy.float32]  mgain 
)

Set the modal gain in the controller.

Parameters
ncontrol(int): controller index
mgain(np.array[ndim=1,dtype=np.float32]): modal gains to set

Definition at line 7753 of file sutraWrap.py.

Property Documentation

◆ d_centro

sutraWrap.Rtc_UFU.d_centro = property
static

Vector of centroiders.

   @n type of :  typing.List[Centroider_UF]

Definition at line 7760 of file sutraWrap.py.

◆ d_control

sutraWrap.Rtc_UFU.d_control = property
static

Vector of controllers.

   @n type of :  typing.List[Controller_FU]

Definition at line 7769 of file sutraWrap.py.


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