.. _gfactors_cena: ================================= How to calculate g-factor for H ================================= Introduction ============ G-factor is important in calculating the differential flux from count rate. Details are written in the :download:`calibration report <../../../src/doc/cena_calibration_issue_1_revision_2.pdf>`. Theory ====== Theory is written in the calibration report. In the calibration report, several definition of the g-factor is defined. Usually, the g-factor is :math:`G_{n,i}^m` (or :math:`G_{n,i}^H`). This g-factor depends on both energy (i) and sector (n). Using 3.15, the g-factor can be used to convert between the count rate and the differential flux. The g-factor can be separated into two part. Energy-dependent G-factor and sector-dependent part. The energy dependent g-factor is defined in 3.19. .. math:: G_{n,i}^{H} = \sigma{\cdot}A{\cdot}e_{i,H}{\cdot}\Bigl(\frac{\Delta E_i}{E_i}\Bigr) {\cdot}[s_n{\cdot}\Delta\Omega_n] = G_i^H {\cdot} [s_n{\cdot}\Delta\Omega_n] Energy dependent g-factor ========================= Energy dependent g-factor, :math:`G_{i}^{H}`, can be derived by aggregating all the parameters that affect to it. :mod:`pyana.cena.gfactor` module contains two derived classes: :class:`pyana.cena.gfactor.GFactorH_Table` and :class:`pyana.cena.gfactor.GFactorH_Component`. The difference is the way of calculation. ``GFactorH_Table`` trust ``Table 3.5`` in the calibration report, while ``GFactorH_Component`` starts from primitive parameters. The method :meth:`energyDependentGfactor ` returns the energy dependent g-factor as 16-element ``numpy.ma.MaskedArray``. In the scripts folder, an example program is placed (cena_ene_gfactor.py). .. literalinclude:: ../../../src/scripts/cena_ene_gfactor.py :linenos: .. image:: ../../../src/scripts/cena_ene_gfactor.png G-factor ======== G-factor, :math:`G_{n,i}^{H}`, can be calculated from the energy dependent g-factor. The :meth:`geometricFactor ` method returns the g-factor. The returned type is ``numpy.ma.MaskedArray`` with element of [7] x [16]. There are a little confusion in the current version (issue 1 revision 1) in the calibration report. There are three calculatable g-factor values. 1. Using the energy dependent g-factor first, and derive g-factor (:class:`pyana.cena.gfactor.GFactorH_Table`) 2. Using the energy dependent g-factor first, and derive g-factor (:class:`pyana.cena.gfactor.GFactorH_Component`) 3. Values listed in Table, only for CH-3. (Not implemented as module) The methods 1 and 2 has little difference, while they returns ~10% larger than the g-factor (3) listed in the last column in Table 3.15 (version ``v1.3+feature/cena_gfactor``). This is to be investigated. .. literalinclude:: ../../../src/scripts/cena_gfactor_ch3.py :linenos: .. image:: ../../../src/scripts/cena_gfactor_ch3.png Date ==== 2011.01.06 See also ======== :ref:`gfactor_matrix` section for advanced g-factor analysis.