W. Trevor King [Sat, 11 May 2013 14:57:57 +0000 (10:57 -0400)]
surface: Ensure min_position < max_position in _get_min_max_positions
Otherwise log the configuration and raise a ValueError.
It's unlikely that a user misconfigures their ranges, but it is
possible. It is also possible that a bug in pycomedi---like the one
fixed by
27562b0 (channel: Fix to-physical setup in
AnalogChannel._get_converter, 2013-01-17)---leads to a broken
inverse-conversion-coefficients configuration. That bug is now fixed,
but if it happened once, it might happen again ;).
W. Trevor King [Sun, 19 Aug 2012 21:42:08 +0000 (17:42 -0400)]
Don't plot missing surface detection regions in analyze_surface_position_data.
This allows us to use the surface-matplotlib option to debug the
surface-position algorithm even when it's used on phony data that only
contains 'approach'.
W. Trevor King [Sun, 19 Aug 2012 18:38:30 +0000 (14:38 -0400)]
Remove unused plot_dict from analyze_surface_position_data.
W. Trevor King [Fri, 17 Aug 2012 14:37:17 +0000 (10:37 -0400)]
Add surface-matplotlib config option to pypiezo.
Sometimes you want to troubleshoot surface detection without popping
up a plot of every single piezo sweep.
W. Trevor King [Thu, 2 Aug 2012 16:19:48 +0000 (12:19 -0400)]
Only call figure.show if it exits.
For example, figures generated with the Agg backend don't have a
'show' method.
W. Trevor King [Sun, 22 Jul 2012 16:33:35 +0000 (12:33 -0400)]
Bump to version 0.7.
W. Trevor King [Thu, 12 Jul 2012 22:25:53 +0000 (18:25 -0400)]
Add explanatory message to analyze_surface_position_data's final==start error.
W. Trevor King [Thu, 12 Jul 2012 22:18:08 +0000 (18:18 -0400)]
Standardize matplotlib rendering on figure.canvas.draw() and figure.show().
In interactive mode, skip the no-op pyplot.show(). In non-interactive
mode, the show() calls will block until the window is closed.
W. Trevor King [Thu, 12 Jul 2012 22:14:42 +0000 (18:14 -0400)]
Remove unnecessary line wrap in analyze_surface_position_data logging.
W. Trevor King [Thu, 12 Jul 2012 17:46:53 +0000 (13:46 -0400)]
Remove matplotlib.pyplot.show call from analyze_surface_position_data.
This call was redundant and not protected by a config['matplotlib']
check.
W. Trevor King [Fri, 11 May 2012 17:56:20 +0000 (13:56 -0400)]
Ran update-copyright.py.
W. Trevor King [Fri, 11 May 2012 17:56:06 +0000 (13:56 -0400)]
.update-copyright.conf should not be executable.
W. Trevor King [Fri, 11 May 2012 17:55:36 +0000 (13:55 -0400)]
AUTHORS should not be version controlled (generated by update-copyright.py).
W. Trevor King [Wed, 18 Apr 2012 17:23:18 +0000 (13:23 -0400)]
Change my email address from drexel.edu to tremily.us.
W. Trevor King [Fri, 30 Mar 2012 12:16:03 +0000 (08:16 -0400)]
Don't cast extreme values to ints in analyze_surface_position_data().
Without the cast, we can also use this function to fit floating point
data, where the deflection and offset ranges are less than one
(e.g. nanometer sized sweeps stored in meters).
W. Trevor King [Fri, 30 Mar 2012 11:30:00 +0000 (07:30 -0400)]
Fix ususes -> uses typo in analyze_surface_position_data().
W. Trevor King [Mon, 26 Mar 2012 18:00:36 +0000 (14:00 -0400)]
Add Piezo.zero().
W. Trevor King [Wed, 21 Mar 2012 16:51:21 +0000 (12:51 -0400)]
Add trailing slash to Gentoo overlay link in README.
W. Trevor King [Sun, 18 Mar 2012 16:04:31 +0000 (12:04 -0400)]
Make .load_from_config explicit and optional (don't call it from __init__).
W. Trevor King [Fri, 16 Mar 2012 04:54:07 +0000 (00:54 -0400)]
'enumerate' is not subscriptable in the soft jump code.
W. Trevor King [Fri, 16 Mar 2012 04:48:17 +0000 (00:48 -0400)]
Fix move_just_onto_surface() for limited axes.
If the channel is limited with AxesConfig['maximum'] less than the
channels actual maximum, the position passed in to
move_just_onto_surface() may be a floating point bit value
(e.g. 62258.25). Because the maximum keeps the position from getting
to 62259, the approach phase goes on forever, getting stuck in
repeated jumps to 62258. By truncating the positive position down to
a lower integer, we ensure that it is an attainable value.
W. Trevor King [Fri, 16 Mar 2012 04:38:40 +0000 (00:38 -0400)]
Positions are allowed to be floats, so don't format log so strictly.
W. Trevor King [Fri, 16 Mar 2012 04:36:04 +0000 (00:36 -0400)]
Fix delection -> current_deflection typo in AFMPiezo.move_just_onto_surface().
Also increase logging output, since I'm getting stuct in a loop here
for some reason.
W. Trevor King [Fri, 16 Mar 2012 04:18:38 +0000 (00:18 -0400)]
Fix soft-jump bailout logic when we don't know the current position.
W. Trevor King [Thu, 15 Mar 2012 17:40:18 +0000 (13:40 -0400)]
Make base.load_device public (so that external modules can use it).
W. Trevor King [Thu, 15 Mar 2012 16:25:50 +0000 (12:25 -0400)]
Optional config-based-setup for the main Piezo class.
This breaks compatibility with earlier versions, because we've added a
`config` option to `Piezo.__init__`. The addition is a good thing,
though, because it makes `Piezo` more consistent with the `PiezoAxis`,
and `{I,O}Channel` classes.
W. Trevor King [Thu, 15 Mar 2012 15:08:51 +0000 (11:08 -0400)]
Set the default ChannelConfig range index to 0.
W. Trevor King [Thu, 15 Mar 2012 14:13:20 +0000 (10:13 -0400)]
Optional config-based-setup for PiezoAxis, OutputChannel, and InputChannel.
See the module docstring for details on why this is useful.
W. Trevor King [Thu, 15 Mar 2012 11:51:55 +0000 (07:51 -0400)]
Fix soft jump handling for unknown `last_output`.
Also return after a successful soft jump. The previous implementation
duplicated the final step.
W. Trevor King [Thu, 15 Mar 2012 03:53:56 +0000 (23:53 -0400)]
Bump version to 0.6.
W. Trevor King [Thu, 15 Mar 2012 03:53:36 +0000 (23:53 -0400)]
We depend on pycomedi >= 0.4 for deepcopy-able AREF values.
W. Trevor King [Thu, 15 Mar 2012 03:47:23 +0000 (23:47 -0400)]
Fix out -> output typo in wiggle_for_interference().
W. Trevor King [Thu, 15 Mar 2012 03:40:37 +0000 (23:40 -0400)]
Oops, fix up figure/axes/plot argument passing in pypiezo.wiggle.
W. Trevor King [Thu, 15 Mar 2012 03:35:58 +0000 (23:35 -0400)]
Oops, replace `n` with `config['samples']` in _run_wiggles().
W. Trevor King [Thu, 15 Mar 2012 03:34:05 +0000 (23:34 -0400)]
Oops, pass all possible arguments to pypiezo.wiggle._run_wiggles().
W. Trevor King [Thu, 15 Mar 2012 03:31:36 +0000 (23:31 -0400)]
Oops, add output argument to pypiezo.wiggle._setup_plot().
W. Trevor King [Thu, 15 Mar 2012 03:29:24 +0000 (23:29 -0400)]
Add missing numpy import to pypiezo.wiggle.
W. Trevor King [Thu, 15 Mar 2012 03:26:59 +0000 (23:26 -0400)]
Add missing _base import to pypiezo.wiggle.
W. Trevor King [Thu, 15 Mar 2012 03:24:07 +0000 (23:24 -0400)]
Fix peizo -> piezo typo in pypiezo.wiggle._setup_config().
W. Trevor King [Thu, 15 Mar 2012 03:22:15 +0000 (23:22 -0400)]
Add missing _package_config import to pypiezo.wiggle.
W. Trevor King [Thu, 15 Mar 2012 03:15:45 +0000 (23:15 -0400)]
Split AFMPiezo.wiggle_for_interference() into it's own module.
And break it down into manageable chunks.
W. Trevor King [Thu, 15 Mar 2012 03:14:50 +0000 (23:14 -0400)]
Add new 'analog-reference' config option to doctest dumps.
W. Trevor King [Thu, 15 Mar 2012 00:55:55 +0000 (20:55 -0400)]
Oops, setup analog-reference with an AREF value, not an int.
W. Trevor King [Thu, 15 Mar 2012 00:11:05 +0000 (20:11 -0400)]
Ugly hack to flush plots to the screen as they are updated.
W. Trevor King [Thu, 15 Mar 2012 00:02:16 +0000 (20:02 -0400)]
Remove debugging slope prints from surface-detection doctest.
W. Trevor King [Wed, 14 Mar 2012 22:52:42 +0000 (18:52 -0400)]
Raise SurfaceError if surface position data only has a single z value.
If the deflection at the minimum position is over the dangerous
threshold, `get_surface_position_data()` will not take any steps in.
With this commit, we avoid raising a ZeroDivisionError in that
situation.
W. Trevor King [Wed, 14 Mar 2012 22:49:37 +0000 (18:49 -0400)]
Add amplitude and max values to the "no room for wiggle" ValueError string.
W. Trevor King [Wed, 14 Mar 2012 21:54:08 +0000 (17:54 -0400)]
Add analog reference to ChannelConfig (forgotten earlier?).
W. Trevor King [Wed, 14 Mar 2012 21:46:27 +0000 (17:46 -0400)]
Move wiggle options to WiggleConfig and allow easy saving of wiggle data.
W. Trevor King [Wed, 14 Mar 2012 20:59:06 +0000 (16:59 -0400)]
Fix Convigure -> Configure typo in ChannelConfig's docstring.
W. Trevor King [Wed, 14 Mar 2012 20:18:23 +0000 (16:18 -0400)]
Add `steps` and `sleep` options for gentler `jump()`s.
W. Trevor King [Wed, 14 Mar 2012 19:16:00 +0000 (15:16 -0400)]
If neither the wavelength or amplitude are given for wiggling, use half the max.
W. Trevor King [Wed, 22 Feb 2012 18:40:24 +0000 (13:40 -0500)]
Update URLs from einstein to tremily.
W. Trevor King [Thu, 16 Feb 2012 23:05:33 +0000 (18:05 -0500)]
Run update-copyright.py.
W. Trevor King [Thu, 16 Feb 2012 23:03:22 +0000 (18:03 -0500)]
Transition to my external update-copyright package.
http://pypi.python.org/pypi/update-copyright/
W. Trevor King [Mon, 23 Jan 2012 21:37:26 +0000 (16:37 -0500)]
Fix channel reference in AFMPiezo.move_to_pos_or_def.
W. Trevor King [Mon, 23 Jan 2012 21:31:02 +0000 (16:31 -0500)]
Move position and deflection initialization before step direction check.
Otherwise, if position is not specified, step would always end up
being negative, and position would always end up as zero. Now
position will end up being the extreme in the initial step direction,
as advertised.
W. Trevor King [Tue, 17 Jan 2012 21:47:58 +0000 (16:47 -0500)]
Add 'direction' keyword to Piezo.read_inputs' call to .channels.
W. Trevor King [Tue, 17 Jan 2012 18:47:15 +0000 (13:47 -0500)]
Add frequency option to AFMPiezo.move_to_pos_or_def.
W. Trevor King [Fri, 13 Jan 2012 18:41:14 +0000 (13:41 -0500)]
Add default position, deflection, and step to AFMPiezo.move_to_pos_or_def.
W. Trevor King [Fri, 30 Sep 2011 19:57:51 +0000 (15:57 -0400)]
Move surface-related logging from debug to info (debug is noisy).
W. Trevor King [Mon, 26 Sep 2011 15:10:54 +0000 (11:10 -0400)]
Fix up ,select_config usage; now unit tests pass.
W. Trevor King [Sun, 25 Sep 2011 23:20:56 +0000 (19:20 -0400)]
Convert to h5config's new get_attribute option for select_config.
W. Trevor King [Thu, 15 Sep 2011 12:31:32 +0000 (08:31 -0400)]
Remove unused sys import from pypiezo.config.
W. Trevor King [Thu, 8 Sep 2011 18:17:17 +0000 (14:17 -0400)]
Use select_config in AFMPiezo's doctests.
W. Trevor King [Thu, 8 Sep 2011 17:59:58 +0000 (13:59 -0400)]
Use PEP-8-suggested double space between class definitions in surface.py.
W. Trevor King [Thu, 8 Sep 2011 15:20:51 +0000 (11:20 -0400)]
Add select_config example to get_piezo_config's doctest.
W. Trevor King [Thu, 8 Sep 2011 14:47:27 +0000 (10:47 -0400)]
Add pypiezo.test.get_piezo_config and fix ConfigSetting -> Setting typo for PiezoConfig.
W. Trevor King [Fri, 29 Jul 2011 14:06:03 +0000 (10:06 -0400)]
Oops, forgot the ['channel'].
W. Trevor King [Fri, 29 Jul 2011 14:02:11 +0000 (10:02 -0400)]
axis_channel_config -> config['channel'] in surface.py.
W. Trevor King [Fri, 29 Jul 2011 13:57:09 +0000 (09:57 -0400)]
Fix InputChannelConfig reference and remove debugging printout.
W. Trevor King [Fri, 29 Jul 2011 13:54:52 +0000 (09:54 -0400)]
Debugging printouts in AFMPiezo doctest.
W. Trevor King [Fri, 29 Jul 2011 13:53:18 +0000 (09:53 -0400)]
Fix doctest config-dump output in base.py.
W. Trevor King [Fri, 29 Jul 2011 13:51:19 +0000 (09:51 -0400)]
Remove debugging name-logger now that axis names are set correctly in doctests.
W. Trevor King [Fri, 29 Jul 2011 13:49:00 +0000 (09:49 -0400)]
`name` is a ChannelConfig setting, not an AxisConfig setting.
W. Trevor King [Fri, 29 Jul 2011 13:44:12 +0000 (09:44 -0400)]
Temporary debugging instrumentation.
W. Trevor King [Fri, 29 Jul 2011 13:33:39 +0000 (09:33 -0400)]
Assorted typo fixes turned up by test suite.
W. Trevor King [Fri, 29 Jul 2011 13:32:09 +0000 (09:32 -0400)]
Quote 'name' in AFMPiezo doctest.
W. Trevor King [Fri, 29 Jul 2011 13:24:39 +0000 (09:24 -0400)]
Fix foramt -> format typo in setup.py.
W. Trevor King [Fri, 29 Jul 2011 12:39:45 +0000 (08:39 -0400)]
Convert to use nested Configs from h5config.
W. Trevor King [Thu, 28 Jul 2011 19:29:50 +0000 (15:29 -0400)]
Cleanup setup.py.
W. Trevor King [Thu, 28 Jul 2011 18:47:35 +0000 (14:47 -0400)]
Remove crufty logging imports from pypiezo/__init__.py.
W. Trevor King [Thu, 28 Jul 2011 18:05:42 +0000 (14:05 -0400)]
Fix Curses-ckeck-... -> Curses-check typo in README.
W. Trevor King [Thu, 28 Jul 2011 17:55:26 +0000 (13:55 -0400)]
Fix base_config -> package_config reference in surface.py.
W. Trevor King [Thu, 28 Jul 2011 17:51:57 +0000 (13:51 -0400)]
Remove underscores from config classes in doctests.
W. Trevor King [Thu, 28 Jul 2011 17:48:20 +0000 (13:48 -0400)]
Add _clear_class and _backed_subclasses to PackageConfig.
W. Trevor King [Thu, 28 Jul 2011 17:30:53 +0000 (13:30 -0400)]
Convert to use new h5config package.
W. Trevor King [Wed, 20 Apr 2011 20:31:56 +0000 (16:31 -0400)]
Special case for '/' group in h5_create_group.
W. Trevor King [Wed, 20 Apr 2011 20:09:56 +0000 (16:09 -0400)]
Return the group created in h5_create_group().
W. Trevor King [Wed, 20 Apr 2011 20:08:33 +0000 (16:08 -0400)]
Split out h5_create_group so it can be used by other modules.
W. Trevor King [Wed, 20 Apr 2011 18:49:59 +0000 (14:49 -0400)]
Use base_config throughout setup_base_config() for consistency.
W. Trevor King [Wed, 20 Apr 2011 18:28:21 +0000 (14:28 -0400)]
Fix typo return_all_params -> return_all_parameters.
W. Trevor King [Tue, 19 Apr 2011 23:06:28 +0000 (19:06 -0400)]
Better solution to overwriting preexisting datasets.
Remove them and start from scratch. The previous implementation did
things like
>>> dataset = 'no'
>>> dataset[...] = 'yes'
>>> dataset[...]
'ye'
W. Trevor King [Tue, 19 Apr 2011 22:55:34 +0000 (18:55 -0400)]
dataset.value has been deprecated since h5py version 1.3.
From http://mail.scipy.org/pipermail/scipy-user/2010-February/024364.html
[SciPy-User] [ANN] HDF5 for Python (h5py) 1.3.0 beta
Andrew Collette andrew.collette@gmail....
Tue Feb 23 15:52:12 CST 2010
...
- Dataset .value attribute is deprecated. Use dataset[...] or dataset[()].
...
W. Trevor King [Tue, 19 Apr 2011 20:22:26 +0000 (16:22 -0400)]
Add /posts/ to homepage URL in setup.py.
W. Trevor King [Tue, 19 Apr 2011 18:49:10 +0000 (14:49 -0400)]
Add pycomedi link to README.
W. Trevor King [Tue, 19 Apr 2011 17:11:31 +0000 (13:11 -0400)]
Add a method for extracting input channels by name.
W. Trevor King [Tue, 19 Apr 2011 15:13:29 +0000 (11:13 -0400)]
Add H5Py and PyYAML dependencies to README.
W. Trevor King [Tue, 19 Apr 2011 14:58:01 +0000 (10:58 -0400)]
Make matplotlib display errors nonfatal.
W. Trevor King [Tue, 19 Apr 2011 13:21:32 +0000 (09:21 -0400)]
Clean up and convert to my Cython-based pycomedi implementation.