def _prepare_sumatra(self):
reason = self._sumatra_reason<EOL>if reason:<EOL><INDENT>reason += '<STR_LIT>'<EOL><DEDENT>if self._traj.v_comment:<EOL><INDENT>commentstr = '<STR_LIT>' % self._traj.v_comment<EOL><DEDENT>else:<EOL><INDENT>commentstr = '<STR_LIT>'<EOL><DEDENT>reason += '<STR_LIT>' %(self._traj.v_name,<EOL>commentstr,<EOL>str(list(self._traj._explored_parameters.keys())))<EOL>self._logger.info('<STR_LIT>' % reason)<EOL>self._sumatra_reason = reason<EOL>self._loaded_sumatatra_project = load_project(self._sumatra_project)<EOL>if self._traj.f_contains('<STR_LIT>', shortcuts=False):<EOL><INDENT>param_dict = self._traj.parameters.f_to_dict(fast_access=False)<EOL>for param_name in list(param_dict.keys()):<EOL><INDENT>param = param_dict[param_name]<EOL>if param.f_has_range():<EOL><INDENT>param_dict[param_name] = param.f_get_range()<EOL><DEDENT>else:<EOL><INDENT>param_dict[param_name] = param.f_get()<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>param_dict = {}<EOL><DEDENT>relpath = os.path.relpath(sys.modules['<STR_LIT:__main__>'].__file__, self._sumatra_project)<EOL>executable = PythonExecutable(path=sys.executable)<EOL>self._sumatra_record = self._loaded_sumatatra_project.new_record(<EOL>parameters=param_dict,<EOL>main_file=relpath,<EOL>executable=executable,<EOL>label=self._sumatra_label,<EOL>reason=reason)<EOL>
Prepares a sumatra record