Fixed subdirectory issue.

I changed the structure to put code in ./code, but that didn't work for preface,
whish is not in a subdirectory (parallel to ./code).
This commit is contained in:
Roger Labbe 2014-09-02 20:34:18 -07:00
parent c9696d8fe9
commit 842232d2ab
2 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:7debfded1814383cde2b22e0ae56fb73c58b54d6a35757938b396184ae06e906"
"signature": "sha256:4355fb1fa8ffbca2bd9948d7b105cb0b4b8015fa6e831024faef3fdc3e52a8ad"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -30,9 +30,11 @@
"#format the book\n",
"%matplotlib inline\n",
"from __future__ import division, print_function\n",
"import sys\n",
"sys.path.insert(0,'./code') # allow us to import book_format\n",
"import matplotlib.pyplot as plt\n",
"import book_format\n",
"book_format.load_style()"
"book_format.load_style('./styles/custom2.css')"
],
"language": "python",
"metadata": {},
@ -51,7 +53,7 @@
" background: transparent;\n",
" color: #000000;\n",
" font-weight: 600;\n",
" font-size: 13pt;\n",
" font-size: 11pt;\n",
" font-style: bold;\n",
" font-family: 'Source Code Pro', Consolas, monocco, monospace;\n",
" }\n",
@ -257,7 +259,7 @@
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x7effb6ec4d90>"
"<IPython.core.display.HTML at 0x7f9ee410c2e8>"
]
}
],
@ -306,7 +308,7 @@
"\n",
"This book has supporting libraries for computing statistics, plotting various things related to filters, and for the various filters that we cover. This does require a strong caveat; most of the code is written for didactic purposes. It is rare that I chose the most efficient solution (which often obscures the intent of the code), and in the first parts of the book I did not concern myself with numerical stability. This is important to understand - Kalman filters in aircraft are carefully designed and implemented to be numerically stable; the naive implementation is not stable in many cases. If you are serious about Kalman filters this book will not be the last book you need. My intention is to introduce you to the concepts and mathematics, and to get you to the point where the textbooks are approachable.\n",
"\n",
"Finally, this book is free. The cost for the books required to learn Kalman filtering is somewhat prohibitive even for a Silicon Valley engineer like myself; I cannot believe the are within the reach of someone in a depressed economy, or a financially struggling student. I have gained so much from free software like Python, and free books like those from Allen B. Downey [here](http://www.greenteapress.com/). It's time to repay that. So, the book is free, it is hosted on free servers, and it uses only free and open software such as IPython and mathjax to create the book. "
"Finally, this book is free. The cost for the books required to learn Kalman filtering is somewhat prohibitive even for a Silicon Valley engineer like myself; I cannot believe the are within the reach of someone in a depressed economy, or a financially struggling student. I have gained so much from free software like Python, and free books like those from Allen B. Downey [here](http://www.greenteapress.com/) [1]. It's time to repay that. So, the book is free, it is hosted on free servers, and it uses only free and open software such as IPython and mathjax to create the book. "
]
},
{
@ -332,7 +334,7 @@
"\n",
"If you prefer a PDF, it is available [here](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/Kalman_and_Bayesian_Filters_in_Python.pdf). I have to generate this PDF manually from the IPython Notebook, and I do not do that for every check in. During the book's development this PDF will often be somewhat out of date. I recommend the nbviewer version above if you can be online while reading.\n",
"\n",
"Finally, you may generate output in a variety of formats. I will not cover how to do that, other than to point you to [IPython nbconvert](http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html)[2]. You can convert this book into static HTML pages, latex, or PDF. While I don't recommend it particularly, it is useful for those that don't want to program and/or are working offline."
"Finally, you may generate output in a variety of formats. I will not cover how to do that, other than to point you to [IPython nbconvert](http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html) [2]. You can convert this book into static HTML pages, latex, or PDF. While I don't recommend it particularly, it is useful for those that don't want to program and/or are working offline."
]
},
{
@ -356,7 +358,7 @@
"You will need a recent version of NumPy, SciPy, and Matplotlib installed. I don't really know what the minimal might be. \n",
"I have numpy 1.71, SciPy 0.13.0, and Matplotlib 1.3.1 installed on my machines.\n",
"\n",
"Personally, I use the Anaconda Python distribution in all of my work, [available here](https://store.continuum.io/cshop/anaconda/)[3]. I am not selecting them out of favoritism, I am merely documenting my environment. Should you have trouble running any of the code, perhaps knowing this will help you."
"Personally, I use the Anaconda Python distribution in all of my work, [available here](https://store.continuum.io/cshop/anaconda/) [3]. I am not selecting them out of favoritism, I am merely documenting my environment. Should you have trouble running any of the code, perhaps knowing this will help you."
]
},
{

View File

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