From a05313fe62a6495140582c06e4a7ab7ec5b4f381 Mon Sep 17 00:00:00 2001 From: Joep Vanlier Date: Tue, 16 Jan 2024 15:18:42 +0100 Subject: [PATCH] docs: fix bug in theory notebook --- docs/theory/force_calibration/force_calibration.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/theory/force_calibration/force_calibration.rst b/docs/theory/force_calibration/force_calibration.rst index 0303fe306..14d855a21 100644 --- a/docs/theory/force_calibration/force_calibration.rst +++ b/docs/theory/force_calibration/force_calibration.rst @@ -76,7 +76,7 @@ We can plot this spectrum for different diffusion constants:: f = np.arange(100, 23000) for diffusion in 10**np.arange(1, 4): - plt.loglog(f, diffusion / (np.pi * f**2), label=f"D={diffusion} $\mu m^2/s$") + plt.loglog(f, diffusion / (np.pi**2 * f**2), label=f"D={diffusion} $\mu m^2/s$") plt.xlabel("Frequency [Hz]") plt.ylabel("Amplitude [$\mu m^2$/Hz]"); @@ -113,7 +113,7 @@ When plotting this equation for various values of the corner frequency, we see t plt.subplot(1, 2, 1) diffusion, corner_freq = 1000, 1000 for diffusion in 10**np.arange(1, 4): - plt.loglog(f, diffusion / (np.pi * (f**2 + corner_freq**2)), label=f"D={diffusion} $\mu m^2/s$") + plt.loglog(f, diffusion / (np.pi**2 * (f**2 + corner_freq**2)), label=f"D={diffusion} $\mu m^2/s$") plt.xlabel("Frequency [Hz]") plt.ylabel("Amplitude [$\mu m^2$/Hz]"); @@ -123,7 +123,7 @@ When plotting this equation for various values of the corner frequency, we see t diffusion, corner_freq = 1000, 1000 for corner_freq in [1000, 5000, 10000]: line, = plt.loglog( - f, diffusion / (np.pi * (f**2 + corner_freq**2)), label=f"$f_c$={corner_freq} Hz" + f, diffusion / (np.pi**2 * (f**2 + corner_freq**2)), label=f"$f_c$={corner_freq} Hz" ) plt.axvline(corner_freq, color=line.get_color(), linestyle="--")