-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.py
executable file
·32 lines (25 loc) · 1.26 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''
Welcome to RADIO MORPHING
start the run with: python example.py
'''
#!/usr/bin/env python
from os.path import split, join, realpath
import sys
# Expand the PYTHONPATH and import the radiomorphing package
root_dir = realpath(join(split(__file__)[0], ".."))
sys.path.append(join(root_dir, "lib", "python"))
import radiomorphing
# Settings of the radiomorphing
data_dir = join(root_dir, "examples", "data")
sim_dir = join(data_dir, "GrandEventADetailed2") # folder containing your refernence shower simulations
out_dir = join(data_dir, "InterpolatedSignals") # folder which will contain radio morphed traces afterwards
antennas = join(out_dir, "antpos_desired.dat") # list of antenna positions you would like to simulate, stored in out_dir in the best case
shower = {
"primary" : "electron", # primary (electron, pion)
"energy" : 0.96, # EeV
"zenith" : 89.5, # deg (GRAND frame)
"azimuth" : 0., # deg (GRAND frame)
"injection_height" : 2000., # m (injection height in the local coordinate system)
"altitude" : 2000. } # m (alitude with respect to sealevel, not necessarily eqivalent to injection height)
# Perform the radiomorphing
radiomorphing.process(sim_dir, shower, antennas, out_dir)