Scripting Interface

The AFM Suite comes with a python scripting interface with which you can develop you own multifrequency AFM methods and customize the IMP Suite to your particular measurement needs. From this interface you can access all the classes and functions used by the IMP Suite for data acquisition, storage, plotting, and analysis. To take full advantage of the possibilities that this interface allows and to develop your own measurements, you will need to learn the Python programing language, and become familiar with the structure and functionality of the IMP Suite.

Intermodulation Products provides a variety of example scripts which can be modified and saved with a new name. All scripts stored in the folder IMP_sessions_and_settings/settings/scripts will be loaded when the AFM Suite starts, and they will appear in Advanced pull-down menu under Scripts. To run the script, simply select it from the menu. Reload scripts will close all open scripts are reload the currently saved script.

The file Examples.py demonstrates how scripts are constructed as a Python class. This file contains several different classes, each containing a different script with different functionality. These scripts demonstrate how to make a GUI or step a quantity while scanning. You can expand on these scripts to add GUI elements and controls so that parameters can be input and output on the screen. Alterntively, you can simply edit the values in the Python code, reload the script, and run it again. These scripts serve as a starting point to develop your own measurement methods.

Some useful scripts currently available are described below:

RecorderAnalysis.py

PlotTimeMode opens a GUI for viewing and extracting sections of a Stream Recorder file. Run the script, press Open and select a previously recorded .std file containing stream data taken in Time mode. The script will parse the time stream to a series of ‘beats’ , or time windows T given by the inverse of the measurement bandwidth T=1/\Delta f, assigning a ‘beat index’ to each window. A plot shows the maximum value of the oscillation envelope in each beat. You can adjust the time window to include more than one beat, thereby reducing the measurement bandwidth and thus the noise. The time window is shown in the lower plot. Export All will export the entire recorder file and Export zoom will export only the selected window (lower plot) to an ASCII format file. A Fast Fourier Transform (e.g. FFT) of this data will give the response spectrum at the selected time window.

LiveParampeterMap.py

LiveParameterMap runs an experimental new method for extracting polynomial force curves which is computationally very efficient, so that the curves are analyzed and parameter maps are made in real time, as the AFM scans. The method was developed and implemented by Daniel Forchheimer, starting from a theory worked out by Daniel Platz [Platz-2013b]. Choosing this script opens a GUI which allows you to choose ways of parameterizing the conservative tip-surface interaction force. A map of these parameters is created in real time and a force curve showing the extracted parameter can be plotted. The force curve is taken at one location (center) of the fast-scan axis and the plot is updated at the line frequency.