fixed bug, the keyword parameter e_hole_pair was actually not used
This commit is contained in:
parent
45e6e44549
commit
2e4a3c83a5
|
@ -305,7 +305,7 @@ def transmission(material='Si',thickness=100e-6, density=None, natural_density=N
|
||||||
return np.exp(-thickness/att_len)
|
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
|
Function to convert charge (or current to number of photons (or number
|
||||||
of photons per second)
|
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)
|
A = 1-transmission(material=material,energy=energy,thickness=thickness)
|
||||||
chargeOrCurrent = chargeOrCurrent/A
|
chargeOrCurrent = chargeOrCurrent/A
|
||||||
|
|
||||||
e_hole_pair_energy = 3.6e-3
|
e_hole_pair_energy_keV = e_hole_pair*1e-3
|
||||||
n_charge_per_photon = energy/e_hole_pair_energy
|
n_charge_per_photon = energy/e_hole_pair_energy_keV
|
||||||
# convert to Q
|
# convert to Q
|
||||||
charge_per_photon = n_charge_per_photon*1.60217662e-19
|
charge_per_photon = n_charge_per_photon*1.60217662e-19
|
||||||
nphoton = chargeOrCurrent/charge_per_photon
|
nphoton = chargeOrCurrent/charge_per_photon
|
||||||
|
|
Loading…
Reference in New Issue