FFT_tools: Catch RuntimeErrors when importing matplotlib
[FFT-tools.git] / README
1 FFT_tools: unitary FFTs and power spectra for real data.
2
3 This package wraps NumPy's fft module to produce unitary transforms
4 and power spectra of real numbers in one dimension.  See the code for
5 the technical details.
6
7 Installation
8 ============
9
10 Packages
11 --------
12
13 Gentoo
14 ~~~~~~
15
16 I've packaged FFT-tools for Gentoo.  You need layman_ and my `wtk
17 overlay`_.  Install with::
18
19     # emerge -av app-portage/layman
20     # layman --add wtk
21     # emerge -av dev-python/FFT-tools
22
23 Dependencies
24 ------------
25
26 If you're installing by hand or packaging pycomedi for another
27 distribution, you'll need the following dependencies:
28
29 =======  ============  ================
30 Package  Debian_       Gentoo_
31 =======  ============  ================
32 NumPy_   python-numpy  dev-python/numpy
33 =======  ============  ================
34
35 Installing by hand
36 ------------------
37
38 FFT-tools is available as a Git_ repository::
39
40     $ git clone git://tremily.us/FFT-tools.git
41
42 See the homepage_ for details.  To install the checkout, run the
43 standard::
44
45     $ python setup.py install
46
47 Building the HTML docs
48 ----------------------
49
50 The module objects are documented in the `NumPy/SciPy documentation
51 style`_.  You should be able to build this documentation with Sphinx_
52 and the numpydoc_ extension.  I haven't been able to get numpydoc
53 working cleanly, but you can still build a decent version of the docs
54 from the ``doc`` subdirectory with::
55
56     $ make SPHINXBUILD=sphinx-build-2.7 dirhtml
57
58 This documentation is available on `Read the Docs`_.
59
60 Usage
61 =====
62
63 See the tests in ``FFT_tools.py`` for simple examples.
64
65 Testing
66 =======
67
68 Run internal unit tests using Nose_::
69
70     $ nosetests --with-doctest --doctest-tests -vv FFT_tools.py
71
72 If you want to plot the test results (useful for debugging), you'll
73 need to install matplotlib_ and set ``TEST_PLOTS`` to ``True`` in
74 ``FFT_tools.py`` before invoking Nose.
75
76 Licence
77 =======
78
79 This project is distributed under the `GNU General Public License
80 Version 3`_ or greater.
81
82
83 .. _layman: http://layman.sourceforge.net/
84 .. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay
85 .. _Debian: http://www.debian.org/
86 .. _Gentoo: http://www.gentoo.org/
87 .. _NumPy: http://numpy.scipy.org/
88 .. _Git: http://git-scm.com/
89 .. _homepage: http://blog.tremily.us/posts/FFT-tools/
90 .. _matplotlib: http://matplotlib.sourceforge.net/
91 .. _NumPy/SciPy documentation style:
92    https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
93 .. _Sphinx: http://sphinx-doc.org/
94 .. _numpydoc: https://github.com/numpy/numpy/tree/master/doc/sphinxext
95 .. _Read the Docs: https://fft-tools.readthedocs.org/en/latest/
96 .. _Nose: http://somethingaboutorange.com/mrl/projects/nose/
97 .. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.txt