Organizing book into directories

This commit is contained in:
Roger Labbe 2014-09-01 20:03:10 -07:00
commit bda9810ea1
46 changed files with 9049 additions and 9311 deletions

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:aaedbb5dd7c16f3a7777036a6bb62b1f9c7641915224d83029f51ffbefc1d48e"
"signature": "sha256:3bb351943b52e55a96cd9d97199451f321cc663d0d6c7ad251edb04a4df0fbbf"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -24,6 +24,8 @@
"%matplotlib inline\n",
"from __future__ import division, print_function\n",
"import matplotlib.pyplot as plt\n",
"import sys\n",
"sys.path.insert(0,'../') # allow us to format the book\n",
"import book_format\n",
"book_format.load_style()"
],
@ -250,15 +252,14 @@
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x7f5a64035860>"
"<IPython.core.display.HTML at 0x7f5e0d759a20>"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"cell_type": "markdown",
"metadata": {},
"source": [
"This book is written in IPython Notebook, a browser based interactive Python environment that mixes Python, text, and math. I choose it because of the interactive features - I found Kalman filtering nearly impossible to learn until I started working in an interactive environment. It is difficult to form an intuition of the effect of many of the parameters that you can tune until you can change them rapidly and immediately see the output. An interactive environment also allows you to play 'what if' scenarios out. \"What if I set $\\mathbf{Q}$ to zero?\" It is trivial to find out with Ipython Notebook.\n",

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:fc7a76981c0f56cd0ecc2e002ce26fdf15803c9b00c697fc5550b071291626ff"
"signature": "sha256:34de03d319fbef2790012c38db97348abe5e8f429c2d05cedae3dcdec75dbd5d"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -16,6 +16,8 @@
"%matplotlib inline\n",
"from __future__ import division, print_function\n",
"import matplotlib.pyplot as plt\n",
"import sys\n",
"sys.path.insert(0,'../') # allow us to format the book\n",
"import book_format\n",
"book_format.load_style()"
],
@ -240,13 +242,13 @@
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x7fe174bfb350>"
"<IPython.core.display.HTML at 0x7fa10405ba20>"
]
}
],
"prompt_number": 3
"prompt_number": 1
},
{
"cell_type": "heading",
@ -398,9 +400,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$\\mathbf{\\phi}\\phi$"
]
"source": []
}
],
"metadata": {}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:df77e6367b272d34fe0d1178b053a99c258abca7195ecda99ac5a7e8e192c698"
"signature": "sha256:60b7dd24deaf8929b5cdf8bc775a6bcfea306255a2fe7ef7e7773a6019198647"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -24,6 +24,8 @@
"%matplotlib inline\n",
"from __future__ import division, print_function\n",
"import matplotlib.pyplot as plt\n",
"import sys\n",
"sys.path.insert(0,'../') # allow us to import book_format\n",
"import book_format\n",
"book_format.load_style()"
],
@ -250,7 +252,7 @@
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x7fc878ec3d50>"
"<IPython.core.display.HTML at 0x7f62500339e8>"
]
}
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,257 +0,0 @@
{
"metadata": {
"name": "",
"signature": "sha256:f0360fc9458bd40069073ce91309aab5fcae24de06b9e4ddd9a1b31f7c2e3b96"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Signals and Noise"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#format the book\n",
"%matplotlib inline\n",
"from __future__ import division, print_function\n",
"import matplotlib.pyplot as plt\n",
"import book_format\n",
"book_format.load_style()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<style>\n",
" div.cell{\n",
" width: 850px;\n",
" margin-left: 0% !important;\n",
" margin-right: auto;\n",
" }\n",
" div.text_cell code {\n",
" background: #F6F6F9;\n",
" color: #0000FF;\n",
" }\n",
" h1 {\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
"\t}\n",
"\t\n",
" div.input_area {\n",
" background: #F6F6F9;\n",
" border: 1px solid #586e75;\n",
" }\n",
"\n",
" .text_cell_render h1 {\n",
" font-weight: 200;\n",
" font-size: 30pt;\n",
" line-height: 100%;\n",
" color:#c76c0c;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 1em;\n",
" display: block;\n",
" white-space: wrap;\n",
" } \n",
" h2 {\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" }\n",
" .text_cell_render h2 {\n",
" font-weight: 200;\n",
" font-size: 20pt;\n",
" font-style: italic;\n",
" line-height: 100%;\n",
" color:#c76c0c;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 1.5em;\n",
" display: block;\n",
" white-space: nowrap;\n",
" } \n",
" h3 {\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" }\n",
" .text_cell_render h3 {\n",
" font-weight: 300;\n",
" font-size: 18pt;\n",
" line-height: 100%;\n",
" color:#d77c0c;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 2em;\n",
" display: block;\n",
" white-space: nowrap;\n",
" }\n",
" h4 {\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" }\n",
" .text_cell_render h4 {\n",
" font-weight: 300;\n",
" font-size: 16pt;\n",
" color:#d77c0c;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 0.5em;\n",
" display: block;\n",
" white-space: nowrap;\n",
" }\n",
" h5 {\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" }\n",
" .text_cell_render h5 {\n",
" font-weight: 300;\n",
" font-style: normal;\n",
" color: #1d3b84;\n",
" font-size: 16pt;\n",
" margin-bottom: 0em;\n",
" margin-top: 1.5em;\n",
" display: block;\n",
" white-space: nowrap;\n",
" }\n",
" div.text_cell_render{\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" line-height: 135%;\n",
" font-size: 110%;\n",
" width:750px;\n",
" margin-left:auto;\n",
" margin-right:auto;\n",
" text-align:justify;\n",
" text-justify:inter-word;\n",
" }\n",
" div.output_subarea.output_text.output_pyout {\n",
" overflow-x: auto;\n",
" overflow-y: scroll;\n",
" max-height: 300px;\n",
" }\n",
" div.output_subarea.output_stream.output_stdout.output_text {\n",
" overflow-x: auto;\n",
" overflow-y: scroll;\n",
" max-height: 300px;\n",
" }\n",
" code{\n",
" font-size: 70%;\n",
" }\n",
" .rendered_html code{\n",
" background-color: transparent;\n",
" }\n",
" ul{\n",
" margin: 2em;\n",
" }\n",
" ul li{\n",
" padding-left: 0.5em; \n",
" margin-bottom: 0.5em; \n",
" margin-top: 0.5em; \n",
" }\n",
" ul li li{\n",
" padding-left: 0.2em; \n",
" margin-bottom: 0.2em; \n",
" margin-top: 0.2em; \n",
" }\n",
" ol{\n",
" margin: 2em;\n",
" }\n",
" ol li{\n",
" padding-left: 0.5em; \n",
" margin-bottom: 0.5em; \n",
" margin-top: 0.5em; \n",
" }\n",
" ul li{\n",
" padding-left: 0.5em; \n",
" margin-bottom: 0.5em; \n",
" margin-top: 0.2em; \n",
" }\n",
" a:link{\n",
" font-weight: bold;\n",
" color:#447adb;\n",
" }\n",
" a:visited{\n",
" font-weight: bold;\n",
" color: #1d3b84;\n",
" }\n",
" a:hover{\n",
" font-weight: bold;\n",
" color: #1d3b84;\n",
" }\n",
" a:focus{\n",
" font-weight: bold;\n",
" color:#447adb;\n",
" }\n",
" a:active{\n",
" font-weight: bold;\n",
" color:#447adb;\n",
" }\n",
" .rendered_html :link {\n",
" text-decoration: underline; \n",
" }\n",
" .rendered_html :hover {\n",
" text-decoration: none; \n",
" }\n",
" .rendered_html :visited {\n",
" text-decoration: none;\n",
" }\n",
" .rendered_html :focus {\n",
" text-decoration: none;\n",
" }\n",
" .rendered_html :active {\n",
" text-decoration: none;\n",
" }\n",
" .warning{\n",
" color: rgb( 240, 20, 20 )\n",
" } \n",
" hr {\n",
" color: #f3f3f3;\n",
" background-color: #f3f3f3;\n",
" height: 1px;\n",
" }\n",
" blockquote{\n",
" display:block;\n",
" background: #fcfcfc;\n",
" border-left: 5px solid #c76c0c;\n",
" font-family: 'Open sans',verdana,arial,sans-serif;\n",
" width:680px;\n",
" padding: 10px 10px 10px 10px;\n",
" text-align:justify;\n",
" text-justify:inter-word;\n",
" }\n",
" blockquote p {\n",
" margin-bottom: 0;\n",
" line-height: 125%;\n",
" font-size: 100%;\n",
" }\n",
"</style>\n",
"<script>\n",
" MathJax.Hub.Config({\n",
" TeX: {\n",
" extensions: [\"AMSmath.js\"]\n",
" },\n",
" tex2jax: {\n",
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
" },\n",
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
" \"HTML-CSS\": {\n",
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
" }\n",
" });\n",
"</script>\n"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x2c2dbd0>"
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}

View File

@ -3,7 +3,7 @@ from IPython.core.display import HTML
import matplotlib.pylab as pylab
def load_style():
styles = open("./styles/custom2.css", "r").read()
styles = open("../styles/custom2.css", "r").read()
return HTML(styles)
pylab.rcParams['lines.linewidth'] = 2

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

29
gh.py
View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
"""
Created on Tue May 13 13:10:50 2014
@author: RL
"""
# position, velocity (fps)
pos = 20000
vel = 200
t = 10
z = 22060
def predict_dz (vel,t):
return vel*t
dz = z - pos
print dz - predict_dz(vel,t)
h = 0.1
vel = vel + h * (dz - predict_dz(vel,t)) / t
print 'new vel =', vel

View File

@ -33,19 +33,19 @@ if __name__ == '__main__':
#merge_notebooks(sys.argv[1:])
merge_notebooks(
['Preface.ipynb',
'g-h_filter.ipynb',
'discrete_bayes.ipynb',
'Least_Squares_Filters.ipynb',
'Gaussians.ipynb',
'Kalman_Filters.ipynb',
'Multivariate_Kalman_Filters.ipynb',
'Kalman_Filter_Math.ipynb',
'Designing_Kalman_Filters.ipynb',
'Extended_Kalman_Filters.ipynb',
'Unscented_Kalman_Filter.ipynb',
'Designing_Nonlinear_Kalman_Filters.ipynb',
'Appendix_Installation.ipynb',
'Appendix_Symbols_and_Notations.ipynb'])
'Chapter01_gh_filter/g-h_filter.ipynb',
'Chapter02_Discrete_Bayes/discrete_bayes.ipynb',
'Chapter03_Least_Squares/Least_Squares_Filters.ipynb',
'Chapter04_Gaussians/Gaussians.ipynb',
'Chapter05_Kalman_Filters/Kalman_Filters.ipynb',
'Chapter06_Multivariate_Kalman_Filter/Multivariate_Kalman_Filters.ipynb',
'Chapter07_Kalman_Filter_Math/Kalman_Filter_Math.ipynb',
'Chapter08_Designing_Kalman_Filters/Designing_Kalman_Filters.ipynb',
'Chapter09_Extended_Kalman_Filters/Extended_Kalman_Filters.ipynb',
'Chapter10_Unscented_Kalman_Filters/Unscented_Kalman_Filter.ipynb',
'Chapter11_Designing_Nonlinear_Kalman_Filters/Designing_Nonlinear_Kalman_Filters.ipynb',
'Appendix_A_Installation/Appendix_Installation.ipynb',
'Appendix_B_Symbols_and_Notations/Appendix_Symbols_and_Notations.ipynb'])
# merge_notebooks(['Preface.ipynb', g-h_filter.ipynb discrete_bayes.ipynb Gaussians.ipynb Kalman_Filters.ipynb Multivariate_Kalman_Filters.ipynb Kalman_Filter_Math.ipynb Designing_Kalman_Filters.ipynb Extended_Kalman_Filters.ipynb Unscented_Kalman_Filter.ipynb'])

View File

@ -1 +0,0 @@
print 'hi'

View File