#!/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(-3,3,100) rec_T = ecs.radiativeRecombinationH(energies_eV)*1E4 rec_T2 = ecs.dissociativeRecombinationH2(energies_eV)*1E4 rec_T3 = ecs.dissociativeRecombinationH3(energies_eV)*1E4 rec_T5 = ecs.dissociatveRecombinationH5(energies_eV)*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, rec_T, '-', label='T$^+$') ax.plot(energies_eV, rec_T2, '--', label='T$^+_2$') ax.plot(energies_eV, rec_T3, '-.', label='T$^+_3$') ax.set_yscale('log') ax.set_xscale('log') ax.legend() ax.set_ylim(1E-19, 1E-12) ax.set_xlabel(r'Energy $E$ (eV)') ax.set_ylabel(r'Cross section $\sigma$ (cm$^{2}$)') plt.savefig(output_folder+"eTI_overview.pdf",bbox_inches='tight') plt.show()