Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release #1053

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions PyMca5/PyMcaPlugins/ImageAlignmentStackPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,10 @@ def _fftAlignment(self):
# result[0] contains the string "Exception" in case
# of error. However, direct comparison will raise an
# error
if type(result[0]) == type('Exception'):
# exception occurred
raise Exception(result[1], result[2], result[3])
if isinstance(result[0], str):
if result[0] == 'Exception':
# exception occurred
raise Exception(result[1], result[2], result[3])
else:
shifts = result
result = self.__shiftStack(stack,
Expand Down Expand Up @@ -306,9 +307,10 @@ def _siftAlignment(self):
crop=crop, filename=filename)
if result is not None:
if len(result):
if result[0] == 'Exception':
# exception occurred
raise Exception(result[1], result[2], result[3])
if isinstance(result[0], str):
if result[0] == 'Exception':
# exception occurred
raise Exception(result[1], result[2], result[3])
if filename is None:
self.setStack(stack)

Expand Down
4 changes: 1 addition & 3 deletions PyMca5/PyMcaPlugins/NNMAStackPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ def threadFinished(self):
if type(result) == type((1,)):
#if we receive a tuple there was an error
if len(result):
if type(result[0]) == type("Exception"):
if result[0] == "Exception":
self._status.setText("Ready after calculation error")
if isinstance(result[0], str) and result[0] == "Exception": self._status.setText("Ready after calculation error")
self.configurationWidget.setEnabled(True)
raise Exception(result[1], result[2])
return
Expand Down
2 changes: 1 addition & 1 deletion PyMca5/PyMcaPlugins/PCAStackPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def threadFinished(self):
if type(result) == type((1,)):
#if we receive a tuple there was an error
if len(result):
if result[0] == "Exception":
if isinstance(result[0], str) and result[0] == "Exception":
self._status.setText("Ready after calculation error")
self.configurationWidget.setEnabled(True)
raise Exception(result[1], result[2])
Expand Down
2 changes: 1 addition & 1 deletion PyMca5/PyMcaPlugins/StackROIBatchPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _threadFinished(self):
if type(result) == type((1,)):
#if we receive a tuple there was an error
if len(result):
if result[0] == "Exception":
if isinstance(result[0], str) and result[0] == "Exception":
# somehow this exception is not caught
raise Exception(result[1], result[2])#, result[3])
return
Expand Down
2 changes: 1 addition & 1 deletion PyMca5/PyMcaPlugins/XASStackBatchPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _threadFinished(self):
if type(result) == type((1,)):
#if we receive a tuple there was an error
if len(result):
if result[0] == "Exception":
if isinstance(result[0], str) and result[0] == "Exception":
# somehow this exception is not caught
raise Exception(result[1], result[2])#, result[3])
return
Expand Down
4 changes: 2 additions & 2 deletions PyMca5/PyMcaPlugins/XASStackNormalizationPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def XASNormalize(self):
post_edge_regions=post_edge_regions,
algorithm=algorithm,
algorithm_parameters=algorithm_parameters)
if result[0] == 'Exception':
# exception occurred
if isinstance(result[0], str) and result[0] == 'Exception':
# handled exception occurred
raise Exception(result[1], result[2], result[3])
else:
edges, jumps, errors = result
Expand Down
2 changes: 1 addition & 1 deletion PyMca5/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__version__ = "5.9.1"
__version__ = "5.9.2"

import os
import sys
Expand Down
13 changes: 13 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
VERSION 5.9.2
-------------

- XRF. Prevent considering twice the same element when using the SingleLayerStrategy.

- Packaging. Compatibility with PyInstaller 6.x

- GUI. Improved PyQt6 compatibility.

- GUI. Compatibility with current silx master branch.

- GUI. Add histogram of pixel intensities to image views (requires silx).

VERSION 5.9.1
-------------

Expand Down
Loading