SimpleSubtraction¶
-
class
psfsubtraction.fitpsf.SimpleSubtraction(psfbase, image=None)[source] [edit on github]¶ Bases:
psfsubtraction.fitpsf.BasePSFFitterSimple examples of PSF fitting.
- The whole (unmasked) image is fit at once
- using all bases.
Methods Summary
findbase(region)Return all available bases. fitpsfcoeff(image1d, psfbase)solve a linear algebra system for the best PSF optregion(region, indpsf)Here we select the maximal region. regions()Return the unmasked part of an image. Methods Documentation
-
findbase(region) [edit on github]¶ Return all available bases.
-
fitpsfcoeff(image1d, psfbase) [edit on github]¶ solve a linear algebra system for the best PSF
Parameters: - image1d : array in 1 dim
- psfbase : array in [M,N]
M = number of pixels in flattened image N = number of images that form the space of potential PSFs
Returns: - psf_coeff : array in 1 dim
Coefficients for a linear combination of
psfbaseelements that that give the optimal PSF.
Raises: - ValueError : If given masked data, because
numpy.linalg.solvewould silently use the “values behind the mask”.
-
optregion(region, indpsf) [edit on github]¶ Here we select the maximal region.
The region is maximal in the sense that it includes all pixels that are not masked in the data or any of the bases.
Returns: - optregion : np.array of type bool
True for those pixels that should be included in the fit
-
regions() [edit on github]¶ Return the unmasked part of an image.
Returns: - regions: list
List of one element (the image)