Postpic
The open-source particle-in-cell post-processor.
Install / Use
/learn @skuschel/PostpicREADME
postpic
Postpic is an 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.
For working examples, please go to https://github.com/skuschel/postpic-examples
With questions, issues, ideas or general remarks feel free to get in touch via
- the public matrix chatroom: https://matrix.to/#/#postpic:matrix.org
- or use the Github issue tracker
The (technical, but complete) documentation is hosted on https://skuschel.github.io/postpic/
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, id, mass, charge, time) for every macro-particle. Anything else you like 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.
Installation
Postpic can be used with Python 3 or higher. The use of Python 2 is deprecated and will be removed in the future.
- Always install in a virtualenv. You can create a new virtualenv with:
python -m venv --system-site-packages ~/.venv/defaultpyvenv
-
activate the environment using
source ~/.venv/defaultpyvenv/bin/activate. -
Install into the venv
pip install git+https://github.com/skuschel/postpic.git
Please note that, depending on your system python setup, pip may default to python2.
In that case you will need use pip3 instead to make sure that postpic is installed for python3:
pip3 install git+https://github.com/skuschel/postpic.git
The latest release is also available in the python package index pypi, thus it can be installed by using the python package manager pip:
pip install --user postpic
Developers should clone the git repository (or their fork of it) and install it using
pip install -e .
This command will link the current folder to global python scope, such that changing the code will immediately update the installed package.
After installing you should be able to import it into any python session using import postpic.
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.
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 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 for further information.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
92.1kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
343.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

