![]() |
COMPASS
5.4.4
End-to-end AO simulation tool using GPU acceleration
|
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... | |
Definition at line 6509 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.__init__ | ( | self | ) |
Initialize a void rtc object.
Definition at line 6513 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.add_centroider | ( | self, | |
| carmaWrap.context | context, | ||
| int | nvalid, | ||
| float | offset, | ||
| float | scale, | ||
| bool | filter_TT, | ||
| int | device, | ||
| str | typec | ||
| ) |
| int sutraWrap.Rtc_FFF.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.
| context | (CarmaContext): carma context |
| nvalid | Number 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
| context | (CarmaContext): carma context |
| nvalid | Number 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 6555 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.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 sutraWrap.Rtc_FFF.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.
| context | (CarmaContext): carma context |
| typec | (str): Controller type |
| device | (int): GPU device index |
| delay | (float): Loop delay [frames] |
| nslope | (int): Number of slopes |
| nactu | Number 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
| context | (CarmaContext): carma context |
| typec | (str): Controller type |
| device | (int): GPU device index |
| delay | (float): Loop delay [frames] |
| nslope | (int): Number of slopes |
| nactu | Number 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 6658 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.apply_control | ( | self, | |
| int | ncontrol, | ||
| bool | compVoltage = True |
||
| ) |
Apply the commands on the DM and shape it.
| 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 6669 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.build_cmat | ( | self, | |
| int | ncontrol, | ||
| int | nfilt, | ||
| bool | filt_tt = False |
||
| ) |
Computes cmat.
| ncontrol | (int): controller index |
| nfilt | (int): number of modes to filter |
| filt_tt | (bool): Flag for TT filter |
Definition at line 6680 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.comp_voltage | ( | self, | |
| int | ncontrol | ||
| ) |
Compute the commands on the DM.
| ncontrol | (int): Index of the controller |
Definition at line 6687 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_calibrate_img | ( | self, | |
| int | ncontrol | ||
| ) |
Computes the calibrated image.
| ncontrol | (int): Index of the controller |
Definition at line 6694 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_centroids | ( | self, | |
| int | ncontrol | ||
| ) |
Computes the centroids.
| ncontrol | (int): Index of the controller |
Definition at line 6701 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_centroids_geom | ( | self, | |
| int | ncontrol, | ||
| int | type = 0 |
||
| ) |
Computes the centroids geom.
| ncontrol | (int): Index of the controller |
| type | (int): Centroiding method of geom wfs |
Definition at line 6709 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_centroids_ref | ( | self, | |
| int | ncontrol | ||
| ) |
Computes the centroids ref.
| ncontrol | (int): Index of the controller |
Definition at line 6716 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_clipping | ( | self, | |
| int | ncontrol | ||
| ) |
Clip the command to apply on the DMs on a SutraController object.
| ncontrol | (int) : controller index |
Definition at line 6723 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_control | ( | self, | |
| int | ncontrol | ||
| ) |
Computes the commands.
| ncontrol | (int): Index of the controller |
Definition at line 6730 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.do_imat | ( | self, | |
| int | ncontrol, | ||
| Dms | dms, | ||
| int | kernconv | ||
| ) |
Computes interaction matrix.
| ncontrol | (int): Index of the controller |
| dms | (SutraDms): SutraDms object |
| kernconv | (bool) : Flag for WFS spot convolution |
Definition at line 6741 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.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.
| 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 6759 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.imat_svd | ( | self, | |
| int | ncontrol | ||
| ) |
Computes imat svd.
| ncontrol | (int): controller index |
Definition at line 6766 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.remove_centroider | ( | self, | |
| int | ncentro | ||
| ) |
Remove the specified centroider from the RTC.
| ncentro | (int): index of the centroider to remove |
Definition at line 6773 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.remove_controller | ( | self, | |
| int | ncontrol | ||
| ) |
Remove the specified controller from the RTC.
| ncontrol | (int): index of the controller to remove |
Definition at line 6780 of file sutraWrap.py.
| int sutraWrap.Rtc_FFF.set_centroids_ref | ( | self, | |
| numpy.ndarray[numpy.float32] | centroidsRef | ||
| ) |
Set the reference centroids.
| centroids_ref | (np.array(ndim=1, dtype=np.float32)): ref centroids |
Definition at line 6787 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.set_gain | ( | self, | |
| int | ncontrol, | ||
| float | gain | ||
| ) |
Set the loop gain in the controller.
| ncontrol | (int): controller index |
| gain | (float): gain to set |
Definition at line 6796 of file sutraWrap.py.
| None sutraWrap.Rtc_FFF.set_modal_gains | ( | self, | |
| int | ncontrol, | ||
| numpy.ndarray[numpy.float32] | mgain | ||
| ) |
Set the modal gain in the controller.
| ncontrol | (int): controller index |
| mgain | (np.array[ndim=1,dtype=np.float32]): modal gains to set |
Definition at line 6805 of file sutraWrap.py.
|
static |
Vector of centroiders.
@n type of : typing.List[Centroider_FF]
Definition at line 6812 of file sutraWrap.py.
|
static |
Vector of controllers.
@n type of : typing.List[Controller_FF]
Definition at line 6821 of file sutraWrap.py.