Revision: 6262
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6262&view=rev
Author: fer_perez
Date: 2008-10-19 06:58:58 +0000 (Sun, 19 Oct 2008)
Log Message:
-----------
Workbook: complete updates to build.
Final round of fixes and updates for workbook to build correctly.
Added missing files, updated Makefile.
Modified Paths:
--------------
trunk/py4science/workbook/Makefile
trunk/py4science/workbook/update_problems.py
Added Paths:
-----------
trunk/py4science/workbook/bessel.tex
Removed Paths:
-------------
trunk/py4science/workbook/problems_solved
Modified: trunk/py4science/workbook/Makefile
===================================================================
--- trunk/py4science/workbook/Makefile 2008-10-19 04:21:03 UTC (rev 6261)
+++ trunk/py4science/workbook/Makefile 2008-10-19 06:58:58 UTC (rev 6262)
@@ -18,21 +18,25 @@
# convenience shorthand for targets
sol: workbook_solutions.pdf
skel: workbook_skeletons.pdf
-all: soln skel
+all: sol skel
# actual targets
-workbook_solutions.pdf: $(SOLN_SRC)
- ./update_problems.py
- rm -f problems
- ln -sf problems_soln problems
+workbook_solutions.pdf: prob_soln $(SOLN_SRC)
$(PDFTEX) workbook_solutions
$(PDFTEX) workbook_solutions
-workbook_skeletons.pdf: $(SKEL_SRC)
+workbook_skeletons.pdf: prob_skel $(SKEL_SRC)
+ $(PDFTEX) workbook_skeletons
+
+prob_soln:
+ rm -f problems
+ ln -sf problems_soln problems
./update_problems.py
+
+prob_skel:
rm -f problems
ln -sf problems_skel problems
- $(PDFTEX) workbook_skeletons
+ ./update_problems.py
workbook_skeletons.tex:
ln -sf main.tex workbook_skeletons.tex
@@ -56,4 +60,4 @@
$(FASTPDFTEX) $<
# Phony targets
-.PHONY: all clean
+.PHONY: all clean prob_soln prob_skel sol skel
Added: trunk/py4science/workbook/bessel.tex
===================================================================
--- trunk/py4science/workbook/bessel.tex (rev 0)
+++ trunk/py4science/workbook/bessel.tex 2008-10-19 06:58:58 UTC (rev
6262)
@@ -0,0 +1,46 @@
+\section{Bessel functions}
+\label{sec:bessel}
+
+In this exercise, you will verify a few simple relations involving the Bessel
+functions of the first kind. The important relations to keep in mind are the
+asymptotic form of $J_n(x)$ for $x>>n$:
+
+\begin{equation}
+J_n(x) \approx \sqrt(\frac{2}{\pi x})\cos(x-(n\frac{\pi}{2}+\frac{\pi}{4}))
+\end{equation}
+
+%
+and the recursion relation
+
+\begin{equation}
+J_{n+1}(x) = \frac{2n}{x} J_n(x)-J_{n-1}(x)
+\end{equation}
+
+\begin{figure}
+\begin{centering}
+\includegraphics[width=5in]{fig/bessel_functions}
+\par
+\end{centering}
+
+
+\caption{\label{fig:bessel_functions}A few Bessel functions.}
+
+\end{figure}
+
+
+
+\begin{figure}
+\begin{centering}
+\includegraphics[width=5in]{fig/bessel_error}
+\par
+\end{centering}
+
+
+\caption{\label{fig:bessel_error}Numerical error for $J_5$.}
+
+\end{figure}
+
+Once you get the code to run, you should see two figures like
+Figure~\ref{fig:bessel_functions} and Figure~\ref{fig:bessel_error}.
+
+\lstinputlisting[label={code:bessel},caption={IGNORED}]{problems/bessel.py}
Deleted: trunk/py4science/workbook/problems_solved
===================================================================
--- trunk/py4science/workbook/problems_solved 2008-10-19 04:21:03 UTC (rev
6261)
+++ trunk/py4science/workbook/problems_solved 2008-10-19 06:58:58 UTC (rev
6262)
@@ -1 +0,0 @@
-link ../examples
\ No newline at end of file
Modified: trunk/py4science/workbook/update_problems.py
===================================================================
--- trunk/py4science/workbook/update_problems.py 2008-10-19 04:21:03 UTC
(rev 6261)
+++ trunk/py4science/workbook/update_problems.py 2008-10-19 06:58:58 UTC
(rev 6262)
@@ -12,11 +12,11 @@
# Constants
SRC_DIR = '../examples'
UPDATE = './mkskel.py'
+PROBLEMS_DIR = 'problems'
-
if __name__ == '__main__':
- problems = [f for f in os.listdir('problems') if f.endswith('.py')]
+ problems = [f for f in os.listdir(PROBLEMS_DIR) if f.endswith('.py')]
os.chdir(SRC_DIR)
to_update = []
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins