From d89f11ae35d2bc594056b56fe9919cebff98a1fe Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Wed, 22 Mar 2023 13:47:25 -0400 Subject: [PATCH] document lorentzian --- bandfit/bandfit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bandfit/bandfit.py b/bandfit/bandfit.py index 564086d..9a246ab 100644 --- a/bandfit/bandfit.py +++ b/bandfit/bandfit.py @@ -40,8 +40,12 @@ def lorentzian(x, x0, γ): return γ**2 / ((x - x0) ** 2 + γ**2) -def double_lorentzian(x, x0_1, x0_2, γ, r=1): - return lorentzian(x, x0_1, γ) + r * lorentzian(x, x0_2, γ) +def double_lorentzian(x, x0_1, x0_2, γ, a, b): + """ + A sum of two lorentzians of equal width cerntered around + ``x0_1,x0_2`` with width ``γ`` peak heights ``a, b`` + """ + return a * lorentzian(x, x0_1, γ) + b * lorentzian(x, x0_2, γ) def detect_bands_fixed_k(