Pynbody Documentation

Welcome to the documentation for pynbody – an analysis package for astrophysical N-body and Smooth Particle Hydrodynamics simulations, supporting python 2.6+ and 3.3+.

We recommend you get started by reading about Pynbody Installation and trying the Pynbody Tutorials. To obtain assistance, open a github issue.

Where next?

Consult the Pynbody Installation documentation for instructions on how to get going. Then you might like to download some test data and try out the first steps tutorial which gets straight to some of pynbody’s analysis features. Or, if you prefer to learn a little more of how your data is organized, we also provide a data access walkthrough.

Our full documentation is organized into three sections:

All of the information in the reference guide is also available through the interactive python help system. In ipython, this is as easy as putting a ? at the end of a command:

In [1]: import pynbody

In [2]: pynbody.load?
Signature: pynbody.load(filename, *args, **kwargs)
Docstring:
Loads a file using the appropriate class, returning a SimSnap
instance.
File:      ~/Science/pynbody/pynbody/snapshot/__init__.py
Type:      function

Seeking Further Assistance

If the tutorials and reference documentation don’t answer your question, any problem might be described in Common Pitfalls.

We have found that most development discussion takes place within our github issue tracker – if you encounter a problem, feel free to create an issue there. We greatly value feedback from users, especially when things are not working correctly because this is the best way for us to correct bugs. This includes any problems you encounter with documentation.

If you use the code regularly for your projects, please consider contributing your code back using a pull request.

Acknowledging Pynbody in Scientific Publications

Pynbody development is an open-source, community effort. The only way to make it as robust as possible is to have a wide user-base and this is only possible by spreading the word. We ask that if you use pynbody in preparing a scientific publication, you cite it via its Astrophysics Source Code Library entry using the following BibTex:

@misc{pynbody,
  author = {{Pontzen}, A. and {Ro{\v s}kar}, R. and {Stinson}, G.~S. and {Woods},
     R. and {Reed}, D.~M. and {Coles}, J. and {Quinn}, T.~R.},
  title = "{pynbody: Astrophysics Simulation Analysis for Python}",
  note = {Astrophysics Source Code Library, ascl:1305.002},
  year = 2013
}