﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
866	Singular matrices in PSF fitting are not diagnosed	rhl@…	eugene	"The following matrix occurs while fitting the PSF variation
for an SDSS frame:
(gdb) imagep A
0       $462 = {1, 759.57916259765625, 0, 104.10538482666016, 0, 0, 0, 0, 0}
1       $463 = {759.57916259765625, 576960.50425255671, 0, 79076.281028541271,
0, 0, 0, 0, 0}
2       $464 = {0, 0, 1, 0, 0, 0, 0, 0, 0}
3       $465 = {104.10538482666016, 79076.281028541271, 0, 10837.931149907003,
0, 0, 0, 0, 0}
4       $466 = {0, 0, 0, 0, 1, 0, 0, 0, 0}
5       $467 = {0, 0, 0, 0, 0, 1, 0, 0, 0}
6       $468 = {0, 0, 0, 0, 0, 0, 1, 0, 0}
7       $469 = {0, 0, 0, 0, 0, 0, 0, 1, 0}
8       $470 = {0, 0, 0, 0, 0, 0, 0, 0, 1}

It is Very singular; this is not surprising as the code's attempting to
fit 3 parameters with one data point [another bug report to write].  The
matrix solver used is psMatrixGJSolve although Gauss-Jordan solvers are
3 times slower than LU decomposition.  More to the point, the detection
of singular matrices relies on testing for a zero pivot, and this is 
done as:
        if (matrix[icol][icol] == 0.0) {
For this matrix, the |smallest| value seen is -2.6112445539183682e-13, but
this is not flagged as singular.

You may want to move this is psLib, but the choice of this solver is taken
elsewhere."	defect	closed	highest		psphot	1.0	critical	fixed		
