Skip to content
A Python Module to parse LeCroy Binary Trace Files
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lecroyparser
.gitignore
LICENSE
MANIFEST.in V1.1 with documentation for PyPi Apr 29, 2018
README.rst Update README.rst Jun 1, 2019
setup.py Version 1.4 for PyPI Jan 18, 2020

README.rst

lecroyparser

leCroyParser.py parses binary files as written by LeCroy scopes.

leCroyParser.py is derived from the matlab program ReadLeCroyBinaryWaveform.m, available at <https://www.mathworks.com/matlabcentral/fileexchange/26375-readlecroybinarywaveform-m>, Original version (c)2001 Hochschule fr Technik+Architektur Luzern Fachstelle Elektronik 6048 Horw, Switzerland Slightly modified by Alan Blankman, LeCroy Corporation, 2006

Further elements for the code were taken from pylecroy, written by Steve Bian

A useful resource for modifications is the LeCroy Remote Control Manual available at <http://cdn.teledynelecroy.com/files/manuals/dda-rcm-e10.pdf>

Lecroyparser has been tested with Python 2.7 and Python 3.6

Installation

lecroyparser is available at pip. It may be installed with

>>> pip install lecroyparser

or with

>>> easy_install lecroyparser

Usage

To import a single trace, instantiate a ScopeData object by passing it a path, i.e.

>>> import lecroyparser
>>> path = "/home/benno/Dropbox/RESEARCH/bullet/experiments/scopeTraces/201804/C1180421_typicalShot00000.trc"
>>> data = lecroyparser.ScopeData(path)

The x and y data are stored as numpy arrays in data.x and data.y

Alternatively, to parse several channels set the optional keyword argument parseAll to True, i.e.

>>> data = lecroyparser.ScopeData(path, parseAll = True)

This will parse all files in the specified folder with a matching filename. I.e., if the provided path is as above, then the files

will pe parsed as well.

Additionally, it is possible to limit the number of samples in the output array, by overwritting the sparse keyword:

>>> data = lecroyparser.ScopeData(path, parseAll = True, sparse = 1000)

will limit the samples in the x and y dimensions to 1000.

Information about the file can be obtained by calling print(data)

License

MIT License

Copyright (c) 2018 Benno Meier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.