mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
ZH: fixup to 1d6f0d3b
Missing path.basename for some figures and datafiles
This commit is contained in:
parent
88e172e9bf
commit
1e7c469bb8
2 changed files with 6 additions and 6 deletions
|
@ -140,7 +140,7 @@ if __name__ == "__main__":
|
||||||
fig.colorbar(sc, ax=ax, label=color_label)
|
fig.colorbar(sc, ax=ax, label=color_label)
|
||||||
|
|
||||||
if fig_dir:
|
if fig_dir:
|
||||||
fig.savefig(path.join(fig_dir, __file__ + f".residual.F{freq_name}.pdf"))
|
fig.savefig(path.join(fig_dir, path.basename(__file__) + f".residual.F{freq_name}.pdf"))
|
||||||
|
|
||||||
print(f"True phases written to", antennas_fname)
|
print(f"True phases written to", antennas_fname)
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ if __name__ == "__main__":
|
||||||
locs = list(zip(xx, yy))
|
locs = list(zip(xx, yy))
|
||||||
|
|
||||||
## Save maxima to file
|
## Save maxima to file
|
||||||
np.savetxt(fig_dir + __file__+f'.maxima.run{r}.txt', np.column_stack((locs, maxima_per_loc, ks_per_loc)) )
|
np.savetxt(path.join(fig_dir, path.basename(__file__)+f'.maxima.run{r}.txt'), np.column_stack((locs, maxima_per_loc, ks_per_loc)) )
|
||||||
|
|
||||||
if True: #plot maximum at test locations
|
if True: #plot maximum at test locations
|
||||||
fig, axs = plt.subplots()
|
fig, axs = plt.subplots()
|
||||||
|
@ -358,11 +358,11 @@ if __name__ == "__main__":
|
||||||
old_xlims = axs.get_xlim()
|
old_xlims = axs.get_xlim()
|
||||||
old_ylims = axs.get_ylim()
|
old_ylims = axs.get_ylim()
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
fig.savefig(path.join(fig_dir, __file__+f'.maxima.run{r}.pdf'))
|
fig.savefig(path.join(fig_dir, path.basename(__file__)+f'.maxima.run{r}.pdf'))
|
||||||
if False:
|
if False:
|
||||||
axs.plot(tx.x/1e3, tx.y/1e3, marker='X', color='k')
|
axs.plot(tx.x/1e3, tx.y/1e3, marker='X', color='k')
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
fig.savefig(path.join(fig_dir, __file__+f'.maxima.run{r}.with_tx.pdf'))
|
fig.savefig(path.join(fig_dir, path.basename(__file__)+f'.maxima.run{r}.with_tx.pdf'))
|
||||||
axs.set_xlim(*old_xlims)
|
axs.set_xlim(*old_xlims)
|
||||||
axs.set_ylim(*old_ylims)
|
axs.set_ylim(*old_ylims)
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
|
@ -375,7 +375,7 @@ if __name__ == "__main__":
|
||||||
print('Best k:', best_k)
|
print('Best k:', best_k)
|
||||||
|
|
||||||
## Save best ks to file
|
## Save best ks to file
|
||||||
np.savetxt(fig_dir + __file__+f'.bestk.run{r}.txt', best_k )
|
np.savetxt(path.join(fig_dir, path.basename(__file__)+f'.bestk.run{r}.txt'), best_k )
|
||||||
|
|
||||||
## Do a small reconstruction of the shower for best ks
|
## Do a small reconstruction of the shower for best ks
|
||||||
if True:
|
if True:
|
||||||
|
@ -424,7 +424,7 @@ if __name__ == "__main__":
|
||||||
fname_extra = "max_amp"
|
fname_extra = "max_amp"
|
||||||
|
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
fig.savefig(path.join(fig_dir, __file__+f'.reconstruction.run{r}.{fname_extra}.pdf'))
|
fig.savefig(path.join(fig_dir, path.basename(__file__)+f'.reconstruction.run{r}.{fname_extra}.pdf'))
|
||||||
|
|
||||||
# Abort if no improvement
|
# Abort if no improvement
|
||||||
if ( r!= 0 and (old_ks_per_loc == ks_per_loc[best_idx]).all() ):
|
if ( r!= 0 and (old_ks_per_loc == ks_per_loc[best_idx]).all() ):
|
||||||
|
|
Loading…
Reference in a new issue