From 512b80eb067f25d447ad329a1f1c309a7fcd7bab Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 31 Mar 2022 10:31:45 +0200 Subject: [PATCH] Switched cm to m in time-series --- data/processing/ts.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/processing/ts.py b/data/processing/ts.py index 428da00..a8b41b0 100644 --- a/data/processing/ts.py +++ b/data/processing/ts.py @@ -3,6 +3,7 @@ import configparser import logging import pathlib +import matplotlib.pyplot as plt import numpy as np parser = argparse.ArgumentParser(description="Pre-process time-series") @@ -39,4 +40,9 @@ t = np.linspace(0, 30 * 60, 2305)[:-1] log.debug(f"{t=}") log.info(f"Saving timeseries to '{out_ts}'") -np.savetxt(out_ts, np.stack((t, raw_ts["z"]), axis=1)) +np.savetxt(out_ts, np.stack((t, raw_ts["z"]/100), axis=1)) + +fig, ax = plt.subplots() +ax.plot(t, raw_ts["z"]) +ax.set(xlabel="t (s)", ylabel="z (cm)") +fig.savefig(out_root.joinpath("ts.pdf"))