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