PlasmaPy v0.8.1 (2022-07-05)
This release of PlasmaPy includes 158 pull requests closing 60 issues by 37 people, of which 31 are new contributors.
The people who have contributed to the code for this release are:
Afzal Rao*
Alexis Jeandet*
Andrew Sheng*
Anna Lanteri*
Chris Hoang*
Christopher Arran*
Chun Hei Yip*
Dominik Stańczak
Elliot Johnson*
Erik Everson
flaixman*
Haman Bagherianlemraski*
Isaias McHardy*
itsraashi*
James Kent*
Joao Victor Martinelli*
Leo Murphy*
Luciano Silvestri*
Mahima Pannala*
Marco Gorelli*
Nick Murphy
Nicolas Lequette
Nikita Smirnov*
Peter Heuer
Pey Lian Lim*
Rajagopalan Gangadharan*
Raymon Skjørten Hansen*
Reynaldo Rojas Zelaya*
Riley Britten*
sandshrew118*
seanjunheng2*
Shane Brown*
Suzanne Nie*
Terrance Takho Lee*
Tien Vo*
Tiger Du
Tomás Stinson*
An asterisk indicates that this release contains their first contribution to PlasmaPy.
Backwards Incompatible Changes
In
spectral_density
, the argumentsTe
andTi
have been renamedT_e
andT_i
and are now required keyword-only arguments. (#974)Moved the
grid_resolution
attribute fromAbstractGrid
toCartesianGrid
andNonUniformCartesianGrid
separately. This fixes a potential future bug, because this attribute is only valid as written when all axes share the same units. (#1295)Changed the behavior of the
__repr__
method ofCustomParticle
to display the symbol as well if it was provided. (#1397)Removed a block of code that printed out special particle properties when
plasmapy.particles.special_particles
(renamed toplasmapy.particles._special_particles
) was executed. (#1440)Renamed
plasmapy.particles.elements
toplasmapy.particles._elements
,plasmapy.particles.isotopes
toplasmapy.particles._isotopes
,plasmapy.particles.parsing
toplasmapy.particles._parsing
, andplasmapy.particles.special_particles
toplasmapy.particles._special_particles
. Consequently, these modules are no longer part of PlasmaPy’s public API. Most of these modules did not contain any public objects, except forplasmapy.particles.special_particles.ParticleZoo
which was renamed toplasmapy.particles._special_particles.particle_zoo
and removed from the public API. (#1440)The parameters
Z
andmass_numb
toParticle
are now keyword-only. (#1456)
Deprecations and Removals
Officially deprecated
plasmapy.formulary.parameters
and scheduled its permanent removal for thev0.9.0
release. (#1453)Dropped support for Python 3.7 in accordance with the deprecation policy laid out in NumPy Enhancement Proposal 29. (#1465)
The
[all]
option when using pip to installplasmapy
is now deprecated and may be removed in a future release. Packages that were previously optional (h5py, lmfit, mpmath, and Numba) are now installed by default when runningpip install plasmapy
. To install all packages required for code development of PlasmaPy, instead runpip install plasmapy[developer]
. (#1482)Removed
plasmapy.optional_deps
. (#1482)
Features
spectral_density
andspectral_density_model
now supportparticle_collections
objects as input to theions
keywords. (#974)Created a lite-function for
spectral_density
,spectral_density_lite
. (#974)Added a fitting function for 1D spectra,
spectral_density_model
, to the Thomson scattering diagnostic module. (#974)Created function
plasmapy.formulary.parameters.thermal_speed_coefficients
to supportplasmapy.formulary.parameters.thermal_speed_lite
usage by calculating the various thermal speed coefficients.plasmapy.formulary.parameters.thermal_speed_coefficients
is also bound toplasmapy.formulary.parameters.thermal_speed
as thecoefficients
attribute. (#1145)Created decorator
bind_lite_func
for handling the binding of lite-functions and any supporting functions to a parent function. (#1145)Introduced the concept of lite-functions, by creating the lite-function
plasmapy.formulary.parameters.thermal_speed_lite
, which is a simplified and Numba jitted version ofplasmapy.formulary.parameters.thermal_speed
. These functions are intended for computational use and as such have no validation of input or output values.plasmapy.formulary.parameters.thermal_speed_lite
is also bound toplasmapy.formulary.parameters.thermal_speed
as thelite
attribute. (#1145)Added the
hollweg_.py
module to thenumerical
subpackage to numerically solve the dispersion relation using Hollweg’s method [Bellan, 2012, Hollweg, 1999]. (#1189)Implemented non-breaking speed improvements on the methods
nearest_neighbor_interpolator
andvolume_averaged_interpolator
forCartesianGrid
. The new interpolators now require that the grid axes be sorted, which is always true for uniform grids. Added a new test to ensure this stays true. (#1295)Refactored the interpolator methods on objects defined in
grids
. All interpolators are now defined in the subclasses ofAbstractGrid
. Calling the interpolator methods onAbstractGrid
raises aNotImplementedError
exception. (#1295)Created lite-function
plasmapy.formulary.parameters.plasma_frequency_lite
. (#1308)Added the
molecule
function to buildCustomParticle
objects from astr
representing a molecule symbol. (#1309)Added the
is_category
method forParticleList
objects. This method is analogous to theis_category
method forParticle
objects. (#1378)Created the prototype analysis tool
plasmapy.analysis.nullpoint
for finding the null points in a vector space using the trilinear interpolation method of Haynes and Parnell [2007]. (#1383)Created
plasmapy.formulary.lengths
to contain length related plasma parameters, and migratedDebye_length
,gyroradius
, andinertial_length
fromplasmapy.formulary.parameters
to the new module. Related aliases were also migrated. (#1434)Created
plasmapy.formulary.frequencies
to contain frequency related plasma parameters, and migratedgyrofrequency
,plasma_frequency
,plasma_frequency_lite
,lower_hybrid_frequency
, andupper_hybrid_frequency
fromplasmapy.formulary.parameters
to the new module. Related aliases were also migrated. (#1439)Migrated
Debye_number
, andHall_parameter
fromplasmapy.formulary.parameters
toplasmapy.formulary.dimensionless
. Related aliases were also migrated. (#1444)Created
plasmapy.formulary.speeds
to contain frequency related plasma parameters, and migratedAlfven_speed
,ion_sound_speed
,kappa_thermal_speed
,thermal_speed
,thermal_speed_coefficients
, andthermal_speed_lite
fromplasmapy.formulary.parameters
to the new module. Related aliases were also migrated. (#1448)Created
plasmapy.formulary.misc
to contain functionality for miscellaneous plasma parameters, and migrated~plasmapy.formulary.misc._grab_charge
,Bohm_diffusion
,magnetic_energy_density
,magnetic_pressure
,plasmapy.formulary.misc.mass_density
, andthermal_pressure
fromplasmapy.formulary.parameters
to the new module. Related aliases were also migrated. (#1453)Created lite-functions
plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_lite
andplasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_lite
forplasma_dispersion_func
andplasma_dispersion_func_deriv
respectively. (#1473)Created lite-function
plasmapy.formulary.dielectric.permittivity_1D_Maxwellian_lite
forplasmapy.formulary.dielectric.permittivity_1D_Maxwellian
. (#1476)Added the
stix_.py
module to theanalytical
subpackage which contains the Stix cold-plasma dispersion solutionstix()
, [Bellan, 2012, Stix, 1992]. (#1511)Particle("Li").ionize()
no longer results in aChargeError
. Instead, ionization of a neutral atom is assumed. (#1514)Created the
ParticleListLike
typing construct and added particle-list-like to the Glossary. (#1528)Added a null point classifier function which determines the type of a given 3D magnetic null point. (#1554)
Added support for arbitrarily shaped input arrays to the function
plasmapy.formulary.collisions.lengths.impact_parameter
. (#1604)
Bug Fixes
Fixed a bug in the
_make_grid
method ofAbstractGrid
that would fail to smoothly handle invalid user input if thestart
,stop
, ornum
keywords were not the correct type. (#1295)Fixed a bug with
Particle
whereParticle("p+") == Particle("H", Z=1, mass_numb=1)
led to aParticleError
. (#1366)For
plasmapy.formulary.parameters.gyroradius
, updated the default keyword arguments and conditional for issuing thePlasmaPyFutureWarning
. This addresses the incorrect behavior where aValueError
is raised if an array is passed to the deprecated keywordT_i
. (#1430)Exposed
plasmapy.formulary.misc
to theplasmapy.formulary
namespace. (#1471)Replaced misuse of
max_exp_bias - max_exp_bias
withmax_exp_bias - min_exp_bias
when creating seed parameters for the bimaxwellian fit function insideget_electron_temperature()
. (#1487)Corrected the improper inversion of the electron temperature for the non-bimaxwellian case for
get_electron_temperature()
. The electron temperature, and not the slope, is a fit parameter of the curve used byget_electron_temperature()
, so there is no need for the inversion. The returned value is now the electron temperature and not its reciprocal. (#1487)Exposed the
analysis
anddispersion
subpackages to theplasmapy
namespace. (#1512)Changed the
curve_fit()
method onplasmapy.analysis.fit_functions.Linear
so that the arbitrary keyword arguments get passed toscipy.stats.linregress
. Previously,curve_fit()
had accepted arbitrary keyword arguments but did not pass them along tolinregress
. (#1518)Fixed a bug in
hollweg()
that did not allow for argumentstheta
andk
to simultaneously be arrays. (#1529)Fixed the
Z
dependence infundamental_electron_collision_freq
, by replacingn_e
withn_i
while callingcollision_frequency
. (#1546)Updated the regular expression matching used by
Particle
to parse and identify a particle-like string. This fixes the bug where a string with a trailing space (e.g."Ar "
) was converted into a negatively charged ion (e.g."Ar -1"
). (#1555)Exposed
plasmapy.formulary.radiation
and functions therein to theplasmapy.formulary
namespace. (#1572)
Improved Documentation
Added a lite-function group to the configuration value
automodapi_custom_groups
that introduces the__lite_funcs__
dunder for listing the lite-functions in a module (akin to the__all__
dunder). (#1145)Added a page in the Contributor Guide that describes how to add changelog entries. (#1198)
Created an example notebook that lets users input plasma properties and get plasma parameters. (#1229)
The file
docs/_static/css/admonition_color_contrast.css
was added to include color customizations for Sphinx admonitions that originally came from sphinx_rtd_theme_ext_color_contrast. (#1287)Changed the color contrast of links and admonitions to be consistent with the Web Content Accessibility Guidelines 2 Level AA Conformance for contrast. (#1287)
Re-organized CSS files for the online documentation. The file
docs/_static/rtd_theme_overrides.css
was re-organized, renamed todocs/_static/css/plasmapy.css
, and updated with comments to help someone unfamiliar with CSS to understand the file and syntax. (#1287)Put references from
plasmapy.formulary
intodocs/bibliography.bib
in BibTeX format. (#1299)Added a discussion of test parametrization with argument unpacking to the Testing Guide in the Contributor Guide. (#1316)
Adopted the Contributor Covenant Code of Conduct version 2.1 and updated the Contributor Covenant Code of Conduct page accordingly. (#1324)
Updated deprecated meeting and calendar links in
README.md
. (#1327)Enabled the sphinx-hoverxref extension to Sphinx. (#1353)
Added bullet points on module level docstrings and
__all__
to the documentation guide. (#1359)Reverted the code syntax highlighting style back to the
pygments
default. The minimum version ofpygments
was set to2.11.0
because the default style was changed to meet accessibility guidelines for contrast in this release. (#1361)Described additional environments for building the documentation with
make
in the Documentation Guide. (#1373)Moved references from individual docstrings to the Bibliography. (#1374)
Fixed the docstring of
coupling_parameter
. (#1379)Added an example notebook that introduces how to use
astropy.units
. (#1380)Added a “Getting Started” page to the documentation sidebar and a “Getting Started” section to the examples gallery. (#1380)
Added an example notebook that introduces how to use
plasmapy.particles
. (#1382)Described the Plasma Calculator in the narrative documentation. (#1390)
Updated the cold magnetized plasma dielectric permittivity tensor notebook. (#1396)
Removed the following files from
docs/api_static
:plasmapy.particles.elements.rst
,plasmapy.particles.isotopes.rst
,plasmapy.particles.parsing.rst
, andplasmapy.particles.special_particles.rst
. These files corresponded to modules that were renamed with a leading underscore to indicate that they are no longer part of the public API. (#1440)Updated the docstring for
plasmapy.particles.particle_class.molecule
. (#1455)Hid the documentation page that contained the subpackage stability matrix. (#1466)
Added a discussion of doctests to the Documentation Guide. (#1478)
Removed the section on package requirements from the instructions on how to install
plasmapy
. (#1482)Updated the instructions on how to install
plasmapy
. (#1482)Defined
autodoc_typehints_format="short"
so signature type hints are displayed in short form, i.e. without the leading module names. (#1488)Set minimum version of
sphinx
tov4.4
. (#1488)Defined the
nitpick_ignore_regex
configuration variable indocs/conf.py
to specify regular expressions for objects to ignore in nitpicky documentation builds. (#1509)Made numerous minor updates and fixes to reStructuredText links in docstrings and the narrative documentation. (#1509)
Described the GitHub Action for codespell in the Testing Guide. (#1530)
Added the
sphinx-issues
extension to Sphinx to simplify linking to GitHub issues, pull requests, users, and commits. (#1532)Added the
sphinx.ext.extlinks
extension to Sphinx to simplify adding links to external domains which have a common base URL. (#1532)Added the
sphinx-notfound-page
extension to Sphinx so that the documentation now has a 404 page in the same style as the rest of the documentation. (#1532)Added a notebook on using
beta
from theplasmapy.formulary
module to calculate plasma β in different parts of the solar atmosphere. (#1552)Added an example notebook for the null point finder module. (#1554)
Added an example notebook that calculates plasma parameters associated with the Magnetospheric Multiscale Mission (MMS). (#1568)
Added an example notebook that discusses Coulomb collisions. (#1569)
Increased the strictness of the
build_docs
tox environment so that broken reStructuredText links now emit warnings which are then treated as errors, fixed the new errors, removed thebuild_docs_nitpicky
tox environment, and updated the Documentation Guide accordingly. (#1587)Renamed the
magnetic_statics.ipynb
notebook tomagnetostatics.ipynb
, and made some minor edits to its text and plotting code. (#1588)Added examples sections to the documentation pages for several modules within
plasmapy.formulary
. (#1590)Re-organized the directory structure for example notebooks. (#1590)
Alphabetized the author list in
docs/about/credits.rst
, and added missing authors from usinggit log
and the pull request history. (#1599)Renamed
docs/development
→docs/contributing
, and set up redirects from the original hyperlinks to the new ones for the contributor guide. (#1605)Added
sphinx-reredirects
as a Sphinx extension to allow website redirects. (#1605)Added a
robots.txt
file to the online documentation to tell web crawlers to ignore all butstable
andlatest
documentation builds when indexing for search engines. (#1607)
Trivial/Internal Changes
Streamlined
preserve_signature
such that it only binds__signature__
to the wrapped function, i.e. it no longer touches any other attribute of the wrapped function. (#1145)Moved all tests associated with calculating the thermal speed from test file
plasmapy/formulary/tests/test_parameters.py
toplasmapy/formulary/tests/test_thermal_speed.py
. (#1145)Applied reStructuredText substitutions for
plasmapy.particles
andParticleTracker
in the narrative documentation. (#1158)Added csslint to the pre-commit configuration to check the formatting and style of CSS files. (#1287)
Added Python 3.10 to the GitHub Actions test suite. (#1292)
Parametrized tests for
plasmapy.formulary.parameters.ion_sound_speed
. (#1313)Added cron tests of the development versions of matplotlib and SciPy, while changing the cadence of cron tests to be run approximately fortnightly. (#1333)
Applied
pytest.warns
in several tests to catch warnings that are being issued during execution of the test suite. (#1345)Split the tests running on pull requests into multiple stages. The various
pytest
test environments, including code coverage, now run conditionally given successful execution of a basic test environment and the linter checks. This change also prevents code coverage prompts from appearing twice, with incomplete information on the first time. (#1350)Added a helper function that takes an iterable and creates a
dict
with physical types as keys and the corresponding objects from that iterable as values. This change updates the minimum required version of Astropy to 4.3.1. (#1360)Added the module
plasmapy.particles._factory
which contains a private function that accepts arguments that can be provided toParticle
,CustomParticle
, orParticleList
and returns the appropriate instance of one of those three classes. (#1365)Used the extract method refactoring pattern on the initialization of
Particle
objects. (#1366, #1368)Refactored tests in
plasmapy.particles
. (#1369)CustomParticle
andDimensionlessParticle
no longer emit a warning when the charge and/or mass is not provided and got assigned a value ofnan
in the appropriate units. (#1399)Added unit test cases for manual entry of vector values in order to improve code coverage in the null point finder. (#1427)
Consolidated and parametrized tests associated with
plasmapy.formulary.parameters.gyroradius
. (#1430)Within
plasmapy.particles
modules, the_elements
,_isotopes
,_parsing
, and_special_particles
modules are now imported directly. Before this, objects within these modules were typically imported. (#1440)Renamed objects within the source code for
plasmapy.particles
to conform with PEP 8 naming conventions (e.g.,ParticleZooClass
→ParticleZoo
,ParticleZoo
→particle_zoo
, andParticles
→particles
). (#1440)Applied automated refactorings from Sourcery to
plasmapy.utils
. (#1463)Applied automated refactorings from Sourcery to
plasmapy.plasma
. (#1464)Bumped the minimum version of
h5py
to3.0.0
. (#1465)Changed the raised exception to
ImportError
(from a generalException
) when attempting to importplasmapy
from a Python version below the minimum supported version. (#1465)Added a workflow to label pull requests based on size. (#1467, #1492)
Separated
plasmapy.analysis.nullpoint.null_point_find
into two functions namednull_point_find
andplasmapy.analysis.nullpoint.uniform_null_point_find
.null_point_find
finds the null points of a vector space whose values are manually entered.plasmapy.analysis.nullpoint.uniform_null_point_find
finds the null points of a uniform vector space whose values are generated by a function provided by the user. (#1477)Applied automated refactorings from Sourcery to
plasmapy.particles
. (#1479)Applied automated refactorings from Sourcery to
plasmapy.formulary
. (#1480)Bumped the minimum versions of mpmath to
1.2.1
,numpy
to1.19.0
,pandas
to1.0.0
,pytest
to5.4.0
,scipy
to1.5.0
, and xarray to0.15.0
. (#1482)Moved h5py, lmfit, mpmath, and Numba out of the
extras
requirements category and into theinstall
requirements category. These packages are now installed when runningpip install plasmapy
. (#1482)Added
dlint
,flake8
,flake8-absolute-import
,flake8-rst-docstrings
,flake8-use-fstring
,pydocstyle
, andpygments
into thetests
requirements category and pre-commit into theextras
requirements category. These dependencies are not required for basic installation with pip. (#1482)Updated
docs/environment.yml
to use pip to install all requirements specified byrequirements.txt
when creating a Conda environment. (#1482)Used
contextlib.suppress
to suppress exceptions, instead oftry
&except
blocks. (#1494)Added a pre-commit hook that transforms relative imports to absolute imports, except in
docs/plasmapy_sphinx
. (#1499)Added a test that
import plasmapy
does not raise an exception. (#1501)Added a GitHub Action for codespell, and updated the corresponding tox environment to print out contextual information. (#1530)
Added
plasmapy/utils/units_definitions.py
to precompute units which were applied to optimize functionality inplasmapy/formulary/distribution.py
. (#1531)Replaced
except Exception
clauses informulary
,particles
, andutils
with specific exception statements. (#1541)Added tests for passing array valued
k
andtheta
arguments tohollweg()
, which was an added feature in #1529. (#1549)Added flake8-implicit-str-concat and flake8-mutable as extensions for
flake8
. (#1557)Added flake8-simplify as an extension for
flake8
. (#1558)Applied automated refactorings from Sourcery to
plasmapy.dispersion
. (#1562)Applied automated refactorings from Sourcery to
plasmapy.diagnostics
. (#1563)Applied automated refactorings from Sourcery to
plasmapy.analysis
. (#1564)Removed an extraneous
print
statement fromcollision_frequency
that activated when the colliding particles were both electrons. (#1570)Changed the type hints for
z_mean
inplasmapy.formulary.collisions
functions fromastropy.units.dimensionless_unscaled
toReal
. Consequently,z_mean
will no longer be processed byvalidate_quantities
. Previously,z_mean
issued a warning when a real number was provided instead of a dimensionlessQuantity
. (#1570)Updated the version of
black
to 22.3.0 in PlasmaPy’s pre-commit configuration. This update included a formatting change where spaces around power operators were removed for sufficiently simple operands (e.g.,a ** b
→a**b
). (#1582)Renamed
units_definitions
to_units_definitions
andunits_helpers
to_units_helpers
inplasmapy.utils
to mark these modules as private. (#1587)Updated the
codemeta.json
file with metadata for the version0.8.1
release. (#1606)