hyperspy.misc.signal_tools module

hyperspy.misc.signal_tools._check_and_get_longest_axis(axes)

Return the longest axis from a list of axes.

In the case of ties, the first element in the list will be returned. Logs a warning if the axes have different calibrations.

hyperspy.misc.signal_tools.broadcast_signals(*args, ignore_axis=None)

Broadcasts signals according to the HyperSpy broadcasting rules.

signal and navigation spaces are each separately broadcasted according to the numpy broadcasting rules. One axis can be ignored and left untouched (or set to be size 1) across all signals.

Parameters:
  • *args (BaseSignal) – Signals to broadcast together

  • ignore_axis ({None, str, int, Axis}) – The axis to be ignored when broadcasting

Return type:

list of signals