PlasmaPy v0.7.0 (2021-11-18) ============================ This release of PlasmaPy contains 127 commits in 73 merged pull requests closing 37 issues from 19 people, 14 of which are first-time contributors to PlasmaPy. * 127 commits have been added since 0.6 * 37 issues have been closed since 0.6 * 73 pull requests have been merged since 0.6 * 19 people have contributed since 0.6 * 14 of which are new contributors The people who have contributed to the code for this release are: - Alf Köhn-Seemann * - Andrew * - Armando Salcido * - Dominik Stańczak - FinMacDov * - Marco Gorelli * - Nick Murphy - Nicolas Lequette * - Peter Heuer - Quettle * - RAJAGOPALAN-GANGADHARAN * - Sjbrownian * - Tiger Du - Tomás Stinson * - bryancfoo * - dependabot[bot] * - haman80 * - pre-commit-ci[bot] * - rocco8773 An asterisk indicates that this release contains their first contribution to PlasmaPy. Backwards Incompatible Changes ------------------------------ - Removed alias ``tfds_`` to ``plasmapy.dispersion.two_fluid_dispersion.two_fluid_dispersion_solution``, with the reasoning behind the removal outlined in the pull request. (`#1101 `__) - Removed the ``Tracker.synthetic_radiograph()`` method and created the standalone function :func:``~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph`` in its place. This new function takes either a ``~plasmapy.diagnostics.charged_particle_radiography.Tracker`` object or a dictionary equivalent to ``~plasmapy.diagnostics.charged_particle_radiography.Tracker.results_dict``. (`#1134 `__) - Renamed subpackage ``plasmapy.diagnostics.proton_radiography`` to ``plasmapy.diagnostics.charged_particle_radiography``, and renamed the ``SyntheticProtonRadiograph`` class within that module to ``~plasmapy.diagnostics.charged_particle_radiography.Tracker``. (`#1134 `__) - ``~plasmapy.diagnostics.charged_particle_radiography.Tracker`` no longer supports making changes to an instantiated object and re-running the simulation. Subsequent simulations should be performed by instantiating a new ``~plasmapy.diagnostics.charged_particle_radiography.Tracker`` object and running its simulation. (`#1134 `__) - For `~plasmapy.plasma.grids.CartesianGrid` the `~plasmapy.plasma.grids.CartesianGrid.volume_averaged_interpolator` now returns `numpy.nan` values for any interpolation not bounded by the grid points. (`#1173 `__) - Renamed file :file:`two_fluid_dispersion.py` to :file:`two_fluid_.py` and moved it into the `plasmapy.dispersion.analytical` subpackage. The function ``two_fluid_dispersion_solution()`` contained within that file was renamed to `~plasmapy.dispersion.analytical.two_fluid_.two_fluid`. (`#1208 `__) - Changed |ParticleList| so that if it is provided with no arguments, then it creates an empty |ParticleList|. This behavior is analogous to how `list` and `tuple` work. (`#1223 `__) - Changed the behavior of |Particle| in equality comparisons. Comparing a |Particle| with an object that is not :term:`particle-like` will now return `False` instead of raising a `TypeError`. (`#1225 `__) - Changed the behavior of `~plasmapy.particles.particle_class.CustomParticle` so that it returns `False` when compared for equality with another type. Previously, a `TypeError` was raised. (`#1315 `__) Deprecations and Removals ------------------------- - In `plasmapy.particles`, use of the term "integer charge" has been deprecated in favor of the term "charge number". The `~plasmapy.particles.particle_class.Particle.integer_charge` attribute of |Particle| has been deprecated in favor of `~plasmapy.particles.particle_class.Particle.charge_number`. The `~plasmapy.particles.ionization_state.IonicLevel.integer_charge` attribute of |IonicLevel| (formerly ``IonicFraction``) has been deprecated in favor of `~plasmapy.particles.ionization_state.IonicLevel.charge_number`. The `~plasmapy.particles.ionization_state.IonizationState.integer_charges` attribute of |IonizationState| has been deprecated in favor of `~plasmapy.particles.ionization_state.IonizationState.charge_numbers`. (`#1136 `__) - The ``particle`` attribute of |Particle| has been removed after having been deprecated in 0.6.0. (`#1146 `__) - Used more generalized keyword argument ``T`` instead of ``T_i`` in ``plasmapy.formulary.parameters.gyroradius``. The ``T_i`` argument has been deprecated and will be removed in a subsequent release. (`#1210 `__) Features -------- - Added the `~plasmapy.particles.ionization_state.IonizationState.average_ion` method to |IonizationState|. (`#1028 `__) - Added the `~plasmapy.particles.ionization_state_collection.IonizationStateCollection.average_ion` method to |IonizationStateCollection|. (`#1028 `__) - Added the ``plasmapy.formulary.mathematics.Chandrasekhar_G`` function, which is helpful in neoclassical transport theory. This change was reverted in `#1233 `__. (`#1084 `__) - Enabled slicing of |IonizationState| instances to return a list of |IonicLevel| instances. (`#1130 `__) - |IonizationState| instances can now be compared to an |IonizationState| of a different element without raising an exception. (`#1130 `__) - Allowed `len` to be used on |IonizationState| instances. (`#1130 `__) - |IonicLevel| and |IonizationState| now accept an additional, optional ion temperature argument for each of the ionic levels. (`#1130 `__) - Added the :meth:``~plasmapy.diagnostics.charged_particle_radiography.Tracker.save_results`` method to ``~plasmapy.diagnostics.charged_particle_radiography.Tracker`` for saving results to the :file:`.npz` file format (see `numpy.lib.format` for details on the file format). (`#1134 `__) - Added the `plasmapy.utils.decorators.deprecation` module. The module includes `~plasmapy.utils.decorators.deprecation.deprecated`, which is a decorator that is based on `astropy.utils.decorators.deprecated`. (`#1136 `__) - Created the `~plasmapy.particles.ionization_state.IonizationState.to_list` method of |IonizationState| to provide a |ParticleList| instance that contains the different ionic levels. (`#1154 `__) - The behavior of the function ``plasmapy.formulary.parameters.gyroradius`` has been changed. If `numpy.nan` values are provided for ``T_i`` or ``Vperp``, then instead of raising a slightly misleading error, `numpy.nan` in the appropriate units is returned. (`#1187 `__) - Added the `~plasmapy.particles.particle_collections.ParticleList.average_particle` method to |ParticleList|. This method returns a particle with the mean mass and charge of the |ParticleList|. The ``use_rms_charge`` and ``use_rms_mass`` keyword arguments make this method calculate the root mean square charge and mass, respectively. The ``abundances`` keyword argument allows the calculation of the mean or root mean square to be weighted. (`#1204 `__) - Restructured the `plasmapy.dispersion` subpackage by creating the `~plasmapy.dispersion.analytical` subpackage to contain functionality related to analytical dispersion solutions. (`#1208 `__) - Implemented ``__eq__``, ``__ne__`` and ``__hash__`` to allow |CustomParticle| instances to be used as `dict` keys. (`#1216 `__) - Added the ``plasmapy.particles.particle_collections.ionic_levels`` function to create a |ParticleList| initialized with different ionic levels of an element or isotope. (`#1223 `__) Bug Fixes --------- - Made |Particle| instances pickleable. (`#1122 `__) - Fixed the behavior of ``plasmapy.formulary.mathematics.Chandrasekhar_G`` at very small and very large argument values. This change was reverted in `#1233 `__. (`#1125 `__) - Running ``~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph`` with the keyword ``optical_density=True`` will now return `numpy.inf` where the source profile intensity is zero. Previously, an incorrect value was returned since zero entries were replaced with values of ``1`` before taking the logarithm. (`#1134 `__) - Fixed a bug in the volume-averaged interpolator for `~plasmapy.plasma.grids.CartesianGrid` (`~plasmapy.plasma.grids.CartesianGrid.volume_averaged_interpolator`). The old method miss interpreted where the interpolation point was inside the nearest neighbor cell volume. So, if an interpolation point was at the lower bounds of the nearest neighbor cell volume, then the position was flipped and interpreted as being at the upper bounds of the cell volume, and visa-versa. (`#1173 `__) - Fixed the normalization of the wavevector in the Thomson spectral density function, :func:`~plasmapy.diagnostics.thomson.spectral_density`. The previous version was not properly normalizing the wavevector to unity. (`#1190 `__) - Reverted most of `#1084 `__ and `#1125 `__, removing our implementation of the Chandrasekhar G function (for now!). This function may get brought back at a later date, once we have an implementation we numerically trust. (`#1233 `__) Improved Documentation ---------------------- - Improved consistency of documentation style and made |reStructuredText| fixes in several subpackages. (`#1073 `__) - Added a pre-release section to the release guide. This section now includes steps for having a feature freeze about a week before the release, followed by a code freeze about two days before the release. (`#1081 `__) - Created the |Sphinx| extension package `plasmapy_sphinx` and used it to replace ``sphinx_automodapi``. `plasmapy_sphinx` creates directives :rst:dir:`automodapi` and :rst:dir:`automodsumm` to replace the same directives defined by ``sphinx_automodapi``. The documentation was updated so the slight syntax differences in the newly defined directives will still render the same as before. (`#1105 `__) - The term "integer charge" has been replaced in the documentation with the term "charge number". (`#1136 `__) - Implemented a framework to define and use common `Sphinx substitutions `__ across the narrative documentation and docstrings. These substitutions are defined in :file:`docs/common_links.rst`. (`#1147 `__) - Began a project glossary at :file:`docs/glossary.rst`. (`#1149 `__) - Changed the default branch name to ``main``. Locations in the code and documentation that referred to the default branch of PlasmaPy (and certain other packages) were changed to reflect the new name (including, for example, in the development guide in the documentation). (`#1150 `__) - Updated information on how to write and build documentation in the development guide. (`#1156 `__) - Updated information on how to write and run tests in the |contributor guide|. (`#1163 `__) - Created an outline of a page in the development guide to describe the workflow required to contribute to PlasmaPy. (`#1178 `__) - Added brief description about the physics of the upper-hybrid resonance to the docstring of the function ``plasmapy.formulary.parameters.upper_hybrid_frequency``. (`#1180 `__) - Added a brief description about the physics of the lower-hybrid resonance to the docstring of the function ``plasmapy.formulary.parameters.lower_hybrid_frequency``. (`#1181 `__) - Made the function ``plasmapy.formulary.parameters.gyrofrequency`` more general by removing the indications that it might only work for ions. (`#1183 `__) - Make `plasmapy.analysis.fit_functions.AbstractFitFunction.FitParamTuple` a property to fix the documentation build warning caused by the release of |Sphinx| ``v4.1.0``. (`#1199 `__) - Included a step in the release guide to update Binder requirements so that the release of PlasmaPy on |PyPI| gets installed when opening example notebooks from the stable and release branches of the online documentation. (`#1205 `__) - Updated the |documentation guide| to include updates to tox environments for building the documentation. (`#1206 `__) - Fixed numerous broken |reStructuredText| links in prior changelogs. (`#1207 `__) - Improve the docstring for `plasmapy.online_help`. (`#1213 `__) - Renamed "Development Guide" to "Contributor Guide", and temporarily removed the incomplete :file:`docs/development/workflow.rst` from the ``toctree`` of the Contributor Guide. (`#1217 `__) - Fixed a typo in the docstring of ``plasmapy.formulary.parameters.Alfven_speed``. (`#1218 `__) - Fixed broken |reStructuredText| links in docstrings for aliases in `plasmapy.formulary`. (`#1238 `__) - Fixed multiple broken and redirected links. (`#1257 `__) - Updated the |documentation guide| to include a description on how to add and cite references to PlasmaPy's global bibliography BibTeX file, :file:`docs/bibliography.bib`. (`#1263 `__) - Added ``sphinxcontrib-bibtex`` as a |Sphinx| extension to enable references to be stored in a BibTeX file. (`#1263 `__) - Began a documentation-wide |bibliography| page. (`#1263 `__) - Updated the |documentation guide| to describe where formulae should go in docstrings and how to use |glossary| entries. (`#1264 `__) - Updated and fixed hyperlinks in the documentation. (`#1267 `__) - Adopted the ``"xcode"`` code highlighting style for ``pygments`` to increase color contrast and improve web accessibility. (`#1268 `__) - Updated the feedback and communication page. (`#1272 `__) - Updated the requirements for the documentation build to include no restrictions on ``docutils`` and ``sphinx_rtd_theme >= 1.0.0``. ``docutils == 0.17`` is not compatible with ``sphinx_rtd_theme < 1.0`` (see `#1107 `__ and `#1230 `__). (`#1275 `__) - Added a screenshot of the link for the |Read the Docs| preview of the documentation for a pull request. (`#1298 `__) - Incorporated citations in the `~plasmapy.dispersion.analytical.two_fluid_.two_fluid` docstring into the PlasmaPy |bibliography| framework. (`#1301 `__) Trivial/Internal Changes ------------------------ - Simplified handling of package dependencies. Removed duplicated requirements files and centralized them instead. Developer dependencies can now be installed with either ``pip install plasmapy[developer]`` or ``pip install -r requirements.txt``. (`#789 `__) - Reconfigured ``flake8`` settings in CI. (`#1062 `__) - Added ``pydocstyle`` to continuous integration (CI), to hopefully make writing prettier docstrings easier. (`#1062 `__) - Added ``flake8-rst-docstrings`` to catch |reStructuredText| formatting errors in documentation in the linter stage of CI. (`#1062 `__) - Added `pytest-regressions `__ to testing dependencies, to make regression tests a little easier to write. (`#1084 `__) - Fixed a minor error in the :math:`\mathbf{E} × \mathbf{B}` drift notebook. (`#1088 `__) - Upgrade ``nbqa`` to latest available version (0.6.0). (`#1104 `__) - Moved our custom |pre-commit| style testing suite to ``pre-commit.ci``, taking advantage of the new ``pre-commit.ci autofix`` command that allows manually calling for pre-commit to be run by typing that command as a comment to a pull request. (`#1106 `__) - Added tests using hypothesis. (`#1125 `__) - Added to :file:`setup.cfg` the configuration ``flake8.per-file-ignores=plasmapy/formulary/__init__.py:F403`` to ignore warnings resulting from imports like ``from xx import *``. (`#1127 `__) - Re-enabled several ``flake8`` checks by removing the following codes from the ``flake8.extend-ignore`` configuration in :file:`setup.cfg`: ``D100``, ``D102``, ``D103``, ``D104``, ``D200``, ``D210``, ``D301``, ``D401``, ``D407``, ``D409``, ``D412``, ``E712``, ``E713``, ``F403``, ``F541``, ``RST213``, ``RST306``, and ``RST902``. Addressed any failed linter checks from this modification. (`#1127 `__) - ``~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph`` now determines the default detector size to be the smallest detector plane centered on the origin that includes all particles. (`#1134 `__) - Added ion velocity input to the :file:`thomson.ipynb` diagnostics notebook. (`#1171 `__) - Added tox and removed `pytest` as extra requirements. (`#1195 `__) - Updated tox test environments for building the documentation. Added the ``build_docs_nitpicky`` environment to check for broken |reStructuredText| links. (`#1206 `__) - Added the ``--keep-going`` flag to the ``build_docs*`` tox environments with the ``-W`` option so that test failures will not stop after the first warning (that is treated as an error). (`#1206 `__) - Make queries to `plasmapy.online_help` for ``"quantity"`` or ``"quantities"`` redirect to the help page for `astropy.units` (which was already the case for ``"unit"`` and ``"units"``). (`#1213 `__) - Bumped the |Python| version for |Read the Docs| builds from ``3.7`` to ``3.8``. (`#1248 `__) - Refactored :file:`plasmapy/dispersion/tests/test_dispersion.py` to use ``hypothesis`` for property based testing. (`#1249 `__) - Defined redirects to allow and anchors to avoid checking when using |Sphinx| to verify that hyperlinks are correct via ``make linkcheck``. (`#1267 `__) - Replaced usage of `eval` inside |IonizationStateCollection| with `getattr`. (`#1280 `__) - Added using `dlint `__ to the ``linters`` testing environment in :file:`tox.ini` as a static analysis tool to search for security issues. (`#1280 `__) - Enabled using `flake8-use-fstring `__ in the ``linters`` testing environment in :file:`tox.ini` to enforce usage of formatted string literals (f-strings). (`#1281 `__) - Switched usage of `str.format` to formatted string literals (f-strings) in several files. (`#1281 `__) - Added `flake8-absolute-import `_ to the ``linters`` tox environment. (`#1283 `__) - Removed unused imports, and changed several imports from relative to absolute. (`#1283 `__) - Added |pre-commit| hooks to auto-format :file:`.ini`, :file:`.toml`, and :file:`.yaml` files, and applied changes from those hooks to existing files. (`#1284 `__) - Changed the validated units for the ``theta`` input argument of `~plasmapy.dispersion.analytical.two_fluid_.two_fluid` from degrees to radians. (`#1301 `__) - Replaced usage of ``distutils.version.StrictVersion`` with ``packaging.version.Version`` because ``distutils`` has been deprecated. As part of this change, `packaging `__ has been added as a dependency. (`#1306 `__) - Increased the minimum version of matplotlib to 3.3.0 and updated `plasmapy.diagnostics.langmuir.swept_probe_analysis` to be compatible with matplotlib 3.5.0. (`#1334 `__)