aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/PGroup.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/PGroup.py')
-rw-r--r--Python/pywarpx/PGroup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/pywarpx/PGroup.py b/Python/pywarpx/PGroup.py
index 92f6b4484..bb8ad11e2 100644
--- a/Python/pywarpx/PGroup.py
+++ b/Python/pywarpx/PGroup.py
@@ -55,6 +55,10 @@ class PGroup(object):
def addspecies(self):
pass
+ def getnpid(self):
+ # --- The -3 is because the comps include the velocites
+ return _labwarpx.warpx_nComps() - 3
+ npid = property(getnpid)
def getnps(self):
return np.array([len(self.xp)], dtype='l')
@@ -104,7 +108,7 @@ class PGroup(object):
uxp = self.getuxp(js)
uyp = self.getuyp(js)
uzp = self.getuzp(js)
- return sqrt(1. - (uxp**2 + uyp**2 + uzp**2)/warpxC.c**2)
+ return np.sqrt(1. - (uxp**2 + uyp**2 + uzp**2)/_libwarpx.clight**2)
gaminv = property(getgaminv)
def getex(self, js=0):