Skip to content

Commit 64e60a2

Browse files
committed
connecting new ssx_intregrate widget
1 parent b4a2521 commit 64e60a2

7 files changed

Lines changed: 128 additions & 10 deletions

File tree

src/client/dui_client.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@
915915
</item>
916916
</layout>
917917
</widget>
918-
<widget class="QWidget" name="SsxIntergratePage">
918+
<widget class="QWidget" name="SsxIntegratePage">
919919
<layout class="QGridLayout" name="gridLayout_42">
920920
<item row="0" column="0">
921921
<widget class="QTabWidget" name="tabWidget_10">

src/client/exec_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def get_help_messages(handler_in):
232232
"reindex",
233233
"refine",
234234
"integrate",
235+
"ssx_integrate",
235236
"symmetry",
236237
"scale",
237238
"cosym",

src/client/gui_utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def check_if_predict_n_report(str_key):
8686
"icon" : "resources/ssx_index.png",
8787
"main_cmd" :["dials.ssx_index"],
8888
"nxt_widg_lst" :[
89-
"integrate",
89+
"ssx_integrate",
9090
"optional"
9191
]
9292
},
@@ -124,6 +124,14 @@ def check_if_predict_n_report(str_key):
124124
"symmetry", "scale", "export", "combine_experiments", "optional"
125125
]
126126
},
127+
"ssx_integrate" : {
128+
"tooltip" : "dials.ssx_integrate ...",
129+
"icon" : "resources/ssx_integrate.png",
130+
"main_cmd" :["dials.ssx_integrate"],
131+
"nxt_widg_lst" :[
132+
"symmetry", "scale", "export", "optional"
133+
]
134+
},
127135
"symmetry" : {
128136
"tooltip" : "dials.symmetry ...",
129137
"icon" : "resources/symmetry.png",

src/client/q_object.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from client.simpler_param_widgets import OptionalWidget
5353
from client.simpler_param_widgets import (
5454
FindspotsSimplerParameterTab, IndexSimplerParamTab,
55-
SsxIndexSimplerParamTab,
55+
SsxIndexSimplerParamTab, SsxIntegrateSimplerParamTab,
5656
RefineBravaiSimplerParamTab, RefineSimplerParamTab,
5757
IntegrateSimplerParamTab, SymmetrySimplerParamTab,
5858
ScaleSimplerParamTab, CombineExperimentSimplerParamTab
@@ -259,6 +259,29 @@ def __init__(self, parent = None, multi_runner = None):
259259
it_advanced_parameters.set_scroll_parent(
260260
self.window.IntegrateAdvancedScrollArea
261261
)
262+
263+
#######################################################################################################
264+
265+
ssx_integr_simpl_widg = SsxIntegrateSimplerParamTab()
266+
ssx_integr_simpl_widg.item_changed.connect(self.item_param_changed)
267+
self.window.SsxIntegrateSimplerScrollArea.setWidget(ssx_integr_simpl_widg)
268+
ssx_it_advanced_parameters = build_advanced_params_widget(
269+
"ssx_integrate_params", self.window.SsxIntegrateSearchLayout,
270+
self.runner_handler
271+
)
272+
ssx_it_advanced_parameters.item_changed.connect(
273+
self.item_param_changed
274+
)
275+
self.window.SsxIntegrateAdvancedScrollArea.setWidget(
276+
ssx_it_advanced_parameters
277+
)
278+
ssx_it_advanced_parameters.set_scroll_parent(
279+
self.window.SsxIntegrateAdvancedScrollArea
280+
)
281+
282+
#######################################################################################################
283+
284+
262285
sym_simpl_widg = SymmetrySimplerParamTab()
263286
sym_simpl_widg.item_changed.connect(self.item_param_changed)
264287
self.window.SymmetrySimplerScrollArea.setWidget(sym_simpl_widg)
@@ -321,6 +344,10 @@ def __init__(self, parent = None, multi_runner = None):
321344
ref_simpl_widg.twin_widg = rf_advanced_parameters
322345
it_advanced_parameters.twin_widg = integr_simpl_widg
323346
integr_simpl_widg.twin_widg = it_advanced_parameters
347+
348+
ssx_it_advanced_parameters.twin_widg = ssx_integr_simpl_widg
349+
ssx_integr_simpl_widg.twin_widg = ssx_it_advanced_parameters
350+
324351
sm_advanced_parameters.twin_widg = sym_simpl_widg
325352
sym_simpl_widg.twin_widg = sm_advanced_parameters
326353
sc_advanced_parameters.twin_widg = scale_simpl_widg
@@ -385,6 +412,14 @@ def __init__(self, parent = None, multi_runner = None):
385412
"integrate"
386413
]["main_page"] = self.window.IntegratePage
387414

415+
########################################################################################################
416+
self.param_widgets["ssx_integrate"]["simple"] = ssx_integr_simpl_widg
417+
self.param_widgets["ssx_integrate"]["advanced"] = ssx_it_advanced_parameters
418+
self.param_widgets[
419+
"ssx_integrate"
420+
]["main_page"] = self.window.SsxIntegratePage
421+
########################################################################################################
422+
388423
self.param_widgets["symmetry"]["simple"] = sym_simpl_widg
389424
self.param_widgets["symmetry"]["advanced"] = sm_advanced_parameters
390425
self.param_widgets["symmetry"]["main_page"] = self.window.SimmetryPage
47.1 KB
Loading

src/client/simpler_param_widgets.py

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,6 @@ def special_check_up(self, param_in, value_in):
10981098
self.detec_fix.setChecked(False)
10991099

11001100

1101-
################################################################################### New SsxIndexSimplerParamTab
1102-
11031101
class SsxIndexSimplerParamTab(SimpleParamTab):
11041102
"""
11051103
This widget is the tool for tunning the simpler and most common parameters
@@ -1165,9 +1163,6 @@ def reset_pars(self):
11651163
self.build_pars()
11661164

11671165

1168-
################################################################################### New SsxIndexSimplerParamTab
1169-
1170-
11711166
class RefineBravaiSimplerParamTab(SimpleParamTab):
11721167
def __init__(self, parent=None):
11731168
super(RefineBravaiSimplerParamTab, self).__init__()
@@ -1335,7 +1330,7 @@ def special_check_up(self, param_in, value_in):
13351330
self.detec_fix.setChecked(False)
13361331

13371332

1338-
class IntegrateSimplerParamTab(SimpleParamTab):
1333+
class IntegrateSimplerParamTab(SimpleParamTab):
13391334
"""
13401335
This widget is the tool for tunning the simpler and most common parameters
13411336
in the integrate algorithm, this widget is the first to appear once the
@@ -1405,6 +1400,82 @@ def reset_pars(self):
14051400
self.clearLayout(self.main_v_layout)
14061401
self.build_pars()
14071402

1403+
########################################################################################################
1404+
1405+
class SsxIntegrateSimplerParamTab(SimpleParamTab):
1406+
"""
1407+
This widget is the tool for tunning the simpler and most common parameters
1408+
in the integrate algorithm, this widget is the first to appear once the
1409+
button "Integrate" is clicked
1410+
"""
1411+
def __init__(self, parent=None):
1412+
super(SsxIntegrateSimplerParamTab, self).__init__()
1413+
self.do_emit = True
1414+
self.main_v_layout = QVBoxLayout()
1415+
self.build_pars()
1416+
self.setLayout(self.main_v_layout)
1417+
1418+
def build_pars(self):
1419+
1420+
hbox_d_min = QHBoxLayout()
1421+
label_d_min = QLabel("High resolution limit")
1422+
hbox_d_min.addWidget(label_d_min)
1423+
d_min_line = QLineEdit()
1424+
d_min_line.setPlaceholderText("None")
1425+
d_min_line.local_path = "prediction.d_min"
1426+
d_min_line.textChanged.connect(self.line_changed)
1427+
hbox_d_min.addWidget(d_min_line)
1428+
self.main_v_layout.addLayout(hbox_d_min)
1429+
1430+
##############################################################################
1431+
hbox_d_max = QHBoxLayout()
1432+
d_max_label = QLabel("Low resolution limit")
1433+
hbox_d_max.addWidget(d_max_label)
1434+
d_max_line = QLineEdit()
1435+
d_max_line.setPlaceholderText("None")
1436+
d_max_line.local_path = "prediction.d_max"
1437+
d_max_line.textChanged.connect(self.line_changed)
1438+
hbox_d_max.addWidget(d_max_line)
1439+
self.main_v_layout.addLayout(hbox_d_max)
1440+
##############################################################################
1441+
1442+
hbox_lay_algorithm_53 = QHBoxLayout()
1443+
label_algorithm_53 = QLabel("Background algorithm")
1444+
hbox_lay_algorithm_53.addWidget(label_algorithm_53)
1445+
box_algorithm_53 = DefaultComboBox("integration.background.algorithm",
1446+
["Auto", "glm", "gmodel", "null", "simple"], default_index=0)
1447+
box_algorithm_53.currentIndexChanged.connect(self.combobox_changed)
1448+
hbox_lay_algorithm_53.addWidget(box_algorithm_53)
1449+
self.main_v_layout.addLayout(hbox_lay_algorithm_53)
1450+
1451+
1452+
1453+
1454+
consider_2_remove = '''
1455+
PrFit_lay_out = QHBoxLayout()
1456+
label_PrFit = QLabel("Use profile fitting")
1457+
PrFit_lay_out.addWidget(label_PrFit)
1458+
PrFit_comb_bx = DefaultComboBox("integration.profile.fitting",
1459+
["True", "False", "Auto"])
1460+
PrFit_comb_bx.currentIndexChanged.connect(self.combobox_changed)
1461+
PrFit_lay_out.addWidget(PrFit_comb_bx)
1462+
self.main_v_layout.addLayout(PrFit_lay_out)
1463+
'''
1464+
1465+
self.main_v_layout.addStretch()
1466+
#self.box_nproc.item_list = None
1467+
self.lst_var_widg = _get_all_direct_layout_widget_children(
1468+
self.main_v_layout
1469+
)
1470+
1471+
def reset_pars(self):
1472+
self.clearLayout(self.main_v_layout)
1473+
self.build_pars()
1474+
1475+
########################################################################################################
1476+
1477+
1478+
14081479
class SymmetrySimplerParamTab(SimpleParamTab):
14091480
"""
14101481
This widget is the tool for tunning the simpler and most common parameters

src/server/data_n_json.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
from dials.command_line.refine import working_phil as phil_scope_refine
3737
from dials.command_line.integrate import phil_scope as phil_scope_integrate
3838

39+
from dials.command_line.ssx_integrate import phil_scope as ssx_phil_scope_integrate
40+
3941
from dials.command_line.scale import phil_scope as phil_scope_scale
4042
from dials.command_line.symmetry import phil_scope as phil_scope_symmetry
4143
from dials.command_line.combine_experiments import (
@@ -508,10 +510,11 @@ def get_param_list(cmd_str):
508510
connect_dict = {
509511
"find_spots_params" :phil_scope_find_spots.objects ,
510512
"index_params" :phil_scope_index.objects ,
511-
"ssx_index_params" :ssx_phil_scope_index.objects ,
513+
"ssx_index_params" :ssx_phil_scope_index.objects ,
512514
"refine_bravais_settings_params" :phil_scope_r_b_settings.objects ,
513515
"refine_params" :phil_scope_refine.objects ,
514516
"integrate_params" :phil_scope_integrate.objects ,
517+
"ssx_integrate_params" :ssx_phil_scope_integrate.objects ,
515518
"symmetry_params" :phil_scope_symmetry.objects ,
516519
"scale_params" :phil_scope_scale.objects ,
517520
"combine_experiments_params" :phil_scope_combine_params.objects,

0 commit comments

Comments
 (0)