diff --git a/simulations/airshower_beacon_simulation/lib/rit.py b/simulations/airshower_beacon_simulation/lib/rit.py index 024dcb6..db2704c 100644 --- a/simulations/airshower_beacon_simulation/lib/rit.py +++ b/simulations/airshower_beacon_simulation/lib/rit.py @@ -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'):