In [1]:
%matplotlib inline
In [72]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
In [74]:
sns.set(style='whitegrid')
In [55]:
df = pd.read_csv('Firing/2015-11-20_18-13-34', index_col='time', names= ['time', 'neuron', 'one'])
In [67]:
missEnergy = pd.read_csv('MissEnergy/2015-11-20_18-13-34', index_col='time', names= ['time', 'neuron', 'energy'])
In [68]:
missEnergy.head(10)
Out[68]:
In [56]:
df.index = pd.to_datetime(df.index, unit='ms')
In [69]:
missEnergy.index = pd.to_datetime(missEnergy.index, unit='ms')
In [79]:
df.one.resample('10ms', how='sum').plot()
Out[79]:
In [80]:
df.one.resample('1ms', how='sum').plot()
Out[80]:
In [81]:
(df.one.resample('10ms', how='sum').apply(np.log10) - df.one.resample('10ms', how='sum').shift(1).apply(np.log10)).plot()
Out[81]:
In [78]:
ax = missEnergy.energy.resample('10ms', how='sum').plot(color='g', label='missing energy')
df.one.resample('10ms', how='sum').plot(ax=ax.twinx(), label='firing')
plt.legend()
Out[78]:
In [ ]: