Skip to content

Latest commit

 

History

History
2294 lines (2079 loc) · 144 KB

CHANGELOG.rst

File metadata and controls

2294 lines (2079 loc) · 144 KB

PlasmaPy v2024.5.0 (2024-05-08)

New Features

  • Added the ~plasmapy.particles.particle_class.Particle.nucleus attribute of |Particle|. (:pr:`2538`)
  • Replaced plasmapy.utils.data.downloader.get_file with a new class ~plasmapy.utils.data.downloader.Downloader with a method ~plasmapy.utils.data.downloader.Downloader.get_file which downloads resource files from |PlasmaPy's data repository|. (:pr:`2570`)
  • Added support for new background, ion_mu and ion_z fitting parameters to the ~plasmapy.diagnostics.thomson.spectral_density_model function. (:pr:`2636`)

Documentation Improvements

Backwards Incompatible Changes

  • Changed the minimum required version of Python from 3.9 to 3.10. (:pr:`2501`)
  • Modified ~plasmapy.particles.atomic.common_isotopes, ~plasmapy.particles.atomic.known_isotopes, and ~plasmapy.particles.atomic.known_isotopes to each return a |ParticleList|. (:pr:`2559`)
  • Added a new keyword particlewise to the method ~plasmapy.particles.particle_collections.ParticleList.is_category of |ParticleList|, which now causes the function to return a bool for the whole list by default. The old functionality is still available by setting particlewise to True. (:pr:`2648`)

Bug Fixes

  • Fixed an error when :py:`lorentzfactor` and multiple particles are provided to ~plasmapy.formulary.lengths.gyroradius. (:pr:`2542`)
  • Required UTF-8 encoding to be used for generating citation output. (:pr:`2578`)
  • Fixed a bug in |particle_input| where particle categorization criteria had not been applied to arguments that became a |ParticleList|. (:pr:`2594`)
  • Made ~plasmapy.diagnostics.thomson.spectral_density_model compatible with the new version of lmfit==1.3.0. (:pr:`2623`)
  • Fixed a bug when ~plasmapy.formulary.radiation.thermal_bremsstrahlung is given multiple input density values. (:pr:`2627`)
  • Fixed the requirements file used by binder to open notebooks. (:pr:`2672`)

Internal Changes and Refactorings

  • Changed type hint annotations to be consistent with PEP 604. Most type unions are now made using the | operator rather than with typing.Union. (:pr:`2504`)
  • Refactored, parametrized, and expanded the tests for ~plasmapy.formulary.lengths.Debye_length. (:pr:`2509`)
  • Changed type hint annotations that used numbers.Integral, numbers.Real, or numbers.Complex to instead use int, float, or complex, respectively. (:pr:`2520`)
  • Created a |tox| environment for regenerating requirements files used in continuous integration (CI) and by integrated development environments (IDEs). This environment is now what is being used in the automated pull requests to regenerate requirements files. Switching from pip-compile to uv pip compile now allows requirements files to be created for multiple versions of Python, as well as for minimal versions of dependencies. (:pr:`2523`)
  • Reduced the :wikipedia:`cognitive complexity` of ~plasmapy.formulary.lengths.gyroradius. (:pr:`2542`)
  • Added and updated type hint annotations within plasmapy.formulary. (:pr:`2543`)
  • Applied caching through |GitHub Actions| to speed up continuous integration tests and documentation builds. Because the Python environments used by |tox| to run tests no longer need to be recreated every time tests are run, caching speeds up several continuous integration tests by ∼2–3 minutes. See :issue:`2585` to learn more about recent efforts to drastically speed up PlasmaPy's continuous integraiton checks. (:pr:`2552`)
  • Removed :file:`setup.py`. (:pr:`2558`)
  • Added sphinx-lint as a |pre-commit| hook to find reStructuredText errors. (:pr:`2561`)
  • Enabled the tox-uv plugin to |tox|, so that package installation, caching, and the creation of virtual environments will be handled by |uv| instead of |pip|. This change makes it faster to run tests both locally and via |GitHub Actions|. (:pr:`2584`)
  • Changed the project structure to an src layout to follow the updated recommendation from the Python Packaging Authority's packaging guide. The motivation for this change is described in :issue:`2581`. Source code previously in :file:`plasmapy/` is now located in |src/plasmapy/| and tests are now in a separate |tests/| directory. Tests previously in :file:`plasmapy/**/tests/` are now in :file:`tests/**/`, where :file:`**` refers to an arbitrary number of subdirectories. For example, the source code of plasmapy.formulary is now located in :file:`src/plasmapy/formulary/` and the tests for plasmapy.formulary are now in :file:`tests/formulary/`. (:pr:`2598`)
  • Reconfigured the auto-generated requirements files used during continuous integration and for documentation builds, while adding corresponding documentation. (:pr:`2650`)
  • Added :file:`noxfile.py` as a configuration file for |nox|. This file initially contains environments for building documentation, checking hyperlinks, and performing static type checking with |mypy| (:pr:`2654`)
  • Began using |nox| for some testing environments in |GitHub Actions|, including for the documentation build and static type checking. (:pr:`2656`)

Additional Changes

  • Updated type hint annotations in plasmapy.particles. (:pr:`2458`)
  • Added pytest-rerunfailures to the tests set of dependencies defined in :file:`pyproject.toml`, and applied it to a test that experiences intermittent failures. (:pr:`2483`)
  • Added a flag to ~plasmapy.plasma.grids.AbstractGrid.require_quantities to silence warnings when a quantity is not provided and is assumed to be zero everywhere. Modified ~plasmapy.simulation.particle_tracker.ParticleTracker to not display this warning for the \mathbf{E} and \mathbf{B} field components, since one of these is often not explicitly provided. (:pr:`2519`)
  • Removed |pytest| as a runtime dependency. (:pr:`2525`)
  • Removed the unused py310-conda |tox| environment. (:pr:`2526`)
  • Exposed ~plasmapy.formulary.dielectric.StixTensorElements and ~plasmapy.formulary.dielectric.RotatingTensorElements to the public API. (:pr:`2543`)
  • Added tests to verify correctness of two properties in ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies. (:pr:`2614`)

PlasmaPy v2024.2.0 (2024-02-06)

Backwards Incompatible Changes

  • Created new ~plasmapy.simulation.particle_tracker.ParticleTracker object for general particle pushing simulations involving electromagnetic fields. The tracker replaces the old ~plasmapy.simulation.particletracker.ParticleTracker. (:pr:`2245`)
  • Imports of classes and functions from plasmapy.utils must now be made directly from the subpackages and modules, rather than from plasmapy.utils itself. (:pr:`2403`)
  • Moved mass_density and its alias rho_ from plasmapy.formulary.misc to plasmapy.formulary.densities. (:pr:`2410`)

Features

  • Added a notch argument to ~plasmapy.diagnostics.thomson.spectral_density, which allows users to output spectrum over one or multiple wavelength ranges to correspond to a notch filter commonly applied to experimentally measured Thomson scattering spectra. Changed the ~plasmapy.diagnostics.thomson.spectral_density_model function to allow notch to be applied during fitting. (:pr:`2058`)
  • Changed unit annotations to |Quantity| type hint annotations. (:pr:`2421`)
  • Enabled |particle_input| to decorate functions which have variadic positional arguments followed by keyword arguments. See :issue:`2150`. (:pr:`2428`)
  • Added a random_seed keyword in the ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.Tracker.create_particles method of the ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.Tracker class to make the function deterministic to resolve intermittent test failures. (:pr:`2487`)

Bug Fixes

Improved Documentation

Trivial/Internal Changes

  • Added Python 3.12 to the suite of continuous integration tests. (:pr:`2368`)
  • Added a GitHub Action that will create an issue containing a release checklist, which will largely supersede the release process outlined in the |contributor guide|. (:pr:`2376`)
  • Separated the GitHub Action for checking hyperlinks in the documentation into its own GitHub Action. (:pr:`2392`)
  • Replaced |black| with |ruff| in the |pre-commit| configuration. (:pr:`2394`)
  • Modified the __exit__ method of HDF5Reader for context management. (:pr:`2402`)
  • Added an initial configuration for |mypy| that temporarily ignores existing errors. (:pr:`2424`)
  • Added a |tox| environment for running |mypy|. (:pr:`2431`)
  • Added |mypy| to the suite of continuous integration checks. (:pr:`2432`)
  • Used autotyping to implement |type hint annotations| for special methods like __init__ and __str__, and changed -> typing.NoReturn annotations to -> None. (:pr:`2437`)
  • Used autotyping to add :py:`-> None` return annotations to functions and methods with no :py:`return` statement. (:pr:`2439`)
  • Added a stub file containing |type hint annotations| for @wrapt.decorator. (:pr:`2442`)
  • Improved |type hint annotations| for plasmapy.particles.decorators, which includes |particle_input|, and the corresponding tests. (:pr:`2443`)
  • Dropped the |pre-commit| hook for isort and enabled all isort rules in |ruff|. (:pr:`2453`)
  • Added a :file:`py.typed` marker to indicate that PlasmaPy contains type hint annotations as per PEP 561. (:pr:`2473`)
  • Changed _nearest_neighbor_interpolator method in ~plasmapy.plasma.grids to interpolate quantities array instead of producing an intermediate index. (:pr:`2475`)
  • Enabled the sphinx linkchecker in quiet mode to make it easier to find problem links from the console output. (:pr:`2476`)
  • Bumped the minimum versions of dependencies to drop support for minor releases older than two years old. In particular, the minimum version of NumPy was bumped to 1.23.0. (:pr:`2488`)

PlasmaPy v2023.10.0 (2023-10-20)

Backwards Incompatible Changes

  • Renamed the plasmapy.dispersion.dispersionfunction module to plasmapy.dispersion.dispersion_functions. Both of plasma_dispersion_func and plasma_dispersion_func_deriv are temporarily still available, but will issue a ~plasmapy.utils.exceptions.PlasmaPyFutureWarning and will be removed in a subsequent release. (:pr:`2271`)
  • Removed the |lite-functions| for ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func and ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv. Instead, the performance of the original functions has been improved by using a :py:`try` and :py:`except` block instead of having multiple :py:`if` statements to check for preconditions. (:pr:`2361`)
  • Providing a real number to the charge parameter in |CustomParticle| will now result in a |InvalidParticleError| instead of a deprecation warning. Now, charge must be a |Quantity| with units of electrical charge. To express the charge as a multiple of the elementary charge, provide a real number to the Z parameter instead. (:pr:`2369`)

Features

  • Added the ~plasmapy.plasma.equilibria1d.HarrisSheet class to calculate magnetic field, current density, and plasma pressure for 1D Harris sheets. (:pr:`2068`)
  • Added module plasmapy.dispersion.analytical.mhd_waves_ with classes for storing and calculating parameters of magnetohydrodynamic waves. (:pr:`2206`)
  • Added the plasmapy.analysis.time_series.conditional_averaging module including the ~plasmapy.analysis.time_series.conditional_averaging.ConditionalEvents class for calculating the conditional average and variance of time series. (:pr:`2275`)
  • Added the ~plasmapy.plasma.cylindrical_equilibria.ForceFreeFluxRope class to calculate magnetic field for the Lundquist solution for force-free cylindrical equilibria. (:pr:`2289`)

Bug Fixes

  • Fixed a bug that had been causing incorrect results in ~plasmapy.formulary.collisions.helio.collisional_analysis.temp_ratio. (:pr:`2248`)
  • Enabled the time_step parameter in ~plasmapy.analysis.time_series.excess_statistics.ExcessStatistics class to be a |Quantity| with a unit. (:pr:`2300`)

Improved Documentation

Trivial/Internal Changes

  • Modernized :file:`MANIFEST.in`. (:pr:`2189`)
  • Applied automated refactorings from Sourcery. (:pr:`2219`)
  • Distributions defined in the ~plasmapy.formulary.distribution module will now raise a ValueError for an improper units parameter. (:pr:`2229`)
  • Added "decorators" section to the |coding guide|. (:pr:`2231`)
  • Improved the error message issued by ~plasmapy.formulary.speeds.Alfven_speed when the argument provided to density has a physical type of number density and ion is not provided. (:pr:`2262`)
  • Exposed plasmapy.dispersion.analytical and plasmapy.dispersion.numerical to the plasmapy.dispersion namespace. (:pr:`2271`)
  • Expanded the |ruff| settings to include more linter rules. (:pr:`2295`)
  • Add |ruff| linter rules that check for print and :py:`pprint`, as the logging library is generally preferred for production code. (:pr:`2296`)
  • Updated and corrected author information in :file:`CITATION.cff`. (:pr:`2307`)
  • Reduced the number of warnings emitted by plasmapy.particles during tests by decorating test functions with pytest.mark.filterwarnings. (:pr:`2314`)
  • Fixed a pytest deprecation warning that had been issued by plasmapy.utils._pytest_helpers/pytest_helpers.run_test so that None is no longer passed to the pytest.warns context manager. (:pr:`2314`)
  • Changed the default configuration for pytest so that if a test is marked as expected to fail actually passes, then that test will issue an error to indicate that the pytest.mark.xfail mark can be removed. (:pr:`2315`)
  • Added a weekly linkcheck test that verifies that hyperlinks in the documentation are up-to-date. (:pr:`2328`)
  • Enabled |validate_quantities| to accept annotations of the form :py:`u.Quantity[u.m]`, where we have previously run :py:`import astropy.units as u`. (:pr:`2346`)
  • Both ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func and ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv now allow |inf| and |nan| arguments without raising a ValueError. (:pr:`2361`)
  • Modified the ~plasmapy.particles.particle_class.CustomParticle.charge_number attribute of |CustomParticle| to return a real number rather than a dimensionless |Quantity|. (:pr:`2377`)
  • Made minor updates to :file:`plasmapy/__init__.py`, including to the top-level package docstring. (:pr:`2378`)
  • Improved the consistency and specificity of the names of various GitHub Actions. (:pr:`2379`)
  • Added a |pre-commit| hook to validate |GitHub Actions|. (:pr:`2380`)

PlasmaPy v2023.5.1 (2023-06-07)

Trivial/Internal Changes

  • Loosened the requirement on ipykernel for compatibility with Google Colab. (:pr:`2202`)

PlasmaPy v2023.5.0 (2023-05-31)

Backwards Incompatible Changes

  • The signature of ~plasmapy.formulary.relativity.relativistic_energy has changed. The parameter m has been replaced with particle, which now accepts a broader variety of |particle-like| arguments, including but not limited to a |Quantity| representing mass. The parameter v has been replaced with V for consistency with other functionality. (:pr:`1871`)
  • Changed the minimum required version of Python from 3.8 to 3.9. Accordingly, increased the minimum versions of numpy to 1.21.0, pandas to 1.2.0, h5py to 3.1.0, scipy to 1.6.0, voila to 0.3.0, and xarray to 0.17.0. (:pr:`1885`)
  • Made |ParticleList| raise a TypeError when provided with a string. This change was made to avoid potentially ambiguous situations like :py:`ParticleList("He")` which was previously equivalent to :py:`ParticleList(["H", "e"])` instead of the possibly expected value of :py:`ParticleList(["He"])`. (:pr:`1892`)
  • In ~plasmapy.dispersion.analytical.two_fluid_.two_fluid, ~plasmapy.dispersion.numerical.hollweg_.hollweg, and ~plasmapy.dispersion.numerical.kinetic_alfven_.kinetic_alfven in plasmapy.dispersion, providing the |charge number| as a keyword argument (now Z, formerly z_mean) will no longer override the charge number provided in ion. (:pr:`2022`, :pr:`2181`, :pr:`2182`)
  • |particle_input| no longer enforces that |parameters| named ionic_level are ions or neutral atoms. For equivalent behavior, name the parameter ion instead. (:pr:`2034`)
  • Removed plasmapy.utils.pytest_helpers from PlasmaPy's public API. It is still available as plasmapy.utils._pytest_helpers, but might be removed in the future. (:pr:`2114`)
  • Removed plasmapy.tests.helpers from PlasmaPy's public API. It is still available as plasmapy.tests._helpers, but might be removed in the future. (:pr:`2114`)
  • The ion_species |parameter| to ~plasmapy.formulary.radiation.thermal_bremsstrahlung has been renamed to ion in order to provide a more consistent API to functions that accept ions as arguments. (:pr:`2135`)

Deprecations and Removals

  • In plasmapy.dispersion, the z_mean parameter to ~plasmapy.dispersion.analytical.two_fluid_.two_fluid, ~plasmapy.dispersion.numerical.hollweg_.hollweg, and ~plasmapy.dispersion.numerical.kinetic_alfven_.kinetic_alfven has been deprecated. Provide the |charge number| to Z instead. (:pr:`2022`, :pr:`2181`, :pr:`2182`)
  • When a function decorated with |particle_input| is provided with z_mean as a keyword |argument|, it will change z_mean to Z and issue a ~plasmapy.utils.exceptions.PlasmaPyDeprecationWarning if the decorated function accepts Z as a parameter. This capability is intended to temporarily preserve the current behavior of several functions in plasmapy.dispersion and plasmapy.formulary as they get decorated with |particle_input| over the next few releases. (:pr:`2027`)
  • The z_mean parameter to ~plasmapy.formulary.speeds.ion_sound_speed and ~plasmapy.formulary.speeds.Alfven_speed has been deprecated and may be removed in a future release. Use Z instead. (:pr:`2134`, :pr:`2179`)

Features

  • Added ~plasmapy.dispersion.numerical.kinetic_alfven_.kinetic_alfven, which numerically solves dispersion relations for kinetic Alfvén waves. (:pr:`1665`)
  • Added the :file:`stix_dispersion.ipynb` notebook which contains Stix cold-plasma dispersion examples. (:pr:`1693`)
  • Added the ~plasmapy.formulary.frequencies.Buchsbaum_frequency function. (:pr:`1828`)
  • Decorated ~plasmapy.formulary.frequencies.gyrofrequency with |particle_input| so that it can accept a broader variety of |particle-like| arguments. (:pr:`1869`)
  • After having been decorated with |particle_input|, the ~plasmapy.formulary.relativity.relativistic_energy function now accepts a broader variety of |particle-like| objects rather than only |Quantity| objects representing mass. (:pr:`1871`)
  • After having been decorated with |particle_input|, |RelativisticBody| now accepts a broader variety of |particle-like| objects. (:pr:`1871`)
  • Enabled |particle_input| to accept values of the |charge number| that are real numbers but not integers. This capability can now be used by many of the functions in plasmapy.formulary and elsewhere that are decorated with |particle_input|. (:pr:`1884`)
  • Decorated ~plasmapy.particles.atomic.reduced_mass with |particle_input| so that it can now accept a broader variety of |particle-like| arguments. (:pr:`1921`)
  • Added the plasmapy.analysis.time_series.excess_statistics module including the ~plasmapy.analysis.time_series.excess_statistics.ExcessStatistics class for calculating excess statistics of time series. (:pr:`1984`)
  • Added plasmapy.formulary.collisions.helio.collisional_analysis. (:pr:`1986`)
  • Enabled |ParticleList| to accept |Quantity| objects of physical type mass or electrical charge. (:pr:`1987`)
  • The following functions have been decorated with |particle_input| and now accept a broader variety of |particle-like| arguments (see also :issue:`341`):
    • ~plasmapy.dispersion.analytical.two_fluid_.two_fluid (:pr:`2022`)
    • ~plasmapy.formulary.frequencies.plasma_frequency (:pr:`2026`)
    • ~plasmapy.formulary.speeds.ion_sound_speed (:pr:`2134`)
    • ~plasmapy.formulary.speeds.kappa_thermal_speed (:pr:`2136`)
    • ~plasmapy.formulary.speeds.Alfven_speed (:pr:`2179`)
    • ~plasmapy.dispersion.numerical.hollweg_.hollweg (:pr:`2181`)
    • ~plasmapy.dispersion.numerical.kinetic_alfven_.kinetic_alfven (:pr:`2182`)
  • Refactored ~plasmapy.formulary.lengths.gyroradius to reduce cognitive complexity and increase readability. (:pr:`2031`)
  • Added mass_numb and Z as parameters to functions decorated with |particle_input| in plasmapy.formulary.lengths and plasmapy.formulary.distribution. (:pr:`2140`)

Bug Fixes

  • When attempting to create a |Particle| object representing a proton, calls like :py:`Particle("H", Z=1, mass_numb=1)` no longer incorrectly issue a |ParticleWarning| for redundant particle information. (:pr:`1992`)
  • Updated the docstring of ~plasmapy.dispersion.numerical.kinetic_alfven_.kinetic_alfven. (:pr:`2016`)
  • Fixed a slight error in ~plasmapy.formulary.frequencies.plasma_frequency and ~plasmapy.formulary.speeds.Alfven_speed when the charge number was provided via z_mean (or now Z) and inconsistent with the charge number provided to particle (or zero, if particle represented an element or isotope with no charge information. Previously, if we represented a proton with :py:`particle="H-1"` and :py:`z_mean=1`, then the mass used to calculate the plasma frequency would have been the mass of a neutral hydrogen atom rather than the mass of a proton. However, using :py:`particle="p+"` would have produced the correct mass. This behavior has been corrected by decorating this function with |particle_input|. See also :issue:`2178` and :pr:`2179`. (:pr:`2026`)
  • The plasmapy.analysis.nullpoint._vector_space function now returns a list for its delta values instead of an array. (:pr:`2133`)

Improved Documentation

Trivial/Internal Changes

  • Included Python 3.11 in continuous integration tests. (:pr:`1775`)
  • Turned the root-level :file:`requirements.txt` into a lockfile for continuous integration purposes. (:pr:`1864`)
  • Enabled the particle creation factory in plasmapy.particles._factory used by |particle_input| to create |CustomParticle| instances of an element or isotope with a |charge number| that is a real number but not an integer. (:pr:`1884`)
  • Implemented the new private |CustomParticle| constructor from :pr:`1881` into the private particle creation factory used by |particle_input|. (:pr:`1884`)
  • Dropped dlint from the tests requirements, as it is no longer being maintained. (:pr:`1906`)
  • Modified |particle_input| to allow |CustomParticle|-like objects with a defined charge to be passed through to decorated functions when a |parameter| to that function annotated with |ParticleLike| is named ion. Previously, only |Particle| objects representing ions or neutral atoms were allowed to pass through when the parameter was named ion. (:pr:`2034`)
  • Updated package metadata in :file:`pyproject.toml`. (:pr:`2075`)
  • Set minimum versions for all explicitly listed dependencies. (:pr:`2075`)
  • Enabled and applied changes for additional rule sets for ruff, and removed corresponding flake8 extensions. (:pr:`2080`)
  • Changed from indexserver to PIP_INDEX_URL to index nightly numpy builds (:pr:`2138`)
  • Updated the function and docstring of ~plasmapy.formulary.collisions.helio.collisional_analysis. (:pr:`2151`)
  • Dropped flake8 and its extensions as linters. Instead, |ruff| is now used as the primary linter. (:pr:`2170`)
  • Expanded the variety of arguments that could be provided to a function decorated by ~plasmapy.utils.decorators.converter.angular_freq_to_hz, and refactored this decorator to use wrapt. (:pr:`2175`)

PlasmaPy v2023.1.0 (2023-01-13)

Backwards Incompatible Changes

  • Moved the charged particle radiography analysis codes into a new module ~plasmapy.diagnostics.charged_particle_radiography containing synthetic radiography tools in ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography and detector stack calculation tools in ~plasmapy.diagnostics.charged_particle_radiography.detector_stacks. (:pr:`1274`)
  • Changed the ~plasmapy.formulary.lengths.gyroradius function so that it takes relativistic effects into account by default. (:pr:`1813`)

Deprecations and Removals

  • Changed the ~plasmapy.formulary.lengths.gyroradius function so it no longer accepts deprecated T_i. (:pr:`1824`)
  • Removed plasmapy.formulary.parameters, which was deprecated in the 0.7.0 release. The functionality in that module had previously been migrated to modules that are broken down by physical type, such as: plasmapy.formulary.densities, plasmapy.formulary.dimensionless, plasmapy.formulary.frequencies, plasmapy.formulary.lengths, plasmapy.formulary.misc, and plasmapy.formulary.speeds. (:pr:`1833`)
  • Deprecated providing a real number to the charge parameter of |CustomParticle| to represent the |charge number|. Use Z instead. (:pr:`1866`)

Features

  • Added the ~plasmapy.diagnostics.charged_particle_radiography.detector_stacks.Stack and |Layer| objects to the ~plasmapy.diagnostics.charged_particle_radiography module, which represent a stack of detector media layers. The ~plasmapy.diagnostics.charged_particle_radiography.detector_stacks.Stack.deposition_curves and ~plasmapy.diagnostics.charged_particle_radiography.detector_stacks.Stack.energy_bands methods of ~plasmapy.diagnostics.charged_particle_radiography.detector_stacks.Stack calculate the particle energies deposited in each detector layer. (:pr:`1274`)
  • ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiography.Tracker now supports multiple field grids, provided as an iterable. (:pr:`1799`)
  • Added the plasmapy.analysis.time_series.running_moments module including two functions for calculating running moments of time series. (:pr:`1803`)
  • Added lorentzfactor as an optional keyword-only argument to ~plasmapy.formulary.lengths.gyroradius. Also added relativistic as an optional keyword-only argument which can be set to False for the non-relativistic approximation. (:pr:`1813`)
  • Modified |Particle| attributes to return |nan| in the appropriate units when undefined rather than raising exceptions. (:pr:`1825`)
  • Added the ~plasmapy.particles.particle_class.CustomParticle.charge_number attribute to |CustomParticle|. (:pr:`1866`)
  • Added Z as a |keyword-only| |parameter| representing the |charge number| to |CustomParticle|. (:pr:`1866`)

Improved Documentation

Trivial/Internal Changes

PlasmaPy v0.9.0 (2022-11-11)

Backwards Incompatible Changes

  • Removed the none_shall_pass parameter from |particle_input|. Instead, typing.Optional should be used to create the annotation (e.g., Optional[ParticleLike]). (:pr:`1057`)
  • Renamed the first |parameter| of |particle_input| from wrapped_function to wrapped. (:pr:`1057`)
  • Refactored the return pattern of ~plasmapy.analysis.swept_langmuir.floating_potential.find_floating_potential to follow the (vf, extras) pattern, where vf is the computed floating potential and extras is an instance of ~plasmapy.analysis.swept_langmuir.floating_potential.VFExtras containing extra parameters from the computation. (:pr:`1565`)
  • Moved plasmapy.particles.particle_collections.ionic_levels to plasmapy.particles.atomic.ionic_levels. (:pr:`1697`)
  • Deprecated plasmapy.formulary.collisions.fundamental_electron_collision_freq. The ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies.Maxwellian_avg_ei_collision_freq attribute of ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies should be used instead. (:pr:`1703`)
  • Deprecated plasmapy.formulary.collisions.fundamental_ion_collision_freq. The ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies.Maxwellian_avg_ii_collision_freq attribute of ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies should be used instead. (:pr:`1703`)
  • The parameters Z and mass_numb are now |keyword-only| for ~plasmapy.particles.symbols.ionic_symbol and ~plasmapy.particles.symbols.particle_symbol. (:pr:`1718`)
  • Moved the valid_categories attribute of ~plasmapy.particles.particle_class.AbstractPhysicalParticle.is_category to plasmapy.particles.particle_class.valid_categories. (:pr:`1720`)
  • Changed the behavior of |IonicLevel|, |IonizationState|, and |IonizationStateCollection| so that an equality comparison with an object of a different type returns False instead of raising a TypeError. (:pr:`1721`)
  • When the argument provided to ~plasmapy.formulary.magnetostatics.GeneralWire is not callable, a TypeError will be raised instead of a ValueError. (:pr:`1782`)
  • In ~plasmapy.diagnostics.thomson.spectral_density and ~plasmapy.diagnostics.thomson.spectral_density_model, a TypeError is now raised when ions is an unsupported type. (:pr:`1782`)
  • In ~plasmapy.plasma.grids.AbstractGrid, a TypeError is now raised instead of a ValueError when start or stop are not of the appropriate type. (:pr:`1783`)

Deprecations and Removals

  • The capability of |particle_input| to process arguments annotated with |Particle| or (Particle, Particle) is now deprecated and will be removed in a future release. Use |ParticleLike| as an annotation instead. (:pr:`1057`)
  • The integer_charges attribute of |IonizationState| has been removed after being deprecated in v0.7.0. Use ~plasmapy.particles.ionization_state.IonizationState.charge_numbers instead. (:pr:`1633`)
  • The integer_charge attributes of |Particle| and |IonicLevel| have been removed after being deprecated in v0.7.0. Use the charge_number attribute instead. (:pr:`1633`)
  • The plasmapy.particles.atomic.integer_charge function has been removed after being deprecated in v0.7.0. Use ~plasmapy.particles.atomic.charge_number instead. (:pr:`1633`)
  • Deprecated plasmapy.formulary.collisions.frequencies.collision_frequency in favor of collision frequency classes in plasmapy.formulary.collisions. See also :pr:`1703`. (:pr:`1676`)

Features

  • Expanded the functionality of the |particle_input| decorator to convert |particle-like| and |particle-list-like| arguments into |Particle|, |CustomParticle|, and |ParticleList| objects. This change is part of an ongoing effort to improve compatibility of functions in subpackages like plasmapy.particles and plasmapy.formulary with |CustomParticle| and |ParticleList| objects. (:pr:`1057`)
  • Added the ~plasmapy.analysis.swept_langmuir.ion_saturation_current.find_ion_saturation_current function to the ~plasmapy.analysis.swept_langmuir module. The function fits the tail of a swept Langmuir probe trace and returns the linear fit corresponding to the ion-saturation current. (:pr:`1469`)
  • Created plasmapy.utils.data to contain functionality for downloading data from |PlasmaPy's data repository|. This module contains a new prototype function plasmapy.utils.data.downloader.get_file which downloads a file from the repository. (:pr:`1486`)
  • Added the |RelativisticBody| class to facilitate calculation of the relativistic properties of a body in motion. (:pr:`1540`)
  • Added inplace as an optional argument to ~plasmapy.simulation.particle_integrators.boris_push. (:pr:`1556`)
  • Added a function to calculate the dimensionless Lundquist number. (:pr:`1642`)
  • Created the plasmapy.formulary.densities module. (:pr:`1664`)
  • Added ~plasmapy.formulary.densities.critical_density to calculate the critical density of a plasma for a given frequency of radiation. (:pr:`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 :pr:`1703`. (:pr:`1676`)
  • Reimplemented ~plasmapy.formulary.quantum.chemical_potential. (:pr:`1678`)
  • Allowed ~plasmapy.formulary.relativity.Lorentz_factor to accept and return |nan| values. (:pr:`1681`)
  • Added a test for ~plasmapy.formulary.dimensionless.Hall_parameter in :file:`plasmapy/formulary/test/test_dimensionless.py`. (:pr:`1689`)
  • Replaced usage of os.path with the more modern pathlib. (:pr:`1690`)
  • Replaced pkg_resources with the more modern importlib.metadata. (:pr:`1692`)
  • Added the ~plasmapy.particles.particle_class.CustomParticle.categories attribute to |CustomParticle|, and added the "custom" particle category. (:pr:`1700`)
  • Moved the is_category method of |Particle| to ~plasmapy.particles.particle_class.AbstractPhysicalParticle. This method is now inherited by both |Particle| and |CustomParticle|. (:pr:`1700`)
  • Added ~plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies for calculating relevant collision frequencies for Maxwellian populations. (:pr:`1703`)
  • Refactored ~plasmapy.formulary.collisions. The file :file:`collisions.py` was converted into a subpackage (directory) and it's contents was split into appropriately categorized and named sub-modules (files). (:pr:`1769`)

Bug Fixes

  • Modified tests in the class TestSyntheticRadiograph to try to fix an intermittent failure of test_optical_density_histogram. (:pr:`1685`)

Improved Documentation

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 inside |particle_input|. (:pr:`1057`)
  • Added wrapt as a dependency. (:pr:`1057`)
  • The |particle_input| decorator now processes arguments annotated with |ParticleLike|. (:pr:`1057`)
  • Added tomli to the tests category of requirements. (:pr:`1500`)
  • Added tests to verify that the requirements given in the :file:`.txt` files in the :file:`requirements` directory are consistent with the requirements given in :file:`setup.cfg` and :file:`pyproject.toml`. (:pr:`1500`)
  • Restricted the required version of sphinx-gallery to < 0.11.0, since sphinx-gallery changed their thumbnail containers to flex containers. See pull request sphinx-gallery/#906 and issue sphinx-gallery/#905 for more detail. (:pr:`1654`)
  • Moved the plasmapy.formulary.dimensionless.quantum_theta function to plasmapy.formulary.quantum.quantum_theta. This function can still be called from the plasmapy.formulary.dimensionless module without issue. (:pr:`1671`)
  • Reimplemented plasmapy.formulary.quantum._chemical_potential_interp. (:pr:`1678`)
  • Re-enabled value testing for the quantum keyword argument in ~plasmapy.formulary.collisions.dimensionless.coupling_parameter. (:pr:`1678`)
  • Increased the minimum version of |NumPy| to 1.20.0. (:pr:`1694`)
  • Added the ~plasmapy.utils.decorators.validators.validate_class_attributes decorator to the ~plasmapy.utils.decorators module. This decorator is useful for class methods that require optional parameters to be specified during class instantiation. (:pr:`1703`)
  • Made minor improvements to plasmapy.formulary.collisions.CollisionFrequencies. (:pr:`1705`)
  • Changed the |towncrier| requirement to >= 19.2.0, < 22.8.0. Superseded by :pr:`1717`. (:pr:`1710`)
  • Applied automated refactorings from Sourcery. (:pr:`1714`)
  • Changed the minimum version of |towncrier| to 22.8.0 and the minimum version of |sphinx_changelog|_ to 1.2.0. (:pr:`1717`)
  • Changed ~plasmapy.formulary.quantum.chemical_potential to use the :wikipedia:`Broyden-Fletcher-Goldfarb-Shanno algorithm` to implicitly solve for the ideal chemical potential. (:pr:`1726`)
  • Increased the minimum version of |Astropy| to 5.0.1. (:pr:`1727`)
  • Simplified the pull request template. (:pr:`1729`)
  • Added a GitHub Action to automatically comment on pull requests with a code review checklist. (:pr:`1729`)
  • The following functions are now decorated by |particle_input|: ~plasmapy.formulary.dimensionless.Hall_parameter, ~plasmapy.formulary.distribution.kappa_velocity_1D, ~plasmapy.formulary.distribution.kappa_velocity_3D, ~plasmapy.formulary.distribution.Maxwellian_1D, ~plasmapy.formulary.distribution.Maxwellian_velocity_2D, ~plasmapy.formulary.distribution.Maxwellian_velocity_3D, ~plasmapy.formulary.distribution.Maxwellian_speed_1D, ~plasmapy.formulary.distribution.Maxwellian_speed_2D, ~plasmapy.formulary.distribution.Maxwellian_speed_3D, ~plasmapy.formulary.lengths.gyroradius, and ~plasmapy.formulary.quantum.deBroglie_wavelength. (:pr:`1732`)
  • Changed |particle_input| to raise a ~astropy.units.UnitConversionError when the annotated argument has a physical type other than mass or electrical charge. (:pr:`1732`)
  • Set up issue forms on |PlasmaPy's GitHub repository| to replace issue templates. (:pr:`1733`)
  • Made pytest an install requirement instead of a testing requirement. (:pr:`1749`)
  • Added a step to validate :file:`CITATION.cff` as part of the linters |tox| testing environment. (:pr:`1771`)
  • Added cffconvert to the testing requirements. (:pr:`1771`)
  • Deleted :file:`codemeta.json`, which recorded project metadata using the CodeMeta metadata schema. Instead, project metadata is now stored in :file:`CITATION.cff` which uses the `Citation File Format`_ and was created in :pr:`1640`. See also :pr:`676` and :issue:`794`. (:pr:`1772`)
  • Added the flake8 extensions flake8-use-pathlib, flake8-builtins, and flake8-comments to the testing requirements. (:pr:`1777`)
  • Added tryceratops as a flake8 extension. (:pr:`1782`)

PlasmaPy 0.8.1 (2022-07-05)

Backwards Incompatible Changes

  • In ~plasmapy.diagnostics.thomson.spectral_density, the arguments Te and Ti have been renamed T_e and T_i and are now required :term:`keyword-only` arguments. (#974)
  • Moved the grid_resolution attribute from ~plasmapy.plasma.grids.AbstractGrid to ~plasmapy.plasma.grids.CartesianGrid and ~plasmapy.plasma.grids.NonUniformCartesianGrid 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 of |CustomParticle| 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 to plasmapy.particles._special_particles) was executed. (#1440)
  • Renamed plasmapy.particles.elements to plasmapy.particles._elements, plasmapy.particles.isotopes to plasmapy.particles._isotopes, plasmapy.particles.parsing to plasmapy.particles._parsing, and plasmapy.particles.special_particles to plasmapy.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 for plasmapy.particles.special_particles.ParticleZoo which was renamed to plasmapy.particles._special_particles.particle_zoo and removed from the public API. (#1440)
  • The parameters Z and mass_numb to |Particle| are now :term:`keyword-only`. (#1456)

Deprecations and Removals

  • Officially deprecated plasmapy.formulary.parameters and scheduled its permanent removal for the v0.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 install plasmapy 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 running pip install plasmapy. To install all packages required for code development of PlasmaPy, instead run pip install plasmapy[developer]. (#1482)
  • Removed plasmapy.optional_deps. (#1482)

Features

  • ~plasmapy.diagnostics.thomson.spectral_density and ~plasmapy.diagnostics.thomson.spectral_density_model now support ~plasmapy.particles.particle_collections objects as input to the ions keywords. (#974)
  • Created a :term:`lite-function` for ~plasmapy.diagnostics.thomson.spectral_density, ~plasmapy.diagnostics.thomson.spectral_density_lite. (#974)
  • Added a fitting function for 1D spectra, ~plasmapy.diagnostics.thomson.spectral_density_model, to the Thomson scattering diagnostic module. (#974)
  • Created function plasmapy.formulary.parameters.thermal_speed_coefficients to support plasmapy.formulary.parameters.thermal_speed_lite usage by calculating the various thermal speed coefficients. plasmapy.formulary.parameters.thermal_speed_coefficients is also bound to plasmapy.formulary.parameters.thermal_speed as the coefficients attribute. (#1145)
  • Created decorator ~plasmapy.utils.decorators.lite_func.bind_lite_func for handling the binding of :term:`lite-functions` and any supporting functions to a parent function. (#1145)
  • Introduced the concept of :term:`lite-functions`, by creating the lite-function plasmapy.formulary.parameters.thermal_speed_lite, which is a simplified and |Numba| jitted version of plasmapy.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 to plasmapy.formulary.parameters.thermal_speed as the lite attribute. (#1145)
  • Added the :file:`hollweg_.py` module to the ~plasmapy.dispersion.numerical subpackage to numerically solve the dispersion relation using Hollweg's method :cite:p:`hollweg:1999,bellan:2012`. (#1189)
  • Implemented non-breaking speed improvements on the methods ~plasmapy.plasma.grids.CartesianGrid.nearest_neighbor_interpolator and ~plasmapy.plasma.grids.CartesianGrid.volume_averaged_interpolator for ~plasmapy.plasma.grids.CartesianGrid. 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 ~plasmapy.plasma.grids. All interpolators are now defined in the subclasses of ~plasmapy.plasma.grids.AbstractGrid. Calling the interpolator methods on ~plasmapy.plasma.grids.AbstractGrid raises a NotImplementedError exception. (#1295)
  • Created :term:`lite-function` plasmapy.formulary.parameters.plasma_frequency_lite. (#1308)
  • Added the ~plasmapy.particles.particle_class.molecule function to build |CustomParticle| objects from a str representing a molecule symbol. (#1309)
  • Added the ~plasmapy.particles.particle_collections.ParticleList.is_category method for |ParticleList| objects. This method is analogous to the ~plasmapy.particles.particle_class.Particle.is_category method for |Particle| 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 :cite:t:`haynes:2007`. (#1383)
  • Created plasmapy.formulary.lengths to contain length related plasma parameters, and migrated ~plasmapy.formulary.lengths.Debye_length, ~plasmapy.formulary.lengths.gyroradius, and ~plasmapy.formulary.lengths.inertial_length from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1434)
  • Created plasmapy.formulary.frequencies to contain frequency related plasma parameters, and migrated ~plasmapy.formulary.frequencies.gyrofrequency, ~plasmapy.formulary.frequencies.plasma_frequency, ~plasmapy.formulary.frequencies.plasma_frequency_lite, ~plasmapy.formulary.frequencies.lower_hybrid_frequency, and ~plasmapy.formulary.frequencies.upper_hybrid_frequency from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1439)
  • Migrated ~plasmapy.formulary.dimensionless.Debye_number, and ~plasmapy.formulary.dimensionless.Hall_parameter from plasmapy.formulary.parameters to plasmapy.formulary.dimensionless. Related aliases were also migrated. (#1444)
  • Created plasmapy.formulary.speeds to contain frequency related plasma parameters, and migrated ~plasmapy.formulary.speeds.Alfven_speed, ~plasmapy.formulary.speeds.ion_sound_speed, ~plasmapy.formulary.speeds.kappa_thermal_speed, ~plasmapy.formulary.speeds.thermal_speed, ~plasmapy.formulary.speeds.thermal_speed_coefficients, and ~plasmapy.formulary.speeds.thermal_speed_lite from plasmapy.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, ~plasmapy.formulary.misc.Bohm_diffusion, ~plasmapy.formulary.misc.magnetic_energy_density, ~plasmapy.formulary.misc.magnetic_pressure, ~plasmapy.formulary.misc.mass_density, and ~plasmapy.formulary.misc.thermal_pressure from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1453)
  • Created :term:`lite-functions` ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_lite and ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv_lite for ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func and ~plasmapy.dispersion.dispersion_functions.plasma_dispersion_func_deriv respectively. (#1473)
  • Created :term:`lite-function` plasmapy.formulary.dielectric.permittivity_1D_Maxwellian_lite for plasmapy.formulary.dielectric.permittivity_1D_Maxwellian. (#1476)
  • Added the :file:`stix_.py` module to the ~plasmapy.dispersion.analytical subpackage which contains the Stix cold-plasma dispersion solution :func:`~plasmapy.dispersion.analytical.stix_.stix`, :cite:p:`stix:1992,bellan:2012`. (#1511)
  • Particle("Li").ionize() no longer results in a ~plasmapy.particles.exceptions.ChargeError. Instead, ionization of a neutral atom is assumed. (#1514)
  • Created the |ParticleListLike| typing construct and added :term:`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 of ~plasmapy.plasma.grids.AbstractGrid that would fail to smoothly handle invalid user input if the start, stop, or num keywords were not the correct type. (#1295)
  • Fixed a bug with |Particle| where Particle("p+") == Particle("H", Z=1, mass_numb=1) led to a |ParticleError|. (#1366)
  • For plasmapy.formulary.parameters.gyroradius, updated the default keyword arguments and conditional for issuing the ~plasmapy.utils.exceptions.PlasmaPyFutureWarning. This addresses the incorrect behavior where a ValueError is raised if an array is passed to the deprecated keyword T_i. (#1430)
  • Exposed plasmapy.formulary.misc to the plasmapy.formulary namespace. (#1471)
  • Replaced misuse of max_exp_bias - max_exp_bias with max_exp_bias - min_exp_bias when creating seed parameters for the bimaxwellian fit function inside :func:`~plasmapy.diagnostics.langmuir.get_electron_temperature`. (#1487)
  • Corrected the improper inversion of the electron temperature for the non-bimaxwellian case for :func:`~plasmapy.diagnostics.langmuir.get_electron_temperature`. The electron temperature, and not the slope, is a fit parameter of the curve used by :func:`~plasmapy.diagnostics.langmuir.get_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 ~plasmapy.analysis and ~plasmapy.dispersion subpackages to the plasmapy namespace. (#1512)
  • Changed the :meth:`~plasmapy.analysis.fit_functions.Linear.curve_fit` method on plasmapy.analysis.fit_functions.Linear so that the arbitrary keyword arguments get passed to scipy.stats.linregress. Previously, :meth:`~plasmapy.analysis.fit_functions.Linear.curve_fit` had accepted arbitrary keyword arguments but did not pass them along to ~scipy.stats.linregress. (#1518)
  • Fixed a bug in :func:`~plasmapy.dispersion.numerical.hollweg_.hollweg` that did not allow for arguments theta and k to simultaneously be arrays. (#1529)
  • Fixed the Z dependence in ~plasmapy.formulary.collisions.frequencies.fundamental_electron_collision_freq, by replacing n_e with n_i while calling ~plasmapy.formulary.collisions.frequencies.collision_frequency. (#1546)
  • Updated the regular expression matching used by ~plasmapy.particles.particle_class.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 the plasmapy.formulary namespace. (#1572)

Improved Documentation

Trivial/Internal Changes

  • Streamlined ~plasmapy.utils.decorators.helpers.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 :file:`plasmapy/formulary/tests/test_parameters.py` to :file:`plasmapy/formulary/tests/test_thermal_speed.py`. (#1145)
  • Applied |reStructuredText| substitutions for plasmapy.particles and |ParticleTracker| 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 to |Particle|, |CustomParticle|, or |ParticleList| 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| and |DimensionlessParticle| no longer emit a warning when the charge and/or mass is not provided and got assigned a value of |nan| 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., ParticleZooClassParticleZoo, ParticleZooparticle_zoo, and Particlesparticles). (#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 to 3.0.0. (#1465)
  • Changed the raised exception to ImportError (from a general Exception) when attempting to import plasmapy 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 named ~plasmapy.analysis.nullpoint.null_point_find and plasmapy.analysis.nullpoint.uniform_null_point_find. ~plasmapy.analysis.nullpoint.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 to 1.19.0, pandas to 1.0.0, pytest to 5.4.0, scipy to 1.5.0, and |xarray| to 0.15.0. (#1482)
  • Moved |h5py|, |lmfit|, |mpmath|, and |Numba| out of the extras requirements category and into the install requirements category. These packages are now installed when running pip install plasmapy. (#1482)
  • Added dlint, flake8, flake8-absolute-import, flake8-rst-docstrings, flake8-use-fstring, |pydocstyle|, and pygments into the tests requirements category and |pre-commit| into the extras requirements category. These dependencies are not required for basic installation with |pip|. (#1482)
  • Updated :file:`docs/environment.yml` to use |pip| to install all requirements specified by :file:`requirements.txt` when creating a Conda environment. (#1482)
  • Used codespell to fix typos. (#1493)
  • Used contextlib.suppress to suppress exceptions, instead of try & except blocks. (#1494)
  • Added a |pre-commit| hook that transforms relative imports to absolute imports, except in :file:`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 :file:`plasmapy/utils/units_definitions.py` to precompute units which were applied to optimize functionality in :file:`plasmapy/formulary/distribution.py`. (#1531)
  • Replaced except Exception clauses in formulary, particles, and utils with specific exception statements. (#1541)
  • Added tests for passing array valued k and theta arguments to :func:`~plasmapy.dispersion.numerical.hollweg_.hollweg`, which was an added feature in :pr:`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 from ~plasmapy.formulary.collisions.frequencies.frequencies.collision_frequency that activated when the colliding particles were both electrons. (#1570)
  • Changed the type hints for z_mean in plasmapy.formulary.collisions functions from astropy.units.dimensionless_unscaled to ~numbers.Real. Consequently, z_mean will no longer be processed by ~plasmapy.utils.decorators.validators.validate_quantities. Previously, z_mean issued a warning when a real number was provided instead of a dimensionless |Quantity|. (#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 ** ba**b). (#1582)
  • Renamed units_definitions to _units_definitions and units_helpers to _units_helpers in plasmapy.utils to mark these modules as private. (#1587)
  • Updated the :file:`codemeta.json` file with metadata for the version 0.8.1 release. (#1606)

PlasmaPy v0.7.0 (2021-11-18)

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 |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)
  • Use 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

  • Add 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 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 \mathbf{E} \times \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)

PlasmaPy v0.6.0 (2021-03-14)

Backwards Incompatible Changes

  • The State namedtuple was changed to the ~plasmapy.particles.IonicFraction class. (Note: #1046 subsequently changed that to ~plasmapy.particles.IonicLevel). (#796)
  • Now, when the ~plasmapy.particles.IonizationState class is provided with an ion, the ionic fraction for that ion is set to 100% for the corresponding element or isotope. (#796)
  • AtomicError was renamed to ~plasmapy.particles.exceptions.ParticleError and MissingAtomicDataError was renamed to ~plasmapy.particles.exceptions.MissingParticleDataError. (#796)
  • In plasmapy.particles, the IonizationStates class was renamed to ~plasmapy.particles.IonizationStateCollection. Argument n of IonizationStates was changed to n0 in ~plasmapy.particles.IonizationStateCollection. (#796)
  • Moved and refactored error message formatting functionality from plasmapy.utils.error_messages to plasmapy.utils.code_repr. (#920)
  • Renamed the available "methods" for computing the Coulomb logarithm in an attempt to make the names more explicit. This is implemented using the method keyword for functions ~plasmapy.formulary.collisions.coulomb.Coulomb_logarithm and ~plasmapy.formulary.collisions.lengths.impact_parameter, and then propagated throughout the functionality in plasmapy.formulary.collisions. (#962)
  • Add dependency pandas >= 1.0.0. Modify |xarray| dependency to be xarray >= 0.14.0. (#963)
  • The ~plasmapy.plasma.grids.AbstractGrid property ~plasmapy.plasma.grids.AbstractGrid.grid is now dimensioned (has units) and cannot be accessed if all dimensions do not share the same units. (#981)
  • Renamed attribute is_uniform_grid on ~plasmapy.plasma.grids.AbstractGrid to is_uniform. (#981)
  • Drop Python 3.6 support. (#987)
  • The __getitem__ method of ~plasmapy.plasma.grids.AbstractGrid now returns a ~astropy.units.Quantity array instead of a reference to a xarray.DataArray. (#1027)
  • Renamed IonicFraction to ~plasmapy.particles.ionization_state.IonicLevel. This lays groundwork for future changes, where that class is going to become more than a fraction. (#1046)

Deprecations and Removals

  • The particle attribute of ~plasmapy.particles.particle_class.Particle has been deprecated in favor of the new symbol attribute. The particle attribute now issues a FutureWarning to indicate that it will be removed in a future release. (#984)

Features

  • Created the ~plasmapy.simulation.abstractions.AbstractNormalizations class to serve as an abstract interface for future classes that represent normalizations. (#859)
  • Create the analysis sub-package plasmapy.analysis.swept_langmuir for analysis code related to analyzing swept Langmuir traces. Sub-package is initiated with functionality for calculating the floating potential, ~plasmapy.analysis.swept_langmuir.floating_potential.find_floating_potential. (#889)
  • Added a proton radiography diagnostic module containing a tool for generating synthetic proton radiographs from simulated or calculated fields using a particle tracking algorithm. (#895)
  • Created new grid objects for representing plasma quantities as functions of space. (#909)
  • Added functions in plasmapy.utils.code_repr to reproduce strings that represent a call to a method or attribute of an object. These functions are used, for example, in error messages. (#920)
  • Add the function :func:`~plasmapy.dispersion.two_fluid_dispersion.two_fluid_dispersion_solution` to plasmapy.dispersion, which gives an analytical solution to the dispersion relation as derived by P. M. Bellan 2012 (DOI: 10.1029/2012JA017856). (#932)
  • Refactor out the ~plasmapy.simulation.particle_integrators.boris_push tracking integrator algorithm from plasmapy.simulation.particletracker.ParticleTracker. (#953)
  • For plasmapy.plasma.grids functionality, add better support for recognizing and handling physical quantities (e.g. spatial position, magnetic field, etc.) added to a grid object. (#963)
  • For plasmapy.plasma.grids functionality, improve interpolation performance on non-uniform grids. (#963)
  • Added the ~plasmapy.formulary.drifts.diamagnetic_drift function to ~plasmapy.formulary.drifts. (#966)
  • Add properties ~plasmapy.plasma.grids.AbstractGrid.grid_resolution and ~plasmapy.plasma.grids.AbstractGrid.quantities to ~plasmapy.plasma.grids.AbstractGrid. (#981)
  • Make several speed improvements to the functionality in ~plasmapy.plasma.grids, including the addition of keyword persistent to ~plasmapy.plasma.grids.AbstractGrid (and child class) methods ~plasmapy.plasma.grids.AbstractGrid.nearest_neighbor_interpolator and ~plasmapy.plasma.grids.AbstractGrid.volume_averaged_interpolator. This keyword allows the interpolators to assume the last grid setup and contents if input arguments have not changed. (#981)
  • Add methods ~plasmapy.plasma.grids.AbstractGrid.on_grid and ~plasmapy.plasma.grids.AbstractGrid.vector_intersects to ~plasmapy.plasma.grids.AbstractGrid. (#981)
  • The ~plasmapy.particles.particle_class.Particle class now contains an attribute named symbol that is intended to replace particle. The symbol attribute has been added as a property to ~plasmapy.particles.particle_class.AbstractParticle, ~plasmapy.particles.particle_class.CustomParticle, and ~plasmapy.particles.particle_class.DimensionlessParticle. (#984)
  • Added new can_be_zero check parameter to ~plasmapy.utils.decorators.checks.CheckValues and its dependents ( ~plasmapy.utils.decorators.checks.check_values, ~plasmapy.utils.decorators.validators.ValidateQuantities, ~plasmapy.utils.decorators.validators.validate_quantities). (#999)
  • Both plasmapy.particles.CustomParticle and plasmapy.particles.DimensionlessParticle now allow users to define a custom symbol via the symbol keyword argument, which can then be accessed by the symbol attribute in each of these classes. (#1015)
  • The greater than (>) operator can now be used between ~plasmapy.particles.Particle and/or ~plasmapy.particles.ParticleList instances to get the nuclear reaction energy. (#1017)
  • Create plasmapy.particles.ParticleList as a list-like collection for instances of plasmapy.particles.Particle and plasmapy.particles.CustomParticle. Adding ~plasmapy.particles.Particle and/or ~plasmapy.particles.CustomParticle instances will now create a ~plasmapy.particles.ParticleList. (#1017)
  • Added method ~plasmapy.plasma.grids.AbstractGrid.require_quantities to ~plasmapy.plasma.grids.AbstractGrid that verifies a list of quantities is present on the grid. Method is also incorporated into ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph. (#1027)
  • Added the ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph.add_wire_mesh() method to ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph to allow the creation of synthetic proton radiographs that include a wire mesh reference grid. (#1049)
  • Created a function, ~plasmapy.formulary.mathematics.rot_a_to_b, that calculates the rotation matrix that will rotate one 3D vector onto another. (#1054)
  • Made ~plasmapy.plasma.grids.AbstractGrid.is_uniform a properly-documented public attribute of ~plasmapy.plasma.grids.AbstractGrid. (#1072)

Bug Fixes

  • Fixed a minus sign bug in the Particle Tracker simulation that caused the E×B drift to go in the incorrect direction. (#953)
  • Bugfix :meth:`plasmapy.analysis.fit_functions.Linear.root_solve` to handle the case where the slope is zero and no finite roots exist. (#959)
  • Fixed a bug that prevented nested iterations of a single ~plasmapy.particles.IonizationState or ~plasmapy.particles.IonizationStateCollection instance. (#1025)
  • Fixed a bug in :file:`grids.py` for non-uniform grids that arose when |xarray| upgraded to v0.17.0 (#1027)
  • In ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph, adaptive dt now calculates the cyclotron period using the provided particle charge and mass (previously assumed protons). (#1035)
  • In ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph, the adaptive timestep algorithm now works when particles are provided using ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph.load_particles. (#1035)
  • In ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph, removed highly deflected particles so the call of ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph.max_deflection does not raise an exception. (#1035)

Improved Documentation

  • Add narrative documentation on ionization state functionality. (#796)
  • Added description to plasmapy.formulary.parameters.Hall_parameter signature and equation in docstrings. (#934)
  • Updated documentation for the plasmapy.particles and plasmapy.utils subpackages. (#942)
  • Improves documentation of plasmapy/formulary/quantum.py by cleaning up docstrings of contained functionality. (#951)
  • Update all docstrings associated with computing the Coulomb logarithm and the possible methods of calculation. (#962)
  • Add two Jupyter notebooks for functionality contained in plasmapy.plasma.grids: grids_cartesian.ipynb and grids_nonuniform.ipynb. (#963)
  • Added the ExB drift notebook, which demonstrates the analytical solution for the drift and the implementation of the corresponding formulary drift functions, ~plasmapy.formulary.drifts.force_drift and ~plasmapy.formulary.drifts.ExB_drift. (#971)
  • Describe what constitutes a valid representation of a particle in the docstring for the plasmapy.particles.particle_class.ParticleLike typing construct. (#985)
  • Put the docstring for plasmapy.particles.Particle.is_category into numpydoc format. (#1039)
  • Adds formulas (which were missing) to the docstrings of plasmapy.formulary.dimensionless.quantum_theta and ~plasmapy.formulary.dimensionless.beta. (#1041)
  • Add live rendering of changelog entries on documentation builds, based on sphinx-changelog. (#1052)
  • Created an example notebook demonstrating how the ~plasmapy.diagnostics.proton_radiography.SyntheticProtonRadiograph class can be used to generate synthetic proton radiographs with arbitrary source profiles. Add code documentation links to all proton radiograph notebooks. (#1054)
  • Update formatting and broken sphinx.ext.intersphinx links in plasmapy.formulary docstrings. (#1058)
  • Make minor fixes in plasmapy.particles docstrings. (#1064)
  • Organize the layout of the example Jupyter notebooks on the Read the Docs example page. (#1066)
  • Fix formatting and broken sphinx.ext.intersphinx links in docstrings in various places in the code base. Improve installation instructions in the docs; the subpackage stability matrix, and funding acknowledgments. (#1076)

Trivial/Internal Changes

  • Removed colorama as a dependency. (#920)
  • Moved remaining CI from CircleCI to GitHub Actions. (#996)
  • Add notebook CI through nbqa. (#997)
  • Remove lambda expressions from plasmapy.particles and plasmapy.utils. (#1013)
  • Add unicode particle aliases for electrons ("β-", "β⁻"), muons ("μ-", "μ⁻"), anti-muons ("μ+", "μ⁺"), tau particles ("τ", "τ-", "τ⁻"), anti-tau particles ("τ+", "τ⁺") electron neutrinos ("ν_e"), muon neutrinos ("ν_μ"), tau neutrinos ("ν_τ"), and alpha particles ("α"). (#1036)
  • A set containing all valid particle categories may now be accessed via plasmapy.particles.Particle.is_category.valid_categories. (#1039)
  • Properly handled warnings in test_proton_radiography.py (#1050)

PlasmaPy v0.5.0 (2020-12-09)

Backwards Incompatible Changes

  • Created plasmapy.dispersion in accordance with PlasmaPy Enhancement Proposal 7 (PLEP 7) and migrated the dispersion functionality (:file:`dispersionfunction.py`) from plasmapy.formulary to plasmapy.dispersion. (#910)
  • Removed default values for the ion and particle arguments of functions contained in plasmapy.formulary.parameters, in accordance with issue [#453](#453), and updated all relevant calls to modified functionality. (#911)
  • Moved test helper exceptions from plasmapy.utils.pytest_helpers to plasmapy.tests.helpers. (#919)
  • Update plasmapy.formulary.parameters.mass_density so it calculates the mass density for a specific particle from a given number density. Original function calculated the total mass density (ion + electron). (#957)

Features

  • Added a function to calculate the power spectrum of thermal bremsstrahlung emitted by a Maxwellian plasma. (#892)
  • Added support for multiple electron components to diagnostics.thomson.spectral_density. Also fixed a bug for multiple ion populations. (#893)
  • Add dependency pygments >= 2.4.1. (#898)
  • Create the plasmapy.analysis package as per PLEP-7 and initialize the package with the ~plasmapy.analysis.fit_functions module. Fit functions are designed to wrap together an analytical function, a curve fitter, uncertainty propagation, and a root solver to make curve fitting a little less painful. (#908)
  • Created a new subpackage, plasmapy.tests.helpers, to contain test helper functionality. (#919)
  • Create decorator ~plasmapy.utils.decorators.helpers.modify_docstring, which allows for programmatically prepending and/or appending a docstring. (#943)

Bug Fixes

  • Allowed implicit conversions of AstroPy units in inputs and outputs of validated functions to happen without warnings. Most notably, this removes warnings on eV inputs to temperature fields. (#886)
  • Update plasmapy.formulary.parameters.Alfven_speed to properly use the updated plasmapy.formulary.parameters.mass_density and maintain the same behavior. Also add handling of the ion input keyword, so |Particle| and the |Particle| convertible representations can be used as inputs. (#957)

Improved Documentation

  • Improved the release guide after the release of 0.4.0. (#872)
  • Add various improvements to the documentation.
    • Replace home link with the plasmapy logo.
    • Add module and index navigation links to sidebar header.
    • Replace raw html on the main page that simulates a nbgallery with a real nbgallery directive.
    • Move link to view page source code from the header to footer.
    • Add link to footer the jumps the user back to the top of the page.
    • Create and add custom CSS stylesheet.
    • Create _templates directory and templates to customize page elements. (#875)
  • Add static stub files to docs/api_static so all modules of plasmapy are indexed. This is necessary to expose all of plasmapy since not all modules are indexed in the narrative documentation. (#878)
  • Decompose sub-package plasmapy/utils/roman/ into the plasmapy/utils/roman.py file. Move definition of roman specific Exceptions into plasmapy.utils.exceptions. (#883)
  • Replaced references to Riot.im with references to Element.io or Matrix, as appropriate, following their recent rebranding. (#891)
  • Update the information on how to cite PlasmaPy, including in the release guide. (#900)

Trivial/Internal Changes

  • Apply isort to entire codebase, bringing it back to the pre-commit hook suite. (#857)
  • Expand package metadata contained in codemeta.json, following the CodeMeta standard. (#902)
  • Changed remaining instances of @u.quantity_input to @validate_quantities in response to issue #880. (#905)
  • Switched from Azure Pipelines to GitHub Actions for PR tests to make things easier for contributors. Moved away from Travis CI for test cron jobs. (#952)

PlasmaPy v0.4.0 (2020-07-20)

Backwards Incompatible Changes

Features

  • Added units to reprs of .formulary.magnetostatics classes. (#743)

  • Create prototype abstract interfaces for plasma simulations (#753)

  • Created classes to represent custom and dimensionless particles in plasmapy.particles. (#755)

  • Create :func:`~plasmapy.formulary.relativity.relativistic_energy` function, which uses the established :func:`~plasmapy.formulary.relativity.Lorentz_factor` function to aid in the calculation of the relativistic energy of an object. (#805)

  • Create :func:`~plasmapy.formulary.dimensionless.Reynolds_number` function. (#815)

  • Create :func:`~plasmapy.formulary.dimensionless.Mag_Reynolds` function. (#820)

  • Create plasmapy.formulary.parameters.Bohm_diffusion function. (#830)

  • Added a new diagnostics module thomson containing a function spectral_density that calculates Thomson scattering spectra for Maxwellian plasmas in both the collective and non-collective regimes. As a followup to PR #835, set the minimal required Numpy version to 1.18.1 to finally fix unit dropping bugs. (#831)

  • Revised parameters.thermal_speed to support 1D and 2D distributions as well as 3D, and added an example notebook for this function. (#850)

  • Create plasmapy/formulary/ionization.py Create :func:`~plasmapy.formulary.ionization.Z_bal` function. (#851)

  • Create :func:`~plasmapy.formulary.ionization.Saha` function. (#860)

  • Added aliases (with trailing underscores) for parameters in the formulary:

    • plasmapy.formulary.dimensionless.Reynolds_number -> ~plasmapy.formulary.dimensionless.Re_
    • plasmapy.formulary.dimensionless.Mag_Reynolds -> ~plasmapy.formulary.dimensionless.Rm_
    • plasmapy.formulary.drifts.ExB_drift -> ~plasmapy.formulary.drifts.veb_
    • plasmapy.formulary.drifts.force_drift -> ~plasmapy.formulary.drifts.vfd_
    • plasmapy.formulary.parameters.mass_density -> plasmapy.formulary.parameters.rho_
    • plasmapy.formulary.parameters.Afven_speed -> plasmapy.formulary.parameters.va_
    • plasmapy.formulary.parameters.ion_sound_speed -> plasmapy.formulary.parameters.cs_
    • plasmapy.formulary.parameters.thermal_speed -> plasmapy.formulary.parameters.vth_
    • plasmapy.formulary.parameters.thermal_pressure -> plasmapy.formulary.parameters.pth_
    • plasmapy.formulary.parameters.kappa_thermal_speed -> plasmapy.formulary.parameters.vth_kappa_
    • plasmapy.formulary.parameters.inertial_length -> plasmapy.formulary.parameters.cwp_
    • plasmapy.formulary.parameters.Hall_parameter -> plasmapy.formulary.parameters.betaH_
    • plasmapy.formulary.parameters.gyrofrequency -> plasmapy.formulary.parameters.oc_, plasmapy.formulary.parameters.wc_
    • plasmapy.formulary.parameters.gyroradius -> plasmapy.formulary.parameters.rc_, plasmapy.formulary.parameters.rhoc_
    • plasmapy.formulary.parameters.plasma_frequency -> plasmapy.formulary.parameters.wp_
    • plasmapy.formulary.parameters.Debye_length -> plasmapy.formulary.parameters.lambdaD_
    • plasmapy.formulary.parameters.Debye_number -> plasmapy.formulary.parameters.nD_
    • plasmapy.formulary.parameters.magnetic_pressure -> plasmapy.formulary.parameters.pmag_
    • plasmapy.formulary.parameters.magnetic_energy_density -> plasmapy.formulary.parameters.ub_
    • plasmapy.formulary.parameters.upper_hybrid_frequency -> plasmapy.formulary.parameters.wuh_
    • plasmapy.formulary.parameters.lower_hybrid_frequency -> plasmapy.formulary.parameters.wlh_
    • plasmapy.formulary.parameters.Bohm_diffusion -> plasmapy.formulary.parameters.DB_
    • plasmapy.formulary.quantum.deBroglie_wavelength -> ~plasmapy.formulary.quantum.lambdaDB_
    • plasmapy.formulary.quantum.thermal_deBroglie_wavelength -> ~plasmapy.formulary.quantum.lambdaDB_th_
    • plasmapy.formulary.quantum.Fermi_energy -> ~plasmapy.formulary.quantum.Ef_ (#865)
  • Add json_dumps method to ~plasmapy.particles.particle_class.AbstractParticle to convert a particle object into a JSON string. Add json_dump method to ~plasmapy.particles.particle_class.AbstractParticle to serialize a particle object and writes it to a file. Add JSON decoder ~plasmapy.particles.serialization.ParticleJSONDecoder to deserialize JSON objects into particle objects. Add plasmapy.particles.serialization.json_loads_particle function to convert JSON strings to particle objects (using ~plasmapy.particles.serialization.ParticleJSONDecoder). Add plasmapy.particles.json_load_particle function to deserialize a JSON file into a particle object (using ~plasmapy.particles.serialization.ParticleJSONDecoder). (#836)

Bug Fixes

  • Fix incorrect use of pkg.resources when defining plasmapy.__version__. Add setuptools to package dependencies. Add a definition of __version__ for developers using source files. (#774)
  • Repair notebook links that are defined in the nbsphinx_prolog sphinx configuration variable. (#828)
  • Increase the required Astropy version from 3.1 to 4.0, Numpy from 1.14 to 1.16.6, Scipy from 0.19 to 1.2 and lmfit from 0.9.7 to 1.0.1. This fixes long-standing issues with Numpy operations dropping units from AstroPy quantities. (#835)

Improved Documentation

    • Added documentation to file test_converters (#756)
    • Updated installation instructions. (#772)
  • Reorder documentation page (#777)
  • Fix failing documentation build due to duplicate docstrings for ParticleTracker.kinetic_energy_history and incompatibility of sphinx-automodapi with sphinx v3.0.0. (#780)
  • Automate definition of documentation release and version in docs/conf.py with plasmapy.__version__. (#781)
  • Add a docstring to __init__.py in plasmapy.formulary. (#788)
  • Replaced sphinx-gallery with nbsphinx, turning .py example files into .ipynb files and allowing for easier example submission. (#792)
  • Linked various instances of classes and functions in the .ipynb examples in docs/notebooks/ to the respective API docs. (#825)
  • Fixed a few documentation formatting errors. (#827)
  • Add notes on the PlasmaPy benchmarks repository to documentation. (#841)
  • Improve readability of the plasmapy.formulary page by replacing the toctree list with a cleaner reStructuredText table. (#867)

Trivial/Internal Changes

  • Remove mutable arguments from Particle.is_category method. (#751)
  • Remove all occurrences of default mutable arguments (#754)
  • Handle ModuleNotFoundError when trying to import __version__ but setuptools_scm has not generated the version.py file. This commonly happens during development when plasmapy is not installed in the python environment. (#763)
  • Updated pep8speaks/flake8 configuration and added .pre-commit-config.yaml to simplify automated style checks during development. (#770)
  • Removes some lint from setup.py and setup.cfg. Use pkg_resources for version checking in code. Remove version.py file in favor of pkg_resources. (#771)
  • Default settings for isort were set to be consistent with default settings for black. (#773)
  • Update community meeting and funding information in docs. (#784)
  • Improved pull request template to include more information about changelog entries. (#843)
  • Added GitHub actions that apply pre-commit and flake8 (separately) to incoming pull requests. (#845)
  • Apply pre-commit hooks to entire repository, so that GitHub actions do not shout at contributors needlessly. (#846)
  • Update :class:`~plasmapy.particles.particle_class.CustomParticle` so input parameters mass and charge can accept string representations of astropy Quantities. (#862)

PlasmaPy v0.3.0 (2020-01-25)

Backwards Incompatible Changes

  • Create simulation subpackage; move Species particle tracker there; rename to particletracker (#665)
  • Changed plasmapy.classes.Species to plasmapy.simulation.ParticleTracker (#668)
  • Move pytest helper functionality from plasmapy.utils to plasmapy.utils.pytest_helpers (#674)
  • Move plasmapy.physics, plasmapy.mathematics and plasmapy.transport into the common plasmapy.formulary subpackage (#692)
  • Change ClassicalTransport methods into attributes (#705)

Deprecations and Removals

  • Remove parameters_cython.pyx, switching to Numba for the future of computationally intensive code in PlasmaPy (#650)
  • Remove plasmapy.constants, which was a thin wrapper around astropy.constants with no added value (#651)

Features

  • Generalize ion_sound_speed function to work for all values of k^2 \lambda_{D}^2 (i.e. not just in the non-dispersive limit). (#700)
  • Optimize add__magnetostatics for a 16x speedup in tests! (#703)

Bug Fixes

  • Define preserve_signature decorator to help IDEs parse signatures of decorated functions. (#640)
  • Fix Pytest deprecations of message argument to raise and warn functions. (#666)
  • Fix h5py warning in OpenPMD module, opening files in read mode by default (#717)

Improved Documentation

Trivial/Internal Changes