2.9. empix.resample

resample(input_signal, optional_params=None)[source]

Resample a given input 2D hyperspy signal via interpolation.

This Python function copies a given input 2D hyperspy signal and resamples the copy along the axes in signal space by interpolating the original input signal using bivariate spines. Effectively, empix.resample() resamples the input signal.

Parameters:
input_signalhyperspy._signals.signal2d.Signal2D | hyperspy._signals.complex_signal2d.ComplexSignal2D

The input hyperspy signal.

optional_paramsempix.OptionalResamplingParams | None, optional

The set of optional parameters. See the documentation for the class empix.OptionalResamplingParams for details. If optional_params is set to None, rather than an instance of empix.OptionalResamplingParams, then the default values of the optional parameters are chosen.

Returns:
output_signalhyperspy._signals.signal2d.Signal2D | hyperspy._signals.complex_signal2d.ComplexSignal2D

The output hyperspy signal that results from the resampling. Note that the metadata of the input signal is copied over to the output signal, with the title being overwritten.