diff --git a/particle.py b/particle.py index 909536b..14325a5 100644 --- a/particle.py +++ b/particle.py @@ -320,9 +320,9 @@ class Trajectories: return self._slice(slice_part=sl[0],slice_time=sl[1]) @classmethod - def from_mat(cls,file,unraveled=False,select_col=None): + def from_mat(cls,file,unraveled=False,select_col=None,varpp='pp'): from .helper import load_mat - pp = load_mat(file,'pp',cast_integer=False) # int casting is expensive and useless on potentially large array + pp = load_mat(file,varpp,cast_integer=False) # int casting is expensive and useless on potentially large array col,time,ccinfo = load_mat(file,['colpy','time','ccinfo'],cast_integer=True) period = [None,None,None] if bool(ccinfo['xperiodic']): period[0]=ccinfo['b'] @@ -608,4 +608,4 @@ def translate_circular(pp,col,translation,bounds,axis=0): L = bounds[2*axis+1] keys = ('x','y','z') pp[col[keys[axis]],:,:] = (pp[col[keys[axis]],:,:]+translation)%L - return pp \ No newline at end of file + return pp