[plotter] [galactica] stringify not accepted ramses params
This commit is contained in:
+16
-5
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user