diff --git a/particle.py b/particle.py index 5774f9c..c214e69 100644 --- a/particle.py +++ b/particle.py @@ -61,6 +61,12 @@ class Particles: for key in col: col[key]-=1 return cls.from_array(pp,col,time,period,select_col=select_col) + + @classmethod + def from_ucf(cls,file,period,select_col=None): + from .ucf import read_particles + (pp,col,time) = read_particles(file,step=1,verbosity=False,debug=False) + return cls.from_array(pp,col,time,period,select_col=select_col) @classmethod def from_position(cls,x,y,z,time,period):