diff options
author | Thomas White <taw@physics.org> | 2011-05-02 16:48:39 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:25 +0100 |
commit | 8ae238359607dababf9ffc98613aa57d28f3ee04 (patch) | |
tree | 92f52442da1f16ad1b37e09980a9c5af793afd5b /src/hrs-scaling.c | |
parent | d541875f60a47acedca42163f04c7ed88c17234b (diff) |
partialator: Fail a bit more gracefully if equations can't be solved
Diffstat (limited to 'src/hrs-scaling.c')
-rw-r--r-- | src/hrs-scaling.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index fcf7efae..5c5ec8f0 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -263,6 +263,10 @@ static double iterate_scale(struct image *images, int n, e_val = gsl_vector_alloc(n); e_vec = gsl_matrix_alloc(n, n); val = gsl_eigen_symmv(M, e_val, e_vec, work); + if ( val ) { + ERROR("Couldn't diagonalise matrix.\n"); + return 0.0; + } gsl_eigen_symmv_free(work); val = gsl_eigen_symmv_sort(e_val, e_vec, GSL_EIGEN_SORT_ABS_DESC); |