opticam.fitting.routines
Functions
|
Iteratively fit a straight line (in log space) to the RMS vs flux plots for each catalog. This can be used to |
|
Find the location of a source by fitting a Gaussian PSF to an image. |
Module Contents
- opticam.fitting.routines.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
- dataDict
The RMS vs flux data.
Returns
- Dict[str, Dict[str, NDArray]]
The power law fits for each filter {filter: {‘flux’: NDArray, ‘rms’: NDArray}}.
- Parameters:
data (Dict)
- Return type:
Dict[str, Dict[str, numpy.typing.NDArray]]
- opticam.fitting.routines.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
- imageNDArray
The image. Should be a small region of a larger image to ensure the correct source is found.
- x_initfloat | int
The initial guess for the x location of the PSF.
- y_initfloat | int
The initial guess for the y location of the PSF.
- semimajor_sigmafloat
The semi-major standard deviation of the PSF.
- semiminor_sigmafloat
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.
- Parameters:
image (numpy.typing.NDArray)
x_init (float | int)
y_init (float | int)
semimajor_sigma (float)
semiminor_sigma (float)
- Return type:
tuple[float, float, float]