#%%Bibliothequesimport numpy as npfrom scipy import statsimport matplotlib.pyplot as pltplt.rcParams[’font.size’]=20plt.rcParams[’lines.markersize’]=10#%%Grandeursepsilon=900#L/mol/cml=1#cmK=1/(epsilon∗l)∗1000#mmol/L:C=A∗K#%%Donneesl_i,l_f=50,110#nbrdelignesskipletempsdemettrelacuve\puisnbrdelignesgardeestabx=(np.arange(l_f∗4)∗3+50)/60#abscisse:1pt/3secondestabx=tabx[5:−5]#Onraccourcitcarladeriveediminuelenbrdepts.data=np.loadtxt("Nom_fichier.txt",delimiter="␣␣␣",usecols=(1,2,3,4),\skiprows=l_i,max_rows=l_f)data=np.reshape(data,(4∗l_f,))∗K#donneessur1seulelignekernel_size=10kernel=np.ones(kernel_size)/kernel_sizedata=np.convolve(data,kernel,mode=’same’)[5:−5]#lissageC=np.amax(data)−data#conversionabsorbanceto[H2O2]V=−(C[1:]−C[:−1])/(3)#derivation#%%Ajustementavecnumpya,b=np.polyfit(C[:−1],V,1)#fitlineairedev=f(c)#%%Ajustementavecscipya,b,r_value,p_value,std_err=stats.linregress(C[:−1],V)print("Coefficient␣de␣correlation␣r^2=",r_value∗∗2)print("valeur−p␣p=",p_value)print("Ecart−type␣sigma=",std_err)#%%Courbesplt.figure()#c=f(t)plt.plot(tabx[:−1],C[:−1]∗10∗∗3,"b+",label="$[I^−]_0=1.0\,10^{−1}$␣mol/L")12LC08:Cin tiqueetcatalyseLouisUsalaetJulieLimonetplt.plot(tabx,122∗np.ones_like(tabx),"k")plt.xlim(0,np.amax(tabx))plt.ylim(0,10∗∗3∗np.amax(data)/1.5)plt.xlabel("temps␣(min)")plt.ylabel("concentration␣(mmol/L)")plt.title("$[H_2O_2]=f(t)$")plt.legend()plt.show()plt.figure()#v=f(t)plt.plot(tabx[:−1],V∗10∗∗6,"b",marker="+",linestyle="",\label="$[I^−]_0=1.0\,10^{−1}$␣mol/L")plt.xlabel("temps␣(min)")plt.ylabel("vitesse␣($\\mu$mol/L/s)")plt.title("$\\frac{d[H_2O_2]}{dt}=f(t)$")plt.legend()plt.show()plt.figure()#v=f(c)plt.plot(C[:−1]∗10∗∗3,V∗10∗∗6,"b",marker="+",linestyle="",\label="$[I^−]_0=1.0\,10^{−1}$␣mol/L")plt.plot(C[:−1]∗10∗∗3,(a∗C[:−1]+b)∗10∗∗6,"b")plt.xlabel("$[H_2O_2]$␣(mmol/L)")plt.ylabel("$\\frac{d[H_2O_2]}{dt}$␣($\\mu$mol/L)")plt.title("$\\frac{d[H_2O_2]}{dt}=[H_2O_2]$")plt.legend()plt.show()