def _extract_traces(self, buffer, info):
"""Extract each of the three vector blocks in a PicoForce file.
-
+
The blocks are:
* Deflection input
And their headers are marked with 'Ciao force image list'.
"""
- traces = []
+ traces = []
for image in info['Ciao force image list']:
offset = int(image['Data offset'])
length = int(image['Data length'])
'raw info':info,
'raw z piezo info': z_piezo_info,
'raw deflection info': deflection_info,
- 'spring constant (N/m)':float(z_piezo_info['Spring Constant'])
+ 'spring constant (N/m)':float(z_piezo_info['Spring Constant']),
}
t = info['Force file list']['Date'] # 04:42:34 PM Tue Sep 11 2007
const_re = re.compile('C \[([:\w\s]*)\] ([.0-9]*)')
match = const_re.match(z_piezo_info['@Z magnify'])
assert match.group(1) == '4:Z scale', match.group(1)
- ret['z piezo magnification'] = match.group(2)
+ ret['z piezo gain'] = match.group(2)
match = volt_re.match(z_piezo_info['@4:Z scale'])
assert match.group(1) == 'ZSensorSens', match.group(1)
- ret['z piezo scale (V/bit)'] = float(match.group(2))
- ret['z piezo scale (V)'] = float(match.group(3))
+ ret['z piezo sensitivity (V/bit)'] = float(match.group(2))
+ ret['z piezo range (V)'] = float(match.group(3))
match = volt_re.match(z_piezo_info['@4:Ramp size'])
assert match.group(1) == 'Zsens', match.group(1)
assert match.group(1) == 'Zsens', match.group(1)
ret['z piezo ramp offset (V/bit)'] = float(match.group(2))
ret['z piezo ramp offset (V)'] = float(match.group(3))
-
+
# Unaccounted for:
# Samps*
-
+
return ret
def _scale_block(self, data):
)
info = data.info
ret.info = info
- ret.info['raw-data'] = data # store the raw data
+ ret.info['raw data'] = data # store the raw data
data.info = {} # break circular reference info <-> data
z_col = info['columns'].index('z piezo (m)')
# Leading '-' because Veeco's z increases towards the surface
# (positive indentation), but it makes more sense to me to
- # have it inzrease away from the surface (positive
+ # have it increase away from the surface (positive
# separation).
ret[:,z_col] = -(
(data[:,z_col].astype(ret.dtype)
* info['z piezo sensitivity (V/bit)']
- info['z piezo offset (V)'])
+ * info['z piezo gain']
* info['z piezo sensitivity (m/V)']
)
)
return ret
-