mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
ZH: rit: slice_figure colorbar kwargs
This commit is contained in:
parent
bc712b5dbb
commit
cea74ee2cd
1 changed files with 13 additions and 3 deletions
|
@ -114,11 +114,21 @@ def shower_plane_slice(e,X=750.,Nx=10,Ny=10,wx=1e3,wy=1e3,xoff=0,yoff=0,zgr=0,n_
|
||||||
|
|
||||||
return xx,yy,p,locs[np.argmax(p)]
|
return xx,yy,p,locs[np.argmax(p)]
|
||||||
|
|
||||||
def slice_figure(e,X,xx,yy,p,mode='horizontal'):
|
def slice_figure(e,X,xx,yy,p,mode='horizontal', scatter_kwargs={}, colorbar_kwargs={'label':'Power'}):
|
||||||
|
scatter_kwargs = {
|
||||||
|
**dict(
|
||||||
|
cmap='Spectral_r',
|
||||||
|
alpha=0.9,
|
||||||
|
s=30
|
||||||
|
),
|
||||||
|
**scatter_kwargs
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fig, axs = plt.subplots(1,figsize=(10,8))
|
fig, axs = plt.subplots(1,figsize=(10,8))
|
||||||
fig.suptitle(r'E = %.1f EeV, $\theta$ = %.1f$^\circ$, $\phi$ = %.1f$^\circ$ X = %.f'%(e.energy,e.zenith,e.azimuth,X))
|
fig.suptitle(r'E = %.1f EeV, $\theta$ = %.1f$^\circ$, $\phi$ = %.1f$^\circ$ X = %.f'%(e.energy,e.zenith,e.azimuth,X))
|
||||||
sc = axs.scatter(xx/1e3,yy/1e3,c=p,cmap='Spectral_r',alpha=0.6)
|
sc = axs.scatter(xx/1e3,yy/1e3,c=p,**scatter_kwargs)
|
||||||
fig.colorbar(sc,ax=axs)
|
fig.colorbar(sc,ax=axs, **colorbar_kwargs)
|
||||||
zgr = 0 + e.core[2]
|
zgr = 0 + e.core[2]
|
||||||
dX = atm.distance_to_slant_depth(np.deg2rad(e.zenith),X,zgr)
|
dX = atm.distance_to_slant_depth(np.deg2rad(e.zenith),X,zgr)
|
||||||
xc = np.sin(np.deg2rad(e.zenith))*np.cos(np.deg2rad(e.azimuth))* dX
|
xc = np.sin(np.deg2rad(e.zenith))*np.cos(np.deg2rad(e.azimuth))* dX
|
||||||
|
|
Loading…
Reference in a new issue