read Zwick zs2 and zp2 files
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zs2decode-0.3.1.tar.gz
.
File metadata
- Download URL: zs2decode-0.3.1.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71e62b65d788b6f5bab9e4b661ecbab24c4b91631de756705800877c7592935a |
|
MD5 | c1cd9101a76de73628fc6185f71dc69c |
|
BLAKE2b-256 | e8839ad369767e24d8e0acf51c9b8c12deffd390d4e4106facf2fc274a685700 |
File details
Details for the file zs2decode-0.3.1-py2.py3-none-any.whl
.
File metadata
- Download URL: zs2decode-0.3.1-py2.py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cab3a7dc08db705dd5ed86413577617f5448f141000cbf37df39c628ec6352c |
|
MD5 | f6146f6b5c4a6d52e3efb397c36d74fd |
|
BLAKE2b-256 | 925e6fc913738ea337dd0275879a62de987a6f474c90fe99f6a1f94e07da9984 |