Commit ea3b9ae
committed
Let the stride path handle EDF+ annotation channels
The stride decoder reshaped a whole data record into an (n_channels, max_samp)
matrix, which requires every channel to share a sampling rate. An EDF+
annotation channel usually does not: for a 64-channel 256 Hz file with a
60-sample TAL channel a record holds 16444 values while the reshape needs
16640, so 'stride_layout' was None and every EDF+ read fell back to the
per-channel loop.
Gate on the *selected* channels instead, and when a record is not rectangular
gather each picked channel by its own offset. Files whose records are
rectangular keep the existing reshape unchanged.
Fast-path coverage across the EDF/BDF corpus goes from 6/22 files to 18/22.
EDF+ windowed reads 1.76x, EDF+ preload 1.28x, BDF+ windowed reads 1.42x;
files without an annotation channel are unaffected. Output stays bit-identical
to main: 73/73 array snapshots and 52/52 annotation snapshots across 26 files.1 parent e9770d6 commit ea3b9ae
2 files changed
Lines changed: 33 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | 652 | | |
656 | 653 | | |
657 | 654 | | |
| |||
666 | 663 | | |
667 | 664 | | |
668 | 665 | | |
669 | | - | |
| 666 | + | |
670 | 667 | | |
671 | 668 | | |
672 | 669 | | |
| |||
735 | 732 | | |
736 | 733 | | |
737 | 734 | | |
738 | | - | |
739 | | - | |
740 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
741 | 741 | | |
742 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
743 | 748 | | |
744 | 749 | | |
745 | 750 | | |
| |||
1115 | 1120 | | |
1116 | 1121 | | |
1117 | 1122 | | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1122 | 1129 | | |
1123 | 1130 | | |
1124 | 1131 | | |
1125 | | - | |
| 1132 | + | |
| 1133 | + | |
1126 | 1134 | | |
1127 | 1135 | | |
1128 | 1136 | | |
1129 | 1137 | | |
1130 | 1138 | | |
1131 | 1139 | | |
| 1140 | + | |
1132 | 1141 | | |
1133 | 1142 | | |
1134 | 1143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
296 | 305 | | |
297 | 306 | | |
298 | 307 | | |
| |||
0 commit comments