Metadata-Version: 2.1
Name: mulfile
Version: 0.1.0
Summary: Python library to read .mul and .flm files
Home-page: https://github.com/matkrin/mulfile
Author: Matthias Krinninger
Author-email: matkrin@protonmail.com
License: BSD-3-Clause
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE.rst

mulfile
=======

Mulfile is a Python library for reading .mul and .flm files, acquired by the
scanning tunneling microscopy (STM) software "SpecsProbe.exe", which is used
with the SPM 150 Aarhus by SPECS.


Installing
----------

Installation via `pip`_:

.. code-block:: bash

    $ pip install mulfile

.. _pip: https://pip.pypa.io/en/stable/


Example Usage
-------------

.. code-block:: python

    import mulfile as mul


    # load a mul or flm file
    stm_images = mul.load('path/to/mulfile.mul')


This returns all STM-images and their metadata as a list-like object.
Thus, it is possible to access images by indexing and slicing.

.. code-block:: python

    # get the first STM-image
    image_1 = stm_images[0]

    # get images 1 to 5
    images = stm_images[0:5]


Single STM-images are stored in objects with their image data (2D numpy array)
and metadata as `properties`_.

.. _properties: https://github.com/matkrin/mulfile/wiki

.. code-block:: python

    # get the image data for image_1
    image_1.img_data

    # get the bias voltage for image_1
    image_1.bias


It is also possible to save one or multiple images in the native file format
of `gwyddion`_ (.gwy)

.. code-block:: python

    # save the complete mul-file as a gwyddion file
    stm_images.save_gwy('output.gwy')


.. _gwyddion: http://gwyddion.net/documentation/user-guide-en/gwyfile-format.html


Development Status
------------------

STM-images, together with the corresponding metadata, are fully supported  in
both .mul and .flm files. Pointscans are not supported yet.


