enable adding of configs to existing configs some fixes
This commit is contained in:
@ -104,14 +104,12 @@ print("...... %ph_load_xmap ... to reload xmap configuration")
|
||||
|
||||
|
||||
@register_line_magic
|
||||
def ph_load_xmap(line):
|
||||
|
||||
###
|
||||
# magic for loading xmap
|
||||
###
|
||||
|
||||
def ph_add_xmap(line):
|
||||
"""
|
||||
magic for loading xmap
|
||||
"""
|
||||
t0 = tt.time()
|
||||
phoenix_server.add_xmap()
|
||||
phoenix.add_xmap()
|
||||
print("elapsed time:", tt.time() - t0)
|
||||
|
||||
|
||||
@ -121,28 +119,42 @@ print("...... %ph_load_falcon ... to reload falcon configuration")
|
||||
|
||||
|
||||
@register_line_magic
|
||||
def ph_load_falcon(line):
|
||||
|
||||
# magic to load falcon
|
||||
|
||||
def ph_add_falcon(line):
|
||||
"""
|
||||
magic to add falcon to existing configuration
|
||||
"""
|
||||
t0 = tt.time()
|
||||
phoenix_server.add_falcon()
|
||||
phoenix.add_falcon()
|
||||
print("elapsed time:", tt.time() - t0)
|
||||
|
||||
|
||||
# enddef
|
||||
## enddef
|
||||
|
||||
|
||||
@register_line_magic
|
||||
def ph_load_falcon(line):
|
||||
"""
|
||||
magic to load falcon as sole detector
|
||||
"""
|
||||
t0 = tt.time()
|
||||
phoenix.load_falcon()
|
||||
print("elapsed time:", tt.time() - t0)
|
||||
|
||||
|
||||
print("...... %ph_load_config ... to reload phoenix default configuration")
|
||||
|
||||
|
||||
@register_line_magic
|
||||
def ph_load_config(line):
|
||||
def ph_create_config(line):
|
||||
"""
|
||||
load base configuration
|
||||
"""
|
||||
t0 = tt.time()
|
||||
phoenix_server.add_phoenix_config()
|
||||
phoenix.create_base_config()
|
||||
print("elapsed time:", tt.time() - t0)
|
||||
|
||||
|
||||
# enddef
|
||||
### enddef
|
||||
|
||||
|
||||
@register_line_magic
|
||||
@ -151,6 +163,9 @@ def ph_restart_bec_server(line):
|
||||
os.system('gnome-terminal --geometry 120X50 -- bash -c "bec-server attach; exec bash"')
|
||||
|
||||
|
||||
### enddef
|
||||
|
||||
|
||||
##@register_line_magic
|
||||
# def ph_post_startup(line):
|
||||
# print('import phoenix_bec.bec_ipython_client.startup.post_startup does not work caused loop ')
|
||||
|
@ -137,3 +137,7 @@ SAI_08_MEAN:
|
||||
enabled: true
|
||||
readOnly: true
|
||||
softwareTrigger: false
|
||||
|
||||
#
|
||||
# END OF STANDARD CONFIG
|
||||
#
|
||||
|
@ -1,14 +1,21 @@
|
||||
|
||||
#
|
||||
# falcon without hdf5
|
||||
#
|
||||
falcon_nohdf5:
|
||||
description: Falcon detector x-ray fluoresence II
|
||||
deviceClass: phoenix_bec.devices.falcon_phoenix_no_hdf5.FalconPhoenix
|
||||
description: Falcon detector x-ray fluoresence with hdf5 plugin
|
||||
deviceClass: phoenix_bec.devices.falcon_phoenix.FalconPhoenix
|
||||
deviceConfig:
|
||||
prefix: 'X07MB-SITORO:'
|
||||
deviceTags:
|
||||
- phoenix
|
||||
- falcon
|
||||
- no hdf5
|
||||
- phoenix_devices.yaml
|
||||
- with hdf5
|
||||
- phoenix_falcon.yaml
|
||||
onFailure: buffer
|
||||
enabled: true
|
||||
readoutPriority: async
|
||||
softwareTrigger: false
|
||||
#
|
||||
# END FALCON with HDF5
|
||||
#
|
@ -1,3 +1,7 @@
|
||||
#
|
||||
# Configuration XMAP without hdf5
|
||||
#
|
||||
|
||||
xmap_nohdf5:
|
||||
description: XMAP detector x-ray fluoresence II
|
||||
deviceClass: phoenix_bec.devices.xmap_phoenix_no_hdf5.XMAPPhoenix
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
Directory for general phoenix specific python code
|
||||
|
||||
|
||||
to autoload register in __init__.py
|
||||
|
||||
|
||||
|
@ -103,13 +103,18 @@ class PhoenixBL:
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def add_falcon(self):
|
||||
print("add_falcon")
|
||||
print("add_falcon to existing configuration ")
|
||||
|
||||
os.system(
|
||||
"cat " + self.path_devices + "phoenix_falcon.yaml" + " >> " + self.file_devices_tmp
|
||||
)
|
||||
bec.config.update_session_with_file(self.file_devices_tmp)
|
||||
|
||||
def load_falcon(self):
|
||||
|
||||
print("load_falcon")
|
||||
bec.config.update_session_with_file(self.path_devices + "phoenix_falcon.yaml")
|
||||
|
||||
def show_phoenix_setup(self):
|
||||
print(self.path_phoenix_bec)
|
||||
os.system("cat " + self.path_phoenix_bec + "phoenix_bec/scripts/Current_setup.txt")
|
||||
@ -137,25 +142,26 @@ class PhoenixBL:
|
||||
|
||||
class PhGroup:
|
||||
"""
|
||||
Class to create data groups
|
||||
compatible with larch groups
|
||||
Class to create data groups
|
||||
compatible with larch groups
|
||||
|
||||
initialize by
|
||||
initialize by
|
||||
|
||||
ww=PhGroup('YourLabel')
|
||||
ww=PhGroup('YourLabel')
|
||||
|
||||
it creates a group
|
||||
with default attributes
|
||||
it creates a group
|
||||
with default attributes
|
||||
|
||||
ww.label = 'YourLabel' --- for compatibility with larch groups
|
||||
ww.description =YourLabel'
|
||||
ww.label = 'YourLabel' --- for compatibility with larch groups
|
||||
ww.description =YourLabel'
|
||||
|
||||
Further data can be added with new tags by
|
||||
Further data can be added with new tags by
|
||||
|
||||
ww.newtag=67
|
||||
ww.newtag=67
|
||||
(bec_venv) [gac-x07mb@x07mb-bec-001 phoenix_bec]$
|
||||
|
||||
ww.keys() -- list all keys
|
||||
ww.linescan2group -- converts bec linescan data to group format
|
||||
ww.keys() -- list all keys
|
||||
ww.linescan2group -- converts bec linescan data to group format
|
||||
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user