FFT-tools.git
6 years agoFFT_tools: Catch RuntimeErrors when importing matplotlib master
W. Trevor King [Tue, 15 Jan 2013 16:08:56 +0000 (11:08 -0500)]
FFT_tools: Catch RuntimeErrors when importing matplotlib

For example, if your default backend is GTKAgg, but you don't have
$DISPLAY set, you can get:

  RuntimeError: could not create GdkCursor object

6 years agodoc:source:conf.py: move module mockups before FFT_tools import
W. Trevor King [Mon, 19 Nov 2012 10:27:41 +0000 (05:27 -0500)]
doc:source:conf.py: move module mockups before FFT_tools import

Otherwise there's not much point ;).

6 years agoREADME: link to HTML documentation on Read the Docs
W. Trevor King [Mon, 19 Nov 2012 10:07:56 +0000 (05:07 -0500)]
README: link to HTML documentation on Read the Docs

6 years agodoc:source:conf.py: import FFT-tools version number (vs. hardcoding it)
W. Trevor King [Mon, 19 Nov 2012 10:05:46 +0000 (05:05 -0500)]
doc:source:conf.py: import FFT-tools version number (vs. hardcoding it)

6 years agodoc:source:conf.py: mock numpy module for read-the-docs
W. Trevor King [Mon, 19 Nov 2012 10:01:22 +0000 (05:01 -0500)]
doc:source:conf.py: mock numpy module for read-the-docs

They don't have NumPy installed on their build server.

6 years agodoc:source:conf.py: add base directory to system path for FFT_tools import
W. Trevor King [Mon, 19 Nov 2012 09:35:34 +0000 (04:35 -0500)]
doc:source:conf.py: add base directory to system path for FFT_tools import

6 years agoBump to version 0.5. 0.5
W. Trevor King [Mon, 19 Nov 2012 09:06:03 +0000 (04:06 -0500)]
Bump to version 0.5.

Major changes since v0.4:

* TestCase-based testing (works with Nose)
* Better docstrings and Sphinx framework for building HTML docs

6 years agoREADME: document nosetests invocation
W. Trevor King [Mon, 19 Nov 2012 09:04:47 +0000 (04:04 -0500)]
README: document nosetests invocation

6 years agoREADME: document Sphinx build invocation
W. Trevor King [Mon, 19 Nov 2012 09:02:17 +0000 (04:02 -0500)]
README: document Sphinx build invocation

6 years agodoc: add Sphinx framework for building docs
W. Trevor King [Mon, 19 Nov 2012 08:47:45 +0000 (03:47 -0500)]
doc: add Sphinx framework for building docs

I can't get numpydoc working.  Enabling the module raises lots of
warnings:

  $ PYTHONPATH=.. make SPHINXBUILD=sphinx-build-2.7 dirhtml
  ...
  Traceback (most recent call last):tools
    File "/usr/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
      __import__(self.modname)
  ImportError: No module named TestRFFT
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
      __import__(self.modname)
  ImportError: No module named TestUnitaryRFFT

  /.../FFT-tools/doc/source/mod/FFT_tools.rst:64: WARNING: autodoc can't import/find exception 'FFT_tools.TestRFFT.failureException', it reported error: "No module named TestRFFT", please check your spelling and sys.path
  /.../FFT-tools/doc/source/mod/FFT_tools.rst:64: WARNING: failed to import object FFT_tools.TestRFFT.failureException
  /.../FFT-tools/doc/source/mod/FFT_tools.rst:64: WARNING: toctree references unknown document u'mod/FFT_tools.TestRFFT.addCleanup'
  ...
  None:None: WARNING: toctree contains reference to nonexisting document 'mod/FFT_tools.TestRFFT.addCleanup'
  ...
  <autosummary>:None: WARNING: toctree contains reference to nonexisting document 'mod/FFT_tools.TestRFFT.addCleanup'
  ...

6 years agoFFT_tools: update docstrings for Sphinx 1.3
W. Trevor King [Mon, 19 Nov 2012 08:47:05 +0000 (03:47 -0500)]
FFT_tools: update docstrings for Sphinx 1.3

6 years ago.gitignore: add setup.py build products MANIFEST and dist
W. Trevor King [Mon, 19 Nov 2012 06:47:54 +0000 (01:47 -0500)]
.gitignore: add setup.py build products MANIFEST and dist

6 years agoFFT_tools: try to import pyplot up front
W. Trevor King [Mon, 19 Nov 2012 06:46:34 +0000 (01:46 -0500)]
FFT_tools: try to import pyplot up front

But if the import fails, don't raise the exception unless we actually
try to use pyplot.

6 years agoFFT_tools: add docstring to TestRFFT.test_rfft
W. Trevor King [Mon, 19 Nov 2012 06:43:02 +0000 (01:43 -0500)]
FFT_tools: add docstring to TestRFFT.test_rfft

6 years agoFFT_tools: add LOG and rework tests to use self.assert...().
W. Trevor King [Mon, 19 Nov 2012 06:38:46 +0000 (01:38 -0500)]
FFT_tools: add LOG and rework tests to use self.assert...().

Now you don't need to compare expected-vs-actual by hand.  The
troublesome

  self.run_sin(sin_freq=1, samp_freq=1024, samples=2048)

case is handled by explicitly making a very fuzzy comparison.

This gets rid of all the print() statements.

6 years agoFFT_tools: remove redundant class names from TestCase methods
W. Trevor King [Mon, 19 Nov 2012 06:21:36 +0000 (01:21 -0500)]
FFT_tools: remove redundant class names from TestCase methods

6 years agoMerge changes from hooke.util.fft
W. Trevor King [Mon, 19 Nov 2012 06:13:55 +0000 (01:13 -0500)]
Merge changes from hooke.util.fft

I'd bundled FFT_tools into Hooke back in 2010, when I was optimistic
about getting my Hooke branch accepted upstream.  Now that that seems
less likely, I'm went to tear the module back out of Hooke, and I
noticed some useful restructuring.  Here it is, merged back into the
FFT-tools.

Changes:

* Fancy Sphinx/numpydoc-style docstrings
* unittest-based test suite.

Conflicts:
  FFT_tools.py

The bulk of the conflics were due to parallel style cleanups, and had
trivial fixes.  I also copied the test code relatively unchanged from
the FFT-tools branch into the Hooke unittest framework.  Here is the
mapping:

Old FFT-tools function                       New unittest method
-------------------------------------------  ---------------------------------------------------------------
_test_rfft                                   TestRFFT.run_rfft
_test_rfft_suite                             TestRFFT.test_rfft
_test_unitary_rfft_parsevals                 TestUnitaryRFFT.run_unitary_rfft_parsevals
_test_unitary_rfft_parsevals_suite           TestUnitaryRFFT.test_unitary_rfft_parsevals
_rect                                        TestUnitaryRFFT.rect
_test_unitary_rfft_rect                      TestUnitaryRFFT.run_unitary_rfft_rect
_test_unitary_rfft_rect_suite                TestUnitaryRFFT.test_unitary_rfft_rect
_gaussian                                    TestUnitaryRFFT.gaussian
_test_unitary_rfft_gaussian                  TestUnitaryRFFT.run_unitary_rfft_gaussian
_test_unitary_power_spectrum_sin             TestUnitaryPowerSpectrum.run_unitary_power_spectrum_sin
_test_unitary_power_spectrum_sin_suite       TestUnitaryPowerSpectrum.test_unitary_power_spectrum_sin
_test_unitary_power_spectrum_delta           TestUnitaryPowerSpectrum.run_unitary_power_spectrum_delta
_test_unitary_power_spectrum_delta_suite     TestUnitaryPowerSpectrum.test_unitary_power_spectrum_delta
_gaussian2                                   TestUnitaryPowerSpectrum.gaussian
_test_unitary_power_spectrum_gaussian        TestUnitaryPowerSpectrum.run_unitary_power_spectrum_gaussian
_test_unitary_power_spectrum_gaussian_suite  TestUnitaryPowerSpectrum.test_unitary_power_spectrum_gaussian
_test_unitary_avg_power_spectrum_sin         TestUnitaryAvgPowerSpectrum.run_unitary_avg_power_spectrum_sin
_test_unitary_avg_power_spectrum_sin_suite   TestUnitaryAvgPowerSpectrum.test_unitary_avg_power_spectrum_sin

6 years agoCreate extra block holding PowerSpectrumCommand output data
W. Trevor King [Sat, 7 Aug 2010 22:11:37 +0000 (18:11 -0400)]
Create extra block holding PowerSpectrumCommand output data

6 years agoAdd Numpy crossreferences to hooke.util.fft
W. Trevor King [Tue, 18 May 2010 14:44:29 +0000 (10:44 -0400)]
Add Numpy crossreferences to hooke.util.fft

6 years agoConverted hooke.util.fft to Hooke coding style.
W. Trevor King [Mon, 17 May 2010 22:38:33 +0000 (18:38 -0400)]
Converted hooke.util.fft to Hooke coding style.

* Add numpydoc docstrings (to most functions)
* Converted hackish test suites to hackish `unittest.TestCase`s.
  Still ugly, but now `nosetests` finds them.
  They should really use .assertAlmostEqual and company...
* Added neccessary function definitions to doc/conf.py for the
  'math' sections of fft's docstrings.

6 years agoREADME: use double backticks for filename markup (ReST)
W. Trevor King [Sun, 18 Nov 2012 23:13:28 +0000 (18:13 -0500)]
README: use double backticks for filename markup (ReST)

6 years agoBump to version 0.4 0.4
W. Trevor King [Sun, 18 Nov 2012 23:07:17 +0000 (18:07 -0500)]
Bump to version 0.4

Major changes since v0.3:

* Explicit floor division (PEP238)
* Python 3 compatible string formatting
* Cleaner module namespace
* Better PEP8 compliance

6 years agoFFT_tools: add docstrings to separate function args and body
W. Trevor King [Sun, 18 Nov 2012 22:56:35 +0000 (17:56 -0500)]
FFT_tools: add docstrings to separate function args and body

6 years agoFFT_tools: add spaces after commas (PEP8) except tuple assignment
W. Trevor King [Sun, 18 Nov 2012 22:51:34 +0000 (17:51 -0500)]
FFT_tools: add spaces after commas (PEP8) except tuple assignment

6 years agoFFT_tools: add spaces around operators (PEP8) except **
W. Trevor King [Sun, 18 Nov 2012 22:48:17 +0000 (17:48 -0500)]
FFT_tools: add spaces around operators (PEP8) except **

6 years agoFFT_tools: use // for explicit integer (floor) division (PEP238)
W. Trevor King [Sun, 18 Nov 2012 22:33:42 +0000 (17:33 -0500)]
FFT_tools: use // for explicit integer (floor) division (PEP238)

// has been supported since Python 2.2.  / changed to float division
in Python 3.

6 years agoFFT_tools: two spaces before inline comments (PEP8)
W. Trevor King [Sun, 18 Nov 2012 22:27:46 +0000 (17:27 -0500)]
FFT_tools: two spaces before inline comments (PEP8)

6 years agoFFT_tools: separate function defs with 2 blank lines (PEP8)
W. Trevor King [Sun, 18 Nov 2012 22:25:55 +0000 (17:25 -0500)]
FFT_tools: separate function defs with 2 blank lines (PEP8)

6 years agoFFT_tools: wrap long function calls for PEP8 compliance
W. Trevor King [Sun, 18 Nov 2012 22:21:59 +0000 (17:21 -0500)]
FFT_tools: wrap long function calls for PEP8 compliance

6 years agoFFT_tools: wrap long comments for PEP8 compliance
W. Trevor King [Sun, 18 Nov 2012 22:19:42 +0000 (17:19 -0500)]
FFT_tools: wrap long comments for PEP8 compliance

6 years agoFFT_tools: wrap long function definition lines for PEP 8 compliance
W. Trevor King [Sun, 18 Nov 2012 22:15:01 +0000 (17:15 -0500)]
FFT_tools: wrap long function definition lines for PEP 8 compliance

6 years agosetup.py: update classifiers (Python and GPL versions, etc.)
W. Trevor King [Sun, 18 Nov 2012 22:11:24 +0000 (17:11 -0500)]
setup.py: update classifiers (Python and GPL versions, etc.)

6 years agoREADME: remove author info (it's in setup.py)
W. Trevor King [Sun, 18 Nov 2012 21:50:27 +0000 (16:50 -0500)]
README: remove author info (it's in setup.py)

6 years agosetup.py: replace " = " with "=" for PEP 8 compliance
W. Trevor King [Sun, 18 Nov 2012 21:49:50 +0000 (16:49 -0500)]
setup.py: replace " = " with "=" for PEP 8 compliance

6 years agoFFT_tools: replace " :" with ":" for PEP 8 compliance
W. Trevor King [Sun, 18 Nov 2012 21:40:44 +0000 (16:40 -0500)]
FFT_tools: replace " :" with ":" for PEP 8 compliance

6 years agoFFT_tools: cleanup namespace by using _pyplot
W. Trevor King [Sun, 18 Nov 2012 21:39:39 +0000 (16:39 -0500)]
FFT_tools: cleanup namespace by using _pyplot

6 years agoFFT_tools: clean up namespace by using _numpy
W. Trevor King [Sun, 18 Nov 2012 21:24:47 +0000 (16:24 -0500)]
FFT_tools: clean up namespace by using _numpy

6 years agoFFT_tools: modernize module docstring
W. Trevor King [Sun, 18 Nov 2012 20:56:16 +0000 (15:56 -0500)]
FFT_tools: modernize module docstring

6 years agoFFT_tools: bump copyright year
W. Trevor King [Sun, 18 Nov 2012 20:52:11 +0000 (15:52 -0500)]
FFT_tools: bump copyright year

6 years agoFFT-tools: modernize string formatting and exception handling
W. Trevor King [Sun, 18 Nov 2012 20:48:52 +0000 (15:48 -0500)]
FFT-tools: modernize string formatting and exception handling

Changes:
* "print ..." -> "print(...)" (required for Python 3+)
* "'%s' % (...)" -> "'{}'.format(...)" for Python 2.7+
* prefer "raise ValueError(...)" to "assert ..."
* a few minor docstring cleanups for PEP 257 compliance

6 years agoBump to version 0.3. 0.3
W. Trevor King [Sun, 22 Jul 2012 16:02:03 +0000 (12:02 -0400)]
Bump to version 0.3.

6 years agoChange email address to tremily and cleanup setup.py classifiers.
W. Trevor King [Sun, 22 Jul 2012 16:00:07 +0000 (12:00 -0400)]
Change email address to tremily and cleanup setup.py classifiers.

7 years agoUpdate URLs from einstein to tremily.
W. Trevor King [Wed, 22 Feb 2012 16:30:49 +0000 (11:30 -0500)]
Update URLs from einstein to tremily.

7 years agoExplicitly convert powers to reals (they should have no imaginary portion.)
W. Trevor King [Tue, 4 Oct 2011 14:57:04 +0000 (10:57 -0400)]
Explicitly convert powers to reals (they should have no imaginary portion.)

8 years agoAdd .gitigore ignoring *.pyc files.
W. Trevor King [Tue, 19 Apr 2011 18:39:00 +0000 (14:39 -0400)]
Add .gitigore ignoring *.pyc files.

8 years agoFix doclines -> __doc__ in setup.py description.
W. Trevor King [Tue, 8 Feb 2011 20:10:52 +0000 (15:10 -0500)]
Fix doclines -> __doc__ in setup.py description.

8 years agoConvert setup.py to plain distutils and general cleanups. 0.2
W. Trevor King [Tue, 8 Feb 2011 20:01:18 +0000 (15:01 -0500)]
Convert setup.py to plain distutils and general cleanups.

10 years agoMoved from Python Software Foundation License to BSD License.
W. Trevor King [Tue, 11 Nov 2008 16:22:59 +0000 (11:22 -0500)]
Moved from Python Software Foundation License to BSD License.

I didn't know what header to include in the code for the PSFL.

10 years agoAdded `dist' target to Makefile
W. Trevor King [Sat, 4 Oct 2008 14:11:18 +0000 (10:11 -0400)]
Added `dist' target to Makefile

10 years agoSetup package for setuptools distribution.
W. Trevor King [Sat, 4 Oct 2008 14:08:58 +0000 (10:08 -0400)]
Setup package for setuptools distribution.

10 years agoAdded some more Parseval's checks, but they failed.
W. Trevor King [Sat, 4 Oct 2008 14:04:22 +0000 (10:04 -0400)]
Added some more Parseval's checks, but they failed.

TODO, figure out why and fix it, so I can uncomment the checks.

10 years agoGot Parseval's checks working.
W. Trevor King [Sat, 4 Oct 2008 13:43:54 +0000 (09:43 -0400)]
Got Parseval's checks working.

10 years agoBegan versioning
W. Trevor King [Sat, 4 Oct 2008 13:06:13 +0000 (09:06 -0400)]
Began versioning