Skip to content

Commit

Permalink
docs: fix bug in theory notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepVanlier committed Jan 16, 2024
1 parent 229b0cb commit a05313f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/theory/force_calibration/force_calibration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]");
Expand Down Expand Up @@ -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]");
Expand All @@ -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="--")

Expand Down

0 comments on commit a05313f

Please sign in to comment.