Skip to content
Permalink
Branch: master
Commits on Mar 16, 2019
  1. updated the cold plasma example to match latest API changes (#608)

    jhillairet authored and StanczakDominik committed Mar 16, 2019
    * updated the example to match latest API changes
    
    * removed trailing space
Commits on Mar 12, 2019
  1. Allow nans through relativity check (#607)

    dstansby authored and StanczakDominik committed Mar 12, 2019
    * Allow nans through relativity check
    
    * Fix tests to reflect non-checking of nans
Commits on Feb 2, 2019
  1. Remove message keyword argument in pytest.raises and pytest.warns (#602)

    namurphy committed Feb 2, 2019
    * Remove message kwarg in pytest.raises and pytest.warns
    
    In pytest.raises, the message argument has been used to provide a test
    failure message, but it has gotten confused with the match argument
    which is used to check the message from the exception to be tested so
    it is being deprecated.  I changed the usage to:
    
        with pytest.fails(SomeException):
            should_raise_exception()
    	pytest.fails("should_raise_exception() did not raise anything")
    
    Also, we had pytest.warns(..., message="...") at one point, though it
    appears pytest.warns does not do anything with the message kwarg to
    begin with.  That had to be changed into a grumpier try except block.
    
    * Improve a failure message when using pytest.warns
    
    * Fix bug when using pytest.warns in parsing.py
    
    * Fix bug when testing missing warnings
Commits on Jan 23, 2019
  1. Make README more beautiful by adding logo (#597)

    StanczakDominik committed Jan 23, 2019
Commits on Jan 22, 2019
  1. Fix Pytest deprecation errors (#600)

    StanczakDominik committed Jan 22, 2019
    * fix Pytest deprecation of directly calling fixtures
    * shuffle_characteristic should just be a function
Commits on Jan 4, 2019
  1. Update PlasmaPy copyright for 2019 (#592)

    namurphy committed Jan 4, 2019
    SunPy and Astropy have older dates in their licenses, so we should
    wait until they update their repositories before we update their licenses
    in our repository.
  2. Merge pull request #596 from StanczakDominik/astro3.1.1

    StanczakDominik committed Jan 4, 2019
    Follow up to astropy 3.1.1 unit bug fix
  3. Set dev package tests to run on cron

    StanczakDominik committed Jan 4, 2019
    This brings back the change from #590, which got obsoleted.
  4. Add __all__ entry to pytest_helpers (fixes #586)

    StanczakDominik committed Jan 4, 2019
  5. Remove out-of-date mpmath polylog error test

    StanczakDominik committed Jan 4, 2019
    mpmath.polylog no longer fails on large values.
    This seems to have been fixed by mpmath 1.1.0
    
    https://github.com/fredrik-johansson/mpmath/blob/475527a7b5d373d702021d4cd11a0b43ba29eb48/CHANGES
  6. Remove double mention of astropy in travis reqs

    StanczakDominik committed Jan 4, 2019
Commits on Dec 19, 2018
  1. Add more travis matrix entries

    StanczakDominik committed Dec 19, 2018
Commits on Dec 13, 2018
  1. Merge pull request #588 from bsipocz/update-helpers-v3.1

    StanczakDominik committed Dec 13, 2018
    Update astropy-helpers to v3.1
Commits on Dec 12, 2018
  1. Updated astropy-helpers to v3.1

    bsipocz committed Dec 12, 2018
Commits on Dec 11, 2018
  1. Update Type Hint Annotations for Consistency (#586)

    Jac0bDeal authored and StanczakDominik committed Dec 11, 2018
    * Update plasmapy.atomic type hints for consistency
    
    * update plasmapy.utils type hints for consistency
    
    * add Jacob Deal to contributors
Commits on Nov 29, 2018
  1. Fix #584 broken link to Coulomb Logarithm in doc (#585)

    StanczakDominik committed Nov 29, 2018
    * Fix #584 broken link to Coulomb Logarithm in doc
    
    * Fix list in macroscopic properties
Commits on Nov 1, 2018
  1. Optional dependencies (#561)

    StanczakDominik committed Nov 1, 2018
    * Turn lmfit, h5py, mpmath, matplotlib and pytest into optional dependencies
    * Remove subpackage imports from plasmapy.__init__.py
    * Update documentation
    * Rename requires to account for package names as per suggestion by @dstansby:
    #561 (comment)
    
    also move extras to setup.cfg as per SunPy code by @Cadair:
    https://github.com/sunpy/sunpy/pull/2699/files
    
    * Simplify optional dependencies for now
    * Add useful error messages for ImportErrors
Commits on Oct 31, 2018
  1. Update inertial_length (#568)

    namurphy committed Oct 31, 2018
    I fixed an error in the docstring of inertial_length which still used
    the definition from when it was split into ion_inertial_length and
    electron_inertial_length.  I took this chance to use `particle_input`
    and `Particle`, remove the default particle assumption, update
    tests, and update the description of the physics.
  2. Create classes to represent ionization state distributions (#404)

    namurphy committed Oct 31, 2018
    This pull request creates the IonizationState class to represent the
    ionization state of a single element or isotope, and the
    IonizationStates class to represent the ionization states of multiple
    elements or isotopes.  
    
    These classes were written in conjunction with another project to do
    non-equilibrium ionization (NEI) modeling:
    
       https://github.com/NEI-modeling/NEI
    
    There is still room for refactoring and improvements, but it looks
    like it's in a good enough state to merge and avoid becoming another
    "transport PR incident".  For the full commit history, see #404 on
    GitHub.  The commit history is summarized here.
    
     - I included a lot of flexibility in the inputs; in particular, I
       allowed the ionic fractions to be set as either array-like or a
       Quantity with units of number density.  I allowed the base
       particles to be either elements or isotopes (though not both the
       element and isotopes from that element because that could involve
       double counting).
    
     - For type hint annotations, I because using numbers.Integral and
       numbers.Real since they are the abstract classes that different
       integers and floats inherit from.  I did imports like `from numbers
       import Real` because having the full `numbers.Real` and
       `typing.Dict` in the function definition reduced readability.
    
     - Early on, I used an n_H attribute in IonizationStates to represent
       the number density of hydrogen.  That would make sense in
       astrophysical plasmas, but would not make sense for many laboratory
       plasmas.  I changed that to be a number density scaling factor.
    
     - I chose to have undefined attributes default to numpy.nan (possibly
       times an attribute) instead of raising an exception.  This way,
       operations can continue to be performed even if there are some nan
       values.  This is in line with how numpy operations work.  I am
       wondering, though, if it would be worth including a warning when
       there are nans.
    
     - Using nans caused headaches because numpy.nan == numpy.nan
       evaluates to False, so the equality measures (in particular, in
       __eq__) ended up being kind of complicated.  It may be good to have
       a helper function called something like `same_enough` that does
       this sort of equality comparison and accounts for Quantity
       comparisons as well as comparisons to within a tolerance.
    
     - I created an info method for IonizationState(s) to print out
       quicklook information.  This was originally in __repr__, but pytest
       error messages ended up being very messy with all the breakline
       characters, so we decided to move it to its own method.
    
     - For an IonizationState instance, __getitem__ will return a State
       corresponding to a particular ionization level.  I did not include
       __setitem__ for IonizationState because we need to change ionic
       fractions as a whole because of the normalization constraint.
       Iterating through an instance involves iterating through each State
       instance.  I chose not to allow slicing for an IonizationState
       instance because having a State instance with more than one level
       would be pretty much like having something really close to an
       IonizationState instance.
    
     - For an IonizationStates instance, __getitem__ will return an
       IonizationState instance corresponding to a particular element or
       isotope.  I included __setitem__ to allow new ionic fractions to be
       set.  Item assignment will also often work for number densities, so
       long as there isn't potential for contradiction with, e.g.,
       abundance information that is previously partially provided when
       the number density scaling factor is absent.  Iterating through an
       IonizationStates instance involves iterating through
       IonizationState instances for the different elements/isotopes.
    
     - I allowed both abundances and base 10 log_abundances, since it is
       common in astronomy to use both.
    
     - I made Particle class instances hashable so that they can be used
       as keys in dicts.  I returned the hash of the result from repr so
       that it is different than the hash for the particle symbol string.
       I wanted to make sure that the hash of a Particle instance was
       different than the hash of the particle's symbol, since
       Particle('H') == 'H' should evaluate to True and there could be
       some confusion as a result.  Usually, only immutable objects should
       be given __hash__.  Particle is not strictly immutable, but should
       be thought of as such.
    
    Remaining work includes:
     
     - Expand the docstrings with more examples.  In particular, put
       documentation for dunder methods into the main class docstrings.
       since it doesn't show up in online docs.
    
     - Change the State namedtuple to a class so that it can contain
       checks that the parameters have the correct properties.
    
     - Expand test coverage of exceptions, and also make sure that the
       exceptions that show up are appropriate.
    
     - Clean up the tests for IonizationState(s).  I suspect that some of
       these tests would be highly appropriate for fixtures.
    
     - Develop the methods to (1) calculate collisional ionization
       equilibrium and (2) model non-equilibrium ionization plasmas.  The
       atomic date required for both are pretty much the same.  A
       difficulty is that there is going to be some density dependence on
       atomic rates as well as temperature dependence because some
       mechanisms only occur at, e.g., lower densities.  Including
       photoionization is probably way out of scope, though that is
       functionality that will be needed somewhere in the PlasmaPy/
       Astropy/SunPy software ecosystem.
    
     - We should develop functionality to plot a charge state
       distribution, perhaps as a method in IonizationState.  Marcus
       DuPont in the NEI repository mentioned above has written some
       plotting routines that would be really good to implement.
    
     - It would probably be helpful to allow negatively charged ions to be
       included.  In some instances, H- will be important, for example as
       a source of opacity in stellar atmospheres.  Doubly negatively
       charged ions will probably be exceptionally rare in plasmas.
    
     - In IonizationState, I chose the Z_most_abundant method to be a list
       since there will be times when more than one ionization level will
       be the most important.  If Z_most_abundant were to sometimes return
       an integer and sometimes return a list, it would make dealing with
       it more of a pain for users.  I'm not sure if it would be better to
       turn it into a tuple.
    
    Some additional thoughts:
    
     - We could use __add__ to allow adding of IonizationState(s)
       instances to form an IonizationStates instance.  This seems lower
       priority to me since I don't think I would use it very often.
    
     - Another possibility would be to consolidate IonizationState and
       IonizationStates.  It can be confusing to have similar names.  A
       caveat with consolidating them is that IonizationStates.__getitem__
       yields an IonizationState instance.  
    
     - One possible bug is that item assignment to one of the dictionary
       attributes can cause problems.  If we do something like
       `ionstates.ionic_fractions['H'] = some_value` then `some_value`
       could be assigned without going through all of the checks.  We
       could possibly create a class for such attributes, but for the time
       being it's probably best to just do `ionstates['H'] = some_value`.
    
     - We probably want to look more into how the State namedtuple and
       IonizationState(s) classes relate to different classes in the
       fiasco pacakge that represent ions or elements.  There is
       definitely more room for collaboration.
    
     - I started using pytest.fail() for test failures besides
       AssertionErrors.  It would probably be good to use this in
       run_test, with it specified to ignore the traceback within
       run_test.
    
    It has been really helpful to talk about this PR with Chengcai Shen,
    Will Barnes, Marcus DuPont, and Dominik Stańczak.  Many thanks! 😸
Commits on Oct 23, 2018
  1. Follow up fixes to RST documentation errors (#573)

    StanczakDominik committed Oct 23, 2018
    * skip doctest of plasmapy.test
    
    * Fix nuclear reaction string in nuclear.rst
  2. Fix Check_Quantity documentation (#571)

    StanczakDominik committed Oct 23, 2018
  3. [WIP] Upkeep: use Particle class (#562)

    carolyz authored and StanczakDominik committed Oct 23, 2018
    * Update gas to be instance of Particle class instead
    Remove gas from check_quantity because the class should handle validation now
    
    * Replace gas arg in get_ion_density functions with mass attr of gas obj
    
    * Update docstring of swept_probe_analysis
    
    * Update deprecated arguments with string representing a different ion
    Remove deprecated function checking ion mass
    
    * Initiate Particle instance
    
    * Remove inconsistent attribute from gas object
    
    * Update test value to reflect changes made in refactoring
    
    * Revert "Update test value to reflect changes made in refactoring"
    
    This reverts commit 2890059.
    
    * Update value in assert statement
    
    * Update gas argument to comply with Particle class
  4. Cleaner warning display in CircleCI (#570)

    StanczakDominik committed Oct 23, 2018
    * Split standard output and standard error of CircleCI doc build
    
    Update astropy_helpers to remove a few warnings
    Remove 'macros' from circleci
Commits on Oct 15, 2018
  1. Merge pull request #563 from namurphy/orcid

    namurphy committed Oct 15, 2018
    Update list of PlasmaPy contributors in docs
  2. Provide contextual info to list of contributors

    namurphy committed Oct 12, 2018
  3. Update list of PlasmaPy contributors in docs

    namurphy committed Oct 12, 2018
    I linked to GitHub handles and added ORCID unique author identifier
    numbers.  The ORCID numbers will help with author disambiguation later
    on.
  4. Change relative to absolute imports in PlasmaPy (#564)

    Justin-Bergeron authored and StanczakDominik committed Oct 15, 2018
Commits on Oct 12, 2018
  1. Namedtuples for dielectric (#540)

    StanczakDominik committed Oct 12, 2018
    * add StixTensorElements
    * add RotatingTensorElements
    * add @jhillairet test case
Commits on Oct 10, 2018
  1. Merge pull request #559 from BH4/absolute-imports

    namurphy committed Oct 10, 2018
    Change relative to absolute imports in PlasmaPy
  2. Merge pull request #558 from fsilvapavon/absolute-relative-imports

    namurphy committed Oct 10, 2018
    Change relative to absolute imports in PlasmaPy
  3. Change relative to absolute imports in PlasmaPy

    BH4 committed Oct 10, 2018
Commits on Oct 9, 2018
  1. Change relative to absolute imports in PlasmaPy

    fsilvapavon committed Oct 9, 2018
Commits on Oct 8, 2018
  1. [WIP] Reduce pytest warnings (#557)

    lgoenner authored and namurphy committed Oct 8, 2018
    * Fix a lot of warnings during pytest execution
    
    * Remove blank line
Commits on Oct 7, 2018
  1. Add Optional type hint for arguments with a default value of None (#556)

    lgoenner authored and StanczakDominik committed Oct 7, 2018
    * Add Optional type hints
    
    * Add Optional code style documentation
Commits on Oct 5, 2018
  1. Merge remote-tracking branch 'upstream/pr/385'

    StanczakDominik committed Oct 5, 2018
Older
You can’t perform that action at this time.