Commit 673b0702 authored by Theo Steininger's avatar Theo Steininger

Made logging of hammurabi call more informative in case of exception.

Fixed parameter range in Jaffe13 for B_ran_b2
parent 4bcd2134
......@@ -64,7 +64,7 @@ class Jaffe13MagneticFieldFactory(MagneticFieldFactory):
'B_field_RMS_uG': self._interval(1., 0.3, n),
'B_field_alpha': self._interval(-2.37, 1., n),
'B_field_cutoff': self._interval(5., 1., n),
'B_ran_b2': self._interval(0.1, 1., n),
'B_ran_b2': self._interval(0.1, 0.3, n),
'B_ran_h_d': self._interval(4., 1., n),
'B_ran_h_d2': self._interval(1., 1., n),
'B_ran_h_r': self._interval(15., 5., n),
......
......@@ -167,10 +167,19 @@ class Hammurapy(Observer):
self._write_parameter_dict(parameter_dict=parameter_dict,
working_directory=working_directory)
# call hammurabi
self._call_hammurabi(working_directory)
self._fill_observable_dict(observable_dict,
working_directory,
local_ensemble_index)
self._remove_folder(working_directory)
# if hammurabi failed, _fill_observable_dict will fail
try:
self._fill_observable_dict(observable_dict,
working_directory,
local_ensemble_index)
except:
self.logger.critical("Hammurabi failed! Last call log:\n" +
self.last_call_log)
raise
finally:
self._remove_folder(working_directory)
return observable_dict
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment