gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master f42231e7: MakeCatalog: --skystd is new name fo


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master f42231e7: MakeCatalog: --skystd is new name for the old --std
Date: Thu, 30 Jun 2022 13:14:54 -0400 (EDT)

branch: master
commit f42231e75f7595f2b9c08121cb04a6f12c51d6bd
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    MakeCatalog: --skystd is new name for the old --std
    
    Until now, we were using the '--std' name for the sky standard deviation
    (using the sky standard deviation image). However, given that we have
    columns like '--mean', '--median' or etc (which report the respective
    statistic of the values image), the name '--std' could lead to the user
    thinking this is the same (using the values image pixels).
    
    With this commit, the old '--std' option has been renamed to '--skystd' to
    avoid such confusion (which is indeed a bug).
    
    This bug was reported Raul Infante-Sainz.
    
    This fixes bug #62685.
---
 NEWS                    | 5 +++++
 bin/mkcatalog/args.h    | 4 ++--
 bin/mkcatalog/columns.c | 8 ++++----
 bin/mkcatalog/ui.h      | 2 +-
 doc/gnuastro.texi       | 2 +-
 5 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 7a0c9fa0..991ec33c 100644
--- a/NEWS
+++ b/NEWS
@@ -123,6 +123,7 @@ See the end of the file for license conditions.
 ** Changed features
 
   MakeCatalog:
+   --skystd: new name for old '--std' (see bug #62685).
    --sfmagnsigma: default value changed to 3 (more commonly used).
    --sfmagarea: default value set to 100 arcsec^2 (more commonly used).
 
@@ -198,6 +199,10 @@ See the end of the file for license conditions.
               Infante-Sainz.
   bug #62683: Arithmetic's 'set-' operator not working after the 'makenew'
               operator. Found by Raul Infante-Sainz.
+  bug #62685: MakeCatalog's '--std' option is wrongly interpreted as the
+              standard deviation of the values image, while it is actually
+              the root mean square of the Sky standard deviation
+              pixels. Found by Raul Infante-Sainz.
 
 
 
diff --git a/bin/mkcatalog/args.h b/bin/mkcatalog/args.h
index c4778bb2..2171c0c9 100644
--- a/bin/mkcatalog/args.h
+++ b/bin/mkcatalog/args.h
@@ -1368,8 +1368,8 @@ struct argp_option program_options[] =
       ui_column_codes_ll
     },
     {
-      "std",
-      UI_KEY_STD,
+      "skystd",
+      UI_KEY_SKYSTD,
       0,
       0,
       "Sky standard deviation (per pixel).",
diff --git a/bin/mkcatalog/columns.c b/bin/mkcatalog/columns.c
index 08dd2f7a..42c5972e 100644
--- a/bin/mkcatalog/columns.c
+++ b/bin/mkcatalog/columns.c
@@ -1572,8 +1572,8 @@ columns_define_alloc(struct mkcatalogparams *p)
           oiflag[ OCOL_SUMSKY ] = ciflag[ CCOL_SUMSKY ] = 1;
           break;
 
-        case UI_KEY_STD:
-          name           = "STD";
+        case UI_KEY_SKYSTD:
+          name           = "SKY_STD";
           unit           = MKCATALOG_NO_UNIT;
           ocomment       = "Sky standard deviation under object.";
           ccomment       = ocomment;
@@ -2629,7 +2629,7 @@ columns_fill(struct mkcatalog_passparams *pp)
           ((float *)colarr)[oind] = MKC_RATIO(oi[OCOL_SUMSKY], 
oi[OCOL_NUMSKY]);
           break;
 
-        case UI_KEY_STD:
+        case UI_KEY_SKYSTD:
           ((float *)colarr)[oind] = sqrt( MKC_RATIO( oi[ OCOL_SUMVAR ],
                                                      oi[ OCOL_NUMVAR ]) );
           break;
@@ -2991,7 +2991,7 @@ columns_fill(struct mkcatalog_passparams *pp)
                                                  ci[ CCOL_NUMSKY] );
             break;
 
-          case UI_KEY_STD:
+          case UI_KEY_SKYSTD:
             ((float *)colarr)[cind] = sqrt( MKC_RATIO( ci[ CCOL_SUMVAR ],
                                                        ci[ CCOL_NUMVAR ] ));
             break;
diff --git a/bin/mkcatalog/ui.h b/bin/mkcatalog/ui.h
index dc708667..8cba8f35 100644
--- a/bin/mkcatalog/ui.h
+++ b/bin/mkcatalog/ui.h
@@ -168,7 +168,7 @@ enum option_keys_enum
   UI_KEY_RIVERAVE,
   UI_KEY_RIVERNUM,
   UI_KEY_SKY,
-  UI_KEY_STD,
+  UI_KEY_SKYSTD,
   UI_KEY_SIGCLIPNUMBER,
   UI_KEY_SIGCLIPMEDIAN,
   UI_KEY_SIGCLIPMEAN,
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index f84f4ba6..2a2ff825 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -22154,7 +22154,7 @@ If you want to ignore those pixels in the error 
measurement, set them to zero (w
 The sky flux (per pixel) value under this object or clump.
 This is actually the mean value of all the pixels in the sky image that lie on 
the same position as the object or clump.
 
-@item --std
+@item --skystd
 The sky value standard deviation (per pixel) for this clump or object.
 This is the square root of the mean variance under the object, or the root 
mean square.
 



reply via email to

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