Z offset / scale soft_scale is `None`
ezatterin opened this issue · comments
Edoardo Zatterin commented
Hi,
I have some piezoresponse data which seems to give problems to your code. If I run:
import nanoscope as n
import io
file = io.open('fname','rb')
n.nanoscope.NanoscopeFile(file,header_only=True).config['_Images']['Phase']
I get:
{'Aspect Ratio': '1:1',
'Bytes/pixel': 2,
'Capture start line': 0,
'Color Table Index': 12,
'Data Type Description': None,
'Data length': 262144,
'Data offset': 867392,
'Data type': 'AFM',
'Description': 'Phase1',
'Frame direction': 'Down',
'Highpass': 0,
'Image Data': 'Phase',
'Invalid Data Fill': None,
'Invalid Data Flag': None,
'Line Direction': 'Retrace',
'Lowpass': 0,
'Note': None,
'Number of lines': 256,
'Offline Planefit': None,
'Plane fit': 0,
'Realtime Planefit': 'Offset',
'Relative frame time': 2561.29,
'Samps/line': 256,
'Scan Line': 'Main',
'Scan Size': 500,
'Start context': 'OL',
'Tip x width correction factor': 1,
'Tip x width correction factor sigma': 1,
'Tip y width correction factor': 1,
'Tip y width correction factor sigma': 1,
'Valid data len X': 256,
'Valid data len Y': 256,
'Valid data start X': 0,
'Valid data start Y': 0,
'Z magnify': 1.0,
'Z offset': Z offset: [None] (0.005493164 º/LSB) 0.0 deg,
'Z scale': Z scale: [None] (0.005493164 º/LSB) 360.0 deg}
Where you can see that Z offset
and Z scale
are set to None
. So that when I run:
import nanoscope as n
import io
file = io.open('fname','rb')
n.nanoscope.NanoscopeFile(file,header_only=True).config['_Images']['Phase']['Z offset'].soft_scale
There is no output. Hence nanoscope.read
breakes while running the _get_sensitivity_value
function. Is there quick fix that you can suggest by any chance?