-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename analysis script and add analysis for Hermite test
Signed-off-by: Christopher Rabotin <[email protected]>
- Loading branch information
1 parent
16fa548
commit 42c4862
Showing
3 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import pandas as pd | ||
import plotly.express as px | ||
from os.path import abspath, join, dirname | ||
|
||
if __name__ == '__main__': | ||
|
||
target_folder = join(abspath(dirname(__file__)), '..', 'target') | ||
|
||
for name, filename in [("validation", "type13-validation-test-results"), | ||
("outliers", "type13-validation-outliers")]: | ||
|
||
# Load the parquet file | ||
df = pd.read_parquet(f"{target_folder}/{filename}.parquet") | ||
|
||
if name == 'validation': | ||
y = 'relative error' | ||
else: | ||
y = 'absolute error' | ||
|
||
for kind, columns in [("Position", ["X", "Y", "Z"]), | ||
("Velocity", ["VX", "VY", "VZ"])]: | ||
|
||
print(f"== {kind} {name} ==") | ||
|
||
subset = df.loc[df.component.isin(columns)] | ||
|
||
print(subset.describe()) | ||
|
||
plt = px.scatter(subset, | ||
x='File delta T (s)', | ||
y=y, | ||
color='source frame') | ||
|
||
plt.write_html( | ||
f"{target_folder}/{name}-{kind}-validation.html") | ||
plt.show() |
File renamed without changes.