Added calibration file support to the JPK driver.
[hooke.git] / hooke / driver / __init__.py
index 15c05c1d7e038dafbba6e829194055858bb9db23..824a5e28b6efaec1ccb36cb761a88ab7d7d0d514 100644 (file)
@@ -24,6 +24,8 @@ commercial force spectroscopy microscopes are provided, and it's easy
 to write your own to handle your lab's specific format.
 """
 
+import logging
+
 from ..config import Setting
 from ..util.pluggable import IsSubclass, construct_graph
 
@@ -79,16 +81,22 @@ class Driver(object):
         """
         return False
 
-    def read(self, path):
+    def read(self, path, info=None):
         """Read data from `path` and return a
         ([:class:`hooke.curve.Data`, ...], `info`) tuple.
 
+        The input `info` :class:`dict` may contain attributes read
+        from the :class:`~hooke.playlist.FilePlaylist`.
+
         The `info` :class:`dict` must contain values for the keys:
         'filetype' and 'experiment'.  See :class:`hooke.curve.Curve`
         for details.
         """
         raise NotImplementedError
 
+    def logger(self):
+        return logging.getLogger('hooke')
+
 # Construct driver dependency graph and load default drivers.
 
 DRIVER_GRAPH = construct_graph(