Skip to content

Commit

Permalink
rescaling: bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Isken committed Nov 18, 2024
1 parent 3927c87 commit dd4f935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qseek/images/seisbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def _detection_half_width(self) -> float:
@alog_call
async def process_traces(self, traces: list[Trace]) -> list[PhaseNetImage]:
stream = Stream(tr.to_obspy_trace() for tr in traces)
if self.rescale_input != 1:
if self.rescale_input != 1.0:
scale = self.rescale_input
for tr in stream:
tr.stats.sampling_rate /= scale
Expand All @@ -306,7 +306,7 @@ async def process_traces(self, traces: list[Trace]) -> list[PhaseNetImage]:
copy=False,
)

if self.rescale_input > 1:
if self.rescale_input != 1.0:
scale = self.rescale_input
for tr in annotations:
tr.stats.sampling_rate *= scale
Expand Down

0 comments on commit dd4f935

Please sign in to comment.