|
|
|
@ -25,18 +25,19 @@ from pylab import *
|
|
|
|
|
#
|
|
|
|
|
# the harmonics included below in the python code were provided directly to WRL from BOM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
harm = {}
|
|
|
|
|
speed = 0
|
|
|
|
|
amp = 1
|
|
|
|
|
lag = 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def readlinenocomm(F):
|
|
|
|
|
l = F.readline()
|
|
|
|
|
while l[0] == '#':
|
|
|
|
|
l = F.readline()
|
|
|
|
|
return l
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
H = open("HARMONIC", "r")
|
|
|
|
|
l = readlinenocomm(H)
|
|
|
|
@ -246,7 +247,9 @@ while (t<end_time):
|
|
|
|
|
else:
|
|
|
|
|
nf = 1.0
|
|
|
|
|
ea = 0.0
|
|
|
|
|
z=z+nf*harm[constit][amp]*math.cos((harm[constit][speed]*t1 + ea - harm[constit][lag]) * (2*3.1415927 / 360.0))
|
|
|
|
|
z = z + nf * harm[constit][amp] * math.cos(
|
|
|
|
|
(harm[constit][speed] * t1 + ea - harm[constit][lag]) *
|
|
|
|
|
(2 * 3.1415927 / 360.0))
|
|
|
|
|
|
|
|
|
|
# print t,z
|
|
|
|
|
F.write("%s,%s\n" % (t, z))
|
|
|
|
|