Commit b1f7ef94 authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Fix bug in iniial layout as prm2020 selection

parent 9aee4a16
......@@ -329,20 +329,10 @@
visualizer.show()
def default_button_clicked(button):
default_operations = ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb',
'sqrt', 'cbrt', 'log', 'abs']
default_features = ['z_cations','x_cations','l_cations','z_anions','x_anions','l_anions']
for op, widget in zip(possible_operations, op_list):
widget.value = op in default_operations
widget.disabled = True
for feat, widget in zip(possible_features, feat_list):
widget.value = feat in default_features
widget.disabled = True
rung_selection.value = 'PRM2020'
feat_per_iter_selection.value = 50
dimension_selection.value = 2
def run_button_clicked(button):
......@@ -464,16 +454,19 @@
feat_list.append(widgets.Checkbox(description=tooltips[feature], value=True, indent=False, layout=cb_layout))
feat_labels.append(widgets.Label(value=labels[feature]))
op_box = widgets.VBox([widgets.Label()]+op_list)
op_label_box = widgets.VBox([widgets.Label(value='Operations:', layout=thin_layout)]+op_labels)
for box in op_list: box.disabled = True
feat_box = widgets.VBox([widgets.Label()]+feat_list)
feat_label_box = widgets.VBox([widgets.Label(value='Features:', layout=thin_layout)]+feat_labels)
for box in feat_list: box.disabled = True
rung_selection = widgets.Dropdown(options=['PRM2020', 1,2,3], layout=thin_layout)
feat_per_iter_selection = widgets.BoundedIntText(value=26, min=10, max=100, step=1, layout=thin_layout)
dimension_selection = widgets.BoundedIntText(value = 3, min=1, max=4, step=1, layout = thin_layout)
rung_selection = widgets.Dropdown(options=['PRM2020', 1,2,3], value=2,layout=thin_layout)
rung_selection.value = 'PRM2020'
feat_per_iter_selection = widgets.BoundedIntText(value = 50, min=10, max=100, step=1, layout=thin_layout)
dimension_selection = widgets.BoundedIntText(value = 2, min=1, max=4, step=1, layout = thin_layout)
settings_box = widgets.VBox([
widgets.Label(value='Settings:', layout=wide_layout),
widgets.Label(value='SISSO rung:', layout=wide_layout),
rung_selection,
widgets.Label(value='To unfreeze the feature selection,' , layout=wide_layout),
......@@ -484,27 +477,23 @@
dimension_selection])
default_button = widgets.Button(description = 'Default selection', layout=mid_layout)
run_button = widgets.Button(description = 'Run', layout=mid_layout)
plot_button = widgets.Button(description = 'Plot interactive map', disabled=True, layout=mid_layout)
button_box = widgets.VBox([default_button, run_button, plot_button])
default_button.on_click(default_button_clicked)
run_button.on_click(run_button_clicked)
plot_button.on_click(plot_button_clicked)
button_box = widgets.VBox([default_button, run_button, plot_button])
rung_selection.observe(handle_rung_selection, names='value')
out1 = widgets.Output()
out2 = widgets.Output()
gui_box = widgets.HBox([op_box, op_label_box, feat_box, feat_label_box, settings_box, button_box])
out_box = widgets.VBox([gui_box, out1, out2])
display(out_box)
```
%% Cell type:code id: tags:
%%%% Output: display_data
``` python
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment