Fit Function: ACXGL1

Fit Function \[\sigma (pe) = \frac{\text{pcf(1)} \cdot \text{pcf(7)} \cdot \log\left(\frac{\text{pcf(2)}}{e} + \text{pcf(3)}\right)}{1.0 + \text{pcf(4)} \cdot e + \text{pcf(5)} \cdot e^{3.5} + \text{pcf(6)} \cdot e^{5.4}}; \quad e = \frac{pe}{\text{pcf}(7)^{0.428571}}\]
Comments Python code requires NumPy imported as `np`.

Fortran

Arguments
namedescriptionunitstype(s)
pe energy keV amu-1 real, dimension(:)
pcf coefficient data array real, dimension(7)
kncf number of coefficients in the data array integer
pfit cross section cm2 real, dimension(:)
kermsg error message character
Return values
namedescriptionunitstype(s)
pfit cross section cm2 real, dimension(:)
Code
c
c###################################################################
c
      subroutine acxgl1(pe, pcf, kncf, pxs, kermsg)
c
c     this is a subroutine to calculate cross section for
c     projectile energy (ev/amu).
c
c     pe =  projectile energy (keV/amu)
c     pcf(1-6) = parameters for the analytic function.
c     pcf(7) = charge state of the projectile ion
c
c     kermsg = blank if no errors
c
c     pxs  = cross section in 10e-16 cm[2]
c
c     written by j. j. smith , iaea atomic and molecular data unit
c     updated by d. humbert, 12 Feb 2008
c		pe changed from eV/amu to keV/amu
c		pxs from cm[2] to 10e-16 cm[2]
c
c------------------------------------------------------------------------
c
      double precision pe, pcf, pxs
      double precision e, a1, a2, a3, a4, a5, a6
      dimension pcf(7)
      character*(*) kermsg
      a1 = pcf(1)
      a2 = pcf(2)
      a3 = pcf(3)
      a4 = pcf(4)
      a5 = pcf(5)
      a6 = pcf(6)
c
c---  determine the scaled projectile energy - pek in kev/amu
c
      e = pe / (pcf(7) ** 0.428571d0)
c
      pxs = a1 * pcf(7) * dlog(a2/e + a3) /
     1      (1.0d0 + (a4*e) + (a5 * (e**3.5d0)) + (a6 * (e**5.4d0)))
c
      return
c
      end

Python

Arguments
namedescriptionunitstype(s)
pe energy keV amu-1 float, np.ndarray
pcf coefficient data array float, np.ndarray
Return values
namedescriptionunitstype(s)
pxs cross section cm2 float, np.ndarray
Code
def acxgl1(pe, pcf):
    """
    This function calculates the cross-section for projectile energy in keV/amu.

    pe: projectile energy (keV/amu)
    pcf: parameter data array
        pcf[0:6]: parameters for analytic function
        pcf[6]: charge state of the projectile ion
    """
    
    # Determine the scaled projectile energy - pek in keV/amu
    e = pe/(pcf[6]**0.428571)
    
    pxs = pcf[0] * pcf[6] * np.log(pcf[1]/e + pcf[2]) /
                (1.0 + pcf[3] * e + pcf[4] * (e**3.5) + pcf[5] * (e**5.4))
    
    return pxs