Processing Signals#

This section describes the signal processing features available in DataLab.

See also

Operations on Signals for more information on operations that can be performed on signals, or Analysis features on Signals for information on analysis features on signals.

../../_images/s_processing.png

Screenshot of the “Processing” menu.#

When the “Signal Panel” is selected, the menus and toolbars are updated to provide signal-related actions.

The “Processing” menu allows you to perform various processing on the selected signals, such as smoothing, normalization, or interpolation.

Axis transformation#

Linear calibration#

Create a new signal which is a linear calibration of each selected signal with respect to X or Y axis:

Parameter

Linear calibration

X-axis

x1=a.x0+b

Y-axis

y1=a.y0+b

Swap X/Y axes#

Create a new signal which is the result of swapping X/Y data.

Reverse X-axis#

Create a new signal which is the result of reversing X data.

Convert to Cartesian coordinates#

Create a new signal which is the result of converting polar coordinates to Cartesian coordinates.

Note

This function assumes that the x-axis represents the radius and the y-axis represents the angle. Negative values are not allowed for the radius, and will be clipped to 0 (a warning will be raised).

Convert to polar coordinates#

Create a new signal which is the result of converting Cartesian coordinates to polar coordinates.

Level adjustment#

Normalize#

Create a new signal which is the normalization of each selected signal by maximum, amplitude, sum, energy or RMS:

Parameter

Normalization

Maximum

y1=y0max(y0)

Amplitude

y1=y0max(y0) with y0=y0min(y0)

Area

y1=y0n=0Ny0[n]

Energy

y1=y0n=0N|y0[n]|2

RMS

y1=y01Nn=0N|y0[n]|2

Clipping#

Create a new signal which is the result of clipping each selected signal.

Offset correction#

Create a new signal which is the result of offset correction of each selected signal. This operation is performed by subtracting the signal baseline which is estimated by the mean value of a user-defined range.

Noise reduction#

Create a new signal which is the result of noise reduction of each selected signal.

The following filters are available:

Filter

Formula/implementation

Gaussian filter

scipy.ndimage.gaussian_filter

Moving average

scipy.ndimage.uniform_filter

Moving median

scipy.ndimage.median_filter

Wiener filter

scipy.signal.wiener

Fourier analysis#

Create a new signal which is the result of a Fourier analysis of each selected signal.

The following functions are available:

Function

Description

Formula/implementation

FFT

Fast Fourier Transform

numpy.fft.fft

Inverse FFT

Inverse Fast Fourier Transform

numpy.fft.ifft

Magnitude spectrum

Optionnal: use logarithmic scale (dB)

y1=|FFT(y0)| or 20.log10(|FFT(y0)|) (dB)

Phase spectrum

y1=FFT(y0)

Power spectral density (PSD)

Optionnal: use logarithmic scale (dB). PSD is estimated using Welch’s method (see scipy.signal.welch)

Yk=PSD(yk) or 10.log10(PSD(yk)) (dB)

Note

FFT and inverse FFT are performed using frequency shifting if the option is enabled in DataLab settings (see Settings).

Frequency filters#

Create a new signal which is the result of applying a frequency filter to each selected signal.

The following filters are available:

Filter

Description

lowpass Low-pass

Filter out high frequencies, above a cutoff frequency

highpass High-pass

Filter out low frequencies, below a cutoff frequency

bandpass Band-pass

Filter out frequencies outside a range

bandstop Band-stop

Filter out frequencies inside a range

For each filter, the following methods are available:

Method

Description

Bessel

Bessel filter, using SciPy’s scipy.signal.bessel function

Butterworth

Butterworth filter, using SciPy’s scipy.signal.butter function

Chebyshev I

Chebyshev type I filter, using SciPy’s scipy.signal.cheby1 function

Chebyshev II

Chebyshev type II filter, using SciPy’s scipy.signal.cheby2 function

Elliptic

Elliptic filter, using SciPy’s scipy.signal.ellip function

Fitting#

Open an interactive curve fitting tool in a modal dialog box.

Model

Equation

Linear

y=c0+c1.x

Polynomial

y=c0+c1.x+c2.x2+...+cn.xn

Gaussian

y=y0+A2π.σ.exp(12.(xx0σ)2)

Lorentzian

y=y0+Aσ.π.11+(xx0σ)2

Voigt

y=y0+A.Re(exp(z2).erfc(j.z))2π.σ with z=xx0j.σ2.σ

Multi-Gaussian

y=y0+i=0KAi2π.σi.exp(12.(xx0,iσi)2)

Exponential

y=y0+A.exp(B.x)

Sinusoidal

y=y0+A.sin(2π.f.x+ϕ)

Cumulative Distribution Function (CDF)

y=y0+A.erf(xx0σ.2)

Windowing#

Create a new signal which is the result of applying a window function to each selected signal.

The following window functions are available:

Detrending#

Create a new signal which is the detrending of each selected signal. This features is based on SciPy’s scipy.signal.detrend function.

The following parameters are available:

Parameter

Description

Method

Detrending method: ‘linear’ or ‘constant’. See SciPy’s scipy.signal.detrend function.

Interpolation#

Create a new signal which is the interpolation of each selected signal with respect to a second signal X-axis (which might be the same as one of the selected signals).

The following interpolation methods are available:

Method

Description

Linear

Linear interpolation, using using NumPy’s interp function

Spline

Cubic spline interpolation, using using SciPy’s scipy.interpolate.splev function

Quadratic

Quadratic interpolation, using using NumPy’s polyval function

Cubic

Cubic interpolation, using using SciPy’s Akima1DInterpolator class

Barycentric

Barycentric interpolation, using using SciPy’s BarycentricInterpolator class

PCHIP

Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation, using using SciPy’s PchipInterpolator class

Resampling#

Create a new signal which is the resampling of each selected signal.

The following parameters are available:

Parameter

Description

Method

Interpolation method (see previous section)

Fill value

Interpolation fill value (see previous section)

Xmin

Minimum X value

Xmax

Maximum X value

Mode

Resampling mode: step size or number of points

Step size

Resampling step size

Number of points

Resampling number of points

Stability analysis#

Create a new signal which is the result of a stability analysis of each selected signal.

The following stability analysis methods are available:

Function

Description

Allan variance

Measure of the stability of a signal: defined as the variance of the difference between two successive measurements as a function of the time interval between them.

Allan deviation

Square root of the Allan variance.

Overlapping Allan deviation

A more robust version of the Allan variance that overlaps successive segments to improve statistical confidence.

Modified Allan variance

A variation of the Allan variance that accounts for phase noise by introducing a filtering operation.

Hadamard variance

An alternative to Allan variance, more robust to linear frequency drift in the signal

Total variance

Extends the Allan variance concept to cover all possible averaging intervals.

Time deviation

Derived from Allan deviation, quantifies stability in terms of time rather than frequency.

Note

The “All stability features” option allows to compute all stability analysis methods at once.

ROI extraction#

Create a new signal from a user-defined Region of Interest (ROI).

../../_images/s_roi_dialog.png

ROI extraction dialog: the ROI is defined by moving the position and adjusting the width of an horizontal range.#