Commit c4c98111 authored by Yoann Sallaz Damaz's avatar Yoann Sallaz Damaz
Browse files

in progress

parent ecf5eb69
# -*- coding: utf-8 -*-
"""Top-level package for BM07 project."""
__author__ = """BCU Team"""
__email__ = 'bliss@esrf.fr'
__version__ = '0.1.0'
"""bm07: BLISS controller and macro for bm07"""
......@@ -102,7 +102,8 @@ tab_nrj=[
("Eu", "L3", 22.021, 1.77610),
("Nd", "L2", 22.863, 1.84400),
("Sm", "L3", 22.884, 1.84570),
("Mn", "K", 23.513, 1.89643)]
("Mn", "K", 23.513, 1.89643),
("Yo", "ann", 25.000, 0.496)]
##########################################################################
......
from bliss.controllers.motor import CalcController
from bliss.common import log
from bliss.common.logtools import *
class SyncMotors(controllers):
def __init__(self, *args, **kwargs):
CalcController.__init__(self, *args, **kwargs)
# class SyncMotors(controllers):
# def __init__(self, *args, **kwargs):
# CalcController.__init__(self, *args, **kwargs)
def initialize_axis(self, axis):
CalcController.initialize_axis(self, axis)
axis.no_offset = True
# def initialize_axis(self, axis):
# CalcController.initialize_axis(self, axis)
# axis.no_offset = True
def calc_from_real(self, positions_dict):
log.info("[SyncMotors] calc_from_real()")
log.info("[SyncMotors]\treal: %s" % positions_dict)
# def calc_from_real(self, positions_dict):
# log_info(self,"[SyncMotors] calc_from_real()")
# log_info(self,"[SyncMotors]\treal: %s" % positions_dict)
calc_dict = dict()
# calc_dict = dict()
calc_dict.update(
{
"hoffset": (positions_dict["back"] - positions_dict["front"]) / 2.0,
"hgap": positions_dict["back"] + positions_dict["front"],
}
)
# calc_dict.update(
# {
# "hoffset": (positions_dict["back"] - positions_dict["front"]) / 2.0,
# "hgap": positions_dict["back"] + positions_dict["front"],
# }
# )
log.info("[SyncMotors]\tcalc: %s" % calc_dict)
# log_info(self,"[SyncMotors]\tcalc: %s" % calc_dict)
return calc_dict
# return calc_dict
def calc_to_real(self, positions_dict):
log.info("[SyncMotors] calc_to_real()")
log.info("[SyncMotors]\tcalc: %s" % positions_dict)
# def calc_to_real(self, positions_dict):
# log_info(self,"[SyncMotors] calc_to_real()")
# log_info(self,"[SyncMotors]\tcalc: %s" % positions_dict)
real_dict = dict()
slit_type = self.config.get("slit_type", default="both")
# real_dict = dict()
# slit_type = self.config.get("slit_type", default="both")
real_dict.update(
{
"back": (positions_dict["hgap"] / 2.0) + positions_dict["hoffset"],
"front": (positions_dict["hgap"] / 2.0) - positions_dict["hoffset"],
}
)
# real_dict.update(
# {
# "back": (positions_dict["hgap"] / 2.0) + positions_dict["hoffset"],
# "front": (positions_dict["hgap"] / 2.0) - positions_dict["hoffset"],
# }
# )
log.info("[SyncMotors]\treal: %s" % real_dict)
# log_info(self,"[SyncMotors]\treal: %s" % real_dict)
return real_dict
# return real_dict
......@@ -2,11 +2,19 @@ from bliss.config.static import get_config
from bliss.shell.cli.user_dialog import UserInput, UserCheckBox, UserChoice, BlissWizard
from bliss.shell.cli.pt_widgets import BlissDialog
from bliss import global_map
from bliss.setup_globals import *
from bliss.common.standard import mv, mvr
import numpy as np
import datetime
from .geofip import geofip, tab_nrj
def change_energy(value):
mv(energy,value)
def trajectoire_mono()
def geofip_fill_beam_save():
import math
......@@ -55,7 +63,10 @@ def beam_save():
cc = get_config()
cc.reload()
optical_conf = cc.get("optical_setup")
dict_pos_mot = {"omega2":15520, "gamma2":15465}
dict_pos_mot = {"omega2":omega.position,
"gamma2":gamma2.position,
"khi2":khi2.position
}
today_str = datetime.datetime.today().strftime('%Y-%m-%d_%H-%M')
......
def centrebeam():
pass
def quick_realign():
pass
\ No newline at end of file
......@@ -41,6 +41,6 @@ setup(
test_suite='tests',
tests_require=test_requirements,
url='https://gitlab.esrf.fr/BM07/bm07',
version='0.1.0',
version='0.2.0',
zip_safe=False,
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment