aboutsummaryrefslogtreecommitdiff
path: root/Example/Larmor/plot_particle_path.py
diff options
context:
space:
mode:
Diffstat (limited to 'Example/Larmor/plot_particle_path.py')
-rw-r--r--Example/Larmor/plot_particle_path.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Example/Larmor/plot_particle_path.py b/Example/Larmor/plot_particle_path.py
index 81beccc8e..2dece53c2 100644
--- a/Example/Larmor/plot_particle_path.py
+++ b/Example/Larmor/plot_particle_path.py
@@ -74,12 +74,12 @@ def read_particle_data(fn, ptype="particle0"):
with open(fn, 'rb') as f:
f.seek(where)
ints = np.fromfile(f, dtype = idtype, count=count)
- floats = np.fromfile(f, dtype = fdtype, count=count)
+ floats = np.fromfile(f, dtype = fdtype, count=count)
+
+ idata[ip:ip+count] = ints
+ rdata[ip:ip+count] = floats
+ ip += count
- idata[ip] = ints
- rdata[ip] = floats
- ip += 1
-
return idata, rdata