This repository was archived by the owner on Aug 11, 2026. It is now read-only.
Commit e140e51
fix: preserve time_resolution in crop_frequency() and crop_time() (#54)
Both crop methods were not passing time_resolution to new SpectrogramData
instances, causing them to fall back to DEFAULT_TIME_RESOLUTION (0.01508s)
instead of the accurate value calculated from database duration (e.g. 0.015103s).
This small discrepancy accumulates over long recordings, causing significant
timing misalignment. For a 2192-second recording, the error reached ~0.15s.
Now both methods preserve the parent spectrogram's time_resolution, ensuring
accurate timing throughout the crop chain.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent 49c75bd commit e140e51
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
280 | | - | |
| 281 | + | |
| 282 | + | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| |||
0 commit comments