hyperspy / hyperspy-extensions-list

A list of known HyperSpy extensions
6 stars 6 forks source link

Warning stating signal type is not understood emitted even though signal type is in list #21

Closed hakonanes closed 1 year ago

hakonanes commented 2 years ago

With HyperSpy v1.6.5 and kikuchipy v0.6.dev0, the warning

2022-02-10 19:26:58,023 - hyperspy.io - WARNING - `signal_type='VirtualBSEImage'` not understood. See
`hs.print_known_signal_types()` for a list of installed signal types or
https://github.com/hyperspy/hyperspy-extensions-list for the list of all hyperspy extensions providing signals.

is emitted even though the signal type is in the list

>>> hs.print_known_signal_types()

I'll provide more information and investigate further in the near future.

hakonanes commented 2 years ago

The warning is only raised when the original signal the VirtualBSEImage is created from is a LazyEBSD instance. Seems like the VirtualBSEImage class is not available to lazy signals.

ericpre commented 1 year ago
import numpy as np
import hyperspy.api as hs

s = hs.signals.BaseSignal(np.ones((10, 10)))
print(s)
s.set_signal_type('VirtualBSEImage')
print(s)
s_lazy = s.as_lazy()
print(s_lazy)

Give the following output:

<BaseSignal, title: , dimensions: (|10, 10)>
<VirtualBSEImage, title: , dimensions: (|10, 10)>
<LazyVirtualBSEImage, title: , dimensions: (|10, 10)>

I seems that it has been fixed in https://github.com/pyxem/kikuchipy/pull/605.