<jupyter_start><jupyter_text>Table of Contents1&nbsp;&nbsp;Table of Contents<jupyter_code>%matplotlib inline 
%pylab inline
import numpy as np
import matplotlib.pyplot as plt
import math as m
pi2 = 2*np.pi
frf = pi2*500.0e6
Vrf = 500.0e3

fmod= pi2*1.0e6
Vmod= 400.0e3
t = np.linspace(0, 40e-9, 1000, endpoint=True)
y = Vrf*np.sin(frf*t)
yMod = Vmod*np.sin(fmod*t)
ySum = y+yMod

plt.plot(t,y,"-")
plt.plot(t,yMod, "-")
plt.plot(t,ySum, "-")

plt.show()

fi0 = np.deg2rad(0.0)
fi=0.00
points=[]
dEOszi =[]
h=400
alpha=7.0e-4

for j in range(0,31):
    longDy = [[],[]]
    fi = np.deg2rad(-90.0 + 21*j)
    dE = 0.00000
#    fi = 0.0
#    dE = 0.0 - (0.0001*j)
    for i in range(0,600):
        fi = fi - 2*np.pi*h*alpha * dE
        if (j<13): 
            dE = dE + 1/1.7e9* 1.5e6 * (np.sin(fi) - np.sin(fi0)) 
        if (j>12):
            dE = dE + 1/1.7e9* 32.0e6 * (np.sin(fi) - np.sin(fi0))
#Modulation        
#        dE = dE + 1/1.7e9* 500.0e3 * (1+0.2*np.sin(520e6*fi/500.0e6)) * (np.sin(fi) - np.sin(fi0))
#Damping
#        dE = dE + 1/1.7e9* 500.0e3 * (np.sin(fi) - np.sin(fi0)) - 4*np.pi*1/3.125e6/3e-3*dE       

        longDy[0].append(fi/2/np.pi/500.0e6)
        longDy[1].append(dE)
        if j == 2:
            points.append(i)
            dEOszi.append(fi)
    plt.plot(longDy[0], longDy[1], "-")

plt.xlabel('time / s', fontsize=12)
plt.ylabel('relative energy deviation $\ \delta$', fontsize=12)
plt.tight_layout()
plt.grid()
plt.savefig('LongDym.png', dpi=300)
plt.show()
#    plt.plot(points,dEOszi,"o")
pi2 = 2*np.pi
frf = pi2*500.0e6
f0 =  frf*0.0
Vrf = 500.0e3

h = 160
alpha = 3.3e-2

t = np.linspace(0, 1, 4+1, endpoint=True)

#for i in t:
#    print i

fi=0.01
dE=0.0

for i in range(0,20):
    fi = fi + pi2*h*alpha*dE
    dE = dE + Vrf/1.7e9*(np.sin(fi) - np.sin(f0))
#    print fi, dE
#longDy.append([])
#longDy.append([])
fi0 = np.deg2rad(0.0)
fi=0.00
points=[]

print np.pi

for j in range(0,50):
    longDy = [[],[]]
    fi = np.deg2rad(-180.0 + 15*j)
    dE = 0.0
    for i in range(0,800):
        fi = fi - 0.1e0 * dE
        dE = dE + 1.0e-3 * (np.sin(fi0) - np.sin(fi + fi0))
        afi = fi/np.pi + 1.0
        longDy[0].append(afi)
        longDy[1].append(dE)
        if j == 2:
            points.append(i)
    plt.plot(longDy[0], longDy[1], "-")
#    if j == 2:
#        plt.plot(points,longDy[0],"o")


#plt.show()
#plt.plot(longDy[0], longDy[1], "-")

#    print fi_tmp, dE_tmp
#print longDy


x = [(1,2,3,4), (1,4,9,16)]

print x[0], x[1]
plt.plot(x[0],x[1], "o-")
plt.show()
fi = np.deg2rad(10)
dE = 0.00
phi = 0.0

#print fi, dE
#print np.sin(np.pi/2)
for i in range(0, 9):
    fi = fi -1.0e0 * dE
    dE = dE + 1.0e-3*(np.sin(phi) - np.sin(fi+phi))
    
    np.append(fiA, [fi])
    np.append(dEA, [dE])
    
    print fi, dE

print fiA

plt.plot(fiA,dEA, "o-")
plt.show()
    


a = []
a.append(1)
a.append(2)
a.append("Bla")

print a<jupyter_output>[1, 2, 'Bla']
{'fraction_non_alphanumeric': 0.2135523613963039, 'fraction_numerical': 0.0917180013689254, 'mean_word_length': 2.4187134502923975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '644413', 'license': 'MIT', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1493, 'n_words': 277, 'path': 'notebooks/longDymRFMod.ipynb', 'repo_name': 'tomerten/steibs', 'size': '2922'}