From 441208499693bcc179958e7d86ca7bcc5123846c Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 30 Mar 2022 10:53:11 +0200 Subject: [PATCH] Added logging to read_swash --- swash/processing/read_swash.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/swash/processing/read_swash.py b/swash/processing/read_swash.py index 8197bca..9ae9d29 100644 --- a/swash/processing/read_swash.py +++ b/swash/processing/read_swash.py @@ -1,9 +1,12 @@ +import logging import subprocess import tempfile import numpy as np +log = logging.getLogger("read_swash") + class ReadSwash: def __init__(self): self._n_x = None @@ -13,7 +16,9 @@ class ReadSwash: @classmethod def read_nohead(cls, path): + log.info(f"Replacing \\s with \\n in '{path}'") subprocess.run(("sed", "-i", r"s/\s\+/\n/g", path)) + log.info(f"Loading '{path}'") return np.loadtxt(path) def read_time(self, path):