calibcant.git
12 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.

12 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().

12 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()).

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

12 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().

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

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

13 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

13 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

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

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

13 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

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

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

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

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

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

14 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()

15 years agoUpdated to new data_logger log_dir $DEFAULT$ syntax for easier log_dir defs.
W. Trevor King [Thu, 8 Jan 2009 15:49:59 +0000 (10:49 -0500)]
Updated to new data_logger log_dir $DEFAULT$ syntax for easier log_dir defs.

15 years agocalib_save_analysis() now uses string_errors() to format output.
W. Trevor King [Sat, 3 Jan 2009 15:29:46 +0000 (10:29 -0500)]
calib_save_analysis() now uses string_errors() to format output.

15 years agoAdd lines to analyze.calib_plot().
W. Trevor King [Sun, 21 Dec 2008 08:42:12 +0000 (03:42 -0500)]
Add lines to analyze.calib_plot().

There aren't many points, and line connecting lines increase visibility.

15 years agoApply some fixes to get calibrations working and bump version. 0.3
W. Trevor King [Sun, 21 Dec 2008 05:12:00 +0000 (00:12 -0500)]
Apply some fixes to get calibrations working and bump version.

Mostly namespace problems due to `from numpy import *` and the
like.  Things seem to work now.  I think we're ready for prime-time.

15 years agocalibrate.py should now work.
W. Trevor King [Sun, 21 Dec 2008 05:01:11 +0000 (00:01 -0500)]
calibrate.py should now work.

A bunch of changes in one commit, sorry.

Moved to fledgling splittable_kwargs system to make default argument
maintenance easier.  I expect the splittable_kwargs system still has
some growing to do, but it's already better than the old system.

Merged BE database from the calibcant subdir into the main BE database.
It was a mistake to create the database there in the first place.

15 years agoAdded pylab flag to bump_analyze.py
W. Trevor King [Fri, 19 Dec 2008 05:03:38 +0000 (00:03 -0500)]
Added pylab flag to bump_analyze.py

15 years agoAdded comparison to vib_analyze_naive() in vib_analyze().
W. Trevor King [Mon, 15 Dec 2008 14:20:40 +0000 (09:20 -0500)]
Added comparison to vib_analyze_naive() in vib_analyze().

This will protect against really hideous fits :p.  It also lead to
fixes for outdated code in vib_analyze_naive() (it hadn't been used in
a while) and some outdated comments in vib_analyze().

Finally, added abs()ing for the always-positive fit parameters A and B
when using the scipy.optimize.leastsq() method.

15 years agoMoved fitting from GnuplotBiDir to scipy.optimize.leastsq in vib_analyze.
W. Trevor King [Tue, 2 Dec 2008 20:27:44 +0000 (15:27 -0500)]
Moved fitting from GnuplotBiDir to scipy.optimize.leastsq  in vib_analyze.

Much better fit quality.  See bug f3ba76cd-eddd-4520-bb2a-17ca371ac6b6

15 years agoFixed poor treatment of non-tweakfiles in vib_analyze.
W. Trevor King [Tue, 2 Dec 2008 17:05:37 +0000 (12:05 -0500)]
Fixed poor treatment of non-tweakfiles in vib_analyze.

See bug 3059911a-963c-472e-a9d3-bf0a290de1a2.

15 years agoInitialized a Bugs-Everywhere bugtracking directory.
W. Trevor King [Wed, 26 Nov 2008 22:02:30 +0000 (17:02 -0500)]
Initialized a Bugs-Everywhere bugtracking directory.

However, the 'bug' I initialized it for
  1456fd10-2036-46de-b18e-ddf8cab14ae2
was a broken workflow, not a bug :p.  Sigh.

15 years agoPlot span of fitted frequencies in vib_anayze.py.
W. Trevor King [Wed, 26 Nov 2008 21:45:54 +0000 (16:45 -0500)]
Plot span of fitted frequencies in vib_anayze.py.

15 years agoChanged guessed Q from 5 to 1, which gives about the right breadth.
W. Trevor King [Wed, 26 Nov 2008 21:26:51 +0000 (16:26 -0500)]
Changed guessed Q from 5 to 1, which gives about the right breadth.

I'm dubious about the fit quality though.  Looking at the fit.log
output after looking at the 20080919_cantA_tweak.vib data again reveals
  After 4 iterations the fit converged.
  final sum of squares of residuals : 9.6001e+08
  rel. change during last iteration : -2.46003e-07
for the first curve, and similar residuals (and exactly 4 iterations)
for the other curves.  Hmm.  I should probably explicitly show the range
of frequency space I'm fitting in.

15 years agoAdded guessed Lorentzian plot option to vib_analyze.
W. Trevor King [Wed, 26 Nov 2008 21:17:59 +0000 (16:17 -0500)]
Added guessed Lorentzian plot option to vib_analyze.

This explains why my Lorentzians are occasionally too sharp...
For example, consider the 2nd and 4th fit in
  cd ~/rsrch/data/z_piezo_calib/
  cc_vib_analyze.py  -ct 20080919_cantA_tweak.vib -pG

(I know, I know, should be rsrch/data/calibcant...)

15 years agoResistribute vib_analyze pylab.hold()s to avoid auto-generated axis.
W. Trevor King [Wed, 26 Nov 2008 21:07:58 +0000 (16:07 -0500)]
Resistribute vib_analyze pylab.hold()s to avoid auto-generated axis.

With the previous setup, the first call to hold() created a subplot(111)
axis that the rest of the subplots wrote over.  Ugly.  Better now.

15 years agoCrop vib_analyze pylab Lorentzian fitline when it goes off-axis.
W. Trevor King [Wed, 26 Nov 2008 21:05:08 +0000 (16:05 -0500)]
Crop vib_analyze pylab Lorentzian fitline when it goes off-axis.

15 years agoAdded fit-curve to vib_analyze's pylab output.
W. Trevor King [Wed, 26 Nov 2008 20:46:28 +0000 (15:46 -0500)]
Added fit-curve to vib_analyze's pylab output.

Gave up on the gnuplot output for now.

15 years agoFixed non-interactive pylab plotting setup in common.py
W. Trevor King [Thu, 20 Nov 2008 01:27:58 +0000 (20:27 -0500)]
Fixed non-interactive pylab plotting setup in common.py

Also fixed spacing in analyze.py from last change and removed some
.pyc files from versioning.

15 years agocreated & fixed bug 3faa92db-cb93-4e14-a8ec-32ab4eedf83b
W. Trevor King [Mon, 17 Nov 2008 15:06:56 +0000 (10:06 -0500)]
created & fixed bug 3faa92db-cb93-4e14-a8ec-32ab4eedf83b

15 years agoAdded ez_setup.py installation wrapper and cleaned up License info.
W. Trevor King [Tue, 11 Nov 2008 16:02:15 +0000 (11:02 -0500)]
Added ez_setup.py installation wrapper and cleaned up License info.

15 years agoBegan versioning. 0.2
W. Trevor King [Tue, 11 Nov 2008 15:51:25 +0000 (10:51 -0500)]
Began versioning.