Commit 44afcf4e authored by Markus Gaug's avatar Markus Gaug
Browse files

stylish improvements

parent 2983d261
Pipeline #7270 failed with stages
in 0 seconds
......@@ -50,15 +50,15 @@ z0_guess = 3.3 # z0 in beta inversion (referene point with assumed mol.
# initialize the axis ranges
x_min = 0 # in km
x_max = 6.5 # in km
x_max = 6.3 # in km
y_min = 11.8
y_max = 21.5
y_max = 22.5
# molecular fit ranges
x_mol0 = 0.6 # in km
x_mol1 = 1.3 # in km
x_mol2 = 1.75 # in km
x_mol3 = 2.25 # in km
x_mol0 = 0.65 * 0.94 # in km
x_mol1 = 1.3 * 0.94 # in km
x_mol2 = 1.75 * 0.94 # in km
x_mol3 = 2.25 * 0.94 # in km
max_ranges_visualized = [ 8. , 0.5, # 355 nm in km
4. , 4., # 387 nm in km
......@@ -76,14 +76,14 @@ min_ranges_beta = [ 0.5 ]
max_ranges_beta = [ 4. ]
sigma_min = -3e-4 *1e3
sigma_max = 0.0025*1e3
sigma_max = 0.003*1e3
# standard channel configuration
labels = [ '355 nm (elastic)', '355 nm (photon counting)',
'387 nm (analog)', '387 nm (Raman)',
'532 nm (elastic)', '532 nm (photon counting)',
'near range (analog)', 'near range (532nm, elastic)' ]
labels = [ 'BRL 355 nm (elastic)', 'BRL 355 nm (photon counting)',
'BRL 387 nm (analog)', 'BRL 387 nm (Raman)',
'BRL 532 nm (elastic)', 'BRL 532 nm (photon counting)',
'BRL near range (analog)', 'BRL near range (532nm)' ]
colors = [ 'purple' , 'purple', 'mediumslateblue', 'mediumslateblue', 'green', 'green', 'limegreen', 'limegreen']
uv_id = 0
raman_id = 2
......@@ -341,7 +341,7 @@ def show_file(filename):
ray = Rayleigh(channel.wavelength_nm * u.nm) # initialize Rayleigh backscatter coefficient for used wavelength
beta_mol_0 = ray.dbeta_domega((180 * u.deg).to(u.rad)) # mol. backscatter coefficient at altitude 0 from LIDAR
ids2 = (x_height > x_mol0*costheta) & (x_height < x_mol1*costheta)
ids2 = (x_height > x_mol0) & (x_height < x_mol1)
# fit molecular profile to data and obtain the LIDAR constant c0
ans1, pcov1 = curve_fit(lambda xl, c0: eval_molecular_profile(xl, c0, integrate_mol_from, costheta, beta_mol_0), x_height[ids2] + H0.to(u.km).value, sr[ids2],p0=[ 15. ])
......@@ -353,7 +353,7 @@ def show_file(filename):
#ax[0].plot(y_fit, x_height[ids2], label = r"molecular fit {:.0f} nm".format(channel.wavelength_nm), color=colors[channel_id])
ax[0].plot(y_fit, x_height[ids2], color=colors[channel_id])
ids2 = (x_height > x_mol2*costheta) & (x_height < x_mol3*costheta)
ids2 = (x_height > x_mol2) & (x_height < x_mol3)
# fit molecular profile to data and obtain the LIDAR constant c0
ans2, pcov2 = curve_fit(lambda xl, c0: eval_molecular_profile(xl, c0, integrate_mol_from, costheta, beta_mol_0), x_height[ids2] + H0.to(u.km).value, sr[ids2],p0=[ 15. ])
......@@ -418,10 +418,10 @@ def show_file(filename):
if (vertical_axis):
ax[0].text(y_min+(y_max-y_min)*0.65,x_min+(x_max_used-x_min)*0.12,
ax[0].text(y_min+(y_max-y_min)*0.65,x_min+(x_max_used-x_min)*0.94,
u'zenith={:.0f}\u00B0'.format(licel.zenith_ang),
fontsize='x-large')
ax[0].text(y_min+(y_max-y_min)*0.65,x_min+(x_max_used-x_min)*0.05,
ax[0].text(y_min+(y_max-y_min)*0.65,x_min+(x_max_used-x_min)*0.87,
'{:.0f} shots'.format(licel.laser1['shots']),
fontsize='x-large')
ax[0].set_ylim(x_min,x_max_used)
......@@ -537,7 +537,7 @@ def show_file(filename):
std_h = np.std(x_raman_filt[ids_lr]/1000.*costheta)
#ax[2].plot(alphaaer_filt[ids_lr]/beta_aerosol[ids_lr],x_raman_filt[ids_lr]/1000.*costheta, color=colors[channel_id])
#ax[2].errorbar(mean_green,mean_h,std_h,std_green, color=colors[channel_id])
plt.title('Barcelona Raman LIDAR - CTAO Pathfinder {:s}, {:s} UTC'.format(ddate,dtime))
plt.title('Barcelona Raman LIDAR (BRL) - CTAO Pathfinder {:s}, {:s} UTC - commissioning mode only (reduced HV)'.format(ddate,dtime))
ax3 = ax[2].twiny()
angstrom = np.log(alpha_fitted_green/alpha_fitted_uv) / np.log(532./355.)
......@@ -559,11 +559,14 @@ def show_file(filename):
ids_smagic = np.where(height_smagic > min_magic)
ax[1].plot(sigma_magic[ids_smagic],height_smagic[ids_smagic], label=r"$\alpha_{aer}$ (MAGIC)",color='gray', linestyle='dashed')
ax[0].legend(loc='best')
ax[1].legend(loc='best')
ax2.legend(loc='center right')
ax3.legend(loc='center right')
ax[2].legend(loc='best')
#ax[0].legend(loc='lower right')
ax[0].legend(loc='lower left', bbox_to_anchor=(0.465,0.03))
#ax[1].legend(loc='lower right')
ax[1].legend(loc='lower left', bbox_to_anchor=(0.465,0.03))
ax2.legend(loc='upper right', bbox_to_anchor=(0.95,0.95))
ax3.legend(loc='upper right', bbox_to_anchor=(0.95,0.95))
#ax[2].legend(loc='lower right')
ax[2].legend(loc='lower left', bbox_to_anchor=(0.465,0.03))
ax[0].grid(axis='y')
ax[1].grid(axis='y')
ax[2].grid(axis='y')
......@@ -583,7 +586,7 @@ def show_file(filename):
ax3.set_xlim(0.,1.)
else:
ax[0].set_ylabel(r'Logarithm range-corrected signal (log(p.e. $\cdot m) )$')
plt.savefig('propaganda_plot.pdf')
plt.savefig('BRL_RamanLIDAR_{:s}_{:s}.pdf'.format(ddate,dtime))
plt.show()
if __name__ == "__main__":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment