.. |ImAFM (TM)| unicode:: ImAFM U+2122 .. index:: Analysis, Smooth image, Smoothing dialog, Gaussian filter .. _analyze-label: Analyze Scan Data ================= .. image:: ../Icons/analysis.png :width: 20mm :align: left Raw |ImAFM (TM)| data, the intermodulation spectrum at each pixel, both trace and retrace, are stored in one compact scan file. The spectrum at each pixel is an highly compressed representation of the actual cantilever motion, from which we reconstruct the tip-surface force. From the raw data, the AFM scientist can go back and make a more careful study of each point on the surface, analyzing it with different models and plotting it in different ways. Intermodulation Products offers a :ref:`quant-analysis-label` package with many methods of analysis, and more are constantly being developed. You can also use the :ref:`scan-data-label` python class to easily extract and analyze the data with your own analysis methods. In ``File`` pull-down menu, select ``Open (ctrl+O)``. The ``Amplitude`` and ``Phase`` images appear in a new tab for each open scan file. You can open multiple tabs and compare data from different scans on the same plot in the analysis view. In the analysis view you will find the :ref:`image-settings-label` panel, the :ref:`image-toolbar-label` and the :ref:`color-bar-label`. With the :ref:`pixel-inspector-label` and :ref:`line-inspector-label`, you can select individual pixels and lines for :ref:`quant-analysis-label`, as previously described. .. _image-smoothing-label: Image Smoothing +++++++++++++++ The analysis panel is similar to the :ref:`image-settings-label` panel, with an additional ``Smooth image`` button. This button opens a dialog box where you can apply a Gaussian filter to your scan data. Smoothing will convolve the stored intermodulation data with a Gaussian function of width ``Sigma`` pixels in the x and y direction. The result is a new image, stored to the given ``File name``, where each pixel of the new image is a weighted average of neighboring pixels in the raw scan data file. Smoothing with one pixel results little loss of sharpness in the image and it lowers the noise considerably. The Gaussian has 98% of the weight within 3 Sigma of the center, so smoothing with one pixel essentially averages a block of 9 pixels, giving an improvement in the signal-to-noise ratio by a factor of 3. This is a smart way to improve the signal quality without increasing the measurement time, by exploiting the idea that neighboring pixels are more likely to have the same response. Note however that smoothing does introduce a correlation length to your data, which you can clearly see as a granularity in high-order IMP images, which are often more noisy. Be careful not to interpret these smoothing-induced grains as features in your image.