Skip to main content

AvaRead

DOI GitHub License GitHub Workflow Status build GitHub Workflow Status docs PyPI - Version PyPI - Python versions PyPI - Downloads Ruff Hatch project

A project for reading spectra from Avantes AvaSoft 8 files in Python.

It supports all Avantes multichannel files (e.g. .raw8, .rir8, etc.), reading all avaible channels, as well as store-to-RAM/multiframe files (.str8).

Importantly, this means you can work with these files directly in your analysis!

  • No need to convert your .raw8 (or equivalent files) to work with them

  • No need to convert your .str8 into large sets of files with very similar names!

Installing

AvaRead can be easily installed with pip and only has numpy as a dependency, which will be installed if missing.

You can install the latest release from PyPI:

pip install avaread

To install the latest development version from GitHub, you can use:

pip install git+https://github.com/AntoineTUE/avaread.git

How to use

Using avaread is fairly straightforward, you should be fine with using the read_file function to open any Avantes AvaSoft 8 file.

Depending on the detected file type, you will either receive an instance of AVSFile or STRFile, which are iterable, container-like objects that give you access to the data and metadata read from the file.

Most of the data is stored as numpy.ndarrays under the hood.

Note that these files store data differently:

  • AVSFile stores data from multiple devices (or channels), one spectrum per device, which can be of different shape.
  • STRFile stores multiple spectra recorded in sequence by a single device (or channel).

See also the documentation for more details and examples.

import avaread
from avaread.reader import AVSFile, STRFile
from pathlib import Path
import matplotlib.pyplot as plt

file1 = Path("path/to/file1.raw8")
file2 = Path("path/to/file2.str8")

data1 = avaread.read_file(file1)
data2 = avaread.read_file(file2)

assert isinstance(data1, AVSFile)
assert isinstance(data2, STRFile)

plt.figure()
# Plot the different channels stored in the `AVSFile`
for channel in data1:
    plt.plot(channel.wavelength, channel.signal, label=f"{channel.ID.SerialNumber}")

plt.figure()
# Plot the different frames stored in the `STRFile`
for i, frame in enumerate(data2):
    plt.plot(data2.wavelength, frame, label=f"Delay: {data2.delay[i]} ms")

License

AvaRead is licensed under the MIT license.

See LICENSE.

Metadata

Release files for avaread 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avaread 0.2.0
File Size Uploaded Provenance Actions
avaread-0.2.0.tar.gz 13.4 kB With provenance Details for avaread-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for avaread 0.2.0
File Interpreter ABI Platform Actions
avaread-0.2.0-py3-none-any.whl Python 3 none any Details for avaread-0.2.0-py3-none-any.whl

Total release size: 26.2 kB

Release files / avaread-0.2.0.tar.gz

Download URL avaread-0.2.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b49d4ceeae9508760120e4c1789288edb7bde7aa2cd21068ae56aadd47240ded
BLAKE2b-256 checksum
How to use checksums
737e3c790a53874875629b3513b3d2543a146df0ca5091a1aa45fcb3f5a8440b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / avaread-0.2.0-py3-none-any.whl

Download URL avaread-0.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af50e3bcc4c05744147a3511d9eb2e71dc0e9bedc666d239f1ccd17925ce4952
BLAKE2b-256 checksum
How to use checksums
feac270db503e6f1a1675f9b864c1c04952bfd2f0ba9386ad0f18b9b9984c10d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Security for avaread 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for avaread-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page