feat(decode): a histogram's interval detail -- frequencies (#50), vector sums, interval size, stop
Group B of the file-only decode, measured on DL2 2026-11-03: - Frequency = (sample rate / 2) / half-period: 527,915 / 527,915 cells at 1024 sps and 1,725 / 1,725 at 2048. #50: half_period_to_hz took a fixed 512 and halved every 2048-sps frequency; it now takes the rate (default 1024). Blastware prints 'N/A' for a half-period of 0, '>100' ('>200' at 2048) at 5 samples or fewer, '<1.0' below 1 Hz. - Each interval's vector sum, sqrt(PVS^2) at the event's range: 771,354 / 771,354. - Interval size: uint16 seconds at k - 40 (Series IV [8:10]). - Stop: the footer's (2,995 / 2,999 sampled; 4 print a second earlier). Event gains histogram_interval_sec, interval_half_periods, interval_pvs and stop_time; the .h5 gains /intervals/half_period/<ch>, /intervals/pvs_ips and a histogram_interval_sec attr. The decoder walks a histogram once (histogram_codec.channels_from_records) and takes the event's PVS from the same records. The checker compares each interval column, number or Blastware's word; the test that pinned Tran Freq Hz as blank now pins the match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
1 parent
67b3ef8d0a
commit
2b698e74cf
10 files changed
+312
-32
No files matched your search
@@ -695,3 +695,10 @@ def test_third_block_still_rejects_a_mismatched_counter():
|
||||
+ _mk_multi_block(ivs, ctr=257)
|
||||
+ _mk_multi_block(ivs, ctr=999)) # counter jumps — not consecutive
|
||||
assert detect_multi_interval_stride(body) != 12 + 20 * 4
|
||||
|
||||
|
||||
def test_half_period_to_hz_follows_the_sample_rate():
|
||||
"""#50: (sample rate / 2) / half-period, measured on 1,725 / 1,725 cells at
|
||||
2048 sps; the old fixed 512 halved them."""
|
||||
assert half_period_to_hz(6, 2048) == pytest.approx(1024 / 6)
|
||||
assert half_period_to_hz(6) == pytest.approx(512 / 6) # 1024 sps by default
|
||||
Reference in new issue
Block a user