Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-14 19:50:26 +01:00 committed by GitHub
parent 26ed950b53
commit 3b3f0be313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ The goal is to produce a power spectral density that is compatible with the [Par
```python
y_power: np.ndarray = (1 / (sampling_frequency * y.shape[0])) * np.abs(y_fft) ** 2
y_power[1:-2] *= 2
y_power[1:-1] *= 2
if frequency_axis[-1] != (sampling_frequency / 2.0):
y_power[-1] *= 2
@ -77,7 +77,7 @@ if frequency_axis[-1] != (sampling_frequency / 2.0):
Check of the normalization:
```python
print(y_power[1:].sum()) # -> 0.5
print(y_power[1:].sum()/ (time_series_length * dt)) # -> 0.5
print(np.var(y)) # -> 0.5
```
![figure 2](figure_2.png)