diff --git a/.github/actions/publish-package/action.yml b/.github/actions/publish-package/action.yml
index f5e9779308e..66d2f12bf6f 100644
--- a/.github/actions/publish-package/action.yml
+++ b/.github/actions/publish-package/action.yml
@@ -4,6 +4,10 @@ inputs:
repository:
description: 'Anaconda repository'
required: true
+ default: 'mantidimaging'
+ repository-old:
+ description: 'Anaconda repository - old'
+ required: true
default: 'mantid'
label:
description: 'Label'
@@ -12,6 +16,9 @@ inputs:
token:
description: 'Anaconda API Token'
required: true
+ token-old:
+ description: 'Anaconda API Token - old'
+ required: true
description: Build conda package
runs:
@@ -35,8 +42,10 @@ runs:
shell: bash -l {0}
run: |
conda activate build-env
- conda config --set anaconda_upload yes
+ conda config --set anaconda_upload no
# if the upload silently fails - check the token expiration. Conda can fail silently!
- conda mambabuild --user ${{ inputs.repository }} --token ${{ inputs.token }} --label ${{ inputs.label }} $GITHUB_WORKSPACE/conda |& tee upload.log
+ conda mambabuild $GITHUB_WORKSPACE/conda
+ anaconda -t ${{ inputs.token }} upload --user ${{ inputs.repository }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2 |& tee upload.log
+ anaconda -t ${{ inputs.token-old }} upload --user ${{ inputs.repository-old }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2
# Check that upload completed
grep "Upload complete" upload.log
diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml
index 97ab5ddac69..2b49c072632 100644
--- a/.github/workflows/conda.yml
+++ b/.github/workflows/conda.yml
@@ -140,4 +140,5 @@ jobs:
uses: ./.github/actions/publish-package
with:
label: unstable
- token: ${{ secrets.ANACONDA_API_TOKEN }}
+ token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }}
+ token-old: ${{ secrets.ANACONDA_API_TOKEN }}
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index e9f8d744428..9be6283e12a 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -126,4 +126,5 @@ jobs:
uses: ./.github/actions/publish-package
with:
label: unstable
- token: ${{ secrets.ANACONDA_API_TOKEN }}
+ token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }}
+ token-old: ${{ secrets.ANACONDA_API_TOKEN }}
diff --git a/README.md b/README.md
index 4dcee5f771b..548e4abe543 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,28 @@
+
+
# MantidImaging
Mantid Imaging is a graphical toolkit for performing 3D reconstruction of neutron tomography data. It provides an easy-to-use graphical interface to a wide range of pre/post-processing operations, tilt correction and reconstruction algorithms, accommodating for tomography users with varying data complexity and image analysis background knowledge. It utilises a flexible plugin system that allows easy integration of external software, and has allowed us to re-use software widely known in the neutron tomography community.
[](https://doi.org/10.5281/zenodo.4728059)
[](https://coveralls.io/github/mantidproject/mantidimaging?branch=main)
-
-## Links
-
- - Documentation: https://mantidproject.github.io/mantidimaging/
- - Anaconda package: https://anaconda.org/mantid/mantidimaging
- - Code repository: https://github.com/mantidproject/mantidimaging
diff --git a/docs/index.rst b/docs/index.rst
index 7d1969964fd..aca58d16184 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -32,3 +32,5 @@ Please cite as:
Tasev, Dimitar; Akello-Egwel, Dolica; Allen, Jack; Baust, Rachel; Gigg, Martyn; Jones, Samuel; Nixon, Daniel; Stock, Samuel; Taylor, Will; Tygier, Sam. (2023). Mantid Imaging (2.5.0), Zenodo https://doi.org/10.5281/zenodo.4728059
(See `Zenodo `_ for citing specific versions).
+
+Sign up to our `mailing list `_ to receive updates on the project
diff --git a/docs/release_notes/next/feature-1943-RITS-transmission-error b/docs/release_notes/next/feature-1943-RITS-transmission-error
new file mode 100644
index 00000000000..4f2b8a35aea
--- /dev/null
+++ b/docs/release_notes/next/feature-1943-RITS-transmission-error
@@ -0,0 +1,2 @@
+#1943 : RITS export transmission errors
+
diff --git a/docs/release_notes/next/fix-2002-default-values b/docs/release_notes/next/fix-2002-default-values
new file mode 100644
index 00000000000..d169a0e13b6
--- /dev/null
+++ b/docs/release_notes/next/fix-2002-default-values
@@ -0,0 +1,2 @@
+#2002 : Better default values in Remove all stripes
+
diff --git a/docs/support.rst b/docs/support.rst
index 51eb46bcc4a..e309dd8269e 100644
--- a/docs/support.rst
+++ b/docs/support.rst
@@ -5,3 +5,8 @@ Issues can be reported on the `Github project page `_ to receive updates on the project
diff --git a/mantidimaging/core/operations/remove_all_stripe/remove_all_stripe.py b/mantidimaging/core/operations/remove_all_stripe/remove_all_stripe.py
index 6b87b64329a..fa88c67bc3f 100644
--- a/mantidimaging/core/operations/remove_all_stripe/remove_all_stripe.py
+++ b/mantidimaging/core/operations/remove_all_stripe/remove_all_stripe.py
@@ -84,7 +84,7 @@ def register_gui(form, on_change, view):
_, la_size = add_property_to_form('Large stripe kernel',
Type.INT,
- default_value=61,
+ default_value=21,
valid_values=(1, 100),
form=form,
on_change=on_change,
@@ -92,7 +92,7 @@ def register_gui(form, on_change, view):
_, sm_size = add_property_to_form('Small stripe kernel',
Type.INT,
- default_value=21,
+ default_value=7,
valid_values=(1, 100),
form=form,
on_change=on_change,
@@ -100,7 +100,7 @@ def register_gui(form, on_change, view):
_, dim = add_property_to_form('Dimension of the window',
Type.INT,
- default_value=1,
+ default_value=2,
valid_values=(1, 2),
form=form,
on_change=on_change,
diff --git a/mantidimaging/gui/ui/spectrum_viewer.ui b/mantidimaging/gui/ui/spectrum_viewer.ui
index f86fe3c6b16..b00fe2be2cc 100644
--- a/mantidimaging/gui/ui/spectrum_viewer.ui
+++ b/mantidimaging/gui/ui/spectrum_viewer.ui
@@ -255,12 +255,75 @@
-
-
+
-
Single Spectrum
+ -
+
+ 2D Binned
+
+
+
+
+ -
+
+
+ Error Mode
+
+
+
+ -
+
+
-
+
+ Standard Deviation
+
+
+ -
+
+ Propagated
+
+
+
+
+ -
+
+
+ Bin Size
+
+
+
+ -
+
+
+ 1
+
+
+ 1000
+
+
+ 10
+
+
+
+ -
+
+
+ Bin Step
+
+
+
+ -
+
+
+ 1
+
+
+ 1000
+
-
diff --git a/mantidimaging/gui/windows/spectrum_viewer/model.py b/mantidimaging/gui/windows/spectrum_viewer/model.py
index 3e1601e0662..e83f6567bc9 100644
--- a/mantidimaging/gui/windows/spectrum_viewer/model.py
+++ b/mantidimaging/gui/windows/spectrum_viewer/model.py
@@ -31,8 +31,15 @@ class SpecType(Enum):
class ErrorMode(Enum):
- STANDARD_DEVIATION = 1
- PROPAGATED = 2
+ STANDARD_DEVIATION = "Standard Deviation"
+ PROPAGATED = "Propagated"
+
+ @classmethod
+ def get_by_value(cls, value: str) -> ErrorMode:
+ for element in cls:
+ if element.value == value:
+ return element
+ raise ValueError(f"Unknown error mode: {value}")
class SpectrumViewerWindowModel:
diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py
index 7ebb800c9fb..f7018fed1e1 100644
--- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py
+++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py
@@ -177,7 +177,8 @@ def handle_rits_export(self) -> None:
return
if path.suffix != ".dat":
path = path.with_suffix(".dat")
- self.model.save_rits(path, self.spectrum_mode == SpecType.SAMPLE_NORMED, ErrorMode.STANDARD_DEVIATION)
+ error_mode = ErrorMode.get_by_value(self.view.transmission_error_mode)
+ self.model.save_rits(path, self.spectrum_mode == SpecType.SAMPLE_NORMED, error_mode)
def handle_enable_normalised(self, enabled: bool) -> None:
if enabled:
diff --git a/mantidimaging/gui/windows/spectrum_viewer/test/model_test.py b/mantidimaging/gui/windows/spectrum_viewer/test/model_test.py
index b77d71a1ad3..e2384d9fe82 100644
--- a/mantidimaging/gui/windows/spectrum_viewer/test/model_test.py
+++ b/mantidimaging/gui/windows/spectrum_viewer/test/model_test.py
@@ -406,3 +406,8 @@ def test_WHEN_stack_tof_THEN_tof_correct(self):
tof_result = self.model.get_stack_time_of_flight()
self.assertIsInstance(tof_result, np.ndarray)
npt.assert_array_equal(tof_result, np.arange(0, 10) * 0.1)
+
+ def test_error_modes(self):
+ self.assertEqual(ErrorMode.get_by_value("Standard Deviation"), ErrorMode.STANDARD_DEVIATION)
+ self.assertEqual(ErrorMode.get_by_value("Propagated"), ErrorMode.PROPAGATED)
+ self.assertRaises(ValueError, ErrorMode.get_by_value, "")
diff --git a/mantidimaging/gui/windows/spectrum_viewer/test/presenter_test.py b/mantidimaging/gui/windows/spectrum_viewer/test/presenter_test.py
index e01cf0e0c70..f9efd66fbfc 100644
--- a/mantidimaging/gui/windows/spectrum_viewer/test/presenter_test.py
+++ b/mantidimaging/gui/windows/spectrum_viewer/test/presenter_test.py
@@ -192,6 +192,7 @@ def test_handle_export_csv(self, path_name: str, mock_save_csv: mock.Mock):
@mock.patch("mantidimaging.gui.windows.spectrum_viewer.model.SpectrumViewerWindowModel.save_rits")
def test_handle_rits_export(self, path_name: str, mock_save_rits: mock.Mock):
self.view.get_rits_export_filename = mock.Mock(return_value=Path(path_name))
+ self.view.transmission_error_mode = "Standard Deviation"
self.presenter.model.set_stack(generate_images())
diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py
index d01b2383684..829a7d30135 100644
--- a/mantidimaging/gui/windows/spectrum_viewer/view.py
+++ b/mantidimaging/gui/windows/spectrum_viewer/view.py
@@ -6,7 +6,7 @@
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QCheckBox, QVBoxLayout, QFileDialog, QPushButton, QLabel, QAbstractItemView, QHeaderView, \
- QTabWidget
+ QTabWidget, QComboBox, QSpinBox
from mantidimaging.core.utility import finder
from mantidimaging.gui.mvp_base import BaseMainWindowView
@@ -36,6 +36,10 @@ class SpectrumViewerWindowView(BaseMainWindowView):
normaliseErrorIcon: QLabel
_current_dataset_id: Optional['UUID']
normalise_error_issue: str = ""
+ image_output_mode_combobox: QComboBox
+ transmission_error_mode_combobox: QComboBox
+ bin_size_spinBox: QSpinBox
+ bin_step_spinBox: QSpinBox
def __init__(self, main_window: 'MainWindowView'):
super().__init__(None, 'gui/ui/spectrum_viewer.ui')
@@ -67,6 +71,8 @@ def __init__(self, main_window: 'MainWindowView'):
self.normaliseCheckBox.stateChanged.connect(self.presenter.handle_button_enabled)
self.exportTabs.currentChanged.connect(self.presenter.handle_export_tab_change)
+ self.image_output_mode_combobox.currentTextChanged.connect(self.set_binning_visibility)
+ self.set_binning_visibility()
# ROI action buttons
self.addBtn.clicked.connect(self.set_new_roi)
@@ -305,3 +311,26 @@ def clear_all_rois(self) -> None:
self.spectrum.spectrum_data_dict = {}
self.spectrum.spectrum.clearPlots()
self.removeBtn.setEnabled(False)
+
+ @property
+ def transmission_error_mode(self) -> str:
+ return self.transmission_error_mode_combobox.currentText()
+
+ @property
+ def image_output_mode(self) -> str:
+ return self.image_output_mode_combobox.currentText()
+
+ @property
+ def bin_size(self) -> int:
+ return self.bin_size_spinbox.value()
+
+ @property
+ def bin_step(self) -> int:
+ return self.bin_step_spinbox.value()
+
+ def set_binning_visibility(self) -> None:
+ hide_binning = self.image_output_mode != "2D Binned"
+ self.bin_size_label.setHidden(hide_binning)
+ self.bin_size_spinBox.setHidden(hide_binning)
+ self.bin_step_label.setHidden(hide_binning)
+ self.bin_step_spinBox.setHidden(hide_binning)