You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
srf.py: write_sw4_hdf5 drops the column indices of slipt1_array, so slip-rate functions are misplaced unless every row i #137
SW4 reads each point's NT1 samples of SR1 as a contiguous series starting at TINIT. The writer uses the number of stored entries as NT1 and the raw .data as SR1, and never looks at .indices. That is only right when every row is stored with no gaps from its first sample. The parser builds rows that way, but any csr_array a user builds (from a dense array, after eliminate_zeros(), or after arithmetic that drops zeros) is not. Interior zeros then disappear and the slip-rate function is squashed in time, without any warning.
The two pulses, 0.25 s apart, are written as two back-to-back samples. The slip-rate duration is cut from 11 samples to 2.
This is the same assumption as #120 (Rust srf_writer.rs), but in the Python SW4 writer, so fixing #120 will not fix it.
Suggested fix: for each row, write the samples from the row's first stored column to its last, filling the gaps with zeros. NT1 is then that span length. Alternatively, check that each row's indices are consecutive and raise if not. Add a test that round-trips a CSR without explicit zeros.
Filed by the weekly issue sweep. Kind: bug, severity: medium.
Activity