Skip to content

Add Silixa H5 Carina (netCDF-shell) variant reader - #849

Merged
d-chambers merged 2 commits into
devfrom
silixa-carina
Aug 10, 2026
Merged

Add Silixa H5 Carina (netCDF-shell) variant reader#849
d-chambers merged 2 commits into
devfrom
silixa-carina

Conversation

@d-chambers

@d-chambers d-chambers commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Description

Final PR of the format-reader series (#844, #846, #847, #848). Adds SilixaH5V2, supporting Silixa Carina deployments that write HDF5 through a netCDF library — e.g. the INGV Mt Etna array from PubDAS Global DAS Month, whose trimmed sample this series registered as silixa_h5_ingv_1.h5 (in #844).

These files carry the same Silixa attr family the existing Silixa_H5 reader keys on, but on the file root instead of an Acoustic dataset; samples live in a Fiber int16 counts dataset (time × channel), and a ChannelMap dataset places each stored column on the physical fiber (channels 143–413 in the sample). The file's own netCDF coordinate variables are empty or zeroed, so:

  • Time comes from the StartTime µs-epoch and Samplerate root attrs (not SamplingFrequency[Hz], which is the pre-decimation rate).
  • Distance = Start Distance (m) + physical_channel × SpatialResolution[m] × Fibre Length Multiplier, mapped through ChannelMap — this reproduces the file's Stop Distance exactly. Non-contiguous (but bijective) maps produce per-channel distance values; a non-bijective, wrongly-shaped, or empty map raises InvalidFiberFileError rather than guessing.
  • Data stay as raw counts (no unit attr is trustworthy for the differential output), consistent with how the TDMS reader treats iDAS data.

Implementation notes:

Changelog

  • added: version 2 of the SILIXA_H5 format for the Carina netCDF-shell variant, with Silixa attrs on the file root and the Fiber counts dataset placed via ChannelMap.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes. (n/a — part of the format-reader series)
  • documented the new feature with docstrings and/or appropriate doc page.
  • included tests. See testing guidelines.
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

Summary by CodeRabbit

  • New Features

    • Added support for Silixa H5 version 2 Carina fiber files.
    • Added automatic detection and reading of Carina metadata, time and distance coordinates, and fiber data.
    • Registered the new format for general fiber I/O access.
    • Added a sample Silixa dataset to the data registry.
  • Bug Fixes

    • Added validation for incomplete files, invalid sampling rates, and malformed channel maps.
  • Documentation

    • Documented support for the Silixa H5 version 2 format.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@d-chambers, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6446df1f-2a97-414e-87c8-efc0f2ed3a0c

📥 Commits

Reviewing files that changed from the base of the PR and between 402d1f5 and fcc791f.

📒 Files selected for processing (2)
  • dascore/io/silixah5/utils.py
  • tests/test_io/test_silixah5/test_silixa_carina.py
📝 Walkthrough

Walkthrough

Added Silixa H5 version 2 support for Carina netCDF-shell files. The reader handles Carina metadata, Fiber data, time and distance coordinates, validation errors, registration, fixtures, tests, and changelog documentation.

Changes

Silixa H5 Carina support

Layer / File(s) Summary
Carina reader implementation
dascore/io/silixah5/core.py, dascore/io/silixah5/utils.py
Silixa H5 readers now use configurable hooks. SilixaH5V2 reads Carina files with root attributes, Fiber, ChannelMap, StartTime, and Samplerate data.
Carina validation coverage
tests/test_io/test_silixah5/test_silixa_carina.py
Tests cover dispatch, coordinates, metadata, data types, ChannelMap validation, invalid metadata, incomplete files, and NetCDF reader discrimination.
Reader registration and fixture wiring
dascore/io/silixah5/__init__.py, pyproject.toml, dascore/data_registry.txt, tests/test_io/test_common_io.py, docs/changelog.qmd
The package export, entry point, registry fixture, common read tests, and changelog include SilixaH5V2.

Possibly related PRs

  • DASDAE/dascore#519: Adds related Silixa Carina format support through version-specific IO handling.
  • DASDAE/dascore#831: Adds a similar HDF5 fiber reader with registry, entry-point, fixture, and test wiring.
  • DASDAE/dascore#848: Adds multi-variant HDF5 fiber readers with version-specific subclasses and tests.

Suggested labels: IO, documentation

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the new Silixa H5 Carina netCDF-shell reader.
Description check ✅ Passed The description explains the feature, implementation, tests, documentation, issue reference, and checklist status in sufficient detail.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch silixa-carina

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation IO Work for reading/writing different formats labels Aug 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dascore/io/silixah5/utils.py`:
- Around line 183-186: Update the ChannelMap validation in the relevant utility
flow before indexing resource[_CARINA_CHANNEL_MAP][()] to require a dataset-like
node, raising InvalidFiberFileError for groups or other non-dataset objects;
retain the one-dimensional validation for datasets and add a regression test
covering a ChannelMap group.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5de518ae-5bd2-4582-a670-3a3a196d7ba6

📥 Commits

Reviewing files that changed from the base of the PR and between 80116a2 and 402d1f5.

📒 Files selected for processing (8)
  • dascore/data_registry.txt
  • dascore/io/silixah5/__init__.py
  • dascore/io/silixah5/core.py
  • dascore/io/silixah5/utils.py
  • docs/changelog.qmd
  • pyproject.toml
  • tests/test_io/test_common_io.py
  • tests/test_io/test_silixah5/test_silixa_carina.py

Comment thread dascore/io/silixah5/utils.py Outdated
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (80116a2) to head (fcc791f).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #849   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          164       164           
  Lines        17950     18020   +70     
=========================================
+ Hits         17950     18020   +70     
Flag Coverage Δ
network 48.64% <87.05%> (+0.13%) ⬆️
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

✅ Documentation built:
👉 Download
Note: You must be logged in to github and a DASDAE member to access the link.

Adds version 2 of the Silixa_H5 format for Carina deployments that
write HDF5 through a netCDF library (e.g. INGV Mt Etna in the PubDAS
Global DAS Month dataset): the Silixa attrs sit on the file root, data
live in a Fiber int16 counts dataset, and a ChannelMap dataset places
each stored column on the physical fiber. The file's netCDF coordinate
variables are empty or zeroed, so time derives from the StartTime
microsecond epoch and Samplerate attrs and distance from Start Distance
and SpatialResolution (times the fiber length multiplier, which
reproduces the file's Stop Distance exactly) mapped through ChannelMap.
NETCDF_CF keeps rejecting these files; a cross-check test pins that.
@d-chambers
d-chambers merged commit 28fa0b8 into dev Aug 10, 2026
27 checks passed
@d-chambers
d-chambers deleted the silixa-carina branch August 10, 2026 09:27
d-chambers added a commit that referenced this pull request Aug 10, 2026
The Carina reader (#849) now claims this file but merged without
removing the skip entry, so its common IO tests were silently skipped.
d-chambers added a commit that referenced this pull request Aug 10, 2026
The Carina reader (#849) now claims this file but merged without
removing the skip entry, so its common IO tests were silently skipped.
d-chambers added a commit that referenced this pull request Aug 10, 2026
The Carina reader (#849) now claims this file but merged without
removing the skip entry, so its common IO tests were silently skipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation IO Work for reading/writing different formats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant