utils - Utility functions

Quaternion specific operations

sympSplit(q)

Splits a quaternion array into two complex arrays.

sympSynth(q_1, q_2)

Constructs a quaternion array from two complex arrays.

StokesNorm(q)

Return the Stokes-Poincaré norm of a quaternion.

normalizeStokes(S0, S1, S2, S3[, tol])

Normalize Stokes parameters S1, S2, S3 by S0.

Stokes2geo(S0, S1, S2, S3[, tol])

Return geometric parameters from Stokes parameters.

geo2Stokes(a, theta, chi[, Phi])

Compute Stokes parameters from geometric parameters.

quat2euler(q)

Euler polar form of a quaternion array.

euler2quat(a, theta, chi, phi)

Quaternion from Euler polar form.

Windows functions

class bispy.utils.windows[source]

Windows functions static methods.

These window functions are provided for convenience, and are meant to be used with the QSTFT class.

Methods

gaussian(N[, sigma])

Gaussian window

hamming(N)

Hamming window

hanning(N)

Hanning window

rectangle(N)

Rectangle window

Graphical tools

class bispy.utils.visual[source]

Static methods for visualization of bivariate signals.

Methods

plot2D(t, q[, labels])

2D plot of a bivariate signal.

plot3D(t, q)

3D plot of a bivariate signal

static plot2D(t, q, labels=['u(t)', 'v(t)'])[source]

2D plot of a bivariate signal.

Plots the 2D trace, and time evolution of each component.

Parameters:
t, qarray_type

time and signal arrays (signal array may be either complex or quaternion type)

labels[label1, label2]

list of labels to display.

Returns:
fig, axfigure and axis handles
static plot3D(t, q)[source]

3D plot of a bivariate signal

Parameters:
t, qarray_type

time and signal arrays (signal array may be either complex or quaternion type)

Returns:
fig, axfigure and axis handles