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.
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'),
]
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