irfpy.jdc.flux0
¶
A module to convert between the count rate and the flux for JDC.
A draft g-factor value is used, as in the proposal.
-
class
irfpy.jdc.flux0.
Count2Flux
[source]¶ Bases:
object
Count rate is converted to flux.
G-factor is constant, independent of anything. 5.6x10^-4 cm2 sr eV/eV.
-
getFlux
(cps, energy_step)[source]¶ Depending on energy step, flux is calculated.
Energy step is, as for the module consideration, obtained from
irfpy.jdc.energy0
.>>> c2f = Count2Flux() >>> print('%.3f' % c2f.getFlux(1, 96)) # 1 count level for energy step 96. 0.582
-
getFlux_eV
(cps, energy_eV)[source]¶ Return the expected flux based on the absolute energy value.
Based on the definition of the G-factor, one can get the conversion as
\[J = \frac{C}{GE}\]where
C
is the countr ate in c/s,G
is the g-factor in cm2 sr eV/eV,E
is the energy in eV. The returned will be the differential flux in the unit ofcnts / cm2 sr eV s
.>>> c2f = Count2Flux() >>> print('%.2f' % c2f.getFlux_eV(1, 1000)) # 1 count level for 1000eV channel. 1.79
-