diff options
author | 2019-09-18 13:25:47 -0700 | |
---|---|---|
committer | 2019-09-18 13:25:47 -0700 | |
commit | 3137ac637dd4b6fea7e4fd5df571f1ef524c9396 (patch) | |
tree | 23f20f2b0f8c469410fab839681e3ea43c8d2cb2 /Tools/plot_parallel.py | |
parent | 87c10f49300caabe5d31072d925c00c0c850ce52 (diff) | |
download | WarpX-3137ac637dd4b6fea7e4fd5df571f1ef524c9396.tar.gz WarpX-3137ac637dd4b6fea7e4fd5df571f1ef524c9396.tar.zst WarpX-3137ac637dd4b6fea7e4fd5df571f1ef524c9396.zip |
Bug fix in plot_parallel.py for matplotlib
Diffstat (limited to 'Tools/plot_parallel.py')
-rw-r--r-- | Tools/plot_parallel.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/plot_parallel.py b/Tools/plot_parallel.py index 39d1049a9..f2f2c7ecf 100644 --- a/Tools/plot_parallel.py +++ b/Tools/plot_parallel.py @@ -111,14 +111,14 @@ def plot_snapshot(filename): if pspecies in [x[0] for x in ds.field_list]: if plotlib == 'matplotlib': # Read particle quantities from yt dataset - xp = ad[pspecies, 'particle_position_x'].v + xp = all_data_level_0[pspecies, 'particle_position_x'].v if dim == 3: - yp = ad[pspecies, 'particle_position_y'].v - zp = ad[pspecies, 'particle_position_z'].v + yp = all_data_level_0[pspecies, 'particle_position_y'].v + zp = all_data_level_0[pspecies, 'particle_position_z'].v select = yp**2<(args.slicewidth/2)**2 xp = xp[select] ; yp = yp[select] ; zp = zp[select] if dim == 2: - zp = ad[pspecies, 'particle_position_y'].v + zp = all_data_level_0[pspecies, 'particle_position_y'].v # Select randomly one every pjump particles random_indices = np.random.choice(xp.shape[0], int(xp.shape[0]/args.pjump)) if dim == 2: |