Python fork of pyda (Hewitson et al.) — LTPDA-style signal processing with repository integration.
Project description
ltpda
Python package for LTPDA-style signal processing and LTI system analysis. Fork of pyda-group/pyda, extended for integration with the LTPDA repository stack.
Overview
ltpda provides Python equivalents of the core LTPDA MATLAB toolbox objects: time-series and frequency-series data classes, spectral estimation, pole/zero models, digital filters, and a physical unit algebra. The "it just works" principle of the original MATLAB toolbox is preserved — common analysis tasks require very few lines of code, while the underlying data structures remain fully accessible for advanced use.
The package is in active development. Core signal processing is stable. Features not yet
implemented include IIR filter design, plist parameter-list objects, XYZData, and full
MATLAB-parity history code reconstruction (hist2py).
Requirements
- Python 3.10 or later (tested up to 3.14)
- numpy ≥ 1.18, scipy ≥ 1.5, matplotlib ≥ 3.0, h5py ≥ 3
- lpsd ≥ 1.0.2 (log-scale PSD estimator — see Installation)
Installation
pip from PyPI
pip install ltpda
Full package listing: https://pypi.org/project/ltpda/
pip from wheel
Download the .whl file from the Releases page, then:
pip install ltpda-<version>-py3-none-any.whl
pip from source
No-clone option (installs directly from the git repository):
pip install git+https://github.com/LordSkippy/LTPDA.git#subdirectory=python
Or clone first:
git clone <this-repo>
cd LTPDA/python
pip install .
All dependencies, including lpsd, are installed automatically.
Developers — Poetry
cd LTPDA/python
poetry install
poetry run pre-commit install # enable Black, isort, mypy, pylint hooks
lpsd (Apple Silicon only)
lpsd (source: git.physnet.uni-hamburg.de) installs automatically as a listed dependency.
The only reason to touch it manually is a performance issue on Apple Silicon (M1/M2): lpsd contains C code that uses
long double arithmetic, which on ARM is the same width as double (64-bit). The
polyreg step has been observed to dominate runtime. If logpsd is unusably slow,
compile lpsd from source with architecture-specific flags:
# from the lpsd source directory
gcc -arch arm64 -c -fPIC ltpda_dft.c
gcc -arch arm64 -shared -o ltpda_dft.so ltpda_dft.o
Check for long double uses throughout if contributing performance fixes for M1.
Quick start
from ltpda.tsdata import TSData
from ltpda.dsp.spectral import psd, asd
# 10000 s of white noise at 10 Hz
ts = TSData.randn(nsecs=10000, fs=10, name='noise', yunits='m')
# Power and amplitude spectral density
Pxx = psd(ts, navs=10, window='BH92')
Sxx = asd(ts, navs=10, window='BH92')
Sxx.loglog()
Documentation
| Guide | Contents |
|---|---|
| Data objects | TSData, FSData, XYData, YData — creation, arithmetic, units, splitting |
| Spectral analysis | psd, asd, csd, tfe, logpsd, spectral windows |
| Fitting | sDomainFit, zDomainFit, xfit, tdfit, ParFrac, PEst |
| Models & filters | PZModel, FIR, NoiseGen, differentiation |
| Plotting & I/O | iplot, plotinfo, save/load, from_txt |
| Repository | MySQL connectivity, credentials, submit, retrieve, search |
Examples
Interactive Jupyter notebooks are in Examples/. See Examples/README.md for the full index.
Core classes
Data hierarchy
YData Y-axis data with units and Gaussian error propagation
└── XYData adds an X axis (general 2-D data)
├── TSData time-series — sampling-rate aware; auto-generates time axis
└── FSData frequency-series — X units default to Hz
Supporting classes
| Class | Purpose |
|---|---|
Axis |
Wraps a numpy array with a Unit, error array (ddata), and a name |
Unit |
Symbolic unit algebra — parse, multiply, simplify, convert to SI |
Specwin |
30+ spectral window functions |
PZ |
Single pole or zero in f/Q or complex (s-plane) representation |
PZModel |
Poles, zeros, gain, and delay — evaluates to FSData via .resp() |
DFilter / FIR |
Digital filter classes with .resp() and .filter() |
NoiseGen |
Franklin-algorithm colored-noise generator driven by a PZModel |
ParFrac |
Partial-fraction model returned by sDomainFit / zDomainFit |
PEst |
Parameter estimate returned by xfit / tdfit |
Features
- Time and frequency series —
TSDataandFSDatawith unit tracking, error propagation, and HDF5 serialisation (.ltpdafiles, versioned format) - Physical unit algebra — parses unit strings (
"m/s^2","pm^1.5", …), multiplies, simplifies, converts to SI, and produces LaTeX axis labels - Error propagation — Gaussian errors tracked through every arithmetic operation including
+,-,*,/,**,abs,sqrt,log10,exp - Spectral estimation — Welch WOSA:
psd,asd,csd,mscohere,cohere,tfe; log-scalelogpsdvia the externallpsdlibrary; PSD / ASD / PS / AS output scaling - Spectral windows — 30+ types; each exposes NENBW, PSLL, and 3 dB bandwidth properties
- Pole/zero models —
PZModelwith frequency-response evaluation; automatic f/Q ↔ complex root conversion; complex-conjugate pole pairs handled correctly - FIR digital filters — lowpass, highpass, bandpass, bandstop; frequency response and
time-domain filtering of
TSData - Noise generation — Franklin algorithm; arbitrary spectral shape prescribed by a
PZModel; state maintained across calls for arbitrarily long sequences - Fitting — s-domain and z-domain vector fitting (
sDomainFit,zDomainFit→ParFrac); general nonlinear least-squares (xfit); time-domain system ID via TF estimate (tdfit); all four mirror MATLAB LTPDA parameter names exactly - Differentiation — five methods: 2-point, 3-point, 5-point, order-2 polynomial fit, and order-2 with 5-point smoothing; orders Zero, First, Second
- Resampling and fractional delay — windowed-sinc interpolation with Blackman window
- Plotting —
plot,loglog,semilogy,semilogx; complex data automatically splits into magnitude and phase panels; error bars withShowErrors=True,ErrorType='area' - File I/O —
save()/load()on all data objects;from_txt_file()andfrom_complex_txt_file()class-method constructors
Not yet implemented
- IIR filters (MATLAB
miir) plistparameter-list objects (currently plain Python keyword arguments)XYZDataclass with spectrogram support- Additional math operators on
XYData:sin,cos,tanand friends - Log-scale spectral estimators:
ltfe,lcohere, and equivalents of the remaining LTPDA lpsd family fpsder— fractional polynomial derivative (started, not finished)- Vectorised spectral functions —
psd(*ts_list)/asd(*ts_list)to operate on multiple objects at once - Axis-level method helper — a generic wrapper to apply arbitrary functions to an
Axiswith correct error propagation - Time-domain simulation / step response for
PZModel - Calibration objects and control-system design utilities
- Docstrings — help text coverage is incomplete throughout the package
Directory layout
python/
├── ltpda/
│ ├── ydata.py YData base class
│ ├── xydata.py XYData (general 2-D data)
│ ├── tsdata.py TSData (time-series, with absolute t0 support)
│ ├── fsdata.py FSData (frequency-series)
│ ├── pzmodel.py PZModel + PZ (pole/zero transfer functions)
│ ├── parfrac.py ParFrac (partial-fraction model — sDomainFit/zDomainFit output)
│ ├── pest.py PEst (parameter estimate — xfit/tdfit output)
│ ├── functions.py Module-level function wrappers
│ ├── repo/ Repository connectivity (direct MySQL / PyMySQL)
│ │ ├── __init__.py Exports LTPDARepository
│ │ ├── client.py LTPDARepository — main public API class
│ │ ├── models.py SubmitResult, ObjectMeta, SearchResult dataclasses
│ │ ├── _connection.py MySQL connection wrapper (RepoConnection)
│ │ ├── _submit.py Submit logic (mirrors MATLAB submit.m)
│ │ ├── _retrieve.py Retrieve / time-range / HDF5 deserialization
│ │ └── _search.py Search, find, metadata, report utilities
│ ├── utils/
│ │ ├── axis.py Axis — numpy array with units and errors
│ │ ├── unit.py Unit — symbolic algebra and SI conversion
│ │ ├── specwin.py Spectral windows (30+ types)
│ │ └── math/ Helper math utilities (rat, intfact, normal_round)
│ ├── dsp/
│ │ ├── filter.py TF, DFilter, FIR digital filter classes
│ │ ├── spectral.py PSD, ASD, CSD, coherence, TFE estimators
│ │ ├── noisegen.py Franklin noise generator
│ │ └── fit.py sDomainFit, zDomainFit, xfit, tdfit
│ └── mixins/ Composable mixins (operators, plotting, diff, DSP)
├── Documentation/ Per-topic user guides
│ ├── data-objects.md
│ ├── spectral-analysis.md
│ ├── fitting.md
│ ├── models-filters.md
│ ├── plotting-io.md
│ └── repository.md
├── Examples/ 24 Jupyter notebooks covering all major features
├── docker/ Dockerfile for CI / containerised testing
└── tests/ pytest test suite (~54% coverage)
Development
Run the tests
make test
# or
poetry run pytest
All tests must pass and coverage must not drop below 54 %.
Docker
A docker/Dockerfile builds a self-contained Python environment with ltpda installed (Python 3.10 by default, also tested against 3.7). The Makefile provides helpers:
make docker # build gwdiexp/ltpda:develop (and :develop-3.10)
make docker-push # push both tags to Docker Hub
make test-docker # run the test suite inside the container
The Docker image is primarily used for CI. To run tests in the container locally:
docker run -v $(pwd):/code --rm -it gwdiexp/ltpda:develop make test
Code style
Black (88-character lines), isort, pylint, and mypy are enforced via pre-commit. The hooks run automatically before each commit once enabled:
poetry run pre-commit install
Release a new version
poetry version patch # bug fixes
poetry version minor # new features
poetry version major # breaking changes
Then merge to main.
Open design questions
These architectural decisions are unresolved and worth settling before the relevant areas grow further:
-
Plotter separation — plotting methods (
plot,loglog, …) currently live as mixins on the data classes. An alternative is a standaloneTSPlotter/FSPlotterclass:tsplt.loglog(ts1, ts2, ts3). This would decouple visualisation from data and make the classes easier to test. -
Spectral and filter mixins —
psd,asd,tfe, and filter application currently live in separate modules. Since they only operate onTSData, mixing them directly ontoTSData(likeTSDataDSP) would givets.psd(navs=10)call syntax. Trade-off: convenience vs separation of concerns. -
Setter validation in
Axis— input checking fordata,ddata, andunitsis spread across the data classes. Moving it intoAxis.__set__would centralise validation and make subclassing safer.
Known issues
The following open issues are tracked upstream at gitlab.com/pyda-group/pyda/-/issues.
Bugs:
-
#6 —
ydata / ydataraisesWrongSizeExceptionDivision between twoXYData/YDataobjects fails due to a unit exponent list length mismatch. Workaround: divide the underlying numpy arrays directly. -
#5 —
split_by_timeuses indices instead of time values Start/stop times are multiplied byfsand used as sample indices rather than compared against the actual time axis. Results are incorrect for data that does not start at t = 0. -
#23 —
numpy.array * YDatacallsYData.__mul__element-wise When a numpy array is the left operand, Python dispatches multiplication toYData.__mul__repeatedly rather than treating the array as a single operand. Operator test coverage is incomplete.
Design limitations:
-
#11 — No vectorised operations on lists of objects There is no array-of-objects type. Calling
.plot()on a Python list ofTSDataobjects requiresmy_list[0].plot(*my_list[1:])as a workaround. -
Processing history (partial implementation) — Every ltpda object carries a
.historyattribute that records Python-side operations (constructor, arithmetic, DSP, repo retrieve/submit). When retrieving a MATLAB-submitted object, the full LTPDA history chain is parsed from<historyRoot>XML and accessible asobj.history. Known limitations:hist2py()(code reconstruction from history) is not implemented.- When MATLAB retrieves a ltpda-processed object, Python steps appear in MATLAB's history
browser but
hist2m()cannot reconstruct them — it produces comments for Python nodes. - History is carried in both HDF5 and XML since 0.2.4. Mixed MATLAB/Python chains are fully preserved through HDF5 round-trips.
from ltpda.history import display as show_history # Python-tracked history ts = TSData.randn(nsecs=100, fs=10) ts2 = ts * 2.0 show_history(ts2.history) # [py] mul 2024-01-15 00:01:02 # [py] TSData.constructor 2024-01-15 00:01:00 # MATLAB history (after repo.retrieve on a MATLAB-submitted ao) lpsd_obj = repo.retrieve(42) show_history(lpsd_obj.history) # [py] repo.retrieve 2024-01-15 00:02:00 # [ml] lpsd 2024-01-15 00:00:58 # [ml] plus 2024-01-14 23:59:50
Enhancements under discussion:
-
#9 — Replace
ddatawith theuncertaintieslibrary Proposal to useuncertainties.uarrayinstead of separate data/error arrays for more transparent error propagation. -
#8 — Object
__str__should show data valuesprint(ts)currently shows shape only. Request to show first/last values following the numpy convention. -
#7 — Mixed-unit plots should warn Plotting objects with incompatible units silently produces a misleading axis label. Request to display
[Mixed]or raise a warning. -
#3 — Package name is taken on PyPI (resolved — package renamed to ) The name was already registered on PyPI by an unrelated project. Resolved by renaming this package to .
Version history
0.2.6
TSData.from_function()— construct a time-series by evaluating a Python expression oft(1-D numpy array). Mirrors the MATLABao(plist('tsfcn', '<expr>', 'fs', fs, 'nsecs', T))constructor. Formula string hast,numpy, andnpin scope, e.g.fcn='0.01 * numpy.random.randn(len(t))'.ltpda_fitting.ipynbextended with Section 6 — five additionalxfitusage patterns ported from MATLAB'stest_ao_xfit.m, includingfsfcn,tsfcn,xyfcn,smodel(lambda equivalent), and multi-channel sequential fits. Also demonstratesscipy.optimize.differential_evolutionas the Python equivalent of MATLAB'sMonteCarlo/Npointsglobal search.sDomainFit/zDomainFit— s-domain and z-domain vector fitting of frequency-domain data using the relaxed vector fitting algorithm (Gustavsen 1999/2006). Returns aParFracpartial-fraction model.ParFrac.resp(freqs)evaluates the model;ParFrac.to_ba()converts a z-domain model to rational filter coefficients.xfit— general nonlinear least-squares curve fitting forFSDataandTSData. Accepts a callablef(x, P)or a MATLAB-style eval string withXdata/Pvariables. Returns aPEstwith best-fit parameters, 1-sigma uncertainties, and covariance matrix.tdfit— time-domain system identification: estimates a transfer function from input/outputTSDataviatfe(), then fits a parametric model usingxfit. ReturnsPEst.ParFracandPEst— new output classes (mirror MATLAB'sparfracandpest), exported fromltpdaand carrying full processing history.- All four methods are available both as methods on data objects and as standalone functions
in
ltpda.dsp.fit. Parameter names match MATLAB exactly. - pytest updated to
^8.0for Python 3.12+ compatibility (ast.Strremoval).
0.2.5
Full XML / HDF5 parity with MATLAB's .mat and objs.xml formats. After this release
Python-generated XML and HDF5 files carry the same information as MATLAB-generated ones in
all fields except toffset (always 0; MATLAB bakes t0 + toffset into t0 before writing XML).
New fields on data objects:
FSData.t0— MATLAB'sfsdatacarries an optional UTC start time (set byao/lpsd).FSDatanow has at0attribute (datetimeorNone), stored in HDF5 as an ISO string and in XML as<t0><time utc_epoch_milli="..."/></t0>, matching TSData's existing behaviour.procinfopass-through — MATLAB's<procinfo>plist (e.g. the lpsd frequency planr,m,L,K) is now captured as raw XML in_procinfo_rawon retrieve, re-emitted verbatim on submit, and stored in HDF5 so it survives an XML→HDF5→XML round-trip.timespan— MATLAB auto-setstimespan = (t0 + x(1), t0 + x(end) + 1/fs)on every TSData. Python replicates this in theTSDataconstructor whent0is known and stores it asobj.timespan = (startT, endT). Survives HDF5 and XML round-trips.FSData.fs— stores the original time-series sample rate that produced the spectrum (e.g. 4096 Hz for a 0–2048 Hz PSD), matching MATLAB'sfsdata.fs. All spectral functions (psd,cpsd,tfe,mscohere,cohere,logpsd) setSxx.fsautomatically. Defaults to0.0for FSData objects created without a time-series input (filter responses,from_txt_file, etc.). Previously Python wrotex_data[-1](max frequency) to the XML<fs>element; now the true sample rate is written.navsandenbwonFSData— spectral estimation now computes and stores these on the returnedFSData, matching MATLAB'sfsdata:psd,cpsd,tfe,mscohere,cohere:navs= actual Welch segments;enbw= 1-element array= fs · S2 / S1².logpsd:navs= desired averages (Kdes);enbw= per-bin array read directly from thelpsdlibrary output, matching MATLAB'sao/lpsdper-bin vector.FSData.enbwis always anumpy.ndarray(1-element for WOSA, N-element for logpsd).
HDF5 fields added to TSData group (all recomputable, stored for direct inspection):
fs, nsecs, toffset (= 0), timespan_start / timespan_end, procinfo_raw.
HDF5 fields added to FSData group: fs (original time-series sample rate).
Breaking changes:
TSData.fsis now a property (access asts.fs, notts.fs()). This makes it consistent withFSData.fsand with MATLAB's convention where both are properties. Any external code callingts.fs()must be updated tots.fs.TSData.nsecsis now a property (access asts.nsecs, notts.nsecs()). Any external code callingts.nsecs()must be updated tots.nsecs.
New methods:
FSData.rms()— fixed and redesigned. Now mirrors MATLAB's@ao/rms: returns a cumulative RMS curve as anFSDatawith the same frequency axis. The spectral type (ASD or PSD) is inferred automatically from y-axis units (Hz exponent −0.5 → ASD, −1.0 → PSD). Output units are the base physical unitX: for ASD (X/√Hz) the Hz factor is stripped; for PSD (X²/Hz) the Hz factor is stripped and remaining exponents are halved (√(X²) = X). RaisesValueErrorfor non-spectral-density units.FSData.rms_scalar()— new method. Integrates the full spectrum and returns a single RMS value as aYDatascalar. Uses the same unit auto-detection and unit correction asrms().
Bug fixes:
FSData.rms()was completely broken: referenced an undefined variables_sc_phiand used wrongYDataconstructor parameters.- Error messages in
YDataarithmetic operators displayed<bound method>instead of a length count (missing()ont1.size); fixed. psd(..., scale='ASD')andpsd(..., scale='AS')crashed with aValueErrorbroadcast error whenever only one Welch segment was computed (e.g.nfft≥ signal length)._psdPeriodogramreturns an empty(0, 0)error array for single-segment estimates;_welchscalenow treats empty arrays the same asNoneand skips the chain-rule propagation step, matching the existing single-segment handling in_wosa.
XML fixes:
_parse_time_elementnow returns UTC-aware datetimes (timezone.utc).- Timespan XML schema corrected: Python now emits the double-wrapped structure
<timespan><timespan shape="1x1">…</timespan></timespan>that MATLAB'sgetObjectdispatcher requires. The single-wrapped form that was previously generated would have caused MATLAB to callfeval('startT', …)and crash on retrieve. - Timespan XML parse corrected: parser now descends into the inner
<timespan>child before looking forstartT/endT; previously silently dropped MATLAB-generated timespans.
HDF5 parity (introduced for all data classes: YData, XYData, TSData, FSData):
- Processing history DAG (all nodes, all languages, MATLAB round-trip fields).
- PlotInfo (all 10 style fields).
- Compound units (
strs,exps,valssubgroup; legacy string attr kept for back-compat). - Description (was written but never read back; fixed).
enbwstored as HDF5 dataset (not attribute) to support per-bin vectors.
Bug fixes:
TSData/FSData._from_hd5f_structuresilently discarded axis units and names on load (theXYDataconstructor resets them; fix saves and restores after construction).
0.2.4
broken release
0.2.3
iplot()— intelligent plot method mimicking MATLAB'sao.iplot:- Smart data-type dispatch:
TSData→ linear axes;FSData→ log-log with automatic magnitude/phase subplots for complex data. Arrangement='stacked'(default) overlays all objects on the same axes.Arrangement='subplots'stacks each object in its own subplot row (single figure).Arrangement='single'opens one figure per object.XScales/YScales— per-axis scale override ('log'or'lin'); a single string applies to all axes.XRanges/YRanges— per-axis[min, max]limits.LineColors,LineStyles,LineWidths,Markers,MarkerSizes— per-object style control; shorter lists cycle;['all', value]applies one value to every trace.MarkerFaceColor,MarkerEdgeColor— independent marker fill and border colours; same['all', colour]shorthand supported.Legends='off'suppresses legends;Legends=['a', 'b']overrides labels;LegendLocationaccepts MATLAB location strings ('NorthEast','Best', …);LegendFontSizecontrols font size;ShowDescriptions=Trueappends the object's.descriptionattribute to the legend label.Titles— per-subplot title strings (one per object in subplots/single arrangements).XLabels/YLabels— override axis label names; data units are still appended.FigureNames— set the figure suptitle / window title.complexPlotType— controls complex-data display:'absdeg'(magnitude + phase in °, default),'absrad'(magnitude + phase in rad),'realimag'(real + imaginary parts).ShowErrors=Truerenders error bars fromddata;ErrorBarType='bar'(default) or'area'(shaded band). Explicit per-object bounds viaYerrL,YerrU,XerrL,XerrU.AUTOERRORS=Falsedisables automaticddatadetection.- All keyword names match MATLAB's
iplotexactly for zero relearning cost.
- Smart data-type dispatch:
plotinfo— per-object style metadata thatiplot()reads automatically.set_plotinfo(color, linestyle, linewidth, marker, markersize, markerfacecolor, markeredgecolor, fillmarkers, include_in_legend, show_errors)attaches aPlotInfoto any ltpda object. Priority chain:iplot()kwarg > plotinfo field > object loose attribute > matplotlib default. Full MATLAB XML round-trip: Python reads MATLAB<Style>XML on retrieve (all color, linestyle, marker fields parsed into matplotlib equivalents); Python emits exact MATLAB-compatible<Style>on submit (JavaColor.getRGB()decimal encoding).- Richer Python AO processing history — Python history nodes are now as informative
as MATLAB's and produce distinct per-operation groups in the MATLAB history browser:
- Each operation type gets its own blue cluster label instead of the generic
Python/ltpdabucket:ao.ao (Python)for constructors,ao.psd (Python)for spectral estimates,ao.plus (Python)for arithmetic, etc. - Constructor params are fully recorded:
FS,NSECS,YUNITS,WAVEFORM(forrandn/sinewave),A0,F0,PHI(forsinewave),DISTRIBUTION/SIGMA(forrandn). - DSP functions (
psd,logpsd,mscohere,cohere,cpsd,tfe) now record a history node that chains back to the input time-series, capturingWINDOW,NAVS,PERCENT_OVERLAP,NFFT,SCALE,DETREND_ORDER(andPSLL,OLAP,BMIN,LMIN,JDES,KDESforlogpsd). Previously these functions produced no history at all. NoiseGen.generateNoise()recordsNSECS,FS,MODEL,YUNITS.__pow__recordsEXPONENT.
- Each operation type gets its own blue cluster label instead of the generic
set_description(text)— explicit setter on all ltpda objects (mirrors MATLAB'ssetDescription). Thedescriptionproperty remains directly assignable; this method adds a consistentset_*style for use alongsideset_yaxis_name,set_plotinfo, etc.- Bug fixes:
- History
contextattribute was silently dropped when Python read a MATLAB-serialized history node from XML and re-submitted it. MATLAB's history browser usescontextto render "blue tag" cluster labels; losing it caused all pre-existing history steps to appear untagged after a Python round-trip. Fixed by adding a_contextfield toHistoryNodeand preserving the attribute through the full read → write cycle. proctimeon history nodes drifted by the system UTC offset on every Python round-trip._parse_history_rootwas creating naive datetimes viadatetime.utcfromtimestamp(), whichdatetime.timestamp()(in the serialiser) then treated as local time. Switched to UTC-aware datetimes (datetime.fromtimestamp(..., tz=timezone.utc)) throughout.- AO
UUIDwas not preserved on retrieve:_parse_aodiscarded theUUIDattribute from the<ao>element, so every re-submit generated a fresh random UUID. Now stamped ontoobj.idafter parsing.
- History
0.2.2
- First pypi.org release
0.2.1
- Renamed package from
pydatoltpdato resolve PyPI naming conflict (issue #3). File extension.pyda→.ltpda(.pydafiles still load for backward compatibility). Repository sentinelbinary_pyda→binary_hdf5. - Dependency updates for NumPy 2.x compatibility:
numpyuncapped (≥ 1.18),matplotlib ≥ 3.9,h5py ≥ 3.10. Addedmpmath ≥ 1.0as a runtime dependency. - Wired up
ltpda.dsp.NoiseGen(Franklin noise generator): added missingmpmathdependency, exported fromltpda.dsp, added smoke tests. - Bug fixes:
PZ()no-argument constructor crashed withTypeErrorbecausenumpy.isreal(None)isTrue, causingfq2ri(f0=None)to be called. Guarded dispatch block withif f is not None.TSData.nsecs()andTSData.fs()raisedValueError/ emitted numpy warnings on empty time-series objects. Both now return0.0early whenxdata()is empty.Axis.ddatasetter size check was gated onnumpy.shape(ddata)[0] > 2(first dimension, not total size), allowing mismatched error vectors to be silently accepted. Replaced withddata.size > 1.
- Test suite: removed three stale
@unittest.skipdecorators (bugs resolved). Excludedltpda/repo/*from coverage measurement (requires live MySQL). Coverage threshold met at 56%.
0.2.0
- Repository connectivity: MySQL backend, submit/retrieve AO objects, search interface.
- History tracking: record and replay analysis steps; XML exchange with MATLAB LTPDA.
Upstream baseline (pyda, pre-fork)
The following was already present in pyda-group/pyda before this fork was created, written by Martin Hewitson, Artem Basalaev, Christian Darsow-Fromm, and Oliver Gerberding:
YData,XYData,TSData,FSData— core data classes with error propagationUnit— physical unit algebra (parse, simplify, convert to SI)PZModel/PZ— pole/zero model representation and response computationSpecWin— spectral window functions (Hann, flat-top, Kaiser-Bessel, …)dsp.spectral— PSD / ASD estimation vialpsddsp.filter— digital filter representationdsp.noisegen— Franklin colored-noise generator (wired up in 0.2.1)- HDF5 save/load for all data classes
- Operator overloading (
+,-,*,/,**, comparison) with unit checking
Heritage
ltpda was created by Martin Hewitson, Artem Basalaev, Christian Darsow-Fromm, and Oliver Gerberding as a Python reimplementation of the LTPDA MATLAB toolbox for gravitational-wave and precision-measurement data analysis. The upstream project is maintained at gitlab.com/pyda-group/pyda.
This fork extends the upstream work for integration with the LTPDA repository stack.
Original authors:
- Martin Hewitson — martin.hewitson@aei.mpg.de
- Artem Basalaev — artem.basalaev@physik.uni-hamburg.de
- Christian Darsow-Fromm — cdarsowf@physnet.uni-hamburg.de
- Oliver Gerberding — oliver.gerberding@physik.uni-hamburg.de
Disclaimer
This software is provided "as is", without warranty of any kind, express or implied. Use at your own risk. The authors make no guarantees about correctness, fitness for a particular purpose, or continued development. See LICENSE.md for full terms.
License
Upstream pyda copyright 2022 Martin Hewitson, Artem Basalaev, Christian Darsow-Fromm, and Oliver Gerberding. See Heritage.
Modifications and extensions in this fork: Copyright 2026 Simon Barke.
Licensed under the Apache License, Version 2.0. See LICENSE.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ltpda-0.2.6.tar.gz.
File metadata
- Download URL: ltpda-0.2.6.tar.gz
- Upload date:
- Size: 132.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ae1ab216157a779d4306d843ecb552ea72714a1b5f0ec40b431446e8c03fda
|
|
| MD5 |
dca7d381db9c7ba6eaef626573feeed4
|
|
| BLAKE2b-256 |
989fbdfd32fd778cb20d1602f261d19905a9e2d1bef5c067f0db185a647fc796
|
File details
Details for the file ltpda-0.2.6-py3-none-any.whl.
File metadata
- Download URL: ltpda-0.2.6-py3-none-any.whl
- Upload date:
- Size: 149.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f39a9bcf77b33362154b7ad918125861f8041ee0ba37edef22e6dccdbe101c4
|
|
| MD5 |
60146dab030c72c1db560c5dec12d351
|
|
| BLAKE2b-256 |
75345d03f23478a09ba9152902b041f0183fb9659ef2b4aa2d565921a0a3d9fc
|