In [1]:
import imp
import modular_theory as mt
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')

%matplotlib inline

In [5]:
imp.reload(mt)


Out[5]:
<module 'modular_theory' from '/Users/davidfreestone/Google Drive/Lab/users/David/projects/modular_theory/code/simulation/modular_theory.py'>

In [6]:
procedure = "S1 60T O.1 s1"
simulation = mt.Simulation(procedure)

In [7]:
simulation.run()

In [8]:
np.set_printoptions(formatter={'float': '{: 0.3f}'.format})
simulation.array_notation[:,:,0]


Out[8]:
array([[ 83.000,  1.000],
       [ 84.000,  60.000],
       [ 79.000,  1.000],
       [ 84.000,  0.010],
       [ 111.000,  1.000],
       [ 115.000,  1.000]])

In [9]:
from numpy import linspace
time = linspace(0, 2*7200, 2*int(7200 / 0.01))

plt.plot(time, simulation.reference_memory)
plt.xlim((0, 70))


Out[9]:
(0, 70)

In [10]:
plt.plot(time, simulation.strength_memory)
plt.xlim((0, 70))


Out[10]:
(0, 70)

In [11]:
plt.plot(time, simulation.packet_initiation_rate)
plt.xlim((0, 70))


Out[11]:
(0, 70)

In [12]:
simulation.data


Out[12]:
time event id
0 0.01 S 1.00
1 28.97 R 1.00
2 30.69 R 1.00
3 32.50 R 1.00
4 33.38 R 1.00
5 34.12 R 1.00
6 34.13 R 1.00
7 34.14 R 1.00
8 49.49 R 1.00
9 50.32 R 1.00
10 50.71 R 1.00
11 50.89 R 1.00
12 52.74 R 1.00
13 52.98 R 1.00
14 53.26 R 1.00
15 53.27 R 1.00
16 60.02 T 60.00
17 60.02 O 1.00
18 60.03 T 0.01
19 60.03 o 1.00
20 60.03 s 1.00
21 60.03 S 1.00
22 61.38 R 1.00
23 62.12 R 1.00
24 62.42 R 1.00
25 62.43 R 1.00
26 65.64 R 1.00
27 66.55 R 1.00
28 67.33 R 1.00
29 68.05 R 1.00
... ... ... ...
15251 7197.54 R 1.00
15252 7197.55 R 1.00
15253 7197.56 R 1.00
15254 7197.57 R 1.00
15255 7197.58 R 1.00
15256 7197.59 R 1.00
15257 7197.60 R 1.00
15258 7197.61 R 1.00
15259 7197.62 R 1.00
15260 7197.63 R 1.00
15261 7197.64 R 1.00
15262 7197.65 R 1.00
15263 7197.66 R 1.00
15264 7197.67 R 1.00
15265 7197.68 R 1.00
15266 7197.92 R 1.00
15267 7197.93 R 1.00
15268 7197.94 R 1.00
15269 7197.95 R 1.00
15270 7197.96 R 1.00
15271 7197.97 R 1.00
15272 7197.98 R 1.00
15273 7197.99 R 1.00
15274 7198.00 R 1.00
15275 7198.01 R 1.00
15276 7198.02 R 1.00
15277 7198.03 R 1.00
15278 7198.04 R 1.00
15279 7198.05 R 1.00
15280 7198.06 R 1.00

15281 rows × 3 columns


In [ ]:


In [ ]: