PlasmaPy v2023.5.0 (2023-05-31)
Backwards Incompatible Changes
The signature of
relativistic_energy
has changed. The parameterm
has been replaced withparticle
, which now accepts a broader variety of particle-like arguments, including but not limited to aQuantity
representing mass. The parameterv
has been replaced withV
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
to1.21.0
,pandas
to1.2.0
,h5py
to3.1.0
,scipy
to1.6.0
,voila
to0.3.0
, andxarray
to0.17.0
. (#1885)Made
ParticleList
raise aTypeError
when provided with a string. This change was made to avoid potentially ambiguous situations likeParticleList("He")
which was previously equivalent toParticleList(["H", "e"])
instead of the possibly expected value ofParticleList(["He"])
. (#1892)In
two_fluid
,hollweg
, andkinetic_alfven
inplasmapy.dispersion
, providing the charge number as a keyword argument (nowZ
, formerlyz_mean
) will no longer override the charge number provided inion
. (#2022, #2181, #2182)particle_input()
no longer enforces that parameters namedionic_level
are ions or neutral atoms. For equivalent behavior, name the parameterion
instead. (#2034)Removed
plasmapy.utils.pytest_helpers
from PlasmaPy’s public API. It is still available asplasmapy.utils._pytest_helpers
, but might be removed in the future. (#2114)Removed
plasmapy.tests.helpers
from PlasmaPy’s public API. It is still available asplasmapy.tests._helpers
, but might be removed in the future. (#2114)The
ion_species
parameter tothermal_bremsstrahlung
has been renamed toion
in order to provide a more consistent API to functions that accept ions as arguments. (#2135)
Deprecations and Removals
In
plasmapy.dispersion
, thez_mean
parameter totwo_fluid
,hollweg
, andkinetic_alfven
has been deprecated. Provide the charge number toZ
instead. (#2022, #2181, #2182)When a function decorated with
particle_input()
is provided withz_mean
as a keyword argument, it will changez_mean
toZ
and issue aPlasmaPyDeprecationWarning
if the decorated function acceptsZ
as a parameter. This capability is intended to temporarily preserve the current behavior of several functions inplasmapy.dispersion
andplasmapy.formulary
as they get decorated withparticle_input()
over the next few releases. (#2027)The
z_mean
parameter toion_sound_speed
andAlfven_speed
has been deprecated and may be removed in a future release. UseZ
instead. (#2134, #2179)
Features
Added
kinetic_alfven
, which numerically solves dispersion relations for kinetic Alfvén waves. (#1665)Added the
stix_dispersion.ipynb
notebook which contains Stix cold-plasma dispersion examples. (#1693)Added the
Buchsbaum_frequency
function. (#1828)Decorated
gyrofrequency
withparticle_input()
so that it can accept a broader variety of particle-like arguments. (#1869)After having been decorated with
particle_input()
, therelativistic_energy
function now accepts a broader variety of particle-like objects rather than onlyQuantity
objects representing mass. (#1871)After having been decorated with
particle_input()
,RelativisticBody
now accepts a broader variety of particle-like objects. (#1871)Enabled
particle_input()
to accept values of the charge number that are real numbers but not integers. This capability can now be used by many of the functions inplasmapy.formulary
and elsewhere that are decorated withparticle_input()
. (#1884)Decorated
reduced_mass
withparticle_input()
so that it can now accept a broader variety of particle-like arguments. (#1921)Added the
plasmapy.analysis.time_series.excess_statistics
module including theExcessStatistics
class for calculating excess statistics of time series. (#1984)Added
plasmapy.formulary.collisions.helio.collisional_analysis
. (#1986)Enabled
ParticleList
to acceptQuantity
objects of physical type mass or electrical charge. (#1987)The following functions have been decorated with
particle_input()
and now accept a broader variety of particle-like arguments (see also #341):Refactored
gyroradius
to reduce cognitive complexity and increase readability. (#2031)Added
mass_numb
andZ
as parameters to functions decorated withparticle_input()
inplasmapy.formulary.lengths
andplasmapy.formulary.distribution
. (#2140)
Bug Fixes
When attempting to create a
Particle
object representing a proton, calls likeParticle("H", Z=1, mass_numb=1)
no longer incorrectly issue aParticleWarning
for redundant particle information. (#1992)Updated the docstring of
kinetic_alfven
. (#2016)Fixed a slight error in
plasma_frequency
andAlfven_speed
when the charge number was provided viaz_mean
(or nowZ
) and inconsistent with the charge number provided toparticle
(or zero, ifparticle
represented an element or isotope with no charge information. Previously, if we represented a proton withparticle="H-1"
andz_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, usingparticle="p+"
would have produced the correct mass. This behavior has been corrected by decorating this function withparticle_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/
todocs/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 indocs/about/credits.rst
. (#2155)Added functionality to automatically generate the author list included in
docs/about/credits.rst
directly fromCITATION.cff
. The script is located atdocs/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 byparticle_input()
to createCustomParticle
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 byparticle_input()
. (#1884)Dropped
dlint
from the tests requirements, as it is no longer being maintained. (#1906)Modified
particle_input()
to allowCustomParticle
-like objects with a defined charge to be passed through to decorated functions when a parameter to that function annotated withParticleLike
is namedion
. Previously, onlyParticle
objects representing ions or neutral atoms were allowed to pass through when the parameter was namedion
. (#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
toPIP_INDEX_URL
to index nightlynumpy
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 usewrapt
. (#2175)