calibcant.git
11 years agoanalyze.py: Set `changed = True` for tweaked vibration variance master
W. Trevor King [Sun, 5 May 2013 01:16:12 +0000 (21:16 -0400)]
analyze.py: Set `changed = True` for tweaked vibration variance

I missed this in 560f9f9 (Get calibcant working with the new
load_from_config-based pyafm, 2012-03-16).

11 years agosetup.py: Update trove classifiers
W. Trevor King [Sun, 5 May 2013 00:34:25 +0000 (20:34 -0400)]
setup.py: Update trove classifiers

Also modernize some of the formatting and layout.  Update pypiezo
dependency to point to most recent version.

11 years agoBump to version 0.9 0.9
W. Trevor King [Sun, 5 May 2013 00:21:26 +0000 (20:21 -0400)]
Bump to version 0.9

Changes since 0.8:
* Add --num-* arguments to calibcant-calibrate.py.
* Add smooth_window to PSD fitting.
* Fixes to parameter guessing for limited linear bumps and vibrational
  PSDs.
* Return to a safe state if calibcant-calibrate.py crashes during
  calibration.
* Record (and plot) the stepper approach curve.
* Assorted tweaks and minor bug fixes.

11 years agoRun update-copyright.py
W. Trevor King [Sun, 5 May 2013 00:20:41 +0000 (20:20 -0400)]
Run update-copyright.py

11 years ago.update-copyright.conf: convert %(project)s -> {project} formatting
W. Trevor King [Sun, 5 May 2013 00:19:22 +0000 (20:19 -0400)]
.update-copyright.conf: convert %(project)s -> {project} formatting

For update-copyright v0.5.

11 years agovibration_analyze: Add smooth_window to PSD fitting
W. Trevor King [Sun, 5 May 2013 00:13:21 +0000 (20:13 -0400)]
vibration_analyze: Add smooth_window to PSD fitting

Sometimes the broad resonant peak from the cantilever has sharper
unidentified peaks sitting on its shoulders.  In the rare case that
these peaks are taller than the cantilever peak, they can throw off
the resonant frequency portion of the parameter-guessing heuristic.
By smoothing the PSD data somewhat, we can damp down the sharp peaks
and bring the cantilever peak back to the top.

Because the amount of smoothing you'll need depends on your noise
sources and the expected width of the cantilever peak, make the
smoothing configurable.  A 10-sample-wide Hann filter (rescaled to
have unit weight) seems like a pretty conservative default.

11 years agovibration_analyze.py: Don't use the peak power for D_guess
W. Trevor King [Sat, 4 May 2013 22:27:21 +0000 (18:27 -0400)]
vibration_analyze.py: Don't use the peak power for D_guess

Use the power at the Nyquist frequency.  This is what I'd meant to use
back in 82cd9c1 (Massive rewrite (v 0.6) to base everything on Cython
and revamped pypiezo, 2011-04-21), but I goofed.  Luckily, the fitting
algorithm was generally able to recover from my poor heuristic, but
using a borked heuristic is not ideal.

The fixed heuristic should reduce the number of poorly fit cases, and
improve convergence efficiency for all cases.

11 years agovibration_analyze: Only highlight the frequency range if we have a config
W. Trevor King [Sat, 4 May 2013 22:16:24 +0000 (18:16 -0400)]
vibration_analyze: Only highlight the frequency range if we have a config

You shouldn't have to mock up a config dictionary just to plot the
PSD.  With this commit, you can skip config if you just want a
quick-and-dirty plot.

11 years agocalibcant-plot.py: Plot the stepper approach curve
W. Trevor King [Sat, 19 Jan 2013 04:08:03 +0000 (23:08 -0500)]
calibcant-plot.py: Plot the stepper approach curve

11 years agocalibcant-calibrate.py: Record the stepper approach trace
W. Trevor King [Sat, 19 Jan 2013 03:56:04 +0000 (22:56 -0500)]
calibcant-calibrate.py: Record the stepper approach trace

Sometimes these approach curves are pretty funky, so I'll start
recording them by default.

12 years agod02d4a/4d7fd3: close "unify TEXT_VERBOSE" (fixed in v0.6)
W. Trevor King [Sat, 27 Oct 2012 16:22:13 +0000 (12:22 -0400)]
d02d4a/4d7fd3: close "unify TEXT_VERBOSE" (fixed in v0.6)

TEXT_VERBOSE has been gone since:

  commit 82cd9c169d26de338e7399439062937f31389864
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Thu Apr 21 16:45:59 2011 -0400

    Massive rewrite (v 0.6) to base everything on Cython and revamped pypiezo.

12 years agod02d4a: upgrade to Bugs Everywhere Directory v1.5.
W. Trevor King [Sat, 27 Oct 2012 16:19:58 +0000 (12:19 -0400)]
d02d4a: upgrade to Bugs Everywhere Directory v1.5.

12 years ago.update-copyright.conf: update to pipe separators.
W. Trevor King [Sat, 20 Oct 2012 11:10:47 +0000 (07:10 -0400)]
.update-copyright.conf: update to pipe separators.

This brings the config file up to speed with the following
update-copyright commit:

  commit 3c68a1a48419d8b2bbc2ce0e7f1700b996ec30e9
  Author: W. Trevor King <wking@tremily.us>
  Date:   Fri Oct 19 21:52:48 2012 -0400

    project: for consistency, also separate ignored paths with pipes.

12 years agoAdd --num-* arguments to calibcant-calibrate.py.
W. Trevor King [Fri, 17 Aug 2012 18:51:30 +0000 (14:51 -0400)]
Add --num-* arguments to calibcant-calibrate.py.

This allows you to adjust the number of surface bumps, temperature
measurements, and thermal vibration measurements from the command
line, which is much more convenient than editing the calibcant.config
file directly.

You can also skip a troublesome phase.  For example, if you want to
look at the vibration data without running surface bumps, you can try:

  $ calibcant-calibrate.py --num-bumps 0
  $ calibcant-plot.py *.h5

I adjusted analyze_all() so it can keep working even with one of the
num-* configs set to zero, although you won't be able to get a valid
calibration without at least one of each type of measurement.

12 years agoFix aquire -> acquire typo in Calibrator.load_raw.__doc__.
W. Trevor King [Fri, 17 Aug 2012 16:58:51 +0000 (12:58 -0400)]
Fix aquire -> acquire typo in Calibrator.load_raw.__doc__.

12 years agoReturn to a safe state if calibcant-calibrate.py crashes during calibration.
W. Trevor King [Fri, 17 Aug 2012 16:11:29 +0000 (12:11 -0400)]
Return to a safe state if calibcant-calibrate.py crashes during calibration.

12 years agoWork around x_contact == x[0] in limited_linear_param_guess.
W. Trevor King [Thu, 2 Aug 2012 16:00:26 +0000 (12:00 -0400)]
Work around x_contact == x[0] in limited_linear_param_guess.

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

12 years agoSave the i-th vibration in analyze_all(), not the list of all vibrations.
W. Trevor King [Wed, 13 Jun 2012 18:13:36 +0000 (14:13 -0400)]
Save the i-th vibration in analyze_all(), not the list of all vibrations.

12 years agoFix temperature -> vibration typo in check_vibration().
W. Trevor King [Wed, 13 Jun 2012 18:07:44 +0000 (14:07 -0400)]
Fix temperature -> vibration typo in check_vibration().

12 years agoAllow groups to be used without filenames in temperature and vibration saves.
W. Trevor King [Wed, 13 Jun 2012 18:06:44 +0000 (14:06 -0400)]
Allow groups to be used without filenames in temperature and vibration saves.

12 years agoFix temerature_group -> temperature_group typo in analyze_all().
W. Trevor King [Wed, 13 Jun 2012 18:03:36 +0000 (14:03 -0400)]
Fix temerature_group -> temperature_group typo in analyze_all().

Introduced by:

  commit 560f9f94abbdf396b9f624e03bdb2a1f6d840bd1
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Fri Mar 16 10:02:37 2012 -0400

    Get calibcant working with the new load_from_config-based pyafm.

12 years agoAllow configuration centralizion in HDF5 files.
W. Trevor King [Wed, 13 Jun 2012 17:54:42 +0000 (13:54 -0400)]
Allow configuration centralizion in HDF5 files.

Before this commit, each bump/temperature/vibration measurement needed
it's own local copy of the configuration.  This is good, because it
allow you to store experiments where the configuration changes between
measurements (e.g. one bump with push depth of 200 nm, followed by
others with a push depth of 300 nm).  However, such per-measurement
changes should be a rare occurrence, so this commit allows you to
specify the measurement configuration in a central location.  For
example:

  /bump/0/config/bump/...
  /bump/1/config/bump/...
  /bump/2/config/bump/...
  ...

can now be consolidated to

  /config/bump/...

If you want, you can still override the central config for a
particular measurement by placing the config in the old location.

12 years agoOops, Calibrator.save_results should be a static method.
W. Trevor King [Tue, 29 May 2012 12:48:36 +0000 (08:48 -0400)]
Oops, Calibrator.save_results should be a static method.

Without this fix, you get errors like:

  Traceback (most recent call last):
    File "/usr/bin/calibcant-calibrate.py-2.7", line 46, in <module>
      sys.exit(main(sys.argv[1:]))
    File "/usr/bin/calibcant-calibrate.py-2.7", line 36, in main
      k,k_s,data = calibrator.calibrate(filename=filename)
    File "/usr/lib/python2.7/site-packages/calibcant/calibrate.py", line 495, in calibrate
      spring_constant=k, spring_constant_deviation=k_s, **data)
  TypeError: save_results() got multiple values for keyword argument 'filename'

12 years ago.update-copyright.conf should not be executable.
W. Trevor King [Fri, 11 May 2012 18:03:47 +0000 (14:03 -0400)]
.update-copyright.conf should not be executable.

12 years agoOops, analyze_all's data argument is a dict, not an hdf5 group.
W. Trevor King [Fri, 11 May 2012 16:34:03 +0000 (12:34 -0400)]
Oops, analyze_all's data argument is a dict, not an hdf5 group.

12 years agoBetter errors from analyze_all when we're missing raw data.
W. Trevor King [Fri, 11 May 2012 16:21:56 +0000 (12:21 -0400)]
Better errors from analyze_all when we're missing raw data.

12 years agoAdjust analyze_all to work with missing data['raw'] or data['processed'].
W. Trevor King [Fri, 11 May 2012 14:49:46 +0000 (10:49 -0400)]
Adjust analyze_all to work with missing data['raw'] or data['processed'].

This is especially useful for analyzing data where the initial
analysis crashed for some reason, but and you want to re-analyze after
you fixed the bug.

12 years agoFurther fixups to get calibcant-analyze.py working.
W. Trevor King [Fri, 20 Apr 2012 18:17:30 +0000 (14:17 -0400)]
Further fixups to get calibcant-analyze.py working.

12 years agoNotice if lengths of bumps, temps, or vibs changes in analyze_all.
W. Trevor King [Fri, 20 Apr 2012 17:58:35 +0000 (13:58 -0400)]
Notice if lengths of bumps, temps, or vibs changes in analyze_all.

For example, if a vibration has a wierd jump that throws off the
average, you can move that vibration from, say, 'vibration/12' to
'vibration/-1'.  This saves the data, but does not use it to calculate
the spring constant.

With the old logic, the shortened array of variances wasn't saved over
the old ones, because none of the analysis for an individual vibration
had changed.

12 years agoUse 'read' instead of 'append' as the file mode in Calibrator.load_raw().
W. Trevor King [Fri, 20 Apr 2012 17:57:25 +0000 (13:57 -0400)]
Use 'read' instead of 'append' as the file mode in Calibrator.load_raw().

It's safer that way (less chance of corrupting your data).

12 years agoFix mode typo when running analyze_all() without dry_run.
W. Trevor King [Fri, 20 Apr 2012 17:16:02 +0000 (13:16 -0400)]
Fix mode typo when running analyze_all() without dry_run.

12 years agoConvert calibcant-analyze.py to work with load_all and analyze_all.
W. Trevor King [Fri, 20 Apr 2012 17:11:55 +0000 (13:11 -0400)]
Convert calibcant-analyze.py to work with load_all and analyze_all.

This catches that script up with

  commit 560f9f94abbdf396b9f624e03bdb2a1f6d840bd1
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Fri Mar 16 10:02:37 2012 -0400

    Get calibcant working with the new load_from_config-based pyafm.

12 years agoUse tight autoscalling for analyze plots.
W. Trevor King [Fri, 20 Apr 2012 17:06:54 +0000 (13:06 -0400)]
Use tight autoscalling for analyze plots.

12 years agoChange my email address from drexel.edu to tremily.us.
W. Trevor King [Wed, 18 Apr 2012 17:11:32 +0000 (13:11 -0400)]
Change my email address from drexel.edu to tremily.us.

12 years agoFix d -> deflection in bump_analyze.fit() bailout code.
W. Trevor King [Tue, 27 Mar 2012 17:11:52 +0000 (13:11 -0400)]
Fix d -> deflection in bump_analyze.fit() bailout code.

12 years agoAdd vibration_analyze.breit_wigner_resonant_frequency().
W. Trevor King [Tue, 27 Mar 2012 17:11:01 +0000 (13:11 -0400)]
Add vibration_analyze.breit_wigner_resonant_frequency().

Now people using the module don't have to think or read comments to
determine the resonant frequency from fitted parameters ;).

12 years agoFix argument indentation in vibration_analyze.plot() definition.
W. Trevor King [Tue, 27 Mar 2012 16:25:19 +0000 (12:25 -0400)]
Fix argument indentation in vibration_analyze.plot() definition.

12 years agoFix gaussian normalization in vibration_analyze.plot (no need for binwidth).
W. Trevor King [Tue, 27 Mar 2012 16:25:15 +0000 (12:25 -0400)]
Fix gaussian normalization in vibration_analyze.plot (no need for binwidth).

12 years agoRemove duplicate plot call from vibration_analyze.analyze.
W. Trevor King [Mon, 26 Mar 2012 22:30:32 +0000 (18:30 -0400)]
Remove duplicate plot call from vibration_analyze.analyze.

12 years agoOops, bump_analyze.plot should return `figure`, not `plot`.
W. Trevor King [Mon, 26 Mar 2012 21:28:57 +0000 (17:28 -0400)]
Oops, bump_analyze.plot should return `figure`, not `plot`.

12 years agoUse tight autoscaling for bump plots.
W. Trevor King [Mon, 26 Mar 2012 21:23:33 +0000 (17:23 -0400)]
Use tight autoscaling for bump plots.

12 years agoPlotting commands now return the plots they generate.
W. Trevor King [Mon, 26 Mar 2012 21:18:59 +0000 (17:18 -0400)]
Plotting commands now return the plots they generate.

This lets you manipulate them in external code to fine tune them to
your particular situation.  The default plots are useful, but not
always beautiful.  Now you can write a script to generate beautiful
plots for your poster without duplicating code from the plot
functions.

12 years agoUse tight autoscaling for vibration plots.
W. Trevor King [Mon, 26 Mar 2012 20:40:36 +0000 (16:40 -0400)]
Use tight autoscaling for vibration plots.

12 years agoAdd calibcant-calibrate.py, now that we have a configurable default AFM to calibrate.
W. Trevor King [Mon, 26 Mar 2012 16:54:42 +0000 (12:54 -0400)]
Add calibcant-calibrate.py, now that we have a configurable default AFM to calibrate.

12 years agoGet calibcant working with the new load_from_config-based pyafm.
W. Trevor King [Fri, 16 Mar 2012 14:02:37 +0000 (10:02 -0400)]
Get calibcant working with the new load_from_config-based pyafm.

12 years agoOnly calculate relative errors if a previous value exists.
W. Trevor King [Fri, 2 Mar 2012 19:17:19 +0000 (14:17 -0500)]
Only calculate relative errors if a previous value exists.

This avoids:

  TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

12 years agoOops, use numpy arrays instead of lists for the last commit.
W. Trevor King [Fri, 2 Mar 2012 19:11:08 +0000 (14:11 -0500)]
Oops, use numpy arrays instead of lists for the last commit.

This avoids:

  Traceback (most recent call last):
    File ".../calibcant/analyze.py", line 189, in calib_analyze
      ps_m = bumps.mean()  # ps for photo-sensitivity
  AttributeError: 'list' object has no attribute 'mean'

12 years agoAllow calib_analyze_all to run when there are no previous analyzed bumps, etc.
W. Trevor King [Fri, 2 Mar 2012 18:57:14 +0000 (13:57 -0500)]
Allow calib_analyze_all to run when there are no previous analyzed bumps, etc.

This avoids:

  Traceback (most recent call last):
    ...
    File ".../calibcant/analyze.py", line 410, in calib_analyze_all
      bumps[i] = sensitivity
  TypeError: 'NoneType' object does not support item assignment

which can happen if you construct the calibration datafile by hand and
have not yet analyzed it with calibcant.

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

12 years agoRun update-copyright.py.
W. Trevor King [Thu, 16 Feb 2012 23:12:36 +0000 (18:12 -0500)]
Run update-copyright.py.

12 years agoTransition to my external update-copyright package.
W. Trevor King [Thu, 16 Feb 2012 23:08:21 +0000 (18:08 -0500)]
Transition to my external update-copyright package.

http://pypi.python.org/pypi/update-copyright/

12 years agoAdd 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.

13 years agoUpgraded BE repository to v1.4.
W. Trevor King [Tue, 8 Nov 2011 12:52:16 +0000 (07:52 -0500)]
Upgraded BE repository to v1.4.

13 years agoUpdate calib_analyze_all for nested Configs.
W. Trevor King [Tue, 4 Oct 2011 15:41:42 +0000 (11:41 -0400)]
Update calib_analyze_all for nested Configs.

Also wrap `figure.show` calls to avoid calling them when using
Matplotlib backends that do not support that method (e.g. Cairo).

13 years agoAdjust surface parameter guessing to be resilient to off-surface bumps.
W. Trevor King [Fri, 30 Sep 2011 19:52:53 +0000 (15:52 -0400)]
Adjust surface parameter guessing to be resilient to off-surface bumps.

Not that these should happen, but if they do they shouldn't crash the
calibration.

13 years agoFix problems with the transition to the new nested-Config h5config package.
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.

13 years agoConvert 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.

13 years agoconvert 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.

13 years agoFix real-T handling in T_acquire().
W. Trevor King [Thu, 28 Jul 2011 19:18:29 +0000 (15:18 -0400)]
Fix real-T handling in T_acquire().

13 years agoUse abs(C) in fit_psd() (to match breit_wigner()).
W. Trevor King [Fri, 17 Jun 2011 19:50:36 +0000 (15:50 -0400)]
Use abs(C) in fit_psd() (to match breit_wigner()).

13 years agoCorrect vibrationss -> vibrations typo in calib_save() call.
W. Trevor King [Fri, 17 Jun 2011 18:52:15 +0000 (14:52 -0400)]
Correct vibrationss -> vibrations typo in calib_save() call.

13 years agovibs -> vibrations in calib_save() keyword call from calibrate.calib().
W. Trevor King [Fri, 17 Jun 2011 18:46:26 +0000 (14:46 -0400)]
vibs -> vibrations in calib_save() keyword call from calibrate.calib().

13 years agoTs -> temperatures 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().

13 years agoGive scripts more globally unique names.
W. Trevor King [Thu, 21 Apr 2011 21:08:54 +0000 (17:08 -0400)]
Give scripts more globally unique names.

13 years agoOops. root -> 'bin' in setup.py script listing.
W. Trevor King [Thu, 21 Apr 2011 21:06:56 +0000 (17:06 -0400)]
Oops.  root -> 'bin' in setup.py script listing.

13 years agoList analyze and plot_calibration scripts in setup.py.
W. Trevor King [Thu, 21 Apr 2011 21:03:04 +0000 (17:03 -0400)]
List analyze and plot_calibration scripts in setup.py.

13 years agoFix up README so it is standard reStructuredText.
W. Trevor King [Thu, 21 Apr 2011 20:54:40 +0000 (16:54 -0400)]
Fix up README so it is standard reStructuredText.

13 years agoOops, actually bump __version__ to 0.6.
W. Trevor King [Thu, 21 Apr 2011 20:52:43 +0000 (16:52 -0400)]
Oops, actually bump __version__ to 0.6.

13 years agoMassive rewrite (v 0.6) to base everything on Cython and revamped pypiezo. 0.6
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.

13 years agoCleaned up README and package with pure distutils (vs. setuputils).
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

13 years agoDon't import VERSION (now __version__) in calibcant.common.
W. Trevor King [Wed, 8 Dec 2010 14:43:32 +0000 (09:43 -0500)]
Don't import VERSION (now __version__) in calibcant.common.

14 years agoUpdate to piezo v0.3 (based on data_logger 0.4) and bump to v0.5. 0.5
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.

14 years agoAdjust update_copyright.py to handle Bazaar repos + minor fixes
W. Trevor King [Tue, 1 Jun 2010 14:45:09 +0000 (10:45 -0400)]
Adjust update_copyright.py to handle Bazaar repos + minor fixes

14 years agoFix relative import syntax.
W. Trevor King [Tue, 1 Jun 2010 13:43:19 +0000 (09:43 -0400)]
Fix relative import syntax.

Fixes broken implementation from
  81f9df69442d686bed368ac6db2180cd482f1acb

14 years agoAdded .gitignore
W. Trevor King [Tue, 1 Jun 2010 13:38:47 +0000 (09:38 -0400)]
Added .gitignore

14 years agoRan update_copyright.py
W. Trevor King [Tue, 1 Jun 2010 13:37:55 +0000 (09:37 -0400)]
Ran update_copyright.py

14 years agoAdded update_copyright.py to automate copyright blurb maintenance
W. Trevor King [Tue, 1 Jun 2010 13:36:40 +0000 (09:36 -0400)]
Added update_copyright.py to automate copyright blurb maintenance

14 years agoUse 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.

14 years agoMove LICENSE->COPYING and package ez_setup.py without installing it.
W. Trevor King [Tue, 1 Jun 2010 12:14:57 +0000 (08:14 -0400)]
Move LICENSE->COPYING and package ez_setup.py without installing it.

15 years agoBumped to version 0.4. 0.4
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.

15 years agoAdded optional ability to use naive vibration variance calculation.
W. Trevor King [Tue, 16 Jun 2009 19:05:10 +0000 (15:05 -0400)]
Added optional ability to use naive vibration variance calculation.

Now you don't have to fit the vibration power spectral density if you
don't want to.  The only reason I can think of for not fitting would be
to `emulate' older calibration software that doesn't have the fitting
capability, or to provide a simple point-of-reference for comparing
various fitting models.

15 years agoRestored linear-fitting option to surface bumps.
W. Trevor King [Tue, 16 Jun 2009 17:05:34 +0000 (13:05 -0400)]
Restored linear-fitting option to surface bumps.

Now you don't have to use quadratic fitting if you don't want to.  This
mitigates problems associated with poorly defined contact-kinks, since
it's not a good idea to focus on the post-kink slope if you don't have
a good idea of where the kink actually is.  The limited_linear model
retains the non-contact and high-voltage-rail flat-line portions, with
a linear contact regime between the two.

Additional minor changes include:
  * Average deflection printout from vib_analyze in TEXT_VERBOSE mode.
    To make it easier to demonstrate that variance increases as the mean
    deflection deviates further from zero.
  * Corrected usage string in bump_analyze.py which had been out of date
    before.

15 years agoClarified usage information for vib_analyze.py
W. Trevor King [Wed, 10 Jun 2009 01:08:29 +0000 (21:08 -0400)]
Clarified usage information for vib_analyze.py

15 years agoReposition cantilever between each bump to adjust for piezo creep.
W. Trevor King [Fri, 27 Mar 2009 13:17:36 +0000 (09:17 -0400)]
Reposition cantilever between each bump to adjust for piezo creep.

15 years agoBroke bump unit conversion out into its own functions.
W. Trevor King [Mon, 23 Feb 2009 16:28:42 +0000 (11:28 -0500)]
Broke bump unit conversion out into its own functions.

To provide conversion functions for other scripts, e.g. scale_unfold.py.

15 years agoSet default maxFreq to 25 kHz. Unset pylab.hold for the bump_plot residual.
W. Trevor King [Thu, 12 Feb 2009 05:24:25 +0000 (00:24 -0500)]
Set default maxFreq to 25 kHz.  Unset pylab.hold for the bump_plot residual.

It's probably a better idea to set the maxFreq to the Nyquist freq by
default, but only time for a quick hack at the moment.  You'll have to
neck down maxFreq to 7-10 kHz for softer cantilevers (~< 40 pN/nm),
since otherwise you'll start picking up higher order modes.

The bump_plot fix was just because plotting a bunch of data is _slow_.
Pylab in general is no speed demon, so the less extra work I give it,
the better.

15 years agoUpdated documentation for calibcant.calibrate.calib_aquire.
W. Trevor King [Tue, 10 Feb 2009 18:07:48 +0000 (13:07 -0500)]
Updated documentation for calibcant.calibrate.calib_aquire.

15 years agobump_plot() plotVerbose now defaults to False.
W. Trevor King [Wed, 28 Jan 2009 15:42:05 +0000 (10:42 -0500)]
bump_plot() plotVerbose now defaults to False.

That way you don't have to specify plotVerbose=False to make it shut up ;).

15 years agoShiny, new, flexible bump fitting framework.
W. Trevor King [Wed, 28 Jan 2009 13:46:10 +0000 (08:46 -0500)]
Shiny, new, flexible bump fitting framework.

The bump fitting algorithm has been upgraded due to my increased
understanding of the complexity of the photodiode.

Sensitivity (bump slope) decreases as you move away from a zero volt
photodiode output.  Most of the time anyway.  We should be able to
handle data with a gentle camber, and we need to know what voltage
corresponds to the zero-deflection signal.

This prompted the recent change of bump aquisition to begin just _off_
the surface instead of just _on_ the surface.  Now we have to deal with
finding the location of the surface kink, so I split the fitting out
into its own function which least squares fits the data to whatever
model it's passed (currently via Levenburg-Marquardt).

Since the model is now it's own stand-alone entity, I got fancy and
added quadratic fits (to deal with camber) and clipping (to deal with
out-of-range signals).  So there should be no more need of manually
clipping in the tweakfiles or using the --cut-contact option in
bump_analyze (which has been removed).

I also enhanced the output of bump_plot to show the guess, fit, and
residual, in case anyone needs convincing that the fit is working, or is
troubleshooting a new model.

15 years agoRemoved old references to freq in calibrate.py after freq->push_speed change.
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).

15 years agoStart bumps with the cantilever _off_ the surface.
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.

15 years agoControl bump_speed instead of bump sample frequency.
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.

15 years agoVarious adjustments. I should commit more often ;).
W. Trevor King [Tue, 27 Jan 2009 14:30:41 +0000 (09:30 -0500)]
Various adjustments.  I should commit more often ;).

Added # comments to tweakfile syntax.

Played around with adding a white-noise floor in the vibration fitting,
but the fits didn't look all that convincing.  Some of the white-noise
code is still in place, but I think it's currently disabled ;).

Fixed some typos in TEXT_VERBOSE output in vib_analyze.py

15 years agoPrepared for distribution.
W. Trevor King [Thu, 8 Jan 2009 19:06:57 +0000 (14:06 -0500)]
Prepared for distribution.

Fixed lines in the Makefile that I hadn't changed when I copied it into
this project in the beginning.  Also added GPL blurbs to two py files.

15 years agoFixed C->K conversion bug in T_analyze.py
W. Trevor King [Thu, 8 Jan 2009 19:05:11 +0000 (14:05 -0500)]
Fixed C->K conversion bug in T_analyze.py

Closes 327f4db8-3119-4ec1-a762-a3115254608a

15 years agoNew Marisa/me calibration difference bug 327f4db8-3119-4ec1-a762-a3115254608a
W. Trevor King [Thu, 8 Jan 2009 18:25:30 +0000 (13:25 -0500)]
New Marisa/me calibration difference bug 327f4db8-3119-4ec1-a762-a3115254608a

15 years agoAdd trailing endline to calibration analysis files.
W. Trevor King [Thu, 8 Jan 2009 18:23:53 +0000 (13:23 -0500)]
Add trailing endline to calibration analysis files.

15 years agoFixed old FFT_tools portions of Makefile to calibcant
W. Trevor King [Thu, 8 Jan 2009 16:46:39 +0000 (11:46 -0500)]
Fixed old FFT_tools portions of Makefile to calibcant

15 years agoFixed one_o_Vphoto_2_m typo in calib_analyze()
W. Trevor King [Thu, 8 Jan 2009 16:45:49 +0000 (11:45 -0500)]
Fixed one_o_Vphoto_2_m typo in calib_analyze()