Skip to content

Instantly share code, notes, and snippets.

@larsbratholm
Created July 31, 2019 12:03
Show Gist options
  • Save larsbratholm/295c0144e31e339314637a58aa03d940 to your computer and use it in GitHub Desktop.
Save larsbratholm/295c0144e31e339314637a58aa03d940 to your computer and use it in GitHub Desktop.
fchl 2-body term
import numpy as np
import matplotlib.pyplot as plt
if __name__ == "__main__":
w = 0.41
N2 = 2.4
x = np.linspace(0.5,6,1000)
s2 = np.log(1+w/x**2)
s = np.sqrt(s2)
mu = np.log(x/np.sqrt(1+w/x**2))
for Rs in (1,2,3,4):
y = 1/(Rs*s*np.sqrt(2*np.pi))*np.exp(-(np.log(Rs)-mu)**2/(2*s2)) / x**N2
plt.plot(x,y,"-")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment