In this notebook implements an interactive 3-D trajectories visualizer. To visualize trajectories you need simulatte the trajectories first.
For more info see PyBroMo Homepage.
Together with a few standard python libraries we import PyBroMo using the short name pbm
.
All PyBroMo functions will be available as pbm.
something.
%matplotlib inline
import numpy as np
import tables
import matplotlib.pyplot as plt
import pybromo as pbm
print('Numpy version:', np.__version__)
print('PyTables version:', tables.__version__)
print('PyBroMo version:', pbm.__version__)
#SIM_DIR = r'E:\Data\pybromo'
S = pbm.ParticlesSimulation.from_datafile('016') #, path=SIM_DIR)
# SIM_DIR = r'C:\Data\pybromo'
# S = pbm.ParticlesSimulation.from_datafile('e95', path=SIM_DIR)
%matplotlib qt
plt.close('all')
p = pbm.plotter.EmissionPlotter(S, duration=0.1, decimate=100, color_pop=False)
For simulations using radial = False
(i.e. the 3D trajectories saved):
p = pbm.plotter.TrackEmPlotter(S, duration=0.005, decimate=20)
For simulations using radial = True
(i.e. the z-r 2D trajectories saved):
p = pbm.plotter.TrackEmPlotterR(S, duration=0.01, decimate=100)