<jupyter_start><jupyter_text>%matplotlib inlineimport numpy as npimport matplotlib.pyplot as pltfrom scipy.stats import norm, poissonaZSplt.rc('font', size=SMALL_SIZE)           controls default text sizesplt.rc('axes', titlesize=SMALL_SIZE)      fontsize of the axes titleplt.rc('axes', labelsize=MEDIUM_SIZE)     fontsize of the x and y labelsplt.rc('xtick', labelsize=SMALL_SIZE)     fontsize of the tick labelsplt.rc('ytick', labelsize=SMALL_SIZE)     fontsize of the tick labelsplt.rc('legend', fontsize=SMALL_SIZE)     legend fontsizeplt.rc('figure', titlesize=BIGGER_SIZE)   fontsize of the figure titleplt.rcParams["font.family"] = "serif"SEED = 350107321  from random.orgnp.random.seed(SEED)print(plt.style.available)plt.style.use('seaborn-white')<jupyter_code>xlim = 3
x = np.linspace(-xlim,xlim)
n = norm.pdf(x)
xb = np.array([-xlim,-np.sqrt(np.pi/2)/2-0.0000001,-np.sqrt(np.pi/2)/2,np.sqrt(np.pi/2)/2,np.sqrt(np.pi/2)/2+0.0000001,xlim])
pb = np.array([0,0,1/np.sqrt(np.pi/2),1/np.sqrt(np.pi/2),0,0])
# this is how many particles are in the box of there is on average one particle in the box
print(6/np.sqrt(np.pi/2))
xf = np.random.random(5)*2*xlim-xlim
yfg = norm.pdf(xf)
inorout = (-np.sqrt(np.pi/2)/2<xf)&(xf<np.sqrt(np.pi/2)/2)
yfb = np.where(inorout,np.ones(5)/np.sqrt(np.pi/2),np.zeros(5))
print(xf)
plt.plot(x,n,label="Gaussian",color="k",linestyle="-.")
plt.plot(xb,pb,label="Box",color="k")
plt.scatter(xf,yfg,color="k")
plt.scatter(xf,yfb,color="k")

plt.xlabel(r"$x$")
plt.ylabel(r"$p(x)$")
plt.savefig("Gaussian_vs_box.png",format="png",dpi=300,bbox_inches='tight',facecolor="white",backgroundcolor="white")
xp = np.arange(5)
pp = poisson(mu=1).pmf(xp)
fig, ax = plt.subplots(1, 1)
ax.vlines(xp, 0, pp, colors='k', linestyles='-', lw=3,label=r'Poisson $\mu=1$')
plt.legend()
plt.ylabel(r"$p(I)$")
plt.xlabel(r"$I$")
plt.savefig("Poisson.png",format="png",dpi=300,bbox_inches='tight',facecolor="white",backgroundcolor="white")
xlim = 2
x = np.linspace(-xlim,xlim,2000)
n = norm.pdf(x)
n[0]=0
n[-1]=0
xf = np.random.random(1)*2*xlim-xlim
yfg = norm.pdf(xf)
print(xf)

plt.plot(x,n,color="k")
plt.scatter(xf,yfg,color="k")
plt.xlabel(r"$x$")
plt.ylabel(r"$\Phi(x)$")
plt.ylim((0,0.45))
plt.xticks([-2,2],["-L/2","L/2"])
plt.savefig("Gaussian_L.png",format="png",dpi=300,bbox_inches='tight',facecolor="white",backgroundcolor="white")<jupyter_output>[1.92956042]
{'fraction_non_alphanumeric': 0.21545569088618227, 'fraction_numerical': 0.04073918521629567, 'mean_word_length': 6.490566037735849, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '333578', 'license': 'MIT', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1037, 'n_words': 140, 'path': 'photon histogram figure.ipynb', 'repo_name': 'hstrey/Intensity-Distribution', 'size': '2381'}