Skip to content

Conversation

@raciner
Copy link

@raciner raciner commented Sep 17, 2025

We discovered that WFCatalogCollector.py is very slow and memory inefficient for large files containing data with high sampling rates. Using a memory profiler, I narrowed it down to metadata = MSEEDMetadata(...) and from there to
self.meta['sample_rms'] = \ np.sqrt(sum((tr.data.astype(object) ** 2).sum() for tr in self.data) / npts)

in obspy/signal/quality_control.py

The proposed code introduces a new subclass FastMSEEDMetadata which replaces obspy.signal.MSEEDMetadata. It replaces the method identified as problematic with verctorised numpy code which should yield the exact same values within numerical error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants