skillfed

photutils

An Astropy package for source detection and photometry

photutils v3.0.0 164.0K downloads/30d#10,557 on PyPI305
Permissive license BSD-3-Clause Active released

What it is and what it does

Photutils is an Astropy-affiliated Python library for detecting and measuring astronomical sources in images. It provides a suite of tools covering the full photometry workflow: background estimation and subtraction, star and source detection, aperture and PSF photometry, image segmentation, centroid calculation, radial profile extraction, and elliptical isophote fitting. The package is built on numpy and scipy for numerical computation and integrates tightly with Astropy's coordinate and unit systems, making it a standard choice for astronomical image analysis pipelines.

The library is actively maintained and supports current Python versions (3.11+). It includes compiled Cython extensions for performance-critical operations, available as pre-built wheels for common platforms. With no known security vulnerabilities, it is a mature and widely-used component of the astronomical Python ecosystem.

Use it for:

  • Detect point sources and extended objects in survey images or deep field observations.
  • Measure flux and magnitudes of stars and galaxies using aperture or PSF-fitting photometry.
  • Estimate and subtract background in astronomical images for improved source detection.
  • Segment and analyze morphology of galaxies or nebulae in multi-wavelength imaging.
  • Extract radial profiles and fit isophotes to characterize source structure and properties.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Photutils provides tools for detecting and measuring astronomical sources in images, including background estimation, star finding, aperture photometry, PSF photometry, source segmentation, and isophote fitting.

Yes. Photutils is a well-maintained, actively developed library with no security issues, permissive licensing, and broad adoption in the astronomy community. The medium install friction from compiled extensions is standard for scientific Python packages and offset by pre-built wheels. Install it if you work with astronomical imaging data and need production-grade source detection or photometry tools.

Install

photutils on PyPI

pip

pip install photutils

uv

uv add photutils

poetry

poetry add photutils

Installing photutils

Before you install

Medium install friction due to compiled Cython extensions, but actively maintained with recent releases and well-integrated with the Astropy ecosystem. Requires Python 3.11 or later.

License in practice

BSD-3-Clause permissive license allows use in most projects, including commercial and proprietary work, with minimal restrictions beyond attribution.

Quickstart

pip install photutils

import photutils
from photutils.detection import find_peaks
from photutils.aperture import aperture_photometry
import numpy as np

# Detect sources and perform aperture photometry
sources = find_peaks(image_data, threshold=3.0)
phot = aperture_photometry(image_data, apertures)

Requires Python 3.11 or later; compiled wheels available for macOS (x86_64, arm64), Linux (x86_64), and Windows (x86_64), but installation from source requires a C compiler and Cython.

Verify before relying

  • Performance characteristics for real-time or large-scale survey pipelines.
  • Specific version compatibility with other Astropy affiliated packages beyond core Astropy.
  • Whether monthly download volume reflects active production use or broader adoption patterns.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies 3 — astropy, numpy, scipy
Maintenance actively maintained — 119 days since the last release
Last repo commit
First released
Downloads 164,043/month — #10,557 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: photutils-3.0.0-cp311-abi3-macosx_10_9_x86_64.whl; photutils-3.0.0-cp311-abi3-macosx_11_0_arm64.whl; photutils-3.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; photutils-3.0.0-cp311-abi3-win_amd64.whl

Keywords: astronomy, astrophysics, photometry, aperture, psf, source detection, background, segmentation, centroids, isophote, morphology, radial profiles

Intended Audience :: Science/ResearchNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Astronomy

Tags

astronomical source detectionaperture photometryPSF photometrybackground estimation astronomyimage segmentation astronomystar findingastronomical image analysis
astronomyimage-analysisphotometry

More Astronomy packages