NanonisTranslator cannot translate sxm file
Created by: donpatrice
I have a sxm file that we would like to read and translate into pycroscopy but this does not work.
>>> nt = NanonisTranslator(sxm_file)
>>> nt.translate()
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-240-1db0a86297c7> in <module>()
----> 1 nt.translate()
~/ownCloudFHI/FHI/github.molgen.mpg.de/saasmi/saasmi/.venv/lib/python3.5/site-packages/pycroscopy/io/translators/nanonis.py in translate(self, data_channels, verbose)
71 """
72 if self.parm_dict is None or self.data_dict is None:
---> 73 self._read_data(self.data_path)
74
75 if data_channels is None:
~/ownCloudFHI/FHI/github.molgen.mpg.de/saasmi/saasmi/.venv/lib/python3.5/site-packages/pycroscopy/io/translators/nanonis.py in _read_data(self, grid_file_path)
153
154 parm_dict = dict()
--> 155 for key, parm_grid in zip(header_dict['fixed_parameters'] + header_dict['experimental_parameters'],
156 signal_dict['params'].T):
157 parm_dict[key] = parm_grid
KeyError: 'fixed_parameters'
The problem seems to be the missing key 'fixed_parameters' in the header_dict.
>>> from pycroscopy.io.translators.df_utils.nanonispy.read import Scan
>>> s = Scan(sxm_file)
>>> s.header.keys()
dict_keys(['scan_pixels', 'current>offset (a)', 'scan_time', 'current>gain', 'z-controller>i gain', 'scan_range', 'data_info', 'current>current (a)', 'z-controller>tiplift (m)', 'z-controller', 'current>calibration (a/v)', 'z-controller>controller name', 'scan_file', 'z-controller>switch off delay (s)', 'z-controller>z (m)', 'z-controller>controller status', 'z-controller>time const (s)', 'rec_time', 'scan_offset', 'z-controller>setpoint', 'rec_temp', 'nanonis_version', 'acq_time', 'scanit_type', 'z-controller>setpoint unit', 'z-controller>p gain', 'bias', 'comment', 'scan_dir', 'scan_angle', 'rec_date'])
How can I fix this issue?
Thanks a lot.