Fit Function: JEEXC3

Fit Function \[\begin{align*} \end{align*}\]
Comments

Fortran

Arguments
namedescriptionunitstype(s)
pt requested photon energy eV real, dimension(:)
pcf coefficient data array real, dimension(9)
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 jeexc3(pe, pcf, kncf, pxs, kermsg)
c
c     this is a subroutine to calculate a cross section
c     in cm[2] as function of electron energy in ev for dipole
c     forbidden transitions with spin change.
c     for details see doc=h-he-plasma , used for reactions 2.3.3
c     spin changing transitions only
c
c     pcf is the coefficient data array, where
c
c     pcf(1)  =   coefficient a
c
c     pcf(2)  =   coefficient b
c
c     pcf(3)  =   n, the principal quantum number of the final state
c
c     pcf(4)  =   l, the angular momentum of the the final state
c
c    - warning- .
c
c        the coefficient array pcf is updated by this routine to
c     include energy independent constants. these coefficients can be
c     used in subsequent calls for the same entry. the coefficeients
c     added are:
c
c     pcf(5) = threshold excitation energy for the transition (ev)
c
c     pcf(6) = ionization energy of the state
c
c     pe = electron energy (ev)
c
c     kermsg = blank if no errors
c
c     pxs = cross section in cm[2]
c
c     written by j. j. smith , iaea atomic and molecular data unit
c     modified by d. humbert, 11 March 2008:  n <==> l
c
c------------------------------------------------------------------------
c
      double precision pe, pcf, pxs
      double precision u3, u5, u9, u, nstar, bc
      integer n, l
      dimension pcf(6)
      character*(*) kermsg
      data ry/13.58/

      a= pcf(1)
      b = pcf(2)
      n = pcf(4)
      l = pcf(3)
c
      kermsg = ' '
      if (kncf .lt. 5) then
c
c        first call to jeexc3 determine energy independent
c        parameters and place in pcf for further use
c
c        determine the excitation energy of the final state
c
         call heexcen (n, l,  3, 0,  eexc, kermsg)
         if (kermsg .ne.  ' ') return
c
c        determine the ionization energy of the final state
c
         call heionen (n, l,  3, 0,  eion, kermsg)
         if ( kermsg .ne.  ' ') return
c
c        place energy independent parameters in coefficient array and
c        update kncf
c
         pcf(5) = eexc
         pcf(6) = eion
         kncf = 6
c
      else if (kncf .eq. 6) then
          eexc = pcf(5)
          eion = pcf(6)
c
      else
          kermsg = ' incorrect number of coefficients passed to jeexc3'
          return
      endif
c
      if (n .ge. 4) then
        nstar = sqrt(ry/eion)
        ac = a /(n**3)
      else
         ac = a
      endif
c
      if (pe .lt. eexc) then
        pxs = 0.0
        return
      endif
c
      u = pe / eexc
      u3 = u**3
      u5 = u**5
      u9 = u**9
c
      if (b .gt. 0.0) then
        bc = b/u9
      else
        bc = 0.0
      endif
c
      pxs = 3.52e-16 * ( ac * (1.0/u3 - 1.0/u5) + bc )
c
      return
c
      end

Python

Arguments
namedescriptionunitstype(s)
pt requested photon energy eV float, np.ndarray
pcf coefficient data array float, np.ndarray
kncf number of coefficients in the data array int
pfit cross section cm2 float, np.ndarray
kermsg error message str
Return values
namedescriptionunitstype(s)
pfit cross section cm2 float, np.ndarray
Code