Skip to content

Commit fb6bc45

Browse files
author
Davide Laghi
committed
fix missing values in exp data
1 parent fb4262c commit fb6bc45

File tree

9 files changed

+36
-3
lines changed

9 files changed

+36
-3
lines changed

JADE-RAW-RESULTS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit be16cfc8b9c2cbffc721b48497753fb87c5f652e

src/jade/post/plotter.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import warnings
77
import matplotlib.pyplot as plt
88
import numpy as np
9+
import logging
910

1011
import pandas as pd
1112
import seaborn as sns
@@ -542,6 +543,16 @@ def _get_figure(self) -> tuple[Figure, list[Axes]]:
542543
target = df.set_index(self.cfg.x)
543544
val2 = target[self.cfg.y]
544545
err2 = target["Error"]
546+
# sometimes there are index which are numerical and may have slight
547+
# differences due to rounding. In reality the two must be the same
548+
# in a C/E plot
549+
if not val1.index.equals(val2.index):
550+
# this is a dirty fix, it may miss some edge cases but they
551+
# should be fairly easy to spot from the plots
552+
logging.debug("Indices do not match, substituting with experiment")
553+
val2.index = val1.index
554+
err2.index = err1.index
555+
545556
values, errors = compare_data(
546557
val1, val2, err1, err2, comparison_type=ComparisonType.RATIO
547558
)

tests/dummy_structure/raw_data/_exp_-_exp_/FNG-BKT/FNG-BKT_Al Reaction rate.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ Cells,Value,Error
88
46.85,2.94E-08,5
99
53.8,1.09E-08,6
1010
60.55,3.71E-09,7
11+
67.4,,
1112
74.4,4.72E-10,10
1213
81.1,2.13E-10,15
14+
87.75,,
15+
92.15,,

tests/dummy_structure/raw_data/_exp_-_exp_/FNG-BKT/FNG-BKT_Fe Reaction rate.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ Cells,Value,Error
1010
60.55,3.67E-09,8
1111
67.4,1.30E-09,10.5
1212
74.4,4.50E-10,12
13+
81.1,,
14+
87.75,,
15+
92.15,,

tests/dummy_structure/raw_data/_exp_-_exp_/FNG-BKT/FNG-BKT_In Reaction rate.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ Cells,Value,Error
1111
67.4,1.61E-08,10
1212
74.4,7.00E-09,12
1313
81.1,2.51E-09,15
14+
87.75,,
15+
92.15,,

tests/dummy_structure/raw_data/_exp_-_exp_/FNG-BKT/FNG-BKT_Mn Reaction rate.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ Cells,Value,Error
1111
67.4,3.47E-07,8
1212
74.4,1.27E-07,10
1313
81.1,5.55E-08,12
14+
87.75,,
15+
92.15,,

tests/dummy_structure/raw_data/_exp_-_exp_/FNG-BKT/FNG-BKT_Ni-n2n Reaction rate.csv

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ Cells,Value,Error
33
10.32,4.15E-06,3.6
44
17.15,9.73E-07,4
55
23.95,2.57E-07,4.5
6-
30.8,8.18E-08,4.5
6+
30.8,,
7+
41.85,,
8+
46.85,,
9+
53.8,,
10+
60.55,,
11+
67.4,,
12+
74.4,,
13+
81.1,,
14+
87.75,,
15+
92.15,,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Cells,Value,Error
22
5,1.38E-04,4.6
33
15,1.50E-05,5.5
4-
25,1.67E-06,5.7
4+
25,1.67E-06,5.7
5+
35,,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Cells,Value,Error
22
5,1.49E-05,4
33
15,8.15E-07,4.5
4-
25,7.19E-08,5.5
4+
25,7.19E-08,5.5
5+
35,,

0 commit comments

Comments
 (0)