Module for g-factor.

G-factor, well, not simple.

But for simplicity, use gfactor().

>>> print('%.2e' % gfactor(3021, 5))   # Return the g-factor of 3021 eV for CH-5
>>> print('%.2e' % gfactor(3021, 10))   # Return the g-factor of 3021 eV for CH-5

The unit is cm2 sr eV/eV.

The module refers to table 6 in VEX/ELS bible (see lab_gfactor()). They are fitted using a linear function, and the fitted function will be returned from gfactor_func(). The returned function is the function to the energy. gfactor() is the simple way of getting the g-factor for the specified energy and the anode. This is the way that the VEX/ELS bible recommends.[source]

Return 4 energy and 4 x 16 element np.array g-factor cm2 sr eV/eV. Table 6 in VEX/ELS bible.[source], y)[source], above=True)[source]

Return the g-factor as a function of energy.

You can get g-factor from this function. The function returns the g-factor of the specified anode.


anode – The anode number


A function of the g-factor in the unit of cm2 sr eV/eV

Return type


>>> g0 = gfactor_func(0)   # Return the function of g-factor of CH-0
>>> print('%.1e' % g0(1000))   # 1 keV g-factor.

According to the VEX/ELS bible, the g-factor should be get via the fitting of the laboratory data (lab_gfactor()).

The method will return the function (energy dependence) of the g-factor., anode)[source]

Simplest g-factor accessor. Return the g-factor in the unit of cm2 sr eV/eV.

  • energy – Energy in eV.

  • anode – Anode id, 0 to 15.


G-factor in the unit of cm2 sr eV/eV

For example, you can ge the g-factor for 10, 100 and 1000 eV for anode 3 as follows.

>>> print('%.3e' % gfactor(10, 3))
>>> print('%.3e' % gfactor(100, 3))
>>> print('%.3e' % gfactor(1000, 3))
9.579e-06, anode)[source]

Simplest g-factor accessor, with multiple dimensional version, in cm2 sr eV/eV.

  • energies – Energies in eV. Any shape of array

  • anode – Anodes. 0 to 15 (inclusive), integer.



Gfactor returned also have the same shape as energies.

>>> g = gfactor1d([10., 100., 1000.], 3)    # Gfactor of 10, 100 and 1000 eV for anode 3
>>> print('%.3e' % g[0])
>>> print('%.3e' % g[1])
>>> print('%.3e' % g[2])