Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
4982b05de0 | |||
2b0c392a3e | |||
099842b2bd | |||
bd3efd698a | |||
24f083e585 | |||
f43488af34 | |||
1b90d53466 | |||
c1b3a28351 | |||
5b45685257 | |||
e7b28a4e75 | |||
83a7d607a5 | |||
5eedd14b3f | |||
3db7dca7ba | |||
b2d1a0be02 | |||
69d22dd067 | |||
242da76c59 | |||
0c812a5dd5 | |||
4cfcb3d396 | |||
8018783eb5 | |||
fdb1609a41 | |||
e7dda3cda8 | |||
f788d74f15 |
@ -4,4 +4,4 @@ from pyzebra.h5 import *
|
||||
from pyzebra.xtal import *
|
||||
from pyzebra.ccl_process import *
|
||||
|
||||
__version__ = "0.3.0"
|
||||
__version__ = "0.3.1"
|
||||
|
@ -24,7 +24,15 @@ ALGORITHMS = ["adaptivemaxcog", "adaptivedynamic"]
|
||||
|
||||
|
||||
def anatric(config_file, anatric_path="/afs/psi.ch/project/sinq/rhel7/bin/anatric"):
|
||||
subprocess.run([anatric_path, config_file], check=True)
|
||||
comp_proc = subprocess.run(
|
||||
[anatric_path, config_file],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
)
|
||||
print(" ".join(comp_proc.args))
|
||||
print(comp_proc.stdout)
|
||||
|
||||
|
||||
class AnatricConfig:
|
||||
@ -236,12 +244,37 @@ class AnatricConfig:
|
||||
|
||||
@property
|
||||
def dataFactory_dist1(self):
|
||||
return self._tree.find("DataFactory").find("dist1").attrib["value"]
|
||||
elem = self._tree.find("DataFactory").find("dist1")
|
||||
if elem is not None:
|
||||
return elem.attrib["value"]
|
||||
return None
|
||||
|
||||
@dataFactory_dist1.setter
|
||||
def dataFactory_dist1(self, value):
|
||||
self._tree.find("DataFactory").find("dist1").attrib["value"] = value
|
||||
|
||||
@property
|
||||
def dataFactory_dist2(self):
|
||||
elem = self._tree.find("DataFactory").find("dist2")
|
||||
if elem is not None:
|
||||
return elem.attrib["value"]
|
||||
return None
|
||||
|
||||
@dataFactory_dist2.setter
|
||||
def dataFactory_dist2(self, value):
|
||||
self._tree.find("DataFactory").find("dist2").attrib["value"] = value
|
||||
|
||||
@property
|
||||
def dataFactory_dist3(self):
|
||||
elem = self._tree.find("DataFactory").find("dist3")
|
||||
if elem is not None:
|
||||
return elem.attrib["value"]
|
||||
return None
|
||||
|
||||
@dataFactory_dist3.setter
|
||||
def dataFactory_dist3(self, value):
|
||||
self._tree.find("DataFactory").find("dist3").attrib["value"] = value
|
||||
|
||||
@property
|
||||
def reflectionPrinter_format(self):
|
||||
return self._tree.find("ReflectionPrinter").attrib["format"]
|
||||
@ -253,6 +286,14 @@ class AnatricConfig:
|
||||
|
||||
self._tree.find("ReflectionPrinter").attrib["format"] = value
|
||||
|
||||
@property
|
||||
def reflectionPrinter_file(self):
|
||||
return self._tree.find("ReflectionPrinter").attrib["file"]
|
||||
|
||||
@reflectionPrinter_file.setter
|
||||
def reflectionPrinter_file(self, value):
|
||||
self._tree.find("ReflectionPrinter").attrib["file"] = value
|
||||
|
||||
@property
|
||||
def algorithm(self):
|
||||
return self._tree.find("Algorithm").attrib["implementation"]
|
||||
|
@ -10,6 +10,7 @@ from bokeh.models import (
|
||||
BasicTicker,
|
||||
Button,
|
||||
CheckboxEditor,
|
||||
CheckboxGroup,
|
||||
ColumnDataSource,
|
||||
CustomJS,
|
||||
DataRange1d,
|
||||
@ -37,7 +38,6 @@ from bokeh.models import (
|
||||
TableColumn,
|
||||
TextAreaInput,
|
||||
TextInput,
|
||||
Toggle,
|
||||
WheelZoomTool,
|
||||
Whisker,
|
||||
)
|
||||
@ -62,8 +62,6 @@ for (let i = 0; i < js_data.data['fname'].length; i++) {
|
||||
}
|
||||
"""
|
||||
|
||||
PROPOSAL_PATH = "/afs/psi.ch/project/sinqdata/2020/zebra/"
|
||||
|
||||
|
||||
def create():
|
||||
det_data = {}
|
||||
@ -71,14 +69,16 @@ def create():
|
||||
js_data = ColumnDataSource(data=dict(content=["", ""], fname=["", ""]))
|
||||
|
||||
def proposal_textinput_callback(_attr, _old, new):
|
||||
ccl_path = os.path.join(PROPOSAL_PATH, new.strip())
|
||||
proposal = new.strip()
|
||||
year = new[:4]
|
||||
proposal_path = f"/afs/psi.ch/project/sinqdata/{year}/zebra/{proposal}"
|
||||
ccl_file_list = []
|
||||
for file in os.listdir(ccl_path):
|
||||
for file in os.listdir(proposal_path):
|
||||
if file.endswith((".ccl", ".dat")):
|
||||
ccl_file_list.append((os.path.join(ccl_path, file), file))
|
||||
ccl_file_list.append((os.path.join(proposal_path, file), file))
|
||||
file_select.options = ccl_file_list
|
||||
|
||||
proposal_textinput = TextInput(title="Proposal number:", default_size=145)
|
||||
proposal_textinput = TextInput(title="Proposal number:", width=210)
|
||||
proposal_textinput.on_change("value", proposal_textinput_callback)
|
||||
|
||||
def _init_datatable():
|
||||
@ -100,7 +100,7 @@ def create():
|
||||
def ccl_file_select_callback(_attr, _old, _new):
|
||||
pass
|
||||
|
||||
file_select = MultiSelect(title="Available .ccl/.dat files:", default_size=200, height=250)
|
||||
file_select = MultiSelect(title="Available .ccl/.dat files:", width=210, height=250)
|
||||
file_select.on_change("value", ccl_file_select_callback)
|
||||
|
||||
def file_open_button_callback():
|
||||
@ -120,8 +120,9 @@ def create():
|
||||
js_data.data.update(fname=[base + ".comm", base + ".incomm"])
|
||||
|
||||
_init_datatable()
|
||||
_update_preview()
|
||||
|
||||
file_open_button = Button(label="Open New", default_size=100)
|
||||
file_open_button = Button(label="Open New", width=100)
|
||||
file_open_button.on_click(file_open_button_callback)
|
||||
|
||||
def file_append_button_callback():
|
||||
@ -135,7 +136,7 @@ def create():
|
||||
|
||||
_init_datatable()
|
||||
|
||||
file_append_button = Button(label="Append", default_size=100)
|
||||
file_append_button = Button(label="Append", width=100)
|
||||
file_append_button.on_click(file_append_button_callback)
|
||||
|
||||
def upload_button_callback(_attr, _old, new):
|
||||
@ -155,9 +156,10 @@ def create():
|
||||
js_data.data.update(fname=[base + ".comm", base + ".incomm"])
|
||||
|
||||
_init_datatable()
|
||||
_update_preview()
|
||||
|
||||
upload_div = Div(text="or upload new .ccl/.dat files:", margin=(5, 5, 0, 5))
|
||||
upload_button = FileInput(accept=".ccl,.dat", multiple=True, default_size=200)
|
||||
upload_button = FileInput(accept=".ccl,.dat", multiple=True, width=200)
|
||||
upload_button.on_change("value", upload_button_callback)
|
||||
|
||||
def append_upload_button_callback(_attr, _old, new):
|
||||
@ -172,7 +174,7 @@ def create():
|
||||
_init_datatable()
|
||||
|
||||
append_upload_div = Div(text="append extra files:", margin=(5, 5, 0, 5))
|
||||
append_upload_button = FileInput(accept=".ccl,.dat", multiple=True, default_size=200)
|
||||
append_upload_button = FileInput(accept=".ccl,.dat", multiple=True, width=200)
|
||||
append_upload_button.on_change("value", append_upload_button_callback)
|
||||
|
||||
def monitor_spinner_callback(_attr, old, new):
|
||||
@ -254,7 +256,7 @@ def create():
|
||||
plot_bkg_source, Line(x="x", y="y", line_color="green", line_dash="dashed")
|
||||
)
|
||||
|
||||
plot_peak_source = ColumnDataSource(dict(xs=[0], ys=[0]))
|
||||
plot_peak_source = ColumnDataSource(dict(xs=[[0]], ys=[[0]]))
|
||||
plot_peak = plot.add_glyph(
|
||||
plot_peak_source, MultiLine(xs="xs", ys="ys", line_color="red", line_dash="dashed")
|
||||
)
|
||||
@ -339,13 +341,13 @@ def create():
|
||||
def fit_from_spinner_callback(_attr, _old, new):
|
||||
fit_from_span.location = new
|
||||
|
||||
fit_from_spinner = Spinner(title="Fit from:", default_size=145)
|
||||
fit_from_spinner = Spinner(title="Fit from:", width=145)
|
||||
fit_from_spinner.on_change("value", fit_from_spinner_callback)
|
||||
|
||||
def fit_to_spinner_callback(_attr, _old, new):
|
||||
fit_to_span.location = new
|
||||
|
||||
fit_to_spinner = Spinner(title="to:", default_size=145)
|
||||
fit_to_spinner = Spinner(title="to:", width=145)
|
||||
fit_to_spinner.on_change("value", fit_to_spinner_callback)
|
||||
|
||||
def fitparams_add_dropdown_callback(click):
|
||||
@ -364,7 +366,7 @@ def create():
|
||||
("Pseudo Voigt", "pvoigt"),
|
||||
# ("Pseudo Voigt1", "pseudovoigt1"),
|
||||
],
|
||||
default_size=145,
|
||||
width=145,
|
||||
disabled=True,
|
||||
)
|
||||
fitparams_add_dropdown.on_click(fitparams_add_dropdown_callback)
|
||||
@ -385,7 +387,7 @@ def create():
|
||||
else:
|
||||
fitparams_table_source.data.update(dict(param=[], value=[], vary=[], min=[], max=[]))
|
||||
|
||||
fitparams_select = MultiSelect(options=[], height=120, default_size=145)
|
||||
fitparams_select = MultiSelect(options=[], height=120, width=145)
|
||||
fitparams_select.tags = [0]
|
||||
fitparams_select.on_change("value", fitparams_select_callback)
|
||||
|
||||
@ -400,7 +402,7 @@ def create():
|
||||
|
||||
fitparams_select.value = []
|
||||
|
||||
fitparams_remove_button = Button(label="Remove fit function", default_size=145, disabled=True)
|
||||
fitparams_remove_button = Button(label="Remove fit function", width=145, disabled=True)
|
||||
fitparams_remove_button.on_click(fitparams_remove_button_callback)
|
||||
|
||||
def fitparams_factory(function):
|
||||
@ -422,6 +424,10 @@ def create():
|
||||
param=params, value=[None] * n, vary=[True] * n, min=[None] * n, max=[None] * n,
|
||||
)
|
||||
|
||||
if function == "linear":
|
||||
fitparams["value"] = [0, 0]
|
||||
fitparams["vary"] = [False, True]
|
||||
|
||||
return fitparams
|
||||
|
||||
fitparams_table_source = ColumnDataSource(dict(param=[], value=[], vary=[], min=[], max=[]))
|
||||
@ -457,8 +463,9 @@ def create():
|
||||
|
||||
_update_plot(_get_selected_scan())
|
||||
_update_table()
|
||||
_update_preview()
|
||||
|
||||
fit_all_button = Button(label="Fit All", button_type="primary", default_size=145)
|
||||
fit_all_button = Button(label="Fit All", button_type="primary", width=145)
|
||||
fit_all_button.on_click(fit_all_button_callback)
|
||||
|
||||
def fit_button_callback():
|
||||
@ -469,23 +476,28 @@ def create():
|
||||
|
||||
_update_plot(scan)
|
||||
_update_table()
|
||||
_update_preview()
|
||||
|
||||
fit_button = Button(label="Fit Current", default_size=145)
|
||||
fit_button = Button(label="Fit Current", width=145)
|
||||
fit_button.on_click(fit_button_callback)
|
||||
|
||||
def area_method_radiobutton_callback(_handler):
|
||||
_update_preview()
|
||||
|
||||
area_method_radiobutton = RadioButtonGroup(
|
||||
labels=["Fit area", "Int area"], active=0, default_size=145, disabled=True
|
||||
labels=["Fit area", "Int area"], active=0, width=145, disabled=True
|
||||
)
|
||||
area_method_radiobutton.on_click(area_method_radiobutton_callback)
|
||||
|
||||
bin_size_spinner = Spinner(
|
||||
title="Bin size:", value=1, low=1, step=1, default_size=145, disabled=True
|
||||
)
|
||||
def lorentz_checkbox_callback(_handler):
|
||||
_update_preview()
|
||||
|
||||
lorentz_toggle = Toggle(label="Lorentz Correction", default_size=145)
|
||||
lorentz_checkbox = CheckboxGroup(labels=["Lorentz Correction"], width=145, margin=[13, 5, 5, 5])
|
||||
lorentz_checkbox.on_click(lorentz_checkbox_callback)
|
||||
|
||||
export_preview_textinput = TextAreaInput(title="Export preview:", width=500, height=400)
|
||||
export_preview_textinput = TextAreaInput(title="Export file preview:", width=500, height=400)
|
||||
|
||||
def preview_button_callback():
|
||||
def _update_preview():
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_file = temp_dir + "/temp"
|
||||
export_data = []
|
||||
@ -497,7 +509,7 @@ def create():
|
||||
export_data,
|
||||
temp_file,
|
||||
area_method=AREA_METHODS[int(area_method_radiobutton.active)],
|
||||
lorentz=lorentz_toggle.active,
|
||||
lorentz=bool(lorentz_checkbox.active),
|
||||
hkl_precision=int(hkl_precision_select.value),
|
||||
)
|
||||
|
||||
@ -516,14 +528,15 @@ def create():
|
||||
js_data.data.update(content=file_content)
|
||||
export_preview_textinput.value = exported_content
|
||||
|
||||
preview_button = Button(label="Preview", default_size=200)
|
||||
preview_button.on_click(preview_button_callback)
|
||||
def hkl_precision_select_callback(_attr, _old, _new):
|
||||
_update_preview()
|
||||
|
||||
hkl_precision_select = Select(
|
||||
title="hkl precision:", options=["2", "3", "4"], value="2", default_size=80
|
||||
title="hkl precision:", options=["2", "3", "4"], value="2", width=80
|
||||
)
|
||||
hkl_precision_select.on_change("value", hkl_precision_select_callback)
|
||||
|
||||
save_button = Button(label="Download preview", button_type="success", default_size=200)
|
||||
save_button = Button(label="Download File", button_type="success", width=200)
|
||||
save_button.js_on_click(CustomJS(args={"js_data": js_data}, code=javaScript))
|
||||
|
||||
fitpeak_controls = row(
|
||||
@ -532,8 +545,7 @@ def create():
|
||||
Spacer(width=20),
|
||||
column(
|
||||
row(fit_from_spinner, fit_to_spinner),
|
||||
row(bin_size_spinner, column(Spacer(height=19), lorentz_toggle)),
|
||||
row(area_method_radiobutton),
|
||||
row(area_method_radiobutton, lorentz_checkbox),
|
||||
row(fit_button, fit_all_button),
|
||||
),
|
||||
)
|
||||
@ -556,7 +568,7 @@ def create():
|
||||
|
||||
export_layout = column(
|
||||
export_preview_textinput,
|
||||
row(hkl_precision_select, column(Spacer(height=19), row(preview_button, save_button))),
|
||||
row(hkl_precision_select, column(Spacer(height=19), row(save_button))),
|
||||
)
|
||||
|
||||
tab_layout = column(
|
||||
|
@ -10,9 +10,9 @@ from bokeh.models import (
|
||||
Div,
|
||||
FileInput,
|
||||
Panel,
|
||||
RadioButtonGroup,
|
||||
Select,
|
||||
Spacer,
|
||||
Tabs,
|
||||
TextAreaInput,
|
||||
TextInput,
|
||||
)
|
||||
@ -29,7 +29,7 @@ def create():
|
||||
config.load_from_file(file)
|
||||
|
||||
logfile_textinput.value = config.logfile
|
||||
logfile_verbosity_select.value = config.logfile_verbosity
|
||||
logfile_verbosity.value = config.logfile_verbosity
|
||||
|
||||
filelist_type.value = config.filelist_type
|
||||
filelist_format_textinput.value = config.filelist_format
|
||||
@ -44,11 +44,16 @@ def create():
|
||||
ub_textareainput.value = config.crystal_UB
|
||||
|
||||
dataFactory_implementation_select.value = config.dataFactory_implementation
|
||||
dataFactory_dist1_textinput.value = config.dataFactory_dist1
|
||||
if config.dataFactory_dist1 is not None:
|
||||
dataFactory_dist1_textinput.value = config.dataFactory_dist1
|
||||
if config.dataFactory_dist2 is not None:
|
||||
dataFactory_dist2_textinput.value = config.dataFactory_dist2
|
||||
if config.dataFactory_dist3 is not None:
|
||||
dataFactory_dist3_textinput.value = config.dataFactory_dist3
|
||||
reflectionPrinter_format_select.value = config.reflectionPrinter_format
|
||||
|
||||
set_active_widgets(config.algorithm)
|
||||
if config.algorithm == "adaptivemaxcog":
|
||||
algorithm_params.active = 0
|
||||
threshold_textinput.value = config.threshold
|
||||
shell_textinput.value = config.shell
|
||||
steepness_textinput.value = config.steepness
|
||||
@ -57,6 +62,7 @@ def create():
|
||||
aps_window_textinput.value = str(tuple(map(int, config.aps_window.values())))
|
||||
|
||||
elif config.algorithm == "adaptivedynamic":
|
||||
algorithm_params.active = 1
|
||||
adm_window_textinput.value = str(tuple(map(int, config.adm_window.values())))
|
||||
border_textinput.value = str(tuple(map(int, config.border.values())))
|
||||
minWindow_textinput.value = str(tuple(map(int, config.minWindow.values())))
|
||||
@ -66,45 +72,16 @@ def create():
|
||||
loop_textinput.value = config.loop
|
||||
minPeakCount_textinput.value = config.minPeakCount
|
||||
displacementCurve_textinput.value = "\n".join(map(str, config.displacementCurve))
|
||||
|
||||
else:
|
||||
raise ValueError("Unknown processing mode.")
|
||||
|
||||
def set_active_widgets(implementation):
|
||||
if implementation == "adaptivemaxcog":
|
||||
mode_radio_button_group.active = 0
|
||||
disable_adaptivemaxcog = False
|
||||
disable_adaptivedynamic = True
|
||||
|
||||
elif implementation == "adaptivedynamic":
|
||||
mode_radio_button_group.active = 1
|
||||
disable_adaptivemaxcog = True
|
||||
disable_adaptivedynamic = False
|
||||
else:
|
||||
raise ValueError("Implementation can be either 'adaptivemaxcog' or 'adaptivedynamic'")
|
||||
|
||||
threshold_textinput.disabled = disable_adaptivemaxcog
|
||||
shell_textinput.disabled = disable_adaptivemaxcog
|
||||
steepness_textinput.disabled = disable_adaptivemaxcog
|
||||
duplicateDistance_textinput.disabled = disable_adaptivemaxcog
|
||||
maxequal_textinput.disabled = disable_adaptivemaxcog
|
||||
aps_window_textinput.disabled = disable_adaptivemaxcog
|
||||
|
||||
adm_window_textinput.disabled = disable_adaptivedynamic
|
||||
border_textinput.disabled = disable_adaptivedynamic
|
||||
minWindow_textinput.disabled = disable_adaptivedynamic
|
||||
reflectionFile_textinput.disabled = disable_adaptivedynamic
|
||||
targetMonitor_textinput.disabled = disable_adaptivedynamic
|
||||
smoothSize_textinput.disabled = disable_adaptivedynamic
|
||||
loop_textinput.disabled = disable_adaptivedynamic
|
||||
minPeakCount_textinput.disabled = disable_adaptivedynamic
|
||||
displacementCurve_textinput.disabled = disable_adaptivedynamic
|
||||
|
||||
def upload_button_callback(_attr, _old, new):
|
||||
with io.BytesIO(base64.b64decode(new)) as file:
|
||||
_load_config_file(file)
|
||||
|
||||
upload_div = Div(text="Open XML configuration file:")
|
||||
upload_button = FileInput(accept=".xml")
|
||||
upload_div = Div(text="Open .xml config:")
|
||||
upload_button = FileInput(accept=".xml", width=200)
|
||||
upload_button.on_change("value", upload_button_callback)
|
||||
|
||||
# General parameters
|
||||
@ -112,16 +89,14 @@ def create():
|
||||
def logfile_textinput_callback(_attr, _old, new):
|
||||
config.logfile = new
|
||||
|
||||
logfile_textinput = TextInput(title="Logfile:", value="logfile.log", width=320)
|
||||
logfile_textinput = TextInput(title="Logfile:", value="logfile.log")
|
||||
logfile_textinput.on_change("value", logfile_textinput_callback)
|
||||
|
||||
def logfile_verbosity_select_callback(_attr, _old, new):
|
||||
def logfile_verbosity_callback(_attr, _old, new):
|
||||
config.logfile_verbosity = new
|
||||
|
||||
logfile_verbosity_select = Select(
|
||||
title="verbosity:", options=["0", "5", "10", "15", "30"], width=70
|
||||
)
|
||||
logfile_verbosity_select.on_change("value", logfile_verbosity_select_callback)
|
||||
logfile_verbosity = TextInput(title="verbosity:", width=70)
|
||||
logfile_verbosity.on_change("value", logfile_verbosity_callback)
|
||||
|
||||
# ---- FileList
|
||||
def filelist_type_callback(_attr, _old, new):
|
||||
@ -148,20 +123,20 @@ def create():
|
||||
ranges.append(re.findall(r"\b\d+\b", line))
|
||||
config.filelist_ranges = ranges
|
||||
|
||||
filelist_ranges_textareainput = TextAreaInput(title="ranges:", height=100)
|
||||
filelist_ranges_textareainput = TextAreaInput(title="ranges:", rows=1)
|
||||
filelist_ranges_textareainput.on_change("value", filelist_ranges_textareainput_callback)
|
||||
|
||||
# ---- crystal
|
||||
def crystal_sample_textinput_callback(_attr, _old, new):
|
||||
config.crystal_sample = new
|
||||
|
||||
crystal_sample_textinput = TextInput(title="Sample Name:")
|
||||
crystal_sample_textinput = TextInput(title="Sample Name:", width=290)
|
||||
crystal_sample_textinput.on_change("value", crystal_sample_textinput_callback)
|
||||
|
||||
def lambda_textinput_callback(_attr, _old, new):
|
||||
config.crystal_lambda = new
|
||||
|
||||
lambda_textinput = TextInput(title="lambda:", width=145)
|
||||
lambda_textinput = TextInput(title="lambda:", width=100)
|
||||
lambda_textinput.on_change("value", lambda_textinput_callback)
|
||||
|
||||
def ub_textareainput_callback(_attr, _old, new):
|
||||
@ -173,19 +148,19 @@ def create():
|
||||
def zeroOM_textinput_callback(_attr, _old, new):
|
||||
config.crystal_zeroOM = new
|
||||
|
||||
zeroOM_textinput = TextInput(title="zeroOM:", width=145)
|
||||
zeroOM_textinput = TextInput(title="zeroOM:", width=100)
|
||||
zeroOM_textinput.on_change("value", zeroOM_textinput_callback)
|
||||
|
||||
def zeroSTT_textinput_callback(_attr, _old, new):
|
||||
config.crystal_zeroSTT = new
|
||||
|
||||
zeroSTT_textinput = TextInput(title="zeroSTT:", width=145)
|
||||
zeroSTT_textinput = TextInput(title="zeroSTT:", width=100)
|
||||
zeroSTT_textinput.on_change("value", zeroSTT_textinput_callback)
|
||||
|
||||
def zeroCHI_textinput_callback(_attr, _old, new):
|
||||
config.crystal_zeroCHI = new
|
||||
|
||||
zeroCHI_textinput = TextInput(title="zeroCHI:", width=145)
|
||||
zeroCHI_textinput = TextInput(title="zeroCHI:", width=100)
|
||||
zeroCHI_textinput.on_change("value", zeroCHI_textinput_callback)
|
||||
|
||||
# ---- DataFactory
|
||||
@ -200,9 +175,21 @@ def create():
|
||||
def dataFactory_dist1_textinput_callback(_attr, _old, new):
|
||||
config.dataFactory_dist1 = new
|
||||
|
||||
dataFactory_dist1_textinput = TextInput(title="dist1:", width=145)
|
||||
dataFactory_dist1_textinput = TextInput(title="dist1:", width=75)
|
||||
dataFactory_dist1_textinput.on_change("value", dataFactory_dist1_textinput_callback)
|
||||
|
||||
def dataFactory_dist2_textinput_callback(_attr, _old, new):
|
||||
config.dataFactory_dist2 = new
|
||||
|
||||
dataFactory_dist2_textinput = TextInput(title="dist2:", width=75)
|
||||
dataFactory_dist2_textinput.on_change("value", dataFactory_dist2_textinput_callback)
|
||||
|
||||
def dataFactory_dist3_textinput_callback(_attr, _old, new):
|
||||
config.dataFactory_dist3 = new
|
||||
|
||||
dataFactory_dist3_textinput = TextInput(title="dist3:", width=75)
|
||||
dataFactory_dist3_textinput.on_change("value", dataFactory_dist3_textinput_callback)
|
||||
|
||||
# ---- BackgroundProcessor
|
||||
|
||||
# ---- DetectorEfficency
|
||||
@ -221,42 +208,42 @@ def create():
|
||||
def threshold_textinput_callback(_attr, _old, new):
|
||||
config.threshold = new
|
||||
|
||||
threshold_textinput = TextInput(title="Threshold:")
|
||||
threshold_textinput = TextInput(title="Threshold:", width=145)
|
||||
threshold_textinput.on_change("value", threshold_textinput_callback)
|
||||
|
||||
# ---- shell
|
||||
def shell_textinput_callback(_attr, _old, new):
|
||||
config.shell = new
|
||||
|
||||
shell_textinput = TextInput(title="Shell:")
|
||||
shell_textinput = TextInput(title="Shell:", width=145)
|
||||
shell_textinput.on_change("value", shell_textinput_callback)
|
||||
|
||||
# ---- steepness
|
||||
def steepness_textinput_callback(_attr, _old, new):
|
||||
config.steepness = new
|
||||
|
||||
steepness_textinput = TextInput(title="Steepness:")
|
||||
steepness_textinput = TextInput(title="Steepness:", width=145)
|
||||
steepness_textinput.on_change("value", steepness_textinput_callback)
|
||||
|
||||
# ---- duplicateDistance
|
||||
def duplicateDistance_textinput_callback(_attr, _old, new):
|
||||
config.duplicateDistance = new
|
||||
|
||||
duplicateDistance_textinput = TextInput(title="Duplicate Distance:")
|
||||
duplicateDistance_textinput = TextInput(title="Duplicate Distance:", width=145)
|
||||
duplicateDistance_textinput.on_change("value", duplicateDistance_textinput_callback)
|
||||
|
||||
# ---- maxequal
|
||||
def maxequal_textinput_callback(_attr, _old, new):
|
||||
config.maxequal = new
|
||||
|
||||
maxequal_textinput = TextInput(title="Max Equal:")
|
||||
maxequal_textinput = TextInput(title="Max Equal:", width=145)
|
||||
maxequal_textinput.on_change("value", maxequal_textinput_callback)
|
||||
|
||||
# ---- window
|
||||
def aps_window_textinput_callback(_attr, _old, new):
|
||||
config.aps_window = dict(zip(("x", "y", "z"), re.findall(r"\b\d+\b", new)))
|
||||
|
||||
aps_window_textinput = TextInput(title="Window (x, y, z):")
|
||||
aps_window_textinput = TextInput(title="Window (x, y, z):", width=145)
|
||||
aps_window_textinput.on_change("value", aps_window_textinput_callback)
|
||||
|
||||
# Adaptive Dynamic Mask Integration (adaptivedynamic)
|
||||
@ -264,56 +251,56 @@ def create():
|
||||
def adm_window_textinput_callback(_attr, _old, new):
|
||||
config.adm_window = dict(zip(("x", "y", "z"), re.findall(r"\b\d+\b", new)))
|
||||
|
||||
adm_window_textinput = TextInput(title="Window (x, y, z):")
|
||||
adm_window_textinput = TextInput(title="Window (x, y, z):", width=145)
|
||||
adm_window_textinput.on_change("value", adm_window_textinput_callback)
|
||||
|
||||
# ---- border
|
||||
def border_textinput_callback(_attr, _old, new):
|
||||
config.border = dict(zip(("x", "y", "z"), re.findall(r"\b\d+\b", new)))
|
||||
|
||||
border_textinput = TextInput(title="Border (x, y, z):")
|
||||
border_textinput = TextInput(title="Border (x, y, z):", width=145)
|
||||
border_textinput.on_change("value", border_textinput_callback)
|
||||
|
||||
# ---- minWindow
|
||||
def minWindow_textinput_callback(_attr, _old, new):
|
||||
config.minWindow = dict(zip(("x", "y", "z"), re.findall(r"\b\d+\b", new)))
|
||||
|
||||
minWindow_textinput = TextInput(title="Min Window (x, y, z):")
|
||||
minWindow_textinput = TextInput(title="Min Window (x, y, z):", width=145)
|
||||
minWindow_textinput.on_change("value", minWindow_textinput_callback)
|
||||
|
||||
# ---- reflectionFile
|
||||
def reflectionFile_textinput_callback(_attr, _old, new):
|
||||
config.reflectionFile = new
|
||||
|
||||
reflectionFile_textinput = TextInput(title="Reflection File:")
|
||||
reflectionFile_textinput = TextInput(title="Reflection File:", width=145)
|
||||
reflectionFile_textinput.on_change("value", reflectionFile_textinput_callback)
|
||||
|
||||
# ---- targetMonitor
|
||||
def targetMonitor_textinput_callback(_attr, _old, new):
|
||||
config.targetMonitor = new
|
||||
|
||||
targetMonitor_textinput = TextInput(title="Target Monitor:")
|
||||
targetMonitor_textinput = TextInput(title="Target Monitor:", width=145)
|
||||
targetMonitor_textinput.on_change("value", targetMonitor_textinput_callback)
|
||||
|
||||
# ---- smoothSize
|
||||
def smoothSize_textinput_callback(_attr, _old, new):
|
||||
config.smoothSize = new
|
||||
|
||||
smoothSize_textinput = TextInput(title="Smooth Size:")
|
||||
smoothSize_textinput = TextInput(title="Smooth Size:", width=145)
|
||||
smoothSize_textinput.on_change("value", smoothSize_textinput_callback)
|
||||
|
||||
# ---- loop
|
||||
def loop_textinput_callback(_attr, _old, new):
|
||||
config.loop = new
|
||||
|
||||
loop_textinput = TextInput(title="Loop:")
|
||||
loop_textinput = TextInput(title="Loop:", width=145)
|
||||
loop_textinput.on_change("value", loop_textinput_callback)
|
||||
|
||||
# ---- minPeakCount
|
||||
def minPeakCount_textinput_callback(_attr, _old, new):
|
||||
config.minPeakCount = new
|
||||
|
||||
minPeakCount_textinput = TextInput(title="Min Peak Count:")
|
||||
minPeakCount_textinput = TextInput(title="Min Peak Count:", width=145)
|
||||
minPeakCount_textinput.on_change("value", minPeakCount_textinput_callback)
|
||||
|
||||
# ---- displacementCurve
|
||||
@ -324,27 +311,40 @@ def create():
|
||||
config.displacementCurve = maps
|
||||
|
||||
displacementCurve_textinput = TextAreaInput(
|
||||
title="Displacement Curve (twotheta, x, y):", height=100
|
||||
title="Displ. Curve (2θ, x, y):", width=145, height=100
|
||||
)
|
||||
displacementCurve_textinput.on_change("value", displacementCurve_textinput_callback)
|
||||
|
||||
def mode_radio_button_group_callback(active):
|
||||
if active == 0:
|
||||
def algorithm_tabs_callback(_attr, _old, new):
|
||||
if new == 0:
|
||||
config.algorithm = "adaptivemaxcog"
|
||||
set_active_widgets("adaptivemaxcog")
|
||||
else:
|
||||
config.algorithm = "adaptivedynamic"
|
||||
set_active_widgets("adaptivedynamic")
|
||||
|
||||
mode_radio_button_group = RadioButtonGroup(
|
||||
labels=["Adaptive Peak Detection", "Adaptive Dynamic Integration"], active=0
|
||||
algorithm_params = Tabs(
|
||||
tabs=[
|
||||
Panel(
|
||||
child=column(
|
||||
row(threshold_textinput, shell_textinput, steepness_textinput),
|
||||
row(duplicateDistance_textinput, maxequal_textinput, aps_window_textinput),
|
||||
),
|
||||
title="Peak Search",
|
||||
),
|
||||
Panel(
|
||||
child=column(
|
||||
row(adm_window_textinput, border_textinput, minWindow_textinput),
|
||||
row(reflectionFile_textinput, targetMonitor_textinput, smoothSize_textinput),
|
||||
row(loop_textinput, minPeakCount_textinput, displacementCurve_textinput),
|
||||
),
|
||||
title="Dynamic Integration",
|
||||
),
|
||||
]
|
||||
)
|
||||
mode_radio_button_group.on_click(mode_radio_button_group_callback)
|
||||
set_active_widgets("adaptivemaxcog")
|
||||
algorithm_params.on_change("active", algorithm_tabs_callback)
|
||||
|
||||
def process_button_callback():
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_file = temp_dir + "/temp.xml"
|
||||
temp_file = temp_dir + "/config.xml"
|
||||
config.save_as(temp_file)
|
||||
if doc.anatric_path:
|
||||
pyzebra.anatric(temp_file, anatric_path=doc.anatric_path)
|
||||
@ -354,62 +354,43 @@ def create():
|
||||
with open(config.logfile) as f_log:
|
||||
output_log.value = f_log.read()
|
||||
|
||||
with open(config.reflectionPrinter_file) as f_res:
|
||||
output_res.value = f_res.read()
|
||||
|
||||
process_button = Button(label="Process", button_type="primary")
|
||||
process_button.on_click(process_button_callback)
|
||||
|
||||
output_log = TextAreaInput(title="Logfile output:", height=600, disabled=True)
|
||||
output_config = TextAreaInput(title="Current config:", height=600, width=400, disabled=True)
|
||||
output_log = TextAreaInput(title="Logfile output:", height=320, width=465, disabled=True)
|
||||
output_res = TextAreaInput(title="Result output:", height=320, width=465, disabled=True)
|
||||
output_config = TextAreaInput(title="Current config:", height=320, width=465, disabled=True)
|
||||
|
||||
general_params_layout = column(
|
||||
row(logfile_textinput, logfile_verbosity_select),
|
||||
row(column(Spacer(height=2), upload_div), upload_button),
|
||||
row(logfile_textinput, logfile_verbosity),
|
||||
row(filelist_type, filelist_format_textinput),
|
||||
filelist_datapath_textinput,
|
||||
filelist_ranges_textareainput,
|
||||
crystal_sample_textinput,
|
||||
row(lambda_textinput, zeroOM_textinput),
|
||||
row(zeroSTT_textinput, zeroCHI_textinput),
|
||||
row(crystal_sample_textinput, lambda_textinput),
|
||||
ub_textareainput,
|
||||
row(dataFactory_implementation_select, dataFactory_dist1_textinput),
|
||||
reflectionPrinter_format_select,
|
||||
row(zeroOM_textinput, zeroSTT_textinput, zeroCHI_textinput),
|
||||
row(
|
||||
dataFactory_implementation_select,
|
||||
dataFactory_dist1_textinput,
|
||||
dataFactory_dist2_textinput,
|
||||
dataFactory_dist3_textinput,
|
||||
),
|
||||
row(reflectionPrinter_format_select),
|
||||
)
|
||||
|
||||
algorithm_params_layout = column(
|
||||
mode_radio_button_group,
|
||||
row(
|
||||
column(
|
||||
threshold_textinput,
|
||||
shell_textinput,
|
||||
steepness_textinput,
|
||||
duplicateDistance_textinput,
|
||||
maxequal_textinput,
|
||||
aps_window_textinput,
|
||||
),
|
||||
column(
|
||||
adm_window_textinput,
|
||||
border_textinput,
|
||||
minWindow_textinput,
|
||||
reflectionFile_textinput,
|
||||
targetMonitor_textinput,
|
||||
smoothSize_textinput,
|
||||
loop_textinput,
|
||||
minPeakCount_textinput,
|
||||
displacementCurve_textinput,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
tab_layout = column(
|
||||
row(column(Spacer(height=2), upload_div), upload_button),
|
||||
row(
|
||||
general_params_layout,
|
||||
algorithm_params_layout,
|
||||
column(row(output_config, output_log), row(process_button)),
|
||||
),
|
||||
tab_layout = row(
|
||||
general_params_layout,
|
||||
column(output_config, algorithm_params, row(process_button)),
|
||||
column(output_log, output_res),
|
||||
)
|
||||
|
||||
async def update_config():
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_file = temp_dir + "/debug.xml"
|
||||
temp_file = temp_dir + "/config.xml"
|
||||
config.save_as(temp_file)
|
||||
with open(temp_file) as f_config:
|
||||
output_config.value = f_config.read()
|
||||
|
@ -9,6 +9,7 @@ from bokeh.models import (
|
||||
BoxEditTool,
|
||||
BoxZoomTool,
|
||||
Button,
|
||||
CheckboxGroup,
|
||||
ColumnDataSource,
|
||||
DataRange1d,
|
||||
Div,
|
||||
@ -22,7 +23,6 @@ from bokeh.models import (
|
||||
Panel,
|
||||
PanTool,
|
||||
Plot,
|
||||
RadioButtonGroup,
|
||||
Range1d,
|
||||
Rect,
|
||||
ResetTool,
|
||||
@ -32,7 +32,6 @@ from bokeh.models import (
|
||||
TextAreaInput,
|
||||
TextInput,
|
||||
Title,
|
||||
Toggle,
|
||||
WheelZoomTool,
|
||||
)
|
||||
from bokeh.palettes import Cividis256, Greys256, Plasma256 # pylint: disable=E0611
|
||||
@ -44,23 +43,23 @@ IMAGE_H = 128
|
||||
IMAGE_PLOT_W = int(IMAGE_W * 2.5)
|
||||
IMAGE_PLOT_H = int(IMAGE_H * 2.5)
|
||||
|
||||
PROPOSAL_PATH = "/afs/psi.ch/project/sinqdata/2020/zebra/"
|
||||
|
||||
|
||||
def create():
|
||||
det_data = {}
|
||||
roi_selection = {}
|
||||
|
||||
def proposal_textinput_callback(_attr, _old, new):
|
||||
full_proposal_path = os.path.join(PROPOSAL_PATH, new.strip())
|
||||
proposal = new.strip()
|
||||
year = new[:4]
|
||||
proposal_path = f"/afs/psi.ch/project/sinqdata/{year}/zebra/{proposal}"
|
||||
file_list = []
|
||||
for file in os.listdir(full_proposal_path):
|
||||
for file in os.listdir(proposal_path):
|
||||
if file.endswith(".hdf"):
|
||||
file_list.append((os.path.join(full_proposal_path, file), file))
|
||||
file_list.append((os.path.join(proposal_path, file), file))
|
||||
filelist.options = file_list
|
||||
filelist.value = file_list[0][0]
|
||||
|
||||
proposal_textinput = TextInput(title="Enter proposal number:", default_size=145)
|
||||
proposal_textinput = TextInput(title="Enter proposal number:", width=145)
|
||||
proposal_textinput.on_change("value", proposal_textinput_callback)
|
||||
|
||||
def upload_button_callback(_attr, _old, new):
|
||||
@ -91,7 +90,7 @@ def create():
|
||||
)
|
||||
image_source.data.update(image=[current_image])
|
||||
|
||||
if auto_toggle.active:
|
||||
if main_auto_checkbox.active:
|
||||
im_min = np.min(current_image)
|
||||
im_max = np.max(current_image)
|
||||
|
||||
@ -121,10 +120,10 @@ def create():
|
||||
overview_x = np.mean(h5_data, axis=1)
|
||||
overview_y = np.mean(h5_data, axis=2)
|
||||
|
||||
overview_plot_x_image_source.data.update(image=[overview_x], dw=[n_x])
|
||||
overview_plot_y_image_source.data.update(image=[overview_y], dw=[n_y])
|
||||
overview_plot_x_image_source.data.update(image=[overview_x], dw=[n_x], dh=[n_im])
|
||||
overview_plot_y_image_source.data.update(image=[overview_y], dw=[n_y], dh=[n_im])
|
||||
|
||||
if proj_auto_toggle.active:
|
||||
if proj_auto_checkbox.active:
|
||||
im_min = min(np.min(overview_x), np.min(overview_y))
|
||||
im_max = max(np.max(overview_x), np.max(overview_y))
|
||||
|
||||
@ -136,23 +135,24 @@ def create():
|
||||
overview_plot_x_image_glyph.color_mapper.high = im_max
|
||||
overview_plot_y_image_glyph.color_mapper.high = im_max
|
||||
|
||||
if frame_button_group.active == 0: # Frame
|
||||
overview_plot_x.axis[1].axis_label = "Frame"
|
||||
overview_plot_y.axis[1].axis_label = "Frame"
|
||||
frame_range.start = 0
|
||||
frame_range.end = n_im
|
||||
frame_range.reset_start = 0
|
||||
frame_range.reset_end = n_im
|
||||
frame_range.bounds = (0, n_im)
|
||||
|
||||
overview_plot_x_image_source.data.update(y=[0], dh=[n_im])
|
||||
overview_plot_y_image_source.data.update(y=[0], dh=[n_im])
|
||||
scan_motor = det_data["scan_motor"]
|
||||
overview_plot_y.axis[1].axis_label = f"Scanning motor, {scan_motor}"
|
||||
|
||||
elif frame_button_group.active == 1: # Variable angle
|
||||
scan_motor = det_data["scan_motor"]
|
||||
overview_plot_x.axis[1].axis_label = scan_motor
|
||||
overview_plot_y.axis[1].axis_label = scan_motor
|
||||
var = det_data[scan_motor]
|
||||
var_start = var[0]
|
||||
var_end = var[-1] + (var[-1] - var[0]) / (n_im - 1)
|
||||
|
||||
var = det_data[scan_motor]
|
||||
var_start = var[0]
|
||||
var_end = (var[-1] - var[0]) * n_im / (n_im - 1)
|
||||
overview_plot_x_image_source.data.update(y=[var_start], dh=[var_end])
|
||||
overview_plot_y_image_source.data.update(y=[var_start], dh=[var_end])
|
||||
scanning_motor_range.start = var_start
|
||||
scanning_motor_range.end = var_end
|
||||
scanning_motor_range.reset_start = var_start
|
||||
scanning_motor_range.reset_end = var_end
|
||||
scanning_motor_range.bounds = (var_start, var_end)
|
||||
|
||||
def filelist_callback(_attr, _old, new):
|
||||
nonlocal det_data
|
||||
@ -176,7 +176,7 @@ def create():
|
||||
def index_spinner_callback(_attr, _old, new):
|
||||
update_image(new)
|
||||
|
||||
index_spinner = Spinner(title="Image index:", value=0, low=0)
|
||||
index_spinner = Spinner(title="Image index:", value=0, low=0, width=80)
|
||||
index_spinner.on_change("value", index_spinner_callback)
|
||||
|
||||
plot = Plot(
|
||||
@ -310,13 +310,16 @@ def create():
|
||||
)
|
||||
plot.toolbar.active_scroll = wheelzoomtool
|
||||
|
||||
# shared frame range
|
||||
frame_range = DataRange1d()
|
||||
# shared frame ranges
|
||||
frame_range = Range1d(0, 1, bounds=(0, 1))
|
||||
scanning_motor_range = Range1d(0, 1, bounds=(0, 1))
|
||||
|
||||
det_x_range = Range1d(0, IMAGE_W, bounds=(0, IMAGE_W))
|
||||
overview_plot_x = Plot(
|
||||
title=Title(text="Projections on X-axis"),
|
||||
x_range=det_x_range,
|
||||
y_range=frame_range,
|
||||
extra_y_ranges={"scanning_motor": scanning_motor_range},
|
||||
plot_height=400,
|
||||
plot_width=IMAGE_PLOT_W,
|
||||
)
|
||||
@ -354,6 +357,7 @@ def create():
|
||||
title=Title(text="Projections on Y-axis"),
|
||||
x_range=det_y_range,
|
||||
y_range=frame_range,
|
||||
extra_y_ranges={"scanning_motor": scanning_motor_range},
|
||||
plot_height=400,
|
||||
plot_width=IMAGE_PLOT_H,
|
||||
)
|
||||
@ -369,7 +373,12 @@ def create():
|
||||
# ---- axes
|
||||
overview_plot_y.add_layout(LinearAxis(axis_label="Coordinate Y, pix"), place="below")
|
||||
overview_plot_y.add_layout(
|
||||
LinearAxis(axis_label="Frame", major_label_orientation="vertical"), place="left"
|
||||
LinearAxis(
|
||||
y_range_name="scanning_motor",
|
||||
axis_label="Scanning motor",
|
||||
major_label_orientation="vertical",
|
||||
),
|
||||
place="right",
|
||||
)
|
||||
|
||||
# ---- grid lines
|
||||
@ -386,12 +395,6 @@ def create():
|
||||
overview_plot_y_image_source, overview_plot_y_image_glyph, name="image_glyph"
|
||||
)
|
||||
|
||||
def frame_button_group_callback(_active):
|
||||
update_overview_plot()
|
||||
|
||||
frame_button_group = RadioButtonGroup(labels=["Frames", "Variable Angle"], active=0)
|
||||
frame_button_group.on_click(frame_button_group_callback)
|
||||
|
||||
roi_avg_plot = Plot(
|
||||
x_range=DataRange1d(),
|
||||
y_range=DataRange1d(),
|
||||
@ -426,13 +429,13 @@ def create():
|
||||
overview_plot_x_image_glyph.color_mapper = LinearColorMapper(palette=cmap_dict[new])
|
||||
overview_plot_y_image_glyph.color_mapper = LinearColorMapper(palette=cmap_dict[new])
|
||||
|
||||
colormap = Select(title="Colormap:", options=list(cmap_dict.keys()), default_size=145)
|
||||
colormap = Select(title="Colormap:", options=list(cmap_dict.keys()), width=210)
|
||||
colormap.on_change("value", colormap_callback)
|
||||
colormap.value = "plasma"
|
||||
|
||||
STEP = 1
|
||||
# ---- colormap auto toggle button
|
||||
def auto_toggle_callback(state):
|
||||
|
||||
def main_auto_checkbox_callback(state):
|
||||
if state:
|
||||
display_min_spinner.disabled = True
|
||||
display_max_spinner.disabled = True
|
||||
@ -442,45 +445,43 @@ def create():
|
||||
|
||||
update_image()
|
||||
|
||||
auto_toggle = Toggle(
|
||||
label="Main Auto Range", active=True, button_type="default", default_size=125
|
||||
main_auto_checkbox = CheckboxGroup(
|
||||
labels=["Main Auto Range"], active=[0], width=145, margin=[10, 5, 0, 5]
|
||||
)
|
||||
auto_toggle.on_click(auto_toggle_callback)
|
||||
main_auto_checkbox.on_click(main_auto_checkbox_callback)
|
||||
|
||||
# ---- colormap display max value
|
||||
def display_max_spinner_callback(_attr, _old_value, new_value):
|
||||
display_min_spinner.high = new_value - STEP
|
||||
image_glyph.color_mapper.high = new_value
|
||||
|
||||
display_max_spinner = Spinner(
|
||||
title="Max Value:",
|
||||
low=0 + STEP,
|
||||
value=1,
|
||||
step=STEP,
|
||||
disabled=auto_toggle.active,
|
||||
default_size=80,
|
||||
disabled=bool(main_auto_checkbox.active),
|
||||
width=100,
|
||||
height=31,
|
||||
)
|
||||
display_max_spinner.on_change("value", display_max_spinner_callback)
|
||||
|
||||
# ---- colormap display min value
|
||||
def display_min_spinner_callback(_attr, _old_value, new_value):
|
||||
display_max_spinner.low = new_value + STEP
|
||||
image_glyph.color_mapper.low = new_value
|
||||
|
||||
display_min_spinner = Spinner(
|
||||
title="Min Value:",
|
||||
low=0,
|
||||
high=1 - STEP,
|
||||
value=0,
|
||||
step=STEP,
|
||||
disabled=auto_toggle.active,
|
||||
default_size=80,
|
||||
disabled=bool(main_auto_checkbox.active),
|
||||
width=100,
|
||||
height=31,
|
||||
)
|
||||
display_min_spinner.on_change("value", display_min_spinner_callback)
|
||||
|
||||
PROJ_STEP = 0.1
|
||||
# ---- proj colormap auto toggle button
|
||||
def proj_auto_toggle_callback(state):
|
||||
|
||||
def proj_auto_checkbox_callback(state):
|
||||
if state:
|
||||
proj_display_min_spinner.disabled = True
|
||||
proj_display_max_spinner.disabled = True
|
||||
@ -490,41 +491,39 @@ def create():
|
||||
|
||||
update_overview_plot()
|
||||
|
||||
proj_auto_toggle = Toggle(
|
||||
label="Proj Auto Range", active=True, button_type="default", default_size=125
|
||||
proj_auto_checkbox = CheckboxGroup(
|
||||
labels=["Projections Auto Range"], active=[0], width=145, margin=[10, 5, 0, 5]
|
||||
)
|
||||
proj_auto_toggle.on_click(proj_auto_toggle_callback)
|
||||
proj_auto_checkbox.on_click(proj_auto_checkbox_callback)
|
||||
|
||||
# ---- proj colormap display max value
|
||||
def proj_display_max_spinner_callback(_attr, _old_value, new_value):
|
||||
proj_display_min_spinner.high = new_value - PROJ_STEP
|
||||
overview_plot_x_image_glyph.color_mapper.high = new_value
|
||||
overview_plot_y_image_glyph.color_mapper.high = new_value
|
||||
|
||||
proj_display_max_spinner = Spinner(
|
||||
title="Max Value:",
|
||||
low=0 + PROJ_STEP,
|
||||
value=1,
|
||||
step=PROJ_STEP,
|
||||
disabled=proj_auto_toggle.active,
|
||||
default_size=80,
|
||||
disabled=bool(proj_auto_checkbox.active),
|
||||
width=100,
|
||||
height=31,
|
||||
)
|
||||
proj_display_max_spinner.on_change("value", proj_display_max_spinner_callback)
|
||||
|
||||
# ---- proj colormap display min value
|
||||
def proj_display_min_spinner_callback(_attr, _old_value, new_value):
|
||||
proj_display_max_spinner.low = new_value + PROJ_STEP
|
||||
overview_plot_x_image_glyph.color_mapper.low = new_value
|
||||
overview_plot_y_image_glyph.color_mapper.low = new_value
|
||||
|
||||
proj_display_min_spinner = Spinner(
|
||||
title="Min Value:",
|
||||
low=0,
|
||||
high=1 - PROJ_STEP,
|
||||
value=0,
|
||||
step=PROJ_STEP,
|
||||
disabled=proj_auto_toggle.active,
|
||||
default_size=80,
|
||||
disabled=bool(proj_auto_checkbox.active),
|
||||
width=100,
|
||||
height=31,
|
||||
)
|
||||
proj_display_min_spinner.on_change("value", proj_display_min_spinner_callback)
|
||||
|
||||
@ -533,7 +532,7 @@ def create():
|
||||
h, k, l = calculate_hkl(det_data, index)
|
||||
image_source.data.update(h=[h], k=[k], l=[l])
|
||||
|
||||
hkl_button = Button(label="Calculate hkl (slow)")
|
||||
hkl_button = Button(label="Calculate hkl (slow)", width=210)
|
||||
hkl_button.on_click(hkl_button_callback)
|
||||
|
||||
selection_list = TextAreaInput(rows=7)
|
||||
@ -560,32 +559,26 @@ def create():
|
||||
selection_button = Button(label="Add selection")
|
||||
selection_button.on_click(selection_button_callback)
|
||||
|
||||
mf_spinner = Spinner(
|
||||
title="Magnetic field:", format="0.00", width=145, disabled=True
|
||||
)
|
||||
temp_spinner = Spinner(title="Temperature:", format="0.00", width=145, disabled=True)
|
||||
geometry_textinput = TextInput(title="Geometry:", disabled=True)
|
||||
mf_spinner = Spinner(title="Magnetic field:", format="0.00", width=100, disabled=True)
|
||||
temp_spinner = Spinner(title="Temperature:", format="0.00", width=100, disabled=True)
|
||||
geometry_textinput = TextInput(title="Geometry:", width=120, disabled=True)
|
||||
|
||||
# Final layout
|
||||
layout_image = column(gridplot([[proj_v, None], [plot, proj_h]], merge_tools=False))
|
||||
colormap_layout = column(
|
||||
row(colormap),
|
||||
row(column(Spacer(height=19), auto_toggle), display_max_spinner, display_min_spinner),
|
||||
row(
|
||||
column(Spacer(height=19), proj_auto_toggle),
|
||||
proj_display_max_spinner,
|
||||
proj_display_min_spinner,
|
||||
),
|
||||
colormap,
|
||||
main_auto_checkbox,
|
||||
row(display_min_spinner, display_max_spinner),
|
||||
proj_auto_checkbox,
|
||||
row(proj_display_min_spinner, proj_display_max_spinner),
|
||||
)
|
||||
hkl_layout = column(geometry_textinput, hkl_button)
|
||||
params_layout = row(mf_spinner, temp_spinner)
|
||||
|
||||
layout_controls = row(
|
||||
column(selection_button, selection_list),
|
||||
Spacer(width=20),
|
||||
column(frame_button_group, colormap_layout),
|
||||
column(colormap_layout),
|
||||
Spacer(width=20),
|
||||
column(index_spinner, params_layout, hkl_layout),
|
||||
column(row(mf_spinner, temp_spinner), row(geometry_textinput, index_spinner), hkl_button),
|
||||
)
|
||||
|
||||
layout_overview = column(
|
||||
|
@ -11,6 +11,7 @@ from bokeh.models import (
|
||||
BasicTicker,
|
||||
Button,
|
||||
CheckboxEditor,
|
||||
CheckboxGroup,
|
||||
ColumnDataSource,
|
||||
CustomJS,
|
||||
DataRange1d,
|
||||
@ -40,7 +41,6 @@ from bokeh.models import (
|
||||
Tabs,
|
||||
TextAreaInput,
|
||||
TextInput,
|
||||
Toggle,
|
||||
WheelZoomTool,
|
||||
Whisker,
|
||||
)
|
||||
@ -66,8 +66,6 @@ for (let i = 0; i < js_data.data['fname'].length; i++) {
|
||||
}
|
||||
"""
|
||||
|
||||
PROPOSAL_PATH = "/afs/psi.ch/project/sinqdata/2020/zebra/"
|
||||
|
||||
|
||||
def color_palette(n_colors):
|
||||
palette = itertools.cycle(Category10[10])
|
||||
@ -80,14 +78,16 @@ def create():
|
||||
js_data = ColumnDataSource(data=dict(content=["", ""], fname=["", ""]))
|
||||
|
||||
def proposal_textinput_callback(_attr, _old, new):
|
||||
full_proposal_path = os.path.join(PROPOSAL_PATH, new.strip())
|
||||
proposal = new.strip()
|
||||
year = new[:4]
|
||||
proposal_path = f"/afs/psi.ch/project/sinqdata/{year}/zebra/{proposal}"
|
||||
dat_file_list = []
|
||||
for file in os.listdir(full_proposal_path):
|
||||
for file in os.listdir(proposal_path):
|
||||
if file.endswith(".dat"):
|
||||
dat_file_list.append((os.path.join(full_proposal_path, file), file))
|
||||
dat_file_list.append((os.path.join(proposal_path, file), file))
|
||||
file_select.options = dat_file_list
|
||||
|
||||
proposal_textinput = TextInput(title="Proposal number:", default_size=200)
|
||||
proposal_textinput = TextInput(title="Proposal number:", width=210)
|
||||
proposal_textinput.on_change("value", proposal_textinput_callback)
|
||||
|
||||
def _init_datatable():
|
||||
@ -111,7 +111,7 @@ def create():
|
||||
def file_select_callback(_attr, _old, _new):
|
||||
pass
|
||||
|
||||
file_select = MultiSelect(title="Available .dat files:", default_size=200, height=250)
|
||||
file_select = MultiSelect(title="Available .dat files:", width=210, height=250)
|
||||
file_select.on_change("value", file_select_callback)
|
||||
|
||||
def file_open_button_callback():
|
||||
@ -130,8 +130,9 @@ def create():
|
||||
js_data.data.update(fname=[base + ".comm", base + ".incomm"])
|
||||
|
||||
_init_datatable()
|
||||
_update_preview()
|
||||
|
||||
file_open_button = Button(label="Open New", default_size=100)
|
||||
file_open_button = Button(label="Open New", width=100)
|
||||
file_open_button.on_click(file_open_button_callback)
|
||||
|
||||
def file_append_button_callback():
|
||||
@ -145,7 +146,7 @@ def create():
|
||||
|
||||
_init_datatable()
|
||||
|
||||
file_append_button = Button(label="Append", default_size=100)
|
||||
file_append_button = Button(label="Append", width=100)
|
||||
file_append_button.on_click(file_append_button_callback)
|
||||
|
||||
def upload_button_callback(_attr, _old, new):
|
||||
@ -164,9 +165,10 @@ def create():
|
||||
js_data.data.update(fname=[base + ".comm", base + ".incomm"])
|
||||
|
||||
_init_datatable()
|
||||
_update_preview()
|
||||
|
||||
upload_div = Div(text="or upload new .dat files:", margin=(5, 5, 0, 5))
|
||||
upload_button = FileInput(accept=".dat", multiple=True, default_size=200)
|
||||
upload_button = FileInput(accept=".dat", multiple=True, width=200)
|
||||
upload_button.on_change("value", upload_button_callback)
|
||||
|
||||
def append_upload_button_callback(_attr, _old, new):
|
||||
@ -181,7 +183,7 @@ def create():
|
||||
_init_datatable()
|
||||
|
||||
append_upload_div = Div(text="append extra files:", margin=(5, 5, 0, 5))
|
||||
append_upload_button = FileInput(accept=".dat", multiple=True, default_size=200)
|
||||
append_upload_button = FileInput(accept=".dat", multiple=True, width=200)
|
||||
append_upload_button.on_change("value", append_upload_button_callback)
|
||||
|
||||
def monitor_spinner_callback(_attr, _old, new):
|
||||
@ -297,7 +299,7 @@ def create():
|
||||
plot_bkg_source, Line(x="x", y="y", line_color="green", line_dash="dashed")
|
||||
)
|
||||
|
||||
plot_peak_source = ColumnDataSource(dict(xs=[0], ys=[0]))
|
||||
plot_peak_source = ColumnDataSource(dict(xs=[[0]], ys=[[0]]))
|
||||
plot_peak = plot.add_glyph(
|
||||
plot_peak_source, MultiLine(xs="xs", ys="ys", line_color="red", line_dash="dashed")
|
||||
)
|
||||
@ -427,20 +429,20 @@ def create():
|
||||
title="Parameter:",
|
||||
options=["user defined", "temp", "mf", "h", "k", "l"],
|
||||
value="user defined",
|
||||
default_size=145,
|
||||
width=145,
|
||||
)
|
||||
param_select.on_change("value", param_select_callback)
|
||||
|
||||
def fit_from_spinner_callback(_attr, _old, new):
|
||||
fit_from_span.location = new
|
||||
|
||||
fit_from_spinner = Spinner(title="Fit from:", default_size=145)
|
||||
fit_from_spinner = Spinner(title="Fit from:", width=145)
|
||||
fit_from_spinner.on_change("value", fit_from_spinner_callback)
|
||||
|
||||
def fit_to_spinner_callback(_attr, _old, new):
|
||||
fit_to_span.location = new
|
||||
|
||||
fit_to_spinner = Spinner(title="to:", default_size=145)
|
||||
fit_to_spinner = Spinner(title="to:", width=145)
|
||||
fit_to_spinner.on_change("value", fit_to_spinner_callback)
|
||||
|
||||
def fitparams_add_dropdown_callback(click):
|
||||
@ -459,7 +461,7 @@ def create():
|
||||
("Pseudo Voigt", "pvoigt"),
|
||||
# ("Pseudo Voigt1", "pseudovoigt1"),
|
||||
],
|
||||
default_size=145,
|
||||
width=145,
|
||||
)
|
||||
fitparams_add_dropdown.on_click(fitparams_add_dropdown_callback)
|
||||
|
||||
@ -479,7 +481,7 @@ def create():
|
||||
else:
|
||||
fitparams_table_source.data.update(dict(param=[], value=[], vary=[], min=[], max=[]))
|
||||
|
||||
fitparams_select = MultiSelect(options=[], height=120, default_size=145)
|
||||
fitparams_select = MultiSelect(options=[], height=120, width=145)
|
||||
fitparams_select.tags = [0]
|
||||
fitparams_select.on_change("value", fitparams_select_callback)
|
||||
|
||||
@ -494,7 +496,7 @@ def create():
|
||||
|
||||
fitparams_select.value = []
|
||||
|
||||
fitparams_remove_button = Button(label="Remove fit function", default_size=145)
|
||||
fitparams_remove_button = Button(label="Remove fit function", width=145)
|
||||
fitparams_remove_button.on_click(fitparams_remove_button_callback)
|
||||
|
||||
def fitparams_factory(function):
|
||||
@ -516,6 +518,10 @@ def create():
|
||||
param=params, value=[None] * n, vary=[True] * n, min=[None] * n, max=[None] * n,
|
||||
)
|
||||
|
||||
if function == "linear":
|
||||
fitparams["value"] = [0, 0]
|
||||
fitparams["vary"] = [False, True]
|
||||
|
||||
return fitparams
|
||||
|
||||
fitparams_table_source = ColumnDataSource(dict(param=[], value=[], vary=[], min=[], max=[]))
|
||||
@ -551,8 +557,9 @@ def create():
|
||||
|
||||
_update_plot()
|
||||
_update_table()
|
||||
_update_preview()
|
||||
|
||||
fit_all_button = Button(label="Fit All", button_type="primary", default_size=145)
|
||||
fit_all_button = Button(label="Fit All", button_type="primary", width=145)
|
||||
fit_all_button.on_click(fit_all_button_callback)
|
||||
|
||||
def fit_button_callback():
|
||||
@ -563,23 +570,28 @@ def create():
|
||||
|
||||
_update_plot()
|
||||
_update_table()
|
||||
_update_preview()
|
||||
|
||||
fit_button = Button(label="Fit Current", default_size=145)
|
||||
fit_button = Button(label="Fit Current", width=145)
|
||||
fit_button.on_click(fit_button_callback)
|
||||
|
||||
def area_method_radiobutton_callback(_handler):
|
||||
_update_preview()
|
||||
|
||||
area_method_radiobutton = RadioButtonGroup(
|
||||
labels=["Fit area", "Int area"], active=0, default_size=145, disabled=True
|
||||
labels=["Fit area", "Int area"], active=0, width=145, disabled=True
|
||||
)
|
||||
area_method_radiobutton.on_click(area_method_radiobutton_callback)
|
||||
|
||||
bin_size_spinner = Spinner(
|
||||
title="Bin size:", value=1, low=1, step=1, default_size=145, disabled=True
|
||||
)
|
||||
def lorentz_checkbox_callback(_handler):
|
||||
_update_preview()
|
||||
|
||||
lorentz_toggle = Toggle(label="Lorentz Correction", default_size=145)
|
||||
lorentz_checkbox = CheckboxGroup(labels=["Lorentz Correction"], width=145, margin=[13, 5, 5, 5])
|
||||
lorentz_checkbox.on_click(lorentz_checkbox_callback)
|
||||
|
||||
export_preview_textinput = TextAreaInput(title="Export preview:", width=450, height=400)
|
||||
export_preview_textinput = TextAreaInput(title="Export file preview:", width=450, height=400)
|
||||
|
||||
def preview_button_callback():
|
||||
def _update_preview():
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_file = temp_dir + "/temp"
|
||||
export_data = []
|
||||
@ -591,7 +603,7 @@ def create():
|
||||
export_data,
|
||||
temp_file,
|
||||
area_method=AREA_METHODS[int(area_method_radiobutton.active)],
|
||||
lorentz=lorentz_toggle.active,
|
||||
lorentz=bool(lorentz_checkbox.active),
|
||||
)
|
||||
|
||||
exported_content = ""
|
||||
@ -609,10 +621,7 @@ def create():
|
||||
js_data.data.update(content=file_content)
|
||||
export_preview_textinput.value = exported_content
|
||||
|
||||
preview_button = Button(label="Preview", default_size=220)
|
||||
preview_button.on_click(preview_button_callback)
|
||||
|
||||
save_button = Button(label="Download preview", button_type="success", default_size=220)
|
||||
save_button = Button(label="Download File", button_type="success", width=220)
|
||||
save_button.js_on_click(CustomJS(args={"js_data": js_data}, code=javaScript))
|
||||
|
||||
fitpeak_controls = row(
|
||||
@ -621,8 +630,7 @@ def create():
|
||||
Spacer(width=20),
|
||||
column(
|
||||
row(fit_from_spinner, fit_to_spinner),
|
||||
row(bin_size_spinner, column(Spacer(height=19), lorentz_toggle)),
|
||||
row(area_method_radiobutton),
|
||||
row(area_method_radiobutton, lorentz_checkbox),
|
||||
row(fit_button, fit_all_button),
|
||||
),
|
||||
)
|
||||
@ -639,7 +647,7 @@ def create():
|
||||
append_upload_button,
|
||||
)
|
||||
|
||||
export_layout = column(export_preview_textinput, row(preview_button, save_button))
|
||||
export_layout = column(export_preview_textinput, row(save_button))
|
||||
|
||||
tab_layout = column(
|
||||
row(import_layout, scan_layout, plots, Spacer(width=30), export_layout),
|
||||
|
@ -28,13 +28,14 @@ def create():
|
||||
lattice_const_textinput = TextInput(
|
||||
title="Lattice constants:", value="8.3211,8.3211,8.3211,90.00,90.00,90.00"
|
||||
)
|
||||
max_res_spinner = Spinner(title="max-res", value=2, step=0.01)
|
||||
seed_pool_size_spinner = Spinner(title="seed-pool-size", value=5, step=0.01)
|
||||
seed_len_tol_spinner = Spinner(title="seed-len-tol", value=0.02, step=0.01)
|
||||
seed_angle_tol_spinner = Spinner(title="seed-angle-tol", value=1, step=0.01)
|
||||
eval_hkl_tol_spinner = Spinner(title="eval-hkl-tol", value=0.15, step=0.01)
|
||||
max_res_spinner = Spinner(title="max-res:", value=2, step=0.01, width=145)
|
||||
seed_pool_size_spinner = Spinner(title="seed-pool-size:", value=5, step=0.01, width=145)
|
||||
seed_len_tol_spinner = Spinner(title="seed-len-tol:", value=0.02, step=0.01, width=145)
|
||||
seed_angle_tol_spinner = Spinner(title="seed-angle-tol:", value=1, step=0.01, width=145)
|
||||
eval_hkl_tol_spinner = Spinner(title="eval-hkl-tol:", value=0.15, step=0.01, width=145)
|
||||
|
||||
diff_vec = []
|
||||
ub_matrices = []
|
||||
|
||||
def process_button_callback():
|
||||
nonlocal diff_vec
|
||||
@ -68,6 +69,10 @@ def create():
|
||||
|
||||
diff_vec = prepare_event_file(temp_event_file, roi_dict, path_prefix_textinput.value)
|
||||
|
||||
print(f"Content of {temp_event_file}:")
|
||||
with open(temp_event_file) as f:
|
||||
print(f.read())
|
||||
|
||||
comp_proc = subprocess.run(
|
||||
[
|
||||
"mpiexec",
|
||||
@ -96,8 +101,9 @@ def create():
|
||||
print(" ".join(comp_proc.args))
|
||||
print(comp_proc.stdout)
|
||||
|
||||
spind_out_file = os.path.join(temp_dir, "spind.txt")
|
||||
try:
|
||||
with open(os.path.join(temp_dir, "spind.txt")) as f_out:
|
||||
with open(spind_out_file) as f_out:
|
||||
spind_res = defaultdict(list)
|
||||
for line in f_out:
|
||||
c1, c2, c3, c4, c5, *c_rest = line.split()
|
||||
@ -110,28 +116,36 @@ def create():
|
||||
# last digits are spind UB matrix
|
||||
vals = list(map(float, c_rest))
|
||||
ub_matrix_spind = np.array(vals).reshape(3, 3)
|
||||
ub_matrix = np.linalg.inv(np.transpose(ub_matrix_spind)) * 1e10
|
||||
spind_res["ub_matrix"].append(ub_matrix)
|
||||
ub_matrix = np.linalg.inv(np.transpose(ub_matrix_spind))
|
||||
ub_matrices.append(ub_matrix)
|
||||
spind_res["ub_matrix"].append(ub_matrix_spind)
|
||||
|
||||
results_table_source.data.update(spind_res)
|
||||
|
||||
print(f"Content of {spind_out_file}:")
|
||||
with open(spind_out_file) as f:
|
||||
print(f.read())
|
||||
|
||||
except FileNotFoundError:
|
||||
print("No results from spind")
|
||||
|
||||
process_button = Button(label="Process", button_type="primary")
|
||||
process_button.on_click(process_button_callback)
|
||||
|
||||
hkl_textareainput = TextAreaInput(title="hkl values:", rows=7)
|
||||
ub_matrix_textareainput = TextAreaInput(title="UB matrix:", rows=7, width=400)
|
||||
hkl_textareainput = TextAreaInput(title="hkl values:", rows=7, width=400)
|
||||
|
||||
def results_table_select_callback(_attr, old, new):
|
||||
if new:
|
||||
ind = new[0]
|
||||
ub_matrix = results_table_source.data["ub_matrix"][ind]
|
||||
ub_matrix = ub_matrices[ind]
|
||||
res = ""
|
||||
for vec in diff_vec:
|
||||
res += f"{vec @ ub_matrix}\n"
|
||||
res += f"{ub_matrix @ vec}\n"
|
||||
ub_matrix_textareainput.value = str(ub_matrix * 1e10)
|
||||
hkl_textareainput.value = res
|
||||
else:
|
||||
ub_matrix_textareainput.value = None
|
||||
hkl_textareainput.value = None
|
||||
|
||||
results_table_source = ColumnDataSource(dict())
|
||||
@ -143,10 +157,10 @@ def create():
|
||||
TableColumn(field="match_rate", title="Match Rate", width=100),
|
||||
TableColumn(field="matched_peaks", title="Matched Peaks", width=100),
|
||||
TableColumn(field="column_5", title="", width=100),
|
||||
TableColumn(field="ub_matrix", title="UB Matrix", width=250),
|
||||
TableColumn(field="ub_matrix", title="UB Matrix", width=700),
|
||||
],
|
||||
height=300,
|
||||
width=700,
|
||||
width=1200,
|
||||
autosize_mode="none",
|
||||
index_position=None,
|
||||
)
|
||||
@ -158,14 +172,12 @@ def create():
|
||||
path_prefix_textinput,
|
||||
selection_list,
|
||||
lattice_const_textinput,
|
||||
max_res_spinner,
|
||||
seed_pool_size_spinner,
|
||||
seed_len_tol_spinner,
|
||||
seed_angle_tol_spinner,
|
||||
eval_hkl_tol_spinner,
|
||||
row(max_res_spinner, seed_pool_size_spinner),
|
||||
row(seed_len_tol_spinner, seed_angle_tol_spinner),
|
||||
row(eval_hkl_tol_spinner),
|
||||
process_button,
|
||||
),
|
||||
column(results_table, row(hkl_textareainput)),
|
||||
column(results_table, row(ub_matrix_textareainput, hkl_textareainput)),
|
||||
)
|
||||
|
||||
return Panel(child=tab_layout, title="spind")
|
||||
@ -244,9 +256,10 @@ def prepare_event_file(export_filename, roi_dict, path_prefix=""):
|
||||
ga, nu = pyzebra.det2pol(ddist, gamma, nu, x_pos, y_pos)
|
||||
diff_vector = pyzebra.z1frmd(wave, ga, omega, chi, phi, nu)
|
||||
d_spacing = float(pyzebra.dandth(wave, diff_vector)[0])
|
||||
dv1, dv2, dv3 = diff_vector.flatten() * 1e10
|
||||
diff_vector = diff_vector.flatten() * 1e10
|
||||
dv1, dv2, dv3 = diff_vector
|
||||
|
||||
diff_vec.append(diff_vector.flatten())
|
||||
diff_vec.append(diff_vector)
|
||||
|
||||
f.write(f"{x_pos} {y_pos} {intensity} {snr_cnts} {dv1} {dv2} {dv3} {d_spacing}\n")
|
||||
|
||||
|
Reference in New Issue
Block a user