LOCI¶
-
class
psfsubtraction.fitpsf.LOCI(psfbase, image=None)[source] [edit on github]¶ Bases:
psfsubtraction.fitpsf.BasePSFFitterLOCI fitter (locally optimized combination of images)
The loci algorithm was introduced in the following paper Lafreniere et al. 2007, ApJ, 660, 770.
The default parameters in this fitter are chosen similar to the shape of the regions used in that paper.
Attributes Summary
dilation_regionsector_phisector_radiussector_radius_innersector_radius_nMethods Summary
findbase(region)Return all bases that are not masked in any pixel in region fitpsfcoeff(image1d, psfbase)solve a linear algebra system for the best PSF optregion(region, indpsf)regions()Generate a function that generates sector regions Attributes Documentation
-
dilation_region= 10¶
-
sector_phi= 12¶
-
sector_radius¶
-
sector_radius_inner= 0¶
-
sector_radius_n= 10¶
Methods Documentation
-
findbase(region) [edit on github]¶ Return all bases that are not masked in any pixel in region
-
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]¶
-
regions() [edit on github]¶ Generate a function that generates sector regions
A pixel is included in a region, if the pixel center falls within the region boundaries.
This function makes use of the following fitter attributes, which have to be set to use this function:
- fitter.sector_radius : np.array
- boundaries for sector elements in pixels.
- fitter.sector_phi : int or
quantity - If this is an int it sets the number of sectors that make up a
full circle.
If this is an
astropy.quantityit is interpreted as the boundaries of the angular bins. It should cover the range from 0 to 2 pi (or 360 deg, if units is degrees). - fitter.sector_center : tuple or None
- x, y position of the center of all sectors (in pixel coordinates).
Noneselects the center of the input image.
Returns: - regions : generator
sector regions
-