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 lib import rit
|
||||||
from earsim import REvent, Antenna
|
from earsim import REvent, Antenna
|
||||||
from atmocal import AtmoCal
|
from atmocal import AtmoCal
|
||||||
|
import pickle
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from os import path
|
from os import path
|
||||||
|
@ -27,7 +28,10 @@ if __name__ == "__main__":
|
||||||
# Full reconstruction?
|
# Full reconstruction?
|
||||||
if False:
|
if False:
|
||||||
print("Full reconstruction")
|
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)
|
sys.exit(0)
|
||||||
|
|
||||||
# Else do single slice for original timing
|
# Else do single slice for original timing
|
||||||
|
@ -36,7 +40,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
atm = AtmoCal()
|
atm = AtmoCal()
|
||||||
X = 750
|
X = 750
|
||||||
max_clock_offset = 100 # ns
|
max_clock_offset = 10# ns
|
||||||
rit.set_pol_and_bp(ev)
|
rit.set_pol_and_bp(ev)
|
||||||
dXref = atm.distance_to_slant_depth(np.deg2rad(ev.zenith),X,0)
|
dXref = atm.distance_to_slant_depth(np.deg2rad(ev.zenith),X,0)
|
||||||
scale2d = dXref*np.tan(np.deg2rad(2.))
|
scale2d = dXref*np.tan(np.deg2rad(2.))
|
||||||
|
@ -79,9 +83,11 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
fig.colorbar(sc, ax=axs[0])
|
fig.colorbar(sc, ax=axs[0])
|
||||||
# Always make sure to show the plot
|
# Always make sure to show the plot
|
||||||
finally:
|
except:
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
if True:
|
||||||
|
fig.savefig(f"shower_plane_slice_X{X}_T{max_clock_offset}.pdf")
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue