From f299f3f9b206f184bb0d0158f820b3d73c674107 Mon Sep 17 00:00:00 2001 From: miili Date: Sun, 5 Nov 2023 14:10:39 +0100 Subject: [PATCH] fixes --- lassie/images/phase_net.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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