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 argumentsTeandTihave been renamedT_eandT_iand are now required keyword-only arguments. (#974)Moved the
grid_resolutionattribute fromAbstractGridtoCartesianGridandNonUniformCartesianGridseparately. 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 ofCustomParticleto 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.elementstoplasmapy.particles._elements,plasmapy.particles.isotopestoplasmapy.particles._isotopes,plasmapy.particles.parsingtoplasmapy.particles._parsing, andplasmapy.particles.special_particlestoplasmapy.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.ParticleZoowhich was renamed toplasmapy.particles._special_particles.particle_zooand removed from the public API. (#1440)The parameters
Zandmass_numbtoParticleare now keyword-only. (#1456)
Deprecations and Removals
Officially deprecated
plasmapy.formulary.parametersand scheduled its permanent removal for thev0.9.0release. (#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 installplasmapyis 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_densityandspectral_density_modelnow supportparticle_collectionsobjects as input to theionskeywords. (#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_coefficientsto supportplasmapy.formulary.parameters.thermal_speed_liteusage by calculating the various thermal speed coefficients.plasmapy.formulary.parameters.thermal_speed_coefficientsis also bound toplasmapy.formulary.parameters.thermal_speedas thecoefficientsattribute. (#1145)Created decorator
bind_lite_funcfor 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_liteis also bound toplasmapy.formulary.parameters.thermal_speedas theliteattribute. (#1145)Added the
hollweg_.pymodule to thenumericalsubpackage 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_interpolatorandvolume_averaged_interpolatorforCartesianGrid. 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 onAbstractGridraises aNotImplementedErrorexception. (#1295)Created lite-function
plasmapy.formulary.parameters.plasma_frequency_lite. (#1308)Added the
moleculefunction to buildCustomParticleobjects from astrrepresenting a molecule symbol. (#1309)Added the
is_categorymethod forParticleListobjects. This method is analogous to theis_categorymethod forParticleobjects. (#1378)Created the prototype analysis tool
plasmapy.analysis.nullpointfor finding the null points in a vector space using the trilinear interpolation method of Haynes and Parnell [2007]. (#1383)Created
plasmapy.formulary.lengthsto contain length related plasma parameters, and migratedDebye_length,gyroradius, andinertial_lengthfromplasmapy.formulary.parametersto the new module. Related aliases were also migrated. (#1434)Created
plasmapy.formulary.frequenciesto contain frequency related plasma parameters, and migratedgyrofrequency,plasma_frequency,plasma_frequency_lite,lower_hybrid_frequency, andupper_hybrid_frequencyfromplasmapy.formulary.parametersto the new module. Related aliases were also migrated. (#1439)Migrated
Debye_number, andHall_parameterfromplasmapy.formulary.parameterstoplasmapy.formulary.dimensionless. Related aliases were also migrated. (#1444)Created
plasmapy.formulary.speedsto contain frequency related plasma parameters, and migratedAlfven_speed,ion_sound_speed,kappa_thermal_speed,thermal_speed,thermal_speed_coefficients, andthermal_speed_litefromplasmapy.formulary.parametersto the new module. Related aliases were also migrated. (#1448)Created
plasmapy.formulary.miscto 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_pressurefromplasmapy.formulary.parametersto the new module. Related aliases were also migrated. (#1453)Created lite-functions
plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_liteandplasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_liteforplasma_dispersion_funcandplasma_dispersion_func_derivrespectively. (#1473)Created lite-function
plasmapy.formulary.dielectric.permittivity_1D_Maxwellian_liteforplasmapy.formulary.dielectric.permittivity_1D_Maxwellian. (#1476)Added the
stix_.pymodule to theanalyticalsubpackage 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
ParticleListLiketyping 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_gridmethod ofAbstractGridthat would fail to smoothly handle invalid user input if thestart,stop, ornumkeywords were not the correct type. (#1295)Fixed a bug with
ParticlewhereParticle("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 aValueErroris raised if an array is passed to the deprecated keywordT_i. (#1430)Exposed
plasmapy.formulary.miscto theplasmapy.formularynamespace. (#1471)Replaced misuse of
max_exp_bias - max_exp_biaswithmax_exp_bias - min_exp_biaswhen 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
analysisanddispersionsubpackages to theplasmapynamespace. (#1512)Changed the
curve_fit()method onplasmapy.analysis.fit_functions.Linearso 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 argumentsthetaandkto simultaneously be arrays. (#1529)Fixed the
Zdependence infundamental_electron_collision_freq, by replacingn_ewithn_iwhile callingcollision_frequency. (#1546)Updated the regular expression matching used by
Particleto 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.radiationand functions therein to theplasmapy.formularynamespace. (#1572)
Improved Documentation
Added a lite-function group to the configuration value
automodapi_custom_groupsthat 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.csswas 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.csswas 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.formularyintodocs/bibliography.bibin 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
pygmentsdefault. The minimum version ofpygmentswas set to2.11.0because the default style was changed to meet accessibility guidelines for contrast in this release. (#1361)Described additional environments for building the documentation with
makein 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
sphinxtov4.4. (#1488)Defined the
nitpick_ignore_regexconfiguration variable indocs/conf.pyto 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-issuesextension to Sphinx to simplify linking to GitHub issues, pull requests, users, and commits. (#1532)Added the
sphinx.ext.extlinksextension to Sphinx to simplify adding links to external domains which have a common base URL. (#1532)Added the
sphinx-notfound-pageextension 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
betafrom theplasmapy.formularymodule 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_docstox environment so that broken reStructuredText links now emit warnings which are then treated as errors, fixed the new errors, removed thebuild_docs_nitpickytox environment, and updated the Documentation Guide accordingly. (#1587)Renamed the
magnetic_statics.ipynbnotebook 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 logand 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-reredirectsas a Sphinx extension to allow website redirects. (#1605)Added a
robots.txtfile to the online documentation to tell web crawlers to ignore all butstableandlatestdocumentation builds when indexing for search engines. (#1607)
Trivial/Internal Changes
Streamlined
preserve_signaturesuch 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.pytoplasmapy/formulary/tests/test_thermal_speed.py. (#1145)Applied reStructuredText substitutions for
plasmapy.particlesandParticleTrackerin 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.warnsin 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
pytesttest 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
dictwith 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._factorywhich contains a private function that accepts arguments that can be provided toParticle,CustomParticle, orParticleListand returns the appropriate instance of one of those three classes. (#1365)Used the extract method refactoring pattern on the initialization of
Particleobjects. (#1366, #1368)Refactored tests in
plasmapy.particles. (#1369)CustomParticleandDimensionlessParticleno longer emit a warning when the charge and/or mass is not provided and got assigned a value ofnanin 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.particlesmodules, the_elements,_isotopes,_parsing, and_special_particlesmodules are now imported directly. Before this, objects within these modules were typically imported. (#1440)Renamed objects within the source code for
plasmapy.particlesto 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
h5pyto3.0.0. (#1465)Changed the raised exception to
ImportError(from a generalException) when attempting to importplasmapyfrom 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_findinto two functions namednull_point_findandplasmapy.analysis.nullpoint.uniform_null_point_find.null_point_findfinds the null points of a vector space whose values are manually entered.plasmapy.analysis.nullpoint.uniform_null_point_findfinds 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,numpyto1.19.0,pandasto1.0.0,pytestto5.4.0,scipyto1.5.0, and xarray to0.15.0. (#1482)Moved h5py, lmfit, mpmath, and Numba out of the
extrasrequirements category and into theinstallrequirements category. These packages are now installed when runningpip install plasmapy. (#1482)Added
dlint,flake8,flake8-absolute-import,flake8-rst-docstrings,flake8-use-fstring,pydocstyle, andpygmentsinto thetestsrequirements category and pre-commit into theextrasrequirements category. These dependencies are not required for basic installation with pip. (#1482)Updated
docs/environment.ymlto use pip to install all requirements specified byrequirements.txtwhen creating a Conda environment. (#1482)Used
contextlib.suppressto suppress exceptions, instead oftry&exceptblocks. (#1494)Added a pre-commit hook that transforms relative imports to absolute imports, except in
docs/plasmapy_sphinx. (#1499)Added a test that
import plasmapydoes 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.pyto precompute units which were applied to optimize functionality inplasmapy/formulary/distribution.py. (#1531)Replaced
except Exceptionclauses informulary,particles, andutilswith specific exception statements. (#1541)Added tests for passing array valued
kandthetaarguments 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
printstatement fromcollision_frequencythat activated when the colliding particles were both electrons. (#1570)Changed the type hints for
z_meaninplasmapy.formulary.collisionsfunctions fromastropy.units.dimensionless_unscaledtoReal. Consequently,z_meanwill no longer be processed byvalidate_quantities. Previously,z_meanissued a warning when a real number was provided instead of a dimensionlessQuantity. (#1570)Updated the version of
blackto 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_definitionsto_units_definitionsandunits_helpersto_units_helpersinplasmapy.utilsto mark these modules as private. (#1587)Updated the
codemeta.jsonfile with metadata for the version0.8.1release. (#1606)