# You should have received a copy of the GNU General Public License along with
# calibcant. If not, see <http://www.gnu.org/licenses/>.
-"""Define some variables to configure the package for a particular lab
-and workflow."""
+"""h5config support, so we can easily save what we did and load it later.
+"""
import sys as _sys
from FFT_tools import window_hann as _window_hann
import h5config.config as _config
import h5config.tools as _h5config_tools
+from pyafm.config import AFMConfig as _AFMConfig
class PackageConfig (_h5config_tools.PackageConfig):
name='matplotlib',
help='Plot piezo motion using `matplotlib`.',
default=False),
- _config.FloatSetting(
- name='temperature',
- help=('Default temperature for thermal calibration in degrees '
- 'Celsius.'),
- default=22),
]
-class _TemperatureUnit (object):
- pass
-class Celsius (_TemperatureUnit):
- pass
-class Kelvin (_TemperatureUnit):
- pass
-
-class TemperatureConfig (_config.Config):
- "Configure `calibcant` temperature operation"
- settings = [
- _config.ChoiceSetting(
- name='units',
- help='Units of raw temperature measurements.',
- default=Celsius,
- choices=[
- ('Celsius', Celsius),
- ('Kelvin', Kelvin),
- ]),
- _config.BooleanSetting(
- name='default',
- help=('The temperature values are defaults (vs. real '
- 'measurements).'),
- default=True),
- ]
class _BumpModel (object):
pass
]
+class TemperatureConfig (_config.Config):
+ "Configure `calibcant` temperature operation"
+ settings = [
+ _config.FloatSetting(
+ name='sleep',
+ help=('Time between temperature measurements (in seconds) to get '
+ 'independent measurements when reading from slow sensors.'),
+ default=1),
+ ]
+
+
class _VibrationModel (object):
pass
class Variance (_VibrationModel):
]
-class CalibrationConfig (_config.Config):
+class CalibrateConfig (_config.Config):
"Configure a full `calibcant` calibration run"
settings = [
+ _config.ConfigSetting(
+ name='afm',
+ help='Configure the AFM used to carry out the calibration',
+ config_class=_AFMConfig),
_config.ConfigSetting(
name='bump',
help='Configure the surface bumps',
name='num-vibrations',
help='Number of thermal vibration measurements.',
default=20),
- _config.FloatSetting(
- name='temperature-sleep',
- help=('Time between temperature measurements (in seconds) to get '
- 'independent measurements when reading from slow sensors.'),
- default=1),
_config.FloatSetting(
name='vibration-spacing',
help=('Approximate distance from the surface in meters for the '