cacao  Release 0.1.03-dev
Compute And Control For Adaptive Optics
AOloopControl_dm.c File Reference

AO loop Control functions wave front sensor and deformable mirror. More...

#include <time.h>
#include <string.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_blas.h>
#include <pthread.h>
#include "CommandLineInterface/CLIcore.h"
#include "AOloopControl/AOloopControl.h"
#include "00CORE/00CORE.h"
#include "info/info.h"
#include "COREMOD_memory/COREMOD_memory.h"
#include "COREMOD_iofits/COREMOD_iofits.h"
#include "AOloopControl_IOtools/AOloopControl_IOtools.h"
Include dependency graph for AOloopControl_dm.c:

Macros

#define _GNU_SOURCE
 
#define NB_AOloopcontrol   10
 

Functions

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 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...
 
imageID 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...
 

Variables

static struct timespec tnow
 
static struct timespec tdiff
 
static double tdiffv
 
AOLOOPCONTROL_CONFAOconf
 CLI function for AOloopControl_setframesAve. More...
 
AOloopControl_var aoloopcontrol_var
 

Detailed Description

AO loop Control functions wave front sensor and deformable mirror.

REAL TIME COMPUTING ROUTINES

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ NB_AOloopcontrol

#define NB_AOloopcontrol   10

Function Documentation

◆ AOloopControl_dm2dm_offload()

imageID 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.

◆ AOloopControl_GPUmodecoeffs2dm_filt_loop()

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.

Purpose

Compute DM map from mode values. This is a separate process

If offloadMode = 1, apply correction to aol::_dmC

◆ set_DM_modes()

errno_t set_DM_modes ( long  loop)

Sends modal commands to DM by matrix-vector multiplication.

Purpose

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)

Arguments

Parameters
[in]paramnamelong number of the loop

◆ set_DM_modesRM()

errno_t set_DM_modesRM ( long  loop)

Response Matrix DM-WFS.

Purpose

Set deformable mirror modes related to the response matrix

Takes mode values from ????????,

Arguments

Parameters
[in]paramnamelong number of the loop

Variable Documentation

◆ AOconf

CLI function for AOloopControl_setframesAve.

◆ aoloopcontrol_var

AOloopControl_var aoloopcontrol_var

◆ tdiff

struct timespec tdiff
static

◆ tdiffv

double tdiffv
static

◆ tnow

struct timespec tnow
static