My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

Pynbody is intended as a light-weight, portable, format-transparent analysis framework for N-body and SPH astrophysical simulations. Written in python, the core tools are accompanied by a library of high-quality publication-level analysis routines. (Or, at least, that's the aim; if you're looking for something polished perhaps check back in a few months.)

Get started with Installation and browse through an index of pynbody's functionality

With a little ingenuity, pynbody can be used to render videos.

More immediately, it can do non-trivial SPH and N-body analysis right out of the box.

python
>>> import pynbody, pynbody.plot             # load the module
>>> s = pynbody.load('simulationfile.name')  # read the simulation file
>>> s.physical_units()
>>> h = s.halos()                      # read the corresponding halo catalogue
>>> import pynbody.plot.sph
>>> pynbody.plot.sph.sideon_image(h[1].gas) # make an SPH rendering of the gaseous disc, side-on

>>> pynbody.plot.rotation_curve(h[1])  # plot the disk rotation curve for halo ID 1

In addition, the goal is to connect pynbody to visualization tools like tipsy, or paraview, or potentially to port some of the vis code from pynbody's predecessor SimAn so that it is easy to visualize and rotate your simulation in 3D seamlessly inside the analysis tool.

Powered by Google Project Hosting