[plotter] [galactica] stringify not accepted ramses params

This commit is contained in:
Noe Brucy
2020-12-16 00:50:19 +01:00
parent bc77c4c1dd
commit b2edc9ba54
+16 -5
View File
@@ -206,17 +206,28 @@ class Plotter(Aggregator, BaseProcessor):
)
for param in ramses.input_parameters:
value = None
try:
value = self.comp.get_nml(param.key, run)
except KeyError as e:
self._log("key {} not found".format(e), "WARNING")
if value is not None:
try:
param_setting = ParameterSetting(
input_param=param,
value=self.comp.get_nml(param.key, run),
value=value,
visibility=ParameterVisibility.BASIC_DISPLAY,
)
simu.parameter_settings.add(param_setting)
except AttributeError:
param_setting = ParameterSetting(
input_param=param,
value=str(value),
visibility=ParameterVisibility.BASIC_DISPLAY,
)
simu.parameter_settings.add(param_setting)
except KeyError as e:
self._log("key {} not found".format(e), "WARNING")
except AttributeError as e:
self._log("{}".format(e), "WARNING")
self.simulations[run] = simu