conclusion, validation, discussion, new plots

This commit is contained in:
Jonas Kellerer
2021-04-22 11:16:46 +02:00
parent 4296ff692e
commit b9f6c51c32
22 changed files with 1170 additions and 175 deletions
@@ -0,0 +1,80 @@
#!/bin/python3
import numpy as np
import os
import sys
from astropy import units as u
from astropy import constants as const
import matplotlib
import matplotlib.pyplot as plt
# Specific includes
# =======================
homebase = os.getenv('HOMEBASE')
if homebase == None:
homebase = "/home/jonas/new_workspace/Coding/ACRONYM/acronym"
includes = homebase + "/src/grpic/boundaries_3d"
sys.path.append(includes)
import precalculation.functions.plasmaFunctions as plasmaFuncs
import analysis.plotDataFromAcronym.plot_standards as pltStd
from electronCrossSections import electronCrossSection as ecs
# inputs
# =====================
paper_path = "/home/jonas/new_workspace/notes/paper/docs/paper/monte-carlo-electron-spectrum/"
output_folder = paper_path+"/figures/"
# calculation
# ======================
energies_eV = np.logspace(1,4,100)
b1 = ecs.JanevElectricExcitationNu(energies_eV, 'B1Sigmau')*1E4
bp1 = ecs.JanevElectricExcitationNu(energies_eV, 'Bp1Sigu')*1E4
bpp1 = ecs.JanevElectricExcitationNu(energies_eV, 'Bpp1Sigu')*1E4
c1 = ecs.JanevElectricExcitationNu(energies_eV, 'C1Piu')*1E4
d1 = ecs.JanevElectricExcitationNu(energies_eV, 'D1Piu')*1E4
dp = ecs.JanevElectricExcitationNu(energies_eV, 'Dp1Piu')*1E4
# plots
# ======================
pltStd.setRcParams()
prop_cycle = plt.rcParams['axes.prop_cycle']
colors = prop_cycle.by_key()['color']
(width, height) = pltStd.set_size('thesis')
fig, ax = plt.subplots(1, 1, figsize=(width, height*0.7),sharex=True)
ax.set_facecolor('#e7e7e7ff')
ax.grid(color='white')
ax.set_axisbelow(True)
ax.plot(energies_eV, b1, '-', label='B')
ax.plot(energies_eV, bp1, '--', label='B$^\prime$')
ax.plot(energies_eV, bpp1, '--', label='B$^{\prime\prime}$')
ax.plot(energies_eV, c1, '-.', label='C')
ax.plot(energies_eV, d1, ':', label='D')
ax.plot(energies_eV, dp, ':', label='D$^\prime$')
ax.set_yscale('log')
ax.set_xscale('log')
ax.legend()
ax.set_xlabel(r'Energy $E$ [eV]')
ax.set_ylabel(r'Cross section $\sigma$ [cm$^{2}$]')
#plt.savefig(output_folder+"eT2_ela.pdf",bbox_inches='tight')
plt.show()