eloy.psf
========

.. py:module:: eloy.psf

.. autoapi-nested-parse::

   Point Spread Function (PSF) modeling utilities.

   This module provides functions for estimating PSF parameters using image moments
   and fitting 2D Gaussian models to image data.



Attributes
----------

.. autoapisummary::

   eloy.psf.gaussian_sigma_to_fwhm


Functions
---------

.. autoapisummary::

   eloy.psf.moments
   eloy.psf.fit_gaussian


Module Contents
---------------

.. py:data:: gaussian_sigma_to_fwhm

.. py:function:: moments(data)

   Estimate the moments of a 2D distribution.

   :param data: 2D image data.
   :type data: np.ndarray

   :returns: Dictionary of estimated parameters: amplitude, x, y, sigma_x, sigma_y, background, theta, beta.
   :rtype: dict


.. py:function:: fit_gaussian(data, init=None)

   Fit a 2D Gaussian to the data.

   :param data: 2D image data.
   :type data: np.ndarray
   :param init: Initial parameter estimates.
   :type init: dict or None, optional

   :returns: Dictionary of fitted parameters: amplitude, x, y, sigma_x, sigma_y, theta, background.
   :rtype: dict


