aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/particle_containers.py
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2023-08-24 16:42:50 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-24 16:42:50 -0700
commit9faf953b89ca619c33ad0bafc747ccc59d303281 (patch)
treea8aa817517c9cf25977373bb31389f69da25c0a8 /Python/pywarpx/particle_containers.py
parenta5d25b72c46ff40688a4761171d2c88e9614030c (diff)
downloadWarpX-9faf953b89ca619c33ad0bafc747ccc59d303281.tar.gz
WarpX-9faf953b89ca619c33ad0bafc747ccc59d303281.tar.zst
WarpX-9faf953b89ca619c33ad0bafc747ccc59d303281.zip
Fix Python wrapper to extract `theta` (#4229)
Diffstat (limited to '')
-rw-r--r--Python/pywarpx/particle_containers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pywarpx/particle_containers.py b/Python/pywarpx/particle_containers.py
index 69e6c4f8e..aed051216 100644
--- a/Python/pywarpx/particle_containers.py
+++ b/Python/pywarpx/particle_containers.py
@@ -272,7 +272,7 @@ class ParticleContainerWrapper(object):
if libwarpx.geometry_dim == '3d' or libwarpx.geometry_dim == '2d':
return [struct['x'] for struct in structs]
elif libwarpx.geometry_dim == 'rz':
- return [struct['x']*np.cos(theta) for struct, theta in zip(structs, self.get_particle_theta(species_name))]
+ return [struct['x']*np.cos(theta) for struct, theta in zip(structs, self.get_particle_theta())]
elif libwarpx.geometry_dim == '1d':
raise Exception('get_particle_x: There is no x coordinate with 1D Cartesian')
xp = property(get_particle_x)
@@ -288,7 +288,7 @@ class ParticleContainerWrapper(object):
if libwarpx.geometry_dim == '3d':
return [struct['y'] for struct in structs]
elif libwarpx.geometry_dim == 'rz':
- return [struct['x']*np.sin(theta) for struct, theta in zip(structs, self.get_particle_theta(species_name))]
+ return [struct['x']*np.sin(theta) for struct, theta in zip(structs, self.get_particle_theta())]
elif libwarpx.geometry_dim == '1d' or libwarpx.geometry_dim == '2d':
raise Exception('get_particle_y: There is no y coordinate with 1D or 2D Cartesian')
yp = property(get_particle_y)
@@ -309,7 +309,7 @@ class ParticleContainerWrapper(object):
raise Exception('get_particle_r: There is no r coordinate with 1D or 2D Cartesian')
rp = property(get_particle_r)
- def get_particle_theta(self, species_name, level=0):
+ def get_particle_theta(self, level=0):
'''
Return a list of numpy arrays containing the particle