diff --git a/xray/utils.py b/xray/utils.py index 864d844..d1f2efa 100644 --- a/xray/utils.py +++ b/xray/utils.py @@ -305,7 +305,7 @@ def transmission(material='Si',thickness=100e-6, density=None, natural_density=N return np.exp(-thickness/att_len) -def chargeToPhoton(chargeOrCurrent,material="Si",thickness=100e-6,energy=10,e_hole_pair=3.6): +def chargeToPhoton(chargeOrCurrent,material="Si",thickness=100e-6,energy=10,e_hole_pair=3.63): """ Function to convert charge (or current to number of photons (or number of photons per second) @@ -322,8 +322,8 @@ def chargeToPhoton(chargeOrCurrent,material="Si",thickness=100e-6,energy=10,e_ho A = 1-transmission(material=material,energy=energy,thickness=thickness) chargeOrCurrent = chargeOrCurrent/A - e_hole_pair_energy = 3.6e-3 - n_charge_per_photon = energy/e_hole_pair_energy + e_hole_pair_energy_keV = e_hole_pair*1e-3 + n_charge_per_photon = energy/e_hole_pair_energy_keV # convert to Q charge_per_photon = n_charge_per_photon*1.60217662e-19 nphoton = chargeOrCurrent/charge_per_photon