The NanoLib library allows to open and analyze data generated by the Nanonis SPM Control System TM in MATLABTM.
The first version of NanoLib was developed by Quentin Peter during its master thesis Spin Polarized Field Emission STM and Image Processing in the Solid State Physics Laboratory for Microstruture Research at the ETH Zurich under the supervision of U. Ramsperger and L. De Pietro. Some of this library's features are still oriented to solve problems related to the master thesis, e.g., scan_type field in the header structure (see manual). In future versions some of these features may be changed and generalized. Every comment, idea and contribution is welcome.
The repository is divided in three sections:
- Manual: PDF of the user manual and source file,
- NanoLib: the library with the different MATLAB functions,
- Examples: dummy files and code examples for using the library.
You can clone the repository to your computer or download the ZIP file and unzip it to a directory of your choice, for example: ~/myFunctions
.
In order to use and access the library you need to add the path to the directory where you copied the library with the addpath
standard function of MATLAB. Before you begin with your project just type in the MATLAB prompt:
>>> addpath ~/myFunctions
You may use the functions of the library by calling first the ''class'' and then the specific function. For example, in order to load a SXM image, you can simply write sxm.load.loadProcessedSxM
.
A simple example of how to load and to plot an image is given below:
% load file
fileName = 'SXM_file.sxm';
sxmFile = sxm.load.loadProcessedSxM(fileName);
%% plot data
iCh = 1; % Channel number
%plot image
figure('Name',sprintf('file: %s',fileName));
sxm.plot.plotFile(sxmFile,iCh);
This and other examples can be found in the section Example.
Distributed under the GNU General Public License, Version 3.0. (See accompanying file LICENSE or copy at https://www.gnu.org/licenses/gpl-3.0.html)