Getting Started with PyModelFit
===============================
Requirements
------------
Before you do anything with PyModelFit, you'll need:
* `Python `_ 2.5 or higher (2.6 highly recommended), although 3.x is not yet supported.
* `numpy `_
* `scipy `_
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.).
Install
-------
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
Additional Recommended Packages
-------------------------------
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 :class:`~pymodelfit.fitgui.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):
* `Traits `_
``pip install traits``
* `TraitsGUI `_
``pip install traitsGUI``
* `Chaco `_
``pip install chaco``
For the :class:`~pymodelfit.fitgui.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
:func:`pymodelfit.FunctionModel.getMCMC` method. To work, this requires an
additional package:
* `pymc `_
``pip install pymc``
Developing PyModelFit
---------------------
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 :mod:`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.