From f50f1699bf2800d0358b8c086c07fe7143b9f087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Clau=C3=9F?= Date: Tue, 23 Aug 2022 10:23:25 +0200 Subject: [PATCH] =?UTF-8?q?Auswertung=20f=C3=BCr=20Daten=20der=20TUD=20in?= =?UTF-8?q?=20Hauptklasse=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + README.md | 2 +- pytestpavement/versuche/schichtenverbund.py | 42 +++++++++++++++++++-- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 75094e7..7c85287 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.vscode + # ---> Python # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/README.md b/README.md index 6c4074b..52e7f1e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # pytest -Python Modul zur Auswertung von Versuchsdaten des Straßenbaus \ No newline at end of file +Python Modul zur Auswertung von Versuchsdaten des Straßenbaus diff --git a/pytestpavement/versuche/schichtenverbund.py b/pytestpavement/versuche/schichtenverbund.py index e371266..1ea9d7b 100644 --- a/pytestpavement/versuche/schichtenverbund.py +++ b/pytestpavement/versuche/schichtenverbund.py @@ -8,6 +8,7 @@ import pandas as pd from aenum import enum from fsutil import exists from pytestpavement.analysis import fit_cos, fit_cos_eval +from pytestpavement.io import read_geosys def fit_single_data(g): @@ -87,9 +88,9 @@ class TestSchichtenverbundV2GeoSys(): def __init__(self, filename: str, - diameter: float, + diameter: float = 100.0, spalt: float = 1.0, - tablenum: str = '038', + tablenum: str = '013', debug: bool = False, plot_fit: bool = False, plot_fit_error: bool = True): @@ -136,11 +137,35 @@ class TestSchichtenverbundV2GeoSys(): def _read(self): - self.data = [] + meta, data = read_geosys('./data/raw/TU Dresden/PK4.txt', + self._tablenum, + debug=self._debug) + + self.diameter = meta['d'] + + data = data.reset_index() + + self.data = data def _normalize_data(self): - return + col = list(self.data.columns) + + for i, d in enumerate(col): + + if d == 't': + col[i] = 'time' + elif d == 'f': + col[i] = 'f_set' + elif d == 's_vert_1': + col[i] = 's1' + elif d == 's_vert_2': + col[i] = 's2' + + self.data.columns = col + + if self._debug: + print(self.data.columns) def _set_units(self): @@ -162,6 +187,15 @@ class TestSchichtenverbundV2GeoSys(): check = [item in self.data.columns for item in must_have_values] + if not all(check): + print('Error in Parameters:') + for i, c in enumerate(check): + if c == False: + p = must_have_values[i] + print(f'\t - {p}') + + print(self.data.head()) + assert all(check) pass