Skip to content

Commit

Permalink
Merge branch 'master' of github.com:SiggiGue/syncsweptsine
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegfried Gündert committed Feb 16, 2023
2 parents 7f8aefa + 143bff3 commit 6acd1ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ python:
install:
- requirements: docs/requirements.txt
- method: setuptools
path: .

path: .
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@

This project implements the Synchronized Swept Sine Method as a reusable python package.
It is structured according to the papers by [Novak et al. 2015](https://doi.org/10.17743/jaes.2015.0071) and [Novak et al. 2010](https://doi.org/10.1109/TIM.2009.2031836), but equations and symbol names are adapted to code conventions, also known as PEP 8.
Anyway, references to symbols and equations are given in the code comments.
However, references to symbols and equations are given in the code comments.
Most important classes are

- `SyncSweep` for the generation of the synchronized swept sine singal
- `HigherHarmonicImpulseResponse` for the deconvolution from sweep input and output signal.
- `HammersteinModel` filtering of signals with the hammerstein model.
- `LinearModel` filtering of signals with the linear kernel e.g. from a `HigherHarmonicImpulseResponse`
- `HammersteinModel` estimation and filtering of signals with the hammerstein model.
- `LinearModel` estimation and filtering of signals with the linear kernel e.g. from a `HigherHarmonicImpulseResponse`

Examples are placed in the examples folder.
A small example, estimating the coefficients of a nonlinear system, is listed below:

```python
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions examples/example1.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
ylabel('$\\phi$ / rad')
grid()
lines = l0 + l1 + l2 + l3
labels = [l.get_label() for l in lines]
labels = [line.get_label() for line in lines]
legend(lines, labels)
xlabel('Frequency $f$ / Hz')

show()
show()
4 changes: 2 additions & 2 deletions syncsweptsine.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def from_sweeps(cls, syncsweep, measuredsweep, fftlen=None, regularize=1e-6):
reguspec = invert_spectrum_reg(rinvspec*sweepspec, beta=regularize)
rinvspec[1:] = rinvspec[1:]*reguspec[1:]
else:
rspec /= syncsweep.samplerate
rspec /= syncsweep.samplerate
return cls.from_spectra(
rspec=rspec,
rinvspec=rinvspec,
Expand Down Expand Up @@ -918,7 +918,7 @@ class FrfFilterKernel(object):
"""
def __init__(self, freq, frf, ir=None):
if len(freq) != len(frf):
if len(freq) != len(frf):
raise ValueError('`freq` and `frf` must have the same length, not ', len(freq), len(frf))
self._frf = frf
self._freq = freq
Expand Down

0 comments on commit 6acd1ca

Please sign in to comment.