TwiceAsNice  2019-02-18
Functions | Variables
calibrateIM Namespace Reference

Functions

def connectAdSec (endpoint)
 
def connectBcu (prefix)
 
def initAdSec ()
 
def preparePushPullDist ()
 
def disturb ()
 
def getSlopeData ()
 
def getFrameCounters ()
 
def extractSlopes ()
 
def createInteractionMat ()
 
def createReconstructionMat ()
 
def averageReconstructionMat (recMats)
 
def averageInteractionMat (intMats)
 
def saveLut ()
 

Variables

 level
 
 config = Application.config()
 
 numberOfDistBlocks = config.node("BCU.IM.MUM_DIST_BLOCK").Int
 
 pushpullBlockSize = config.node("BCU.IM.PUSH_PULL_BLOCK_SIZE").Int
 
 skip = config.node("ADSEC.SKIP").Int
 
 endpoint = config.node("ADSEC.ENDPOINT").String
 
 framerate = float(config.node("ADSEC.FRAMERATE").Int)
 
 diagChanDecimation = config.node("ADSEC.DECIM").Int
 
 RestoreShape = config.node("ADSEC.RESTORE").Bool
 
 ShapeFile = config.node("ADSEC.SHAPEFILE").String
 
 ovsFactor = config.node("ADSEC.OVS").Float
 
 ovs = float(framerate) * ovsFactor
 
int maxovs = 600
 
 bankID = ADSEC.Bank.BankA
 
 numberOfModes = config.node("BCU.IM.NUM_MODES").Int
 
 prefix = config.node("BCU.PREFIX").String
 
 gainVec = None
 
 aim = interaction.InteractionMatrix(config.node('BCU'))
 
def bcuCtrl = connectBcu( prefix )
 
def loop = connectAdSec(endpoint)
 
 recMats = np.zeros((int(sys.argv[2]), 672, 1600 ))
 
 intMats = np.zeros((int(sys.argv[2]), 1600, 672 ))
 
string resultFilePrefix = strftime("%Y-%m-%d-%H-%M", gmtime()) +"_Rot" \
 

Function Documentation

◆ averageInteractionMat()

def calibrateIM.averageInteractionMat (   intMats)

◆ averageReconstructionMat()

def calibrateIM.averageReconstructionMat (   recMats)

◆ connectAdSec()

def calibrateIM.connectAdSec (   endpoint)
Connects to AdSec arbitrator service 

Parameters
----------
endpoint :  string 
    Ice Endpoint of the AdSec ICE interface

◆ connectBcu()

def calibrateIM.connectBcu (   prefix)
Creates an instance of the BcuCtrl helper class for calibration.

Parameters
----------
prefix :  string 
    Config prefix of Bcu service

◆ createInteractionMat()

def calibrateIM.createInteractionMat ( )
Build and save the interaction matrix which has been created from the 
extracted slopes

◆ createReconstructionMat()

def calibrateIM.createReconstructionMat ( )
Create and save the inversted interaction matrix which now the 
reconstruction matrix

◆ disturb()

def calibrateIM.disturb ( )
Runs the disturbance and send slopes over the fastlink

◆ extractSlopes()

def calibrateIM.extractSlopes ( )
Extracts all disturbance slope frames from the ringbuffer

◆ getFrameCounters()

def calibrateIM.getFrameCounters ( )
Download the vector of framecounters from the AdSec slope buffer.

Returns
-------
out : ndarray of frame counters

◆ getSlopeData()

def calibrateIM.getSlopeData ( )
Download the complete slope buffer from the AdSec 

Returns
-------
out : ndarray 
    slopes vectors. The slopes are in the order of the bcu output.

◆ initAdSec()

def calibrateIM.initAdSec ( )
Initializes the Adsec and clears the slope ringbuffer. 

After flushing the AdSecAo is set to pause. No additional slope frames 
should be written to the slope ringbuffer before starting the disturbance!

◆ preparePushPullDist()

def calibrateIM.preparePushPullDist ( )
Creates a disturbance matrix with a push/pull sequence and uploades it to 
the AdSec

◆ saveLut()

def calibrateIM.saveLut ( )

Variable Documentation

◆ aim

calibrateIM.aim = interaction.InteractionMatrix(config.node('BCU'))

◆ bankID

calibrateIM.bankID = ADSEC.Bank.BankA

◆ bcuCtrl

def calibrateIM.bcuCtrl = connectBcu( prefix )

◆ config

calibrateIM.config = Application.config()

◆ diagChanDecimation

calibrateIM.diagChanDecimation = config.node("ADSEC.DECIM").Int

◆ endpoint

calibrateIM.endpoint = config.node("ADSEC.ENDPOINT").String

◆ framerate

calibrateIM.framerate = float(config.node("ADSEC.FRAMERATE").Int)

◆ gainVec

calibrateIM.gainVec = None

◆ intMats

calibrateIM.intMats = np.zeros((int(sys.argv[2]), 1600, 672 ))

◆ level

calibrateIM.level

◆ loop

def calibrateIM.loop = connectAdSec(endpoint)

◆ maxovs

int calibrateIM.maxovs = 600

◆ numberOfDistBlocks

calibrateIM.numberOfDistBlocks = config.node("BCU.IM.MUM_DIST_BLOCK").Int

◆ numberOfModes

calibrateIM.numberOfModes = config.node("BCU.IM.NUM_MODES").Int

◆ ovs

calibrateIM.ovs = float(framerate) * ovsFactor

◆ ovsFactor

calibrateIM.ovsFactor = config.node("ADSEC.OVS").Float

◆ prefix

calibrateIM.prefix = config.node("BCU.PREFIX").String

◆ pushpullBlockSize

calibrateIM.pushpullBlockSize = config.node("BCU.IM.PUSH_PULL_BLOCK_SIZE").Int

◆ recMats

calibrateIM.recMats = np.zeros((int(sys.argv[2]), 672, 1600 ))

◆ RestoreShape

calibrateIM.RestoreShape = config.node("ADSEC.RESTORE").Bool

◆ resultFilePrefix

string calibrateIM.resultFilePrefix = strftime("%Y-%m-%d-%H-%M", gmtime()) +"_Rot" \

◆ ShapeFile

calibrateIM.ShapeFile = config.node("ADSEC.SHAPEFILE").String

◆ skip

calibrateIM.skip = config.node("ADSEC.SKIP").Int