BladePositioning.py 973 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 10 14:02:34 2016

@author: hermann_b & sauerwein_n
"""
import numpy as np
import os

import Devices.BladePositioningTools.smaract as s
from Devices.BladePositioningTools.correction_factor import cor

'''
config file:
pos_R:              angle of rotational stage [degree]
pos_L:              radius of blade set by linear stage [mm]

measurement file (n.a)
'''

21 22
default_config = {'pos_R': 329, 'pos_L':-1.6}

23
class BladePositioning:
24 25 26
    def __init__(self, config, init = 1):
        if init:
            s.init()
27
        
28 29 30 31 32 33 34 35 36
        self.config = config
    @property
    def config(self):
        config = {}
        config['pos_R'] = s.getposR()
        config['pos_L'] = s.getposL() - cor(s.getposR())
        return config
    
    @config.setter
37 38 39
    def set_config(self, config):
        s.maaR(config['pos_R'])
        s.mpaL(config['pos_L']+cor(s.getposR()))
40
        
Nick Sauerwein's avatar
Nick Sauerwein committed
41 42
        print ('cor: ', cor(s.getposR()))
        
43

44 45