pygsti.extras.drift.signal.dft#
- dft(x, null_hypothesis=None, counts=1)#
Returns the discrete Fourier transform of y, with a unitary normalization, where y is an array with elements related to the x array by
y = (x - counts * null_hypothesis) / sqrt(counts * null_hypothesis * (1-null_hypothesis)),
where the arithmetic is element-wise, and null_hypothesis is a vector in (0,1). If null_hypothesis is None it is set to the mean of x. If that mean is 0 or 1 then the vector of all ones, except for the first element which is set to zero, is returned.
- Parameters:
x (array) – Data string, on which the normalization and discrete cosine transformation is performed. If counts is not specified, this must be a bit string.
null_hypothesis (array, optional) – If not None, an array to use in the normalization before the dct. If None, it is taken to be an array in which every element is the mean of x.
counts (int, optional) – A factor in the normalization, that should correspond to the counts-per-timestep (so for full time resolution this is 1).
- Returns:
The DFT modes described above.
- Return type:
array