mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-11-13 01:53:31 +01:00
ZH: reconstruction pickling
This commit is contained in:
parent
d01bd2c78c
commit
e6379e2cd2
1 changed files with 9 additions and 3 deletions
|
@ -12,6 +12,7 @@ import lib
|
|||
from lib import rit
|
||||
from earsim import REvent, Antenna
|
||||
from atmocal import AtmoCal
|
||||
import pickle
|
||||
|
||||
if __name__ == "__main__":
|
||||
from os import path
|
||||
|
@ -27,7 +28,10 @@ if __name__ == "__main__":
|
|||
# Full reconstruction?
|
||||
if False:
|
||||
print("Full reconstruction")
|
||||
res = rit.reconstruction(ev, outfile='ritdir/fig.pdf')
|
||||
with open('ritdir/res.pkl', 'wb') as fp:
|
||||
res = rit.reconstruction(ev, outfile='ritdir/fig.pdf', slice_outdir='ritdir/')
|
||||
|
||||
pickle.dump(res, fp)
|
||||
sys.exit(0)
|
||||
|
||||
# Else do single slice for original timing
|
||||
|
@ -36,7 +40,7 @@ if __name__ == "__main__":
|
|||
|
||||
atm = AtmoCal()
|
||||
X = 750
|
||||
max_clock_offset = 100 # ns
|
||||
max_clock_offset = 10# ns
|
||||
rit.set_pol_and_bp(ev)
|
||||
dXref = atm.distance_to_slant_depth(np.deg2rad(ev.zenith),X,0)
|
||||
scale2d = dXref*np.tan(np.deg2rad(2.))
|
||||
|
@ -79,9 +83,11 @@ if __name__ == "__main__":
|
|||
|
||||
fig.colorbar(sc, ax=axs[0])
|
||||
# Always make sure to show the plot
|
||||
finally:
|
||||
except:
|
||||
plt.show()
|
||||
|
||||
if True:
|
||||
fig.savefig(f"shower_plane_slice_X{X}_T{max_clock_offset}.pdf")
|
||||
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue