Before you do anything with PyModelFit, you’ll need:
Follow the instructions on those sites, or, far easier, install them as packages from your operating system (e.g. apt-get or the synaptic GUI on Ubuntu, Macports on OS X, etc.).
Once you have the requirements satisfied, you have a few options for installing pymodelfit.
Note
On most unix-like systems, you will need to either execute these commands as the root user, or preface them with sudo.
If you have pip (the new, better easy installer) or easy_install/setuptools (you should probably install pip...), just run either:
pip install pymodelfit
or:
easy_install pymodelfit
If you are installing from source code, instead, just do:
python setup.py install
A few other outside packages add useful functionality to PyModelFit. These are not required, but are highly recommended for the full PyModelFit experience.
For general publication-quality plotting of data and models, the following package is suggested:
- Matplotlib
Can be installed with pip install matplotlib
To use the useful FitGui interactive model-fitting tool, the following three packages are necessary (with the suggested install command, if you don’t have the package already available on your system):
For the MultiFitGui model-fitting tool, another package is needed for 3D rendering:
- Mayavi2
pip install mayavi
Finally, Markov Chain Monte Carlo (MCMC) fitting is available for models via the pymodelfit.FunctionModel.getMCMC() method. To work, this requires an additional package:
- pymc
pip install pymc
PyModelFit is an open source project, and contributions are welcome. The github project page has the development version of the source code, as well as the bug tracker. Code guidelines are the same as for the astropysics project, and are detailed at that project’s documentation page.
You can get the latest version by installing git and running the command:
git clone git://github.com/eteq/pymodelfit.git
then install it via:
python setup.py install
or:
python setup.py develop
Use the second option if you want to easily edit the source code and immediately see your changes in the installed version.