A python library to parse ADC64-formatted files
Project description
This is a script and library to help interfact with the ADC64 format.
To install:
pip install adc64format
To dump the contents of a single ADC64 file to an HDF5 format:
adc64_to_hdf5.py <number of samples> <input ADC64 file>.data <output HDF5 file>.h5
To use interactively or within another python codebase:
from adc64format import dtypes, skip_chunks, parse_chunk, ADC64Reader # Option 1: Parse a single event from an ordinary file object with open('<ADC64 file>.data', 'rb') as f: # Load the first event chunk = parse_chunk(f) # Look at chunk data (as numpy arrays) for key in dtypes: print(chunk[key]) # Skip N events n = 100 skip_chunks(f, n) chunk = parse_chunk(f) # Option 2: Parse events from multiple files and align by timestamp with ADC64Reader('<ADC 64 file from ADC 0>.data', '<ADC 64 file from ADC 1>.data', ...) as reader: batch_size = 10 # how many events to load on each iteration events = reader.next(batch_size) # get matched events between multiple files events_file0, events_file1, ... = events # Look at data for key in dtypes: print(events_file0[key])
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
adc64format-0.0.1rc0.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file adc64format-0.0.1rc0.tar.gz
.
File metadata
- Download URL: adc64format-0.0.1rc0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061a2d8ca7ff37f600fe8ea51cf0e166a83025ae5cf046df59c971b3be4627cf |
|
MD5 | 0073d3ec31431400885de703a2043707 |
|
BLAKE2b-256 | eb1be540585f6b803e1e3d8188b65139ae16b2ebb5f1952071292afd896cffdb |
File details
Details for the file adc64format-0.0.1rc0-py3-none-any.whl
.
File metadata
- Download URL: adc64format-0.0.1rc0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119ac32f6ddf05a964fe6eea8ac7d6612714bdfb05d1edebc2e3bdac8dcecde2 |
|
MD5 | 1c01f30731940255ea040204baa9a533 |
|
BLAKE2b-256 | a2a72217cb7db998b3f6245a92aebd45fe074cf97db30584ed2c2e247e70365c |