Read/Write ACQ Spectrum Files
Project description
read-acq
Read EDGES ACQ spectrum files.
Installation
In a new/existing python environment, run pip install git+https://github.com/edges-collab/read_acq
.
If you wish to develop read_acq
, do the following:
git clone https://github.com/edges-collab/read_acq
cd read_acq
pip install -e .
Usage
read_acq
can be used in a Python interpreter or directly via the
command line.
CLI
To use the CLI, a single command is provided:
acq convert <data.acq> [<data2.acq> ...] [-f format1 [-f format2]]
This will convert the file(s) provided to all formats provided, and place any resulting files in the same location as the original datafile(s) (but with different extension). The default format is 'mat'. The command can be run from anywhere on the system, and the file given can be a relative or absolute path.
Multiple data files can be given, and each will be converted. Wildcards may also be used in any of the filenames, eg.:
acq convert data/*.acq
Library
The main point of entry for the Python interface is decode_file
:
>>> from read_acq import decode_file
>>> data = decode_file("my_data.acq", write_formats=[])
By default, this function will also write the file in .mat
format, but
you can turn that off by providing write_formats=[]
. The output is a
numpy
array of the data. Several more options are provided, use
help(decode_file)
in an interpreter to see all the options.
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
File details
Details for the file read_acq-1.1.0.tar.gz
.
File metadata
- Download URL: read_acq-1.1.0.tar.gz
- Upload date:
- Size: 744.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 924ace55c161dea1d1c9fdb7c41e9f13cca86e51c2a3cac121877689cd8fd5ac |
|
MD5 | fb7d2df3ac4d63ee373fe6b2540c4d32 |
|
BLAKE2b-256 | 511434b93568e75ee17af4a43740a82ce5caf86a83c24d444def60ef6d59ef10 |