From f1795c623856e64a56f979ec2aedde191803fa14 Mon Sep 17 00:00:00 2001 From: Yu-Hao Sun Date: Wed, 26 Aug 2020 11:56:26 -0400 Subject: [PATCH 1/2] delete the factor of 1000 in Kr energy line --- mermithid/misc/ComplexLineShapeUtilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mermithid/misc/ComplexLineShapeUtilities.py b/mermithid/misc/ComplexLineShapeUtilities.py index 4fe05dc7..6c31dc7c 100644 --- a/mermithid/misc/ComplexLineShapeUtilities.py +++ b/mermithid/misc/ComplexLineShapeUtilities.py @@ -66,7 +66,7 @@ def aseev_func_tail(energy_loss_array, gas_type): #convert oscillator strength into energy loss spectrum def get_eloss_spec(e_loss, oscillator_strength, kr_17keV_line): #energies in eV - kinetic_en = kr_17keV_line * 1000 + kinetic_en = kr_17keV_line e_rydberg = 13.605693009 #rydberg energy (eV) a0 = 5.291772e-11 #bohr radius return np.where(e_loss>0 , 4.*np.pi*a0**2 * e_rydberg / (kinetic_en * e_loss) * oscillator_strength * np.log(4. * kinetic_en * e_loss / (e_rydberg**3.) ), 0) From 9630d620a453ddf3b94af6b60a9bb9e0f476eb59 Mon Sep 17 00:00:00 2001 From: Yu-Hao Sun Date: Wed, 26 Aug 2020 12:11:32 -0400 Subject: [PATCH 2/2] fix energy_loss_function --- mermithid/misc/ComplexLineShapeUtilities.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mermithid/misc/ComplexLineShapeUtilities.py b/mermithid/misc/ComplexLineShapeUtilities.py index 6c31dc7c..4016633c 100644 --- a/mermithid/misc/ComplexLineShapeUtilities.py +++ b/mermithid/misc/ComplexLineShapeUtilities.py @@ -69,7 +69,9 @@ def get_eloss_spec(e_loss, oscillator_strength, kr_17keV_line): #energies in eV kinetic_en = kr_17keV_line e_rydberg = 13.605693009 #rydberg energy (eV) a0 = 5.291772e-11 #bohr radius - return np.where(e_loss>0 , 4.*np.pi*a0**2 * e_rydberg / (kinetic_en * e_loss) * oscillator_strength * np.log(4. * kinetic_en * e_loss / (e_rydberg**3.) ), 0) + # https://3.basecamp.com/3700981/buckets/3107037/documents/2224089016 Eq. (3) + # The scaling factor at the front are omitted since a normalization would be in later step. + return np.where(e_loss>0 , 1. / (e_loss) * oscillator_strength * np.log(4. * kinetic_en * e_rydberg / (e_loss**2.) ), 0) # Takes only the nonzero bins of a histogram def get_only_nonzero_bins(bins,hist):