From 3b3f0be31396bc90ed64656cbe17d0e8787c7337 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:50:26 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- numpy_fft_1/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpy_fft_1/README.md b/numpy_fft_1/README.md index 0dea4fd..acdcc4d 100644 --- a/numpy_fft_1/README.md +++ b/numpy_fft_1/README.md @@ -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)