#
# calibcant - tools for thermally calibrating AFM cantilevers
#
-# Copyright (C) 2007,2008, William Trevor King
+# Copyright (C) 2007-2009 William Trevor King
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
from optparse import OptionParser
usage_string = ('%prog <input-file>\n'
- '2008, W. Trevor King.\n'
+ '2007-2009 W. Trevor King.\n'
'\n'
- 'Deflection power spectral density (PSD) data (X^2/Hz)\n'
- 'and returns the variance in X units (X^2)\n'
- '<input-file> should be 1 column ASCII without a header line.\n'
+ 'There are several operation modes, each handling a different <input-file>\n'
+ 'type. In each case, the output is the fitted variance (in square Volts).\n'
+ '\n'
+ 'Single file mode without datalogger mode (the default) :\n'
+ '<input-file> should be a 1 column ASCII without a header line of cantilever\n'
+ 'deflection (in bits)\n'
'e.g: "<deflection bits>\\n..."\n'
- #TODO, better overview of input modes, e.g. a la T_analyze
+ '\n'
+ 'Single file mode with datalogger mode :\n'
+ 'Same as without datalogger mode, except the input should be a datalogger file\n'
+ 'with data stored in bits (e.g. as saved by the unfold module).\n'
+ '\n'
+ 'Tweak file mode:\n'
+ 'Runs the same analysis as in single file mode for each vib file in a tweak\n'
+ 'file. Each line in the tweak file specifies a single vib file. Blank lines\n'
+ 'and those beginning with a pound sign (#) are ignored. Vib files are valid\n'
+ 'datalogger files as per single-file-with-datalogger-mode.\n'
)
parser = OptionParser(usage=usage_string, version='%prog 0.1')
parser.add_option('-f', '--sample-freq', dest='freq', default=100e3,
config.GNUPLOT_VERBOSE = options.gnuplot
PLOT_GUESSED_LORENTZIAN = options.plot_guess
- if options.tweakmode == False :
+ if options.tweakmode == False : # single file mode
if options.datalogger_mode:
data = vib_load(ifilename)
deflection_bits = data['Deflection input']
if options.ofilename != None :
ofile.close()
-