def _check_if_both_have_same_parameters(self, other_trajectory,<EOL>ignore_data, consecutive_merge):
if not isinstance(other_trajectory, Trajectory):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' % str(type(other_trajectory)))<EOL><DEDENT>if self._stored and not consecutive_merge:<EOL><INDENT>self.f_load_skeleton()<EOL><DEDENT>if other_trajectory._stored:<EOL><INDENT>other_trajectory.f_load_skeleton()<EOL><DEDENT>other_wildcard_set = set(x[<NUM_LIT:1>] for x in other_trajectory._wildcard_functions.keys())<EOL>wildcard_set = set(x[<NUM_LIT:1>] for x in self._wildcard_functions.keys())<EOL>diff = wildcard_set.symmetric_difference(other_wildcard_set)<EOL>if diff:<EOL><INDENT>raise TypeError('<STR_LIT>' %<EOL>(str(wildcard_set), str(other_wildcard_set)))<EOL><DEDENT>if self._stored:<EOL><INDENT>with self._nn_interface._disable_logging:<EOL><INDENT>self.f_load_items(self._parameters.keys(), only_empties=True)<EOL><DEDENT><DEDENT>if other_trajectory._stored:<EOL><INDENT>with self._nn_interface._disable_logging:<EOL><INDENT>other_trajectory.f_load_items(other_trajectory._parameters.keys(),<EOL>only_empties=True)<EOL><DEDENT><DEDENT>self.f_restore_default()<EOL>other_trajectory.f_restore_default()<EOL>allmyparams = self._parameters.copy()<EOL>allotherparams = other_trajectory._parameters.copy()<EOL>if '<STR_LIT>' in self:<EOL><INDENT>my_traj_dpars = self._derived_parameters<EOL>if self._stored:<EOL><INDENT>with self._nn_interface._disable_logging:<EOL><INDENT>self.f_load_items(my_traj_dpars.keys(), only_empties=True)<EOL><DEDENT><DEDENT>allmyparams.update(my_traj_dpars)<EOL>other_traj_dpars = other_trajectory._derived_parameters<EOL>if other_trajectory._stored:<EOL><INDENT>with self._nn_interface._disable_logging:<EOL><INDENT>other_trajectory.f_load_items(other_traj_dpars.keys(), only_empties=True)<EOL><DEDENT><DEDENT>allotherparams.update(other_traj_dpars)<EOL><DEDENT>my_keyset = set(allmyparams.keys())<EOL>other_keyset = set(allotherparams.keys())<EOL>diff = my_keyset.symmetric_difference(other_keyset) - ignore_data<EOL>run_dummys = (self.f_wildcard('<STR_LIT:$>', -<NUM_LIT:1>), other_trajectory.f_wildcard('<STR_LIT:$>', -<NUM_LIT:1>))<EOL>if diff:<EOL><INDENT>run_difference_can_be_resolved = True<EOL>for full_name in diff:<EOL><INDENT>split_name = full_name.split('<STR_LIT:.>')<EOL>if not any(x in self._run_information or<EOL>x in other_trajectory._run_information or<EOL>x in run_dummys<EOL>for x in split_name):<EOL><INDENT>run_difference_can_be_resolved = False<EOL>break<EOL><DEDENT>elif full_name in allotherparams:<EOL><INDENT>del allotherparams[full_name]<EOL><DEDENT><DEDENT>if not run_difference_can_be_resolved:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % str(diff))<EOL><DEDENT><DEDENT>for key, other_param in allotherparams.items():<EOL><INDENT>if key in ignore_data:<EOL><INDENT>continue<EOL><DEDENT>my_param = self.f_get(key)<EOL>split_key = key.split('<STR_LIT:.>')<EOL>if any(x in self._run_information or<EOL>x in other_trajectory._run_information<EOL>for x in split_key):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if not my_param._values_of_same_type(my_param.f_get(), other_param.f_get()):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(key, str(type(my_param.f_get())),<EOL>str(type(other_param.f_get()))))<EOL><DEDENT><DEDENT><DEDENT>
Checks if two trajectories live in the same space and can be merged.