Read ACQ file types
Project description
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.
Changelog
0.4.4 [04.June.2021]
Fixed
HDF5 to ACQ converter now works.
0.4.0
First version on PyPI!
Fixed
Frequency array now has the correct channel width (it was ever so slightly off).
Changed
decode_file now only decodes the file, rather than writing. Use convert_file to convert a file to a different format.
0.3.2
Fixed
Errors in writing out files (now have tests)
0.3.1
Fixed
Error reading fastspec header due to first VERSION line.
0.3.0 [27.Dec.2019]
Added
Ability to read in new fastspec header
New format: npz
Ability to save all metadata
Changed
Structure of the code is now class-based and extendible
No longer outputs uncalibrated temperature, but rather the dimensionless ratio, Q
Fixed
Line-incrementing problem when reading
0.2.0
Added
HDF5 output format
Ability to specify output format via CLI
Metadata to outputs
Fixed
Removed warnings when dividing by zero
Installation without numpy
Progress bar iterations
0.1.0
Initial version that reads ACQ into memory.
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-0.4.4.tar.gz
.
File metadata
- Download URL: read_acq-0.4.4.tar.gz
- Upload date:
- Size: 465.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a08d92046f294c77776ac3e8feee9dd87c431a105d54af796625d7ba2c131bd |
|
MD5 | 04632caf6150feb864ea9b1b51876fb9 |
|
BLAKE2b-256 | 1e6eb79fdd1a2435269dc47b1bdc32e1a08cadcc462d5a97cf4fc908663cd863 |