Repository: PlasmaPy/PlasmaPy

Issue:
Update or consolidate lite function versions of plasma dispersion function and derivative
I just noticed in #2271 that `plasma_dispersion_func_lite` and `plasma_dispersion_func_deriv_lite` are currently not decorated with any Numba decorators, and thus are not being just-in-time compiled.

I don't know if we need separate lite functions for the plasma dispersion function and its derivative because they are intended for complex numbers and arrays, rather than `Quantity` objects (although there could be dimensionless `Quantity` usage).  I'm wondering if we could make the plasma dispersion function itself a lite function (though not in name).  

Our options are:
 - Decorate `plasma_dispersion_func_lite` and `plasma_dispsersion_func_deriv_lite` with `@numba.jit` so that it gets just-in-time compiled.
 - Cythonize these functions instead.
 - Remove the plasma dispersion function lite functions entirely
 - Consolidate the lite functions into cythonized/jitted regular functions (if we can figure out how to handle dimensionless `Quantity` objects.

Discussion:
github-actions[bot]: Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱

  Our [**contributor guide**](https://docs.plasmapy.org/en/latest/contributing/index.html) has information on:

   - [Getting ready to contribute](https://docs.plasmapy.org/en/latest/contributing/getting_ready.html#getting-ready-to-contribute) and the [code contribution workflow](https://docs.plasmapy.org/en/latest/contributing/workflow.html#code-contribution-workflow)
   - Using [`astropy.units`](https://docs.plasmapy.org/en/latest/notebooks/getting_started/units.html#Using-Astropy-Units) and [`plasmapy.particles`](https://docs.plasmapy.org/en/latest/notebooks/getting_started/particles.html#Using-PlasmaPy-Particles)
   - [Coding tips and guidelines](https://docs.plasmapy.org/en/latest/contributing/coding_guide.html#coding-guide)
   - [Writing documentation](https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#writing-documentation) (in [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#restructuredtext-primer) with [numpydoc style docstrings](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard)).
   - [Writing tests](https://docs.plasmapy.org/en/latest/contributing/testing_guide.html#testing-guide) using [pytest](https://docs.pytest.org)
   - [Adding a changelog entry](https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry) (needed except for minor changes)

  The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our [**chat room**](https://docs.plasmapy.org/en/latest/contributing/coding_guide.html) or weekly [**community meeting**](https://www.plasmapy.org/meetings/weekly) & [**office hours**](https://www.plasmapy.org/meetings/office_hours). Here are some tips:

   - Try fixing **CI / Python 3.11** test failures first.
   - Most **pre-commit.ci - pr** failures can be automagically fixed by commenting `pre-commit.ci autofix` below, followed by a `git pull` to bring the changes back to your computer.
   - If **pre-commit.ci - pr** says that a function is too long or complex, try breaking up that function into multiple short functions that each do one thing. See also these tips on [**writing clean scientific software**](https://doi.org/10.5281/zenodo.3922956).
   - If the **CI / Documentation** check ends with a cryptic error message, check out our [documentation troubleshooting guide](https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting).
   - For a documentation preview, click on *Details* next to **docs/readthedocs.org:plasmapy**.

  If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder.

  Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples.

  We thank you once again!
review-notebook-app[bot]: Check out this pull request on&nbsp; <a href="https://app.reviewnb.com/PlasmaPy/PlasmaPy/pull/2361"><img align="absmiddle"  alt="ReviewNB" height="28" class="BotMessageButtonImage" src="https://raw.githubusercontent.com/ReviewNB/support/master/images/button_reviewnb.png"/></a> 

 See visual diffs & provide feedback on Jupyter Notebooks. 

---

 <i>Powered by <a href='https://www.reviewnb.com/?utm_source=gh'>ReviewNB</a></i>
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) Report
Attention: `3 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`9673474`)](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/commit/96734741e990ddd11c9418aa0e1dc2c07e5deaf3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) 98.26% compared to head [(`e5ab614`)](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) 98.25%.
> Report is 1 commits behind head on main.

> :exclamation: Current head e5ab614 differs from pull request most recent head 6923920. Consider uploading reports for the commit 6923920 to get more accurate results

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #2361      +/-   ##
==========================================
- Coverage   98.26%   98.25%   -0.02%     
==========================================
  Files         102      102              
  Lines        8606     8588      -18     
==========================================
- Hits         8457     8438      -19     
- Misses        149      150       +1     
```


| [Files](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) | Coverage Δ | |
|---|---|---|
| [plasmapy/formulary/dielectric.py](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy#diff-cGxhc21hcHkvZm9ybXVsYXJ5L2RpZWxlY3RyaWMucHk=) | `100.00% <100.00%> (ø)` | |
| [plasmapy/dispersion/dispersion\_functions.py](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy#diff-cGxhc21hcHkvZGlzcGVyc2lvbi9kaXNwZXJzaW9uX2Z1bmN0aW9ucy5weQ==) | `94.73% <91.66%> (-5.27%)` | :arrow_down: |
| [plasmapy/dispersion/dispersionfunction.py](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy#diff-cGxhc21hcHkvZGlzcGVyc2lvbi9kaXNwZXJzaW9uZnVuY3Rpb24ucHk=) | `66.66% <0.00%> (ø)` | |


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy).

namurphy: @ejohnson-96 — Might you have a chance to look at this again since it's changed since when you approved it a few weeks ago?

Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f46533c2..7090525a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,7 +5,7 @@ ci:
 repos:
 
 - repo: https://github.com/pre-commit/pre-commit-hooks
-  rev: v4.4.0
+  rev: v4.5.0
   hooks:
   - id: check-ast
   - id: check-merge-conflict
@@ -34,7 +34,7 @@ repos:
   - id: remove-crlf
 
 - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
-  rev: v2.10.0
+  rev: v2.11.0
   hooks:
   - id: pretty-format-ini
     args: [--autofix]
diff --git a/changelog/2300.bugfix.rst b/changelog/2300.bugfix.rst
index 891ccf08..737aaae6 100644
--- a/changelog/2300.bugfix.rst
+++ b/changelog/2300.bugfix.rst
@@ -1,1 +1,1 @@
-Enable ``time_step`` parameter in `~plasmapy.analysis.time_series.excess_statistics.ExcessStatistics` class to have a astropy unit.
+Enabled the ``time_step`` parameter in `~plasmapy.analysis.time_series.excess_statistics.ExcessStatistics` class to be a |Quantity| with a unit.
diff --git a/changelog/2361.breaking.rst b/changelog/2361.breaking.rst
new file mode 100644
index 00000000..e1204ab3
--- /dev/null
+++ b/changelog/2361.breaking.rst
@@ -0,0 +1,6 @@
+Removed the |lite-functions|
+for `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
+and `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`.
+Instead, the performance of the original functions has been improved
+by using a :py:`try` and :py:`except` block instead of having multiple
+:py:`if` statements to check for preconditions.
diff --git a/changelog/2361.trivial.rst b/changelog/2361.trivial.rst
new file mode 100644
index 00000000..ff2e2891
--- /dev/null
+++ b/changelog/2361.trivial.rst
@@ -0,0 +1,3 @@
+Both `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
+and `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`
+now allow |inf| and |nan| arguments without raising a `ValueError`.
diff --git a/docs/_global_substitutions.py b/docs/_global_substitutions.py
index 6c215e3a..b9180b16 100644
--- a/docs/_global_substitutions.py
+++ b/docs/_global_substitutions.py
@@ -81,6 +81,8 @@
     "getting ready to contribute": r":ref:`getting ready to contribute`\ ",
     "glossary": r":ref:`glossary`\ ",
     "keyword-only": r":term:`keyword-only`\ ",
+    "lite-function": r":term:`lite-function`\ ",
+    "lite-functions": r":term:`lite-functions`\ ",
     "maxpython": "3.11",
     "minpython": "3.9",
     "parameter": r":term:`parameter`\ ",
diff --git a/docs/about/citation.rst b/docs/about/citation.rst
index 7022fe13..e7e3d766 100644
--- a/docs/about/citation.rst
+++ b/docs/about/citation.rst
@@ -3,8 +3,8 @@
 Acknowledging and Citing
 ========================
 
-.. |version_to_cite| replace:: 2023.5.1
-.. |doi_hyperlink| replace:: https://doi.org/10.5281/zenodo.8015753
+.. |version_to_cite| replace:: 2023.10.0
+.. |doi_hyperlink| replace:: https://doi.org/10.5281/zenodo.10011217
 .. |citation_year| replace:: 2023
 
 If you use PlasmaPy for a project that results in a publication, we ask
diff --git a/docs/changelog/0.8.1.rst b/docs/changelog/0.8.1.rst
index ef02c3be..ab1aedd7 100644
--- a/docs/changelog/0.8.1.rst
+++ b/docs/changelog/0.8.1.rst
@@ -227,9 +227,9 @@ Features
   were also migrated. (`#1453
   <https://github.com/plasmapy/plasmapy/pull/1453>`__)
 - Created :term:`lite-functions`
-  `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_lite`
+  ``plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_lite``
   and
-  `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_lite`
+  ``plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_lite``
   for `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
   and
   `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`
diff --git a/docs/install.rst b/docs/install.rst
index 01dab94b..a03c4ec6 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -218,7 +218,7 @@ package should also be installed.
 .. _create an issue: https://github.com/PlasmaPy/PlasmaPy/issues/new/choose
 .. _download Python: https://www.python.org/downloads
 .. _from PyPI: https://pypi.org/project/plasmapy
-.. _from Zenodo: https://doi.org/10.5281/zenodo.1436011
+.. _from Zenodo: https://doi.org/10.5281/zenodo.6774349
 .. _improving Conda performance: https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/conda-performance.html#improving-conda-performance
 .. _installing Anaconda Navigator: https://docs.anaconda.com/free/navigator/install
 .. _installing Conda: https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html
diff --git a/docs/notebooks/dispersion/dispersion_function.ipynb b/docs/notebooks/dispersion/dispersion_function.ipynb
index 505941a9..76629441 100644
--- a/docs/notebooks/dispersion/dispersion_function.ipynb
+++ b/docs/notebooks/dispersion/dispersion_function.ipynb
@@ -51,9 +51,7 @@
    },
    "outputs": [],
    "source": [
-    "import plasmapy.dispersion.dispersion_functions\n",
-    "\n",
-    "help(plasmapy.dispersion.dispersion_functions.plasma_dispersion_func)"
+    "from plasmapy.dispersion import plasma_dispersion_func, plasma_dispersion_func_deriv"
    ]
   },
   {
@@ -147,7 +145,7 @@
    "outputs": [],
    "source": [
     "# sphinx_gallery_thumbnail_number = 2\n",
-    "F = plasmapy.dispersion.dispersion_functions.plasma_dispersion_func(Z)\n",
+    "F = plasma_dispersion_func(Z)\n",
     "plot_complex(X, Y, F)"
    ]
   },
@@ -155,11 +153,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "So this is going to be a hack and I'm not 100% sure the dispersion function\n",
-    "is quite what I think it is, but let's find the area where the dispersion\n",
-    "function has a lesser than zero real part because I think it may be important\n",
-    "(brb reading Fried and Conte):\n",
-    "\n"
+    "Let's find the area where the dispersion function has a lesser than zero real part:"
    ]
   },
   {
@@ -180,8 +174,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "We can also visualize the derivative:\n",
-    "\n"
+    "We can visualize the derivative:"
    ]
   },
   {
@@ -195,7 +188,7 @@
    },
    "outputs": [],
    "source": [
-    "F = plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv(Z)\n",
+    "F = plasma_dispersion_func_deriv(Z)\n",
     "plot_complex(X, Y, F)"
    ]
   },
@@ -235,7 +228,7 @@
    },
    "outputs": [],
    "source": [
-    "F = plasmapy.dispersion.dispersion_functions.plasma_dispersion_func(Z)\n",
+    "F = plasma_dispersion_func(Z)\n",
     "plot_complex(X, Y, F, 100)"
    ]
   },
@@ -243,13 +236,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Now we examine the derivative of the dispersion function as a function\n",
-    "of the phase velocity of an electromagnetic wave propagating through\n",
-    "the plasma. This is recreating figure 5.1 in:\n",
-    "J. Sheffield, D. Froula, S. H. Glenzer, and N. C. Luhmann Jr,\n",
-    "Plasma scattering of electromagnetic radiation: theory and measurement\n",
-    "techniques. Chapter 5 Pg 106 (Academic press, 2010).\n",
-    "\n"
+    "Now we examine the derivative of the dispersion function as a function of the phase velocity of an electromagnetic wave propagating through the plasma. This is recreating figure 5.1 in J. Sheffield, D. Froula, S. H. Glenzer, and N. C. Luhmann Jr, Plasma scattering of electromagnetic radiation: theory and measurement techniques, ch. 5, p. 106 (Academic press, 2010)."
    ]
   },
   {
@@ -264,9 +251,7 @@
    "outputs": [],
    "source": [
     "xs = np.linspace(0, 4, 100)\n",
-    "ws = (-1 / 2) * plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv(\n",
-    "    xs\n",
-    ")\n",
+    "ws = (-1 / 2) * plasma_dispersion_func_deriv(xs)\n",
     "wRe = np.real(ws)\n",
     "wIm = np.imag(ws)\n",
     "\n",
diff --git a/plasmapy/dispersion/dispersion_functions.py b/plasmapy/dispersion/dispersion_functions.py
index 26c1a5e7..77b6683d 100644
--- a/plasmapy/dispersion/dispersion_functions.py
+++ b/plasmapy/dispersion/dispersion_functions.py
@@ -4,93 +4,52 @@
 """
 __all__ = ["plasma_dispersion_func", "plasma_dispersion_func_deriv"]
 
-__lite_funcs__ = ["plasma_dispersion_func_lite", "plasma_dispersion_func_deriv_lite"]
 
 import astropy.units as u
-import numbers
 import numpy as np
 
-from scipy.special import wofz as Faddeeva_function  # noqa: N812
+from numbers import Complex
+from scipy.special import wofz as faddeeva_function
 from typing import Union
 
-from plasmapy.utils.decorators import bind_lite_func, preserve_signature
 
-__all__ += __lite_funcs__
-
-
-@preserve_signature
-def plasma_dispersion_func_lite(zeta):
+def plasma_dispersion_func(
+    zeta: Union[Complex, np.ndarray, u.Quantity[u.dimensionless_unscaled]]
+) -> Union[Complex, np.ndarray, u.Quantity[u.dimensionless_unscaled]]:
     r"""
-    The :term:`lite-function` version of
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`.
-    Performs the same calculation as
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`,
-    but is intended for computational use and, thus, has all data
-    conditioning safeguards removed.
-
-    Parameters
-    ----------
-    zeta : |array_like| of real or complex values
-        Argument of the plasma dispersion function. ``zeta`` is
-        dimensionless.
-
-    Returns
-    -------
-    Z : |array_like| of complex values
-        Value of plasma dispersion function.
-
-    See Also
-    --------
-    ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func
-
-    """
+    Calculate the plasma dispersion function.
 
-    return 1j * np.sqrt(np.pi) * Faddeeva_function(zeta)
+    The plasma dispersion function is defined as:
 
+    .. math::
+        Z(ζ) = π^{-0.5} \int_{-∞}^{+∞}
+        \frac{e^{-x^2}}{x-ζ} dx
 
-@bind_lite_func(plasma_dispersion_func_lite)
-def plasma_dispersion_func(
-    zeta: Union[complex, np.ndarray, u.Quantity]
-) -> Union[complex, np.ndarray, u.Quantity]:
-    r"""
-    Calculate the plasma dispersion function.
+    where the argument is a complex number :cite:p:`fried:1961`.
 
     Parameters
     ----------
-    zeta : complex, int, float, ~numpy.ndarray, or ~astropy.units.Quantity
-        Argument of plasma dispersion function.
+    zeta : |array_like| or |Quantity|
+        The real or complex value to be provided as an argument to the
+        plasma dispersion function.
 
     Returns
     -------
-    Z : complex, float, or ~numpy.ndarray
-        Value of plasma dispersion function.
+    |array_like| or |Quantity|
+        The real or complex value of plasma dispersion function
+        evaluated at ``zeta``.
 
     Raises
     ------
-    TypeError
-        If the argument is of an invalid type.
-
     ~astropy.units.UnitsError
-        If the argument is a `~astropy.units.Quantity` but is not
-        dimensionless.
-
-    ValueError
-        If the argument is not entirely finite.
+        If ``zeta`` is a |Quantity| but is not dimensionless.
 
     See Also
     --------
-    plasma_dispersion_func_deriv
+    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`
 
     Notes
     -----
-    The plasma dispersion function is defined as:
-
-    .. math::
-        Z(ζ) = π^{-0.5} \int_{-∞}^{+∞}
-        \frac{e^{-x^2}}{x-ζ} dx
-
-    where the argument is a complex number :cite:p:`fried:1961`.
-
     In plasma wave theory, the plasma dispersion function appears
     frequently when the background medium has a Maxwellian
     distribution function.  The argument of this function then refers
@@ -98,118 +57,61 @@ def plasma_dispersion_func(
 
     Examples
     --------
+    >>> from plasmapy.dispersion import plasma_dispersion_func
     >>> plasma_dispersion_func(0)
     1.7724538509055159j
-    >>> plasma_dispersion_func(1j)
-    0.757872156141312j
-    >>> plasma_dispersion_func(-1.52+0.47j)
-    (0.6088888957234254+0.33494583882874024j)
-
-    For user convenience
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_lite`
-    is bound to this function and can be used as follows:
-
-    >>> plasma_dispersion_func.lite(0)
-    1.7724538509055159j
-    >>> plasma_dispersion_func.lite(1j)
-    0.757872156141312j
-    >>> plasma_dispersion_func.lite(-1.52+0.47j)
-    (0.6088888957234254+0.33494583882874024j)
+    >>> plasma_dispersion_func(1 + 1j)
+    (-0.369...+0.540...j)
+    >>> plasma_dispersion_func([0.3, 0.7 + 2.3j])
+    array([-0.56526333+1.61990085j, -0.09995023+0.37685142j])
     """
-    if not isinstance(
-        zeta, (numbers.Integral, numbers.Real, numbers.Complex, np.ndarray, u.Quantity)
-    ):
+    try:
+        return 1j * np.sqrt(np.pi) * faddeeva_function(zeta)
+    except u.UnitTypeError as wrong_units:
+        raise u.UnitsError(
+            "The argument to plasma_dispersion_func "
+            "must be dimensionless if it is a Quantity."
+        ) from wrong_units
+    except TypeError as wrong_type:
         raise TypeError(
-            "The argument to plasma_dispersion_function "
-            "must be one of the following types: complex, float, "
-            "int, ndarray, or Quantity."
-        )
-
-    if isinstance(zeta, u.Quantity):
-        if zeta.unit == u.dimensionless_unscaled:
-            zeta = zeta.value
-        else:
-            raise u.UnitsError(
-                "The argument to plasma_dispersion_function "
-                "must be dimensionless if it is a Quantity"
-            )
-
-    if not np.all(np.isfinite(zeta)):
-        raise ValueError("The argument to plasma_dispersion_function is not finite.")
+            "The argument to plasma_dispersion_func should be a real or "
+            "complex number or array, or a dimensionless Quantity."
+        ) from wrong_type
 
-    return plasma_dispersion_func_lite(zeta)
 
-
-@preserve_signature
-def plasma_dispersion_func_deriv_lite(zeta):
+def plasma_dispersion_func_deriv(
+    zeta: Union[Complex, np.ndarray, u.Quantity[u.dimensionless_unscaled]]
+) -> Union[Complex, np.ndarray, u.Quantity[u.dimensionless_unscaled]]:
     r"""
-    The :term:`lite-function` version of
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`.
-    Performs the same calculation as
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`,
-    but is intended for computational use and, thus, has all data
-    conditioning safeguards removed.
-
-    Parameters
-    ----------
-    zeta : |array_like| of real or complex values
-        Argument of the plasma dispersion function. ``zeta`` is
-        dimensionless.
-
-    Returns
-    -------
-    Zprime : |array_like| of complex values
-        First derivative of plasma dispersion function.
+    Calculate the derivative of the plasma dispersion function.
 
-    See Also
-    --------
-    ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv
-    """
-    return -2 * (1 + zeta * plasma_dispersion_func_lite(zeta))
+    The derivative of the plasma dispersion function is:
 
+    .. math::
+        Z'(ζ) = π^{-1/2} \int_{-∞}^{+∞} \frac{e^{-x^2}}{(x-ζ)^2} dx
 
-@bind_lite_func(plasma_dispersion_func_deriv_lite)
-def plasma_dispersion_func_deriv(
-    zeta: Union[complex, np.ndarray, u.Quantity]
-) -> Union[complex, np.ndarray, u.Quantity]:
-    r"""
-    Calculate the derivative of the plasma dispersion function.
+    where the argument :math:`ζ` is a complex number
+    :cite:p:`fried:1961`.
 
     Parameters
     ----------
-    zeta : complex, int, float, ~numpy.ndarray, or ~astropy.units.Quantity
+    zeta : |array_like| or |Quantity|
         Argument of plasma dispersion function.
 
     Returns
     -------
-    Zprime : complex, float, or ~numpy.ndarray
+    complex, `~numpy.ndarray`, or |Quantity|
         First derivative of plasma dispersion function.
 
     Raises
     ------
-    TypeError
-        If the argument is invalid.
-
     ~astropy.units.UnitsError
         If the argument is a `~astropy.units.Quantity` but is not
         dimensionless.
 
-    ValueError
-        If the argument is not entirely finite.
-
     See Also
     --------
-    plasma_dispersion_func
-
-    Notes
-    -----
-    The derivative of the plasma dispersion function is defined as:
-
-    .. math::
-        Z'(ζ) = π^{-1/2} \int_{-∞}^{+∞}
-        \frac{e^{-x^2}}{(x-ζ)^2} dx
-
-    where the argument is a complex number :cite:p:`fried:1961`.
+    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
 
     Examples
     --------
@@ -219,41 +121,17 @@ def plasma_dispersion_func_deriv(
     (-0.484255687717376...+0j)
     >>> plasma_dispersion_func_deriv(-1.52+0.47j)
     (0.165871331498228...+0.445879788059350...j)
-
-    For user convenience
-    `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_lite`
-    is bound to this function and can be used as follows:
-
-    >>> plasma_dispersion_func_deriv.lite(0)
-    (-2+0j)
-    >>> plasma_dispersion_func_deriv.lite(1j)
-    (-0.484255687717376...+0j)
-    >>> plasma_dispersion_func_deriv.lite(-1.52+0.47j)
-    (0.165871331498228...+0.445879788059350...j)
-
     """
-
-    if not isinstance(
-        zeta, (numbers.Integral, numbers.Real, numbers.Complex, np.ndarray, u.Quantity)
-    ):
+    try:
+        return -2 * (1 + zeta * plasma_dispersion_func(zeta))
+    except u.UnitsError as wrong_units:
+        raise u.UnitsError(
+            "The argument to plasma_dispersion_func_deriv "
+            "must be dimensionless if it is a Quantity."
+        ) from wrong_units
+    except TypeError as wrong_type:
         raise TypeError(
-            "The argument to plasma_dispersion_function_deriv "
+            "The argument to plasma_dispersion_func_deriv "
             "must be one of the following types: complex, float, "
-            "int, ndarray, or Quantity."
-        )
-
-    if isinstance(zeta, u.Quantity):
-        if zeta.unit == u.dimensionless_unscaled:
-            zeta = zeta.value
-        else:
-            raise u.UnitsError(
-                "The argument to plasma_dispersion_function_deriv "
-                "must be dimensionless if it is a Quantity."
-            )
-
-    if not np.all(np.isfinite(zeta)):
-        raise ValueError(
-            "The argument to plasma_dispersion_function_deriv is not finite."
-        )
-
-    return plasma_dispersion_func_deriv_lite(zeta)
+            "int, ndarray, or a dimensionless Quantity."
+        ) from wrong_type
diff --git a/plasmapy/dispersion/dispersionfunction.py b/plasmapy/dispersion/dispersionfunction.py
index aaddf797..8489c15d 100644
--- a/plasmapy/dispersion/dispersionfunction.py
+++ b/plasmapy/dispersion/dispersionfunction.py
@@ -29,10 +29,10 @@ def plasma_dispersion_func_lite(zeta):
 
     .. deprecated::
 
-       The location of this function has moved. Use
-       `plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
-       instead. This function will be removed from the old location in
-       a subsequent release.
+        The lite function for ``plasma_dispersion_func`` has been
+        deprecated and will be removed in a future release. Use
+        `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func`
+        instead.
     """
 
     warnings.warn(
@@ -44,7 +44,7 @@ def plasma_dispersion_func_lite(zeta):
         PlasmaPyFutureWarning,
     )
 
-    return dispersion_functions.plasma_dispersion_func_lite(zeta)
+    return dispersion_functions.plasma_dispersion_func(zeta)  # coverage: ignore
 
 
 @bind_lite_func(plasma_dispersion_func_lite)
@@ -70,7 +70,7 @@ def plasma_dispersion_func(
         PlasmaPyFutureWarning,
     )
 
-    return dispersion_functions.plasma_dispersion_func(zeta)
+    return dispersion_functions.plasma_dispersion_func(zeta)  # coverage: ignore
 
 
 @preserve_signature
@@ -81,10 +81,10 @@ def plasma_dispersion_func_deriv_lite(zeta):
 
     .. deprecated::
 
-        The location of this function has moved. Use
-        `plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv.lite`
-        instead. This function will be removed from the old location in
-        the future.
+        The lite function for plasma_dispersion_func_deriv has been
+        deprecated and will be removed in a future release. Use
+        `~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv`
+        instead.
     """
     warnings.warn(
         (
@@ -95,7 +95,7 @@ def plasma_dispersion_func_deriv_lite(zeta):
         PlasmaPyFutureWarning,
     )
 
-    return dispersion_functions.plasma_dispersion_func_deriv_lite(zeta)
+    return dispersion_functions.plasma_dispersion_func_deriv(zeta)  # coverage: ignore
 
 
 @bind_lite_func(plasma_dispersion_func_deriv_lite)
@@ -122,4 +122,4 @@ def plasma_dispersion_func_deriv(
         PlasmaPyFutureWarning,
     )
 
-    return dispersion_functions.plasma_dispersion_func_deriv(zeta)
+    return dispersion_functions.plasma_dispersion_func_deriv(zeta)  # coverage: ignore
diff --git a/plasmapy/formulary/dielectric.py b/plasmapy/formulary/dielectric.py
index 33d2f2a7..4fa02810 100644
--- a/plasmapy/formulary/dielectric.py
+++ b/plasmapy/formulary/dielectric.py
@@ -11,7 +11,7 @@
 
 from collections import namedtuple
 
-from plasmapy.dispersion.dispersion_functions import plasma_dispersion_func_deriv_lite
+from plasmapy.dispersion.dispersion_functions import plasma_dispersion_func_deriv
 from plasmapy.formulary.frequencies import gyrofrequency, plasma_frequency
 from plasmapy.formulary.speeds import thermal_speed
 from plasmapy.utils.decorators import (
@@ -272,7 +272,7 @@ def permittivity_1D_Maxwellian_lite(omega, kWave, vth, wp):
     alpha = np.sqrt(2) * wp / (kWave * vth)
     # The dimensionless phase velocity of the propagating EM wave.
     zeta = omega / (kWave * vth)
-    return -0.5 * (alpha**2) * plasma_dispersion_func_deriv_lite(zeta)
+    return -0.5 * (alpha**2) * plasma_dispersion_func_deriv(zeta)
 
 
 @bind_lite_func(permittivity_1D_Maxwellian_lite)


Test patch:
diff --git a/plasmapy/dispersion/tests/test_dispersion.py b/plasmapy/dispersion/tests/test_dispersion_functions.py
similarity index 62%
rename from plasmapy/dispersion/tests/test_dispersion.py
rename to plasmapy/dispersion/tests/test_dispersion_functions.py
index 71d68cf1..dbed4be1 100644
--- a/plasmapy/dispersion/tests/test_dispersion.py
+++ b/plasmapy/dispersion/tests/test_dispersion_functions.py
@@ -14,18 +14,14 @@
 from plasmapy.dispersion.dispersion_functions import (
     plasma_dispersion_func,
     plasma_dispersion_func_deriv,
-    plasma_dispersion_func_deriv_lite,
-    plasma_dispersion_func_lite,
 )
 
 # Expected errors table. Used for both plasma_dispersion_func
 # and plasma_dispersion_func_deriv
 # w, expected_error
 plasma_disp_func_errors_table = [
-    ("", TypeError),
+    ("invalid type", TypeError),
     (7 * u.m, u.UnitsError),
-    (np.inf, ValueError),
-    (np.nan, ValueError),
 ]
 
 
@@ -44,38 +40,7 @@
 
 
 class TestPlasmaDispersionFunction:
-    """
-    Test class for `plasmapy.dispersion.plasma_dispersion_func`.
-
-    Note: Testing of `plasma_dispersion_func_lite` is done in a separate
-    test class.
-    """
-
-    @pytest.mark.parametrize(
-        ("bound_name", "bound_attr"),
-        [("lite", plasma_dispersion_func_lite)],
-    )
-    def test_lite_function_binding(self, bound_name, bound_attr):
-        """Test expected attributes are bound correctly."""
-        assert hasattr(plasma_dispersion_func, bound_name)
-        assert getattr(plasma_dispersion_func, bound_name) is bound_attr
-
-    def test_lite_function_marking(self):
-        """
-        Test function is marked as having a Lite-Function.
-        """
-        assert hasattr(plasma_dispersion_func, "__bound_lite_func__")
-        assert isinstance(plasma_dispersion_func.__bound_lite_func__, dict)
-
-        for (
-            bound_name,
-            bound_origin,
-        ) in plasma_dispersion_func.__bound_lite_func__.items():
-            assert hasattr(plasma_dispersion_func, bound_name)
-
-            attr = getattr(plasma_dispersion_func, bound_name)
-            origin = f"{attr.__module__}.{attr.__name__}"
-            assert origin == bound_origin
+    """Test class for `plasmapy.dispersion.plasma_dispersion_func`."""
 
     @pytest.mark.parametrize(("w", "expected"), plasma_dispersion_func_table)
     def test_plasma_dispersion_func(self, w, expected):
@@ -88,13 +53,14 @@ def test_plasma_dispersion_func(self, w, expected):
 
         Z_of_w = plasma_dispersion_func(w)
 
-        assert np.isclose(Z_of_w, expected, atol=1e-12 * (1 + 1j), rtol=1e-12), (
+        assert u.isclose(Z_of_w, expected, atol=1e-12 * (1 + 1j), rtol=1e-12), (
             f"plasma_dispersion_func({w}) equals {Z_of_w} instead of the "
             f"expected approximate result of {expected}.  The difference between "
             f"the actual and expected results is {Z_of_w - expected}."
         )
 
     @given(complex_numbers(allow_infinity=False, allow_nan=False, max_magnitude=20))
+    @pytest.mark.filterwarnings("ignore::RuntimeWarning")
     def test_plasma_dispersion_func_symmetry(self, w):
         r"""Test plasma_dispersion_func against its symmetry properties"""
 
@@ -105,9 +71,15 @@ def test_plasma_dispersion_func_symmetry(self, w):
         Z_of_wconj = plasma_dispersion_func(w.conjugate())
         minusZ_of_minuswconj = -(plasma_dispersion_func(-w).conjugate())
 
-        assert np.isclose(Z_of_wconj, minusZ_of_minuswconj, atol=0, rtol=1e-15), (
+        assert u.isclose(
+            Z_of_wconj,
+            minusZ_of_minuswconj,
+            atol=1e-12 * (1 + 1j),
+            rtol=1e-12,
+            equal_nan=True,
+        ), (
             "The symmetry property of the plasma dispersion function that "
-            f"Z(w*) == -[Z(-w)]* is not met for w = {w}.  Instead, "
+            f"Z(w*) == -[Z(-w)]* is not met for {w = }.  Instead, "
             f"plasma_dispersion_func({w.conjugate()}) = {Z_of_wconj} "
             f"whereas -plasma_dispersion_func({-w}).conjugate() = "
             f"{minusZ_of_minuswconj}.  "
@@ -120,10 +92,12 @@ def test_plasma_dispersion_func_symmetry(self, w):
                 plasma_dispersion_func(w)
             ).conjugate() + 2j * np.sqrt(π) * np.exp(-(w.conjugate() ** 2))
 
-            assert np.isclose(Z_of_wconj, should_equal_Z_of_wconj, rtol=1e-13), (
+            assert u.isclose(
+                Z_of_wconj, should_equal_Z_of_wconj, rtol=1e-13, equal_nan=True
+            ), (
                 "The symmetry property of the plasma dispersion function that "
                 "Z(w*) = Z(w)* + 2j * sqrt(pi) * exp[-(w*)**2] for Im(w) > 0 "
-                f"is not met for w = {w}.  The value of "
+                f"is not met for {w = }.  The value of "
                 f"plasma_dispersion_func({w.conjugate()}) is {Z_of_wconj}, "
                 f"which is different from {should_equal_Z_of_wconj}.  "
                 "The difference between these two results is "
@@ -196,17 +170,18 @@ def test_plasma_dispersion_func_roots(self):
 
         for root in roots:
             Z_at_root = plasma_dispersion_func(root)
-            assert np.isclose(Z_at_root, 0 + 0j, atol=1e-15 * (1 + 1j)), (
+            assert u.isclose(Z_at_root, 0 + 0j, atol=1e-15 * (1 + 1j)), (
                 "A root of the plasma dispersion function is expected "
                 f"at w = {root}, but plasma_dispersion_func({root}) is "
                 f"equal to {Z_at_root} instead of 0j."
             )
 
     @pytest.mark.parametrize(("w", "expected_error"), plasma_disp_func_errors_table)
+    @pytest.mark.filterwarnings("ignore::RuntimeWarning")
     def test_plasma_dispersion_func_errors(self, w, expected_error):
         """Test errors that should be raised by plasma_dispersion_func."""
 
-        with pytest.raises(expected_error):
+        with pytest.raises(expected_error, match=r".*plasma_dispersion_func.*"):
             plasma_dispersion_func(w)
             pytest.fail(
                 f"plasma_dispersion_func({w}) did not raise "
@@ -214,27 +189,6 @@ def test_plasma_dispersion_func_errors(self, w, expected_error):
             )
 
 
-class TestPlasmaDispersionFunctionLite:
-    """Test class for `plasma_dispersion_func_lite`."""
-
-    @pytest.mark.parametrize(("w", "expected"), plasma_dispersion_func_table)
-    def test_normal_vs_lite(self, w, expected):  # noqa: ARG002
-        r"""Test that plasma_dispersion_func and plasma_dispersion_func_lite
-        calculate the same values."""
-
-        # Many of the tabulated results originally came from the book
-        # entitled "The Plasma Dispersion Function: The Hilbert Transform
-        # of the Gaussian" by B. D. Fried and S. D. Conte (1961).
-
-        Z_of_w = plasma_dispersion_func(w)
-        Z_of_w_lite = plasma_dispersion_func_lite(w)
-
-        assert np.isclose(Z_of_w, Z_of_w_lite, atol=1e-12 * (1 + 1j), rtol=1e-12), (
-            f"plasma_dispersion_func({w}) and plasma_dispersion_func_lite({w}) "
-            "are not equal."
-        )
-
-
 # Array of expected values for plasma_dispersion_func_deriv
 # w, expected
 plasma_disp_deriv_table = [
@@ -251,38 +205,7 @@ def test_normal_vs_lite(self, w, expected):  # noqa: ARG002
 
 
 class TestPlasmaDispersionFunctionDeriv:
-    """
-    Test class for `plasmapy.dispersion.plasma_dispersion_func_deriv`.
-
-    Note: Testing of `plasma_dispersion_func_deriv_lite` is done in a separate
-    test class.
-    """
-
-    @pytest.mark.parametrize(
-        ("bound_name", "bound_attr"),
-        [("lite", plasma_dispersion_func_deriv_lite)],
-    )
-    def test_lite_function_binding(self, bound_name, bound_attr):
-        """Test expected attributes are bound correctly."""
-        assert hasattr(plasma_dispersion_func_deriv, bound_name)
-        assert getattr(plasma_dispersion_func_deriv, bound_name) is bound_attr
-
-    def test_lite_function_marking(self):
-        """
-        Test function is marked as having a Lite-Function.
-        """
-        assert hasattr(plasma_dispersion_func_deriv, "__bound_lite_func__")
-        assert isinstance(plasma_dispersion_func_deriv.__bound_lite_func__, dict)
-
-        for (
-            bound_name,
-            bound_origin,
-        ) in plasma_dispersion_func_deriv.__bound_lite_func__.items():
-            assert hasattr(plasma_dispersion_func_deriv, bound_name)
-
-            attr = getattr(plasma_dispersion_func_deriv, bound_name)
-            origin = f"{attr.__module__}.{attr.__name__}"
-            assert origin == bound_origin
+    """Test class for `plasmapy.dispersion.plasma_dispersion_func_deriv`."""
 
     @pytest.mark.parametrize(("w", "expected"), plasma_disp_deriv_table)
     def test_plasma_dispersion_func_deriv(self, w, expected):
@@ -292,15 +215,16 @@ def test_plasma_dispersion_func_deriv(self, w, expected):
 
         Z_deriv = plasma_dispersion_func_deriv(w)
 
-        assert np.isclose(Z_deriv, expected, atol=5e-5 * (1 + 1j), rtol=5e-6), (
+        assert u.isclose(Z_deriv, expected, atol=5e-5 * (1 + 1j), rtol=5e-6), (
             f"The derivative of the plasma dispersion function does not match "
-            f"the expected value for w = {w}.  The value of "
+            f"the expected value for {w = }.  The value of "
             f"plasma_dispersion_func_deriv({w}) equals {Z_deriv} whereas the "
             f"expected value is {expected}.  The difference between the actual "
             f"and expected results is {Z_deriv - expected}."
         )
 
-    @given(complex_numbers(allow_infinity=False, allow_nan=False, max_magnitude=20))
+    @given(complex_numbers(allow_infinity=True, allow_nan=False))
+    @pytest.mark.filterwarnings("ignore::RuntimeWarning")
     def test_plasma_dispersion_func_deriv_characterization(self, w):
         r"""Test plasma_dispersion_func_deriv against an exact relationship."""
 
@@ -311,42 +235,26 @@ def test_plasma_dispersion_func_deriv_characterization(self, w):
         Z_deriv = plasma_dispersion_func_deriv(w)
         Z_deriv_characterization = -2 * (1 + w * Z)
 
-        assert np.isclose(Z_deriv, Z_deriv_characterization, rtol=1e-15), (
-            f"The relationship that Z'(w) = -2 * [1 + w * Z(w)] is not "
-            f"met for w = {w}, where Z'(w) = {Z_deriv} and "
+        assert u.isclose(
+            Z_deriv,
+            Z_deriv_characterization,
+            atol=1e-12 * (1 + 1j),
+            rtol=1e-12,
+            equal_nan=True,
+        ), (
+            f"The relationship that Z′(w) = -2 * [1 + w * Z(w)] is not "
+            f"met for {w = }, where Z′(w) = {Z_deriv} and "
             f"-2 * [1 + w * Z(w)] = {Z_deriv_characterization}."
         )
 
     @pytest.mark.parametrize(("w", "expected_error"), plasma_disp_func_errors_table)
+    @pytest.mark.filterwarnings("ignore::RuntimeWarning")
     def test_plasma_dispersion_deriv_errors(self, w, expected_error):
         """Test errors that should be raised by plasma_dispersion_func_deriv."""
 
-        with pytest.raises(expected_error):
+        with pytest.raises(expected_error, match=r".*plasma_dispersion_func_deriv.*"):
             plasma_dispersion_func_deriv(w)
             pytest.fail(
                 f"plasma_dispersion_func_deriv({w}) did not raise "
                 f"{expected_error.__name__} as expected."
             )
-
-
-class TestPlasmaDispersionFunctionDerivLite:
-    """Test class for `plasma_dispersion_func_deriv_lite`."""
-
-    @pytest.mark.parametrize(("w", "expected"), plasma_disp_deriv_table)
-    def test_normal_vs_lite(self, w, expected):  # noqa: ARG002
-        r"""Test that plasma_dispersion_func_deriv and
-        plasma_dispersion_func_deriv_lite
-        calculate the same values."""
-
-        # Many of the tabulated results originally came from the book
-        # entitled "The Plasma Dispersion Function: The Hilbert Transform
-        # of the Gaussian" by B. D. Fried and S. D. Conte (1961).
-
-        Z_of_w = plasma_dispersion_func_deriv(w)
-        Z_of_w_lite = plasma_dispersion_func_deriv_lite(w)
-
-        assert np.isclose(Z_of_w, Z_of_w_lite, atol=1e-12 * (1 + 1j), rtol=1e-12), (
-            f"plasma_dispersion_func_deriv({w}) and "
-            "plasma_dispersion_func_deriv_lite({w}) "
-            "are not equal."
-        )