stacked_seds.photometry

This module provides functions for performing radial photometry on stacked galaxy images.

Functions

get_radial_profile(data, center)

Calculates the azimuthally averaged radial profile of an image.

fit_background(radii, radial_profile, fit_range)

Fits a quadratic function to the background of a radial profile.

get_pixel_scale(header)

Calculates the pixel scale from a FITS header in arcsec/pixel.

Detailed API

stacked_seds.photometry.get_radial_profile(data, center)[source]

Calculates the azimuthally averaged radial profile of an image.

Parameters:
  • data (np.ndarray) – The 2D image data.

  • center (tuple) – The (x, y) coordinates of the center.

Returns:

A tuple containing:
  • np.ndarray: The radial distance of each bin in pixels.

  • np.ndarray: The mean flux value in each radial bin.

  • np.ndarray: The standard error of the mean flux in each bin.

Return type:

tuple

stacked_seds.photometry.fit_background(radii, radial_profile, fit_range)[source]

Fits a quadratic function to the background of a radial profile.

Parameters:
  • radii (np.ndarray) – Array of radial distances.

  • radial_profile (np.ndarray) – Array of flux values at each radius.

  • fit_range (list) – A list [start, end] defining the pixel range for the fit.

Returns:

The modeled background flux at each radius.

Return type:

np.ndarray

stacked_seds.photometry.get_pixel_scale(header)[source]

Calculates the pixel scale from a FITS header in arcsec/pixel.