diff --git a/lassie/images/phase_net.py b/lassie/images/phase_net.py index 602f4b11..5fb108b7 100644 --- a/lassie/images/phase_net.py +++ b/lassie/images/phase_net.py @@ -1,5 +1,6 @@ from __future__ import annotations +import asyncio import logging from datetime import datetime, timedelta from typing import TYPE_CHECKING, Any, Literal @@ -162,7 +163,8 @@ async def process_traces(self, traces: list[Trace]) -> list[PhaseNetImage]: for tr in stream: tr.stats.sampling_rate = tr.stats.sampling_rate / scale - annotations: Stream = self._phase_net.annotate( + annotations: Stream = await asyncio.to_thread( + self._phase_net.annotate, stream, overlap=self.window_overlap_samples, batch_size=self.batch_size