- jfj/broker.json: draft JFJ config with CrMX 8M (id 0, unchanged) + Alvra 16M JF06T32V07 (id 1); not deployed - jfj/make_jfj_geometry.py: convert jungfrau_utils geometry to JFJ custom_geometry, validated pixel-exact - jfj/jfj_acquisition.py, jfj/jfj_panel.py: slic acquisition and GUI tab to start/stop JFJ collections with sf-daq BS/PV data in the same run (dry-run tested only) - jfj/listen_jfjoch_zmq.py, bs/ scripts, utils csvs, workspace file and pending edits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
1.2 KiB
Python
63 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
|
|
import os
|
|
import wx
|
|
|
|
from slic.gui.persist import Persistence
|
|
|
|
from bstrd import bsstream
|
|
|
|
from panel_pbps149 import MainPanel
|
|
|
|
|
|
def run(*args, **kwargs):
|
|
app = wx.App()
|
|
wx.Yield = app.Yield
|
|
frame = MainFrame(*args, **kwargs)
|
|
frame.Show()
|
|
app.MainLoop()
|
|
app.Yield() #TODO: without this, wxPython segfaults locking a mutex
|
|
|
|
|
|
def get_wx_icon(fname="icon.png"):
|
|
iname = os.path.dirname(__file__)
|
|
iname = os.path.join(iname, fname)
|
|
return wx.Icon(iname)
|
|
|
|
|
|
|
|
class MainFrame(wx.Frame):
|
|
|
|
def __init__(self, title="PBPS 149"):
|
|
super().__init__(None, title=title)
|
|
self.SetIcon(get_wx_icon())
|
|
|
|
main = MainPanel(self)
|
|
|
|
# make sure the window is large enough
|
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
|
sizer.Add(main, proportion=1, flag=wx.EXPAND)
|
|
self.SetSizerAndFit(sizer)
|
|
|
|
self.persist = persist = Persistence(".coffee365_pbps149", self)
|
|
persist.load()
|
|
|
|
self.Bind(wx.EVT_CLOSE, self.on_close)
|
|
|
|
|
|
def on_close(self, event):
|
|
print("bye")
|
|
bsstream.stop()
|
|
self.persist.save()
|
|
event.Skip() # forward the close event
|
|
wx.GetApp().Yield()
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run()
|
|
|
|
|
|
|
|
|