GALFITools: A Python library to enhance GALFIT usage in galaxy image modeling

GALFITools: A Python library to enhance GALFIT usage in galaxy image modeling - Published in JOSS (2025)

https://github.com/canorve/galfitools

Science Score: 87.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

python python3
Last synced: about 2 months ago · JSON representation

Repository

A library for GALFIT

Basic Info
  • Host: GitHub
  • Owner: canorve
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 83.7 MB
Statistics
  • Stars: 17
  • Watchers: 1
  • Forks: 3
  • Open Issues: 0
  • Releases: 6
Topics
python python3
Created over 7 years ago · Last pushed 2 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Authors

README.rst

.. These are examples of badges you might want to add to your README:
   please update the URLs accordingly

    .. image:: https://api.cirrus-ci.com/github//GALFITools.svg?branch=main
        :alt: Built Status
        :target: https://cirrus-ci.com/github//GALFITools
    .. image:: https://readthedocs.org/projects/GALFITools/badge/?version=latest
        :alt: ReadTheDocs
        :target: https://GALFITools.readthedocs.io/en/stable/
    .. image:: https://img.shields.io/coveralls/github//GALFITools/main.svg
        :alt: Coveralls
        :target: https://coveralls.io/r//GALFITools
    .. image:: https://img.shields.io/conda/vn/conda-forge/GALFITools.svg
        :alt: Conda-Forge
        :target: https://anaconda.org/conda-forge/GALFITools
    .. image:: https://pepy.tech/badge/GALFITools/month
        :alt: Monthly Downloads
        :target: https://pepy.tech/project/GALFITools
    .. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter
        :alt: Twitter
        :target: https://twitter.com/GALFITools

.. image:: https://readthedocs.org/projects/GALFITools/badge/?version=latest
        :alt: ReadTheDocs
        :target: https://GALFITools.readthedocs.io/en/stable/

.. image:: https://img.shields.io/pypi/v/GALFITools.svg
    :alt: PyPI-Server
    :target: https://pypi.org/project/GALFITools/

.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
    :alt: Project generated with PyScaffold
    :target: https://pyscaffold.org/

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8216472.svg 
  :target: https://doi.org/10.5281/zenodo.8216472 

.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg 
   :target: CODE_OF_CONDUCT.md 

.. image:: https://www.repostatus.org/badges/latest/active.svg
   :alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed.
   :target: https://www.repostatus.org/#active


.. image:: https://github.com/canorve/galfitools/actions/workflows/run-test.yml/badge.svg
   :target: https://github.com/canorve/galfitools/actions/workflows/run-test.yml
   :alt: Build Status

.. image:: https://codecov.io/gh/canorve/galfitools/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/canorve/galfitools
   :alt: Coverage

.. image:: https://img.shields.io/pypi/pyversions/GALFITools.svg
   :target: https://pypi.org/project/GALFITools/
   :alt: Supported Python versions

.. image:: https://pyopensci.org/badges/peer-reviewed.svg
   :target: https://github.com/pyOpenSci/software-review/issues/220
   :alt: pyOpenSci Peer-Reviewed


============
GALFITools
============

`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.


**NOTE:** GALFITools assumes the user has a basic knowledge of GALFIT and SaoImage DS9.  
How to use GALFIT is found in the official `GALFIT `_ webpage.  
The DS9 webpage can be found `here `_ and a basic tutorial `here `_.
Useful concepts with related functions and CLI commands can be found 
`here `_.


.. _GALFIT: https://users.obs.carnegiescience.edu/peng/work/galfit/GFAQ.html
.. _GALFIT2: https://users.obs.carnegiescience.edu/peng/work/galfit/galfit.html
.. _ds9: https://sites.google.com/cfa.harvard.edu/saoimageds9
.. _ds9_tutorial: https://astrobites.org/2011/03/09/how-to-use-sao-ds9-to-examine-astronomical-images



-----------------------------------

**Installation Instructions**
-----------------------------------

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 `__.

GALFITools supports Python 3.9 through 3.13.   
*Optionally*, we recommend using 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:


.. image:: https://img.youtube.com/vi/rqZLxR1yRCs/maxresdefault.jpg
    :alt: IMAGE ALT TEXT HERE
    :target: https://www.youtube.com/watch?v=rqZLxR1yRCs



------------------------------------

**Get Started with GALFITools**
-----------------------------------

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 " 


-------------------

**Documentation**
-------------------

Full documentation along usage guide can be found in `https://galfitools.readthedocs.io/en/latest/ `__.



------------------------------

**Contributing and Support**
-------------------------------

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 `__. 


--------------

**License**
--------------

The codebase of GALFITools is governed by the terms of the **MIT** license.


----------------------

**Credit / Citation**
-----------------------

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



--------------------------

**Additonal Resources**
--------------------------


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: 

`EllipSect `__


.. _pyscaffold-notes:


====

Note
~~~~~~

This project has been set up using PyScaffold 4.2.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.



JOSS Publication

GALFITools: A Python library to enhance GALFIT usage in galaxy image modeling
Published
December 31, 2025
Volume 10, Issue 116, Page 9534
Authors
Christopher Añorve ORCID
Facultad de Ciencias de la Tierra y el Espacio, Universidad Autónoma de Sinaloa, México
Editor
Warrick Ball ORCID
Tags
astronomy galaxy modeling GALFIT photometry

GitHub Events

Total
  • Release event: 2
  • Watch event: 6
  • Push event: 157
  • Pull request event: 1
  • Fork event: 2
  • Create event: 4
Last Year
  • Release event: 1
  • Watch event: 4
  • Push event: 155
  • Pull request event: 1
  • Fork event: 2
  • Create event: 3

Issues and Pull Requests

Last synced: 2 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 64 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: galfitools

A library for GALFIT package

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 64 Last month
Rankings
Dependent packages count: 7.5%
Downloads: 12.6%
Stargazers count: 23.3%
Average: 28.7%
Forks count: 30.2%
Dependent repos count: 69.8%
Maintainers (1)
Last synced: 3 months ago

Dependencies

docs/requirements.txt pypi
  • astropy >=5.1
  • matplotlib >=3.5.2
  • mgefit >=5.0.13
  • numpy >=1.22.4
  • scipy >=1.9.1
  • sphinx >=3.2.1
pyproject.toml pypi
setup.py pypi
.github/workflows/draft-pdf.yml actions
  • EndBug/add-and-commit v9 composite
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • openjournals/openjournals-draft-action master composite
.github/workflows/run-test.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v4 composite