irfpy.vels.bible.kfactor

Implementation of K-factor. Section 4 of VEX/ELS bible.

This is an energy-averaged k-factor.

irfpy.vels.bible.kfactor.kfactors()[source]

Return the list of k-factor.

It refers to Table 1 in the bible.

Returns

The k-factors of the specified anode in eV/V

Return type

nparray

irfpy.vels.bible.kfactor.fit_kfactor()[source]

Return the function of the k-factor.

It refers to the equation (1) in bible.

Returns

Function of k-factor. The function will take 1 argument specifying anode.

>>> func_kfactor = fit_kfactor()  # Return the function of k-factor
>>> k10 = func_kfactor(10)  # Return the k-factor of anode 10.
>>> print('%.3f' % k10)
11.012
irfpy.vels.bible.kfactor.kfactor(anode, src='table')[source]

Return the k-factor of the specified anode.

Parameters
  • anode – The number of anode.

  • src – The source, "table" or "fit". "table" refers to kfactor() and "fit" referes to fit_kfactor().

>>> print(kfactor(5))
11.192
>>> print("%.3f" % kfactor(5, src="fit"))
11.253
irfpy.vels.bible.kfactor.doctests()[source]