ioniz_cross calculates the ionization cross section as a function of energy, using the approach of Dere et al. (2007) or Fontes et al. (1999) depending on the ion,
|
FUNCTION ioniz_cross,gname,energy_in,z=z,ion=ion,verbose=verbose |
However, this function is not actually used when calculating the ionization rate in ioniz_rate. Rather, the ionization cross-section is (redundantly) calculated for only the Dere et al. case:
|
x0=double(ev1(ifac)/tev(it)) |
|
beta=sqrt(kb*temperature(it)) |
|
egl=ev1(ifac)+xgl*tev(it) |
|
scale_bt,egl,dum,dum,btf(ifac),ev1(ifac),btgl,dum,dum |
|
; di splines were made with a cubic spline fit |
|
y2=spl_init(x_spline(*,ifac),y_spline(*,ifac)) |
|
btcross=spl_interp(x_spline(*,ifac),y_spline(*,ifac),y2,btgl) |
|
btcross=double(btcross) |
|
descale_bt,btgl,btcross,dum,btf(ifac),ev1(ifac),evd2,crossgl,odum |
|
newcross=alpha*beta*exp(-x0)*(total(wgl*xgl*crossgl)+x0*total(wgl*crossgl)) |
|
dirate(it)=dirate(it)+newcross |
ioniz_rate should be refactored to use ioniz_cross such that the Fontes calculations are taken into account and to reduce the redundant implementations of the Dere et al. cross-section calculation.
ioniz_crosscalculates the ionization cross section as a function of energy, using the approach of Dere et al. (2007) or Fontes et al. (1999) depending on the ion,chianti-idl/ionrec/ioniz_cross.pro
Line 108 in 6641fae
However, this function is not actually used when calculating the ionization rate in
ioniz_rate. Rather, the ionization cross-section is (redundantly) calculated for only the Dere et al. case:chianti-idl/ionrec/ioniz_rate.pro
Lines 181 to 191 in 6641fae
ioniz_rateshould be refactored to useioniz_crosssuch that the Fontes calculations are taken into account and to reduce the redundant implementations of the Dere et al. cross-section calculation.