W. Trevor King [Mon, 26 Mar 2012 16:35:05 +0000 (12:35 -0400)]
Use a dummy write function for Stepper until we've initialized from the config.
W. Trevor King [Sun, 18 Mar 2012 17:13:08 +0000 (13:13 -0400)]
Oops, fix `return =` syntax in load_afm().
W. Trevor King [Sun, 18 Mar 2012 17:12:19 +0000 (13:12 -0400)]
Correct indentation and add h5config dependency comment to README.
W. Trevor King [Sun, 18 Mar 2012 17:06:59 +0000 (13:06 -0400)]
Add load_from_config() call after load_afm() in the README.
W. Trevor King [Sun, 18 Mar 2012 16:12:46 +0000 (12:12 -0400)]
Make .load_from_config explicit and optional (don't call it from __init__).
W. Trevor King [Fri, 16 Mar 2012 08:23:44 +0000 (04:23 -0400)]
Flesh out the README (and use 2-space indents).
W. Trevor King [Fri, 16 Mar 2012 07:01:13 +0000 (03:01 -0400)]
Remove "critical" debugging loggers from Temperature.load_from_config().
W. Trevor King [Fri, 16 Mar 2012 03:49:32 +0000 (23:49 -0400)]
Fix log string formatting in AFM.move_toward_surface().
W. Trevor King [Fri, 16 Mar 2012 03:41:28 +0000 (23:41 -0400)]
Oops, build DigitalPort.write_mask with |= instead of &=.
If you start with 0, &= will never change anything :p.
W. Trevor King [Fri, 16 Mar 2012 02:50:11 +0000 (22:50 -0400)]
Replace AFM.main_axis with AFM.config['main-axis'].
W. Trevor King [Fri, 16 Mar 2012 02:38:26 +0000 (22:38 -0400)]
Actually load the config from storage in load_afm().
W. Trevor King [Fri, 16 Mar 2012 02:16:16 +0000 (22:16 -0400)]
Update README and setup.py with new dependency information.
W. Trevor King [Fri, 16 Mar 2012 02:05:12 +0000 (22:05 -0400)]
Use scipy's C2K instead of hardcoding temperature conversion algorithm.
W. Trevor King [Thu, 15 Mar 2012 22:29:15 +0000 (18:29 -0400)]
Add AFM.move_toward_surface() and fix AFM.move_away_from_surface().
In everything else we do, numbers increase as you approach the
surface. There's no need to invert that convention here, so we now
have `AFM.move_toward_surface()` which can be used for moving in both
directions. `AFM.move_away_from_surface()` remains, because "Ahh!
What's going on! Quick, save the tip!" moments will happen, and then
it's nice to have a method that gets you clear without you having to
pick how far away you'd like to go.
W. Trevor King [Thu, 15 Mar 2012 22:11:03 +0000 (18:11 -0400)]
Strip trailing whitespace from pyafm.storage.
W. Trevor King [Thu, 15 Mar 2012 22:09:55 +0000 (18:09 -0400)]
Remove h5py import from pyafm.storage, since it only needs HDF5_Storage.
W. Trevor King [Thu, 15 Mar 2012 21:56:48 +0000 (17:56 -0400)]
Move calibcant.calibrate.move_far_from_surface -> pyafm.afm.AFM.move_away_from_surface.
W. Trevor King [Thu, 15 Mar 2012 21:50:36 +0000 (17:50 -0400)]
Merge calibcant/calibrate.py (for utility functions).
Since calibcant was one of my earliest packages in the area to achieve
some semblance of organization, it tended to accumulate other cruft.
I'm bringing in calibcant/calibrate.py so I can pull out the nuggets
that really belong in pyafm.
W. Trevor King [Thu, 15 Mar 2012 21:30:38 +0000 (17:30 -0400)]
Don't initialize devices explicitly in doctests.
Rely on the internal `.load_from_config()` methods to do that for us.
This reduces duplication (e.g. device filename only set in config
defaults, not in doctests too). It also makes it posible to use
several devices to build your AFM interface, where the old doctests
would only work with all the communication going through a single
card.
W. Trevor King [Thu, 15 Mar 2012 21:21:01 +0000 (17:21 -0400)]
Add `default-temperature` option to AFMConfig.
W. Trevor King [Thu, 15 Mar 2012 20:44:30 +0000 (16:44 -0400)]
Add pyafm.storage module with save_afm and load_afm.
Also remove some underscore prefixes from the AFM doctests. I'm too
used to trying to keep the modules themselves clean, but that's no
reason to go confusing newbies ;).
W. Trevor King [Thu, 15 Mar 2012 20:16:38 +0000 (16:16 -0400)]
Add DigitalPort, Stepper, and Temperature classes.
Also flesh out the config classes and handling. This brings pyafm up
to speed with the new pypiezo, with respect to config- or
instance-lead initialization.
W. Trevor King [Thu, 15 Mar 2012 19:12:34 +0000 (15:12 -0400)]
Merge TemperatureConfig and related constants from calibcant/config.py.
That's all we needed from calibcant/config.py, so remove it now.
W. Trevor King [Thu, 15 Mar 2012 19:09:48 +0000 (15:09 -0400)]
Merge calibcant/config.py (for temperature config options).
W. Trevor King [Thu, 15 Mar 2012 18:51:49 +0000 (14:51 -0400)]
Merge temperature.py from my unfold_protein repository.
W. Trevor King [Thu, 15 Mar 2012 11:39:52 +0000 (07:39 -0400)]
Add `steps` and `sleep` options to `move_just_onto_surface()`.
This takes advantage of yesterday's pypiezo commit:
commit
b66d6dbcb8cd381cf7515a42ab0aee4a4841beb3
Author: W. Trevor King <wking@drexel.edu>
Date: Wed Mar 14 16:18:23 2012 -0400
Add `steps` and `sleep` options for gentler `jump()`s.
and I've bumped the minimum pypiezo version accordingly.
When I was running some calibrations yesterday, I could hear the piezo
clicking, and after the calibration the deflection was shifted half a
volt or so from the initial deflection. I attribute this to the
violent piezo jumps shaking the cantilever chip from its original
position. The wimpy spring-loaded wire clips used in the MultiMode
fluid cells probably aren't helping any either ;).
W. Trevor King [Fri, 2 Mar 2012 21:22:08 +0000 (16:22 -0500)]
Use stepper.single_step instead of stepper.step_relative in AFM methods.
This avoids problems with steppers in full-step mode always rounding
the asked-for half step back to the current position. The drawback to
the new approach is that we loose backlash protection when moving away
from the surface, but the surface fitting condition ...?
W. Trevor King [Tue, 28 Feb 2012 20:25:07 +0000 (15:25 -0500)]
Fix deflection channel config extraction in AFM.move_just_onto_surface().
W. Trevor King [Tue, 28 Feb 2012 14:25:45 +0000 (09:25 -0500)]
Fix tremily -> blog.tremily in homepage URL in setup.py.
W. Trevor King [Wed, 22 Feb 2012 18:29:51 +0000 (13:29 -0500)]
Update URLs from einstein to tremily.
Also move link targets to the end of the README.
W. Trevor King [Thu, 16 Feb 2012 23:12:36 +0000 (18:12 -0500)]
Run update-copyright.py.
W. Trevor King [Thu, 16 Feb 2012 23:12:36 +0000 (18:12 -0500)]
Run update-copyright.py.
W. Trevor King [Mon, 23 Jan 2012 21:17:46 +0000 (16:17 -0500)]
Complete setpoint removal started with
1139d17967014ca0fe79773796dda182b3441f9f.
W. Trevor King [Mon, 23 Jan 2012 21:14:17 +0000 (16:14 -0500)]
Don't force integer formatting in AFM._check_target_deflection messages.
We're about to raise an exception anyway, so there's no need to be
overly picky here.
W. Trevor King [Mon, 23 Jan 2012 21:09:20 +0000 (16:09 -0500)]
AFM._check_target_deflection doesn't have access to `setpoint` in volts.
W. Trevor King [Mon, 23 Jan 2012 21:05:45 +0000 (16:05 -0500)]
Finish target_deflection -> deflection conversion started a few commits ago.
Original commit was
e5d2a98f662eafacbb26598884f44ba4d3dc341f
W. Trevor King [Mon, 23 Jan 2012 21:03:22 +0000 (16:03 -0500)]
Oops, ._deflection_channel is an AFMPiezo method.
W. Trevor King [Mon, 23 Jan 2012 21:00:23 +0000 (16:00 -0500)]
Change AFM._check_target_deflection argument name to `deflection`.
Also check for negative deflections. It can't hurt ;).
W. Trevor King [Mon, 23 Jan 2012 20:55:22 +0000 (15:55 -0500)]
Oops, remove trailing colon from `max_def = defc.get_maxdata():`.
Sloppy copy/paste.
W. Trevor King [Mon, 23 Jan 2012 20:53:04 +0000 (15:53 -0500)]
Oops, `def` is a reserved word in Python. Use `defc` instead.
W. Trevor King [Mon, 23 Jan 2012 20:41:52 +0000 (15:41 -0500)]
Add AFM._check_target_deflection to avoid approaching forever.
Also use the deflection channel config to convert `setpoint` to bits,
instead of the output z channel config.
W. Trevor King [Mon, 23 Jan 2012 20:21:46 +0000 (15:21 -0500)]
Oops, fix min_slope_position/min_slope_postion -> min_slope_ratio typo.
I need to get more sleep ;).
W. Trevor King [Mon, 23 Jan 2012 20:02:10 +0000 (15:02 -0500)]
Add min_slope_ratio argument to AFM.move_just_onto_surface.
To match the following calibcant commit:
commit
7c934e1f5f0838a42a7a0b1d5a392e3f0686e1c4
Author: W. Trevor King <wking@drexel.edu>
Date: Mon Jan 23 14:41:10 2012 -0500
Add min-slope-ratio option to BumpConfig.
W. Trevor King [Mon, 23 Jan 2012 19:41:10 +0000 (14:41 -0500)]
Add min-slope-ratio option to BumpConfig.
I was running into trouble moving to the surface with extremely long
cantilevers, as the difference between the contact slope and
non-contact drift was smaller than my hardcoded cutoff. Now the
cutoff is configurable.
W. Trevor King [Mon, 23 Jan 2012 19:29:05 +0000 (14:29 -0500)]
Remove buggy self argument from Temperature self() call.
W. Trevor King [Tue, 17 Jan 2012 22:53:03 +0000 (17:53 -0500)]
Merge irrelevant "Update to data_logger v0.4." by dropping the changes.
The new h5config framework no longer uses data_logger to locate or
save data.
W. Trevor King [Tue, 17 Jan 2012 22:49:26 +0000 (17:49 -0500)]
Update to use new h5config, pycomedi, etc.
W. Trevor King [Tue, 17 Jan 2012 22:38:54 +0000 (17:38 -0500)]
Break AFM.stepper_approach out of ._stepper_approach_again.
W. Trevor King [Fri, 13 Jan 2012 18:05:19 +0000 (13:05 -0500)]
Fix get -> get_temperature typo in AFM.get_temperature.
W. Trevor King [Fri, 30 Sep 2011 18:36:22 +0000 (14:36 -0400)]
Fix problems with the transition to the new nested-Config h5config package.
Also restore BumpConfig's `initial-position` setting, since it's
critical to running a bump. I removed it when I mistakenly thought it
was storeing the output voltage used as the initial position
(something that you'd measure during a bump). I guess I should have
read the help string before I deleted it ;).
There are also a number of numpy array -> float conversions when
loading HDF5. This avoids excessive numpy-fication with h5py v2.0.
W. Trevor King [Fri, 30 Sep 2011 18:36:22 +0000 (14:36 -0400)]
Fix problems with the transition to the new nested-Config h5config package.
Also restore BumpConfig's `initial-position` setting, since it's
critical to running a bump. I removed it when I mistakenly thought it
was storeing the output voltage used as the initial position
(something that you'd measure during a bump). I guess I should have
read the help string before I deleted it ;).
There are also a number of numpy array -> float conversions when
loading HDF5. This avoids excessive numpy-fication with h5py v2.0.
W. Trevor King [Fri, 30 Sep 2011 18:34:53 +0000 (14:34 -0400)]
Import missing SurfaceError from pypiezo.surface.
W. Trevor King [Tue, 27 Sep 2011 20:30:04 +0000 (16:30 -0400)]
Import missing FlatFit from pypiezo.surface.
W. Trevor King [Tue, 27 Sep 2011 20:22:58 +0000 (16:22 -0400)]
Update config arguments to bit/volt/meter conversion functions.
W. Trevor King [Tue, 27 Sep 2011 20:19:24 +0000 (16:19 -0400)]
Add bit/volt/meter converter imports to pyafm.afm.
W. Trevor King [Tue, 27 Sep 2011 19:50:50 +0000 (15:50 -0400)]
Remove unneccessary inputs from pyafm.afm.
W. Trevor King [Tue, 27 Sep 2011 19:40:40 +0000 (15:40 -0400)]
Update setup.py to reflect the fact that we're no longer a single module.
W. Trevor King [Thu, 15 Sep 2011 12:18:39 +0000 (08:18 -0400)]
Restructure and convert to new, nestable h5config.
W. Trevor King [Thu, 15 Sep 2011 12:17:14 +0000 (08:17 -0400)]
Convert calibcant to the new, nestable h5config.
W. Trevor King [Thu, 15 Sep 2011 12:17:14 +0000 (08:17 -0400)]
Convert calibcant to the new, nestable h5config.
W. Trevor King [Thu, 8 Sep 2011 11:45:13 +0000 (07:45 -0400)]
convert to H5config and bump to v0.7.
W. Trevor King [Thu, 8 Sep 2011 11:45:13 +0000 (07:45 -0400)]
convert to H5config and bump to v0.7.
W. Trevor King [Fri, 17 Jun 2011 18:52:15 +0000 (14:52 -0400)]
Correct vibrationss -> vibrations typo in calib_save() call.
W. Trevor King [Fri, 17 Jun 2011 18:46:26 +0000 (14:46 -0400)]
vibs -> vibrations in calib_save() keyword call from calibrate.calib().
W. Trevor King [Fri, 17 Jun 2011 18:38:54 +0000 (14:38 -0400)]
Ts -> temperatures in calib_save() keyword call from calibrate.calib().
W. Trevor King [Thu, 21 Apr 2011 20:45:59 +0000 (16:45 -0400)]
Massive rewrite (v 0.6) to base everything on Cython and revamped pypiezo.
W. Trevor King [Thu, 21 Apr 2011 20:45:59 +0000 (16:45 -0400)]
Massive rewrite (v 0.6) to base everything on Cython and revamped pypiezo.
W. Trevor King [Wed, 20 Apr 2011 20:04:15 +0000 (16:04 -0400)]
Clarify stepper motion during additional surface location attempts.
W. Trevor King [Wed, 20 Apr 2011 19:13:03 +0000 (15:13 -0400)]
Don't set handler log level; just use the logger log level.
W. Trevor King [Wed, 20 Apr 2011 18:46:04 +0000 (14:46 -0400)]
Fix typo target_def -> target_deflection.
W. Trevor King [Wed, 20 Apr 2011 18:34:43 +0000 (14:34 -0400)]
Catch FlatFit errors from all .get_surface_position calls.
W. Trevor King [Tue, 19 Apr 2011 23:42:17 +0000 (19:42 -0400)]
Add optional temperature controller attribute.
W. Trevor King [Tue, 19 Apr 2011 20:57:57 +0000 (16:57 -0400)]
Fix typos pyiezo -> piezo.
W. Trevor King [Tue, 19 Apr 2011 20:55:09 +0000 (16:55 -0400)]
Add self to _stepper_approach_again arguments :p.
W. Trevor King [Tue, 19 Apr 2011 20:32:36 +0000 (16:32 -0400)]
Add /posts/ to homepage URL in setup.py.
W. Trevor King [Tue, 19 Apr 2011 18:56:06 +0000 (14:56 -0400)]
Minor rewrite of README intro section.
W. Trevor King [Tue, 19 Apr 2011 18:52:34 +0000 (14:52 -0400)]
Minor rewrite of README intro section.
W. Trevor King [Tue, 19 Apr 2011 17:58:47 +0000 (13:58 -0400)]
Correct setpoint -> target_deflection typo.
W. Trevor King [Tue, 19 Apr 2011 17:54:48 +0000 (13:54 -0400)]
Correct axis.channel_config -> axis.axis_channel_config typo.
W. Trevor King [Tue, 19 Apr 2011 17:51:17 +0000 (13:51 -0400)]
Set `axis = ...` earlier in AFM.move_just_onto_surface().
W. Trevor King [Tue, 19 Apr 2011 14:30:32 +0000 (10:30 -0400)]
Fix LOG formatting error.
W. Trevor King [Tue, 19 Apr 2011 14:28:40 +0000 (10:28 -0400)]
Fix pymodules typo in setup.py.
W. Trevor King [Tue, 19 Apr 2011 14:18:02 +0000 (10:18 -0400)]
Begin versioning.
W. Trevor King [Fri, 28 Jan 2011 19:27:43 +0000 (14:27 -0500)]
Cleaned up README and package with pure distutils (vs. setuputils).
Also:
* Don't make calibcant modules executible. Scripts should be handled
explicitly through distutils.
* Ran ./update_copyright.py
W. Trevor King [Fri, 28 Jan 2011 19:27:43 +0000 (14:27 -0500)]
Cleaned up README and package with pure distutils (vs. setuputils).
Also:
* Don't make calibcant modules executible. Scripts should be handled
explicitly through distutils.
* Ran ./update_copyright.py
W. Trevor King [Tue, 9 Nov 2010 20:01:11 +0000 (15:01 -0500)]
Update to piezo v0.3 (based on data_logger 0.4) and bump to v0.5.
W. Trevor King [Tue, 1 Jun 2010 13:43:19 +0000 (09:43 -0400)]
Fix relative import syntax.
Fixes broken implementation from
81f9df69442d686bed368ac6db2180cd482f1acb
W. Trevor King [Tue, 1 Jun 2010 13:37:55 +0000 (09:37 -0400)]
Ran update_copyright.py
W. Trevor King [Tue, 1 Jun 2010 13:37:55 +0000 (09:37 -0400)]
Ran update_copyright.py
W. Trevor King [Tue, 1 Jun 2010 12:30:56 +0000 (08:30 -0400)]
Use relative imports (PEP 328) for calibcant sibling imports.
W. Trevor King [Tue, 1 Jun 2010 12:30:56 +0000 (08:30 -0400)]
Use relative imports (PEP 328) for calibcant sibling imports.
W. Trevor King [Thu, 18 Jun 2009 00:22:56 +0000 (20:22 -0400)]
Bumped to version 0.4.
Updated to depend on newly packaged piezo package.
W. Trevor King [Thu, 18 Jun 2009 00:22:56 +0000 (20:22 -0400)]
Bumped to version 0.4.
Updated to depend on newly packaged piezo package.
W. Trevor King [Wed, 3 Jun 2009 19:19:40 +0000 (15:19 -0400)]
Began versioning.
W. Trevor King [Fri, 27 Mar 2009 13:17:36 +0000 (09:17 -0400)]
Reposition cantilever between each bump to adjust for piezo creep.
W. Trevor King [Tue, 10 Feb 2009 18:07:48 +0000 (13:07 -0500)]
Updated documentation for calibcant.calibrate.calib_aquire.
W. Trevor King [Wed, 28 Jan 2009 13:43:54 +0000 (08:43 -0500)]
Removed old references to freq in calibrate.py after freq->push_speed change.
Also turned plotting back on by default (the change doesn't affect
command line usage).
W. Trevor King [Wed, 28 Jan 2009 13:43:54 +0000 (08:43 -0500)]
Removed old references to freq in calibrate.py after freq->push_speed change.
Also turned plotting back on by default (the change doesn't affect
command line usage).
W. Trevor King [Tue, 27 Jan 2009 14:45:24 +0000 (09:45 -0500)]
Start bumps with the cantilever _off_ the surface.
Photodiode sensitivity (and thus, bump slope) decreases as the
zero-deflection photodiode input moves away from zero Volts. In order
to mitigate the effect of this on our calibration, we need to keep
track of the zero-deflection signal. By starting our bump off the
surface, our bumps should always start and end in the zero-deflection
regime.
This will make analysis a bit more complicated though. I'll get to
that next.
W. Trevor King [Tue, 27 Jan 2009 14:40:46 +0000 (09:40 -0500)]
Control bump_speed instead of bump sample frequency.
More physically useful number. The old default speed was huge.