mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
Merge branch 'rit-joblib' into main
This commit is contained in:
commit
c660cb9c1a
1 changed files with 5 additions and 2 deletions
|
@ -93,10 +93,9 @@ def shower_plane_slice(e,X=750.,Nx=10,Ny=10,wx=1e3,wy=1e3,xoff=0,yoff=0,zgr=0,n_
|
|||
|
||||
def loop_func(x_, y_, xoff=xoff, yoff=yoff):
|
||||
loc = (x_+xoff)* e.uAxB + (y_+yoff)*e.uAxAxB + dX *e.uA
|
||||
locs.append(loc)
|
||||
P,t_,pulses_,wav,twav = pow_and_time(loc,e)
|
||||
|
||||
return x_+xoff, y_+yoff, P, locs
|
||||
return x_+xoff, y_+yoff, P, loc
|
||||
|
||||
res = ( delayed(loop_func)(x_, y_) for x_ in x for y_ in y)
|
||||
|
||||
|
@ -107,6 +106,10 @@ def shower_plane_slice(e,X=750.,Nx=10,Ny=10,wx=1e3,wy=1e3,xoff=0,yoff=0,zgr=0,n_
|
|||
# unpack loop results
|
||||
xx, yy, p, locs = zip(*res)
|
||||
|
||||
xx = np.asarray(xx)
|
||||
yy = np.asarray(yy)
|
||||
p = np.asanyarray(p)
|
||||
|
||||
return xx,yy,p,locs[np.argmax(p)]
|
||||
|
||||
def slice_figure(e,X,xx,yy,p,mode='horizontal'):
|
||||
|
|
Loading…
Reference in a new issue