

def _prepare_sumatra(self):
    ' Prepares a sumatra record '
    reason = self._sumatra_reason
    if reason:
        reason += ' -- '
    if self._traj.v_comment:
        commentstr = (' (`%s`)' % self._traj.v_comment)
    else:
        commentstr = ''
    reason += ('Trajectory %s%s -- Explored Parameters: %s' % (self._traj.v_name, commentstr, str(compat.listkeys(self._traj._explored_parameters))))
    self._logger.info(('Preparing sumatra record with reason: %s' % reason))
    self._sumatra_reason = reason
    self._loaded_sumatatra_project = load_project(self._sumatra_project)
    if self._traj.f_contains('parameters', shortcuts=False):
        param_dict = self._traj.parameters.f_to_dict(fast_access=False)
        for param_name in compat.listkeys(param_dict):
            param = param_dict[param_name]
            if param.f_has_range():
                param_dict[relpath] = param.f_get_range()
            else:
                param_dict[param_name] = param.f_get()
    else:
        param_dict = {
            
        }
    relpath = os.path.relpath(sys.modules['__main__'].__file__, self._sumatra_project)
    executable = PythonExecutable(path=sys.executable)
    self._sumatra_record = self._loaded_sumatatra_project.new_record(parameters=param_dict, main_file=relpath, executable=executable, label=self._sumatra_label, reason=reason)

dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py Environment._prepare_sumatra/VarMisuse@180/307 `param_name`->`relpath`