PlasmaPy v0.9.0 (2022-11-11)
Backwards Incompatible Changes
Removed the
none_shall_passparameter fromparticle_input(). Instead,typing.Optionalshould be used to create the annotation (e.g.,Optional[ParticleLike]). (#1057)Renamed the first parameter of
particle_input()fromwrapped_functiontowrapped. (#1057)Refactored the return pattern of
find_floating_potentialto follow the(vf, extras)pattern, wherevfis the computed floating potential andextrasis an instance ofVFExtrascontaining extra parameters from the computation. (#1565)Moved
plasmapy.particles.particle_collections.ionic_levelstoplasmapy.particles.atomic.ionic_levels. (#1697)Deprecated
plasmapy.formulary.collisions.fundamental_electron_collision_freq. TheMaxwellian_avg_ei_collision_freqattribute ofMaxwellianCollisionFrequenciesshould be used instead. (#1703)Deprecated
plasmapy.formulary.collisions.fundamental_ion_collision_freq. TheMaxwellian_avg_ii_collision_freqattribute ofMaxwellianCollisionFrequenciesshould be used instead. (#1703)The parameters
Zandmass_numbare now keyword-only forionic_symbolandparticle_symbol. (#1718)Moved the
valid_categoriesattribute ofis_categorytoplasmapy.particles.particle_class.valid_categories. (#1720)Changed the behavior of
IonicLevel,IonizationState, andIonizationStateCollectionso that an equality comparison with anobjectof a different type returnsFalseinstead of raising aTypeError. (#1721)When the argument provided to
GeneralWireis not callable, aTypeErrorwill be raised instead of aValueError. (#1782)In
spectral_densityandspectral_density_model, aTypeErroris now raised whenionsis an unsupported type. (#1782)In
AbstractGrid, aTypeErroris now raised instead of aValueErrorwhenstartorstopare not of the appropriate type. (#1783)
Deprecations and Removals
The capability of
particle_input()to process arguments annotated withParticleor(Particle, Particle)is now deprecated and will be removed in a future release. UseParticleLikeas an annotation instead. (#1057)The
integer_chargesattribute ofIonizationStatehas been removed after being deprecated inv0.7.0. Usecharge_numbersinstead. (#1633)The
integer_chargeattributes ofParticleandIonicLevelhave been removed after being deprecated inv0.7.0. Use thecharge_numberattribute instead. (#1633)The
plasmapy.particles.atomic.integer_chargefunction has been removed after being deprecated inv0.7.0. Usecharge_numberinstead. (#1633)Deprecated
plasmapy.formulary.collisions.frequencies.collision_frequencyin favor of collision frequency classes inplasmapy.formulary.collisions. See also #1703. (#1676)
Features
Expanded the functionality of the
particle_input()decorator to convert particle-like and particle-list-like arguments intoParticle,CustomParticle, andParticleListobjects. This change is part of an ongoing effort to improve compatibility of functions in subpackages likeplasmapy.particlesandplasmapy.formularywithCustomParticleandParticleListobjects. (#1057)Added the
find_ion_saturation_currentfunction to theswept_langmuirmodule. The function fits the tail of a swept Langmuir probe trace and returns the linear fit corresponding to the ion-saturation current. (#1469)Created
plasmapy.utils.datato contain functionality for downloading data from PlasmaPy’s data repository. This module contains a new prototype functionplasmapy.utils.data.downloader.get_filewhich downloads a file from the repository. (#1486)Added the
RelativisticBodyclass to facilitate calculation of the relativistic properties of a body in motion. (#1540)Added
inplaceas an optional argument toplasmapy.simulation.particle_integrators.boris_push. (#1556)Added a function to calculate the dimensionless Lundquist number. (#1642)
Created the
plasmapy.formulary.densitiesmodule. (#1664)Added
critical_densityto calculate the critical density of a plasma for a given frequency of radiation. (#1664)Added the
plasmapy.formulary.collisions.CollisionFrequenciesclass. This class can be used to calculate collision frequencies for two interacting species in a plasma. Superseded by #1703. (#1676)Reimplemented
chemical_potential. (#1678)Allowed
Lorentz_factorto accept and returnnanvalues. (#1681)Added a test for
Hall_parameterinplasmapy/formulary/test/test_dimensionless.py. (#1689)Replaced usage of
os.pathwith the more modernpathlib. (#1690)Replaced
pkg_resourceswith the more modernimportlib.metadata. (#1692)Added the
categoriesattribute toCustomParticle, and added the"custom"particle category. (#1700)Moved the
is_categorymethod ofParticletoAbstractPhysicalParticle. This method is now inherited by bothParticleandCustomParticle. (#1700)Added
MaxwellianCollisionFrequenciesfor calculating relevant collision frequencies for Maxwellian populations. (#1703)Refactored
collisions. The filecollisions.pywas converted into a subpackage (directory) and it’s contents was split into appropriately categorized and named sub-modules (files). (#1769)
Bug Fixes
Modified tests in the class
TestSyntheticRadiographto try to fix an intermittent failure oftest_optical_density_histogram. (#1685)
Improved Documentation
Added the Hollweg dispersion notebook. (#1392)
Creates an example notebook for fitting Thomson scattering spectra using the
spectral_density_modelfunction. (#1520)Updated the release guide following the
0.8.1release. (#1615)Added
docs/whatsnew/dev.rstas a stub file for the changelogs between releases. (#1623)Added customizations for towncrier in
pyproject.toml. (#1626)Updated the introductory paragraphs of the Coding Guide. (#1649)
Added a section to the Coding Guide on best practices for naming variables. (#1650)
Updated the section of the contributor guide on pre-commit, and moved it to
docs/contributing/install_dev.rst. (#1651)Added sections to the Coding Guide on units and particles. (#1655)
Updated the section of the Coding Guide on code style. (#1657)
Added sections to the Coding Guide on lite-functions and aliases. (#1658)
Added sections to the Coding Guide on imports and requirements. (#1659)
Added sections on best practices for comments and error messages to the Coding Guide. (#1660)
Updated the section of the Documentation Guide with more detail on the “Parameters”, “Raises”, and “Warns” sections of docstrings. (#1667)
Added a guideline to the Coding Guide specifying how
nanvalues should be treated in functions that accept array_like orQuantityinputs. (#1673)Added an admonition to the Changelog Guide that describes how to change reStructuredText links for removed code objects into inline literals in old changelog entries. (#1674)
Split the patent clause from the license file (
LICENSE.md) into its own file (PATENT.md). (#1686)Added explanatory text to the “Notes” sections in the docstrings for functions within
magnetostatics. (#1695)Enabled
:py:as a reStructuredText role for inline code formatting in the documentation. (#1698)Updated docstrings and annotations for
ParticleListand its methods. (#1713)Updated docstrings and annotations in
plasmapy.particles, including by marking parameters as particle-like or atom-like. (#1718)Added a section to the Documentation Guide on troubleshooting. (#1752)
Trivial/Internal Changes
Moved the functionality responsible for converting particle-like arguments to particle objects from the
particle_input()decorator into a separate class that is now used insideparticle_input(). (#1057)The
particle_input()decorator now processes arguments annotated withParticleLike. (#1057)Added
tomlito thetestscategory of requirements. (#1500)Added tests to verify that the requirements given in the
.txtfiles in therequirementsdirectory are consistent with the requirements given insetup.cfgandpyproject.toml. (#1500)Restricted the required version of sphinx-gallery to
< 0.11.0, sincesphinx-gallerychanged their thumbnail containers to flex containers. See pull request sphinx-gallery/#906 and issue sphinx-gallery/#905 for more detail. (#1654)Moved the
plasmapy.formulary.dimensionless.quantum_thetafunction toplasmapy.formulary.quantum.quantum_theta. This function can still be called from theplasmapy.formulary.dimensionlessmodule without issue. (#1671)Reimplemented
plasmapy.formulary.quantum._chemical_potential_interp. (#1678)Re-enabled value testing for the
quantumkeyword argument incoupling_parameter. (#1678)Added the
validate_class_attributesdecorator to thedecoratorsmodule. This decorator is useful for class methods that require optional parameters to be specified during class instantiation. (#1703)Made minor improvements to
plasmapy.formulary.collisions.CollisionFrequencies. (#1705)Changed the towncrier requirement to
>= 19.2.0, < 22.8.0. Superseded by #1717. (#1710)Changed the minimum version of towncrier to 22.8.0 and the minimum version of
sphinx_changelogto 1.2.0. (#1717)Changed
chemical_potentialto use the Broyden-Fletcher-Goldfarb-Shanno algorithm to implicitly solve for the ideal chemical potential. (#1726)Simplified the pull request template. (#1729)
Added a GitHub Action to automatically comment on pull requests with a code review checklist. (#1729)
The following functions are now decorated by
particle_input():Hall_parameter,kappa_velocity_1D,kappa_velocity_3D,Maxwellian_1D,Maxwellian_velocity_2D,Maxwellian_velocity_3D,Maxwellian_speed_1D,Maxwellian_speed_2D,Maxwellian_speed_3D,gyroradius, anddeBroglie_wavelength. (#1732)Changed
particle_input()to raise aUnitConversionErrorwhen the annotated argument has a physical type other than mass or electrical charge. (#1732)Set up issue forms on PlasmaPy’s GitHub repository to replace issue templates. (#1733)
Made
pytestaninstallrequirement instead of atestingrequirement. (#1749)Added a step to validate
CITATION.cffas part of thelinterstox testing environment. (#1771)Added
cffconvertto thetestingrequirements. (#1771)Deleted
codemeta.json, which recorded project metadata using the CodeMeta metadata schema. Instead, project metadata is now stored inCITATION.cffwhich uses the Citation File Format and was created in #1640. See also #676 and #794. (#1772)Added the
flake8extensionsflake8-use-pathlib,flake8-builtins, andflake8-commentsto the testing requirements. (#1777)Added
tryceratopsas aflake8extension. (#1782)