-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot3.py
43 lines (32 loc) · 857 Bytes
/
plot3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#-*- coding: utf-8 -*-
import pylab
import numpy as np
import math
from numpy import arctan
pylab.rc('text', usetex=True)
pylab.rc('font', family='serif')
omega=np.logspace(0, 7, num=400)
C=5e-8
R=26600
O=omega*R*C
phi=abs(arctan((1-6*O**2)/(O*(5-O**2))))
fi = np.loadtxt('data/chem6.tsv', skiprows=1, delimiter='\t', usecols=(0, 6))
# print(fi)
# Результаты эксперимента
om=fi.T[0]*2*np.pi
fi=fi.T[1]
pylab.semilogx(omega, phi, "r-")
pylab.semilogx(om, fi, "bo", markersize=5)
pylab.xlabel(r"$\omega$, Hz")
pylab.ylabel(r"$\phi$, rad")
pylab.grid(True)
pylab.show()
# O2=omega2*R*C
# w=nu*(2*np.pi)
# omega2=np.logspace(3.6, 7, num=100)
# phi = np.arctan(w*R2*R2*C/(R1+R2+R1*(w*R2*C)**2))
# data=np.hstack([w,phi])
# np.savetxt('phi', phi)
# np.savetxt('w', w)
# phi2=np.arcsin(fi.T[1])
# pylab.semilogx(omega2, phi2, "b-")