Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hzb/bluesky/beamlines_endstations/se_lab/source/beamlinetools
1 result
Show changes
Commits on Source (4)
......@@ -38,13 +38,13 @@ from pprint import pprint
#genCodeDir = "/opt/bluesky/beamlinetools/devices"
# # Connect to Gas Dosing SEC Node and generate ophyd device trees
gas_d = SECoPNodeDevice.create('localhost','10800',RE.loop)
#gas_d = SECoPNodeDevice.create('localhost','10800',RE.loop)
# # Connect to Reactor Cell SEC Node and generate ophyd device tree
reactor_c = SECoPNodeDevice.create('localhost','10801',RE.loop)
reactor_cell = SECoPNodeDevice.create('172.31.21.227','2201', RE.loop)
gas_d.class_from_instance()
reactor_c.class_from_instance()
#gas_d.class_from_instance()
reactor_cell.class_from_instance()
reactor_c:Reactor_cell = reactor_c
gas_d:Gas_dosing = gas_d
reactor_cell:Reactor_cell = reactor_cell
#gas_d:Gas_dosing = gas_d
from IPython import get_ipython
from beamlinetools.magics.simplify_syntax import Simplify
from beamlinetools.magics.peakinfo import PeakInfoMagic
from bluesky.magics import BlueskyMagics
from beamlinetools.magics.standard_magics import BlueskyMagicsBessy
from IPython import get_ipython
from .base import RE, bec
from beamlinetools.BEAMLINE_CONFIG.base import RE
## IMPORTANT : do not change the order of the follwing two lines.
# standard magics
get_ipython().register_magics(BlueskyMagics)
# custom magics - it will override some standard magics
label_axis_dict = {
"temperature_regulator": ["reactor_c.temperature_reg.target",
"reactor_c.temperature_reg.value",
......@@ -24,6 +21,7 @@ label_axis_dict = {
"gas_d.backpressure_contr1.status",
]
}
exclude_labels_from_wa=['detectors', 'motors']
get_ipython().register_magics(BlueskyMagicsBessy(RE,
get_ipython(),
......
......@@ -504,7 +504,7 @@ class BlueskyMagicsBessy(Magics, metaclass=MetaclassForClassProperties):
if ".readback" in ax:
ax_to_print = ax.replace(".readback","")
lines.append(LINE_FMT.format(ax , axis_value))
lines.append(LINE_FMT.format(ax_to_print , axis_value))
print('\n'.join(lines))
continue
print()
......
......@@ -104,8 +104,10 @@ class TerminalProgressBar(ProgressBarBase):
#ask the motor position, if smt goes wrong print "n.a."
try:
motor_name=name.replace("_", ".")+".readback.get()"
motor_position = np.round(eval(motor_name, self.user_ns),3)
axis=name.replace("_", ".")
command = f"asyncio.run({axis}.read())"
print(f"pbar command: {command}")
motor_position = np.round(eval(command, self.user_ns),3)
except:
try:
motor_name=name.replace("_", ".")+".user_readback.get()"
......