API reference¶
This page provides an auto-generated summary of xscale’s API.
Filtering tools¶
Linear filtering¶
Window.set([n, dim, cutoff, dx, window, chunks]) |
Set the different properties of the current window. |
Window.convolve([mode, weights, trim, compute]) |
Convolve the current window with the data |
Window.boundary_weights([mode, mask, …]) |
Compute the boundary weights |
Window.plot() |
Plot the weights distribution of the window and the associated spectrum (work only for 1D and 2D windows). |
Spectral estimates¶
Fast Fourier Transform¶
spectral.fft.fft(array[, nfft, dim, dx, …]) |
Compute the spectrum on several dimensions of xarray.DataArray objects using the Fast Fourrier Transform parrallelized with dask. |
spectral.fft.amplitude(spectrum) |
Return the amplitude spectrum from the Fourier Transform |
spectral.fft.phase(spectrum[, deg]) |
Return the phase spectrum from the Fourier Transform |
spectral.fft.ps(spectrum) |
Return the Power Spectrum (PS) from the Fourier Transform |
spectral.fft.psd(spectrum) |
Return the Power Spectrum density (PSD) from the Fourier Transform |
Spectral tools¶
spectral.tools.plot_spectrum(spectrum[, …]) |
Define a nice spectrum with twin x-axis, one with frequencies, the other one with periods. |
spectral.tools.fit_power_law(freq, spectrum) |
Fit a logarithmic spectral law based on the input one dimensional spectrum |
spectral.tools.plot_power_law(power[, …]) |
Plot a logarithmic power law |
Signal tools¶
Signal generator¶
signal.generator.rednoise(alpha, n[, c]) |
Generate a red noise |
signal.generator.ar |
Generate a timeseries using an autoregressive process |
signal.generator.window1d(n[, dim, coords, …]) |
Generate a one dimensional window from scipy.signal.get_window |
Fitting methods¶
signal.fitting.polyfit(array[, deg, dim, coord]) |
Least squares polynomial fit. |
signal.fitting.polyval(coefficients, coord) |
Build an array from polynomial coefficients |
signal.fitting.linreg(array[, dim, coord]) |
Compute a linear regression using a least-square method |
signal.fitting.trend(array[, dim, type]) |
Compute the trend over one dimension of the input array. |
signal.fitting.detrend(data[, dim, type]) |
Remove a trend over one dimension of the data. |
signal.fitting.sinfit(array, periods[, dim, …]) |
Least squares sinusoidal fit. |
signal.fitting.sinval(modes, coord) |
Evaluate a sinusoidal function based on a modal decomposition. |