Skip to main content

PyIconeus

NumPy PyPI Python Tests Lint Coverage

PyIconeus is Iconeus' open-source Python library for reading Iconeus data formats. It exposes the Scan, Bps, Roi and Raw models through a single file-opening entry point.

Supported formats:

  • .scan (legacy HDF5 and binary scan files)
  • .bps (HDF5 and binary Brain-to-Lab transforms)
  • .bri (HDF5 and binary ROI meshes)
  • .raw with its associated .hraw header (IQ data)

Table of Contents

Installation

  1. Set up a virtual environment

The use of a python virtual environment is recommended to avoid conflicts with other Python packages.

You can create a virtual environment using uv:

uv venv
.venv/Scripts/activate       # Windows
source .venv/bin/activate    # Linux/macOS
  1. Install PyIconeus

With Uv:

uv pip install pyiconeus

With pip:

python -m pip install pyiconeus

Or with the sources:

uv pip install -e .
  1. Install other dependencies

Dependencies to run the tests:

uv pip install -e ".[test]"

To run the examples:

uv pip install -e ".[example]"

To build the doc:

uv pip install -e ".[doc]"

Documentation

You can build the documentation using Sphinx from the docs folder.

make html

Testing

Run the test suite with coverage locally:

coverage run -m pytest tests
coverage combine
coverage report --fail-under=90

Alternatively, you can use this command if you have hatch installed:

hatch test -c

The build requires at least 90% total coverage.

Usage

from pyiconeus import open_path

scan = open_path("acquisition.scan")
bps = open_path("positioning.bps")
scan.bps = bps

# RAW data requires both files. blockStart and blockEnd are one-based and
# inclusive; their defaults load the first block only.
raw = open_path("acquisition.raw", "acquisition.hraw", blockStart=1, blockEnd=1)

See the examples notebooks for more complete examples.

open_path determines the model from the lowercase filename extension. It raises FileNotFoundError for missing paths, ValueError for unsupported extensions or invalid RAW arguments, and may raise OSError when a file is not readable or has invalid content.

Contributing

Development setup, validation commands, branch policy, and pull request guidance are available in CONTRIBUTING.md.

Requirements

Python 3.10 or newer is supported. Runtime dependencies are NumPy, pytz, h5py and transforms3d.

To install all optional dependencies, run the following:

uv pip install -e ".[test,doc,example,dev]"

Citation

If you use PyIconeus in your research, please cite it. Citation metadata is available in CITATION.cff, and GitHub's "Cite this repository" button generates the entry for you in several formats.

@software{iconeus_pyiconeus,
  author  = {{Iconeus}},
  title   = {PyIconeus},
  url     = {https://github.com/Iconeus/PyIconeus},
  license = {BSD-3-Clause}
}

License

pyiconeus is distributed under the terms of the BSD-3-Clause license.

Metadata

Release files for pyiconeus 1.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 pyiconeus 1.0
File Size Uploaded Provenance
pyiconeus-1.0.tar.gz 44.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 72.6 kB

Release files / pyiconeus-1.0.tar.gz

Download URL pyiconeus-1.0.tar.gz
Size 44.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7bf7ca46ac635cd3f89436ac869f44740fe0ea5514a55a08a71abfb38495809
BLAKE2b-256 checksum
How to use checksums
f730966b958b1b58024e4647e7a7a40a3af62d98be904c0c37780dbe3ccd35c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / pyiconeus-1.0-py3-none-any.whl

Download URL pyiconeus-1.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86ae2794c46982bce50196a7e4b6090f9ddef39fa13a134821474698469e7ca6
BLAKE2b-256 checksum
How to use checksums
27a666bed7fa31d58fd633ced63d76dd1be10d84f5379ae98038f0f6b4590c27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for pyiconeus 1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

1.0 This release

2 release files No 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