In [2]:
%matplotlib inline

In [3]:
import optoanalysis.sde_solver as sde_solver

In [4]:
import numpy as np
import matplotlib.pyplot as plt

In [5]:
Gamma0 = 4000 # radians/second
Omega0 = 75e3*2*np.pi # radians/second
eta = 0.0
T_0 = 300 # K
m = 3.1e-19 # KG

In [6]:
sim1 = sde_solver.sde_solver(Omega0, Gamma0, m, seed=88, TimeTuple=[0, 100e-6])

In [7]:
sim1.solve()


Out[7]:
(array([  0.00000000e+00,   0.00000000e+00,   1.10504579e-15, ...,
         -1.41920108e-07,  -1.41918103e-07,  -1.41916104e-07]),
 array([  0.00000000e+00,   1.10504579e-05,   2.39103287e-04, ...,
          2.00444305e-02,   1.99901344e-02,   1.99417924e-02]))

In [8]:
%timeit sim1.solve();


100 loops, best of 3: 8.09 ms per loop

In [9]:
plt.plot(sim1.tArray*1e6, sim1.q)
plt.xlabel("t (us)")
plt.ylabel("q")


Out[9]:
<matplotlib.text.Text at 0x7f7622f1c1d0>

In [10]:
plt.plot(sim1.tArray*1e6, sim1.v)
plt.xlabel("t (us)")
plt.ylabel("v")


Out[10]:
<matplotlib.text.Text at 0x7f7622e47898>

In [ ]: