Metadata-Version: 2.1
Name: access2theMatrix
Version: 0.4.3
Summary: Scienta Omicron (NanoScience) (NanoTechnology) MATRIX Control System result file accessing tool
Home-page: https://pypi.org/pypi/access2theMatrix/
Author: Stephan Zevenhuizen
Author-email: S.J.M.Zevenhuizen@uu.nl
License: The license file is in the package.
Keywords: SPM scanning probe microscopy image analysis
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4
Requires-Dist: numpy
Requires-Dist: six

access2theMatrix is a Python library for accessing Scienta Omicron (NanoScience)
(NanoTechnology) MATRIX Control System result files. Scanning Probe Microscopy
(SPM) Image data, Single Point Spectroscopy (SPS) Curve data, Phase/Amplitude
Curve data and volume Continuous Imaging Tunneling Spectroscopy (CITS) Curves
data will be accessed by this library.

The library access2theMatrix has the package access2thematrix which in turn
contains the module access2thematrix. The class MtrxData in the access2thematrix
module has the methods to open SPM Image, SPS Curve, Phase/Amplitude Curve and
volume CITS Curves result files, to select one out of the four possible traces
(forward/up, backward/up, forward/down and backward/down) for images and volume
CITS curves, and to select one out of the two possible traces (trace, retrace)
for spectroscopy curves. Includes method for experiment element parameters
overview.

Dependencies
------------
access2theMatrix requires the NumPy (http://www.numpy.org) and the six
(https://pypi.python.org/pypi/six/) library.

Installation
------------
Using pip::

    > pip install access2theMatrix

Example usage
-------------
In this example the MATRIX Control System has stored the acquired data in the
folder ``c:\data``. In addition to the result data files the folder must also
contain the result file chain, see the MATRIX Application Manual for SPM.
The image file ``Au(111) bbik fe-20151110-112314--3_1.Z_mtrx`` will be opened
and the ``forward/up`` trace will be selected.

.. code-block:: pycon

    >>> import access2thematrix
    >>> mtrx_data = access2thematrix.MtrxData()
    >>> data_file = r'c:\data\Au(111) bbik fe-20151110-112314--3_1.Z_mtrx'
    >>> traces, message = mtrx_data.open(data_file)
    >>> traces
    {0: 'forward/up', 1: 'backward/up'}
    >>> im, message = mtrx_data.select_image(traces[0])
    >>>

The variable ``im`` will contain the data and the metadata of the selected
image and the ``im`` object has the initial attributes ``data``, ``width``,
``height``, ``y_offset``, ``x_offset``, ``angle`` and ``channel_name_and_unit``.
We will continue the example by opening de curve file
``Au(111) bbik fe-20151110-112314--2_1.Aux2(V)_mtrx`` and selecting the
``retrace`` trace.

.. code-block:: pycon

    >>> data_file = r'c:\data\Au(111) bbik fe-20151110-112314--2_1.Aux2(V)_mtrx'
    >>> traces, message = mtrx_data.open(data_file)
    >>> traces
    {0: 'trace', 1: 'retrace'}
    >>> cu, message = mtrx_data.select_curve(traces[1])
    >>>

The variable ``cu`` will contain the data and the metadata of the selected
curve and the ``cu`` object has the initial attributes ``data``,
``referenced_by``, ``x_data_name_and_unit`` and ``y_data_name_and_unit``.
The last example will open a volume CITS file
``CO_Cu-111-spectra-20191028--10_1.Aux1(V)_mtrx``.

.. code-block:: pycon

    >>> import os
    >>> os.chdir('c:/data')
    >>> mtrx_data.open('CO_Cu-111-spectra-20191028--10_1.Aux1(V)_mtrx')
    ({0: 'trace', 1: 'retrace', 2: 'forward/up'}, 'Successfully opened and processed
     data file CO_Cu-111-spectra-20191028--10_1.Aux1(V)_mtrx.')
    >>> mtrx_data.object_type
    'volume CITS'
    >>> im_3d = mtrx_data.volume_scan['forward/up']['trace']
    >>> im_3d.shape
    (3, 3, 251)
    >>> mtrx_data.channel_name_and_unit
    ['Aux1(V)', 'V']
    >>> mtrx_data.z_data_name_and_unit
    ['Spectroscopy Device 1', 'Volt']
    >>> 

The variable ``im_3d`` contains the 3-dimensional combined scan data of the
'forward/up' xy-scan with the 'trace' z-scan of Spectroscopy Device 1 with
channel output Aux1. The order of the dimensions is y, x, z. The z-data is in
``mtrx_data.scan[0]``.

To get a list and a printable sorted text list of the experiment element
parameters with their values and units, use the method
``get_experiment_element_parameters``.

New
---
This is a bugfix release. The bug that originated in the previous version.

New in version 0.4.2
--------------------
'Foreign Parameters' can be added to an experiment using the MATRIX Automated Task
Environment (MATE). These 'Foreign Parameters' can now be accessed and are treated
as parameters of the pseudo-Experiment Element instance '-Foreign'.
    
Authors & affiliations
----------------------
Stephan J. M. Zevenhuizen [#]_

..  [#] Condensed Matter and Interfaces, Debye Institute for Nanomaterials
    Science, Utrecht University, Utrecht, The Netherlands.
