IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 19 years ago

Closed 19 years ago

#866 closed defect (fixed)

Singular matrices in PSF fitting are not diagnosed

Reported by: rhl@… Owned by: eugene
Priority: highest Milestone:
Component: psphot Version: 1.0
Severity: critical Keywords:
Cc:

Description

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.

Change History (2)

comment:1 by eugene, 19 years ago

op_sys: MacOS XAll
Status: newassigned

this is part of an overall problem in psphot in testing the validity of the psf model, and verifying that the input set of psf stars have a good spatial distribution sufficient to handle the model parameterization.

comment:2 by eugene, 19 years ago

Resolution: fixed
Status: assignedclosed

I have added a couple of pieces of code to deal with this: 1) the psf parameter fitting (in pmPSFtry.c) now requires a minimum number of sources for polynomials of a certain order (higher order; more sources). 2) the psf fitting code can now represent the psf variations as an image map with bilinear interpolation to set the value at a given pixel. this code iterative increases the image scale to minimize the combination of systematic and poisson errors in the psf parameters.

Note: See TracTickets for help on using tickets.