![]() |
cacao
Release 0.1.03-dev
Compute And Control For Adaptive Optics
|
Function prototypes for Adaptive Optics Control loop engine. More...
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include "AOloopControl/AOloopControl_AOcompute.h"
#include "AOloopControl/AOloopControl_aorun.h"
#include "AOloopControl_IOtools/AOloopControl_IOtools.h"
#include "AOloopControl/AOloopControl_dm.h"
#include "AOloopControl/AOloopControl_ProcessModeCoefficients.h"
#include "AOloopControl/AOloopControl_autotune.h"
Go to the source code of this file.
Data Structures | |
struct | RTstreamLOG |
struct | AOLOOPCONTROL_CONF |
struct | AOloopControl_var |
Macros | |
#define | _AOLOOPCONTROL_H |
#define | MAX_NUMBER_TIMER 100 |
#define | MAX_NUMBER_RTLOGSTREAM 20 |
#define | RTSLOGindex_wfsim 0 |
#define | RTSLOGindex_imWFS0 1 |
#define | RTSLOGindex_imWFS1 2 |
#define | RTSLOGindex_imWFS2 3 |
#define | RTSLOGindex_modeval 4 |
#define | RTSLOGindex_modeval_dm 5 |
#define | RTSLOGindex_modeval_dm_corr 6 |
#define | RTSLOGindex_modeval_dm_now 7 |
#define | RTSLOGindex_modeval_dm_now_filt 8 |
#define | RTSLOGindex_modevalPF 9 |
#define | RTSLOGindex_modevalPFsync 10 |
#define | RTSLOGindex_modevalPFres 11 |
#define | RTSLOGindex_modeval_ol 12 |
#define | RTSLOGindex_dmC 13 |
#define | RTSLOGindex_dmdisp 14 |
Functions | |
void | __attribute__ ((constructor)) libinit_AOloopControl() |
int | AOloopControl_bogusfunc () |
int | AOloopControl_aorun_GUI (long loop, double frequ) |
float | AOloopControl_readParam_float (char *paramname, float defaultValue, FILE *fplog) |
Read parameter value - float, char or int - AOloopControl_read_param.c. More... | |
int | AOloopControl_readParam_int (char *paramname, int defaultValue, FILE *fplog) |
read parameters int More... | |
char * | AOloopControl_readParam_string (char *paramname, char *defaultValue, FILE *fplog) |
read parameters string More... | |
AOloopControl - 1. INITIALIZATION, configurations | |
Allocate memory, import/export configurations AOloopControl_loadconfigure.c - AOloopControl_initmem.c | |
errno_t | AOloopControl_loadconfigure (long loop, int mode, int level) |
Load configuation parameters from disk - AOloopControl_loadconfigure.c. More... | |
errno_t | AOloopControl_InitializeMemory (int mode) |
Initialize memory - function called within C code only (no CLI call) More... | |
AOloopControl - 2. REAL TIME COMPUTING ROUTINES - AOloopControl.c, AOloopControl_wfs.c | |
calls CPU and GPU processing | |
errno_t | AOloopControl_WFSzpupdate_loop (const char *IDzpdm_name, const char *IDzrespM_name, const char *IDwfszp_name) |
WFS zero point update. More... | |
errno_t | AOloopControl_WFSzeropoint_sum_update_loop (long loopnb, const char *ID_WFSzp_name, int NBzp, const char *IDwfsref0_name, const char *IDwfsref_name) |
WFS sum zero point update. More... | |
int | AOloopControl_aorun_RUN (char *fpsname) |
Main loop function. More... | |
int | AOloopControl_aorun_FPCONF (char *fpsname, uint32_t CMDmode) |
errno_t | AOloopControl_aorun () |
errno_t | ControlMatrixMultiply (float *cm_array, float *imarray, long m, long n, float *outvect) |
CPU based matrix-vector multiplication - when no GPU. More... | |
errno_t | set_DM_modes (long loop) |
Sends modal commands to DM by matrix-vector multiplication. More... | |
errno_t | set_DM_modesRM (long loop) |
Response Matrix DM-WFS. More... | |
errno_t | AOcompute (long loop, int normalize) |
Main computation function, runs once per loop iteration. More... | |
errno_t | AOloopControl_CompModes_loop (const char *ID_CM_name, const char *ID_WFSref_name, const char *ID_WFSim_name, const char *ID_WFSimtot_name, const char *ID_coeff_name) |
Main computation function, runs once per loop iteration. More... | |
errno_t | AOloopControl_GPUmodecoeffs2dm_filt_loop (const int GPUMATMULTCONFindex, const char *modecoeffs_name, const char *DMmodes_name, int semTrigg, const char *out_name, int GPUindex, long loop, int offloadMode) |
Matrix multiplication on GPU to transfom modes coefficients into DM shape. More... | |
long | AOloopControl_sig2Modecoeff (const char *WFSim_name, const char *IDwfsref_name, const char *WFSmodes_name, const char *outname) |
CPU matrix multiplication to transfom WFS signal into modes coefficients. More... | |
long | AOloopControl_computeWFSresidualimage (long loop, char *IDalpha_name) |
Compute WFS residual image. More... | |
imageID | __attribute__ ((hot)) AOloopControl_ProcessModeCoefficients(long loop) |
Compute modes in open loop. More... | |
errno_t | AOloopControl_AutoTuneGains (long loop, const char *IDout_name, float GainCoeff, long NBsamples) |
Auto tune gains of the closed loop. More... | |
long | AOloopControl_dm2dm_offload (const char *streamin, const char *streamout, float twait, float offcoeff, float multcoeff) |
Mixes streamin into streamout, in order to make streamout converge to streamin. More... | |
AOloopControl - 3. LOOP CONTROL INTERFACE - AOloopControl_loop_ctr.c | |
Set parameters | |
errno_t | AOloopControl_setLoopNumber (long loop) |
Set loop number. Ex : for the Pyramid WFS, loop number = 0. More... | |
errno_t | AOloopControl_setparam (long loop, const char *key, double value) |
Set one function for many parameters. More... | |
AOloopControl - 3.1. LOOP CONTROL INTERFACE - MAIN CONTROL : LOOP ON/OFF START/STOP/STEP/RESET | |
Set parameters - AOloopControl_loop_onoff.c | |
errno_t | AOloopControl_loopon () |
Close AO loop : AO on. More... | |
errno_t | AOloopControl_loopoff () |
Open AO loop : AO off. More... | |
errno_t | AOloopControl_loopWFScompon () |
Close AO loop : AO on. More... | |
errno_t | AOloopControl_loopWFScompoff () |
Open AO loop : AO off. More... | |
errno_t | AOloopControl_loopkill () |
Kill AO loop : finish the process of the run. More... | |
errno_t | AOloopControl_loopstep (long loop, long NBstep) |
Close loop for finite number of steps. More... | |
errno_t | AOloopControl_loopreset () |
Reset the AO loop. More... | |
AOloopControl - 3.2. LOOP CONTROL INTERFACE - DATA LOGGING | |
errno_t | AOloopControl_logon () |
Log on the AO interface. More... | |
errno_t | AOloopControl_logoff () |
Log off AO interface. More... | |
AOloopControl - 3.3. LOOP CONTROL INTERFACE - PRIMARY AND FILTERED DM WRITE - AOloopControl_dmwrite.c | |
errno_t | AOloopControl_DMprimaryWrite_on () |
Writing on DM, unfiltered actuators (primary) : on. More... | |
errno_t | AOloopControl_DMprimaryWrite_off () |
Writing on DM, unfiltered actuators (primary) : off. More... | |
errno_t | AOloopControl_DMfilteredWrite_on () |
Writing on DM, after filtering : on. More... | |
errno_t | AOloopControl_DMfilteredWrite_off () |
Writing on DM, after filtering : off. More... | |
AOloopControl - 3.4. LOOP CONTROL INTERFACE - INTEGRATOR AUTO TUNING - AOloopControl_autotune.c | |
errno_t | AOloopControl_AUTOTUNE_LIMITS_on () |
Set limit auto tune : on. More... | |
errno_t | AOloopControl_AUTOTUNE_LIMITS_off () |
Set limit auto tune : off. More... | |
errno_t | AOloopControl_set_AUTOTUNE_LIMITS_delta (float AUTOTUNE_LIMITS_delta) |
Options auto tune limit The limit is fixed at the beginning. When the fraction of mode values higher than the current limit times mcoeff is larger than perc (percentile); then the limit increases by delta. Otherwise, it decreases by delta. More... | |
errno_t | AOloopControl_set_AUTOTUNE_LIMITS_perc (float AUTOTUNE_LIMITS_perc) |
errno_t | AOloopControl_set_AUTOTUNE_LIMITS_mcoeff (float AUTOTUNE_LIMITS_mcoeff) |
errno_t | AOloopControl_AUTOTUNE_GAINS_on () |
Set gain auto tune : on. More... | |
errno_t | AOloopControl_AUTOTUNE_GAINS_off () |
Set gain auto tune : off. More... | |
AOloopControl - 3.5. LOOP CONTROL INTERFACE - PREDICTIVE FILTER ON/OFF AOloopControl_arpf_onoff.c | |
errno_t | AOloopControl_ARPFon () |
ARPF = auto regressive predictive filter: on. More... | |
errno_t | AOloopControl_ARPFoff () |
ARPF = auto regressive predictive filter: off. More... | |
AOloopControl - 3.6. LOOP CONTROL INTERFACE - TIMING PARAMETERS - AOloopControl_time_param.c | |
errno_t | AOloopControl_set_loopfrequ (float loopfrequ) |
Set AO loop frequency. More... | |
errno_t | AOloopControl_set_hardwlatency_frame (float hardwlatency_frame) |
Set hardware latency in unity of frame. More... | |
errno_t | AOloopControl_set_complatency_frame (float complatency_frame) |
Set computation latency of primary DM write in unity of frame. More... | |
errno_t | AOloopControl_set_wfsmextrlatency_frame (float wfsmextrlatency_frame) |
Set computation latency of filtered DM write mode time between the moment where the WF arrives at the WFS, and when it's written in the DM. More... | |
AOloopControl - 3.7. LOOP CONTROL INTERFACE - CONTROL LOOP PARAMETERS - AOloopControl_loop_param.c | |
errno_t | AOloopControl_setRTLOG_ON () |
errno_t | AOloopControl_setRTLOG_OFF () |
errno_t | AOloopControl_setgain (float gain) |
Set gain of the loop. More... | |
errno_t | AOloopControl_setARPFgain (float gain) |
Set ARPF gain (auto regressive predictive filter) Ex : a gain of 0.5 will correct 50% of the predicted WF. More... | |
errno_t | AOloopControl_setARPFgainAutoMin (float val) |
Set ARPF. More... | |
errno_t | AOloopControl_setARPFgainAutoMax (float val) |
Set ARPF. More... | |
errno_t | AOloopControl_setWFSnormfloor (float WFSnormfloor) |
Coefficient attenuates AO correction in low loght level. More... | |
errno_t | AOloopControl_setmaxlimit (float maxlimit) |
Set the limit maximum. More... | |
errno_t | AOloopControl_setmult (float multcoeff) |
Multiplying coefficient, close to 1, in order to avoid divergence. More... | |
errno_t | AOloopControl_setframesAve (long nbframes) |
Set an average of frames. More... | |
errno_t | AOloopControl_set_modeblock_gain (long loop, long blocknb, float gain, int add) |
Set gain of block of modes. More... | |
errno_t | AOloopControl_scanGainBlock (long NBblock, long NBstep, float gainStart, float gainEnd, long NBgain) |
Scan block gains. More... | |
AOloopControl - 4. FOCAL PLANE SPECKLE MODULATION / CONTROL - AOloopControl_fpspeckle_mod.c | |
custom FP AO routines | |
errno_t | AOloopControl_OptimizePSF_LO (const char *psfstream_name, const char *IDmodes_name, const char *dmstream_name, long delayframe, long NBframes) |
Optimize PSF low order. More... | |
errno_t | AOloopControl_DMmodulateAB (const char *IDprobeA_name, const char *IDprobeB_name, const char *IDdmstream_name, const char *IDrespmat_name, const char *IDwfsrefstream_name, double delay, long NBprobes) |
Experimental dm modulation. More... | |
AOloopControl - 5. PROCESS LOG FILES - AOloopControl_process_files.c | |
process log files | |
errno_t | AOloopControl_logprocess_modeval (const char *IDname) |
Log the process of the mode evaluation. More... | |
errno_t | AOloopControl_TweakRM (char *ZRMinname, char *DMinCname, char *WFSinCname, char *DMmaskname, char *WFSmaskname, char *RMoutname) |
tweak zonal response matrix in accordance to WFS response to modes More... | |
AOloopControl - 6. REAL-TIME LOGGING - AOloopControl_RTstreamLOG.c | |
Log real-time streams | |
errno_t | AOloopControl_RTstreamLOG_init (int loop) |
errno_t | AOloopControl_RTstreamLOG_setup (long loop, long rtlindex, char *streamname) |
void | AOloopControl_RTstreamLOG_update (long loop, long rtlindex, struct timespec tnow) |
int | AOloopControl_RTstreamLOG_printstatus (int loop) |
int | AOloopControl_RTstreamLOG_GUI (int loop) |
int | AOloopControl_RTstreamLOG_saveloop (int loop, char *dirname) |
int | AOloopControl_RTstreamLOG_set_saveON (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_saveOFF (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_ON (int loop, int rtlindex) |
int | AOloopControl_RTstreamLOG_set_OFF (int loop, int rtlindex) |
AOloopControl - 7. OBSOLETE ? | |
errno_t | AOloopControl_setgainrange (long m0, long m1, float gainval) |
errno_t | AOloopControl_setlimitrange (long m0, long m1, float limval) |
errno_t | AOloopControl_setmultfrange (long m0, long m1, float multfval) |
errno_t | AOloopControl_setgainblock (long mb, float gainval) |
errno_t | AOloopControl_setlimitblock (long mb, float limitval) |
errno_t | AOloopControl_setmultfblock (long mb, float multfval) |
errno_t | AOloopControl_AutoTune () |
Function prototypes for Adaptive Optics Control loop engine.
AO engine uses stream data structure
#define _AOLOOPCONTROL_H |
#define MAX_NUMBER_RTLOGSTREAM 20 |
#define MAX_NUMBER_TIMER 100 |
#define RTSLOGindex_dmC 13 |
#define RTSLOGindex_dmdisp 14 |
#define RTSLOGindex_imWFS0 1 |
#define RTSLOGindex_imWFS1 2 |
#define RTSLOGindex_imWFS2 3 |
#define RTSLOGindex_modeval 4 |
#define RTSLOGindex_modeval_dm 5 |
#define RTSLOGindex_modeval_dm_corr 6 |
#define RTSLOGindex_modeval_dm_now 7 |
#define RTSLOGindex_modeval_dm_now_filt 8 |
#define RTSLOGindex_modeval_ol 12 |
#define RTSLOGindex_modevalPF 9 |
#define RTSLOGindex_modevalPFres 11 |
#define RTSLOGindex_modevalPFsync 10 |
#define RTSLOGindex_wfsim 0 |
void __attribute__ | ( | (constructor) | ) |
imageID __attribute__ | ( | (hot) | ) |
Compute modes in open loop.
Main computation routine.
AOcompute() is called inside the aorun loop.
AOcompute main steps are:
[in] | paramname | long number of the loop |
[in] | paramname | int normalize |
Main AO loop function
Runs the AO loop
Calls AOcompute(), which computes the correction to the applied.
Then, the correction is applied by calling set_DM_modes() if modal correction, or by direct write to the DM otherwise.
Compute modes in open loop.
Reads WFS image and performs some basic processing
Outputs are : imWFS0, which is dark-subtracted imWFS1, which is dark-subtracted and normalized, but not reference-subtracted.
supports ring buffer puts image from camera buffer aoloopcontrol_var.aoconfID_wfsim into aoloopcontrol_var.aoconfID_imWFS1 (supplied by user)
RM = 1 if response matrix
if normalize == 1, image is normalized by dividing by (total + AOconf[loop].WFSim.WFSnormfloor)*AOconf[loop].WFSim.WFSsize if PixelStreamMode = 1, read on semaphore 1, return slice index
logs a shared memory stream onto disk uses semlog semaphore
uses data cube buffer to store frames if an image name logdata exists (should ideally be in shared mem), then this will be included in the timing txt file
Load arrays
create the 2 buffers
measure time
measure time
cases: index>zsize-1 buffer full timeout==1 && index>0 : partial
save image
errno_t AOcompute | ( | long | loop, |
int | normalize | ||
) |
Main computation function, runs once per loop iteration.
errno_t AOloopControl_aorun | ( | ) |
int AOloopControl_aorun_FPCONF | ( | char * | fpsname, |
uint32_t | CMDmode | ||
) |
int AOloopControl_aorun_GUI | ( | long | loop, |
double | frequ | ||
) |
int AOloopControl_aorun_RUN | ( | char * | fpsname | ) |
Main loop function.
errno_t AOloopControl_ARPFoff | ( | ) |
ARPF = auto regressive predictive filter: off.
errno_t AOloopControl_ARPFon | ( | ) |
ARPF = auto regressive predictive filter: on.
errno_t AOloopControl_AutoTune | ( | ) |
errno_t AOloopControl_AUTOTUNE_GAINS_off | ( | ) |
Set gain auto tune : off.
errno_t AOloopControl_AUTOTUNE_GAINS_on | ( | ) |
Set gain auto tune : on.
errno_t AOloopControl_AUTOTUNE_LIMITS_off | ( | ) |
Set limit auto tune : off.
errno_t AOloopControl_AUTOTUNE_LIMITS_on | ( | ) |
Set limit auto tune : on.
errno_t AOloopControl_AutoTuneGains | ( | long | loop, |
const char * | IDout_name, | ||
float | GainCoeff, | ||
long | NBsamples | ||
) |
Auto tune gains of the closed loop.
int AOloopControl_bogusfunc | ( | ) |
errno_t AOloopControl_CompModes_loop | ( | const char * | ID_CM_name, |
const char * | ID_WFSref_name, | ||
const char * | ID_WFSim_name, | ||
const char * | ID_WFSimtot_name, | ||
const char * | ID_coeff_name | ||
) |
Main computation function, runs once per loop iteration.
long AOloopControl_computeWFSresidualimage | ( | long | loop, |
char * | IDalpha_name | ||
) |
Compute WFS residual image.
Computes average of residual in WFS
[in] | loop | INT loop number |
[in] | alpha | FLOAT averaging coefficient |
long AOloopControl_dm2dm_offload | ( | const char * | streamin, |
const char * | streamout, | ||
float | twait, | ||
float | offcoeff, | ||
float | multcoeff | ||
) |
Mixes streamin into streamout, in order to make streamout converge to streamin.
errno_t AOloopControl_DMfilteredWrite_off | ( | ) |
Writing on DM, after filtering : off.
errno_t AOloopControl_DMfilteredWrite_on | ( | ) |
Writing on DM, after filtering : on.
errno_t AOloopControl_DMmodulateAB | ( | const char * | IDprobeA_name, |
const char * | IDprobeB_name, | ||
const char * | IDdmstream_name, | ||
const char * | IDrespmat_name, | ||
const char * | IDwfsrefstream_name, | ||
double | delay, | ||
long | NBprobes | ||
) |
Experimental dm modulation.
errno_t AOloopControl_DMprimaryWrite_off | ( | ) |
Writing on DM, unfiltered actuators (primary) : off.
errno_t AOloopControl_DMprimaryWrite_on | ( | ) |
Writing on DM, unfiltered actuators (primary) : on.
errno_t AOloopControl_GPUmodecoeffs2dm_filt_loop | ( | const int | GPUMATMULTCONFindex, |
const char * | modecoeffs_name, | ||
const char * | DMmodes_name, | ||
int | semTrigg, | ||
const char * | out_name, | ||
int | GPUindex, | ||
long | loop, | ||
int | offloadMode | ||
) |
Matrix multiplication on GPU to transfom modes coefficients into DM shape.
Compute DM map from mode values. This is a separate process
If offloadMode = 1, apply correction to aol::_dmC
errno_t AOloopControl_logoff | ( | ) |
Log off AO interface.
errno_t AOloopControl_logon | ( | ) |
Log on the AO interface.
errno_t AOloopControl_logprocess_modeval | ( | const char * | IDname | ) |
Log the process of the mode evaluation.
errno_t AOloopControl_loopkill | ( | ) |
Kill AO loop : finish the process of the run.
errno_t AOloopControl_loopoff | ( | ) |
Open AO loop : AO off.
errno_t AOloopControl_loopon | ( | ) |
Close AO loop : AO on.
errno_t AOloopControl_loopreset | ( | ) |
Reset the AO loop.
errno_t AOloopControl_loopstep | ( | long | loop, |
long | NBstep | ||
) |
Close loop for finite number of steps.
errno_t AOloopControl_loopWFScompoff | ( | ) |
Open AO loop : AO off.
errno_t AOloopControl_loopWFScompon | ( | ) |
Close AO loop : AO on.
errno_t AOloopControl_OptimizePSF_LO | ( | const char * | psfstream_name, |
const char * | IDmodes_name, | ||
const char * | dmstream_name, | ||
long | delayframe, | ||
long | NBframes | ||
) |
Optimize PSF low order.
float AOloopControl_readParam_float | ( | char * | paramname, |
float | defaultValue, | ||
FILE * | fplog | ||
) |
Read parameter value - float, char or int - AOloopControl_read_param.c.
read parameters float
Read parameter value - float, char or int - AOloopControl_read_param.c.
Read parameter value (float) from file
[in] | paramname | CHAR* parameter name |
[in] | defaultValue | FLOAT default value if file conf/param_paramname.txt not found |
[in] | fplog | FILE* log file. If NULL, do not log |
int AOloopControl_readParam_int | ( | char * | paramname, |
int | defaultValue, | ||
FILE * | fplog | ||
) |
read parameters int
Read parameter value (int) from file
[in] | paramname | CHAR* parameter name |
[in] | defaultValue | INT default value if file conf/param_paramname.txt not found |
[in] | fplog | FILE* log file. If NULL, do not log |
char* AOloopControl_readParam_string | ( | char * | paramname, |
char * | defaultValue, | ||
FILE * | fplog | ||
) |
read parameters string
Read parameter value (char*) from file
[in] | paramname | CHAR* parameter name |
[in] | defaultValue | CHAR* default value if file conf/param_paramname.txt not found |
[in] | fplog | FILE* log file. If NULL, do not log |
int AOloopControl_RTstreamLOG_GUI | ( | int | loop | ) |
errno_t AOloopControl_RTstreamLOG_init | ( | int | loop | ) |
int AOloopControl_RTstreamLOG_printstatus | ( | int | loop | ) |
int AOloopControl_RTstreamLOG_saveloop | ( | int | loop, |
char * | dirname | ||
) |
Monitors multiple real-time AO loop buffers and saves them to disk
Loop index and save directory on disk
This function runs in a dedicated in a dedicated tmux session.
It is controlled by a ncurses-based GUI.
Each real-time process maintains, for each streams, small alternating buffers where data is written at high speed. Timing/indexing buffers are also written.
This function monitors the small buffers. When a small buffer is ready/filled, it is included in a larger buffer which can be saved to disk.
The routine is designed to only occupy two threads: one to monitor, one to save
Takes timing data from the processes that create the data to achieve high performance timing
Intialize :
int AOloopControl_RTstreamLOG_set_OFF | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_ON | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_saveOFF | ( | int | loop, |
int | rtlindex | ||
) |
int AOloopControl_RTstreamLOG_set_saveON | ( | int | loop, |
int | rtlindex | ||
) |
errno_t AOloopControl_RTstreamLOG_setup | ( | long | loop, |
long | rtlindex, | ||
char * | streamname | ||
) |
Setup RT stream for logging
Creates required buffers
void AOloopControl_RTstreamLOG_update | ( | long | loop, |
long | rtlindex, | ||
struct timespec | tnow | ||
) |
Write single entry in log buffer
This function is called by the process writing to the stream to minimize IPC need and reduce logging latency
errno_t AOloopControl_scanGainBlock | ( | long | NBblock, |
long | NBstep, | ||
float | gainStart, | ||
float | gainEnd, | ||
long | NBgain | ||
) |
Scan block gains.
errno_t AOloopControl_set_AUTOTUNE_LIMITS_delta | ( | float | AUTOTUNE_LIMITS_delta | ) |
Options auto tune limit The limit is fixed at the beginning. When the fraction of mode values higher than the current limit times mcoeff is larger than perc (percentile); then the limit increases by delta. Otherwise, it decreases by delta.
errno_t AOloopControl_set_AUTOTUNE_LIMITS_mcoeff | ( | float | AUTOTUNE_LIMITS_mcoeff | ) |
errno_t AOloopControl_set_AUTOTUNE_LIMITS_perc | ( | float | AUTOTUNE_LIMITS_perc | ) |
errno_t AOloopControl_set_complatency_frame | ( | float | complatency_frame | ) |
Set computation latency of primary DM write in unity of frame.
errno_t AOloopControl_set_hardwlatency_frame | ( | float | hardwlatency_frame | ) |
Set hardware latency in unity of frame.
errno_t AOloopControl_set_loopfrequ | ( | float | loopfrequ | ) |
Set AO loop frequency.
errno_t AOloopControl_set_modeblock_gain | ( | long | loop, |
long | blocknb, | ||
float | gain, | ||
int | add | ||
) |
Set gain of block of modes.
errno_t AOloopControl_set_wfsmextrlatency_frame | ( | float | wfsmextrlatency_frame | ) |
Set computation latency of filtered DM write mode time between the moment where the WF arrives at the WFS, and when it's written in the DM.
errno_t AOloopControl_setARPFgain | ( | float | gain | ) |
Set ARPF gain (auto regressive predictive filter) Ex : a gain of 0.5 will correct 50% of the predicted WF.
errno_t AOloopControl_setARPFgainAutoMax | ( | float | val | ) |
Set ARPF.
errno_t AOloopControl_setARPFgainAutoMin | ( | float | val | ) |
Set ARPF.
errno_t AOloopControl_setframesAve | ( | long | nbframes | ) |
Set an average of frames.
errno_t AOloopControl_setgain | ( | float | gain | ) |
Set gain of the loop.
errno_t AOloopControl_setgainblock | ( | long | mb, |
float | gainval | ||
) |
errno_t AOloopControl_setgainrange | ( | long | m0, |
long | m1, | ||
float | gainval | ||
) |
errno_t AOloopControl_setlimitblock | ( | long | mb, |
float | limitval | ||
) |
errno_t AOloopControl_setlimitrange | ( | long | m0, |
long | m1, | ||
float | limval | ||
) |
errno_t AOloopControl_setLoopNumber | ( | long | loop | ) |
Set loop number. Ex : for the Pyramid WFS, loop number = 0.
append process name with loop number
errno_t AOloopControl_setmaxlimit | ( | float | maxlimit | ) |
Set the limit maximum.
errno_t AOloopControl_setmult | ( | float | multcoeff | ) |
Multiplying coefficient, close to 1, in order to avoid divergence.
errno_t AOloopControl_setmultfblock | ( | long | mb, |
float | multfval | ||
) |
errno_t AOloopControl_setmultfrange | ( | long | m0, |
long | m1, | ||
float | multfval | ||
) |
errno_t AOloopControl_setparam | ( | long | loop, |
const char * | key, | ||
double | value | ||
) |
Set one function for many parameters.
errno_t AOloopControl_setRTLOG_OFF | ( | ) |
errno_t AOloopControl_setRTLOG_ON | ( | ) |
errno_t AOloopControl_setWFSnormfloor | ( | float | WFSnormfloor | ) |
Coefficient attenuates AO correction in low loght level.
long AOloopControl_sig2Modecoeff | ( | const char * | WFSim_name, |
const char * | IDwfsref_name, | ||
const char * | WFSmodes_name, | ||
const char * | outname | ||
) |
CPU matrix multiplication to transfom WFS signal into modes coefficients.
errno_t AOloopControl_TweakRM | ( | char * | ZRMinname, |
char * | DMinCname, | ||
char * | WFSinCname, | ||
char * | DMmaskname, | ||
char * | WFSmaskname, | ||
char * | RMoutname | ||
) |
tweak zonal response matrix in accordance to WFS response to modes
errno_t AOloopControl_WFSzeropoint_sum_update_loop | ( | long | loopnb, |
const char * | ID_WFSzp_name, | ||
int | NBzp, | ||
const char * | IDwfsref0_name, | ||
const char * | IDwfsref_name | ||
) |
WFS sum zero point update.
errno_t AOloopControl_WFSzpupdate_loop | ( | const char * | IDzpdm_name, |
const char * | IDzrespM_name, | ||
const char * | IDwfszp_name | ||
) |
WFS zero point update.
errno_t ControlMatrixMultiply | ( | float * | cm_array, |
float * | imarray, | ||
long | m, | ||
long | n, | ||
float * | outvect | ||
) |
CPU based matrix-vector multiplication - when no GPU.
errno_t set_DM_modes | ( | long | loop | ) |
Sends modal commands to DM by matrix-vector multiplication.
Send modal commands to DM.
Converts mode coefficient to DM map by matrix-vector multiplication
Runs in CPU or GPU.
Takes mode values from aol_DMmode_cmd (ID = aoloopcontrol_var.aoconfID_cmd_modes)
[in] | paramname | long number of the loop |
errno_t set_DM_modesRM | ( | long | loop | ) |
Response Matrix DM-WFS.
Set deformable mirror modes related to the response matrix
Takes mode values from ????????,
[in] | paramname | long number of the loop |