aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/restart/analysis_restart.py
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-10-06 15:25:36 -0700
committerGravatar GitHub <noreply@github.com> 2021-10-06 15:25:36 -0700
commitfb2ef4c73f7cf5d0c86c6840cb761d0b85e4bf7d (patch)
treee8d7f5582b2d7cee7bce217f5518ca1b258edf2c /Examples/Tests/restart/analysis_restart.py
parent964c3dce36c1ed80b7d94f400d2fcbe0ab58dd7f (diff)
downloadWarpX-fb2ef4c73f7cf5d0c86c6840cb761d0b85e4bf7d.tar.gz
WarpX-fb2ef4c73f7cf5d0c86c6840cb761d0b85e4bf7d.tar.zst
WarpX-fb2ef4c73f7cf5d0c86c6840cb761d0b85e4bf7d.zip
Python Analysis of Restart Tests: Small Cleanup (#2368)
* Python Analysis of Restart Tests: Small Cleanup * Remove Unused Import
Diffstat (limited to '')
-rwxr-xr-xExamples/Tests/restart/analysis_restart.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Examples/Tests/restart/analysis_restart.py b/Examples/Tests/restart/analysis_restart.py
index 0c0f01df5..51efc95a8 100755
--- a/Examples/Tests/restart/analysis_restart.py
+++ b/Examples/Tests/restart/analysis_restart.py
@@ -1,7 +1,6 @@
#! /usr/bin/env python
import sys
-import re
import yt
import numpy as np
sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
@@ -11,9 +10,6 @@ tolerance = sys.float_info.epsilon
print('tolerance = ', tolerance)
filename = sys.argv[1]
-psatd = True if re.search('psatd', filename) else False
-averaged = True if re.search('avg', filename) else False
-
ds = yt.load( filename )
ad = ds.all_data()
xb = ad['beam', 'particle_position_x'].to_ndarray()
@@ -21,11 +17,7 @@ xe = ad['plasma_e', 'particle_position_x'].to_ndarray()
zb = ad['beam', 'particle_position_z'].to_ndarray()
ze = ad['plasma_e', 'particle_position_z'].to_ndarray()
-filename = 'orig_restart_plt00010'
-if psatd:
- filename = 'orig_restart_psatd_plt00010'
-if averaged:
- filename = 'orig_restart_psatd_time_avg_plt00010'
+filename = 'orig_' + filename
ds = yt.load( filename )
ad = ds.all_data()
xb0 = ad['beam', 'particle_position_x'].to_ndarray()