Add Aragon Photonics HDAS format reader (two variants) - #848
Conversation
|
Warning Review limit reached
Next review available in: 7 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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdded HDAS V1 and V2 HDF5 FiberIO readers. The change includes metadata decoding, coordinate construction, format registration, test-data registry entries, common IO integration, and validation tests. ChangesHDAS reader support
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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/hdas/utils.py`:
- Around line 55-63: Update the header validation around divisors, rate, and
spatial_step to require a finite positive trigger frequency, both downsampling
divisor values, and their product, plus a finite positive spatial_step before
coordinate construction; ensure negative divisors cannot pass through a positive
product. Add regression tests covering an infinite spatial step and negative
downsampling divisors.
🪄 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: c7a09c53-6091-4c21-9097-8a876760b7f7
📒 Files selected for processing (8)
dascore/data_registry.txtdascore/io/hdas/__init__.pydascore/io/hdas/core.pydascore/io/hdas/utils.pydocs/changelog.qmdpyproject.tomltests/test_io/test_common_io.pytests/test_io/test_hdas/test_hdas.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #848 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 164 167 +3
Lines 18178 18290 +112
==========================================
+ Hits 18178 18290 +112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
✅ Documentation built: |
Adds FiberIO readers for the HDAS HDF5 layouts: HDASV1 for the vendor File_Header layout (time x distance strain rate, e.g. IGN-ADIF) and HDASV2 for the attr-timed hdas_header variant (distance x time, start_time attr authoritative since the float32 header cannot hold an exact epoch, measurand unrecorded, e.g. ICM-CSIC Canalink). The 200-value header spec (spatial sampling, trigger frequency and downsampling divisors, position offset, epoch) follows the reader script the vendor distributes with the data.
Description
Fourth PR of the format-reader series (#844, #846, #847). Adds FiberIO readers for the Aragon Photonics HDAS HDF5 format, whose acquisition metadata lives in a 200-value float header at fixed positions (spec taken from the vendor's
H5_Reader.mdistributed with the data; decoded values verified against both sample files):File_Header(1, 200) float64 +HDAS_DATA(time × distance) strain rate. Test filehdas_1.h5is a trimmed IGN-ADIF (Spain) file from PubDAS Global DAS Month; its float64 header epoch decodes to sub-µs precision (pinned in a test).hdas_header(200,) float32 +data(distance × time) with astart_timeISO attr. The attr is authoritative because a float32 header cannot represent an exact epoch (~±64 s quantization). The measurand is not recorded in this variant's files, so data units stay unset. Test filehdas_2.h5is a trimmed ICM-CSIC Canalink file.Design notes:
FiberIO.__init_subclass__registers every subclass, creating a phantom blank-version format.start_timeattr; cross-variant non-claiming is tested both directions.InvalidFiberFileError(caught by directory scans) instead of yielding NaN coordinates.Changelog
HDASformat (versions 1 and 2) for Aragon Photonics HDAS HDF5 files, covering both the vendorFile_Headerlayout and the attr-timedhdas_headervariant.Checklist
I have (if applicable):
Summary by CodeRabbit
New Features
Documentation
Tests