spectral - Spectral analysis routines

Quaternion PSD

class bispy.spectral.quaternionPSD(N, S0x, Phix, mux, dt=1)[source]

Quaternion Power Spectral Density constructor of the form: Gamma_xx(nu) = S_0x(nu)*[1 + Phi_x(nu)*mu_x(nu)]

where S_0x is the PSD of the signal x, Phi_x(nu) is the degree of polarization of the signal and mu_x is the polarization axis.

Parameters:
Nint

size of the frequencies array

S0xarray_type

PSD array of the signal

Phixarray_type

degree of polarization array

muxarray_type (quaternion)

polarization axis array

dtfloat (optional)

time sampling size step

Attributes:
S0, S1, S2, S3array_type

Stokes Parameters array

densityarray_type

quaternion PSD

farray_type

sampled frequencies array

Phiarray_type

degree of polarization

muarray_type

polarization axis

Methods

plot([single_sided])

Displays the quaternion PSD

plotStokes([single_sided])

Displays Stokes Parameters S0, S1, S2, S3

plot(single_sided=True)[source]

Displays the quaternion PSD

plotStokes(single_sided=True)[source]

Displays Stokes Parameters S0, S1, S2, S3

Periodogram

class bispy.spectral.Periodogram(t, x, computeFlag=True)[source]

Compute the periodogram of bivariate signals taken as (1, i)-quaternion valued signals.

Parameters:
tarray_type

time samples array

xarray_type

input signal array (has to be of quaternion dtype)

computebool, optional

Flag activating computation of the estimate. Default is true. If False one has to run the compute() method manually.

Attributes:
tarray_type

time samples array

signalarray_type

input signal array

farray_type

sampled frequencies array

densityarray_type

spectral density quaternion array

S0, S1, S2, S3array_type

Stokes parameters, non-normalized [w.r.t. S0]

S1n, S2n, S3narray_type

normalized Stokes parameters [w.r.t. S0] using the tolerance factor tol. They are not computed by default. See normalize.

Phiarray_type

Degree of polarization. Not computed by default; See normalize.

Methods

compute()

Low-level function.

normalize([tol])

Normalize Stokes parameters wrt S0.

plot()

Generic plot of spectral estimates

compute()[source]

Low-level function. Compute Periodogram estimate

normalize(tol=0.0)[source]

Normalize Stokes parameters wrt S0. In addition, compute the degree of polarization Phi.

Parameters:
tolfloat, optional

tolerance factor used in Stokes parameters normalization. Default is 0.0

Returns:
self.S1n, self.S2n, self.S3narray_type

normalized Stokes parameters

self.Phiarray_type

degree of polarization

See also

utils.normalizeStokes
plot()[source]

Generic plot of spectral estimates

Multitaper

class bispy.spectral.Multitaper(t, x, bw=2.5, computeFlag=True)[source]

Compute a multitaper spectral estimate of the spectrum of bivariate signals taken as (1, i)-quaternion valued signals. The data tapers are chosen as discrete-prolate spheroidal sequences (dpss or Slepian tapers).

Parameters:
tarray_type

time samples array

xarray_type

input signal array (has to be of quaternion dtype)

bwfloat, optional

spectral bandwidth. Default is 2.5

computeFlagbool, optional

Flag activating computation of the estimate. Default is true. If False one has to run the compute() method manually.

Attributes:
tarray_type

time samples array

signalarray_type

input signal array

farray_type

sampled frequencies array

densitiesarray_type

spectral density quaternion array for each taper

densityarray_type

spectral density quaternion array

dpssarray_type

data tapers used

S0, S1, S2, S3array_type

Stokes parameters, non-normalized [w.r.t. S0]

S1n, S2n, S3narray_type

normalized Stokes parameters [w.r.t. S0] using the tolerance factor tol. They are not computed by default. See normalize.

Phiarray_type

Degree of polarization. Not computed by default; See normalize.

Methods

compute([bw])

Low-level method that computes the multitaper estimate

normalize([tol])

Normalize Stokes parameters wrt S0.

plot()

Generic plot of spectral estimates

compute(bw=2.5)[source]

Low-level method that computes the multitaper estimate

normalize(tol=0.0)[source]

Normalize Stokes parameters wrt S0. In addition, compute the degree of polarization Phi.

Parameters:
tolfloat, optional

tolerance factor used in Stokes parameters normalization. Default is 0.0

Returns:
self.S1n, self.S2n, self.S3narray_type

normalized Stokes parameters

self.Phiarray_type

degree of polarization

See also

utils.normalizeStokes
plot()[source]

Generic plot of spectral estimates