TwiceAsNice
2019-02-18
|
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" \ |
def calibrateIM.averageInteractionMat | ( | intMats | ) |
def calibrateIM.averageReconstructionMat | ( | recMats | ) |
def calibrateIM.connectAdSec | ( | endpoint | ) |
Connects to AdSec arbitrator service Parameters ---------- endpoint : string Ice Endpoint of the AdSec ICE interface
def calibrateIM.connectBcu | ( | prefix | ) |
Creates an instance of the BcuCtrl helper class for calibration. Parameters ---------- prefix : string Config prefix of Bcu service
def calibrateIM.createInteractionMat | ( | ) |
Build and save the interaction matrix which has been created from the extracted slopes
def calibrateIM.createReconstructionMat | ( | ) |
Create and save the inversted interaction matrix which now the reconstruction matrix
def calibrateIM.disturb | ( | ) |
Runs the disturbance and send slopes over the fastlink
def calibrateIM.extractSlopes | ( | ) |
Extracts all disturbance slope frames from the ringbuffer
def calibrateIM.getFrameCounters | ( | ) |
Download the vector of framecounters from the AdSec slope buffer. Returns ------- out : ndarray of frame counters
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.
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!
def calibrateIM.preparePushPullDist | ( | ) |
Creates a disturbance matrix with a push/pull sequence and uploades it to the AdSec
def calibrateIM.saveLut | ( | ) |
calibrateIM.aim = interaction.InteractionMatrix(config.node('BCU')) |
calibrateIM.bankID = ADSEC.Bank.BankA |
def calibrateIM.bcuCtrl = connectBcu( prefix ) |
calibrateIM.config = Application.config() |
calibrateIM.diagChanDecimation = config.node("ADSEC.DECIM").Int |
calibrateIM.endpoint = config.node("ADSEC.ENDPOINT").String |
calibrateIM.framerate = float(config.node("ADSEC.FRAMERATE").Int) |
calibrateIM.gainVec = None |
calibrateIM.intMats = np.zeros((int(sys.argv[2]), 1600, 672 )) |
calibrateIM.level |
def calibrateIM.loop = connectAdSec(endpoint) |
int calibrateIM.maxovs = 600 |
calibrateIM.numberOfDistBlocks = config.node("BCU.IM.MUM_DIST_BLOCK").Int |
calibrateIM.numberOfModes = config.node("BCU.IM.NUM_MODES").Int |
calibrateIM.ovsFactor = config.node("ADSEC.OVS").Float |
calibrateIM.prefix = config.node("BCU.PREFIX").String |
calibrateIM.pushpullBlockSize = config.node("BCU.IM.PUSH_PULL_BLOCK_SIZE").Int |
calibrateIM.recMats = np.zeros((int(sys.argv[2]), 672, 1600 )) |
calibrateIM.RestoreShape = config.node("ADSEC.RESTORE").Bool |
calibrateIM.ShapeFile = config.node("ADSEC.SHAPEFILE").String |
calibrateIM.skip = config.node("ADSEC.SKIP").Int |