gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 281ba8a 1/3: Initialize the first value in gal


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 281ba8a 1/3: Initialize the first value in gal_label_clump_significance
Date: Thu, 24 May 2018 14:39:08 -0400 (EDT)

branch: master
commit 281ba8a7a9fbce7749d9435b04d1334ceab4dee5
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Initialize the first value in gal_label_clump_significance
    
    Until now, when the `keepsmall' argument of `gal_label_clump_significance'
    was non-zero, the first value (label/index 0) of the significance array was
    un-initialized. This can cause confusion if the inspection of the results
    isn't done from index one, but zero. To avoid un-pleasent surprizes for
    early users of this function, when `keepsmall' is non-zero, it now sets the
    `sigarr[0]' element to NaN.
---
 lib/label.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/label.c b/lib/label.c
index 844cbd0..666bee4 100644
--- a/lib/label.c
+++ b/lib/label.c
@@ -806,8 +806,9 @@ gal_label_clump_significance(gal_data_t *values, gal_data_t 
*std,
   label_clump_significance_raw(values, std, label, indexs, tl, info);
 
 
-  /* Calculate the signal to noise ratio for successful clumps */
+  /* Calculate the signficance value for successful clumps */
   sigarr=sig->array;
+  if(keepsmall) sigarr[0]=NAN;
   if(sigind) indarr=sigind->array;
   for(i=1;i<tablen;++i)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]