diff --git a/hexrd/ui/indexing/fit_grains_options_dialog.py b/hexrd/ui/indexing/fit_grains_options_dialog.py
index 6a36cf4b6..7ddd227e0 100644
--- a/hexrd/ui/indexing/fit_grains_options_dialog.py
+++ b/hexrd/ui/indexing/fit_grains_options_dialog.py
@@ -14,6 +14,7 @@
from hexrd.ui.reflections_table import ReflectionsTable
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
+from hexrd.ui.utils.dialog import add_help_url
from hexrd.ui.indexing.fit_grains_tolerances_model import (
FitGrainsToleranceModel)
@@ -41,6 +42,9 @@ def __init__(self, grains_table, ensure_seed_hkls_not_excluded=True,
flags = self.ui.windowFlags()
self.ui.setWindowFlags(flags | Qt.Tool)
+ url = 'hedm/fit_grains/#fit-grains-options'
+ add_help_url(self.ui.button_box, url)
+
self.update_materials()
kwargs = {
@@ -72,8 +76,6 @@ def __init__(self, grains_table, ensure_seed_hkls_not_excluded=True,
def setup_connections(self):
self.ui.accepted.connect(self.on_accepted)
self.ui.rejected.connect(self.rejected)
- self.ui.tth_max_enable.toggled.connect(self.on_tth_max_toggled)
- self.ui.tth_max_specify.toggled.connect(self.on_tth_specify_toggled)
self.ui.tolerances_view.selectionModel().selectionChanged.connect(
self.on_tolerances_select)
self.ui.add_row.clicked.connect(self.on_tolerances_add_row)
@@ -108,10 +110,6 @@ def all_widgets(self):
self.ui.refit_pixel_scale,
self.ui.tolerances_view,
self.ui.threshold,
- self.ui.tth_max_enable,
- self.ui.tth_max_instrument,
- self.ui.tth_max_specify,
- self.ui.tth_max_value,
]
return widgets
@@ -232,16 +230,6 @@ def tolerance_data_modified(self):
self.ui.grains_table_view.tolerances = tolerances
- def on_tth_max_toggled(self, checked):
- enabled = checked
- self.ui.tth_max_instrument.setEnabled(enabled)
- self.ui.tth_max_specify.setEnabled(enabled)
- specify = self.ui.tth_max_specify.isChecked()
- self.ui.tth_max_value.setEnabled(enabled and specify)
-
- def on_tth_specify_toggled(self, checked):
- self.ui.tth_max_value.setEnabled(checked)
-
def update_config(self):
# Set the new config options on the internal config
config = HexrdConfig().indexing_config['fit_grains']
@@ -249,12 +237,10 @@ def update_config(self):
config['refit'][0] = self.ui.refit_pixel_scale.value()
config['refit'][1] = self.ui.refit_ome_step_scale.value()
config['threshold'] = self.ui.threshold.value()
- if not self.ui.tth_max_enable.isChecked():
- config['tth_max'] = False
- elif self.ui.tth_max_instrument.isChecked():
- config['tth_max'] = True
- else:
- config['tth_max'] = self.ui.tth_max_value.value()
+
+ # The user sets the HKLs manually. Make sure this is set to False to
+ # reflect that.
+ config['tth_max'] = False
self.tolerances_model.copy_to_config(config)
@@ -271,27 +257,6 @@ def update_gui_from_config(self, config):
self.ui.refit_ome_step_scale.setValue(config.get('refit')[1])
self.ui.threshold.setValue(config.get('threshold'))
- tth_max = config.get('tth_max')
- if isinstance(tth_max, bool):
- enabled = tth_max
- instrument = tth_max
- value = 0.0
- else:
- enabled = True
- instrument = False
- value = tth_max
-
- self.ui.tth_max_enable.setChecked(enabled)
-
- self.ui.tth_max_instrument.setEnabled(enabled)
- self.ui.tth_max_instrument.setChecked(instrument)
-
- self.ui.tth_max_specify.setEnabled(enabled)
- self.ui.tth_max_specify.setChecked(not instrument)
-
- self.ui.tth_max_value.setEnabled(enabled and (not instrument))
- self.ui.tth_max_value.setValue(value)
-
tolerances = config.get('tolerance')
self.tolerances_model.update_from_config(tolerances)
diff --git a/hexrd/ui/indexing/fit_grains_results_dialog.py b/hexrd/ui/indexing/fit_grains_results_dialog.py
index 36f444e21..084b66a9c 100644
--- a/hexrd/ui/indexing/fit_grains_results_dialog.py
+++ b/hexrd/ui/indexing/fit_grains_results_dialog.py
@@ -25,6 +25,7 @@
from hexrd.ui.navigation_toolbar import NavigationToolbar
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
+from hexrd.ui.utils.dialog import add_help_url
COORDS_SLICE = slice(6, 9)
@@ -68,6 +69,9 @@ def __init__(self, data, material=None, parent=None,
loader = UiLoader()
self.ui = loader.load_file('fit_grains_results_dialog.ui', parent)
+ url = 'hedm/fit_grains/#fit-grains-results'
+ add_help_url(self.ui.button_box, url)
+
self.ui.splitter.setStretchFactor(0, 1)
self.ui.splitter.setStretchFactor(1, 10)
self.ui.export_workflow.setEnabled(allow_export_workflow)
diff --git a/hexrd/ui/indexing/view_spots_dialog.py b/hexrd/ui/indexing/view_spots_dialog.py
index a1a0968ec..65864396c 100644
--- a/hexrd/ui/indexing/view_spots_dialog.py
+++ b/hexrd/ui/indexing/view_spots_dialog.py
@@ -13,6 +13,7 @@
from hexrd.ui.navigation_toolbar import NavigationToolbar
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.utils import block_signals
+from hexrd.ui.utils.dialog import add_help_url
class ViewSpotsDialog:
@@ -20,6 +21,9 @@ def __init__(self, spots, parent=None):
loader = UiLoader()
self.ui = loader.load_file('view_spots_dialog.ui', parent)
+ url = 'hedm/fit_grains/#visualize-spots'
+ add_help_url(self.ui.button_box, url)
+
self.setup_canvas()
self.spots = spots
diff --git a/hexrd/ui/resources/ui/fit_grains_options_dialog.ui b/hexrd/ui/resources/ui/fit_grains_options_dialog.ui
index ddaff5c07..5f87c9fc2 100644
--- a/hexrd/ui/resources/ui/fit_grains_options_dialog.ui
+++ b/hexrd/ui/resources/ui/fit_grains_options_dialog.ui
@@ -40,6 +40,20 @@
-
+
-
+
+
+ Refit ome step scale
+
+
+
+ -
+
+
+ Refit pixel scale
+
+
+
-
@@ -54,46 +68,16 @@
- -
-
-
- Selected Material:
-
-
-
- -
-
+
-
+
8
- 100.000000000000000
+ 1000000.000000000000000
- 5.000000000000000
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 0
- 20
-
-
-
-
- -
-
-
- Select HKLs by min |F|² ?
+ 25.000000000000000
@@ -104,71 +88,36 @@
- -
-
-
- Threshold
-
-
-
- -
-
-
- Refit pixel scale
-
-
-
- -
-
-
- Refit ome step scale
-
-
-
- -
-
-
- <html><head/><body><p>Enabling this will cause the HKLs to be modified again during fit-grains so that no HKLs above this tth max will be enabled.</p></body></html>
-
-
- override tth max
-
-
-
- -
-
-
- false
+
-
+
+
+
+ 0
+ 0
+
-
- padding-left: 20px;
-
+
+ 8
-
- Instrument
+
+ 1000000.000000000000000
-
- true
+
+ 2.000000000000000
- -
-
-
- false
-
-
- padding-left: 20px;
-
+
-
+
- Specify
+ Choose HKLs
- -
-
+
-
+
- Write out spots files
+ Selected Material:
@@ -194,66 +143,65 @@
- -
-
+
-
+
+
+ Threshold
+
+
- -
-
+
-
+
- Choose HKLs
+ Select HKLs by min |F|² ?
- -
-
-
- 8
+
-
+
+
+ Qt::Horizontal
-
- 1000000.000000000000000
+
+ QSizePolicy::Fixed
-
- 25.000000000000000
+
+
+ 0
+ 20
+
-
+
- -
-
-
-
- 0
- 0
-
-
+
-
+
8
- 1000000.000000000000000
+ 100.000000000000000
- 2.000000000000000
+ 5.000000000000000
- -
-
-
- 8
-
-
- 1000000.000000000000000
-
-
- 1.000000000000000
+
-
+
+
+ Write out spots files
- -
-
-
- false
+
-
+
+
+ Select Directory
+
+
+ -
+
8
@@ -261,16 +209,12 @@
1000000.000000000000000
- 20.000000000000000
+ 1.000000000000000
- -
-
-
- Select Directory
-
-
+
-
+
@@ -390,7 +334,7 @@
Qt::Horizontal
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+ QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok
@@ -419,10 +363,6 @@
threshold
refit_pixel_scale
refit_ome_step_scale
- tth_max_enable
- tth_max_instrument
- tth_max_specify
- tth_max_value
write_out_spots
set_spots_directory
tolerances_view
diff --git a/hexrd/ui/resources/ui/fit_grains_results_dialog.ui b/hexrd/ui/resources/ui/fit_grains_results_dialog.ui
index 822addcd9..47df4332d 100644
--- a/hexrd/ui/resources/ui/fit_grains_results_dialog.ui
+++ b/hexrd/ui/resources/ui/fit_grains_results_dialog.ui
@@ -7,7 +7,7 @@
0
0
1200
- 830
+ 865
@@ -556,17 +556,30 @@
-
-
+
Qt::Horizontal
-
- QDialogButtonBox::Close
+
+
+ 40
+ 20
+
-
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Close|QDialogButtonBox::Help
+
+
+
diff --git a/hexrd/ui/resources/ui/view_spots_dialog.ui b/hexrd/ui/resources/ui/view_spots_dialog.ui
index 06cfc5d44..214787256 100644
--- a/hexrd/ui/resources/ui/view_spots_dialog.ui
+++ b/hexrd/ui/resources/ui/view_spots_dialog.ui
@@ -23,8 +23,8 @@
- -
-
+
-
+
combobox-popup: 0;
@@ -33,33 +33,36 @@
- -
-
+
-
+
- Grain ID:
+ Tolerances:
- -
-
-
- Qt::Horizontal
+
-
+
+
+ combobox-popup: 0;
-
-
- 40
- 20
-
+
+ QComboBox::AdjustToContents
-
+
- -
-
-
- Detector:
+
-
+
+
+ combobox-popup: 0;
+
+
+ QComboBox::AdjustToContents
+ -
+
+
-
@@ -70,30 +73,10 @@
- -
-
-
- HKL:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
- -
-
-
- combobox-popup: 0;
-
-
- QComboBox::AdjustToContents
-
-
-
- -
-
+
-
+
- Tolerances:
+ Grain ID:
@@ -114,16 +97,17 @@
- -
-
-
- -
-
-
- combobox-popup: 0;
+
-
+
+
+ Show Frame Indices
-
- QComboBox::AdjustToContents
+
+
+ -
+
+
+ Detector:
@@ -134,10 +118,33 @@
- -
-
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
- Show Frame Indices
+ HKL:
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+ QDialogButtonBox::Help