Improve FileList widgets
This commit is contained in:
parent
2b080895de
commit
eace31eaf6
@ -1,16 +1,7 @@
|
|||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
from bokeh.layouts import column, row
|
from bokeh.layouts import column, row
|
||||||
from bokeh.models import (
|
from bokeh.models import Button, Panel, RadioButtonGroup, Select, Spinner, TextAreaInput, TextInput
|
||||||
Button,
|
|
||||||
Div,
|
|
||||||
Panel,
|
|
||||||
RadioButtonGroup,
|
|
||||||
RangeSlider,
|
|
||||||
Select,
|
|
||||||
Spinner,
|
|
||||||
TextInput,
|
|
||||||
)
|
|
||||||
|
|
||||||
import pyzebra
|
import pyzebra
|
||||||
|
|
||||||
@ -24,10 +15,18 @@ def create():
|
|||||||
logfile_verbosity_select.value = logfile_elem.attrib["verbosity"]
|
logfile_verbosity_select.value = logfile_elem.attrib["verbosity"]
|
||||||
|
|
||||||
filelist_elem = tree.find("FileList")
|
filelist_elem = tree.find("FileList")
|
||||||
|
if filelist_elem is None:
|
||||||
|
filelist_elem = tree.find("SinqFileList")
|
||||||
|
filelist_type.value = "SINQ"
|
||||||
|
else:
|
||||||
|
filelist_type.value = "TRICS"
|
||||||
|
|
||||||
filelist_format_textinput.value = filelist_elem.attrib["format"]
|
filelist_format_textinput.value = filelist_elem.attrib["format"]
|
||||||
filelist_datapath_textinput.value = filelist_elem.find("datapath").attrib["value"]
|
filelist_datapath_textinput.value = filelist_elem.find("datapath").attrib["value"]
|
||||||
range_vals = filelist_elem.find("range").attrib
|
range_vals = filelist_elem.find("range").attrib
|
||||||
filelist_range_rangeslider.value = (int(range_vals["start"]), int(range_vals["end"]))
|
filelist_ranges_textareainput.value = str(
|
||||||
|
(int(range_vals["start"]), int(range_vals["end"]))
|
||||||
|
)
|
||||||
|
|
||||||
alg_elem = tree.find("Algorithm")
|
alg_elem = tree.find("Algorithm")
|
||||||
if alg_elem.attrib["implementation"] == "adaptivemaxcog":
|
if alg_elem.attrib["implementation"] == "adaptivemaxcog":
|
||||||
@ -68,10 +67,10 @@ def create():
|
|||||||
)
|
)
|
||||||
|
|
||||||
# ---- FileList
|
# ---- FileList
|
||||||
filelist_div = Div(text="File List:", width=100)
|
filelist_type = Select(title="File List:", options=["TRICS", "SINQ"], width=100)
|
||||||
filelist_format_textinput = TextInput(title="format")
|
filelist_format_textinput = TextInput(title="format:", width=490)
|
||||||
filelist_datapath_textinput = TextInput(title="datapath")
|
filelist_datapath_textinput = TextInput(title="datapath:")
|
||||||
filelist_range_rangeslider = RangeSlider(title="range", start=0, end=2000, value=(0, 2000))
|
filelist_ranges_textareainput = TextAreaInput(title="ranges:", height=100)
|
||||||
|
|
||||||
# ---- crystal
|
# ---- crystal
|
||||||
|
|
||||||
@ -144,10 +143,9 @@ def create():
|
|||||||
column(
|
column(
|
||||||
fileinput,
|
fileinput,
|
||||||
row(logfile_textinput, logfile_verbosity_select),
|
row(logfile_textinput, logfile_verbosity_select),
|
||||||
filelist_div,
|
row(filelist_type, filelist_format_textinput),
|
||||||
filelist_format_textinput,
|
|
||||||
filelist_datapath_textinput,
|
filelist_datapath_textinput,
|
||||||
filelist_range_rangeslider,
|
filelist_ranges_textareainput,
|
||||||
process_button,
|
process_button,
|
||||||
),
|
),
|
||||||
column(
|
column(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user