In [1]:
%pylab inline
import px4tools


Populating the interactive namespace from numpy and matplotlib
attempting to monkey patch pandas timedelta series plotting
monkey patch suceeded
No module named 'control'

WARNING: logsysid module requires python-control

please install:
    pip install control


In [2]:
from px4tools.version import full_version
full_version


Out[2]:
'0.7.9'

In [3]:
d = px4tools.read_ulog('/home/jgoppert/.ros/rootfs/fs/microsd/log/2017-01-23/00_31_50.ulg')
innov = d['ekf2_innovations_0']

In [4]:
innov.t_ekf2_innovations_0__f_flow_innov_0_.plot()
innov.t_ekf2_innovations_0__f_flow_innov_1_.plot()
plt.grid()
plt.legend(loc='best')


Out[4]:
<matplotlib.legend.Legend at 0x7f8825930f60>

In [5]:
ind = innov.t_ekf2_innovations_0__f_flow_innov_1_.index
ind.freq = '1 day'
ind = innov.t_ekf2_innovations_0__f_flow_innov_1_.plot()



In [6]:
d = px4tools.pandas.TimedeltaIndex(start=0, freq='s', unit='s', periods=10)
px4tools.pandas.DataFrame(np.random.randn(len(d)), index=d).plot()


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f8825b939b0>

In [7]:
innov['12 s': '20 s'].t_ekf2_innovations_0__f_flow_innov_var_0_.plot()
innov['12 s': '20 s'].t_ekf2_innovations_0__f_flow_innov_var_1_.plot()
gca().set_ylim(0, 0.003)
plt.title('Flow Variance')


Out[7]:
<matplotlib.text.Text at 0x7f88253a8470>

In [8]:
innov.t_ekf2_innovations_0__f_flow_innov_var_1_.plot()


Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f882535dcf8>