2.1. empix.abs_sq

abs_sq(input_signal, title=None)[source]

The modulus squared of a given input hyperspy signal.

Parameters:
input_signalhyperspy._signals.signal1d.Signal1D | hyperspy._signals.complex_signal1d.ComplexSignal1D | hyperspy._signals.signal2d.Signal2D | hyperspy._signals.complex_signal2d.ComplexSignal2D

The input hyperspy signal.

titlestr | None, optional

If title is set to None, then the title of the output signal output_signal is set to "Modulus Squared of " + input_signal.metadata.General.title, where input_signal is the input hyperspy signal. Otherwise, if title is a str, then the output_signal.metadata.General.title is set to the value of title.

Returns:
output_signalhyperspy._signals.signal1d.Signal1D | hyperspy._signals.signal2d.Signal2D

The output hyperspy signal that stores the modulus squared of the input signal input_signal. Note that the metadata of the input signal is copied over to the output signal, with the title being overwritten.