Skip to content

Commit

Permalink
added README, LICENSE and CONTRIBUTING
Browse files Browse the repository at this point in the history
The current version of the postpic project is still und has ever been
private. It will be published soon.
  • Loading branch information
skuschel committed Sep 15, 2014
1 parent 7e26983 commit 16ff8b1
Show file tree
Hide file tree
Showing 16 changed files with 980 additions and 1 deletion.
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

Contributing to the PostPic code base
=====================================

Any help contributing to the PostPic project ist greatly appreciated. Feel free to contact any of the developers.

Why me?
-------

because you are using it!


How to contribute?
------------------

First you have to be familiar with [git](http://git-scm.com/). Its a distributed version control system created by Linus Torvalds (and more importantly: he is also using it for maintaining the linux kernel). There is a nice introduction to git at [try.github.io/](http://try.github.io/), but in general you can follow the bootcamp section at [https://help.github.com/](https://help.github.com/) for your first steps.

## The Workflow

The typical workflow should be:

0. [Fork](https://help.github.com/articles/fork-a-repo) the PostPic repo to your own GitHub account.
0. Clone from your fork to your local computer.
0. Implement a new feature/bugfix/documentation/whatever commit to your local repository. It is highly recommended that new features will have test cases.
0. Make sure all tests are running smoothly (the `run-tests` script also involves pep8 style verification!)
0. push to your fork and create a pull request to merge your changes into the codebase.

## Coding and general remaks

* You should make sure, that the `run-tests` script works properly on EVERY commit. To do so, it is HIGHLY RECOMMENDED to add the `pre-commit` script as the git pre-commit hook. For instructions see [pre-commit](../master/pre-commit).
* The Coding style is according to slightly simplified pep8 rules. This is included in the `run-tests` script. If that script runs without error, you should be good to <del>go</del> commit.
* If your implemented feature works as expected you can set the pull request to the master branch. Additional branches should be used only if there are unfinished or experimental features.
* Add the GPLv3+ licence notice on top of every new file. If you add a new file you are free to add your name as a author. This will let other people know that you are in charge if there is any trouble with the code. This is only useful if the file you provide adds functionality like a new datareader. Thats why the `__init__.py` files typically do not have a name written. In doubt, the git revision history will always show who added which line.



## What to contribute?

Here is a list for your inspiration:

* Report bugs at the [Issues](https://github.com/skuschel/postpic/issues) page.
* Fix bugs from the [Issues](https://github.com/skuschel/postpic/issues) page.
* Add python docstrings to the codebase.
* Add new features.
* Add new datareader for additional file formats.
* ...
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
PostPic
=======

PostPic is a open-source post processor for Particle-in-cell (PIC) simulations written in python. If you are doing PIC Simulations (likely for you PhD in physics...) you need tools to provide proper post-processing to create nice graphics from many GB of raw simulation output data -- regardless of what simulation code you are using.

Idea of PostPic
---------------

The basic idea of PostPic is to calculate the plots you are interested in just from the basic data the Simulation provides. This data includes electric and magnetic fields and a tuple (weight, x, y, z, px, py, pz) for every macro-particle. Anything else you want to look at (for example a spectrum at your detector) should just be calculated from these values. This is exactly what postpic can do for you, and even more:

PostPic has a unified interface for reading the required simulation data. If the simulation code of your choice is not supported by postic, this is the perfect opportunity to add a new datareader.

Additionally PostPic can plot and label your plot automatically. This makes it easy to work with and avoids mistakes. Currently matplotlib is used for that but this is also extensible.

Usage
-----

Download the latest version and run

`python2 setup.py install --user`

to install PostPic in your local home folder. After that you should be able to import it into any python session using `import postpic`.

If you are changing the postpic codebase it is probably better to link the current folder. This can be done by

`python2 setup.py develop --user`

However, PostPic's main functions should work but there is still much work to do and lots of documentation missing. If postpic awakened your interest you are welcome to contribute. Even if your programming skills are limited there are various ways how to contribute and adopt PostPic for your particular research. Read [CONTRIBUTING.md](../master/CONTRIBUTING.md).


PostPic in Science
------------------

If you use PostPic for your research and present or publish results, please show your support for the PostPic project and its [contributers](https://github.com/skuschel/postpic/graphs/contributors) by:

* Add a note in the acknowledgements section of your publication.
* Drop a line to one of the core developers including a link to your work to make them smile (there might be a public list in the future).

License
-------

Postpic is released under GPLv3+. See [http://www.gnu.org/licenses/gpl-howto.html](http://www.gnu.org/licenses/gpl-howto.html) for further information.
17 changes: 17 additions & 0 deletions postpic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#

"""
+--------------+
| POSTPIC |
Expand Down
17 changes: 17 additions & 0 deletions postpic/_const.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#

"""
Some global constants that are used in the code.
"""
Expand Down
16 changes: 16 additions & 0 deletions postpic/analyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
"""
Analyzer package provides Classes and functions for analyzing
Particle and Field Data.
Expand Down
17 changes: 17 additions & 0 deletions postpic/analyzer/analyzer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
import re

__all__ = ['PhysicalConstants', 'SpeciesIdentifier']
Expand Down
17 changes: 17 additions & 0 deletions postpic/analyzer/fields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
"""
Field related routines.
"""
Expand Down
17 changes: 17 additions & 0 deletions postpic/analyzer/particles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
"""
Particle related routines.
"""
Expand Down
17 changes: 17 additions & 0 deletions postpic/datahandling.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel, 2014
"""
The Core module for final data handling.
Expand Down
17 changes: 17 additions & 0 deletions postpic/datareader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
'''
The Datareader package contains methods and interfaces to read data from
any Simulation.
Expand Down
17 changes: 17 additions & 0 deletions postpic/datareader/dummy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
'''
Dummy reader for creating fake simulation Data for testing purposes.
Expand Down
17 changes: 17 additions & 0 deletions postpic/datareader/epochsdf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Stephan Kuschel 2014
'''
Reader for SDF File format written by the EPOCH Code:
http://ccpforge.cse.rl.ac.uk/gf/project/epoch/
Expand Down
16 changes: 16 additions & 0 deletions postpic/plotting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
'''
The plot subpackage should provide an interface to various plot backends.
'''
Expand Down
16 changes: 16 additions & 0 deletions postpic/plotting/plotter_matplotlib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
"""
This package provides the MatplotlibPlotter Class.
Expand Down
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#!/usr/bin/env python2

#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
from setuptools import setup
from postpic import __version__

Expand Down

0 comments on commit 16ff8b1

Please sign in to comment.