.. |ImAFM (TM)| unicode:: ImAFM U+2122 .. index: Force Models .. _force-models-label: Programming your own Force Models ================================= One powerful feature of |ImAFM (TM)| is the ability to test different tip-surface interaction models on the same data set. Data is stored as the raw intermodulation spectrum at each pixel, which is a frequency-domain representation of the tip motion. The :ref:`model-fit-label` section of :ref:`force-reconstruct-label` describes how to use the AFM Suite to fit this data to an a force model. This fit can be done at an individual pixel (see :ref:`force-inspector-label`) , along a liner transect (see :ref:`analyze-line-label`), or on an entire image (see :ref:`parameter-maps-label` and :ref:`3D-viewer-label`). Several common force models are programed in the IMP Suite, and it is very easy to program your own force model and have it appear in the IMP Suite. Constructing a good and physically well motivated force model can be difficult. However, once you have a good force model, programing it in the AFM Suite is simple. Some knowledge of the Python language is necessary (see `Python `_). Simply copy the **examples.py** file and give it a new name, e.g. **my_force_model.py** , keeping it in the **force_models** folder. Edit the copy to create your own force model. The **example.py** file is well documented with comment lines to help you understand the idea behind the Python code. After you have finished with **my_force_model.py**, restart the AFM Suite. Your force model will be automatically loaded and it will appear as an option in the ``Model`` pull-down menu. Note that any changes you may have made to the **examples.py** file will not be saved, and upon restart, it will be returned to its original, default state.