Auswertung für Daten der TUD in Hauptklasse ergänzt

This commit is contained in:
Markus Clauß 2022-08-23 10:23:25 +02:00
parent 1fbd58b68d
commit f50f1699bf
3 changed files with 41 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
.vscode
# ---> Python # ---> Python
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

View File

@ -1,3 +1,3 @@
# pytest # pytest
Python Modul zur Auswertung von Versuchsdaten des Straßenbaus Python Modul zur Auswertung von Versuchsdaten des Straßenbaus

View File

@ -8,6 +8,7 @@ import pandas as pd
from aenum import enum from aenum import enum
from fsutil import exists from fsutil import exists
from pytestpavement.analysis import fit_cos, fit_cos_eval from pytestpavement.analysis import fit_cos, fit_cos_eval
from pytestpavement.io import read_geosys
def fit_single_data(g): def fit_single_data(g):
@ -87,9 +88,9 @@ class TestSchichtenverbundV2GeoSys():
def __init__(self, def __init__(self,
filename: str, filename: str,
diameter: float, diameter: float = 100.0,
spalt: float = 1.0, spalt: float = 1.0,
tablenum: str = '038', tablenum: str = '013',
debug: bool = False, debug: bool = False,
plot_fit: bool = False, plot_fit: bool = False,
plot_fit_error: bool = True): plot_fit_error: bool = True):
@ -136,11 +137,35 @@ class TestSchichtenverbundV2GeoSys():
def _read(self): 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): 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): def _set_units(self):
@ -162,6 +187,15 @@ class TestSchichtenverbundV2GeoSys():
check = [item in self.data.columns for item in must_have_values] 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) assert all(check)
pass pass