opticam.fitting.routines ======================== .. py:module:: opticam.fitting.routines Functions --------- .. autoapisummary:: opticam.fitting.routines.fit_rms_vs_flux opticam.fitting.routines.fit_psf Module Contents --------------- .. py:function:: fit_rms_vs_flux(data) Iteratively fit a straight line (in log space) to the RMS vs flux plots for each catalog. This can be used to identify variable sources and good comparison sources. Parameters ---------- data : Dict The RMS vs flux data. Returns ------- Dict[str, Dict[str, NDArray]] The power law fits for each filter `{filter: {'flux': NDArray, 'rms': NDArray}}`. .. py:function:: fit_psf(image, x_init, y_init, semimajor_sigma, semiminor_sigma) Find the location of a source by fitting a Gaussian PSF to an image. Parameters ---------- image : NDArray The image. Should be a small region of a larger image to ensure the correct source is found. x_init : float | int The initial guess for the x location of the PSF. y_init : float | int The initial guess for the y location of the PSF. semimajor_sigma : float The semi-major standard deviation of the PSF. semiminor_sigma : float The semi-minor standard deviation of the PSF. Returns ------- tuple[float, float, float] The best-fitting x position, y position, and orientation of the PSF.