pygsti.extras.drift.signal

pygsti.extras.drift.signal#

Signal analysis functions for time-series data

Functions

amplitudes_at_frequencies(freq_indices, ...)

Finds the amplitudes in the data at the specified frequency indices.

bartlett_spectrum(x, numspectra[, counts, ...])

Calculates the Bartlett power spectrum.

compute_auto_frequencies(ds[, transform])

Returns a set of frequencies to create spectra for, for the input data.

dct(x[, null_hypothesis, counts])

Returns the Type-II discrete cosine transform of y, with an orthogonal normalization, where

dct_basisfunction(omega, times, starttime, ...)

The omega`th DCT basis function, for a initial time of `starttime and a time-step of timedif, evaluated at the times times.

dft(x[, null_hypothesis, counts])

Returns the discrete Fourier transform of y, with a unitary normalization, where y is an array with elements related to the x array by

fourier_frequencies_from_times(times)

Calculates the Fourier frequencies from a set of times.

frequencies_from_timestep(timestep, numtimes)

Calculates the Fourier frequencies associated with a timestep and a total number of times.

generate_flat_signal(power, nummodes, n[, ...])

Generates a minimal sparsity probability trajectory for the specified power, and a specified number of modes containing non-zero power.

generate_gaussian_signal(power, center, ...)

Generates a probability trajectory with the specified power that is approximately Gaussian distribution accross frequencies, centered in the frequency specified by center.

idct(modes, null_hypothesis[, counts])

Inverts the dct function.

idft(modes, null_hypothesis[, counts])

Inverts the dft function.

logistic_transform(x, mean)

Transforms the input float x as:

lowpass_filter(data[, max_freq])

Implements a low-pass filter on the input array, by DCTing the input, mapping all but the lowest max_freq modes to zero, and then inverting the transform.

lsp(x, times[, frequencies, ...])

Performs a Lomb-Scargle periodogram (lsp) on the input data, returning powers and frequencies.

maxpower_pvalue(maxpower, numpowers, dof)

The p-value of the test statistic max(lambda_i) where there are numpowers lambda_i test statistics, and they are i.i.d.

moving_average(sequence[, width])

Implements a moving average on sequence with an averaging width of width.

power_significance_quasithreshold(...[, ...])

The Benjamini-Hockberg quasi-threshold for finding the statistically significant powers in a power spectrum.

power_significance_threshold(significance, ...)

The multi-test adjusted signficance statistical significance threshold for testing numtests test statistics that all have a marginal distribution that is chi2 with dof degrees of freedom.

power_to_pvalue(power, dof)

Converts a power to a p-value, under the assumption that the power is chi2 distribution with dof degrees of freedom.

renormalizer(p[, method])

Takes an arbitrary input vector p and maps it to a vector bounded within [0,1].

sparsity(p)

Returns the Hoyer sparsity index of the input vector p.

spectrum(x[, times, null_hypothesis, ...])

Generates a power spectrum from the input time-series data.

standardizer(x[, null_hypothesis, counts])

Maps the vector x over [0, counts] as

unstandardizer(z, null_hypothesis[, counts])

Inverts the standardizer function.