Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/RELEASE_next_patch' into RELEA…
Browse files Browse the repository at this point in the history
…SE_next_minor

# Conflicts:
#	hyperspy/Release.py
#	setup.py
  • Loading branch information
ericpre committed Jul 27, 2021
2 parents 1eb0bdf + 08e11ec commit ae2f102
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ hyperspy/tests/io/edax_files.zip
.vscode/
tsconfig.json
jsconfig.json
*egg-info*
30 changes: 30 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,36 @@ https://hyperspy.readthedocs.io/en/latest/user_guide/changes.html

.. towncrier release notes start
Hyperspy 1.6.4 (2021-07-08)
===========================

Bug Fixes
---------

- Fix parsing EELS aperture label with unexpected value, for example 'Imaging' instead of '5 mm' (`#2772 <https://github.com/hyperspy/hyperspy/issues/2772>`_)
- Lazy datasets can now be saved out as blockfiles (blo) (`#2774 <https://github.com/hyperspy/hyperspy/issues/2774>`_)
- ComplexSignals can now be rebinned without error (`#2789 <https://github.com/hyperspy/hyperspy/issues/2789>`_)
- Method `estimate_parameters` in `Polynomial` component now supports order
greater than 10 (`#2790 <https://github.com/hyperspy/hyperspy/issues/2790>`_)
- Update minimal requirement of dependency importlib_metadata from
>= 1.6.0 to >= 3.6 (`#2793 <https://github.com/hyperspy/hyperspy/issues/2793>`_)


Enhancements
------------

- When saving a dataset with a dtype other than
`uint8 <https://numpy.org/doc/stable/user/basics.types.html>`_ to a blockfile
(blo) it is now possible to provide the argument ``intensity_scaling`` to map
the intensity values to the reduced range (`#2774 <https://github.com/hyperspy/hyperspy/issues/2774>`_)


Maintenance
-----------

- Fix image comparison failure with numpy 1.21.0 (`#2774 <https://github.com/hyperspy/hyperspy/issues/2774>`_)


Hyperspy 1.6.3 (2021-06-10)
===========================

Expand Down
2 changes: 1 addition & 1 deletion hyperspy/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5787,7 +5787,7 @@ def add_marker(
raise ValueError("Markers can not be added to several signals")
m._plot_on_signal = plot_on_signal
if plot_marker:
if self._plot is None:
if self._plot is None or not self._plot.is_active:
self.plot()
if m._plot_on_signal:
self._plot.signal_plot.add_marker(m)
Expand Down
7 changes: 7 additions & 0 deletions hyperspy/tests/drawing/test_plot_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ def test_add_markers_as_list(self):
marker_list.append(markers.point(4, 8))
s.add_marker(marker_list)

def test_check_if_plot_is_not_active(self):
s = Signal1D(np.arange(100).reshape([10,10]))
m = markers.vertical_line(np.arange(10))
s.add_marker(m)
s._plot.close()
s.add_marker(m)


class Test_permanent_markers:

Expand Down
1 change: 0 additions & 1 deletion upcoming_changes/2772.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2774.bugfix.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/2774.enhancements.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2774.maintenance.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2789.bugfix.rst

This file was deleted.

2 changes: 0 additions & 2 deletions upcoming_changes/2790.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions upcoming_changes/2799.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make :py:meth:`~.signal.BaseSignal.add_marker` also check if the plot is not active before plotting signal

0 comments on commit ae2f102

Please sign in to comment.