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

Public Member Functions

int build_cmat (self, float cond)
 Computes the command matrix. More...
 
int compute_Cmm (self, Atmos atmos, Sensors sensors, numpy.ndarray[numpy.float64] LO, numpy.ndarray[numpy.float64] Cn2, numpy.ndarray[numpy.float64] alphaX, numpy.ndarray[numpy.float64] alphaY, float diamTel, float cobs)
 Compute the Cmm matrix. More...
 
int compute_Cphim (self, Atmos atmos, Sensors sensors, Dms dms, numpy.ndarray[numpy.float64] LO, numpy.ndarray[numpy.float64] Cn2, numpy.ndarray[numpy.float64] alphaX, numpy.ndarray[numpy.float64] alphaY, numpy.ndarray[numpy.float64] X, numpy.ndarray[numpy.float64] Y, numpy.ndarray[numpy.float64] xactu, numpy.ndarray[numpy.float64] yactu, float diamTel, numpy.ndarray[numpy.float64] k2, numpy.ndarray[numpy.int64] NlayerDm, numpy.ndarray[numpy.int64] indLayerDm, float FoV, numpy.ndarray[numpy.float64] pitch, numpy.ndarray[numpy.float64] alt_dm)
 Compute the Cphim matrix. More...
 
int filter_cmat (self, float cond)
 Filter command matrix from TT. More...
 
int filter_cphim (self, numpy.ndarray[numpy.float32] F, numpy.ndarray[numpy.float32] Nact)
 Filter Cphim from piston and apply coupling. More...
 
int load_noisemat (self, numpy.ndarray[numpy.float32] noisemat)
 Load the noise covariance matrix. More...
 
int set_cmat (self, numpy.ndarray[numpy.float32] cmat)
 Set the command matrix. More...
 
int set_imat (self, numpy.ndarray[numpy.float32] imat)
 Set the interaction matrix. More...
 
int set_modal_gains (self, numpy.ndarray[numpy.float32] mgain)
 Set the controller modal gains. More...
 
- Public Member Functions inherited from sutraWrap.Controller_FF
int add_perturb (self)
 Add the perturbation voltage to the command. More...
 
int add_perturb_voltage (self, str name, numpy.ndarray[numpy.float32] perturb, int N)
 Add a new perturbation voltage buffer. More...
 
int clip_commands (self)
 Clip the commands between volt_min and volt_max (values set in the controller) More...
 
int command_delay (self)
 Delay the command. More...
 
int comp_voltage (self)
 Computes the final voltage to send to the DM. More...
 
int disable_perturb_voltage (self, str name)
 Disable a perturbation voltage buffer. More...
 
int enable_perturb_voltage (self, str name)
 Enable a perturbation voltage buffer. More...
 
int remove_perturb_voltage (self, str name)
 Remove a perturbation voltage buffer. More...
 
int reset_coms (self)
 Reset the commands circular buffer. More...
 
int reset_perturb_voltage (self)
 Remove all perturbation voltage buffers. More...
 
int set_com (self, numpy.ndarray[numpy.float32] com, int nElem)
 Set the command vector of the controller. More...
 
None set_comRange (self, float volt_min, float volt_max)
 Set the volt_min and volt_max value for command clipping. More...
 
int set_delay (self, float delay)
 Set the delay. More...
 
int set_gain (self, float gain)
 Set the gain. More...
 
int set_open_loop (self, int status, bool rst=True)
 Open (1) or close (0) the loop. More...
 
int set_perturb_voltage (self, str name, numpy.ndarray[numpy.float32] perturb, int N)
 Set an existing perturbation voltage buffer. More...
 
int set_val_max (self, float val_max)
 Set the val_max value for command conversion. More...
 
int set_volt_max (self, float volt_max)
 Set the volt_max value for command clipping. More...
 

Properties

 d_Cmm = property
 Slope covariance matrix. More...
 
 d_Cphim = property
 Actuators-Slopes covariance marix. More...
 
 d_KLbasis = property
 KL basis. More...
 
 d_cenbuff = property
 Centroids circular buffer. More...
 
 d_cmat = property
 Control matrix. More...
 
 d_com1 = property
 Commands at iteration k-1 (for POLC) More...
 
 d_covmat = property
 TODO docstring. More...
 
 d_err = property
 Increment error. More...
 
 d_gain = property
 vector of modal gains More...
 
 d_imat = property
 Interaction matrix. More...
 
 d_noisemat = property
 Noise on WFS measurements matrix. More...
 
 d_olmeas = property
 Reconstructed open loop measurement. More...
 
 h_Cmmeigenvals = property
 Cmm eigenvalues. More...
 
 h_eigenvals = property
 Eigen values. More...
 
- Properties inherited from sutraWrap.Controller_FF
 centro_idx = property
 Indices of the handled centroiders. More...
 
 comRange = property
 
type of : typing.Tuple[float, float] More...
 
 context = property
 GPU context. More...
 
 d_centroids = property
 Slopes vector. More...
 
 d_circularComs0 = property
 Oldest command vector in the circular buffer. More...
 
 d_circularComs1 = property
 Second oldest Command vector in the circular buffer. More...
 
 d_com = property
 Current command vector. More...
 
 d_com1 = property
 Command vector at iteration k-1. More...
 
 d_com_clipped = property
 Delayed commands. More...
 
 d_dmseen = property
 Vector of SutraDm commanded. More...
 
 d_perturb_map = property
 Perturbation voltage buffers. More...
 
 d_voltage = property
 Total voltage to apply on the DMs. More...
 
 delay = property
 Loop delay. More...
 
 device = property
 GPU device index. More...
 
 gain = property
 Controller gain. More...
 
 nactu = property
 Number of actuators to control. More...
 
 nslope = property
 Number of slopes. More...
 
 open_loop = property
 Open loop flag. More...
 
 type = property
 Controller type. More...
 
 val_max = property
 Maximum value for d_voltage (ADU). More...
 

Detailed Description

Definition at line 3890 of file sutraWrap.py.

Member Function Documentation

◆ build_cmat()

int sutraWrap.ControllerMV_FF.build_cmat (   self,
float  cond 
)

Computes the command matrix.

Parameters
cond(float): Conditioning number for inversion

Definition at line 3897 of file sutraWrap.py.

◆ compute_Cmm()

int sutraWrap.ControllerMV_FF.compute_Cmm (   self,
Atmos  atmos,
Sensors  sensors,
numpy.ndarray[numpy.float64]  LO,
numpy.ndarray[numpy.float64]  Cn2,
numpy.ndarray[numpy.float64]  alphaX,
numpy.ndarray[numpy.float64]  alphaY,
float  diamTel,
float  cobs 
)

Compute the Cmm matrix.

Parameters
atmos(SutraAtmos): SutraAtmos object
sensors(SutraSensors): SutraSensors object
LO(np.array[ndim=1,dtype=np.float64]): outer scale of each layer
Cn2(np.array[ndim=1,dtype=np.float64]): Cn2 profile
alphaX(np.array[ndim=1,dtype=np.float64]): X position of each WFS
alphaY(np.array[ndim=1,dtype=np.float64]): Y position of each WFS
diamTel(double): Telescope diameter
cobs(double): Central obstruction ratio

Definition at line 3918 of file sutraWrap.py.

◆ compute_Cphim()

int sutraWrap.ControllerMV_FF.compute_Cphim (   self,
Atmos  atmos,
Sensors  sensors,
Dms  dms,
numpy.ndarray[numpy.float64]  LO,
numpy.ndarray[numpy.float64]  Cn2,
numpy.ndarray[numpy.float64]  alphaX,
numpy.ndarray[numpy.float64]  alphaY,
numpy.ndarray[numpy.float64]  X,
numpy.ndarray[numpy.float64]  Y,
numpy.ndarray[numpy.float64]  xactu,
numpy.ndarray[numpy.float64]  yactu,
float  diamTel,
numpy.ndarray[numpy.float64]  k2,
numpy.ndarray[numpy.int64]  NlayerDm,
numpy.ndarray[numpy.int64]  indLayerDm,
float  FoV,
numpy.ndarray[numpy.float64]  pitch,
numpy.ndarray[numpy.float64]  alt_dm 
)

Compute the Cphim matrix.

Parameters
atmos(SutraAtmos): SutraAtmos object
sensors(SutraSensors): SutraSensors object
dms(SutraDms): SutraDms object
LO(np.array[ndim=1,dtype=np.float64]): outer scale of each layer
Cn2(np.array[ndim=1,dtype=np.float64]): Cn2 profile
alphaX(np.array[ndim=1,dtype=np.float64]): X position of each WFS
alphaY(np.array[ndim=1,dtype=np.float64]): Y position of each WFS
X(np.array[ndim=1,dtype=np.float64]): X position of each subaperture
Y(np.array[ndim=1,dtype=np.float64]): Y position of each subaperture
xactu(np.array[ndim=1,dtype=np.float64]): X position of each actuators
yactu(np.array[ndim=1,dtype=np.float64]): Y position of each actuators
diamTel(double): Telescope diameter
k2(np.array[ndim=1,dtype=np.float64]): scales
NlayerDm(np.array[ndim=1,dtype=np.int64]): Number of layers handled by each DM
indLayerDm(np.array[ndim=1,dtype=np.int64]): Indices of layers handled by each DM
FoV(double): Field of view
pitch(np.array[ndim=1,dtype=np.int64]): Pitch of each DM
alt_dm(np.array[ndim=1,dtype=np.int64]): Altitude of each DM

Definition at line 3959 of file sutraWrap.py.

◆ filter_cmat()

int sutraWrap.ControllerMV_FF.filter_cmat (   self,
float  cond 
)

Filter command matrix from TT.

Parameters
cond(float): TODO: docstring

Definition at line 3966 of file sutraWrap.py.

◆ filter_cphim()

int sutraWrap.ControllerMV_FF.filter_cphim (   self,
numpy.ndarray[numpy.float32]  F,
numpy.ndarray[numpy.float32]  Nact 
)

Filter Cphim from piston and apply coupling.

Parameters
F(np.array[ndim=2,dtype=np.float32]): Piston filter matrix
Nact(np.array[ndim=2,dtype=np.float32]): Coupling matrix

Definition at line 3975 of file sutraWrap.py.

◆ load_noisemat()

int sutraWrap.ControllerMV_FF.load_noisemat (   self,
numpy.ndarray[numpy.float32]  noisemat 
)

Load the noise covariance matrix.

Parameters
noisemat(float): noise covariance marix

Definition at line 3982 of file sutraWrap.py.

◆ set_cmat()

int sutraWrap.ControllerMV_FF.set_cmat (   self,
numpy.ndarray[numpy.float32]  cmat 
)

Set the command matrix.

Parameters
cmat(np.array[ndim=2,dtype=np.float32]): command matrix to set

Definition at line 3989 of file sutraWrap.py.

◆ set_imat()

int sutraWrap.ControllerMV_FF.set_imat (   self,
numpy.ndarray[numpy.float32]  imat 
)

Set the interaction matrix.

Parameters
imat(np.array[ndim=2,dtype=np.float32]): command matrix to set

Definition at line 3996 of file sutraWrap.py.

◆ set_modal_gains()

int sutraWrap.ControllerMV_FF.set_modal_gains (   self,
numpy.ndarray[numpy.float32]  mgain 
)

Set the controller modal gains.

Parameters
mgain(np.array[ndim1,dtype=np.float32]): modal gains to set

Definition at line 4003 of file sutraWrap.py.

Property Documentation

◆ d_cenbuff

sutraWrap.ControllerMV_FF.d_cenbuff = property
static

Centroids circular buffer.

   @n type of :  carmaWrap.obj_float

Definition at line 4037 of file sutraWrap.py.

◆ d_cmat

sutraWrap.ControllerMV_FF.d_cmat = property
static

Control matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 4046 of file sutraWrap.py.

◆ d_Cmm

sutraWrap.ControllerMV_FF.d_Cmm = property
static

Slope covariance matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 4010 of file sutraWrap.py.

◆ d_com1

sutraWrap.ControllerMV_FF.d_com1 = property
static

Commands at iteration k-1 (for POLC)

   @n type of :  carmaWrap.obj_float

Definition at line 4055 of file sutraWrap.py.

◆ d_covmat

sutraWrap.ControllerMV_FF.d_covmat = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float

Definition at line 4064 of file sutraWrap.py.

◆ d_Cphim

sutraWrap.ControllerMV_FF.d_Cphim = property
static

Actuators-Slopes covariance marix.

   @n type of :  carmaWrap.obj_float

Definition at line 4019 of file sutraWrap.py.

◆ d_err

sutraWrap.ControllerMV_FF.d_err = property
static

Increment error.

   @n type of :  carmaWrap.obj_float

Definition at line 4073 of file sutraWrap.py.

◆ d_gain

sutraWrap.ControllerMV_FF.d_gain = property
static

vector of modal gains

   @n type of :  carmaWrap.obj_float

Definition at line 4082 of file sutraWrap.py.

◆ d_imat

sutraWrap.ControllerMV_FF.d_imat = property
static

Interaction matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 4091 of file sutraWrap.py.

◆ d_KLbasis

sutraWrap.ControllerMV_FF.d_KLbasis = property
static

KL basis.

   @n type of :  carmaWrap.obj_float

Definition at line 4028 of file sutraWrap.py.

◆ d_noisemat

sutraWrap.ControllerMV_FF.d_noisemat = property
static

Noise on WFS measurements matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 4100 of file sutraWrap.py.

◆ d_olmeas

sutraWrap.ControllerMV_FF.d_olmeas = property
static

Reconstructed open loop measurement.

   @n type of :  carmaWrap.obj_float

Definition at line 4109 of file sutraWrap.py.

◆ h_Cmmeigenvals

sutraWrap.ControllerMV_FF.h_Cmmeigenvals = property
static

Cmm eigenvalues.

   @n type of :  carmaWrap.host_obj_float

Definition at line 4118 of file sutraWrap.py.

◆ h_eigenvals

sutraWrap.ControllerMV_FF.h_eigenvals = property
static

Eigen values.

   @n type of :  carmaWrap.host_obj_float

Definition at line 4127 of file sutraWrap.py.


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