This is the Hammurabi Code Wiki. For questions or problems not addressed here, contact tjaffe.
The Hammurabi code is a C++ code for simulating Galactic emission and other observable effects of astrophysical magnetic fields. It is described in Waelkens et al. A&A 2009 and it is distributed under a GNU free software license.
A good place to start is the Jupyter notebooks. They are included in this repository (under hampy), but you can also view them nicely on GitHub. The Hammurabi Tour notebook summarizes hammurabi's capabilities.
For most common usages, see this annotated parameter file, which provides some simple documentation. See also testing for a few simple tests as well as some more complicated tests for more determined users.
For a discussion of the more complex usages of hammurabi such as anisotropic random fields, running analytically versus numerically, how the Jansson & Farrar (2012) and Jaffe et al. (2010) models are computed, etc., see the note on subtleties.
For the models published in paper Planck intermediate results. XLII. Large-scale Galactic magnetic fields, see the planck parameter files.
Notes:
The Garfields code from Kitaura & Ensslin was originaly bundled with hammurabi and can now be found under files/obsolete/Garfields, though it is no longer being maintained.
The original version of the NE2001 code (a modified version of which is included with hammurabi) is available here or here
The old hammurabi page at http://www.mpa-garching.mpg.de/hammurabi/ should redirect here.
Wiki: build
Wiki: build_galprop
Wiki: pfile
Wiki: subtleties
Wiki: testing