Update layouts
This commit is contained in:
parent
b63ef90e11
commit
dab52d9508
@ -244,7 +244,7 @@ def create():
|
||||
numfit_max_span.location = None
|
||||
|
||||
# Main plot
|
||||
plot = Plot(x_range=DataRange1d(), y_range=DataRange1d(), plot_height=400, plot_width=700)
|
||||
plot = Plot(x_range=DataRange1d(), y_range=DataRange1d(), plot_height=470, plot_width=700)
|
||||
|
||||
plot.add_layout(LinearAxis(axis_label="Counts"), place="left")
|
||||
plot.add_layout(LinearAxis(axis_label="Omega"), place="below")
|
||||
@ -460,7 +460,7 @@ def create():
|
||||
fitparams_add_dropdown_callback(types.SimpleNamespace(item="background"))
|
||||
fitparams_add_dropdown_callback(types.SimpleNamespace(item="gauss"))
|
||||
|
||||
fit_output_textinput = TextAreaInput(title="Fit results:", width=450, height=400)
|
||||
fit_output_textinput = TextAreaInput(title="Fit results:", width=450, height=200)
|
||||
|
||||
def _get_peakfind_params():
|
||||
return dict(
|
||||
@ -638,8 +638,8 @@ def create():
|
||||
column(upload_div, upload_button),
|
||||
column(append_upload_div, append_upload_button),
|
||||
),
|
||||
row(scan_layout, plot, Spacer(width=30), fit_output_textinput, export_layout),
|
||||
row(findpeak_controls, Spacer(width=30), fitpeak_controls),
|
||||
row(scan_layout, plot, Spacer(width=30), export_layout),
|
||||
row(findpeak_controls, Spacer(width=30), fitpeak_controls, fit_output_textinput),
|
||||
)
|
||||
|
||||
return Panel(child=tab_layout, title="ccl integrate")
|
||||
|
@ -112,7 +112,7 @@ def create():
|
||||
def logfile_textinput_callback(_attr, _old, new):
|
||||
config.logfile = new
|
||||
|
||||
logfile_textinput = TextInput(title="Logfile:", value="logfile.log", width=520)
|
||||
logfile_textinput = TextInput(title="Logfile:", value="logfile.log", width=320)
|
||||
logfile_textinput.on_change("value", logfile_textinput_callback)
|
||||
|
||||
def logfile_verbosity_select_callback(_attr, _old, new):
|
||||
@ -133,7 +133,7 @@ def create():
|
||||
def filelist_format_textinput_callback(_attr, _old, new):
|
||||
config.filelist_format = new
|
||||
|
||||
filelist_format_textinput = TextInput(title="format:", width=490)
|
||||
filelist_format_textinput = TextInput(title="format:", width=290)
|
||||
filelist_format_textinput.on_change("value", filelist_format_textinput_callback)
|
||||
|
||||
def filelist_datapath_textinput_callback(_attr, _old, new):
|
||||
@ -161,7 +161,7 @@ def create():
|
||||
def lambda_textinput_callback(_attr, _old, new):
|
||||
config.crystal_lambda = new
|
||||
|
||||
lambda_textinput = TextInput(title="lambda:", width=140)
|
||||
lambda_textinput = TextInput(title="lambda:", width=145)
|
||||
lambda_textinput.on_change("value", lambda_textinput_callback)
|
||||
|
||||
def ub_textareainput_callback(_attr, _old, new):
|
||||
@ -173,19 +173,19 @@ def create():
|
||||
def zeroOM_textinput_callback(_attr, _old, new):
|
||||
config.crystal_zeroOM = new
|
||||
|
||||
zeroOM_textinput = TextInput(title="zeroOM:", width=140)
|
||||
zeroOM_textinput = TextInput(title="zeroOM:", width=145)
|
||||
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=140)
|
||||
zeroSTT_textinput = TextInput(title="zeroSTT:", width=145)
|
||||
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=140)
|
||||
zeroCHI_textinput = TextInput(title="zeroCHI:", width=145)
|
||||
zeroCHI_textinput.on_change("value", zeroCHI_textinput_callback)
|
||||
|
||||
# ---- DataFactory
|
||||
@ -193,14 +193,14 @@ def create():
|
||||
config.dataFactory_implementation = new
|
||||
|
||||
dataFactory_implementation_select = Select(
|
||||
title="DataFactory implementation:", options=DATA_FACTORY_IMPLEMENTATION, width=300,
|
||||
title="DataFactory implement.:", options=DATA_FACTORY_IMPLEMENTATION, width=145,
|
||||
)
|
||||
dataFactory_implementation_select.on_change("value", dataFactory_implementation_select_callback)
|
||||
|
||||
def dataFactory_dist1_textinput_callback(_attr, _old, new):
|
||||
config.dataFactory_dist1 = new
|
||||
|
||||
dataFactory_dist1_textinput = TextInput(title="dist1:", width=290)
|
||||
dataFactory_dist1_textinput = TextInput(title="dist1:", width=145)
|
||||
dataFactory_dist1_textinput.on_change("value", dataFactory_dist1_textinput_callback)
|
||||
|
||||
# ---- BackgroundProcessor
|
||||
@ -212,7 +212,7 @@ def create():
|
||||
config.reflectionPrinter_format = new
|
||||
|
||||
reflectionPrinter_format_select = Select(
|
||||
title="ReflectionPrinter format:", options=REFLECTION_PRINTER_FORMATS, width=300,
|
||||
title="ReflectionPrinter format:", options=REFLECTION_PRINTER_FORMATS, width=145,
|
||||
)
|
||||
reflectionPrinter_format_select.on_change("value", reflectionPrinter_format_select_callback)
|
||||
|
||||
@ -357,49 +357,54 @@ def create():
|
||||
process_button = Button(label="Process", button_type="primary")
|
||||
process_button.on_click(process_button_callback)
|
||||
|
||||
output_log = TextAreaInput(title="Logfile output:", height=700, disabled=True)
|
||||
output_config = TextAreaInput(title="Current config:", height=700, width=400, disabled=True)
|
||||
output_log = TextAreaInput(title="Logfile output:", height=600, disabled=True)
|
||||
output_config = TextAreaInput(title="Current config:", height=600, width=400, disabled=True)
|
||||
|
||||
tab_layout = row(
|
||||
column(
|
||||
row(column(Spacer(height=2), upload_div), upload_button),
|
||||
row(logfile_textinput, logfile_verbosity_select),
|
||||
row(filelist_type, filelist_format_textinput),
|
||||
filelist_datapath_textinput,
|
||||
filelist_ranges_textareainput,
|
||||
crystal_sample_textinput,
|
||||
row(lambda_textinput, zeroOM_textinput, zeroSTT_textinput, zeroCHI_textinput),
|
||||
ub_textareainput,
|
||||
row(dataFactory_implementation_select, dataFactory_dist1_textinput),
|
||||
reflectionPrinter_format_select,
|
||||
process_button,
|
||||
),
|
||||
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,
|
||||
),
|
||||
general_params_layout = column(
|
||||
row(logfile_textinput, logfile_verbosity_select),
|
||||
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),
|
||||
ub_textareainput,
|
||||
row(dataFactory_implementation_select, dataFactory_dist1_textinput),
|
||||
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,
|
||||
),
|
||||
),
|
||||
output_config,
|
||||
output_log,
|
||||
)
|
||||
|
||||
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)),
|
||||
),
|
||||
)
|
||||
|
||||
async def update_config():
|
||||
|
@ -41,6 +41,8 @@ import pyzebra
|
||||
|
||||
IMAGE_W = 256
|
||||
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/"
|
||||
|
||||
@ -179,8 +181,8 @@ def create():
|
||||
plot = Plot(
|
||||
x_range=Range1d(0, IMAGE_W, bounds=(0, IMAGE_W)),
|
||||
y_range=Range1d(0, IMAGE_H, bounds=(0, IMAGE_H)),
|
||||
plot_height=IMAGE_H * 3,
|
||||
plot_width=IMAGE_W * 3,
|
||||
plot_height=IMAGE_PLOT_H,
|
||||
plot_width=IMAGE_PLOT_W,
|
||||
toolbar_location="left",
|
||||
)
|
||||
|
||||
@ -233,8 +235,8 @@ def create():
|
||||
proj_v = Plot(
|
||||
x_range=plot.x_range,
|
||||
y_range=DataRange1d(),
|
||||
plot_height=200,
|
||||
plot_width=IMAGE_W * 3,
|
||||
plot_height=150,
|
||||
plot_width=IMAGE_PLOT_W,
|
||||
toolbar_location=None,
|
||||
)
|
||||
|
||||
@ -250,8 +252,8 @@ def create():
|
||||
proj_h = Plot(
|
||||
x_range=DataRange1d(),
|
||||
y_range=plot.y_range,
|
||||
plot_height=IMAGE_H * 3,
|
||||
plot_width=200,
|
||||
plot_height=IMAGE_PLOT_H,
|
||||
plot_width=150,
|
||||
toolbar_location=None,
|
||||
)
|
||||
|
||||
@ -314,8 +316,8 @@ def create():
|
||||
title=Title(text="Projections on X-axis"),
|
||||
x_range=det_x_range,
|
||||
y_range=frame_range,
|
||||
plot_height=500,
|
||||
plot_width=IMAGE_W * 3,
|
||||
plot_height=400,
|
||||
plot_width=IMAGE_PLOT_W,
|
||||
)
|
||||
|
||||
# ---- tools
|
||||
@ -351,8 +353,8 @@ def create():
|
||||
title=Title(text="Projections on Y-axis"),
|
||||
x_range=det_y_range,
|
||||
y_range=frame_range,
|
||||
plot_height=500,
|
||||
plot_width=IMAGE_H * 3,
|
||||
plot_height=400,
|
||||
plot_width=IMAGE_PLOT_H,
|
||||
)
|
||||
|
||||
# ---- tools
|
||||
@ -393,7 +395,7 @@ def create():
|
||||
x_range=DataRange1d(),
|
||||
y_range=DataRange1d(),
|
||||
plot_height=200,
|
||||
plot_width=IMAGE_W * 3,
|
||||
plot_width=IMAGE_PLOT_W,
|
||||
toolbar_location="left",
|
||||
)
|
||||
|
||||
|
@ -278,7 +278,7 @@ def create():
|
||||
ov_param_plot_scatter_source.data.update(x=x, y=y, param=par)
|
||||
|
||||
# Main plot
|
||||
plot = Plot(x_range=DataRange1d(), y_range=DataRange1d(), plot_height=400, plot_width=700)
|
||||
plot = Plot(x_range=DataRange1d(), y_range=DataRange1d(), plot_height=450, plot_width=700)
|
||||
|
||||
plot.add_layout(LinearAxis(axis_label="Counts"), place="left")
|
||||
plot.add_layout(LinearAxis(axis_label="Omega"), place="below")
|
||||
@ -534,7 +534,7 @@ def create():
|
||||
fitparams_add_dropdown_callback(types.SimpleNamespace(item="background"))
|
||||
fitparams_add_dropdown_callback(types.SimpleNamespace(item="gauss"))
|
||||
|
||||
fit_output_textinput = TextAreaInput(title="Fit results:", width=450, height=400)
|
||||
fit_output_textinput = TextAreaInput(title="Fit results:", width=450, height=200)
|
||||
|
||||
def _get_peakfind_params():
|
||||
return dict(
|
||||
@ -696,8 +696,8 @@ def create():
|
||||
column(upload_div, upload_button),
|
||||
column(append_upload_div, append_upload_button),
|
||||
),
|
||||
row(scan_table, plots, Spacer(width=30), fit_output_textinput, export_layout),
|
||||
row(findpeak_controls, Spacer(width=30), fitpeak_controls),
|
||||
row(scan_table, plots, Spacer(width=30), export_layout),
|
||||
row(findpeak_controls, Spacer(width=30), fitpeak_controls, fit_output_textinput),
|
||||
)
|
||||
|
||||
return Panel(child=tab_layout, title="param study")
|
||||
|
Loading…
x
Reference in New Issue
Block a user