Temporary fix to hooke/driver/wtk.py now that data_logger is deprecated.
authorW. Trevor King <wking@drexel.edu>
Thu, 10 Nov 2011 20:37:47 +0000 (15:37 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 10 Nov 2011 20:37:47 +0000 (15:37 -0500)
hooke/driver/wtk.py

index baac1473599dc90d2a2d3f54f7d97855fe9fb9e9..7fbc822a8518fdc592c70c8a049693e7e5aac277 100644 (file)
@@ -49,17 +49,6 @@ from .. import curve as curve
 from ..config import Setting
 from . import Driver as Driver
 
-try:
-    import calibcant.config
-    calibcant_dir = calibcant.config.LOG_DIR
-except ImportError:
-    calibcant_dir = None
-
-try:
-    import data_logger
-except ImportError:
-    data_logger = None
-
 
 class WTKDriver (Driver):
     """Handle W. Trevor King's data_logger data format.
@@ -72,7 +61,7 @@ class WTKDriver (Driver):
             Setting(section=self.setting_section, help=self.__doc__),
             Setting(section=self.setting_section,
                     option='cantilever calibration directory',
-                    value=calibcant_dir, type='path',
+                    value='~/rsrch/data/calibrate_cantilever', type='path',
                     help='Set the directory where cantilever calibration data is stored'),
             ]
 
@@ -218,7 +207,8 @@ class WTKDriver (Driver):
         if basedir == None:
             basedir = self.config['cantilever calibration directory']
         YYYYMMDD = time.strftime("%Y%m%d", time.localtime(timestamp))
-        dir = os.path.join(data_logger.normalize_log_dir(basedir), YYYYMMDD)
+        basedir = os.path.expanduser(basedir)
+        dir = os.path.join(basedir, YYYYMMDD)
         if not os.path.exists(dir):
             return []
         all_calibfiles = os.listdir(dir) # everything in the directory