shapepipe.utilities.galaxy

shapepipe.utilities.galaxy

GALAXY TOOLS.

This module defines methods to deal with galaxy images.

Author

Martin Kilbinger <martin.kilbinger@cea.fr>

sigma_to_fwhm(sigma, pixel_scale=1.0)[source]

Convert Sigma to FWHM.

Transform standard deviation of a 1D Gaussian, sigma, to FWHM (Full Width Half Maximum).

Parameters
  • sigma (numpy.ndarray) – input standard deviation(s)

  • pixel_scale (float, optional, default=1) – pixel size in arcsec, set to 1 if no scaling required

Returns

fwhm – output fwhm(s)

Return type

(array of) float

Raises
  • TypeError – If sigma is not of type numpy array or float

  • TypeError – If sigma array values are not of type float

  • TypeError – If pixel_scale is not of type float

  • ValueError – If sigma array values are not greater than 0.0

  • ValueError – If sigma is not greater than 0.0

  • ValueError – If pixel_scale is not greater than 0.0

Notes

To compute the FWHMh for a 1D Gaussian N(x), solve the equation

\[N(x) = (\sigma \sqrt{2\pi})^{-1} \exp[x^2/2\sigma^2] = \frac 1 2 N(x)\]

for \(x\). The FWHM is \(x + (-x) = 2x\). The solution is

\[\textrm{FWHM} = 2 \sqrt(2 \ln 2) \sigma \approx 2.355 \sigma\]