mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2025-05-17 05:19:24 +02:00
WIP
This commit is contained in:
parent
fd636247b9
commit
003245fbd0
2 changed files with 28 additions and 2 deletions
|
@ -22,6 +22,32 @@ atm = AtmoCal()
|
|||
|
||||
from matplotlib import cm
|
||||
|
||||
def location_to_shower_plane(loc, u=None, ev=None):
|
||||
if ev is not None:
|
||||
uAxB = ev.uAxB
|
||||
uAxAxB = ev.uAxAxB
|
||||
uA = ev.uA
|
||||
else:
|
||||
uAxB, uAxAxB, uA = u
|
||||
|
||||
return np.dot(loc, uAxB), np.dot(loc, uAxAxB), np.dot(loc, uA)
|
||||
|
||||
def shower_plane_to_location( x, dXref=0, u=None, ev=None):
|
||||
if len(x) == 2:
|
||||
x, y = x
|
||||
else:
|
||||
x, y, dXref = x
|
||||
|
||||
if ev is not None:
|
||||
uAxB = ev.uAxB
|
||||
uAxAxB = ev.uAxAxB
|
||||
uA = ev.uA
|
||||
else:
|
||||
uAxB, uAxAxB, uA = u
|
||||
|
||||
return x * uAxB + y * uAxAxB + dXref * uA
|
||||
|
||||
|
||||
def set_pol_and_bp(e,low=0.03,high=0.08):
|
||||
for ant in e.antennas:
|
||||
E = [np.dot(e.uAxB,[ex,ey,ez]) for ex,ey,ez in zip(ant.Ex,ant.Ey,ant.Ez)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue