Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: skuschel/postpic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.1
Choose a base ref
...
head repository: skuschel/postpic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 5, 2014

  1. Copy the full SHA
    fd4093f View commit details
  2. Copy the full SHA
    9eb9f94 View commit details

Commits on Dec 6, 2014

  1. implement VSIM Dumpreader

    tested if methods return right value (except getderived all methods
    implemented). Using _const.axesidentify for x,y,z,px,py,pz; weight and
    ID not included. All other methods should behave like for sdf.
    Neverthelerss additional esting required--
    planto authored and skuschel committed Dec 6, 2014
    Copy the full SHA
    f4ee6c2 View commit details

Commits on Dec 7, 2014

  1. Copy the full SHA
    ac58217 View commit details
  2. Copy the full SHA
    39d95ab View commit details
  3. add support for fixed particle weight in SingleSpeciesAnalyzer

    hope the conversion fix in __getitem__ doesnt break anything
    skuschel committed Dec 7, 2014
    Copy the full SHA
    3884ee2 View commit details
  4. improvements on vsim dumpreader

    fixed collecting of h5 files in subfolders
    fixed timestep
    improved listSpecies
    fixed typo
    skuschel committed Dec 7, 2014
    Copy the full SHA
    4b41fb2 View commit details

Commits on Dec 11, 2014

  1. add VSIM Simulationsreader

    closes #4
    
    fixed wrong mass and charge return value
    skuschel committed Dec 11, 2014
    Copy the full SHA
    a24a4a6 View commit details
  2. add example tree

    a simple example using fake data will be started by the run-tests
    script.
    skuschel committed Dec 11, 2014
    Copy the full SHA
    c7a8ded View commit details
  3. fix example to run without a DISPLAY

    this is necessary to run the example on travis-ci
    skuschel committed Dec 11, 2014
    Copy the full SHA
    4517536 View commit details

Commits on Dec 14, 2014

  1. add 'ext' option to MatplotlibPlotter

    this option sets the extension (and therefore the format) of saved
    pictures. If not set, the default is 'png'.
    skuschel committed Dec 14, 2014
    Copy the full SHA
    6c50b62 View commit details

Commits on Dec 15, 2014

  1. autodetect nosetests2 or nosetests in run-tests

    'nosetests2' will be used if available, 'nosetests' if not.
    On systems like arch linux 'nosetests' defaults to the python3 version
    causing tests to fail. Thus nosetests2 has preference.
    
    fixes #9
    skuschel committed Dec 15, 2014
    Copy the full SHA
    0a7935b View commit details

Commits on Dec 25, 2014

  1. Copy the full SHA
    6a47477 View commit details
  2. Merge branch 'examples'

    skuschel committed Dec 25, 2014
    Copy the full SHA
    901a432 View commit details
  3. Merge pull request #10 from skuschel/vsimreader

    Vsimreader
    skuschel committed Dec 25, 2014
    Copy the full SHA
    bd7c244 View commit details
  4. add EPOCH reader support for subsets

    This commit also fixes that species will be recognized even if Px is not dumped.
    fix #8
    skuschel committed Dec 25, 2014
    Copy the full SHA
    0fb9903 View commit details
  5. plot particle data independently of the simgrid

    The ParticleAnalyzer doesnt depend on the simgrid properties anymore. In
    case they arend dumped the simgrid=True option in the createHistrogram*d
    functions will be without any effect.
    
    fix #7
    skuschel committed Dec 25, 2014
    Copy the full SHA
    7b98ed9 View commit details

Commits on Dec 28, 2014

  1. changed reader policy

    the default behavior of the reader classes is now to raise exceptions
    whenever not dumped data is requested. This gives more control in the
    program to intentionally handle that as an exception or allow to show
    comprehensive error messages.
    skuschel committed Dec 28, 2014
    Copy the full SHA
    bab0391 View commit details

Commits on Dec 29, 2014

  1. unify data handling of paricle properties

    coherent implementation of atomic particle properties in
    SingleSpeciesAnalyzer.
    coherent mapping from ParticleAnalyzer functions to contained
    SingleSpeciesAnalyzers.
    skuschel committed Dec 29, 2014
    Copy the full SHA
    93d94a3 View commit details
  2. speed up calaculation of particle properties

    calculations of particle properties may now be done already inside the
    SingleSpeciesAnalyzer class. Calculations of particle properties which
    require scalar values on a per species basis (usually mass and charge)
    will speed up, because these constant values will not be repeated
    using np.repeat before the calculation.
    Timed on Laptop with 10e6 particles (timit package, 20 repetitions):
    calculating gamma        0.43 --> 0.245 sec (57%)
    calculating Ekin_MeV_qm  0.90 --> 0.36  sec (40%)
    skuschel committed Dec 29, 2014
    Copy the full SHA
    97594a3 View commit details
  3. Merge pull request #14 from skuschel/scalarspeciesproperties

    handle scalar species properties more efficiently and change reader policy.
    Trying to access particle properties that arend dumped will now yield a KeyError.
    skuschel committed Dec 29, 2014
    Copy the full SHA
    f5899ef View commit details
  4. fixed typo

    skuschel committed Dec 29, 2014
    Copy the full SHA
    97467fa View commit details

Commits on Jan 6, 2015

  1. Copy the full SHA
    1e6a536 View commit details

Commits on Jan 20, 2015

  1. update setup.py

    skuschel committed Jan 20, 2015
    Copy the full SHA
    e42c546 View commit details
  2. add options to MatplotlibPlotter for saving

    New Keyword arguemnts accepte by the MatplotlibPlotter, together
    with their default values are:
    * dpi=160
    * facecolor=(1,1,1,0.01)
    * transparent=False
    * size_inches=(9,7)
    
    This commit changes the default value of transparent from True to False.
    skuschel committed Jan 20, 2015
    Copy the full SHA
    bb6f25a View commit details

Commits on Jan 21, 2015

  1. tests become windows compatible

    instead of `run-tests` there is a `run-tests.py` now,
    that runs all the tests on execution. Tested with the latest
    pythonxy on windows 7.
    skuschel committed Jan 21, 2015
    Copy the full SHA
    3389180 View commit details
  2. Copy the full SHA
    8346379 View commit details

Commits on Jan 23, 2015

  1. fixed bug in plotting lineouts

    a lineout is also added to the simpleexample.py
    skuschel committed Jan 23, 2015
    Copy the full SHA
    3b8c3d3 View commit details

Commits on Jan 29, 2015

  1. seed dummyreader with random seed

    also adjust the dummyreader data to more realistic values. some plots
    are added to the simpleexample.py as well.
    skuschel committed Jan 29, 2015
    Copy the full SHA
    9a1b700 View commit details
  2. Copy the full SHA
    9b2387f View commit details

Commits on Feb 2, 2015

  1. update .gitignore

    skuschel committed Feb 2, 2015
    Copy the full SHA
    ff401e3 View commit details

Commits on Feb 3, 2015

  1. Dumpreader_ifc inherits high level functions from FieldAnalyzer

    The Dumpreader_ifc (and thus any Dumpreader) inherits all the high level
    functions from the FieldAnalyzer. The Files are still kept separate to
    make the diffenrent abstraction levels more obvious. Anyways, there is
    no need to call the FieldAnalyzer directly anymore.
    skuschel committed Feb 3, 2015
    Copy the full SHA
    a5d577f View commit details
  2. shortcut frequently used functions and classes

    ParticleAnalyzer, identifyspecies, chooseCode, readDump and readSim are
    now directly accessible from postpic (no need to point to the sub
    packages).
    skuschel committed Feb 3, 2015
    Copy the full SHA
    992d286 View commit details
  3. Merge pull request #23 from skuschel/topic-usability

    usability improvements
    
    Most importantly:
    1) Dumpreader_ifc inherits all the high level Functions from the FieldAnalyzer. So there is no need to call the FieldAnalyzer directly anymore
    2) ParticleAnalyzer and chooseCode got linked directly into postpic, no need to call the subpackages anymore.
    skuschel committed Feb 3, 2015
    Copy the full SHA
    7b87c0a View commit details

Commits on Feb 6, 2015

  1. tidy up, more tests

    bugfixed datahandling.Field.exporttocsv.
    tests added.
    
    commit-on-a-plane :)
    skuschel committed Feb 6, 2015
    Copy the full SHA
    d12115f View commit details

Commits on Feb 10, 2015

  1. Copy the full SHA
    00b37f3 View commit details
  2. run-tests.py has to return the correct error codes

    `os.system(cmd)` does not return the correct error codes as expected.
    now replaced by `subprocess.call(cmd)` which does.
    skuschel committed Feb 10, 2015
    Copy the full SHA
    467ee55 View commit details

Commits on Feb 17, 2015

  1. Copy the full SHA
    bd62e23 View commit details
  2. satisfy new pep8 W503

    skuschel committed Feb 17, 2015
    Copy the full SHA
    9c55f05 View commit details
  3. Copy the full SHA
    cb59032 View commit details

Commits on Mar 9, 2015

  1. bump to v0.1.1

    skuschel committed Mar 9, 2015
    Copy the full SHA
    8d5d06c View commit details

Commits on Mar 10, 2015

  1. add histogram function written in cython

    simple tests are added as well
    skuschel committed Mar 10, 2015
    Copy the full SHA
    d452351 View commit details
  2. use 1D Histogram functions written in Cython

    Support for Particle Shape Orders 0 and 1.
    skuschel committed Mar 10, 2015
    Copy the full SHA
    9b8a7b7 View commit details

Commits on Mar 11, 2015

  1. fix travis ci

    skuschel committed Mar 11, 2015
    Copy the full SHA
    157cf25 View commit details
  2. add particleshapedemo.py

    this file is also included in the tests.
    skuschel committed Mar 11, 2015
    Copy the full SHA
    554ec10 View commit details

Commits on Mar 15, 2015

  1. Copy the full SHA
    f888659 View commit details
  2. Copy the full SHA
    9b70127 View commit details
  3. add histogram2d to cythonfunctions

    tests included
    skuschel committed Mar 15, 2015
    Copy the full SHA
    dc66cef View commit details

Commits on Mar 23, 2015

  1. find subpackages automatically

    also add --dirty to git version string creation
    skuschel committed Mar 23, 2015
    Copy the full SHA
    5a6f0cf View commit details

Commits on Mar 25, 2015

  1. Copy the full SHA
    f425ec0 View commit details
Showing with 16,421 additions and 3,116 deletions.
  1. +1 −0 .gitattributes
  2. +13 −0 .github/issue_template.md
  3. +65 −0 .github/workflows/run-tests.yml
  4. +78 −5 .gitignore
  5. +16 −0 .gitlab-ci.yml
  6. +4 −0 .mailmap
  7. +0 −27 .travis.yml
  8. +175 −0 CHANGELOG.md
  9. +24 −15 CONTRIBUTING.md
  10. +8 −0 MANIFEST.in
  11. +52 −18 README.md
  12. +54 −0 conda/README.rst
  13. +41 −0 conda/common.sh
  14. +72 −0 conda/create_environment.sh
  15. +59 −0 conda/do_tests_env.sh
  16. +12 −8 postpic/analyzer/__init__.py → conda/make_envs.sh
  17. +52 −0 conda/pre-commit
  18. +56 −0 conda/run_tests.sh
  19. +12 −169 doc/Makefile
  20. +0 −38 doc/apidoc/postpic.analyzer.rst
  21. +0 −30 doc/apidoc/postpic.datareader.rst
  22. +0 −22 doc/apidoc/postpic.plotting.rst
  23. +0 −31 doc/apidoc/postpic.rst
  24. +0 −348 doc/conf.py
  25. +0 −1 doc/contributing.rst
  26. +0 −53 doc/dummyexample.py
  27. +0 −28 doc/index.rst
  28. +14 −220 doc/make.bat
  29. +0 −1 doc/readme.rst
  30. +1 −0 doc/source/CHANGELOG.md
  31. +1 −0 doc/source/CONTRIBUTING.md
  32. +2 −2 doc/{ → source}/apidoc/modules.rst
  33. +50 −0 doc/source/apidoc/postpic.datareader.rst
  34. +50 −0 doc/source/apidoc/postpic.io.rst
  35. +26 −0 doc/source/apidoc/postpic.particles.rst
  36. +18 −0 doc/source/apidoc/postpic.plotting.rst
  37. +53 −0 doc/source/apidoc/postpic.rst
  38. +210 −0 doc/source/conf.py
  39. +1 −1 doc/{ → source}/getstarted.rst
  40. +34 −0 doc/source/index.rst
  41. +21 −0 doc/source/introduction.rst
  42. +13 −0 doc/updateapidoc.sh
  43. +2 −0 examples/.gitignore
  44. +336 −0 examples/kspace-test-2d.py
  45. +151 −0 examples/openPMD.py
  46. +136 −0 examples/particleshapedemo.py
  47. +128 −0 examples/simpleexample.py
  48. +190 −0 examples/time_cythonfunctions.py
  49. +8 −4 pip-requirements.txt
  50. +56 −36 postpic/__init__.py
  51. +20 −0 postpic/_compat/__init__.py
  52. +121 −0 postpic/_compat/functions.py
  53. +198 −0 postpic/_compat/mixins.py
  54. +0 −112 postpic/_const.py
  55. +384 −0 postpic/_field_calc.py
  56. +683 −0 postpic/_version.py
  57. +0 −191 postpic/analyzer/analyzer.py
  58. +0 −181 postpic/analyzer/fields.py
  59. +0 −706 postpic/analyzer/particles.py
  60. +2,133 −239 postpic/datahandling.py
  61. +105 −248 postpic/datareader/__init__.py
  62. +375 −0 postpic/datareader/datareader.py
  63. +82 −50 postpic/datareader/dummy.py
  64. +149 −80 postpic/datareader/epochsdf.py
  65. +375 −0 postpic/datareader/openPMDh5.py
  66. +404 −0 postpic/datareader/smileih5.py
  67. +183 −0 postpic/datareader/vsimhdf5.py
  68. +121 −0 postpic/experimental.py
  69. +1,378 −0 postpic/helper.py
  70. +95 −0 postpic/helper_fft.py
  71. +78 −0 postpic/io/__init__.py
  72. +39 −0 postpic/io/common.py
  73. +61 −0 postpic/io/csv.py
  74. +128 −0 postpic/io/image.py
  75. +116 −0 postpic/io/npy.py
  76. +364 −0 postpic/io/vtk.py
  77. +37 −0 postpic/particles/__init__.py
  78. +465 −0 postpic/particles/_particlestogrid.pyx
  79. +321 −0 postpic/particles/_routines.py
  80. +1,281 −0 postpic/particles/particles.py
  81. +230 −0 postpic/particles/scalarproperties.py
  82. +4 −2 postpic/plotting/__init__.py
  83. +112 −57 postpic/plotting/plotter_matplotlib.py
  84. +34 −16 pre-commit
  85. +0 −25 run-tests
  86. +136 −0 run-tests.py
  87. +11 −0 setup.cfg
  88. +47 −7 setup.py
  89. +0 −56 test/test_analyzer.py
  90. +724 −55 test/test_datahandling.py
  91. +5 −5 test/test_dumpreader.py
  92. +18 −0 test/test_field_calc.py
  93. +0 −20 test/test_fields.py
  94. +242 −0 test/test_helper.py
  95. +74 −0 test/test_io.py
  96. +87 −9 test/test_particles.py
  97. +376 −0 test/test_particlestogrid.py
  98. +53 −0 update-gh-pages-branch.sh
  99. +2,277 −0 versioneer.py
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
postpic/_version.py export-subst
13 changes: 13 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Please tell us which version of postpic you are using by adding the output of
```python
import postpic as pp
print(pp.__version__)
```
Please also add if you are using python2 or python3. You can find out using
```python
import sys
print(sys.version)
```

Now continue with your question or bug report here. Thank you!
65 changes: 65 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: run-tests

on: [push, pull_request]

jobs:
latest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m venv --system-site-packages env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r pip-requirements.txt
python --version
python -c 'import numpy; print(numpy.__version__)'
python -c 'import cython; print(cython.__version__)'
python ./setup.py develop
# python -m pip -vvv install -e .
# fails with "ModuleNotFoundError: No module named 'Cython'"
# running setup.py directly is just a workaround.
- name: run tests
run: |
source env/bin/activate
python run-tests.py --skip-setup
other-os:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
python-version: [3.12]

# have to copy steps from above, as anchors are currently
# not supported by github workflow (Jan 2020).
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r pip-requirements.txt
python --version
python -c 'import numpy; print(numpy.__version__)'
python -c 'import cython; print(cython.__version__)'
python ./setup.py develop
# python -m pip -vvv install -e .
# fails with "ModuleNotFoundError: No module named 'Cython'"
# running setup.py directly is just a workaround.
- name: run tests
run: |
python run-tests.py --skip-setup
83 changes: 78 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,81 @@
# auto generated by setup.py
/_examplepictures

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Cython
*.c
*.html

# Distribution / packaging
.Python
/env/
/build/
/develop-eggs/
/dist/
/downloads/
/eggs/
/.eggs/
/lib/
/lib64/
/parts/
/sdist/
/var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
/doc/build/

# PyBuilder
target/

# more stuff
*~
*.pyc
*.odt
.project
.pydevproject
*.egg-info
build/
dist/
doc/_build
*.png
*.swp
.idea/

# there might be ipython notebooks
.ipynb_checkpoints

# if using spyder for development
.spyderworkspace
.spyderproject

# ignored for github codespaces
.venv
16 changes: 16 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


image: python:latest


before_script:
- python -V # Print out python version for debugging

stages:
- test

job1:
stage: test
script:
- python -m pip install -r pip-requirements.txt
- ./run-tests.py
4 changes: 4 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Stephan Kuschel <stephan.kuschel@gmail.com> <Stephan.Kuschel@gmail.com>
Mark Yeung <myeung01@qub.ac.uk>
Georg Wittig <georg.wittig@uni-hamburg.de>
Dominik Hollatz <dominik.hollatz@uni-jena.de>
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

175 changes: 175 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
Changelog of postpic
====================

current master
--------------


**Highlights**

* Add support to read the `Smilei` PIC (https://smileipic.github.io/Smilei/) data format in both cartesian and azimuthal geometry. Postpic uses a build in azimuthal mode expansion very similar to the one used for fbpic.
* To read smilei data, postpic only relies on the hdf5 package and not smilei's happi module for data access. Paricle ID's (ParticleTracking as described by smilei) can be read directly from the hdf5. Happi requires to sort the IDs and write a new hdf5, which can be twice as big as the original dumps. Using postpic's access this step will be skipped and thus access is much faster (but by default with unordered particle IDs as in any other code).


**Incompatible adjustments to previous version**

* `scipy.integrate.simps` has been removed in scipy 1.14. Postpic uses `scipy.integrate.simpson` which has been introduced in scipy 1.6.0 (Dec 31st 2020).


**Other improvements and new features**

* Compatibility with numpy 2.0 and the sanitizer checks of numexpr 2.8.6. ([#281](https://github.com/skuschel/postpic/pull/281) -- [a304e73](https://github.com/skuschel/postpic/commit/a304e7370259b3b09873a998ccc8f6a6c0241b2c))


v0.5
----

2022-10-22

This is the last version with python 2 support. Changes in setuptools (see for example python [PEP 517](https://peps.python.org/pep-0517/) and [PEP 660](https://peps.python.org/pep-0660/) ) require changes in the setup. Backward compatibility will therefore be dropped. Current tests already do not inlcude python2 anymore.


**Highlights**

* Parallelized implementation of `Field.map_coordinates`
* Added support for reading files written by the fbpic v0.13.0 code ( https://github.com/fbpic ). The fields can be accessed by `Er` and `Etheta`, which have been introduced to the fbpic data reader. Particles are saved in Cartesian coordinates, hence the interface does not change there.
* Reimplementation of `Field.fft`, see below.

**Incompatible adjustments to previous version**

* Reimplementation of `Field.fft`. This changes the phases of Fourier transforms in a way to make it more consistent. However, if your code depends on the phases, `Field.fft()` now has a parameter `old_behaviour` that can be used to switch back to the old behaviour.
* Indexing a field by a number (integer or float) will now remove the according axis altogether, instead of leaving behind a length-1 axis.
A new class `KeepDim` was introduced through which the old behaviour can still be used.
Behaviour of PostPic before this change:
```
field.shape == (x,y,z)
field[:, 0.0, :].shape == (x,1,z)
```
Using the new class `KeepDim`, it is possible to retain that behaviour in the new version:
```
field.shape == (x,y,z)
field[:, 0.0, :].shape == (x, z)
field[:, KeepDim(0.0), :].shape == (x,1,z)
```

**Other improvements and new features**

* New convenience method `Field.copy`


v0.4
----

2019-01-14

**Highlights**

* Improved interoperability with numpy:
* `Field` now understands most of numpy's broadcasting
* `Field` can be used as an argument to numpy's ufuncs.
* Import and export routines for `Field` incuding vtk, compatible with [paraview](https://www.paraview.org/).
* Coordinate mapping and transform for `Field`.
* Brand new `Multispecies.__call__` interface: This takes an expression, which is evaluated by `numexr`, increasing the speed of per-particle scalar computations strongly. It's also really user-friendly.

**Incompatible adjustments to previous version**
* `postpic.Field` method `exporttocsv` is removed. Use `export` instead.
* `postpic.Field` method `transform` is renamed to `map_coordinates`, matching the underlying scipy-function.
* `postpic.Field` method `mean` has now an interface matching `ndarray.mean`. This means that, if the `axis` argument is not given, it averages across all axes instead the last axis.
* `postpic.Field.map_coordinates` applies now the Jacobian determinant of the transformation, in order to preserve the definite integral.
In your code you will need to turn calls to `Field.transform` into calls to `Field.map_coordinates` and set the keyword argument `preserve_integral=False` to get the old behaviour.
* `postpic.MultiSpecies.createField` has now keyword arguments (`bins`, `shape`), which replace the corresponding entries from the `optargsh` dictionary. The use of the`optargsh` keyword argument has been deprecated.
* The functions `MultiSpecies.compress`, `MultiSpecies.filter`, `MultiSpecies.uncompress` and `ParticleHistory.skip` return a new object now. Before this release, they modified the current object. Assuming `ms` is a `MultiSpecies` object, the corresponding adjustemens read:<br>
old: `ms.filter('gamma > 2')`<br>
new: `ms = ms.filter('gamma > 2')`
* `plotter_matplotlib` has a new default symmetric colormap

**Other improvements and new features**
* Overload of the `~` (invert) operator on `postpic.MultiSpecies`. If `ms` is a MultiSpecies object with filtered particles (created by the use of `compress` or `filter`), then `~ms` inverts the selection of particles.
* `postpic.Field` has methods `.loadfrom` and `.saveto`. These can be used to save a Field to a ` .npz` file for later use. Use `.loadfrom` to load a Field object from such a file. All attributes of the Field are restored.
* `postpic.Field` has methods `.export` and `.import`. These are used to export fields to and import fields from foreign file formats such as `.csv`, `.vtk`, `.png`, `.tif`, `.jpg`. It is not guaranteed to get all attributes back after `.export`ing and than `.import`ing a Field. Some formats are not available for both methods.
* `postpic` has a new function `time_profile_at_plane` that 'measures' the temporal profile of a pulse while passing through a plane
* `postpic` has a new function `unstagger_fields` that will take a set of staggered fields and returns the fields after removing the stagger
* `postpic` has a new function `export_vector_vtk` that takes up to three fields and exports them as a vector field in the `.vtk` format
* `postpic` has a new function `export_scalars_vtk` that takes up to four fields and exports them as multiple scalar fields on the same grid in the `.vtk` format
* `postpic.Field` works now with all numpy ufuncs, also with `ufunc.reduce`, `ufunc.outer`, `ufunc.accumulate` and `ufunc.at`
* `postpic.Field` now supports broadcasting like numpy arrays, for binary operators as well as binary ufunc operations
* `postpic.Field` has methods `.swapaxes`, `.transpose` and properties `.T` and `ndim` compatible to numpy.ndarray
* `postpic.Field` has methods `all`, `any`, `max`, `min`, `prod`, `sum`, `ptp`, `std`, `var`, `mean`, `clip` compatible to numpy.ndarray
* `postpic.Field` has a new method `map_axis_grid` for transforming the coordinates only along one axis which is simpler than `map_coordinates`, but also takes care of the Jacobian
* `postpic.Field` has a new method `autocutout` used to slice away close-to-zero regions from the borders
* `postpic.Field` has a new method `fft_autopad` used to pad a small number of grid points to each axis such that the dimensions of the Field are favourable to FFTW
* `postpic.Field` has a new method `adjust_stagger_to` to adjust the grid origin to match the grid origin of another field
* `postpic.Field` has a new method `phase` to get the unwrapped phase of the field
* `postpic.Field` has a new method `derivative` to calculate the derivative of a field
* `postpic.Field` has new methods `flip` and `rot90` similar to `np.flip()` and `np.rot90()`
* `postpic.Field.topolar` has new defaults for extent and shape
* `postpic.Field.integrate` now uses the simpson method by default
* `postpic.Field.integrate` now has a new 'fast' method that uses numexpr, suitable for large datasets
* New module `postpic.experimental` to contain experimental algorithms for your reference. These algorithms are not meant to be useable as-is, but may serve as recipes to write your own algorithms.
* k-space reconstruction from EPOCH dumps has greatly improved accuracy due to a new algorithm correctly incorporating the frequency response of the implicit linear interpolation performed by EPOCH's half-steps
* `plotter_matplotlib.plotField` allows to override `aspect` option to `imshow`

v0.3.1
------

2017-10-03

Only internal changes. Versioning is handled by [versioneer](https://github.com/warner/python-versioneer).


v0.3
----

2017-09-28

Many improvements in terms of speed and features. Unfortunately some changes are not backwards-compatible to v0.2.3, so you may have to adapt your code to the new interface. For details, see the corresponding section below.


**Highlights**
* kspace reconstruction and propagation of EM waves.
* `postpic.Field` properly handles operator overloading and slicing. Slicing can be index based (integers) or referring the actual physical extent on the axis of a Field object (using floats).
* Expression based interface to particle properties (see below)

**Incompatible adjustments to previous version**
* New dependency: Postpic requires the `numexpr` package to be installed now.
* Expression based interface of for particles: If `ms` is a `postpic.MultiSpecies` object, then the call `ms.X()` has been deprecated. Use `ms('x')` instead. This new particle interface can handle expressions that the `numexpr` package understands. Also `ms('sqrt(x**2 + gamma - id)')` is valid. This interface is easier to use, has better functionality and is faster due to `numexpr`.
The list of known per particle scalars and their definitions is available at `postpic.particle_scalars`. In addition all constants of `scipy.constants.*` can be used.
In case you find particle scalar that you use regularly which is not in the list, please open an issue and let us know!
* The `postpic.Field` class now behaves more like an `numpy.ndarray` which means that almost all functions return a new field object instead of modifying the current. This change affects the following functions: `half_resolution`, `autoreduce`, `cutout`, `mean`.


**Other improvements and new features**
* `postpic.helper.kspace` can reconstruct the correct k-space from three EM fields provided to distinguish between forward and backward propagating waves (thanks to @Ablinne)
* `postpic.helper.kspace_propagate` will turn the phases in k-space to propagate the EM-wave.
* List of new functions in `postpic` from `postpic.helper` (thanks to @Ablinne): `kspace_epoch_like`, `kspace`, `kspace_propagate`.
* `Field.fft` function for fft optimized with pyfftw (thanks to @Ablinne).
* `Field.__getitem__` to slice a Field object. If integers are provided, it will interpret them as gridpoints. If float are provided they are interpreted as the physical region of the data and slice along the corresponding axis positions (thanks to @Ablinne).
* `Field` class has been massively impoved (thanks to @Ablinne): The operator overloading is now properly implemented and thanks to `__array__` method, it can be interpreted by numpy as an ndarray whenever necessary.
* List of new functions of the `Field` class (thanks to @Ablinne): `meshgrid`, `conj`, `replace_data`, `pad`, `transform`, `squeeze`, `integrate`, `fft`, `shift_grid_by`, `__getitem__`, `__setitem__`, `evaluate`.
* List of new properties of the `Field` class (thanks to @Ablinne): `matrix`, `real`, `imag`, `angle`.
* Many performance optimizations using pyfftw library (optional) or numexpr (now required by postpic) or by avoiding in memory data copying.
* Lots of fixes


v0.2.3
------

2017-02-17

This release brings some bugfixes and various new features.

**Bugfixes**
* Particle property Bz.
* plotting of contourlevels.

**Improvements and new features**
* openPMD support (thanks to @ax3l).
* ParticleHistory class to collect particle information over the entire simulation.
* added particle properties v{x,y,z} and beta{x,y,z}.
* Lots of performance improvemts: particle data will be much less copied in memory now.


v0.2.2 and earlier
------------------

There hasnt been any changelog. Dont use those versions anymore.
Loading