opticam.background.local_background =================================== .. py:module:: opticam.background.local_background Classes ------- .. autoapisummary:: opticam.background.local_background.BaseLocalBackground opticam.background.local_background.DefaultLocalBackground Module Contents --------------- .. py:class:: BaseLocalBackground(r_in_scale = 5, r_out_scale = 7.5, sigma_clip = SigmaClip(sigma=3, maxiters=10)) Bases: :py:obj:`abc.ABC` Base class for local background estimators. .. py:attribute:: r_in_scale :value: 5 .. py:attribute:: r_out_scale :value: 7.5 .. py:attribute:: sigma_clip .. py:method:: __call__(data, error, position, semimajor_axis, semiminor_axis, theta) :abstractmethod: Compute the local background and its error at a given position (**per pixel**). Parameters ---------- data : NDArray The image data. error : NDArray The error in the image data. semimajor_axis : float The (unscaled) semi-major axis of the aperture. semiminor_axis : float The (unscaled) semi-minor axis of the aperture. theta : float The rotation angle of the PSF. position : Tuple[float, float] The x, y position at which to compute the local background. Returns ------- Tuple[float, float] The local background and its error per pixel. .. py:class:: DefaultLocalBackground(r_in_scale = 5, r_out_scale = 7.5, sigma_clip = SigmaClip(sigma=3, maxiters=10)) Bases: :py:obj:`BaseLocalBackground` Default local background estimator using an elliptical annulus. .. py:method:: __call__(data, error, position, semimajor_axis, semiminor_axis = None, theta = 0.0) Compute the local background and its error at a given position (**per pixel**). Parameters ---------- data : NDArray The image data. error : NDArray The error in the image data. position : ArrayLike[float, float] The x, y position at which to compute the local background. semimajor_axis : float The (unscaled) semimajor axis of the aperture. semiminor_axis : float | None, optional The (unscaled) semiminor axis of the aperture, by default None. If None, it is assumed to be equal to the semimajor axis (i.e., the aperture is circular). theta : float, optional The rotation angle of the PSF, by default 0.0 (i.e., no rotation). Returns ------- Tuple[float, float] The local background and its error **per pixel**.