Skip to main content

read Zwick zs2 and zp2 files

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zs2decode-0.3.3.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zs2decode-0.3.3-py2.py3-none-any.whl (19.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file zs2decode-0.3.3.tar.gz.

File metadata

  • Download URL: zs2decode-0.3.3.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for zs2decode-0.3.3.tar.gz
Algorithm Hash digest
SHA256 372a3b4cf52adfdf1fe9d09cb47fa9993c8d962c71f9e315e791a19232a9986d
MD5 3e1debb9e54955511f41bcae657b5d28
BLAKE2b-256 0230626e40b090eb5f97692dbc6f8b6070eac1a07b53e38515afe0f8f1df5faf

See more details on using hashes here.

File details

Details for the file zs2decode-0.3.3-py2.py3-none-any.whl.

File metadata

  • Download URL: zs2decode-0.3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for zs2decode-0.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a89cad6be7fb14e6a87ab4c805b6dc19a5d248617186f917c1079846488154a9
MD5 81857fdfaa6ebc0e0374c2ae1073947c
BLAKE2b-256 32f3395cf608e8750216be2ea3e1eb68446cb2b3aa1233083232cd7a3a2817ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page