pygsti.extras.drift.signal.bartlett_spectrum#
- bartlett_spectrum(x, numspectra, counts=1, null_hypothesis=None, transform='dct')#
Calculates the Bartlett power spectrum. This involves splitting the data into disjoint sections of the same length, and generating a power spectrum for each such section, and then averaging all these power spectra.
- Parameters:
x (array) – The data to calculate the spectrum for.
numspectra (int) – The number of “chunks” to split the data into, with a spectra calculated for each chunk. Note that if len(x) / num_spectra is not an integer, then not all of the data will be used.
counts (int, optional) – The number of “clicks” per time-step in x, used for standarizing the data.
null_hypothesis (array, optional) – The null hypothesis that we’re looking for violations of. If left as None then this is the no-drift null hypothesis, with the static probability set to the mean of the data.
transform (str, optional) – The transform to use the generate the power spectra.
- Returns:
The Bartlett power spectrum
- Return type:
array