Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
restrepo
GitHub Repository: restrepo/ComputationalMethods
Path: blob/master/homework/homework_2018_1_01_6666666.ipynb
934 views
Kernel: Python 3
%pylab inline
Populating the interactive namespace from numpy and matplotlib
import pandas as pd from matplotlib.colors import LogNorm
df[:2]
df[df.LaL==0.1]
df[['mhp_700']]
list(range(200,750,50) )
[200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]
df.loc[1,'LaL']
0.02
'm_{}'.format(100)
'm_100'
dfc=pd.DataFrame() for i in df.index: print(i) for m in range(200,750,50): ps=pd.Series({'mhp':m,'LaL':df.loc[i,'LaL'],'cs':df.loc[i,'mhp_{}'.format(m)]}) dfc=dfc.append(ps,ignore_index=True)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
maxLaL=3.1 plt.hexbin(dfc[dfc.LaL<maxLaL].mhp,dfc[dfc.LaL<maxLaL].LaL,dfc[dfc.LaL<maxLaL].cs,yscale='log',norm=LogNorm()) plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7fcfc0fab978>
Image in a Jupyter notebook
mpl.style.use('classic')
m=200 plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'k:',label='$M_{H^+}=%d$ GeV' %m,lw=2) m=300 plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'r--',label='$M_{H^+}=%d$ GeV' %m,lw=2) m=400 plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'b-.',label='$M_{H^+}=%d$ GeV' %m,lw=2) m=500 plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'g-',label='$M_{H^+}=%d$ GeV' %m,lw=2) #m=600 #plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'r:') #m=700 #plt.loglog(dfc[dfc.mhp==m].LaL,dfc[dfc.mhp==m].cs,'r-.') plt.legend(loc='best',fontsize=20) #plt.rcParams.update({'font.size': 15}) plt.tick_params(labelsize=15) plt.title('$M_{H^0}=150$ GeV',fontsize=20) plt.xlabel('$\lambda_L$',size=20) plt.ylabel(r'$\sigma(pp\,\to \,H^0 H^0\, j j)$ [pb]',size=20) plt.xlim(1E-2,3) plt.ylim(3E-3,1E-1) plt.savefig('csls.pdf')
Image in a Jupyter notebook
plt.tick_params(labelsize)
plt.legend?
LaL=0.01 plt.semilogy(dfc[dfc.LaL==LaL].mhp,dfc[dfc.LaL==LaL].cs,'k:',label='M') LaL=0.1 plt.semilogy(dfc[dfc.LaL==LaL].mhp,dfc[dfc.LaL==LaL].cs,'r--',label='M') LaL=0.5 plt.semilogy(dfc[dfc.LaL==LaL].mhp,dfc[dfc.LaL==LaL].cs,'b-.',label='M') LaL=1 plt.semilogy(dfc[dfc.LaL==LaL].mhp,dfc[dfc.LaL==LaL].cs,'g:',label='M') LaL=3 plt.semilogy(dfc[dfc.LaL==LaL].mhp,dfc[dfc.LaL==LaL].cs,'k-',label='M') plt.ylim(3E-3,1E-1)
(0.003, 0.1)
Image in a Jupyter notebook
dfc[dfc.mhp==m].LaL
6 0.01 17 0.02 28 0.05 39 0.07 50 0.10 61 0.15 72 0.20 83 0.25 94 0.30 105 0.35 116 0.40 127 0.45 138 0.50 149 0.55 160 0.60 171 1.00 182 3.00 193 5.00 204 7.00 215 10.00 Name: LaL, dtype: float64