gwexpy.timeseries.TimeSeries
- class gwexpy.timeseries.TimeSeries(data: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], *args: Any, **kwargs: Any)[source]
Bases:
PlotMixin,TimeSeriesInteropMixin,TimeSeriesAnalysisMixin,TimeSeriesResamplingMixin,TimeSeriesSignalMixin,SignalAnalysisMixin,TimeSeriesSpectralMixin,StatisticsMixin,FittingMixin,PhaseMethodsMixin,TimeSeriesCoreA data array holding some metadata to represent a time-series.
TimeSeries is the primary object used to represent time-domain data in gwexpy. It extends the standard gwpy.timeseries.TimeSeries by incorporating additional mixins for plotting, signal analysis, regularity checks, numerical fitting, statistical methods, and enhanced interoperability.
- Parameters:
data (array-like) – Input data array.
unit (~astropy.units.Unit, optional) – Physical unit of these data.
t0 (~gwpy.time.LIGOTimeGPS, float, str, optional, default: 0) – GPS epoch associated with these data, any input parsable by ~gwpy.time.to_gps is fine.
dt (float, ~astropy.units.Quantity, optional, default: 1) – Time resolution for these data.
sample_rate (float, ~astropy.units.Quantity, optional, default: 1) – Sample rate for these data.
times (array-like) – The complete array of times indexing the data. This argument takes precedence over t0 and dt so should be given in place of these if relevant, not alongside.
name (str, optional) – Descriptive title for this array.
channel (~gwpy.detector.Channel, str, optional) – Source data stream for these data.
dtype (~numpy.dtype, optional) – Input data type.
copy (bool, optional, default: False) – Choose to copy the input data to new memory.
subok (bool, optional, default: True) – Allow passing of sub-classes by the array generator.
Notes
In addition to the standard GWpy functionality, this class provides advanced features such as time-domain differentiation/integration, rolling statistics, and seamless interoperability with PyTorch, Xarray, and Polars.
Key methods:
plot(**kwargs)Plot this object using
gwexpy.plot.Plot.resample(rate, *args[, ignore_nan])Resample the TimeSeries.
filter(filt, *[, analog, unit, ...])Filter this TimeSeries with an IIR or FIR filter.
fft([nfft, mode, pad_mode, pad_left, ...])Compute the Discrete Fourier Transform (DFT).
psd(*args, **kwargs)spectrogram(*args, **kwargs)Compute the average power spectrogram.
Examples
>>> from gwexpy.timeseries import TimeSeries >>> import numpy as np >>> data = np.array([0.1, -1.2, 0.5]) >>> ts = TimeSeries(data, sample_rate=1000, unit='V') >>> ts <TimeSeries([ 0.1, -1.2, 0.5], unit=Unit("V"), t0=<Quantity 0. s>, dt=<Quantity 0.001 s>, name=None, channel=None)>
- __init__()
Methods
__init__()abs(**kwargs)Return the absolute value of the data in this Array.
all([axis, out])angle([unwrap, deg])Alias for phase(unwrap=unwrap, deg=deg).
any([axis, out])append(other, *[, inplace, pad, gap, resize])Append another TimeSeries, returning a GWexpy TimeSeries.
ar([p])Fit an AutoRegressive AR(p) model.
argmax([axis, out, keepdims])argmin([axis, out, keepdims])argpartition(kth[, axis, kind, order])Returns the indices that would partition this array.
argsort([axis, kind, order, stable])arima([order, seasonal_order, auto])Fit an ARIMA or SARIMAX model to this TimeSeries.
arma([p, q])Fit an ARMA(p, q) model.
asd(*args, **kwargs)asfreq(rule[, method, fill_value, origin, ...])Reindex the TimeSeries to a new fixed-interval grid associated with the given rule.
astype(dtype[, order, casting, subok, copy])Copy of the array, cast to a specified type.
auto_coherence(dt[, fftlength, overlap, window])Calculate the coherence between this series and a shifted copy of itself.
average_fft([fftlength, overlap, window])Compute the averaged one-dimensional DFT of this TimeSeries.
bandpass(flow, fhigh[, gpass, gstop, fstop, ...])Filter this TimeSeries with a band-pass filter.
baseband(*[, phase, f0, fdot, fddot, ...])Demodulate the TimeSeries to baseband with optional lowpass and resampling.
byteswap([inplace])Swap the bytes of the array elements
cepstrum([kind, window, detrend, eps, fft_mode])Compute the cepstrum of the time series.
check_compatible(other[, casting, ...])Check whether this Series and
otherare compatible.choose(choices[, out, mode])clip([min, max, out])Return an array whose values are limited to
[min, max].coherence(*args, **kwargs)coherence_spectrogram(other, stride[, ...])Calculate the coherence spectrogram between this TimeSeries and other.
compress(condition[, axis, out])Return selected slices of this array along given axis.
conj()Complex-conjugate all elements.
conjugate()Return the complex conjugate, element-wise.
convolve(fir[, window])Convolve this TimeSeries with an FIR filter using the overlap-save method.
copy([order])Return a copy of the array.
correlate(mfilter[, window, detrend, ...])Cross-correlate this TimeSeries with another signal.
correlation(other[, method])Calculate correlation coefficient with another TimeSeries.
crop([start, end, copy])Crop this series to the given GPS start and end times.
csd(other, *args, **kwargs)csd_spectrogram(other, stride[, fftlength, ...])Calculate the cross spectral density spectrogram with
other.cumprod([axis, dtype, out])Return the cumulative product of the elements along the given axis.
cumsum([axis, dtype, out])Return the cumulative sum of the elements along the given axis.
cwt([wavelet, widths, frequencies, window, ...])Compute the Continuous Wavelet Transform (CWT).
dct([type, norm, window, detrend])Compute the Discrete Cosine Transform (DCT).
decompose([bases])Generates a new Quantity with the units decomposed.
degree([unwrap])Calculate the phase angle of the TimeSeries in degrees.
demodulate(f[, stride, phase, deg, exp])Compute the average magnitude and phase of the TimeSeries at a.
detrend([detrend])Remove the trend from this TimeSeries.
diagonal([offset, axis1, axis2])Return specified diagonals.
diff([n, axis])Calculate the n-th order discrete difference along given axis.
distance_correlation(other)Calculate Distance Correlation (dCor).
dot(b[, out])dump(file)Not implemented, use
.value.dump()instead.dumps()Not implemented, use
.value.dumps()instead.ediff1d([to_end, to_begin])emd(*[, method, max_imf, sift_max_iter, ...])Decompose the TimeSeries using Empirical Mode Decomposition (EMD).
envelope(*args, **kwargs)Compute the envelope (amplitude) of the TimeSeries via Hilbert transform.
fastmi(other, **kwargs)Estimate mutual information using a fast copula/probit + FFT-based estimator.
fetch(channel, start, end, *[, host, port, ...])Fetch data from NDS.
fetch_open_data(ifo, start, end[, ...])Fetch open-access data from GWOSC.
fft([nfft, mode, pad_mode, pad_left, ...])Compute the Discrete Fourier Transform (DFT).
fftgram(fftlength[, overlap, window])Calculate the Fourier-gram of this TimeSeries.
fill(value)filter(filt, *[, analog, unit, ...])Filter this TimeSeries with an IIR or FIR filter.
find(channel, start, end, *[, observatory, ...])Find and return data for multiple channels using GWDataFind.
find_gates([tzero, whiten, threshold, ...])Identify points that should be gates using a provided threshold.
find_peaks([height, threshold, distance, ...])Find peaks in the series.
fit(model[, x_range, sigma, p0, limits, fixed])Fit the data to a model using iminuit.
fit_arima([order])Fit ARIMA model to the series.
flatten([order])Return a copy of the array collapsed into one dimension.
from_arrakis(series, *[, copy])Construct a new series from an arrakis.Series object.
from_astropy_timeseries(ap_ts[, column, unit])Create from astropy.timeseries.TimeSeries.
from_control(response, **kwargs)Create TimeSeries from python-control TimeResponseData.
from_cupy(array, *[, t0, dt, unit])Create from cupy array.
from_dask(array, *[, t0, dt, unit, compute])Create from dask.array.
from_dict(data_dict)Create TimeSeries from a dictionary.
from_hdf5_dataset(group, path)Read from HDF5 group/dataset.
from_jax(array, *[, t0, dt, unit])Create from jax array.
from_json(json_str)Create TimeSeries from a JSON string.
from_lal(lalts, *[, copy])Generate a new TimeSeries from a LAL TimeSeries of any type.
from_mne(raw, channel, *[, unit])Create TimeSeries from mne.io.Raw.
from_nds2_buffer(buffer, *[, scaled, copy])Construct a new series from an nds2.buffer object.
from_netcdf4(ds, var_name)Read from a live netCDF4 Dataset object.
from_obspy(tr, *[, unit, name_policy])Create TimeSeries from obspy.Trace.
from_obspy_trace(tr, *[, unit, name_policy])Alias for from_obspy().
from_pandas(series, *[, unit, t0, dt])Create TimeSeries from pandas.Series.
from_polars(data[, times, unit])Create TimeSeries from polars.DataFrame or polars.Series.
from_pycbc(pycbcseries, *[, copy])Convert a pycbc.types.timeseries.TimeSeries into a TimeSeries.
from_pydub(seg, *[, unit])Create from pydub.AudioSegment.
from_pyroomacoustics_mic_signals(room, *[, ...])Create from pyroomacoustics simulated microphone signals.
from_pyroomacoustics_rir(room, *[, source, ...])Create from pyroomacoustics room impulse responses.
from_pyroomacoustics_source(room, *[, ...])Create from a pyroomacoustics sound source signal.
from_pyspice_transient(analysis, *[, node, ...])Create from a PySpice TransientAnalysis.
from_root(obj[, return_error])Create TimeSeries from ROOT TGraph or TH1.
from_simpeg(data_obj, **kwargs)Create TimeSeries from SimPEG Data object.
from_skrf_impulse_response(ntwk, *[, ...])Create from a scikit-rf Network impulse response.
from_skrf_step_response(ntwk, *[, ...])Create from a scikit-rf Network step response.
from_sqlite(conn, series_id)Load from sqlite3 database.
from_tensorflow(tensor, *[, t0, dt, unit])Create from tensorflow.Tensor.
from_torch(tensor, *[, t0, dt, unit])Create from torch.Tensor.
from_xarray(da, *[, unit])Create TimeSeries from xarray.DataArray.
from_zarr(store, path)Read from Zarr array.
gate([tzero, tpad, whiten, threshold, ...])Remove high amplitude peaks from data using inverse Tukey window.
gauch(fftlength[, window, stride, overlap])Compute GauCh (Modified KS test) for non-Gaussianity detection.
getfield(dtype[, offset])Returns a field of the given array as a certain type.
granger_causality(other[, maxlag, test, verbose])Check if 'other' Granger-causes 'self'.
heterodyne(phase[, stride, singlesided])Compute the average magnitude and phase of the TimeSeries after.
hht(*[, emd_method, emd_kwargs, ...])Perform Hilbert-Huang Transform (HHT) on the TimeSeries.
highpass(frequency[, gpass, gstop, fstop, ...])Filter this TimeSeries with a high-pass filter.
hilbert([pad, pad_mode, pad_value, ...])Compute the analytic signal via Hilbert transform.
hilbert_analysis(*[, unwrap_phase, ...])Perform Hilbert analysis to extract instantaneous amplitude, phase, and frequency.
histogram([bins, range, weights, density])Compute a histogram of the values in this TimeSeries.
hurst(**kwargs)Compute Hurst exponent.
impute(*[, method, limit, axis, max_gap])Impute missing values.
inject(other, *[, inplace])Add two compatible Series along their shared x-axis values.
insert(obj, values[, axis])Insert values along the given axis before the given indices and return a new ~astropy.units.Quantity object.
instantaneous_frequency([unwrap, smooth])Compute the instantaneous frequency of the TimeSeries.
instantaneous_phase([deg, unwrap])Compute the instantaneous phase of the TimeSeries via Hilbert transform.
is_compatible(other)Check whether this series and other have compatible metadata.
is_contiguous(other[, tol])Check whether other is contiguous with self.
item(*args)Copy an element of an array to a scalar Quantity and return it.
ktau(other)Calculate Kendall's rank correlation coefficient.
kurtosis([axis, fisher, nan_policy])Compute the kurtosis (Fisher or Pearson) of the data.
laplace(*[, sigma, frequencies, t_start, ...])Compute the Laplace Transform.
local_hurst(window, **kwargs)Compute local Hurst exponent over a sliding window.
lock_in([f0, phase, fdot, fddot, ...])Perform lock-in amplification (demodulation + filtering/averaging).
lowpass(frequency[, gpass, gstop, fstop, ...])Filter this TimeSeries with a Butterworth low-pass filter.
ma([q])Fit a Moving Average MA(q) model.
mask([deadtime, flag, query_open_data, ...])Mask portions of this TimeSeries that fall within a given list of segments.
max([axis, out, keepdims, initial, where])mean([axis, dtype, out, keepdims, where])median([axis, out, overwrite_input, keepdims])Compute the median.
mic(other[, alpha, c, est])Calculate Maximal Information Coefficient (MIC) using minepy.
min([axis, out, keepdims, initial, where])mix_down(*[, phase, f0, fdot, fddot, ...])Mix the TimeSeries with a complex oscillator.
nonzero()Return the indices of the elements that are non-zero.
notch(frequency[, type, filtfilt])Notch out a frequency in this TimeSeries.
override_unit(unit[, parse_strict])Reset the unit of these data.
pad(pad_width, **kwargs)Pad this series to a new size.
partial_correlation(other, *[, controls, method])Calculate partial correlation between self and other, controlling for controls.
partition(kth[, axis, kind, order])Partially sorts the elements in the array in such a way that the value of the element in k-th position is in the position it would be in a sorted array.
pcc(other)Calculate the Pearson correlation coefficient.
phase([unwrap, deg])Calculate the phase of the data.
plot(**kwargs)Plot this object using
gwexpy.plot.Plot.prepend(other, *[, inplace, gap, pad, resize])Connect another series onto the start of the current one.
prod([axis, dtype, out, keepdims, initial, ...])Return the product of the array elements over the given axis
psd(*args, **kwargs)put(indices, values[, mode])q_gram([qrange, frange, mismatch, snrthresh])Scan a TimeSeries using the multi-Q transform.
q_transform([qrange, frange, gps, search, ...])Compute the multi-Q transform and return an interpolated spectrogram.
radian([unwrap])Calculate the phase angle of the TimeSeries in radians.
ravel([order])Return a flattened array.
rayleigh_spectrogram(*args, **kwargs)Compute the Rayleigh statistic spectrogram.
rayleigh_spectrum([fftlength, overlap, window])Calculate the Rayleigh FrequencySeries for this TimeSeries.
rayleigh_test(fftlength, stride[, n_samples])Compute Rayleigh statistic p-value spectrogram.
read(source, *args, **kwargs)Read a TimeSeries from a supported source.
repeat(repeats[, axis])Repeat elements of an array.
resample(rate, *args[, ignore_nan])Resample the TimeSeries.
reshape()Returns an array containing the same data with a new shape.
resize()Change shape and size of array in-place.
rfft(*args, **kwargs)Real-valued Fast Fourier Transform.
rms([axis, keepdims, ignore_nan])Compute the Root Mean Square (RMS) value.
rolling_max(window, *[, center, min_count, ...])Compute the rolling maximum over time.
rolling_mean(window, *[, center, min_count, ...])Compute the rolling mean over time.
rolling_median(window, *[, center, ...])Compute the rolling median over time.
rolling_min(window, *[, center, min_count, ...])Compute the rolling minimum over time.
rolling_std(window, *[, center, min_count, ...])Compute the rolling standard deviation over time.
round([decimals, out])searchsorted(v, *args, **kwargs)setfield(val, dtype[, offset])Put a value into a specified place in a field defined by a data-type.
setflags([write, align, uic])Set array flags WRITEABLE, ALIGNED, WRITEBACKIFCOPY, respectively.
shift(delta)Shift this Series forward on the X-axis by
delta.skewness([axis, nan_policy])Compute the skewness of the data.
smooth(width[, method, ignore_nan])Smooth the series.
sort([axis, kind, order, stable])Sort an array in-place.
spectral_variance(stride[, fftlength, ...])Calculate the SpectralVariance of this TimeSeries.
spectrogram(*args, **kwargs)Compute the average power spectrogram.
spectrogram2(*args, **kwargs)Compute an alternative spectrogram (spectrogram2).
squeeze([axis])Remove axes of length one from a.
standardize(*[, method, ddof, robust])Standardize the series.
std([axis, dtype, out, ddof, keepdims, where])step(**kwargs)Create a step plot of this series.
stlt([stride, window, fftlength, overlap, ...])Compute Short-Time Laplace Transform (STLT).
student_t_spectrogram(fftlength[, stride, ...])Compute Student-t degree of freedom (nu) spectrogram.
sum([axis, dtype, out, keepdims, initial, where])Return the sum of the array elements over the given axis.
swapaxes(axis1, axis2, /)Return a view of the array with axis1 and axis2 interchanged.
tail([n])Return the last n samples of this series.
take(indices[, axis, out, mode])taper([side, duration, nsamples])Taper the ends of this TimeSeries smoothly to zero.
to(unit[, equivalencies, copy])Return a new ~astropy.units.Quantity object with the specified unit.
to_astropy_timeseries([column, time_format])Convert to astropy.timeseries.TimeSeries.
to_cupy([dtype])Convert to CuPy Array.
to_dask([chunks])Convert to Dask Array.
to_device(device, /, *[, stream])For Array API compatibility.
to_dict()Convert TimeSeries to a dictionary.
to_hdf5_dataset(group, path, *[, overwrite, ...])Write to HDF5 group/dataset.
to_jax()Convert to JAX Array.
to_json()Convert TimeSeries to a JSON string.
to_lal()Convert this TimeSeries into a LAL TimeSeries.
to_librosa(y_dtype)Export to librosa-compatible numpy array.
to_mne([info])Convert to
mne.io.RawArray(single-channel).to_neo([units])Convert to neo.AnalogSignal.
to_netcdf4(ds, var_name, **kwargs)Write to a live netCDF4 Dataset object.
to_obspy(*[, stats_extra, dtype])Convert to obspy.Trace.
to_obspy_trace(*[, stats_extra, dtype])Alias for to_obspy().
to_pandas([index, name, copy])Convert TimeSeries to pandas.Series.
to_polars([name, as_dataframe, times, time_unit])Convert TimeSeries to polars object.
to_pycbc(*[, copy])Convert this TimeSeries into a PyCBC ~pycbc.types.timeseries.TimeSeries.
to_pydub([sample_width, channels])Export to pydub.AudioSegment.
to_pyroomacoustics_source()Export as a signal and sample rate tuple for pyroomacoustics.
to_simpeg([location, rx_type, orientation])Convert to SimPEG Data object.
to_sqlite(conn[, series_id, overwrite])Save to sqlite3 database.
to_string([unit, precision, format, subfmt, ...])Generate a string representation of the quantity and its unit.
to_tensorflow([dtype])Convert to tensorflow.Tensor.
to_tgraph([error])Convert to ROOT TGraph or TGraphErrors.
to_th1d([error])Convert to ROOT TH1D.
to_torch([device, dtype, requires_grad, copy])Convert to torch.Tensor.
to_value([unit, equivalencies])The numerical value, possibly in a different unit.
to_xarray([time_coord])Convert to xarray.DataArray.
to_zarr(store[, path])Save to Zarr storage.
tobytes([order])Not implemented, use
.value.tobytes()instead.tofile(fid[, sep, format])Not implemented, use
.value.tofile()instead.tolist()tostring([order])Not implemented, use
.value.tostring()instead.trace([offset, axis1, axis2, dtype, out])transfer_function(other[, fftlength, ...])Compute the transfer function between this TimeSeries and another.
transpose(*axes)Returns a view of the array with axes transposed.
unwrap_phase([deg])Alias for instantaneous_phase(unwrap=True).
update(other, *[, inplace, gap, pad])Update this series by appending new data like a buffer.
value_at(x)Return the value of this Series at the given xindex value.
var([axis, dtype, out, ddof, keepdims, where])view([dtype][, type])New view of array with the same data.
whiten([fftlength, overlap, method, window, ...])Whiten this TimeSeries using inverse spectrum truncation.
write(target, *args, **kwargs)Write a TimeSeries to a supported target.
xcorr(other, *[, maxlag, normalize, mode, ...])Compute the time-domain cross-correlation between two TimeSeries.
zip()Zip the xindex and value arrays of this Series.
zpk(zeros, poles, gain, *[, analog, unit, ...])Filter this TimeSeries by applying a digital zero-pole-gain filter.
Attributes
TView of the transposed array.
baseBase object if memory is from some other object.
cgsReturns a copy of the current Quantity instance with CGS units.
channelInstrumental channel associated with these data.
ctypesAn object to simplify the interaction of the array with the ctypes module.
dataPython buffer object pointing to the start of the array's data.
devicedtTime (seconds) between successive samples.
dtypeData-type of the array's elements.
durationDuration of this series in seconds.
dxX-axis sample separation.
epochGPS epoch for these data.
equivalenciesA list of equivalencies that will be applied by default during unit conversions.
flagsInformation about the memory layout of the array.
flatA 1-D iterator over the Quantity array.
getimagThe imaginary part of the array.
infoContainer for meta information like name, description, format.
is_regularReturn True if this series has a regular grid (constant spacing).
isscalarTrue if the value of this quantity is a scalar, or False if it is an array-like object.
itemsizeLength of one array element in bytes.
mTView of the matrix transposed array.
nameName for this data set.
nbytesTotal bytes consumed by the elements of the array.
ndimNumber of array dimensions.
realThe real part of the array.
sample_rateData rate for this TimeSeries in samples per second (Hertz).
shapeTuple of array dimensions.
siReturns a copy of the current Quantity instance with SI units.
sizeNumber of elements in the array.
spanTime (seconds) spanned by this series.
stridesTuple of bytes to step in each dimension when traversing an array.
t0GPS start time of this series.
timesArray of GPS times for each sample.
unitThe physical unit of these data.
valueThe numerical value of this instance.
x0X-axis coordinate of the first data point.
xindexPositions of the data on the x-axis.
xspanX-axis [low, high) segment encompassed by these data.
xunitUnit of x-axis index.
df- classmethod read(source, *args, **kwargs)[source]
Read a TimeSeries from a supported source.
This override adds explicit CSV and .gwf handling for deterministic behavior when .read() is called through the public API.
The available built-in formats are:
Format
Read
Write
Auto-identify
ats
Yes
No
Yes
ats.mth5
Yes
No
No
csv
Yes
No
Yes
dttxml
Yes
No
No
flac
Yes
Yes
Yes
frame
Yes
Yes
No
framecpp
Yes
Yes
No
framel
Yes
Yes
No
gbd
Yes
No
Yes
gse2
Yes
Yes
Yes
hdf.ndscope
Yes
Yes
Yes
knet
Yes
No
Yes
lalframe
Yes
No
No
li
Yes
No
No
lsf
Yes
No
No
m4a
Yes
Yes
Yes
mem
Yes
No
No
miniseed
Yes
Yes
No
mp3
Yes
Yes
Yes
mseed
Yes
Yes
Yes
nc
Yes
Yes
Yes
ndscope-hdf5
Yes
Yes
No
ndscope_hdf5
Yes
Yes
No
ndscopehdf5
Yes
Yes
No
netcdf4
Yes
Yes
No
ogg
Yes
Yes
Yes
orf
Yes
No
No
sac
Yes
Yes
Yes
sdb
Yes
No
Yes
sqlite
Yes
No
Yes
sqlite3
Yes
No
Yes
taffmat
Yes
No
No
tdms
Yes
No
Yes
wav
Yes
No
Yes
wdf
Yes
No
No
win
Yes
No
Yes
win32
Yes
No
Yes
wvf
Yes
No
No
xml.diaggui
Yes
No
Yes
zarr
Yes
Yes
Yes
- write(target, *args, **kwargs)[source]
Write a TimeSeries to a supported target.
This override preserves minimal metadata for direct CSV round-trips.
The available built-in formats are:
Format
Read
Write
Auto-identify
flac
Yes
Yes
Yes
frame
Yes
Yes
No
framecpp
Yes
Yes
No
framel
Yes
Yes
No
gse2
Yes
Yes
Yes
hdf.ndscope
Yes
Yes
Yes
lalframe
Yes
Yes
No
m4a
Yes
Yes
Yes
miniseed
Yes
Yes
No
mp3
Yes
Yes
Yes
mseed
Yes
Yes
Yes
nc
Yes
Yes
Yes
ndscope-hdf5
Yes
Yes
No
ndscope_hdf5
Yes
Yes
No
ndscopehdf5
Yes
Yes
No
netcdf4
Yes
Yes
No
ogg
Yes
Yes
Yes
sac
Yes
Yes
Yes
zarr
Yes
Yes
Yes
- to_simpeg(location: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, rx_type: str = 'PointElectricField', orientation: str = 'x', **kwargs: Any) Any[source]
Convert to SimPEG Data object.
- Parameters:
location (array_like, optional) – Rx location (x, y, z). Default is [0, 0, 0].
rx_type (str, optional) – Receiver class name. Default “PointElectricField”.
orientation (str, optional) – Receiver orientation (‘x’, ‘y’, ‘z’). Default ‘x’.
**kwargs (Any) – Additional arguments passed to SimPEG converter.
- Return type:
simpeg.data.Data
- classmethod from_simpeg(data_obj: Any, **kwargs: Any) TimeSeries[source]
Create TimeSeries from SimPEG Data object.
- Parameters:
data_obj (simpeg.data.Data) – Input SimPEG Data.
**kwargs (Any) – Additional arguments passed to constructor.
- Return type:
TimeSeries
- classmethod from_control(response: Any, **kwargs: Any) TimeSeries | TimeSeriesDict[source]
Create TimeSeries from python-control TimeResponseData.
- Parameters:
response (control.TimeResponseData) – The simulation result from python-control.
**kwargs (dict) – Additional arguments passed to the constructor.
- Returns:
The converted time-domain data.
- Return type:
TimeSeries or TimeSeriesDict
- arima(order: tuple[int, int, int] = (1, 0, 0), *, seasonal_order: tuple[int, int, int, int] | None = None, auto: bool = False, **kwargs: Any) Any[source]
Fit an ARIMA or SARIMAX model to this TimeSeries.
This method wraps statsmodels.tsa.arima.model.ARIMA (or SARIMAX). If auto=True, it uses pmdarima to automatically find the best parameters.
- Parameters:
- Returns:
Object containing the fitted model, with methods .predict(), .forecast(), .plot().
- Return type:
ArimaResult
- ar(p: int = 1, **kwargs: Any) Any[source]
Fit an AutoRegressive AR(p) model.
Shortcut for .arima(order=(p, 0, 0)).