from .. import curve as curve # this module defines data containers.
from .. import experiment as experiment # this module defines expt. types
-from ..config import Setting # configurable setting class
from . import Driver as Driver # this is the Driver base class
match = type_re.match(image['@4:Image Data'])
assert match != None, 'Bad regexp for %s, %s' \
% ('@4:Image Data', image['@4:Image Data'])
- assert match.group(1).lower() == match.group(2).replace(' ','').lower(), \
- 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2))
+ if version == '0x06130001' and match.group(1) == 'ZLowVoltage':
+ assert match.group(2) == 'Low Voltage Z', \
+ 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2))
+ else:
+ assert match.group(1).lower() == match.group(2).replace(' ','').lower(), \
+ 'Name missmatch: "%s", "%s"' % (match.group(1), match.group(2))
tname = match.group(2)
else:
assert version == '0x07200000', version
# offset assumed if raw data is signed...
nm_sens_re = re.compile('V ([.0-9]*) nm/V')
- match = nm_sens_re.match(info['Scanner list']['@Sens. Zsens'])
- assert match != None, 'Bad regexp for %s/%s, %s' \
- % ('Scanner list', '@Sens. Zsens', info['Scanner list']['@4:Z scale'])
+ if version in ['0x06120002', '0x06130001']:
+ match = nm_sens_re.match(info['Ciao scan list']['@Sens. ZSensorSens'])
+ assert match != None, 'Bad regexp for %s/%s, %s' \
+ % ('Ciao scan list', '@Sens. ZSensorSens',
+ info['Ciao scan list']['@Sens. ZSensorSens'])
+ else:
+ assert version == '0x07200000', version
+ match = nm_sens_re.match(info['Ciao scan list']['@Sens. ZsensSens'])
+ assert match != None, 'Bad regexp for %s/%s, %s' \
+ % ('Ciao scan list', '@Sens. ZsensSens',
+ info['Ciao scan list']['@Sens. ZsensSens'])
ret['z piezo sensitivity (m/V)'] = float(match.group(1))*1e-9
match = nm_sens_re.match(info['Ciao scan list']['@Sens. DeflSens'])