PlasmaPy v2023.5.0 (2023-05-31)
Backwards Incompatible Changes
The signature of
relativistic_energyhas changed. The parametermhas been replaced withparticle, which now accepts a broader variety of particle-like arguments, including but not limited to aQuantityrepresenting mass. The parametervhas been replaced withVfor consistency with other functionality. (#1871)Changed the minimum required version of Python from 3.8 to 3.9. Accordingly, increased the minimum versions of
numpyto1.21.0,pandasto1.2.0,h5pyto3.1.0,scipyto1.6.0,voilato0.3.0, andxarrayto0.17.0. (#1885)Made
ParticleListraise aTypeErrorwhen 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_alfveninplasmapy.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_levelare ions or neutral atoms. For equivalent behavior, name the parameterioninstead. (#2034)Removed
plasmapy.utils.pytest_helpersfrom PlasmaPy’s public API. It is still available asplasmapy.utils._pytest_helpers, but might be removed in the future. (#2114)Removed
plasmapy.tests.helpersfrom PlasmaPy’s public API. It is still available asplasmapy.tests._helpers, but might be removed in the future. (#2114)The
ion_speciesparameter tothermal_bremsstrahlunghas been renamed toionin order to provide a more consistent API to functions that accept ions as arguments. (#2135)
Deprecations and Removals
In
plasmapy.dispersion, thez_meanparameter totwo_fluid,hollweg, andkinetic_alfvenhas been deprecated. Provide the charge number toZinstead. (#2022, #2181, #2182)When a function decorated with
particle_input()is provided withz_meanas a keyword argument, it will changez_meantoZand issue aPlasmaPyDeprecationWarningif the decorated function acceptsZas a parameter. This capability is intended to temporarily preserve the current behavior of several functions inplasmapy.dispersionandplasmapy.formularyas they get decorated withparticle_input()over the next few releases. (#2027)The
z_meanparameter toion_sound_speedandAlfven_speedhas been deprecated and may be removed in a future release. UseZinstead. (#2134, #2179)
Features
Added
kinetic_alfven, which numerically solves dispersion relations for kinetic Alfvén waves. (#1665)Added the
stix_dispersion.ipynbnotebook which contains Stix cold-plasma dispersion examples. (#1693)Added the
Buchsbaum_frequencyfunction. (#1828)Decorated
gyrofrequencywithparticle_input()so that it can accept a broader variety of particle-like arguments. (#1869)After having been decorated with
particle_input(), therelativistic_energyfunction now accepts a broader variety of particle-like objects rather than onlyQuantityobjects representing mass. (#1871)After having been decorated with
particle_input(),RelativisticBodynow 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.formularyand elsewhere that are decorated withparticle_input(). (#1884)Decorated
reduced_masswithparticle_input()so that it can now accept a broader variety of particle-like arguments. (#1921)Added the
plasmapy.analysis.time_series.excess_statisticsmodule including theExcessStatisticsclass for calculating excess statistics of time series. (#1984)Added
plasmapy.formulary.collisions.helio.collisional_analysis. (#1986)Enabled
ParticleListto acceptQuantityobjects 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
gyroradiusto reduce cognitive complexity and increase readability. (#2031)Added
mass_numbandZas parameters to functions decorated withparticle_input()inplasmapy.formulary.lengthsandplasmapy.formulary.distribution. (#2140)
Bug Fixes
When attempting to create a
Particleobject representing a proton, calls likeParticle("H", Z=1, mass_numb=1)no longer incorrectly issue aParticleWarningfor redundant particle information. (#1992)Updated the docstring of
kinetic_alfven. (#2016)Fixed a slight error in
plasma_frequencyandAlfven_speedwhen the charge number was provided viaz_mean(or nowZ) and inconsistent with the charge number provided toparticle(or zero, ifparticlerepresented 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_spacefunction 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.rstto.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.cffinstead of indocs/about/credits.rst. (#2155)Added functionality to automatically generate the author list included in
docs/about/credits.rstdirectly 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.txtinto a lockfile for continuous integration purposes. (#1864)Enabled the particle creation factory in
plasmapy.particles._factoryused byparticle_input()to createCustomParticleinstances of an element or isotope with a charge number that is a real number but not an integer. (#1884)Implemented the new private
CustomParticleconstructor from #1881 into the private particle creation factory used byparticle_input(). (#1884)Dropped
dlintfrom 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 withParticleLikeis namedion. Previously, onlyParticleobjects 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
flake8extensions. (#2080)Changed from
indexservertoPIP_INDEX_URLto index nightlynumpybuilds (#2138)Updated the function and docstring of
collisional_analysis. (#2151)Dropped
flake8and 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)