initialize particles directly from standalone ucf file

This commit is contained in:
Michael Krayer 2021-12-16 10:26:19 +01:00
parent 2465e10b70
commit b7b250ca5f
1 changed files with 6 additions and 0 deletions

View File

@ -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):