• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openbraininstitute / libsonata
93%

Build:
DEFAULT BRANCH: master
Repo Added 13 Jan 2025 09:29AM UTC
Token icyNi4suVvhturTY4qmVlroYKotTHufFN regen
Build 279 Last
Files 20
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • add-docstrings
  • add-learning-engine
  • brian2
  • cleanup
  • cleanup-config-tests
  • fix-build
  • fix-output
  • gnuinstalldirs
  • input-poisson
  • jplanas/cond-modif-sonata-ext
  • jplanas/copyright-update
  • katta/bluebrain2openbraininstitute
  • katta/ci-macos-check
  • katta/comp_sets_2
  • katta/compartment_set_input
  • katta/electrode-reader
  • katta/install_dev
  • katta/per-report-electrodes-file
  • katta/preserve-input-names-order
  • katta/publish-on-release
  • katta/selection-iterator
  • linux-aarch64
  • master
  • mechanisms-dir
  • nodesets-name
  • point-model-dir
  • refs/tags/v0.1.30
  • refs/tags/v0.1.31
  • remove-file-locks
  • rev-hdf5
  • scikit-build-core
  • set_retention_days_for_build_artifacts
  • simconf-unspecified
  • take-two
  • test-format
  • update-catch2
  • update-clang-format
  • update-coverage
  • update-docstrings
  • update-hdf5-v1.14.6
  • update-highfive
  • update-pybind11
  • update_banner
  • v0.1.32
  • v0.1.33
  • v0.1.34
  • v0.1.35
  • v0.1.36
  • v0.1.37
  • weji/build_sdist
  • weji/duplicate_keys
  • weji/electric_fields
  • weji/seclamp
  • weji/seclamp_more

13 Jul 2026 03:51PM UTC coverage: 92.975% (+0.1%) from 92.87%
29263983785

push

github

web-flow
Add ElectrodeReader for SONATA electrode weight files (#56)

Adds an `ElectrodeReader` to libsonata for reading SONATA electrode weight HDF5 files (produced by BlueRecording, consumed by neurodamus for LFP computation).

## What

- **`ElectrodeReader`** class following the `ReportReader`/`SpikeReader` pattern: lazy population loading, sorted index for unsorted node_ids, `openPopulation()` + `getPopulationNames()`
- **`ElectrodeDataFrame`** struct for returning scaling factor submatrices with row/column identity
- **`Population::get(node_ids, electrode_ids)`** — Selection-based access on both axes (`nullopt` = all)
- **Electrode metadata** accessors: names, positions, types
- **Python bindings** with zero-copy numpy arrays (`.ids`, `.electrodes`, `.data`)
- **Test fixture** with two populations (unsorted + sorted node_ids)

## Usage (Python)

```python
from libsonata import ElectrodeReader, Selection

reader = ElectrodeReader('electrode_weights.h5')
pop = reader['NodeA']

df = pop.get()                                         # all nodes, all electrodes
df = pop.get(node_ids=Selection([0, 1, 5]))            # specific nodes
df = pop.get(electrode_ids=Selection([0, 2]))          # specific electrodes
df = pop.get(Selection([0, 1]), Selection([0]))        # both

df.ids         # numpy (n_rows, 2): [node_id, compartment_index]
df.electrodes  # numpy (n_cols,): electrode column indices
df.data        # numpy (n_rows, n_cols): scaling factors
```

## Status

- [x] C++ implementation + Python bindings
- [x] Build verified (all 32 existing C++ tests + 115 Python tests pass)
- [x] C++ tests (in progress)
- [x] Python tests (in progress)

Fix: https://github.com/openbraininstitute/libsonata/issues/54

199 of 211 new or added lines in 1 file covered. (94.31%)

2713 of 2918 relevant lines covered (92.97%)

49.09 hits per line

Relevant lines Covered
Build:
Build:
2918 RELEVANT LINES 2713 COVERED LINES
49.09 HITS PER LINE
Source Files on master
  • Tree
  • List 20
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
29263983785 master Add ElectrodeReader for SONATA electrode weight files (#56) Adds an `ElectrodeReader` to libsonata for reading SONATA electrode weight HDF5 files (produced by BlueRecording, consumed by neurodamus for LFP computation). ## What - **`ElectrodeRea... push 13 Jul 2026 03:53PM UTC web-flow github
92.97
29031144424 katta/electrode-reader Use 4 MB budget for block gap limit, scaled by row width Pull #56 09 Jul 2026 03:53PM UTC cattabiani github
92.97
29024289943 katta/electrode-reader Merge branch 'master' into katta/electrode-reader Pull #56 09 Jul 2026 02:13PM UTC cattabiani github
92.97
29024241285 katta/electrode-reader Rename column_index → electrode_id to match spec terminology push 09 Jul 2026 02:11PM UTC cattabiani github
92.97
29023914461 master Make sure absolute SimulationConfig output paths are correctly based at `output_dir` (#62) * previously, the `log_file` and `spikes_file` were not being output under the `output_dir` as described by the SONATA specification: ```Location where... push 09 Jul 2026 02:06PM UTC web-flow github
92.87
29017126478 take-two Make sure absolute SimulationConfig output paths are correctly based at `output_dir` * previously, the `log_file` and `spikes_file` were not being output under the `output_dir` as described by the SONATA specification: ```Location where outpu... push 09 Jul 2026 12:10PM UTC mgeplf github
92.87
29013228963 katta/electrode-reader Fix docstrings.h ordering to match CI-generated alphabetical order Pull #56 09 Jul 2026 10:58AM UTC cattabiani github
92.97
29009708706 katta/electrode-reader Address review: rename ElectrodeDataFrame, simplify I/O, harden validation - Rename ElectrodeDataFrame → ElectrodeScalingFactors (avoids confusion with report DataFrame and pandas) - Use Path directly in Python test (no str() needed) - Store el... Pull #56 09 Jul 2026 09:59AM UTC cattabiani github
92.97
28950999657 katta/electrode-reader Merge branch 'master' into katta/electrode-reader Pull #56 08 Jul 2026 02:38PM UTC cattabiani github
92.9
28950941629 master Add forward iterator to Selection (#60) Lazy forward const_iterator for Selection that yields values without allocating a vector. - Add const_iterator nested class with begin()/end() (inline, forward-only) - Add __iter__ Python binding via py::m... push 08 Jul 2026 02:37PM UTC web-flow github
92.87
See All Builds (277)

Badge your Repo: libsonata

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc