GALFIT, a well-established two-dimensional image fitting algorithm, as outlined in the work by Peng et al. (2002, AJ, 124, 266), serves as the basis for precise astronomical image surface brightness analysis. In pursuit of optimizing the utilization of GALFIT, GALFITools emerges as an collection of Python routines. These routines enhances the input and output parsing associated with GALFIT.
GALFITools extends its utility through an array of functionalities, including the facilitation of mask creation, star selection for PSFs, generation of multiple initial parameters, simulate galaxy images, multigaussian expansion (MGE) fitting, as well as computation of sky background and other pertinent photometric variables.
First of all, install GALFIT if you haven't done so. Check instructions here. Make sure that GALFIT can run in any path in your linux/macOS terminal.
If you want to learn how to use GALFIT, click here.
Optionally, consider setting up a virtual environment.
Install GALFITools via pip:
pip install GALFITools
Here is a detailed video tutorial on installing GALFITools using a virtual environment created with Conda:
Once installed, you can test GALFITools using any of the commands in the console.
In the example below, the command getReComp is executed in a terminal using the GALFIT output file galfit.01 to calculate the effective radius of a model with three Sersic components:
$ getReComp galfit.01 GALFITools: a library for GALFIT Version: 1.14.1 webpage: https://github.com/canorve/GALFITools number of model components: 3 Using a theta value of : 14.13 degrees Total Magnitude of the galaxy: 9.79 Surface brightness at radius of 50% of light (μr): 21.15 mag/'' Mean Surface Brightness at effective radius (<μ>e): 20.27 mag/'' The radius at 50% of light is 199.64 pixels or 49.91 "
Full documentation along usage guide can be found in https://galfitools.readthedocs.io/en/latest/.
Let us know if you have issues, questions or innovative suggestions arise, we encourage you to reach out via email to canorve [at] gmail [dot] com or initiate a discussion by opening an issue. Your input is invaluable in fostering the continual refinement of GALFITools, for the betterment of the GALFIT community and beyond.
- Issue tracker: https://github.com/canorve/GALFITools/issues.
- Source code: https://github.com/canorve/GALFITools.
- Contributions and help.
The codebase of GALFITools is governed by the terms of the MIT license.
If you find this code useful in your research, we kindly request that you cite it as follows:
Añorve, C. (2024). canorve/GALFITools: GALFITools v1.15.0 (v1.15.0). Zenodo. https://doi.org/10.5281/zenodo.13994492
cite all versions using the DOI: https://doi.org/10.5281/zenodo.8216472
For further capabilities and valuable extensions pertaining to GALFIT output, such as the generation of surface brightness profiles and estimation of other photometric parameters, we invite you to explore the EllipSect tool:
This project has been set up using PyScaffold 4.2.1. For details and usage information on PyScaffold see https://pyscaffold.org/.