PlasmaPy v0.9.0 (2022-11-11)
Backwards Incompatible Changes
Removed the
none_shall_pass
parameter fromparticle_input()
. Instead,typing.Optional
should be used to create the annotation (e.g.,Optional[ParticleLike]
). (#1057)Renamed the first parameter of
particle_input()
fromwrapped_function
towrapped
. (#1057)Refactored the return pattern of
find_floating_potential
to follow the(vf, extras)
pattern, wherevf
is the computed floating potential andextras
is an instance ofVFExtras
containing extra parameters from the computation. (#1565)Moved
plasmapy.particles.particle_collections.ionic_levels
toplasmapy.particles.atomic.ionic_levels
. (#1697)Deprecated
plasmapy.formulary.collisions.fundamental_electron_collision_freq
. TheMaxwellian_avg_ei_collision_freq
attribute ofMaxwellianCollisionFrequencies
should be used instead. (#1703)Deprecated
plasmapy.formulary.collisions.fundamental_ion_collision_freq
. TheMaxwellian_avg_ii_collision_freq
attribute ofMaxwellianCollisionFrequencies
should be used instead. (#1703)The parameters
Z
andmass_numb
are now keyword-only forionic_symbol
andparticle_symbol
. (#1718)Moved the
valid_categories
attribute ofis_category
toplasmapy.particles.particle_class.valid_categories
. (#1720)Changed the behavior of
IonicLevel
,IonizationState
, andIonizationStateCollection
so that an equality comparison with anobject
of a different type returnsFalse
instead of raising aTypeError
. (#1721)When the argument provided to
GeneralWire
is not callable, aTypeError
will be raised instead of aValueError
. (#1782)In
spectral_density
andspectral_density_model
, aTypeError
is now raised whenions
is an unsupported type. (#1782)In
AbstractGrid
, aTypeError
is now raised instead of aValueError
whenstart
orstop
are not of the appropriate type. (#1783)
Deprecations and Removals
The capability of
particle_input()
to process arguments annotated withParticle
or(Particle, Particle)
is now deprecated and will be removed in a future release. UseParticleLike
as an annotation instead. (#1057)The
integer_charges
attribute ofIonizationState
has been removed after being deprecated inv0.7.0
. Usecharge_numbers
instead. (#1633)The
integer_charge
attributes ofParticle
andIonicLevel
have been removed after being deprecated inv0.7.0
. Use thecharge_number
attribute instead. (#1633)The
plasmapy.particles.atomic.integer_charge
function has been removed after being deprecated inv0.7.0
. Usecharge_number
instead. (#1633)Deprecated
plasmapy.formulary.collisions.frequencies.collision_frequency
in 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
, andParticleList
objects. This change is part of an ongoing effort to improve compatibility of functions in subpackages likeplasmapy.particles
andplasmapy.formulary
withCustomParticle
andParticleList
objects. (#1057)Added the
find_ion_saturation_current
function to theswept_langmuir
module. 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.data
to contain functionality for downloading data from PlasmaPy’s data repository. This module contains a new prototype functionplasmapy.utils.data.downloader.get_file
which downloads a file from the repository. (#1486)Added the
RelativisticBody
class to facilitate calculation of the relativistic properties of a body in motion. (#1540)Added
inplace
as an optional argument toplasmapy.simulation.particle_integrators.boris_push
. (#1556)Added a function to calculate the dimensionless Lundquist number. (#1642)
Created the
plasmapy.formulary.densities
module. (#1664)Added
critical_density
to calculate the critical density of a plasma for a given frequency of radiation. (#1664)Added the
plasmapy.formulary.collisions.CollisionFrequencies
class. 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_factor
to accept and returnnan
values. (#1681)Added a test for
Hall_parameter
inplasmapy/formulary/test/test_dimensionless.py
. (#1689)Replaced usage of
os.path
with the more modernpathlib
. (#1690)Replaced
pkg_resources
with the more modernimportlib.metadata
. (#1692)Added the
categories
attribute toCustomParticle
, and added the"custom"
particle category. (#1700)Moved the
is_category
method ofParticle
toAbstractPhysicalParticle
. This method is now inherited by bothParticle
andCustomParticle
. (#1700)Added
MaxwellianCollisionFrequencies
for calculating relevant collision frequencies for Maxwellian populations. (#1703)Refactored
collisions
. The filecollisions.py
was 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
TestSyntheticRadiograph
to 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_model
function. (#1520)Updated the release guide following the
0.8.1
release. (#1615)Added
docs/whatsnew/dev.rst
as 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
nan
values should be treated in functions that accept array_like orQuantity
inputs. (#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
ParticleList
and 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
tomli
to thetests
category of requirements. (#1500)Added tests to verify that the requirements given in the
.txt
files in therequirements
directory are consistent with the requirements given insetup.cfg
andpyproject.toml
. (#1500)Restricted the required version of sphinx-gallery to
< 0.11.0
, sincesphinx-gallery
changed 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_theta
function toplasmapy.formulary.quantum.quantum_theta
. This function can still be called from theplasmapy.formulary.dimensionless
module without issue. (#1671)Reimplemented
plasmapy.formulary.quantum._chemical_potential_interp
. (#1678)Re-enabled value testing for the
quantum
keyword argument incoupling_parameter
. (#1678)Added the
validate_class_attributes
decorator to thedecorators
module. 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_changelog
to 1.2.0. (#1717)Changed
chemical_potential
to 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 aUnitConversionError
when 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
pytest
aninstall
requirement instead of atesting
requirement. (#1749)Added a step to validate
CITATION.cff
as part of thelinters
tox testing environment. (#1771)Added
cffconvert
to thetesting
requirements. (#1771)Deleted
codemeta.json
, which recorded project metadata using the CodeMeta metadata schema. Instead, project metadata is now stored inCITATION.cff
which uses the Citation File Format and was created in #1640. See also #676 and #794. (#1772)Added the
flake8
extensionsflake8-use-pathlib
,flake8-builtins
, andflake8-comments
to the testing requirements. (#1777)Added
tryceratops
as aflake8
extension. (#1782)