Various adjustments. I should commit more often ;).
[calibcant.git] / calibcant / config.py
1 # calibcant - tools for thermally calibrating AFM cantilevers
2 #
3 # Copyright (C) 2007,2008, William Trevor King
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # See the GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19 #
20 # The author may be contacted at <wking@drexel.edu> on the Internet, or
21 # write to Trevor King, Drexel University, Physics Dept., 3141 Chestnut St.,
22 # Philadelphia PA 19104, USA.
23
24 """Define some variables to configure the package for a particular lab
25 and workflow."""
26
27 import z_piezo
28
29 DEFAULT_TEMP = 22  # assume 22 deg C
30 LOG_DATA = True  # quietly grab all real-world data and log to LOG_DIR
31 LOG_DIR = '$DEFAULT$/calibrate_cantilever'
32 GNUFIT_DATA_BASE='./calibrate_cantilever_fitdata'
33 TEXT_VERBOSE = True      # for debugging
34 GNUPLOT_VERBOSE = True   # turn on fit check plotting
35 PYLAB_VERBOSE = False    # turn on plotting
36 PYLAB_INTERACTIVE = True # select between draw() and show() for flushing plots
37 BASE_FIGNUM = 20 # to avoid writing to already existing figures
38
39
40 # HACK
41 # make sure you make a system note (add_system_note) if you change
42 # these in case you don't have access to a z_piezo for conversion
43 # functions
44
45 # zpGain      zpiezo applied voltage per output Volt
46 zpGain = z_piezo.DEFAULT_GAIN
47 # zpSensitivity  nm zpiezo response per applied Volt
48 zpSensitivity = z_piezo.DEFAULT_SENSITIVITY
49 # Vzp_out2V   function that converts output DAC bits to Volts
50 Vzp_out2V = z_piezo.DEFAULT_VZP_OUT_2_VOLTS
51 # Vphoto_in2V function that converts input ADC bits to Volts
52 Vphoto_in2V = z_piezo.DEFAULT_VPHOTO_IN_2_VOLTS
53 # zeroVphoto_bits  ADC bit output for a 0V input
54 zeroVphoto_bits = z_piezo.DEFAULT_ZERO_PHOTODIODE_BITS