stoner_measurement.plugins.transform.fourier_transform.FourierTransformPlugin¶
- class stoner_measurement.plugins.transform.fourier_transform.FourierTransformPlugin(parent=None)[source]¶
Bases:
TraceChannelSelectionMixin,TransformPluginTransform selected trace data between time and frequency domains.
Use this transform when you want to inspect a trace in the reciprocal domain or reconstruct a time-domain signal from frequency-domain data. The plugin takes selected x/y data, sorts it by x, resamples it onto a uniform grid, and then performs either a forward FFT or an inverse FFT.
In the configuration tabs, the data-selection tab always selects a source trace and column. Advanced mode may override the calculation inputs with x/y expressions while retaining that source context for output naming. A second tab selects whether the transform is forward or inverse.
The output trace contains magnitude, real, imaginary, and phase columns, all sharing a reciprocal-domain x axis.
- Variables:
trace_key (str) – Key in the
_tracescatalogue used in simple mode. Defaults to"".column_key (str) – Selected column key from the chosen source trace. Defaults to
"".advanced_mode (bool) – When
True, evaluatex_exprandy_exprinstead of using the selected trace arrays. Defaults toFalse.x_expr (str) – Python expression used to compute x data in advanced mode. Defaults to
"".y_expr (str) – Python expression used to compute y data in advanced mode. Defaults to
"".inverse (bool) – When
False, compute a forward Fourier transform. WhenTrue, treat the input as shifted frequency-domain data and compute an inverse transform. Defaults toFalse.instance_name (str) – Inherited Python identifier for this instance in the Script tab and QtConsole.
comment (str) – Inherited optional note displayed beside this step.
sequence_engine (SequenceEngine | None) – Inherited owning engine and its live namespace; None while detached.
data (dict[str, Any]) – Inherited latest output mapping populated by run(), containing scalar and/or TraceData results.
- Keyword Parameters:
parent (QObject | None) – Optional Qt parent object.
Notes
Non-uniform input spacing is handled by interpolation to a uniform grid before applying FFT routines. The output trace contains four columns: magnitude, real part, imaginary part, and angle. The output x-axis unit is converted to the reciprocal of the input x unit where practical.
Examples
With an instance named
fourier_transformin the sequence, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:fourier_transform.inverse = False fourier_transform.data
- config_tabs(parent: QWidget | None = None) list[tuple[str, QWidget]][source]¶
Return plugin configuration tabs.
- declared_outputs() PluginOutputs[source]¶
Declare typed transform results without repeating output names.
- property name: str¶
Return the plugin display name.
- Returns:
"Fourier Transform".- Return type:
(str)