psf_from_projection

psfsubtraction.fitpsf.psf_from_projection(self, image1d, psfbase)[source] [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 psfbase elements that that give the optimal PSF.

Raises:
ValueError : If given masked data, because numpy.linalg.solve would silently

use the “values behind the mask”.