This commit is contained in:
Noe Brucy
2021-11-22 18:19:02 +01:00
parent 4ea97f5372
commit b8f79af121
+3 -3
View File
@@ -252,12 +252,12 @@ class StudyProcessor(Aggregator, HDF5Container):
nb_sink = np.int(content[i].split("=")[1]) nb_sink = np.int(content[i].split("=")[1])
mass_sink = np.float(content[i + 1].split("=")[1]) mass_sink = np.float(content[i + 1].split("=")[1])
time = np.float(content[i + 2].split("=")[1]) time = np.float(content[i + 2].split("=")[1])
timekey = np.float(content[i + 2].split("=")[0]) timekey = content[i + 2].split("=")[0]
series["nb_sink"][run].append(nb_sink) series["nb_sink"][run].append(nb_sink)
series["mass_sink"][run].append(mass_sink) series["mass_sink"][run].append(mass_sink)
if "[yr]" not in timekey: if "[yr]" not in timekey:
time *= self.info["unit_time"].express(U.yr) time *= self.info["unit_time"].express(U.year)
series["time"][run].append(time) series["time"][run].append(time)
except (ValueError, IndexError): except (ValueError, IndexError):
@@ -562,7 +562,7 @@ class StudyProcessor(Aggregator, HDF5Container):
self._extract_sinks_from_log, self._extract_sinks_from_log,
), ),
group="/series", group="/series",
unit={"time": U.yr, "mass_sink": U.Msun, "nb_sink": U.none}, unit={"time": U.year, "mass_sink": U.Msun, "nb_sink": U.none},
description={ description={
"time": "Time", "time": "Time",
"mass_sink": "Total mass of stars", "mass_sink": "Total mass of stars",