trajectories.pop() traj_fullpath_list.pop() # Load copied trajectory from output directory. # We'll merge the other trajectories into this one, # which will then become the final trajectory traj_final = Trajectory() traj_final.f_load(filename=traj_final_fullpath, index=0, load_parameters=2, load_derived_parameters=2, load_results=2, load_other_data=2, force=True) # Merge trajectories print('Merging trajectory files...') for traj_to_merge in trajectories: traj_final.f_merge( traj_to_merge, remove_duplicates=True, backup=False, # backup_filename=True, delete_other_trajectory=False, slow_merge=True, ignore_data=()) print('Finished merging') print('\nFinal trajectory parameters:') print_leaves(traj_final, 'parameters') print('----------------------------------------------------------\n')
Brian2Parameter]) tr1.f_load(load_parameters=2, load_derived_parameters=2, load_results=2) tr2 = Trajectory(name='tr2', add_time=False, filename=filename, dynamic_imports=[Brian2MonitorResult, Brian2Parameter]) tr2.f_load(load_parameters=2, load_derived_parameters=2, load_results=2) tr1.f_merge(tr2, backup_filename=True, move_data=True, delete_other_trajectory = True) # env = Environment(trajectory='test', # add_time=True, # filename=filename, # continuable=False, # ?? # lazy_debug=False, # ?? # multiproc=True, # ncores=ncores, # use_pool=False, # likely not working w/ brian2 # wrap_mode='QUEUE', # ?? # overwrite_file=True) # tr = env.trajectory