hooke.git
13 years agoMarkup corrections in doc/gui.txt
W. Trevor King [Fri, 18 Jun 2010 12:37:36 +0000 (08:37 -0400)]
Markup corrections in doc/gui.txt

13 years agoFinished remarking doc/gui.txt in Sphinx's reStructuredText.
W. Trevor King [Fri, 18 Jun 2010 12:29:14 +0000 (08:29 -0400)]
Finished remarking doc/gui.txt in Sphinx's reStructuredText.

Also moved hooke.plugin.plot to hooke.ui.gui.plugin.plot, since it was
breaking Sphinx compilation.

13 years agoMerged Rolf Schmidt's illysam branch
W. Trevor King [Fri, 18 Jun 2010 11:53:55 +0000 (07:53 -0400)]
Merged Rolf Schmidt's illysam branch

13 years agoUse numpy.loadtxt instead of newer numpy.genfromtxt in Hemingway driver.
W. Trevor King [Fri, 18 Jun 2010 01:02:05 +0000 (21:02 -0400)]
Use numpy.loadtxt instead of newer numpy.genfromtxt in Hemingway driver.

From
  http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html
"In particular, genfromtxt is able to take missing data into account,
when other faster and simpler functions like loadtxt cannot"

We prefer loadtxt because:
  * It's faster and we don't need to handle missing data.
  * It's older (genfromtxt added in Numpy in 2009/01/19, released in
    v1.3.0), so it's more likely to be in the user's stock Numpy
    installation.

13 years agoMoved hooke.driver.hemingclamp to hemingway and updated to new Driver architecture
W. Trevor King [Thu, 17 Jun 2010 23:40:22 +0000 (19:40 -0400)]
Moved hooke.driver.hemingclamp to hemingway and updated to new Driver architecture

13 years agoMoved Closing from hooke.driver.jpk to hooke.util.util
W. Trevor King [Thu, 17 Jun 2010 19:52:31 +0000 (15:52 -0400)]
Moved Closing from hooke.driver.jpk to hooke.util.util

13 years agoAdded calibration file support to the JPK driver.
W. Trevor King [Thu, 17 Jun 2010 17:17:57 +0000 (13:17 -0400)]
Added calibration file support to the JPK driver.

I'm not sure about my interpretation of the calibration file format.
I've emailed JPK for clarification, so we'll see what they have to say.

Also:
* Check for 'filetype' attributes when loading playlists.  If it
  exists, try to load using the matching driver before going through
  the whole list of available drivers.  This should speed up checks
  for curves that were identified by some previous playlist activity
  (or by hand if the user is generating playlists from scratch).
* Pass curve info into Driver.read().  This allows playlist attributes
  to affect curve loading.  The particular example that motivated this
  was
    <CHANNEL-NAME>_<BASE-NAME>_to_<TARGET-NAME>_calibration_file
  for the JPK driver, but it is a good idea in general.  Experiment
  temperature should probably be set this way vs. its current global
  config setting.
* Added Driver.logger(), to reduce code duplication.

13 years agoUse PEP 343's 'with' instead of try:/finally: x.close()
W. Trevor King [Mon, 14 Jun 2010 16:52:17 +0000 (12:52 -0400)]
Use PEP 343's 'with' instead of try:/finally: x.close()

13 years agoBring hooke.config and hooke.util.peak doctests up to speed
W. Trevor King [Mon, 14 Jun 2010 15:37:32 +0000 (11:37 -0400)]
Bring hooke.config and hooke.util.peak doctests up to speed

13 years agoAlso override hooke.util.encoding.get_encoding in test/unicode_output.py
W. Trevor King [Mon, 14 Jun 2010 15:28:10 +0000 (11:28 -0400)]
Also override hooke.util.encoding.get_encoding in test/unicode_output.py

13 years agoImport os.path when we use it in test/*_driver.py
W. Trevor King [Mon, 14 Jun 2010 15:13:01 +0000 (11:13 -0400)]
Import os.path when we use it in test/*_driver.py

13 years agoAdjust test/wtk_driver.py since I didn't add all my original files.
W. Trevor King [Mon, 14 Jun 2010 15:05:53 +0000 (11:05 -0400)]
Adjust test/wtk_driver.py since I didn't add all my original files.

13 years agoSkip PoorFit curves in flatfilt and convfilt.
W. Trevor King [Mon, 14 Jun 2010 14:25:59 +0000 (10:25 -0400)]
Skip PoorFit curves in flatfilt and convfilt.

13 years agoAvoid possible negative p[2] values in SurfacePositionModel.
W. Trevor King [Mon, 14 Jun 2010 14:08:21 +0000 (10:08 -0400)]
Avoid possible negative p[2] values in SurfacePositionModel.

13 years agoUpdated JPK driver for JPK's version 0.5 format and new driver architecture
W. Trevor King [Mon, 14 Jun 2010 13:56:38 +0000 (09:56 -0400)]
Updated JPK driver for JPK's version 0.5 format and new driver architecture

13 years agoBe slightly more path-seperator agnostic in test/*_driver.py
W. Trevor King [Mon, 14 Jun 2010 13:55:08 +0000 (09:55 -0400)]
Be slightly more path-seperator agnostic in test/*_driver.py

13 years agoAdd logger configuration options.
W. Trevor King [Mon, 14 Jun 2010 13:48:17 +0000 (09:48 -0400)]
Add logger configuration options.

13 years agoRemoved redundant picoforcealt driver
W. Trevor King [Sun, 13 Jun 2010 21:18:14 +0000 (17:18 -0400)]
Removed redundant picoforcealt driver

13 years agoSplit out curve renaming to PicoForceDriver._replace_name
W. Trevor King [Fri, 4 Jun 2010 17:24:35 +0000 (13:24 -0400)]
Split out curve renaming to PicoForceDriver._replace_name

I still haven't gotten things working for the 0x07200000 data, but I'm
beginning to doubt the example file.  Things appear to work on the
0x06 data.

13 years agoAdded explicit pickle test and fixed curve.Data pickling.
W. Trevor King [Fri, 4 Jun 2010 15:23:21 +0000 (11:23 -0400)]
Added explicit pickle test and fixed curve.Data pickling.

I missunderstood how __reduce__ worked the first time.  Now there's a
doctest proving it works ;).

13 years agoAdjust hooke.curve.Data so .info is picklable.
W. Trevor King [Fri, 4 Jun 2010 14:40:17 +0000 (10:40 -0400)]
Adjust hooke.curve.Data so .info is picklable.

Otherwise it didn't survive the Queue between the UI and Engine
processes.  See
  http://mail.scipy.org/pipermail/numpy-discussion/2007-April/027193.html

13 years agoRemove debugging trace files from hooke.driver.picoforce
W. Trevor King [Fri, 4 Jun 2010 12:10:54 +0000 (08:10 -0400)]
Remove debugging trace files from hooke.driver.picoforce

13 years agoBrought picoforce driver up to speed with 0x06130001 and 0x07200000
W. Trevor King [Fri, 4 Jun 2010 12:01:34 +0000 (08:01 -0400)]
Brought picoforce driver up to speed with 0x06130001 and 0x07200000

13 years agoExtend test.mfp3d_driver to test both MFP3D file versions we have available.
W. Trevor King [Fri, 4 Jun 2010 08:50:36 +0000 (04:50 -0400)]
Extend test.mfp3d_driver to test both MFP3D file versions we have available.

13 years agoMinor consistency cleanups in wtk and picoforce drivers
W. Trevor King [Fri, 4 Jun 2010 08:41:21 +0000 (04:41 -0400)]
Minor consistency cleanups in wtk and picoforce drivers

13 years agoBrought mfp3d driver up to the new architecture.
W. Trevor King [Fri, 4 Jun 2010 08:40:33 +0000 (04:40 -0400)]
Brought mfp3d driver up to the new architecture.

The new implementation is also cleaner and more robust.

13 years agoAdded post-data optional field processing to igorbinarywave.loadibw.
W. Trevor King [Fri, 4 Jun 2010 07:28:19 +0000 (03:28 -0400)]
Added post-data optional field processing to igorbinarywave.loadibw.

13 years agoAutomatically split version 5 Igor wave files into columns
W. Trevor King [Fri, 4 Jun 2010 06:46:11 +0000 (02:46 -0400)]
Automatically split version 5 Igor wave files into columns

13 years agoAdded MFP3D files from tanxx06.
W. Trevor King [Fri, 4 Jun 2010 06:16:00 +0000 (02:16 -0400)]
Added MFP3D files from tanxx06.

13 years agoAdded JPK files from albedomanu.
W. Trevor King [Fri, 4 Jun 2010 06:15:04 +0000 (02:15 -0400)]
Added JPK files from albedomanu.

13 years agoAdded version 0x06130001 PicoForce file from Fabrizio Benedetti.
W. Trevor King [Fri, 4 Jun 2010 06:07:52 +0000 (02:07 -0400)]
Added version 0x06130001 PicoForce file from Fabrizio Benedetti.

13 years agoAdded Yukken's mfp3d example data
W. Trevor King [Fri, 4 Jun 2010 05:34:11 +0000 (01:34 -0400)]
Added Yukken's mfp3d example data

13 years agoRan update_copyright.py on igorbinarywave.py
W. Trevor King [Fri, 4 Jun 2010 05:16:51 +0000 (01:16 -0400)]
Ran update_copyright.py on igorbinarywave.py

13 years agoAdd hooke.driver.igorbinarywave so Hooke can read Igor files.
W. Trevor King [Fri, 4 Jun 2010 05:15:46 +0000 (01:15 -0400)]
Add hooke.driver.igorbinarywave so Hooke can read Igor files.

13 years agoDon't join directory in WTKDriver.__find_previous_cantilever_calibration_file().
W. Trevor King [Thu, 3 Jun 2010 16:22:38 +0000 (12:22 -0400)]
Don't join directory in WTKDriver.__find_previous_cantilever_calibration_file().

We already did that in ._list_cantilever_calibration_files().

13 years agoAdd headers to output of 'cut' and 'export block'.
W. Trevor King [Thu, 3 Jun 2010 16:13:00 +0000 (12:13 -0400)]
Add headers to output of 'cut' and 'export block'.

Both controlled by new 'header' arguments (optional, True by default).

13 years agoFix help message when too many arguments are passed to Hooke.
W. Trevor King [Thu, 3 Jun 2010 15:55:02 +0000 (11:55 -0400)]
Fix help message when too many arguments are passed to Hooke.

Previously,
  $ python bin/hooke x
would raise an exception.  Now it prints an error message and hooke's
help:
  More than 0 arguments to bin/hooke: ['x']
  Usage: hooke [options]
  ...

13 years agoFlip deflection sign in picoforce driver so +deflection for +tension
W. Trevor King [Thu, 3 Jun 2010 14:07:11 +0000 (10:07 -0400)]
Flip deflection sign in picoforce driver so +deflection for +tension

13 years agoOops, forgot to convert 'z piezo gain' to a float in the picoforce driver
W. Trevor King [Thu, 3 Jun 2010 14:01:02 +0000 (10:01 -0400)]
Oops, forgot to convert 'z piezo gain' to a float in the picoforce driver

13 years agoAdd better comment parsing to hooke.ui.commandline.
W. Trevor King [Thu, 3 Jun 2010 13:59:51 +0000 (09:59 -0400)]
Add better comment parsing to hooke.ui.commandline.

The old implemtation only handled comments after valid function calls:
  hooke> load_playlist test # a comment
but failed on pure comments and in help
  hooke> # failing comment
  hooke> help # failing comment
The new implemation handles all of these.

I changed empty lines to no-ops (rather than repeating the last
commant), because explicit is better than implicit.

13 years agoAdded illysam's 0x07200000 picoforce example
W. Trevor King [Thu, 3 Jun 2010 12:56:49 +0000 (08:56 -0400)]
Added illysam's 0x07200000 picoforce example

13 years agoUse Sphinx's :manpage: construct for python(1).
W. Trevor King [Thu, 3 Jun 2010 10:31:53 +0000 (06:31 -0400)]
Use Sphinx's :manpage: construct for python(1).

See
  http://sphinx.pocoo.org/markup/inline.html#role-manpage
This just styles the text rather than linking somewhere, because man
pages can be installation-specific.

13 years agoUpdated doc/tutorial.txt for currently implemented commands
W. Trevor King [Wed, 2 Jun 2010 20:29:00 +0000 (16:29 -0400)]
Updated doc/tutorial.txt for currently implemented commands

13 years agoAdd FilePlaylist._ignored_keys for boring fields
W. Trevor King [Wed, 2 Jun 2010 19:48:08 +0000 (15:48 -0400)]
Add FilePlaylist._ignored_keys for boring fields

13 years agoTranslate find_contact_point_fmms to new architecture.
W. Trevor King [Wed, 2 Jun 2010 19:26:20 +0000 (15:26 -0400)]
Translate find_contact_point_fmms to new architecture.

Also
* Add some docstrings, comments, and line wrappings.
* Rename _find_contact_point* -> find_contact_point* so users will
  look at the docstrings.
* Added curve to find_contact_point*() for driver-specific hacks
  and workarounds (specifically, the PicoForce trigger bug).

13 years ago'wtk' -> self.name in WTKDriver to reduce duplication
W. Trevor King [Wed, 2 Jun 2010 18:11:04 +0000 (14:11 -0400)]
'wtk' -> self.name in WTKDriver to reduce duplication

13 years agoAdd PYTHONPATH reminders to doc/tutorial.txt and doc/install.txt
W. Trevor King [Wed, 2 Jun 2010 18:05:31 +0000 (14:05 -0400)]
Add PYTHONPATH reminders to doc/tutorial.txt and doc/install.txt

13 years agoRestrict the setup.py package search to the hooke/ directory.
W. Trevor King [Wed, 2 Jun 2010 06:10:29 +0000 (02:10 -0400)]
Restrict the setup.py package search to the hooke/ directory.

Otherwise test/ and others may also be bundled, which will clutter
your installation with useless cruft.

13 years agoIgnore distutils build/ directory
W. Trevor King [Wed, 2 Jun 2010 06:08:57 +0000 (02:08 -0400)]
Ignore distutils build/ directory

13 years agoFix 'min_deviations + std' -> 'min_deviations * std' in hooke.util.peak
W. Trevor King [Wed, 2 Jun 2010 05:31:44 +0000 (01:31 -0400)]
Fix 'min_deviations + std' -> 'min_deviations * std' in hooke.util.peak

Oops :p.

13 years agoFixups in hooke.plugin.vclamp parameter guess and check.
W. Trevor King [Wed, 2 Jun 2010 05:25:52 +0000 (01:25 -0400)]
Fixups in hooke.plugin.vclamp parameter guess and check.

* guessing adjusted for +deflection for +tension.
* checking adjusted for left-contact and possibly negative slopes.
* added details to 'Too far' version of PoorFit.

13 years agoFlip deflection sign for hooke.driver.wtk.
W. Trevor King [Wed, 2 Jun 2010 05:21:31 +0000 (01:21 -0400)]
Flip deflection sign for hooke.driver.wtk.

We want +deflection for +chain tension.

13 years agoMoved contact point detection from plugin.fit -> plugin.vclamp.
W. Trevor King [Wed, 2 Jun 2010 04:36:41 +0000 (00:36 -0400)]
Moved contact point detection from plugin.fit -> plugin.vclamp.

I haven't translated the two algorithms brought over from fit yet, but
I have added my own bilinear fit approach:
  _find_contact_point_wtk

Also:
* vclamp.scale gets access to hooke for the command list and
  command._run(hooke, ...)
* vclamp.scale functionality broken out into SurfaceContactCommand and
  ForceCommand.
* 'surface z piezo (m)' -> 'surface distance (m)'
* Actually set params['curve'] for flatfilt and convfilt FilterCommand
  subclasses.  Previous implementation just banged away on the default
  curve, regardless of the curve option passed to the subclass' _run.

13 years agoRemove blank column in wtk driver retraction curves.
W. Trevor King [Wed, 2 Jun 2010 04:22:28 +0000 (00:22 -0400)]
Remove blank column in wtk driver retraction curves.

The old implentation reserved space for the z piezo input column, but
never filled it in or added the relevant entry to info['columns'].
This caused some column indexing confusion in vclamp.scale().

13 years agoFix (retract,approach,params) -> (approach,retract,params) in wtk driver.
W. Trevor King [Wed, 2 Jun 2010 03:14:40 +0000 (23:14 -0400)]
Fix (retract,approach,params) -> (approach,retract,params) in wtk driver.

The block paths should be in chronological order.

13 years agoAdd hooke.playlist.NoteIndexList._setup_item
W. Trevor King [Wed, 2 Jun 2010 03:00:19 +0000 (23:00 -0400)]
Add hooke.playlist.NoteIndexList._setup_item

This allows item initialization to occur in both .current() and
.filter().

Renamed Playlist._load -> ._setup_item for consistency.

13 years agoAdditional cleanups in fit.py
W. Trevor King [Wed, 2 Jun 2010 02:10:36 +0000 (22:10 -0400)]
Additional cleanups in fit.py

* Added outqueue to tests, which turned up an 'outqeue' typo.
* Store info in .set_data().  This allows subclasses to write
  data-specific information when the data changes.
* .guess_scale() returns Null by default.  This tells leastsq to use
  its internal scale estimating magic.
* Added strictly positive scale assertion.  The error message returned
  by leastsq for zero or negative scales isn't very obvious.

13 years agoAdded hooke.util.fit for easy Levenberg-Marquardt fitting.
W. Trevor King [Tue, 1 Jun 2010 23:19:03 +0000 (19:19 -0400)]
Added hooke.util.fit for easy Levenberg-Marquardt fitting.

13 years agoFix approacing -> approaching typo in cut and curve plugins
W. Trevor King [Tue, 1 Jun 2010 18:29:21 +0000 (14:29 -0400)]
Fix approacing -> approaching typo in cut and curve plugins

13 years agoRan update_copyright.py which updated hooke.util.encoding
W. Trevor King [Tue, 1 Jun 2010 17:40:56 +0000 (13:40 -0400)]
Ran update_copyright.py which updated hooke.util.encoding

13 years agoAdd wtk driver for W. Trevor King's velocity clamp data format.
W. Trevor King [Tue, 1 Jun 2010 17:39:20 +0000 (13:39 -0400)]
Add wtk driver for W. Trevor King's velocity clamp data format.

Links to the related experiment control and analysis packages are
given in the docstring for hooke.driver.wtk

13 years agoConvert update_copyright.py to a more VCS-agnostic version.
W. Trevor King [Tue, 1 Jun 2010 17:36:42 +0000 (13:36 -0400)]
Convert update_copyright.py to a more VCS-agnostic version.

This will make it easier for others to grab this code for their own
projects.  Currently supported VCSs: Git, Mercurial, Bazaar.

13 years agoUse REPORT_UDIFF doctest option in test/curve_info.py
W. Trevor King [Tue, 1 Jun 2010 17:33:24 +0000 (13:33 -0400)]
Use REPORT_UDIFF doctest option in test/curve_info.py

13 years agoCleanups in hooke.driver.picoforce
W. Trevor King [Tue, 1 Jun 2010 17:32:43 +0000 (13:32 -0400)]
Cleanups in hooke.driver.picoforce

Scaling adjustment:
* Use 'z piezo gain' in bit->m conversion (is this correct?)

Info field renames for clarity and consistency:
* 'z piezo magnification' -> 'z piezo gain' (is this correct?)
* 'z piezo scale (V/bit)' -> 'z piezo sensitivity (V/bit)'
* 'z piezo scale (V)' -> 'z piezo range (V)'
* 'raw-data' -> 'raw data'

Also:
* Stripped trailing whitespace.
* Comment typo correction 'inzrease' -> 'increase'

13 years agoDon't die when flat-filtering curves shorter than blind window.
W. Trevor King [Tue, 1 Jun 2010 16:50:16 +0000 (12:50 -0400)]
Don't die when flat-filtering curves shorter than blind window.

This will probably only happen if the user uses an absurdly large
blind window by mistake, but that shouldn't crash Hooke.

13 years agoCorrect relative path generation in hooke.playlist.FilePlaylist.flatten
W. Trevor King [Tue, 1 Jun 2010 15:42:53 +0000 (11:42 -0400)]
Correct relative path generation in hooke.playlist.FilePlaylist.flatten

13 years agoFix /doc/build/ -> ./doc/build/ in update_copyright.py
W. Trevor King [Tue, 1 Jun 2010 14:46:26 +0000 (10:46 -0400)]
Fix /doc/build/ -> ./doc/build/ in update_copyright.py

13 years agoAdd another parameter-casting hack.
W. Trevor King [Wed, 19 May 2010 10:51:06 +0000 (06:51 -0400)]
Add another parameter-casting hack.

13 years agoConfirm lack of peaks in test/data/vclamp_picoforce/
W. Trevor King [Wed, 19 May 2010 10:50:41 +0000 (06:50 -0400)]
Confirm lack of peaks in test/data/vclamp_picoforce/

13 years agoUse numpy.savetxt (handles multiple columns) rather than ndarray.tofile
W. Trevor King [Wed, 19 May 2010 10:16:27 +0000 (06:16 -0400)]
Use numpy.savetxt (handles multiple columns) rather than ndarray.tofile

13 years agoAdd test.flat_filter which has been driving the recent fixups
W. Trevor King [Wed, 19 May 2010 10:06:57 +0000 (06:06 -0400)]
Add test.flat_filter which has been driving the recent fixups

13 years agoAdjust path (if it exists) for the child playlist in FilterCommand
W. Trevor King [Wed, 19 May 2010 10:05:18 +0000 (06:05 -0400)]
Adjust path (if it exists) for the child playlist in FilterCommand

13 years agoApply 'name' argument in plugin.playlist.FilterCommand
W. Trevor King [Wed, 19 May 2010 09:56:26 +0000 (05:56 -0400)]
Apply 'name' argument in plugin.playlist.FilterCommand

13 years agoFix typo .add -> .append in plugin.playlist.FilterCommand
W. Trevor King [Wed, 19 May 2010 09:53:18 +0000 (05:53 -0400)]
Fix typo .add -> .append in plugin.playlist.FilterCommand

13 years agoInitialize 'min peaks' from configuration (if required) in convfilt/flatfilt
W. Trevor King [Wed, 19 May 2010 09:52:25 +0000 (05:52 -0400)]
Initialize 'min peaks' from configuration (if required) in convfilt/flatfilt

13 years agoFix some outstanding argument issues in flatfilt.
W. Trevor King [Wed, 19 May 2010 09:41:42 +0000 (05:41 -0400)]
Fix some outstanding argument issues in flatfilt.

Also adjust temporary contact point value in vclamp.scale to ensure
'blind window' fits.

13 years agoInput codec messes with readline.
W. Trevor King [Wed, 19 May 2010 09:37:34 +0000 (05:37 -0400)]
Input codec messes with readline.

Disabled in hooke.ui.commandline while I work the kinks out of
flatfilt.

13 years agoMove 'blind window' and 'min peaks' from FlatPeaksCommand to FlatFiltPlugin
W. Trevor King [Wed, 19 May 2010 08:55:53 +0000 (04:55 -0400)]
Move 'blind window' and 'min peaks' from FlatPeaksCommand to FlatFiltPlugin

13 years agoSuccess import and better peaks validation in flatfilt and convfilt.
W. Trevor King [Wed, 19 May 2010 08:50:39 +0000 (04:50 -0400)]
Success import and better peaks validation in flatfilt and convfilt.

13 years agoarray.abs() -> numpy.abolute(array) in hooke.util.peak
W. Trevor King [Wed, 19 May 2010 08:42:20 +0000 (04:42 -0400)]
array.abs() -> numpy.abolute(array) in hooke.util.peak

13 years agoRemoved trailing comma that turned 'median' into a tuple
W. Trevor King [Wed, 19 May 2010 08:39:32 +0000 (04:39 -0400)]
Removed trailing comma that turned 'median' into a tuple

13 years agoAdded default name to hooke.util.peak.mask_to_peaks
W. Trevor King [Wed, 19 May 2010 08:39:04 +0000 (04:39 -0400)]
Added default name to hooke.util.peak.mask_to_peaks

13 years agoFix 'min deviation' -> 'min deviations' typos.
W. Trevor King [Wed, 19 May 2010 08:08:42 +0000 (04:08 -0400)]
Fix 'min deviation' -> 'min deviations' typos.

In hooke.util.peak and hooke.plugin.convfilt/flatfilt.

Also:
  * Fix "std == data.std" typo in hooke.util.peak.above_noise
  * Pass mean and std from noise to above_noise in find_peaks.

13 years agohooke.util.peak.find_peaks should *not* die on noise nonconvergence
W. Trevor King [Wed, 19 May 2010 07:58:47 +0000 (03:58 -0400)]
hooke.util.peak.find_peaks should *not* die on noise nonconvergence

13 years agoClean up argument handling in hooke.plugin.convfilt/flatfilt.
W. Trevor King [Wed, 19 May 2010 07:57:50 +0000 (03:57 -0400)]
Clean up argument handling in hooke.plugin.convfilt/flatfilt.

* Take advantage of hooke.util.peak._kwargs to split out appropriate
  kwargs for find_peaks.
* Add missing arguments 'blind window' and 'median window' to
  FlatFiltPlugin.
* Fix leftover convfilt code in FlatFiltPlugin._run peak naming.
* Add type casting HACK to FlatFiltPlugin._setup.

13 years agoAdded input key flexibility to hooke.util.peak._kwarg
W. Trevor King [Wed, 19 May 2010 07:41:37 +0000 (03:41 -0400)]
Added input key flexibility to hooke.util.peak._kwarg

13 years agoRestore plugin setup in hooke.command.Command.__init__
W. Trevor King [Wed, 19 May 2010 07:17:52 +0000 (03:17 -0400)]
Restore plugin setup in hooke.command.Command.__init__

13 years agoAdded preliminary hooke.plugin.vclamp.scale (just def. m -> N conversion).
W. Trevor King [Wed, 19 May 2010 07:15:23 +0000 (03:15 -0400)]
Added preliminary hooke.plugin.vclamp.scale (just def. m -> N conversion).

13 years agoImport VelocityClamp in hooke.plugin.flatfilt for ConvolutionPeakCommand._setup
W. Trevor King [Wed, 19 May 2010 06:49:39 +0000 (02:49 -0400)]
Import VelocityClamp in hooke.plugin.flatfilt for ConvolutionPeakCommand._setup

13 years agoAllow negative voltages in hooke.driver.picoforce.PicoForceDriver._translate_block_info
W. Trevor King [Wed, 19 May 2010 06:47:37 +0000 (02:47 -0400)]
Allow negative voltages in hooke.driver.picoforce.PicoForceDriver._translate_block_info

13 years agoFix self.hooke -> hooke typo in hooke.plugin.flatfilt.FlatFilterCommand.filter
W. Trevor King [Wed, 19 May 2010 06:46:44 +0000 (02:46 -0400)]
Fix self.hooke -> hooke typo in hooke.plugin.flatfilt.FlatFilterCommand.filter

13 years agoFix broken hooke.plugin.playlist.playlist_name_callback
W. Trevor King [Wed, 19 May 2010 06:40:52 +0000 (02:40 -0400)]
Fix broken hooke.plugin.playlist.playlist_name_callback

13 years agoRemove if __name__ == '__main__' section of hooke.hooke
W. Trevor King [Wed, 19 May 2010 06:40:24 +0000 (02:40 -0400)]
Remove if __name__ == '__main__' section of hooke.hooke

13 years agoAdd unicode-capable IO to hooke.ui.commandline.
W. Trevor King [Wed, 19 May 2010 06:31:00 +0000 (02:31 -0400)]
Add unicode-capable IO to hooke.ui.commandline.

The previous implementation produced:
  $ python bin/hooke -c 'flat_filter_playlist'
  ...
  hooke> Traceback (most recent call last):
  ...
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xec'...

The new encoding detection functions in hooke.util.encoding came from
my libbe.util.encoding module for Bugs Everywhere.  From my original
BE commit (Tue 2008-11-25 15:47:19 -0500):

  get_encoding() is from Trac
    http://trac.edgewall.org/browser/trunk/trac/util/datefmt.py
    format_datetime()
  Trac has a BSD license
    http://trac.edgewall.org/wiki/TracLicense
  I don't know if such a small snippet requires us to "reproduce the
  above copyright" or where we need to reproduce it if it is needed.

  The stdout/stdin replacement code follows
    http://wiki.python.org/moin/ShellRedirectionFails

  References:
    http://wiki.python.org/moin/Unicode
    http://www.amk.ca/python/howto/unicode
    http://www.python.org/dev/peps/pep-0100/

13 years agoRemove two debugging prints from hooke.ui.commandline
W. Trevor King [Wed, 19 May 2010 05:11:15 +0000 (01:11 -0400)]
Remove two debugging prints from hooke.ui.commandline

13 years agoAdjust update_copyright hacks to follow plugin.peakspot -> util.peak move
W. Trevor King [Wed, 19 May 2010 05:03:30 +0000 (01:03 -0400)]
Adjust update_copyright hacks to follow plugin.peakspot -> util.peak move

13 years agoMajor plugin restructuring.
W. Trevor King [Wed, 19 May 2010 04:54:48 +0000 (00:54 -0400)]
Major plugin restructuring.

The restructuring makes major improvements in:
  * numpy/scipy utilization (for speed)
  * functional encapsulation (breaking long, complicated functions
    into easily understood pieces, and sharing those pieces between
    related Commands).

Renames:
  * generalclamp -> fclamp
  * generalvclamp -> vclamp
  * generaltccd -> tccd
  * peakspot -> hooke.util.peak

Splits:
  * flatfilts -> flatfily
             `-> convfilt

The config files convfilt.conf and flatfilts.ini were also
internalized into their respective plugins' .default_settings().

13 years agoRemove debugging print command from hooke.util.calculus.derivative
W. Trevor King [Wed, 19 May 2010 04:41:11 +0000 (00:41 -0400)]
Remove debugging print command from hooke.util.calculus.derivative

13 years agoFix a pickling problems with hooke.plugin.playlist.FilterCommand.
W. Trevor King [Wed, 19 May 2010 04:38:51 +0000 (00:38 -0400)]
Fix a pickling problems with hooke.plugin.playlist.FilterCommand.

Pickle doesn't like functions that aren't defined the top level of
modules (such as NoteFilterCommand's old lambda filter_fn).  Add a
warning to that effect to the FilterCommand doc string, and rearrange
to encourage the use of methods (which are less likely to be defined
on the fly than functions).

Also:
  * Added pickle queue debugging code to hooke.hooke.  This isn't the
    first tiem I've had a pickling problem.  This code (when enabled),
    makes it easier for me to track down the failing code.
  * Fix a typo in hooke.hooke.HookeRunner.run (self.ui -> hooke.ui).
  * Remove a snip of trailing whitespace in hooke.hooke.

13 years agoAllow extra arguments to NoteIndexList.filter's filter_fn
W. Trevor King [Tue, 18 May 2010 16:35:22 +0000 (12:35 -0400)]
Allow extra arguments to NoteIndexList.filter's filter_fn