irfpy.swim.flux
¶
A collection of generic functions to convert from count rate to flux.
- irfpy.swim.flux.simple_c2j(count_, dutytime_s, gfactor_cm2sreV_eV, efficiency_, energy_eV)[source]¶
A simple converter from counts observed to differential flux. Proton is assumed.
- Parameters
count – Observed count [particles/sample]. It can be a count rate [particles/sec], in this case dutytime_s should be set to 1.
dutytime_s – Duty time of the observation [sec/sample]
gfactor_cm2sreV_eV – G-factor [cm^2 sr eV/eV]. Efficiency can be multipled in this variable, in this case efficiency_ should be set to 1.
efficiency – Efficiency [unitless]. G-factor can include efficiency (multiply). In that case, specify one for efficiency_.
energy_eV – Energy of the particles [eV].
- Returns
Differential flux [particles / cm^2 sr eV s]
- irfpy.swim.flux.simple_j2f(J__cm2sreVs, energy_eV)[source]¶
A simple converter from the differential flux [#/cm^2 sr eV s] to the velocity distribution functions [s^3 / m^6]. Proton is assumed.
- Parameters
J__cm2sreVs – Differential flux [#/cm^2 sr eV s]
energy_eV – Energy [eV]
- Returns
Velocity distribution function [s^3 / m^6]
- irfpy.swim.flux.simple_moment(velocitytbl_km_s, fslice_s3_m6)[source]¶
From a velocity distribution function, the density [/m^3]is simply calculated.
Distribution function of Maxwell distribution is expressed by f(v) = n0 ( 1 / 2 pi vth^2 ) ^ 3/2 exp [ - (v-v0)^2 / 2 vth^2 ]. If you can know max(f(v)) and vth, the density is calculated as