PlasmaPy v2023.5.0 (2023-05-31)

Backwards Incompatible Changes

  • The signature of relativistic_energy has changed. The parameter m has been replaced with particle, which now accepts a broader variety of particle-like arguments, including but not limited to a Quantity representing mass. The parameter v has been replaced with V for consistency with other functionality. (#1871)

  • Changed the minimum required version of Python from 3.8 to 3.9. Accordingly, increased the minimum versions of numpy to 1.21.0, pandas to 1.2.0, h5py to 3.1.0, scipy to 1.6.0, voila to 0.3.0, and xarray to 0.17.0. (#1885)

  • Made ParticleList raise a TypeError when provided with a string. This change was made to avoid potentially ambiguous situations like ParticleList("He") which was previously equivalent to ParticleList(["H", "e"]) instead of the possibly expected value of ParticleList(["He"]). (#1892)

  • In two_fluid, hollweg, and kinetic_alfven in plasmapy.dispersion, providing the charge number as a keyword argument (now Z, formerly z_mean) will no longer override the charge number provided in ion. (#2022, #2181, #2182)

  • particle_input() no longer enforces that parameters named ionic_level are ions or neutral atoms. For equivalent behavior, name the parameter ion instead. (#2034)

  • Removed plasmapy.utils.pytest_helpers from PlasmaPy’s public API. It is still available as plasmapy.utils._pytest_helpers, but might be removed in the future. (#2114)

  • Removed plasmapy.tests.helpers from PlasmaPy’s public API. It is still available as plasmapy.tests._helpers, but might be removed in the future. (#2114)

  • The ion_species parameter to thermal_bremsstrahlung has been renamed to ion in order to provide a more consistent API to functions that accept ions as arguments. (#2135)

Deprecations and Removals

Features

Bug Fixes

  • When attempting to create a Particle object representing a proton, calls like Particle("H", Z=1, mass_numb=1) no longer incorrectly issue a ParticleWarning for redundant particle information. (#1992)

  • Updated the docstring of kinetic_alfven. (#2016)

  • Fixed a slight error in plasma_frequency and Alfven_speed when the charge number was provided via z_mean (or now Z) and inconsistent with the charge number provided to particle (or zero, if particle represented an element or isotope with no charge information. Previously, if we represented a proton with particle="H-1" and z_mean=1, then the mass used to calculate the plasma frequency would have been the mass of a neutral hydrogen atom rather than the mass of a proton. However, using particle="p+" would have produced the correct mass. This behavior has been corrected by decorating this function with particle_input(). See also #2178 and #2179. (#2026)

  • The plasmapy.analysis.nullpoint._vector_space function now returns a list for its delta values instead of an array. (#2133)

Improved Documentation

  • Enabled sphinx-codeautolink to make code examples clickable and give quick access to API documentation. (#1410)

  • Added an example notebook on ionization states in the solar wind. (#1513)

  • Moved the location of the changelog pages for past releases from docs/whatsnew/ to docs/changelog/, and set up appropriate redirects. (#1639)

  • Removed outdated instructions on installing the development version of PlasmaPy contained in docs/contributing/install_dev.rst. (#1656)

  • Converted docs/CONTRIBUTING.rst to .github/contributing.md. (#1656)

  • Added a new page to the Contributor Guide on the code contribution workflow, replacing content previously contained in the Coding Guide. (#1656)

  • Added a page to the Contributor Guide on Getting Ready to Contribute. (#1656)

  • Updated docstrings in plasmapy.formulary.collisions.frequencies. (#1793)

  • Updated the docstring for particle_input(). (#1883)

  • Updated the introductory paragraphs to the Contributor Guide. (#2014)

  • Moved PlasmaPy’s vision statement from the online documentation to a Zenodo record. (#2017)

  • Restructured the Documentation Guide by putting information on writing documentation prior to instructions for building documentation. (#2038)

  • Restructured the Testing Guide by putting information on writing tests prior to instructions for running tests. (#2041)

  • Updated the introduction on the documentation landing page and the citation instructions. (#2055)

  • Updated the Changelog Guide. (#2059)

  • Added admonitions for functionality that is under development and for which backwards incompatible changes might occur in the future. (#2112)

  • Updated the code contribution workflow instructions in the Contributor Guide to reflect that first-time contributors should add themselves to the author list in CITATION.cff instead of in docs/about/credits.rst. (#2155)

  • Added functionality to automatically generate the author list included in docs/about/credits.rst directly from CITATION.cff. The script is located at docs/cff_to_rst.py. (#2156)

Trivial/Internal Changes

  • Included Python 3.11 in continuous integration tests. (#1775)

  • Turned the root-level requirements.txt into a lockfile for continuous integration purposes. (#1864)

  • Enabled the particle creation factory in plasmapy.particles._factory used by particle_input() to create CustomParticle instances of an element or isotope with a charge number that is a real number but not an integer. (#1884)

  • Implemented the new private CustomParticle constructor from #1881 into the private particle creation factory used by particle_input(). (#1884)

  • Dropped dlint from the tests requirements, as it is no longer being maintained. (#1906)

  • Modified particle_input() to allow CustomParticle-like objects with a defined charge to be passed through to decorated functions when a parameter to that function annotated with ParticleLike is named ion. Previously, only Particle objects representing ions or neutral atoms were allowed to pass through when the parameter was named ion. (#2034)

  • Updated package metadata in pyproject.toml. (#2075)

  • Set minimum versions for all explicitly listed dependencies. (#2075)

  • Enabled and applied changes for additional rule sets for ruff, and removed corresponding flake8 extensions. (#2080)

  • Changed from indexserver to PIP_INDEX_URL to index nightly numpy builds (#2138)

  • Updated the function and docstring of collisional_analysis. (#2151)

  • Dropped flake8 and its extensions as linters. Instead, ruff is now used as the primary linter. (#2170)

  • Expanded the variety of arguments that could be provided to a function decorated by angular_freq_to_hz, and refactored this decorator to use wrapt. (#2175)