File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22import periodictable
33from functools import reduce
44import jitr .utils .mass as mass
5+ from matplotlib import pyplot as plt
56
67from x4i3 import exfor_manager
78from x4i3 .exfor_reactions import X4Reaction
@@ -64,6 +65,9 @@ def get_db():
6465)
6566
6667
68+ unit_symbols = {"no-dim" : "unitless" , "barns/ster" : "b/Sr" }
69+
70+
6771energyExParserList = [
6872 X4MissingErrorColumnPair (
6973 X4ColumnParser (
@@ -1087,8 +1091,8 @@ def plot_angular_distributions(
10871091 x_units = measurements [0 ][0 ].x_units
10881092 y_units = measurements [0 ][0 ].y_units
10891093 else :
1090- x_units = measurements [0 ].x_units
1091- y_units = measurements [0 ].y_units
1094+ x_units = unit_symbols . get ( measurements [0 ].x_units , measurements [ 0 ]. x_units )
1095+ y_units = unit_symbols . get ( measurements [0 ].y_units , measurements [ 0 ]. y_units )
10921096
10931097 ax .set_xlabel (r"$\theta$ [{}]" .format (x_units ))
10941098 ax .set_ylabel (r"{} [{}]" .format (data_symbol , y_units ))
You can’t perform that action at this time.
0 commit comments