next some base classed copied and commented to local scripts
This commit is contained in:
@ -154,7 +154,7 @@ print(' 1) phoenix_server = PhoenixBL() ... takes code from server version '
|
||||
print('SERBVR VERSION DOES NOT WORK ANYMORE ')
|
||||
print('FOLDER SCRUIPT SEEMS TO BE NON_STANDARD!!!!!!! ')
|
||||
|
||||
#phoenix_server=PhoenixBL()
|
||||
phoenix_server=PhoenixBL()
|
||||
|
||||
print(' 2) phoenix=PH.PhoenixBL() ... on inpython shell only! (for debugging)')
|
||||
|
||||
|
@ -5,9 +5,33 @@
|
||||
#
|
||||
#####################################################
|
||||
|
||||
|
||||
####################
|
||||
#
|
||||
# TRIGGER/Delay
|
||||
#
|
||||
###################
|
||||
|
||||
phoenix_trigger:
|
||||
description: Trigger
|
||||
deviceClass: phoenix_bec.devices.phoenix_trigger.PhoenixTrigger
|
||||
deviceConfig:
|
||||
prefix: 'X07MB-OP2:'
|
||||
deviceTags:
|
||||
- phoenix
|
||||
- trigger
|
||||
- phoenix_devices.yaml
|
||||
onFailure: buffer
|
||||
enabled: true
|
||||
readoutPriority: async
|
||||
softwareTrigger: false
|
||||
|
||||
############################
|
||||
#
|
||||
# MOTORS ES1
|
||||
#
|
||||
############################
|
||||
|
||||
|
||||
ScanX:
|
||||
readoutPriority: baseline
|
||||
|
@ -0,0 +1 @@
|
||||
from PhoenixTrigger import PhoenixTrigger
|
@ -302,17 +302,8 @@ class FalconSetup(CustomDetectorMixin):
|
||||
"""
|
||||
mapping = int(mapping_mode)
|
||||
trigger = trigger_source
|
||||
self.parent.collect_mode.put(mapping)
|
||||
self.parent.pixel_advance_mode.put(trigger)
|
||||
self.parent.ignore_gate.put(ignore_gate)
|
||||
|
||||
|
||||
class FalconcSAXS(PSIDetectorBase):
|
||||
"""
|
||||
Falcon Sitoro detector for CSAXS
|
||||
|
||||
Parent class: PSIDetectorBase
|
||||
|
||||
self.parent.collect_mode.put(m
|
||||
prefix ---- X07MB-ES-MA1:
|
||||
class attributes:
|
||||
custom_prepare_cls (FalconSetup) : Custom detector setup class for cSAXS,
|
||||
inherits from CustomDetectorMixin
|
||||
@ -325,6 +316,7 @@ class FalconcSAXS(PSIDetectorBase):
|
||||
|
||||
# Specify which functions are revealed to the user in BEC client
|
||||
USER_ACCESS = ["describe"]
|
||||
prefix ---- X07MB-ES-MA1:
|
||||
|
||||
# specify Setup class
|
||||
custom_prepare_cls = FalconSetup
|
||||
|
@ -12,8 +12,6 @@ from ophyd_devices.interfaces.base_classes.psi_detector_base import PSIDetectorB
|
||||
from bec_lib import bec_logger, messages
|
||||
from bec_lib.endpoints import MessageEndpoints
|
||||
|
||||
import time
|
||||
|
||||
logger = bec_logger.logger
|
||||
|
||||
DETECTOR_TIMEOUT = 5
|
||||
@ -52,9 +50,8 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
||||
logger.success('PhoenixTrigger on stage')
|
||||
|
||||
def on_trigger(self):
|
||||
|
||||
print('on_trigger')
|
||||
self.parent.start_smpl.put(1)
|
||||
time.sleep(0.05) # use blocking
|
||||
logger.success('PhoenixTrigger on_trigger')
|
||||
|
||||
return self.wait_with_status(
|
||||
@ -74,7 +71,7 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
||||
|
||||
|
||||
def on_complete(self):
|
||||
|
||||
print('on_complete')
|
||||
timeout =10
|
||||
|
||||
|
||||
|
@ -38,35 +38,32 @@ print_dic('instance of device device_ins',device_ins)
|
||||
print(' ')
|
||||
print('DEFINE class StageXY... prefix variable not defined ')
|
||||
|
||||
|
||||
class StageXY(Device):
|
||||
|
||||
print('in StageXY')
|
||||
try:
|
||||
print('prefix',prefix)
|
||||
except:
|
||||
print('prefix not defined')
|
||||
# Here the whole namespace and finctionality
|
||||
# of Device(Blueskyinterface,Pphydobject) is inherited
|
||||
# into class StageXY using Device
|
||||
# device requires as input parameters the prefix
|
||||
# in the initialization of Cpt there is some magic
|
||||
# hard to understand, moist likely using calss methods..
|
||||
#
|
||||
|
||||
x = Cpt(EpicsMotor, 'ScanX')
|
||||
y = Cpt(EpicsMotor, 'ScanY')
|
||||
# end class
|
||||
|
||||
class StageXY2(Device):
|
||||
#def __init__(self,prefix,name=''):
|
||||
# print('in StageXY')
|
||||
# print(prefix)
|
||||
##print('prefix',prefix)
|
||||
|
||||
x = Cpt(EpicsMotor, 'ScanX')
|
||||
y = Cpt(EpicsMotor, 'ScanY')
|
||||
|
||||
|
||||
|
||||
print()
|
||||
print('init xy_stage, use input parameter from Device and prefix is defined')
|
||||
xy_stage = StageXY('X07MB-ES-MA1:', name='stage')
|
||||
print('init xy_stage, use input parameter from Device and prefix is defined in call ')
|
||||
xy_stage = StageXY('X07MB-ES-MA1:', name='stageXXX')
|
||||
|
||||
print_dic('class StageXY',StageXY)
|
||||
print_dic('instance of StageXY',xy_stage)
|
||||
|
||||
|
||||
|
||||
#############################################
|
||||
# This is basic bluesky
|
||||
# Epics motor def seems to use init params in device, whcih are
|
||||
|
@ -1,8 +0,0 @@
|
||||
This diretory is for scripts, test etc. which are not loaded into the server.
|
||||
|
||||
Hence no directory should contain a file named
|
||||
__init__.py
|
||||
|
||||
|
||||
For now we keep it in the phoenix_bec structure, but for operation, such files should be located out side of the
|
||||
bec_phoenix plugin.
|
@ -39,21 +39,10 @@ class PhoenixBL():
|
||||
init PhoenixBL() in phoenix_bec/scripts
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
print('..... init PhoenixBL from phoenix_bec/scripts/phoenix.py')
|
||||
|
||||
#from ophyd import Device, EpicsMotor, EpicsSignal, EpicsSignalRO
|
||||
#from ophyd import Component as Cpt
|
||||
#self.ScanX = EpicsMotor(name='ScanX',prefix='X07MB-ES-MA1:ScanX')
|
||||
#self.ScanY = EpicsMotor(name='ScanY',prefix='X07MB-ES-MA1:ScanY')
|
||||
#self.DIODE = EpicsSignal(name='SI',read_pv='X07MB-OP2-SAI_07:MEAN')
|
||||
#self.SIG = Cpt(EpicsSignal,name='we',read_pv="X07MB-OP2-SAI_07:MEAN")
|
||||
#self.SMPL = EpicsSignal(name='SMPL',read_pv='X07MB-OP2:SMPL')
|
||||
#self.CYCLES = EpicsSignal(name='SMPL',read_pv='X07MB-OP2:TOTAL-CYCLES',write_pv='X07MB-OP2:TOTAL-CYCLES')
|
||||
|
||||
# load local configuration
|
||||
|
||||
self.path_scripts_local = '/data/test/x07mb-test-bec/bec_deployment/phoenix_bec/phoenix_bec/local_scripts/'
|
||||
@ -90,3 +79,4 @@ class PhoenixBL():
|
||||
def show_phoenix_setup(self):
|
||||
print(self.path_phoenix_bec)
|
||||
os.system('cat '+self.path_phoenix_bec+'phoenix_bec/scripts/Current_setup.txt')
|
||||
|
||||
|
Reference in New Issue
Block a user