deepcode-ci-bot[bot]: <img src="https://www.deepcode.ai/icons/green_check.svg" width= "50px" align= "left"/> Congratulations :tada:. DeepCode [analyzed](https://www.deepcode.ai/app/gh/wright-group/WrightTools/ca9f389c4c87e801546f41861faf03ca8440118c/wright-group/WrightTools/cf2f44c2f34b13b67f835d2cf51d17ae238ec51c/_/%2F/code/?utm_source=gh_review) your code in 1.107 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.

##### 👉 View analysis in [**DeepCode’s Dashboard**](https://www.deepcode.ai/app/gh/wright-group/WrightTools/ca9f389c4c87e801546f41861faf03ca8440118c/wright-group/WrightTools/cf2f44c2f34b13b67f835d2cf51d17ae238ec51c/_/%2F/code/?utm_source=gh_review)
---

ksunden: Confirmed that travis did in fact pass, just Github not getting the memo, apparenly, using administrative privledges to merge
diff --git a/WrightTools/kit/__init__.py b/WrightTools/kit/__init__.py
index 47ee909..a1966fb 100644
--- a/WrightTools/kit/__init__.py
+++ b/WrightTools/kit/__init__.py
@@ -7,6 +7,7 @@ from ._discover_dimensions import *
 from ._ini import *
 from ._interpolate import *
 from ._leastsq import *
+from ._lineshapes import *
 from ._list import *
 from ._path import *
 from ._timestamp import *
diff --git a/WrightTools/kit/_lineshapes.py b/WrightTools/kit/_lineshapes.py
new file mode 100644
index 0000000..5169522
--- /dev/null
+++ b/WrightTools/kit/_lineshapes.py
@@ -0,0 +1,135 @@
+"""Lineshapes."""
+
+
+# --- import -------------------------------------------------------------
+
+
+import numpy as np
+
+from scipy.special import wofz
+
+
+# --- define -------------------------------------------------------------
+
+
+__all__ = ["gaussian", "lorentzian_complex", "lorentzian_real", "voigt"]
+
+
+# --- functions ----------------------------------------------------------
+
+
+def gaussian(x, x0, FWHM, norm="height"):
+    """Calculate a normalized Gaussian lineshape
+
+    Parameters
+    ----------
+    x : array_like or number
+        Input array.
+    x0 : array_like or number
+        Center of lineshape.
+    FHWM : array_like or number
+        Full-width-at-half-maximum of lineshape.
+    norm : string (optional):
+        Type of normalization.
+        height specifies that the maximum value is 1.
+        area specifies that the lineshape integrates to 1.
+        Default is height.        
+
+    Returns
+    -------
+    array_like or number
+        Gaussian lineshape.
+    """
+    c = FWHM / (2 * np.sqrt(2 * np.log(2)))
+    arr = np.exp(-1 * (x - x0) ** 2 / (2 * c ** 2))
+    if norm == "height":
+        return arr
+    elif norm == "area":
+        return arr / (c * np.sqrt(2 * np.pi))
+
+
+def lorentzian_complex(x, x0, G, norm="height_imag"):
+    """Calculate a normalized complex Lorentzian lineshape
+
+    Parameters
+    ----------
+    x : array_like or number
+        Input array.
+    x0 : array_like or number
+        Center of lineshape.
+    G : array_like or number
+        Half-width-at-half-maximum of lineshape.
+    norm : string (optional):
+        Type of normalization.
+        height_imag specifies that the maximum value of the imaginary component is 1.
+        area_int specifies that the square magnitude of the lineshape integrates to 1.
+        Default is height_imag.       
+
+    Returns
+    -------
+    array_like or number
+        Complex Lorentzian lineshape.
+    """
+    arr = 1 / (x0 - x - 1j * G)
+    if norm == "height_imag":
+        return arr * G
+    elif norm == "area_int":
+        return arr * np.sqrt(G / np.pi)
+
+
+def lorentzian_real(x, x0, G, norm="height"):
+    """Calculate a normalized Lorentzian lineshape
+
+    Parameters
+    ----------
+    x : array_like or number
+        Input array.
+    x0 : array_like or number
+        Center of lineshape.
+    G : array_like or number
+        Half-width-at-half-maximum of lineshape.
+    norm : string (optional):
+        Type of normalization.
+        height specifies that the maximum value is 1.
+        area specifies that the lineshape integrates to 1.
+        Default is height.        
+
+    Returns
+    -------
+    array_like or number
+        Lorentzian lineshape.
+    """
+    arr = G ** 2 / ((x - x0) ** 2 + G ** 2)
+    if norm == "height":
+        return arr
+    if norm == "area":
+        return arr / (G * np.pi)
+
+
+def voigt(x, x0, FWHM, G):
+    """Calculate an unnormalized Voigt lineshape using Scipy's Faddeeva function
+    
+    `Link to Voigt article on Wikipedia`__
+
+    __ https://en.wikipedia.org/wiki/Voigt_profile  
+
+    Parameters
+    ----------
+    x : array_like or number
+        Input array.
+    x0 : array_like or number
+        Center of lineshape.
+    FHWM : array_like or number
+        Full-width-at-half-maximum of Gaussian part of lineshape.
+    G : array_like or number
+        Half-width-at-half-maximum of Lorentzian part of lineshape.  
+
+    Returns
+    -------
+    array_like or number
+        Voigt lineshape.
+    """
+    c = FWHM / (2 * np.sqrt(2 * np.log(2)))
+    arr = (x - x0 + 1j * G) / (c * np.sqrt(2))
+    w = wofz(arr)
+    return np.real(w) / (c * np.sqrt(2 * np.pi))
diff --git a/examples/lineshapes.py b/examples/lineshapes.py
new file mode 100644
index 0000000..6d51afc
--- /dev/null
+++ b/examples/lineshapes.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+"""
+Lineshapes
+==========
+
+Common lineshapes included in kit
+"""
+
+import matplotlib.pyplot as plt
+
+import WrightTools as wt
+
+import numpy as np
+
+
+# initiate figure
+fig, gs = wt.artists.create_figure(nrows=2, default_aspect=0.6)
+axs = [plt.subplot(gs[i]) for i in range(2)]
+
+# initial parameters
+x = np.linspace(-2, 2, 1001)
+x0 = 0
+FWHM = 1
+G = 0.5
+# plot all of the real versions
+ax = axs[0]
+y = wt.kit.gaussian(x, x0, FWHM, norm="height")
+ax.plot(x, y, label="Gaussian, height")
+y = wt.kit.gaussian(x, x0, FWHM, norm="area")
+ax.plot(x, y, label="Gaussian, area")
+y = wt.kit.lorentzian_real(x, x0, G, norm="height")
+ax.plot(x, y, label="Lorentzian, height")
+y = wt.kit.lorentzian_real(x, x0, G, norm="area")
+ax.plot(x, y, label="Lorentzian, area")
+y = wt.kit.voigt(x, x0, FWHM, G)
+ax.plot(x, y / y.max(), label="Voigt")
+# plot the complex variants
+ax = axs[1]
+y = wt.kit.lorentzian_complex(x, x0, G, norm="height_imag")
+ax.plot(x, y.real, label="Re[L], height_imag")
+ax.plot(x, y.imag, label="Im[L], height_imag")
+y = wt.kit.lorentzian_complex(x, x0, G, norm="area_int")
+ax.plot(x, y.real, label="Re[L], area_int")
+ax.plot(x, y.imag, label="Im[L], area_int")
+# finish
+for ax in axs:
+    ax.legend(
+        bbox_to_anchor=(1.04, 0.5),
+        loc="center left",
+        borderaxespad=0,
+        title="Lineshape, normalization",
+    )
+    ax.grid()
+    ax.set_xlim(-2, 2)
+wt.artists.set_fig_labels(fig, "X", "Y")

Gaussian, Lorentzian, Voight functions in kit
We should offer area and height normalized options for each. And a complex form of the Lorentzian.

Gaussian
![image](https://user-images.githubusercontent.com/15792657/52025869-9d728580-24cb-11e9-944a-642cde548691.png)
![image](https://user-images.githubusercontent.com/15792657/52025878-a4999380-24cb-11e9-98ab-c88180511696.png)
![image](https://user-images.githubusercontent.com/15792657/52025892-af542880-24cb-11e9-8f66-414273ac1f21.png)
Lorentzian
![image](https://user-images.githubusercontent.com/15792657/52025943-e6c2d500-24cb-11e9-8c4a-4abdd973c007.png)


diff --git a/tests/kit/lineshapes.py b/tests/kit/lineshapes.py
new file mode 100644
index 0000000..4196f7c
--- /dev/null
+++ b/tests/kit/lineshapes.py
@@ -0,0 +1,55 @@
+"""Test lineshapes."""
+
+
+# --- import --------------------------------------------------------------------------------------
+
+
+import numpy as np
+
+import WrightTools as wt
+
+
+# --- test ----------------------------------------------------------------------------------------
+
+
+def test_gaussian():
+    x = np.linspace(-2, 2, 1001)
+    x0 = 0
+    FWHM = 1
+    y = wt.kit.gaussian(x, x0, FWHM, norm="area")
+    assert np.isclose(np.trapz(y, x), 1, rtol=1e-3, atol=1e-3)
+    y = wt.kit.gaussian(x, x0, FWHM, norm="height")
+    assert np.isclose(y.max(), 1, rtol=1e-3, atol=1e-3)
+
+
+def test_lorentzian_complex():
+    x = np.linspace(-50, 50, 100001)
+    x0 = 0
+    G = 0.1
+    y = wt.kit.lorentzian_complex(x, x0, G, norm="area_int")
+    assert np.isclose(np.trapz(np.abs(y) ** 2, x), 1, rtol=1e-3, atol=1e-3)
+    y = wt.kit.lorentzian_complex(x, x0, G, norm="height_imag")
+    assert np.isclose(y.imag.max(), 1, rtol=1e-3, atol=1e-3)
+
+
+def test_lorentzian_real():
+    x = np.linspace(-50, 50, 100001)
+    x0 = 0
+    G = 0.1
+    y = wt.kit.lorentzian_real(x, x0, G, norm="area")
+    assert np.isclose(np.trapz(y, x), 1, rtol=1e-3, atol=1e-3)
+    y = wt.kit.lorentzian_real(x, x0, G, norm="height")
+    assert np.isclose(y.max(), 1, rtol=1e-3, atol=1e-3)
+
+
+def test_voigt():
+    x = np.linspace(-2, 2, 1001)
+    x0 = 0
+    G = 0.5
+    FWHM = 1
+    gauss = wt.kit.gaussian(x, x0, FWHM, norm="height")
+    lor = wt.kit.lorentzian_real(x, x0, G, norm="height")
+    y = wt.kit.voigt(x, x0, FWHM, 0)
+    assert np.all(np.isclose(y / y.max(), gauss, rtol=1e-3, atol=1e-3))
+    y = wt.kit.voigt(x, x0, 1e-6, G)
+    assert np.all(np.isclose(y / y.max(), lor, rtol=1e-3, atol=1e-3))

pip install -e .[dev]
parse_log_pytest
pytest
pytest pytest-cov black pre-commit pydocstyle
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
black==25.1.0
cfgv==3.4.0
click==8.1.8
contourpy==1.3.0
coverage==7.8.0
cycler==0.12.1
distlib==0.3.9
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
filelock==3.18.0
fonttools==4.56.0
h5py==3.13.0
identify==2.6.9
imageio==2.37.0
importlib_resources==6.5.2
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
kiwisolver==1.4.7
matplotlib==3.9.4
mypy-extensions==1.0.0
nodeenv==1.9.1
numexpr==2.10.2
numpy==2.0.2
packaging @ file:///croot/packaging_1734472117206/work
pathspec==0.12.1
pillow==11.1.0
platformdirs==4.3.7
pluggy @ file:///croot/pluggy_1733169602837/work
pre_commit==4.2.0
pydocstyle==6.3.0
pyparsing==3.2.3
pytest @ file:///croot/pytest_1738938843180/work
pytest-cov==6.0.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
scipy==1.13.1
six==1.17.0
snowballstemmer==2.2.0
tidy_headers==1.0.4
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions==4.13.0
virtualenv==20.29.3
-e git+https://github.com/wright-group/WrightTools.git@ca9f389c4c87e801546f41861faf03ca8440118c#egg=WrightTools
zipp==3.21.0

name: WrightTools
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - black==25.1.0
      - cfgv==3.4.0
      - click==8.1.8
      - contourpy==1.3.0
      - coverage==7.8.0
      - cycler==0.12.1
      - distlib==0.3.9
      - filelock==3.18.0
      - fonttools==4.56.0
      - h5py==3.13.0
      - identify==2.6.9
      - imageio==2.37.0
      - importlib-resources==6.5.2
      - kiwisolver==1.4.7
      - matplotlib==3.9.4
      - mypy-extensions==1.0.0
      - nodeenv==1.9.1
      - numexpr==2.10.2
      - numpy==2.0.2
      - pathspec==0.12.1
      - pillow==11.1.0
      - platformdirs==4.3.7
      - pre-commit==4.2.0
      - pydocstyle==6.3.0
      - pyparsing==3.2.3
      - pytest-cov==6.0.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - scipy==1.13.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - tidy-headers==1.0.4
      - typing-extensions==4.13.0
      - virtualenv==20.29.3
      - zipp==3.21.0
prefix: /opt/conda/envs/WrightTools

tests/kit/lineshapes.py::test_gaussian tests/kit/lineshapes.py::test_lorentzian_complex tests/kit/lineshapes.py::test_lorentzian_real tests/kit/lineshapes.py::test_voigt
WrightTools/kit/_lineshapes.py examples/lineshapes.py WrightTools/kit/__init__.py
WrightTools/kit/_lineshapes.py examples/lineshapes.py WrightTools/kit/__init__.py