Metadata-Version: 2.4
Name: zs2decode
Version: 0.3.3
Summary: read Zwick zs2 and zp2 files
Home-page: https://zs2decode.readthedocs.org/
Author: Chris Petrich
Author-email: cpetrich@users.noreply.github.com
Maintainer: Chris Petrich
Maintainer-email: cpetrich@users.noreply.github.com
License: MIT
Keywords: file format
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: summary

zs2decode
#########

zs2decode is a Python (2.7, 3.4 - current) implementation of a
decoder for Zwick ``zs2`` files.

``zs2`` files contain measurements and meta data. zs2decode is able to
parse these files. It contains support functions to output the result as
text file or XML for further processing.
The following script converts a ``zs2`` file into XML::

    import zs2decode.parser
    import zs2decode.util

    zs2_file_name = 'my_data_file.zs2'
    xml_output_file = 'my_data_file.xml'

    # load and decompress file
    data_stream = zs2decode.parser.load(zs2_file_name)
    # separate binary data stream into chunks
    raw_chunks = zs2decode.parser.data_stream_to_chunks(data_stream)
    # convert binary chunk data into lists of Python objects
    chunks = zs2decode.parser.parse_chunks(raw_chunks)
    # output as text file
    with open(xml_output_file, 'wb') as f:
        f.write( zs2decode.util.chunks_to_XML(chunks) )


An example script to extract measurement time series from the XML is
provided in the ``examples`` folder.

Documentation is available at `<http://zs2decode.readthedocs.org/>`_
and source code at `<https://github.com/cpetrich/zs2decode.git>`_.
