run directory now separate from source directory

This commit is contained in:
Yohai Meiron 2021-03-17 20:37:12 -04:00
parent 11c0db23a3
commit 0a2344563d
3 changed files with 11 additions and 7 deletions

View file

@ -91,6 +91,8 @@ def gen_mask(particle_list, frac):
mask = np.ones(N, dtype=int)
elif frac==1:
mask = np.zeros(N, dtype=int)
elif (frac < 0) or (1 < frac):
raise RuntimeError('Fraction has to be between 0 and 1')
else:
X = particle_list[:,:3]
V = particle_list[:,3:]