Fit Function: JAN1

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 aljan1(pet, pcf, kncf, pfit, kermsg)
c
c     this is a subroutine to calculate cross sections (cm[2])
c     versus energy (ev) or electron impact reaction rate
c     coefficient (cm[3]/s) versus electron tempreature (ev).
c     using the log natural polynomial fit of janev et al.
c
c     these fits are valid only between the limits emin and emax,
c     which are parameters pcf(1) and pcf(2) in the entry data field
c     the parameters pcf(3-11) are the coeficients for the fiiting
c     formula.
c
c     pet = collision energy in ev
c
c     kermsg = blank if no errors
c
c     pfit = cross section in cm[2]
c
c     written by j. j. smith , iaea atomic and molecular data unit
c
c------------------------------------------------------------------------
c
      double precision pet, pcf, pfit
      double precision emin, emax, aloge1, aloge, xjan, xcon
      dimension pcf(11)
      character*(*) kermsg

      emin=pcf(1)
      emax = pcf(2)
      if(pet .ge. emin .and. pet .le. emax) then
        kermsg = ' '
      else
        kermsg = 'outside range of fit in aljanxs'
        return
      endif
c
c     calculate natutral log polynomial
c
      aloge1 = dlog(pet)
      aloge = aloge1
      xjan = pcf(3)
      do 10 i=4,11
      xcon = pcf(i)*aloge
      xjan = xjan + xcon
   10 aloge=aloge * aloge1
      pfit = dexp(xjan)
  100 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