Skip to main content
Help us improve Python packaging – donate today!

read Zwick zs2 and zp2 files

Project Description

https://travis-ci.org/cpetrich/zs2decode.svg?branch=master

zs2decode is a Python (2.7, 3.3, 3.4, 3.5, 3.6) 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_dump_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.

Release history Release notifications

This version
History Node

0.3.1

History Node

0.2.0

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
zs2decode-0.3.1-py2.py3-none-any.whl (20.8 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 26, 2017
zs2decode-0.3.1.tar.gz (40.1 kB) Copy SHA256 hash SHA256 Source None Sep 26, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page