The MegaMorph project has produced new versions of GALFIT and GALAPAGOS with several novel developments. The most significant, and well-tested, of these is the implementation of multi-band fitting. This enables a single, consistent, wavelength-dependent model to be fit to any collection of pixel registered images. We have also included an experimental method for including a non-parametric component in the fit, which can help improve the robustness of fits against the effects of features such as spiral arms, bars, nuclear sources, and un-masked neighbours. Finally, we have added the ability to use MultiNest sampling as an alternative to Levenburg-Marquardt minimisation, but this is not yet recommended for general use.

This work was made possible by generous funding from the Qatar National Research Fund (NPRP grant 08-643-1-112). The main personnel who have worked to create, test and apply the code are: Steven Bamford (Nottingham), Boris Haeussler (Nottingham/Oxford), Marina Vika (CMU-Qatar) and Alex Rojas (CMU-Qatar). Others who have directly contributed to the development and early science verification include Benedetta Vulcani (CMU-Q/IPMU), Lee Kelvin (St.Andrews/UWA/Innsbruck), Marco Barden (Innsbruck), Chien Peng (Carnegie Obs./GMTO), Arianna Cortesi (Nottingham/IAG-USP), Rebecca Kennedy (Nottingham), Jim Cresswell (CMU-Q), Andrea Borch (CMU-Q). The core-Sérsic model was implemented by Paolo Bonfini (Swinburne).

Our developments build upon the existing code and efforts of Chien Peng (GALFIT) and Marco Barden (GALAPAGOS), and we are indebted to them for allowing us to include our developments in their software. Much of the advice given on their respective websites is equally applicable to our versions, and any publications based on our software should also cite the appropriate original GALFIT and GALAPAGOS papers.

Some documentation is provided below, but it is still rather incomplete. For now, we also recommend emailing the relevant maintainer(s) for further advice on using the code.

If you have any questions or problems, you can ask for help on our Google+ community group. As new versions are produced they will be announced on our Google+ page, so please follow that to keep up-to-date with developments.


Our software is available below. Please bear in mind that this is work in progress, and while some features are complete and well-tested, others are less so.

For important information about recent changes, please consult the release notes.


Primarily maintained by Steven Bamford.

The latest version is 1.2.1. Executables for various platforms can be downloaded from the links below.

Documented example input files:

The source code is not distributed publicly due to licensing issues. Please contact us if you wish to contribute to the code development or need executables for another platform.


Primarily maintained by Boris Haeussler.

Development and releases of the GALAPAGOS-2 IDL code are now hosted on GitHub. A detailed usage guide and set of examples are included.

Issues and caveats

  • GALFITM should be backward compatible with GALFIT3. On single-band data most of the code executed is identical, however constraints are handled in a slightly different way, which means that you will occasionally see significant differences in the final parameters returned by GALFITM and GALFIT3. Please let us know if you have a FEEDME file that works correctly with GALFIT3 but not GALFITM. Note however, that there are many additional options in GALFITM, and so even single-band GALFITM FEEDME files will often not work with GALFIT3.
  • Use of truncations and fourier modes is not completely implemented, and entirely untested, in GALFITM. If you need to use these features with multi-band data, and are willing to help with testing, then get in touch!
  • Almost all our testing has used only the Sérsic, PSF, exponential disc and sky functions. The way that we have implemented the multi-band method means that it should work with any of the standard GALFIT functions. However, if you discover anything odd, please let us know.
  • GALFITM prior to version 1.2.0 was based upon GALFIT-3.0.2. It therefore did not include some of Chien Peng's latest additions to GALFIT (on version 3.0.5 at time of writing). These are merged into GALFITM version 1.2.0. The changes are mostly minor, primarily the addition of flags providing information about potential issues with a fit. However, internally-generated sigma images are now smoothed, which generally results in small (but occasionally significant) changes to fitting results. Feedback on this is welcomed.
  • Although implemented, the use of MultiNest sampling has not been tested much, and is very slow, prohibitively so for models with multiple components and wavelength freedom. It is definitely not ready for serious use.
  • GALFITM is still in active development, and there are some rough areas that could do with some work to make them more suitable for public use. While the central functionality is unikely to change substantially, the software will continue to be refined and polished. New versions, and the changes involved, will be announced via our Google+ page and community.


Follow our Google+ page for announcements, and join in the discussion on our community page.