gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 460005c: MakeCatalog: fraction columns now bas


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 460005c: MakeCatalog: fraction columns now based on maximum, not sum
Date: Wed, 4 Nov 2020 21:13:58 -0500 (EST)

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

    MakeCatalog: fraction columns now based on maximum, not sum
    
    Until now, we had some good options to sample the profile at various
    fractions of the total sum of the labeled region's pixels. However, the
    total sum can easily be biased (for example by blending with other
    objects). So its not really too useful.
    
    A more useful measure that we have found in our tests is some measurements
    on the fractions of the maximum (like the FWHM). Because the maximum as the
    largest per-pixel S/N, it is a very robust measure without much scatter.
    
    With this commit, the old '--fracsum____' columns have been renamed to
    '--fracmax____' and two new columns are now also available: '--fracmaxsum1'
    and '--fracmaxsum2'.
---
 NEWS                      |  12 ++--
 bin/mkcatalog/args.h      |  60 ++++++++++++-----
 bin/mkcatalog/columns.c   | 168 +++++++++++++++++++++++++++-------------------
 bin/mkcatalog/main.h      |  28 ++++----
 bin/mkcatalog/mkcatalog.c |  10 +--
 bin/mkcatalog/parse.c     | 125 ++++++++++++++++++++--------------
 bin/mkcatalog/ui.c        |  58 ++++++++--------
 bin/mkcatalog/ui.h        |  12 ++--
 doc/gnuastro.texi         |  43 +++++++-----
 9 files changed, 310 insertions(+), 206 deletions(-)

diff --git a/NEWS b/NEWS
index 146f103..7c72aaf 100644
--- a/NEWS
+++ b/NEWS
@@ -62,14 +62,16 @@ See the end of the file for license conditions.
    --halfmaxarea: number of pixels with a value larger than half the maximum.
    --halfmaxsum: sum of pixels with a value larger than half the maximum.
    --halfmaxsb: surf. brightness within half of the maximum.
-   --fracsum: fractions to use in '--fracsumarea1' or '--fracsumarea2'.
-   --fracsumarea1: area of given fraction of the summed object or clump values.
-   --fracsumarea2: area of given fraction of the summed object or clump values.
+   --fracmax: fractions to use in '--fracmaxarea1' or '--fracmaxarea2'.
+   --fracmaxsum1: sum of pixels brighter than first given fraction of max.
+   --fracmaxsum2: sum of pixels brighter than second given fraction of max.
+   --fracmaxarea1: number of pixels brighter than first given fraction of max.
+   --fracmaxarea2: number of pixels brighter than second given fraction of max.
+   --fracmaxradius1: radius derived from '--fracmaxarea1'.
+   --fracmaxradius2: radius derived from '--fracmaxarea2'.
    --halfsumsb: Surface brightness within area reported by '--halfsumarea'.
    --halfsumarea: area containing half of the summed object or clump values.
    --halfradiusobs: radius derived from '--halfsumarea', underestimates r_e.
-   --fracradiusobs1: similar to --halfradiusobs, but for custom fraction 1.
-   --fracradiusobs2: similar to --halfradiusobs, but for custom fraction 2.
    --areaminv: the number of pixels that are equal to the minimum value.
    --areamaxv: the number of pixels that are equal to the maximum value.
    - New columns to return the position of pixel with minimum or maximum
diff --git a/bin/mkcatalog/args.h b/bin/mkcatalog/args.h
index 3a2bb8b..f1dbadc 100644
--- a/bin/mkcatalog/args.h
+++ b/bin/mkcatalog/args.h
@@ -414,13 +414,13 @@ struct argp_option program_options[] =
       UI_GROUP_OTHERSETTINGS
     },
     {
-      "fracsum",
-      UI_KEY_FRACSUM,
+      "fracmax",
+      UI_KEY_FRACMAX,
       "FLT[,FLT]",
       0,
-      "Fraction(s) in --fracsumarea1 or --fracsumarea2.",
+      "Fraction(s) in --fracmaxarea1 or --fracmaxarea2.",
       UI_GROUP_OTHERSETTINGS,
-      &p->fracsum,
+      &p->fracmax,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
       GAL_OPTIONS_NOT_MANDATORY,
@@ -1799,11 +1799,11 @@ struct argp_option program_options[] =
       ui_column_codes_ll
     },
     {
-      "fracsumarea1",
-      UI_KEY_FRACSUMAREA1,
+      "fracmaxsum1",
+      UI_KEY_FRACMAXSUM1,
       0,
       0,
-      "Area of 1st --fracsum of --brightness.",
+      "Sum of pixels brighter than 1st frac. of max.",
       UI_GROUP_COLUMNS_MORPHOLOGY,
       0,
       GAL_TYPE_INVALID,
@@ -1813,11 +1813,11 @@ struct argp_option program_options[] =
       ui_column_codes_ll
     },
     {
-      "fracsumarea2",
-      UI_KEY_FRACSUMAREA2,
+      "fracmaxsum2",
+      UI_KEY_FRACMAXSUM2,
       0,
       0,
-      "Area of 2nd --fracsum of --brightness.",
+      "Sum of pixels brighter than 2nd frac. of max.",
       UI_GROUP_COLUMNS_MORPHOLOGY,
       0,
       GAL_TYPE_INVALID,
@@ -1827,11 +1827,11 @@ struct argp_option program_options[] =
       ui_column_codes_ll
     },
     {
-      "fracradiusobs1",
-      UI_KEY_FRACRADIUSOBS1,
+      "fracmaxarea1",
+      UI_KEY_FRACMAXAREA1,
       0,
       0,
-      "Radius calculated from --fracsumarea1.",
+      "Area containing 1st fraction of maximum.",
       UI_GROUP_COLUMNS_MORPHOLOGY,
       0,
       GAL_TYPE_INVALID,
@@ -1841,11 +1841,39 @@ struct argp_option program_options[] =
       ui_column_codes_ll
     },
     {
-      "fracradiusobs2",
-      UI_KEY_FRACRADIUSOBS2,
+      "fracmaxarea2",
+      UI_KEY_FRACMAXAREA2,
       0,
       0,
-      "Radius calculated from --fracsumarea2.",
+      "Area containing 2nd fraction of maximum.",
+      UI_GROUP_COLUMNS_MORPHOLOGY,
+      0,
+      GAL_TYPE_INVALID,
+      GAL_OPTIONS_RANGE_ANY,
+      GAL_OPTIONS_NOT_MANDATORY,
+      GAL_OPTIONS_NOT_SET,
+      ui_column_codes_ll
+    },
+    {
+      "fracmaxradius1",
+      UI_KEY_FRACMAXRADIUS1,
+      0,
+      0,
+      "Radius calculated from --fracmaxarea1.",
+      UI_GROUP_COLUMNS_MORPHOLOGY,
+      0,
+      GAL_TYPE_INVALID,
+      GAL_OPTIONS_RANGE_ANY,
+      GAL_OPTIONS_NOT_MANDATORY,
+      GAL_OPTIONS_NOT_SET,
+      ui_column_codes_ll
+    },
+    {
+      "fracmaxradius2",
+      UI_KEY_FRACMAXRADIUS2,
+      0,
+      0,
+      "Radius calculated from --fracmaxarea2.",
       UI_GROUP_COLUMNS_MORPHOLOGY,
       0,
       GAL_TYPE_INVALID,
diff --git a/bin/mkcatalog/columns.c b/bin/mkcatalog/columns.c
index 0442fe0..46437af 100644
--- a/bin/mkcatalog/columns.c
+++ b/bin/mkcatalog/columns.c
@@ -335,8 +335,8 @@ columns_sanity_check(struct mkcatalogparams *p)
           case UI_KEY_GEOSEMIMINOR:
           case UI_KEY_GEOAXISRATIO:
           case UI_KEY_HALFRADIUSOBS:
-          case UI_KEY_FRACRADIUSOBS1:
-          case UI_KEY_FRACRADIUSOBS2:
+          case UI_KEY_FRACMAXRADIUS1:
+          case UI_KEY_FRACMAXRADIUS2:
           case UI_KEY_GEOPOSITIONANGLE:
             error(EXIT_FAILURE, 0, "columns requiring second moment "
                   "calculations (like semi-major, semi-minor, axis ratio "
@@ -1728,7 +1728,7 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_precision = 0;
           oiflag[ OCOL_NUM        ] = ciflag[ CCOL_NUM        ] = 1;
           oiflag[ OCOL_SUM        ] = ciflag[ CCOL_SUM        ] = 1;
-          oiflag[ OCOL_NUMHALFSUM ] = ciflag[ CCOL_NUMHALFSUM ] = 1;
+          oiflag[ OCOL_HALFSUMNUM ] = ciflag[ CCOL_HALFSUMNUM ] = 1;
           break;
 
         case UI_KEY_HALFMAXAREA:
@@ -1742,7 +1742,7 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_width     = 6;
           disp_precision = 0;
           oiflag[ OCOL_NUM         ] = ciflag[ CCOL_NUM         ] = 1;
-          oiflag[ OCOL_NUMHALFMAX  ] = ciflag[ CCOL_NUMHALFMAX  ] = 1;
+          oiflag[ OCOL_HALFMAXNUM  ] = ciflag[ CCOL_HALFMAXNUM  ] = 1;
           break;
 
         case UI_KEY_HALFMAXSUM:
@@ -1755,8 +1755,8 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_fmt       = 0;
           disp_width     = 6;
           disp_precision = 0;
-          oiflag[ OCOL_NUM         ] = ciflag[ CCOL_NUM         ] = 1;
-          oiflag[ OCOL_SUMHALFMAX  ] = ciflag[ CCOL_SUMHALFMAX  ] = 1;
+          oiflag[ OCOL_NUM        ] = ciflag[ CCOL_NUM        ] = 1;
+          oiflag[ OCOL_HALFMAXSUM ] = ciflag[ CCOL_HALFMAXSUM ] = 1;
           break;
 
         case UI_KEY_HALFMAXSB:
@@ -1769,9 +1769,9 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_fmt       = 0;
           disp_width     = 6;
           disp_precision = 0;
-          oiflag[ OCOL_NUM         ] = ciflag[ CCOL_NUM         ] = 1;
-          oiflag[ OCOL_NUMHALFMAX  ] = ciflag[ CCOL_NUMHALFMAX  ] = 1;
-          oiflag[ OCOL_SUMHALFMAX  ] = ciflag[ CCOL_SUMHALFMAX  ] = 1;
+          oiflag[ OCOL_NUM        ] = ciflag[ CCOL_NUM        ] = 1;
+          oiflag[ OCOL_HALFMAXNUM ] = ciflag[ CCOL_HALFMAXNUM ] = 1;
+          oiflag[ OCOL_HALFMAXSUM ] = ciflag[ CCOL_HALFMAXSUM ] = 1;
           break;
 
         case UI_KEY_HALFSUMSB:
@@ -1785,16 +1785,37 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_precision = 5;
           oiflag[ OCOL_NUM        ] = ciflag[ CCOL_NUM        ] = 1;
           oiflag[ OCOL_SUM        ] = ciflag[ CCOL_SUM        ] = 1;
-          oiflag[ OCOL_NUMHALFSUM ] = ciflag[ CCOL_NUMHALFSUM ] = 1;
+          oiflag[ OCOL_HALFSUMNUM ] = ciflag[ CCOL_HALFSUMNUM ] = 1;
+          break;
+
+        case UI_KEY_FRACMAXSUM1:
+        case UI_KEY_FRACMAXSUM2:
+          name           = ( colcode->v==UI_KEY_FRACMAXSUM1
+                             ? "FRAC_MAX_SUM_1"
+                             : "FRAC_MAX_SUM_2" );
+          unit           = "counter";
+          ocomment       = "Sum of pixels brighter than given fraction of 
maximum value.";
+          ccomment       = ocomment;
+          otype          = GAL_TYPE_INT32;
+          ctype          = GAL_TYPE_INT32;
+          disp_fmt       = 0;
+          disp_width     = 6;
+          disp_precision = 0;
+          oiflag[ OCOL_NUM ] = ciflag[ CCOL_NUM ] = 1;
+          oiflag[ OCOL_SUM ] = ciflag[ CCOL_SUM ] = 1;
+          if(colcode->v==UI_KEY_FRACMAXSUM1)
+            oiflag[ OCOL_FRACMAX1SUM ] = ciflag[ CCOL_FRACMAX1SUM ] = 1;
+          else
+            oiflag[ OCOL_FRACMAX2SUM ] = ciflag[ CCOL_FRACMAX2SUM ] = 1;
           break;
 
-        case UI_KEY_FRACSUMAREA1:
-        case UI_KEY_FRACSUMAREA2:
-          name           = ( colcode->v==UI_KEY_FRACSUMAREA1
-                             ? "FRAC_SUM_AREA_1"
-                             : "FRAC_SUM_AREA_2" );
+        case UI_KEY_FRACMAXAREA1:
+        case UI_KEY_FRACMAXAREA2:
+          name           = ( colcode->v==UI_KEY_FRACMAXAREA1
+                             ? "FRAC_MAX_AREA_1"
+                             : "FRAC_MAX_AREA_2" );
           unit           = "counter";
-          ocomment       = "Number of brightest pixels containing given 
fraction of total sum.";
+          ocomment       = "Number of pixels brighter than given fraction of 
maximum value.";
           ccomment       = ocomment;
           otype          = GAL_TYPE_INT32;
           ctype          = GAL_TYPE_INT32;
@@ -1803,16 +1824,16 @@ columns_define_alloc(struct mkcatalogparams *p)
           disp_precision = 0;
           oiflag[ OCOL_NUM ] = ciflag[ CCOL_NUM ] = 1;
           oiflag[ OCOL_SUM ] = ciflag[ CCOL_SUM ] = 1;
-          if(colcode->v==UI_KEY_FRACSUMAREA1)
-            oiflag[ OCOL_NUMFRACSUM1 ] = ciflag[ CCOL_NUMFRACSUM1 ] = 1;
+          if(colcode->v==UI_KEY_FRACMAXAREA1)
+            oiflag[ OCOL_FRACMAX1NUM ] = ciflag[ CCOL_FRACMAX1NUM ] = 1;
           else
-            oiflag[ OCOL_NUMFRACSUM2 ] = ciflag[ CCOL_NUMFRACSUM2 ] = 1;
+            oiflag[ OCOL_FRACMAX2NUM ] = ciflag[ CCOL_FRACMAX2NUM ] = 1;
           break;
 
         case UI_KEY_FWHMOBS:
         case UI_KEY_HALFRADIUSOBS:
-        case UI_KEY_FRACRADIUSOBS1:
-        case UI_KEY_FRACRADIUSOBS2:
+        case UI_KEY_FRACMAXRADIUS1:
+        case UI_KEY_FRACMAXRADIUS2:
           unit           = "pixels";
           otype          = GAL_TYPE_FLOAT32;
           ctype          = GAL_TYPE_FLOAT32;
@@ -1837,23 +1858,23 @@ columns_define_alloc(struct mkcatalogparams *p)
             {
             case UI_KEY_FWHMOBS:
               name="FWHM_OBS";
-              oiflag[ OCOL_NUMHALFMAX  ] = ciflag[ CCOL_NUMHALFMAX  ] = 1;
+              oiflag[ OCOL_HALFMAXNUM  ] = ciflag[ CCOL_HALFMAXNUM  ] = 1;
               ocomment = "Full width at half maximum (accounting for 
ellipticity).";
               break;
             case UI_KEY_HALFRADIUSOBS:
               name="HALF_RADIUS_OBS";
-              oiflag[ OCOL_NUMHALFSUM  ] = ciflag[ CCOL_NUMHALFSUM  ] = 1;
+              oiflag[ OCOL_HALFSUMNUM  ] = ciflag[ CCOL_HALFSUMNUM  ] = 1;
               ocomment = "Radius derived from area of half of total sum.";
               break;
-            case UI_KEY_FRACRADIUSOBS1:
-              name="FRAC_RADIUS_OBS_1";
-              oiflag[ OCOL_NUMFRACSUM1 ] = ciflag[ CCOL_NUMFRACSUM1 ] = 1;
-              ocomment = "Radius derived from area of 1st fraction of total 
sum.";
+            case UI_KEY_FRACMAXRADIUS1:
+              name="FRAC_MAX_RADIUS_1";
+              oiflag[ OCOL_FRACMAX1NUM ] = ciflag[ CCOL_FRACMAX1NUM ] = 1;
+              ocomment = "Radius derived from area of 1st fraction of 
maximum.";
               break;
-            case UI_KEY_FRACRADIUSOBS2:
-              name="FRAC_RADIUS_OBS_2";
-              oiflag[ OCOL_NUMFRACSUM2 ] = ciflag[ CCOL_NUMFRACSUM2 ] = 1;
-              ocomment = "Radius derived from area of 2nd fraction of total 
sum.";
+            case UI_KEY_FRACMAXRADIUS2:
+              name="FRAC_MAX_RADIUS_2";
+              oiflag[ OCOL_FRACMAX2NUM ] = ciflag[ CCOL_FRACMAX2NUM ] = 1;
+              ocomment = "Radius derived from area of 2nd fraction of 
maximum.";
               break;
             }
           break;
@@ -2580,54 +2601,57 @@ columns_fill(struct mkcatalog_passparams *pp)
           break;
 
         case UI_KEY_HALFSUMAREA:
-          ((int32_t *)colarr)[oind] = oi[OCOL_NUMHALFSUM];
+          ((int32_t *)colarr)[oind] = oi[OCOL_HALFSUMNUM];
           break;
 
         case UI_KEY_HALFMAXAREA:
-          ((int32_t *)colarr)[oind] = oi[OCOL_NUMHALFMAX];
+          ((int32_t *)colarr)[oind] = oi[OCOL_HALFMAXNUM];
           break;
 
         case UI_KEY_HALFMAXSUM:
-          ((float *)colarr)[oind] = oi[OCOL_SUMHALFMAX];
+          ((float *)colarr)[oind] = oi[OCOL_HALFMAXNUM];
           break;
 
         case UI_KEY_HALFMAXSB:
-          ((float *)colarr)[oind] = MKC_SB( oi[OCOL_SUMHALFMAX],
-                                            oi[OCOL_NUMHALFMAX] );
+          ((float *)colarr)[oind] = MKC_SB( oi[OCOL_HALFMAXSUM],
+                                            oi[OCOL_HALFMAXNUM] );
+          break;
+
+        case UI_KEY_FRACMAXSUM1:
+          ((int32_t *)colarr)[oind] = oi[OCOL_FRACMAX1SUM];
           break;
 
-        case UI_KEY_FRACSUMAREA1:
-          ((int32_t *)colarr)[oind] = oi[OCOL_NUMFRACSUM1];
+        case UI_KEY_FRACMAXSUM2:
+          ((int32_t *)colarr)[oind] = oi[OCOL_FRACMAX2SUM];
           break;
 
-        case UI_KEY_FRACSUMAREA2:
-          ((int32_t *)colarr)[oind] = oi[OCOL_NUMFRACSUM2];
+        case UI_KEY_FRACMAXAREA1:
+          ((int32_t *)colarr)[oind] = oi[OCOL_FRACMAX1NUM];
+          break;
+
+        case UI_KEY_FRACMAXAREA2:
+          ((int32_t *)colarr)[oind] = oi[OCOL_FRACMAX2NUM];
           break;
 
         case UI_KEY_HALFSUMSB:
-          tmpind = ( key==UI_KEY_HALFRADIUSOBS
-                     ? OCOL_NUMHALFSUM
-                     : ( key==UI_KEY_FRACRADIUSOBS1
-                         ? OCOL_NUMFRACSUM1
-                         : OCOL_NUMFRACSUM2 ) );
           ((float *)colarr)[oind] = MKC_SB( oi[OCOL_SUM]/2.0f,
-                                            oi[OCOL_NUMHALFSUM] );
+                                            oi[OCOL_HALFSUMNUM] );
           break;
 
         case UI_KEY_FWHMOBS:
         case UI_KEY_HALFRADIUSOBS:
-        case UI_KEY_FRACRADIUSOBS1:
-        case UI_KEY_FRACRADIUSOBS2:
+        case UI_KEY_FRACMAXRADIUS1:
+        case UI_KEY_FRACMAXRADIUS2:
           /* First derive the axis ratio (as 'tmp'), then set the index to
              use and calculate the radius from the area and axis ratio. */
           tmp = ( columns_second_order(pp, oi, UI_KEY_SEMIMINOR, 0)
                   / columns_second_order(pp, oi, UI_KEY_SEMIMAJOR, 0) );
           switch(key)
             {
-            case UI_KEY_FWHMOBS:        tmpind=OCOL_NUMHALFMAX;  break;
-            case UI_KEY_HALFRADIUSOBS:  tmpind=OCOL_NUMHALFSUM;  break;
-            case UI_KEY_FRACRADIUSOBS1: tmpind=OCOL_NUMFRACSUM1; break;
-            case UI_KEY_FRACRADIUSOBS2: tmpind=OCOL_NUMFRACSUM2; break;
+            case UI_KEY_FWHMOBS:        tmpind=OCOL_HALFMAXNUM;  break;
+            case UI_KEY_HALFRADIUSOBS:  tmpind=OCOL_HALFSUMNUM;  break;
+            case UI_KEY_FRACMAXRADIUS1: tmpind=OCOL_FRACMAX1NUM; break;
+            case UI_KEY_FRACMAXRADIUS2: tmpind=OCOL_FRACMAX2NUM; break;
             }
           tmp = sqrt( oi[tmpind]/(tmp*M_PI) );
           if(key==UI_KEY_FWHMOBS)
@@ -2929,47 +2953,55 @@ columns_fill(struct mkcatalog_passparams *pp)
             break;
 
           case UI_KEY_HALFSUMAREA:
-            ((int32_t *)colarr)[cind] = ci[CCOL_NUMHALFSUM];
+            ((int32_t *)colarr)[cind] = ci[CCOL_HALFSUMNUM];
             break;
 
           case UI_KEY_HALFMAXAREA:
-            ((int32_t *)colarr)[cind] = ci[CCOL_NUMHALFMAX];
+            ((int32_t *)colarr)[cind] = ci[CCOL_HALFMAXNUM];
             break;
 
           case UI_KEY_HALFMAXSUM:
-            ((float *)colarr)[cind] = ci[CCOL_SUMHALFMAX];
+            ((float *)colarr)[cind] = ci[CCOL_HALFMAXSUM];
             break;
 
           case UI_KEY_HALFMAXSB:
-            ((float *)colarr)[cind] = MKC_SB( ci[CCOL_SUMHALFMAX],
-                                              ci[CCOL_NUMHALFMAX] );
+            ((float *)colarr)[cind] = MKC_SB( ci[CCOL_HALFMAXSUM],
+                                              ci[CCOL_HALFMAXNUM] );
+            break;
+
+          case UI_KEY_FRACMAXSUM1:
+            ((int32_t *)colarr)[cind] = ci[CCOL_FRACMAX1SUM];
+            break;
+
+          case UI_KEY_FRACMAXSUM2:
+            ((int32_t *)colarr)[cind] = ci[CCOL_FRACMAX2SUM];
             break;
 
-          case UI_KEY_FRACSUMAREA1:
-            ((int32_t *)colarr)[cind] = ci[CCOL_NUMFRACSUM1];
+          case UI_KEY_FRACMAXAREA1:
+            ((int32_t *)colarr)[cind] = ci[CCOL_FRACMAX1NUM];
             break;
 
-          case UI_KEY_FRACSUMAREA2:
-            ((int32_t *)colarr)[cind] = ci[CCOL_NUMFRACSUM2];
+          case UI_KEY_FRACMAXAREA2:
+            ((int32_t *)colarr)[cind] = ci[CCOL_FRACMAX2NUM];
             break;
 
           case UI_KEY_HALFSUMSB:
             ((float *)colarr)[cind] = MKC_SB( ci[CCOL_SUM]/2.0f,
-                                              ci[CCOL_NUMHALFSUM] );
+                                              ci[CCOL_HALFSUMNUM] );
             break;
 
           case UI_KEY_FWHMOBS:
           case UI_KEY_HALFRADIUSOBS:
-          case UI_KEY_FRACRADIUSOBS1:
-          case UI_KEY_FRACRADIUSOBS2:
+          case UI_KEY_FRACMAXRADIUS1:
+          case UI_KEY_FRACMAXRADIUS2:
             tmp = ( columns_second_order(  pp, ci, UI_KEY_SEMIMINOR, 1)
                     / columns_second_order(pp, ci, UI_KEY_SEMIMAJOR, 1) );
             switch(key)
               {
-              case UI_KEY_FWHMOBS:        tmpind=CCOL_NUMHALFMAX;  break;
-              case UI_KEY_HALFRADIUSOBS:  tmpind=CCOL_NUMHALFSUM;  break;
-              case UI_KEY_FRACRADIUSOBS1: tmpind=CCOL_NUMFRACSUM1; break;
-              case UI_KEY_FRACRADIUSOBS2: tmpind=CCOL_NUMFRACSUM2; break;
+              case UI_KEY_FWHMOBS:        tmpind=CCOL_HALFMAXNUM;  break;
+              case UI_KEY_HALFRADIUSOBS:  tmpind=CCOL_HALFSUMNUM;  break;
+              case UI_KEY_FRACMAXRADIUS1: tmpind=CCOL_FRACMAX1NUM; break;
+              case UI_KEY_FRACMAXRADIUS2: tmpind=CCOL_FRACMAX2NUM; break;
               }
             tmp = sqrt( ci[tmpind]/(tmp*M_PI) );
             if(key==UI_KEY_FWHMOBS)
diff --git a/bin/mkcatalog/main.h b/bin/mkcatalog/main.h
index 7074161..1c3207a 100644
--- a/bin/mkcatalog/main.h
+++ b/bin/mkcatalog/main.h
@@ -112,11 +112,13 @@ enum objectcols
     OCOL_UPPERLIMIT_S,   /* Upper limit one-sigma value.              */
     OCOL_UPPERLIMIT_Q,   /* Quantile of object in random distribution.*/
     OCOL_UPPERLIMIT_SKEW,/* (Mean-Median)/STD of random distribution. */
-    OCOL_NUMHALFMAX,     /* Area/Number of pixels above half of max.  */
-    OCOL_SUMHALFMAX,     /* Sum of pixels above half of max.          */
-    OCOL_NUMHALFSUM,     /* Area/Number containing half of total sum. */
-    OCOL_NUMFRACSUM1,    /* Area/Number containing frac of total sum. */
-    OCOL_NUMFRACSUM2,    /* Area/Number containing frac of total sum. */
+    OCOL_HALFMAXNUM,     /* Area/Number of pixels above half of max.  */
+    OCOL_HALFMAXSUM,     /* Sum of pixels above half of max.          */
+    OCOL_HALFSUMNUM,     /* Area/Number containing half of total sum. */
+    OCOL_FRACMAX1NUM,    /* Area/Number containing frac of maximum.   */
+    OCOL_FRACMAX1SUM,    /* Sum containing frac of maximum.           */
+    OCOL_FRACMAX2NUM,    /* Area/Number containing frac of maximum.   */
+    OCOL_FRACMAX2SUM,    /* Sum containing frac of maximum.           */
     OCOL_C_NUMALL,       /* Value independent no. of pixels in clumps.*/
     OCOL_C_NUM,          /* Area of clumps in this object.            */
     OCOL_C_SUM,          /* Brightness in object clumps.              */
@@ -185,13 +187,13 @@ enum clumpcols
     CCOL_UPPERLIMIT_S,   /* Upper limit one-sigma value.              */
     CCOL_UPPERLIMIT_Q,   /* Quantile of object in random distribution.*/
     CCOL_UPPERLIMIT_SKEW,/* (Mean-Median)/STD of random distribution. */
-    CCOL_NUMHALFMAX,     /* Area/Number of pixels above half of max.  */
-    CCOL_SUMHALFMAX,     /* Sum of pixels above half of max.          */
-    CCOL_NUMHALFSUM,     /* Area/Number containing half of total sum. */
-    CCOL_NUMFRACSUM1,    /* Area/Number containing frac of total sum. */
-    CCOL_NUMFRACSUM2,    /* Area/Number containing frac of total sum. */
-    CCOL_FRACSUMAREA1,   /* Area/Number containing frac of total sum. */
-    CCOL_FRACSUMAREA2,   /* Area/Number containing frac of total sum. */
+    CCOL_HALFMAXNUM,     /* Area/Number of pixels above half of max.  */
+    CCOL_HALFMAXSUM,     /* Sum of pixels above half of max.          */
+    CCOL_HALFSUMNUM,     /* Area/Number containing half of total sum. */
+    CCOL_FRACMAX1NUM,    /* Area/Number containing frac of maximum.   */
+    CCOL_FRACMAX1SUM,    /* Sum containing frac of maximum.           */
+    CCOL_FRACMAX2NUM,    /* Area/Number containing frac of maximum.   */
+    CCOL_FRACMAX2SUM,    /* Sum containing frac of maximum.           */
 
     CCOL_NUMCOLS,        /* SHOULD BE LAST: total number of columns.  */
   };
@@ -239,7 +241,7 @@ struct mkcatalogparams
   float              upnsigma;  /* Multiple of sigma to define up-lim.  */
   int32_t       checkuplim[2];  /* Object & clump ID to check dist.     */
 
-  gal_data_t         *fracsum;  /* Fractions to use in --fracsumarea.   */
+  gal_data_t         *fracmax;  /* Fractions to use in --fracsumarea.   */
 
   /* Internal. */
   char           *relabclumps;  /* Name of new file for clump labels.   */
diff --git a/bin/mkcatalog/mkcatalog.c b/bin/mkcatalog/mkcatalog.c
index 34d7dac..8d42dc7 100644
--- a/bin/mkcatalog/mkcatalog.c
+++ b/bin/mkcatalog/mkcatalog.c
@@ -183,14 +183,14 @@ mkcatalog_single_object(void *in_prm)
          necessary. */
       if( p->oiflag[ OCOL_MEDIAN ]
           || p->oiflag[ OCOL_MAXIMUM ]
-          || p->oiflag[ OCOL_SUMHALFMAX ]
-          || p->oiflag[ OCOL_NUMHALFMAX ]
-          || p->oiflag[ OCOL_NUMHALFSUM ]
+          || p->oiflag[ OCOL_HALFMAXSUM ]
+          || p->oiflag[ OCOL_HALFMAXNUM ]
+          || p->oiflag[ OCOL_HALFSUMNUM ]
           || p->oiflag[ OCOL_SIGCLIPNUM ]
           || p->oiflag[ OCOL_SIGCLIPSTD ]
           || p->oiflag[ OCOL_SIGCLIPMEAN ]
-          || p->oiflag[ OCOL_NUMFRACSUM1 ]
-          || p->oiflag[ OCOL_NUMFRACSUM2 ]
+          || p->oiflag[ OCOL_FRACMAX1NUM ]
+          || p->oiflag[ OCOL_FRACMAX2NUM ]
           || p->oiflag[ OCOL_SIGCLIPMEDIAN ])
         parse_order_based(&pp);
 
diff --git a/bin/mkcatalog/parse.c b/bin/mkcatalog/parse.c
index 903147d..0fc3d14 100644
--- a/bin/mkcatalog/parse.c
+++ b/bin/mkcatalog/parse.c
@@ -1231,17 +1231,30 @@ parse_frac_find(gal_data_t *sorted_d, double value, 
double frac, int dosum)
 
 
 
+static double
+parse_frac_sum(gal_data_t *sorted_d, double value, double frac, int dosum)
+{
+  double sum=0.0f, *sorted=sorted_d->array;
+  size_t i, ind=parse_frac_find(sorted_d, value, frac, 0);
+
+  for(i=0;i<ind;++i) sum+=sorted[i];
+  return sum;
+}
+
+
+
+
+
 static void
 parse_area_of_frac_sum(struct mkcatalog_passparams *pp, gal_data_t *values,
                        double *outarr, int o1c0)
 {
   struct mkcatalogparams *p=pp->p;
 
-  size_t i, ind;
+  double max, *sorted;
   gal_data_t *sorted_d;
-  double sum=0.0f, max, *sorted;
   uint8_t *flag = o1c0 ? p->oiflag : p->ciflag;
-  double *fracsum = p->fracsum ? p->fracsum->array : NULL;
+  double *fracmax = p->fracmax ? p->fracmax->array : NULL;
   double sumlab = o1c0 ? outarr[OCOL_SUM] : outarr[CCOL_SUM];
 
   /* Allocate the array to use. */
@@ -1254,22 +1267,18 @@ parse_area_of_frac_sum(struct mkcatalog_passparams *pp, 
gal_data_t *values,
   gal_statistics_sort_decreasing(sorted_d);
 
   /* Set the required fractions. */
-  if(flag[ o1c0 ? OCOL_NUMHALFSUM : CCOL_NUMHALFSUM ])
-    outarr[ o1c0 ? OCOL_NUMHALFSUM : CCOL_NUMHALFSUM ]
+  if(flag[ o1c0 ? OCOL_HALFSUMNUM : CCOL_HALFSUMNUM ])
+    outarr[ o1c0 ? OCOL_HALFSUMNUM : CCOL_HALFSUMNUM ]
       = parse_frac_find(sorted_d, sumlab, 0.5f, 1);
 
-  if(flag[ o1c0 ? OCOL_NUMFRACSUM1 : CCOL_NUMFRACSUM1 ])
-    outarr[ o1c0 ? OCOL_NUMFRACSUM1 : CCOL_NUMFRACSUM1 ]
-      = parse_frac_find(sorted_d, sumlab, fracsum[0], 1);
-
-  if(flag[ o1c0 ? OCOL_NUMFRACSUM2 : CCOL_NUMFRACSUM2 ])
-    outarr[ o1c0 ? OCOL_NUMFRACSUM2 : CCOL_NUMFRACSUM2 ]
-      = parse_frac_find(sorted_d, sumlab, fracsum[1], 1);
-
   /* Values related to the maximum. */
-  if( flag[    o1c0 ? OCOL_MAXIMUM    : CCOL_MAXIMUM ]
-      || flag[ o1c0 ? OCOL_NUMHALFMAX : CCOL_NUMHALFMAX ]
-      || flag[ o1c0 ? OCOL_SUMHALFMAX : CCOL_SUMHALFMAX ])
+  if( flag[    o1c0 ? OCOL_MAXIMUM     : CCOL_MAXIMUM     ]
+      || flag[ o1c0 ? OCOL_HALFMAXNUM  : CCOL_HALFMAXNUM  ]
+      || flag[ o1c0 ? OCOL_HALFMAXSUM  : CCOL_HALFMAXSUM  ]
+      || flag[ o1c0 ? OCOL_FRACMAX1NUM : CCOL_FRACMAX1NUM ]
+      || flag[ o1c0 ? OCOL_FRACMAX1SUM : CCOL_FRACMAX1SUM ]
+      || flag[ o1c0 ? OCOL_FRACMAX2NUM : CCOL_FRACMAX2NUM ]
+      || flag[ o1c0 ? OCOL_FRACMAX2SUM : CCOL_FRACMAX2SUM ] )
     {
       /* Set the array and maximum value. We'll use the median of the top
          three pixels for the maximum (to avoid noise) */
@@ -1283,26 +1292,36 @@ parse_area_of_frac_sum(struct mkcatalog_passparams *pp, 
gal_data_t *values,
         outarr[ o1c0 ? OCOL_MAXIMUM : CCOL_MAXIMUM ] = max;
 
       /* The number of pixels within half the maximum. */
-      if(flag[ o1c0 ? OCOL_NUMHALFMAX : CCOL_NUMHALFMAX ])
-        outarr[ o1c0 ? OCOL_NUMHALFMAX : CCOL_NUMHALFMAX ]
+      if(flag[ o1c0 ? OCOL_HALFMAXNUM : CCOL_HALFMAXNUM ])
+        outarr[ o1c0 ? OCOL_HALFMAXNUM : CCOL_HALFMAXNUM ]
           = parse_frac_find(sorted_d, max, 0.5f, 0);
 
-      /* The sum of the pixels within half the maximum. */
-      if(flag[ o1c0 ? OCOL_SUMHALFMAX : CCOL_SUMHALFMAX ])
-        {
-          sum=0.0f;
-          ind=parse_frac_find(sorted_d, max, 0.5f, 0);
-          for(i=0;i<ind;++i) sum+=sorted[i];
-          outarr[ o1c0 ? OCOL_SUMHALFMAX : CCOL_SUMHALFMAX ]=sum;
-        }
+      /* The number of pixels within the first requested fraction of maximum */
+      if(flag[ o1c0 ? OCOL_FRACMAX1NUM : CCOL_FRACMAX1NUM ])
+        outarr[ o1c0 ? OCOL_FRACMAX1NUM : CCOL_FRACMAX1NUM ]
+          = parse_frac_find(sorted_d, max, fracmax[0], 0);
+
+      /* The number of pixels within the first requested fraction of maximum */
+      if(flag[ o1c0 ? OCOL_FRACMAX2NUM : CCOL_FRACMAX2NUM ])
+        outarr[ o1c0 ? OCOL_FRACMAX2NUM : CCOL_FRACMAX2NUM ]
+          = parse_frac_find(sorted_d, max, fracmax[1], 0);
+
+      /* The sum of the pixels within the given fraction of the maximum. */
+      if( flag[ o1c0 ? OCOL_HALFMAXSUM : CCOL_HALFMAXSUM ] )
+        outarr[ o1c0 ? OCOL_HALFMAXSUM : CCOL_HALFMAXSUM ]
+          = parse_frac_sum(sorted_d, max, 0.5f, 0);
+
+      /* Sum of the pixels within the 1st given fraction of the maximum. */
+      if( flag[ o1c0 ? OCOL_FRACMAX1SUM : CCOL_FRACMAX1SUM ] )
+        outarr[ o1c0 ? OCOL_FRACMAX1SUM : CCOL_FRACMAX1SUM ]
+          = parse_frac_sum(sorted_d, max, fracmax[0], 0);
+
+      /* Sum of the pixels within the 1st given fraction of the maximum. */
+      if( flag[ o1c0 ? OCOL_FRACMAX2SUM : CCOL_FRACMAX2SUM ] )
+        outarr[ o1c0 ? OCOL_FRACMAX2SUM : CCOL_FRACMAX2SUM ]
+          = parse_frac_sum(sorted_d, max, fracmax[1], 0);
     }
 
-  /* For a check.
-  printf("%g, %g, %g\n", outarr[OCOL_NUMFRACSUM1], outarr[OCOL_NUMHALFSUM],
-         outarr[OCOL_NUMFRACSUM2]);
-  exit(1);
-  */
-
   /* Clean up and return. */
   if(sorted_d!=values) gal_data_free(sorted_d);
 }
@@ -1333,11 +1352,11 @@ parse_order_based(struct mkcatalog_passparams *pp)
     {
       if(p->oiflag[ OCOL_MEDIAN        ]) pp->oi[ OCOL_MEDIAN       ] = NAN;
       if(p->oiflag[ OCOL_MAXIMUM       ]) pp->oi[ OCOL_MAXIMUM      ] = NAN;
-      if(p->oiflag[ OCOL_SUMHALFMAX    ]) pp->oi[ OCOL_SUMHALFMAX   ] = NAN;
-      if(p->oiflag[ OCOL_NUMHALFMAX    ]) pp->oi[ OCOL_NUMHALFMAX   ] = 0;
-      if(p->oiflag[ OCOL_NUMHALFSUM    ]) pp->oi[ OCOL_NUMHALFSUM   ] = 0;
-      if(p->oiflag[ OCOL_NUMFRACSUM1   ]) pp->oi[ OCOL_NUMFRACSUM1  ] = 0;
-      if(p->oiflag[ OCOL_NUMFRACSUM2   ]) pp->oi[ OCOL_NUMFRACSUM2  ] = 0;
+      if(p->oiflag[ OCOL_HALFMAXSUM    ]) pp->oi[ OCOL_HALFMAXSUM   ] = NAN;
+      if(p->oiflag[ OCOL_HALFMAXNUM    ]) pp->oi[ OCOL_HALFMAXNUM   ] = 0;
+      if(p->oiflag[ OCOL_HALFSUMNUM    ]) pp->oi[ OCOL_HALFSUMNUM   ] = 0;
+      if(p->oiflag[ OCOL_FRACMAX1NUM   ]) pp->oi[ OCOL_FRACMAX1NUM  ] = 0;
+      if(p->oiflag[ OCOL_FRACMAX2NUM   ]) pp->oi[ OCOL_FRACMAX2NUM  ] = 0;
       if(p->oiflag[ OCOL_SIGCLIPNUM    ]) pp->oi[ OCOL_SIGCLIPNUM   ] = 0;
       if(p->oiflag[ OCOL_SIGCLIPSTD    ]) pp->oi[ OCOL_SIGCLIPSTD   ] = 0;
       if(p->oiflag[ OCOL_SIGCLIPMEAN   ]) pp->oi[ OCOL_SIGCLIPMEAN  ] = NAN;
@@ -1348,11 +1367,11 @@ parse_order_based(struct mkcatalog_passparams *pp)
             ci=&pp->ci[ i * CCOL_NUMCOLS ];
             if(p->ciflag[ CCOL_MEDIAN        ]) ci[ CCOL_MEDIAN      ] = NAN;
             if(p->ciflag[ CCOL_MAXIMUM       ]) ci[ CCOL_MAXIMUM     ] = NAN;
-            if(p->ciflag[ CCOL_SUMHALFMAX    ]) ci[ CCOL_SUMHALFMAX  ] = NAN;
-            if(p->ciflag[ CCOL_NUMHALFMAX    ]) ci[ CCOL_NUMHALFMAX  ] = 0;
-            if(p->ciflag[ CCOL_NUMHALFSUM    ]) ci[ CCOL_NUMHALFSUM  ] = 0;
-            if(p->ciflag[ CCOL_NUMFRACSUM1   ]) ci[ CCOL_NUMFRACSUM1 ] = 0;
-            if(p->ciflag[ CCOL_NUMFRACSUM2   ]) ci[ CCOL_NUMFRACSUM2 ] = 0;
+            if(p->ciflag[ CCOL_HALFMAXSUM    ]) ci[ CCOL_HALFMAXSUM  ] = NAN;
+            if(p->ciflag[ CCOL_HALFMAXNUM    ]) ci[ CCOL_HALFMAXNUM  ] = 0;
+            if(p->ciflag[ CCOL_HALFSUMNUM    ]) ci[ CCOL_HALFSUMNUM  ] = 0;
+            if(p->ciflag[ CCOL_FRACMAX1NUM   ]) ci[ CCOL_FRACMAX1NUM ] = 0;
+            if(p->ciflag[ CCOL_FRACMAX2NUM   ]) ci[ CCOL_FRACMAX2NUM ] = 0;
             if(p->ciflag[ CCOL_SIGCLIPNUM    ]) ci[ CCOL_SIGCLIPNUM  ] = 0;
             if(p->ciflag[ CCOL_SIGCLIPSTD    ]) ci[ CCOL_SIGCLIPSTD  ] = 0;
             if(p->ciflag[ CCOL_SIGCLIPMEAN   ]) ci[ CCOL_SIGCLIPMEAN ] = NAN;
@@ -1465,11 +1484,11 @@ parse_order_based(struct mkcatalog_passparams *pp)
 
   /* Fractional values. */
   if( p->oiflag[    OCOL_MAXIMUM     ]
-      || p->oiflag[ OCOL_NUMHALFMAX  ]
-      || p->oiflag[ OCOL_SUMHALFMAX  ]
-      || p->oiflag[ OCOL_NUMHALFSUM  ]
-      || p->oiflag[ OCOL_NUMFRACSUM1 ]
-      || p->oiflag[ OCOL_NUMFRACSUM2 ] )
+      || p->oiflag[ OCOL_HALFMAXNUM  ]
+      || p->oiflag[ OCOL_HALFMAXSUM  ]
+      || p->oiflag[ OCOL_HALFSUMNUM  ]
+      || p->oiflag[ OCOL_FRACMAX1NUM ]
+      || p->oiflag[ OCOL_FRACMAX2NUM ] )
     parse_area_of_frac_sum(pp, objvals, pp->oi, 1);
 
   /* Clean up the object values. */
@@ -1521,11 +1540,13 @@ parse_order_based(struct mkcatalog_passparams *pp)
 
           /* Estimate half of the total sum. */
           if( p->ciflag[    CCOL_MAXIMUM     ]
-              || p->ciflag[ CCOL_NUMHALFMAX  ]
-              || p->ciflag[ CCOL_SUMHALFMAX  ]
-              || p->ciflag[ CCOL_NUMHALFSUM  ]
-              || p->ciflag[ CCOL_NUMFRACSUM1 ]
-              || p->ciflag[ CCOL_NUMFRACSUM2 ] )
+              || p->ciflag[ CCOL_HALFMAXNUM  ]
+              || p->ciflag[ CCOL_HALFMAXSUM  ]
+              || p->ciflag[ CCOL_HALFSUMNUM  ]
+              || p->ciflag[ CCOL_FRACMAX1NUM ]
+              || p->ciflag[ CCOL_FRACMAX1SUM ]
+              || p->ciflag[ CCOL_FRACMAX2NUM ]
+              || p->ciflag[ CCOL_FRACMAX2SUM ] )
             parse_area_of_frac_sum(pp, clumpsvals[i], ci, 0);
 
           /* Clean up this clump's values. */
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 51aad7b..9b8417e 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -411,35 +411,35 @@ ui_read_check_only_options(struct mkcatalogparams *p)
         }
     }
 
-  /* Make sure that '--fracsum' is given if necessary and that the fracsum
+  /* Make sure that '--fracmax' is given if necessary and that the fracsum
      values are less than one. */
   for(colcode=p->columnids; colcode!=NULL; colcode=colcode->next)
-    if( (colcode->v==UI_KEY_FRACSUMAREA1 || colcode->v==UI_KEY_FRACSUMAREA2)
-        && p->fracsum==NULL )
+    if( (colcode->v==UI_KEY_FRACMAXAREA1 || colcode->v==UI_KEY_FRACMAXAREA2)
+        && p->fracmax==NULL )
       error(EXIT_FAILURE, 0, "please specify your required fractions for "
-            "'--fracsumarea' using the '--fracsum' option (for example "
-            "'--fracsum=0.25,0.75' for two columns)");
-  if(p->fracsum)
+            "'--fracmaxarea' using the '--fracmax' option (for example "
+            "'--fracmax=0.25,0.75' for two columns)");
+  if(p->fracmax)
     {
       /* Currently only 2 fracsums are accepted. */
-      if(p->fracsum->size>2)
-        error(EXIT_FAILURE, 0, "%zu values given to '--fracsum', only two "
-              "values are currently supported", p->fracsum->size);
+      if(p->fracmax->size>2)
+        error(EXIT_FAILURE, 0, "%zu values given to '--fracmax', only two "
+              "values are currently supported", p->fracmax->size);
 
       /* Check the values. */
-      darr=p->fracsum->array;
-      for(i=0;i<p->fracsum->size;++i)
+      darr=p->fracmax->array;
+      for(i=0;i<p->fracmax->size;++i)
         if(darr[i]<=0.0f || darr[i]>=1.0f)
-          error(EXIT_FAILURE, 0, "%g is not acceptable for '--fracsum', "
+          error(EXIT_FAILURE, 0, "%g is not acceptable for '--fracmax', "
                 "values should be larger than 0 and less than 1", darr[i]);
 
       /* If a second fracum column is necessary, make sure two values are
-         given to --fracsum. */
+         given to --fracmax. */
       for(colcode=p->columnids; colcode!=NULL; colcode=colcode->next)
-        if(colcode->v==UI_KEY_FRACSUMAREA2 && p->fracsum->size==1)
-          error(EXIT_FAILURE, 0, "only one value given to '--fracsum', "
-                "but '--fracsumarea2' was requested! You need to give "
-                "the requested fraction as a second value to '--fracsum', "
+        if(colcode->v==UI_KEY_FRACMAXAREA2 && p->fracmax->size==1)
+          error(EXIT_FAILURE, 0, "only one value given to '--fracmax', "
+                "but '--fracmaxarea2' was requested! You need to give "
+                "the requested fraction as a second value to '--fracmax', "
                 "separated by a comma (,)");
     }
 }
@@ -1021,11 +1021,13 @@ ui_necessary_inputs(struct mkcatalogparams *p, int 
*values, int *sky,
         case OCOL_UPPERLIMIT_S:       *values        = 1;          break;
         case OCOL_UPPERLIMIT_Q:       *values        = 1;          break;
         case OCOL_UPPERLIMIT_SKEW:    *values        = 1;          break;
-        case OCOL_NUMHALFMAX:         *values        = 1;          break;
-        case OCOL_SUMHALFMAX:         *values        = 1;          break;
-        case OCOL_NUMHALFSUM:         *values        = 1;          break;
-        case OCOL_NUMFRACSUM1:        *values        = 1;          break;
-        case OCOL_NUMFRACSUM2:        *values        = 1;          break;
+        case OCOL_HALFMAXNUM:         *values        = 1;          break;
+        case OCOL_HALFMAXSUM:         *values        = 1;          break;
+        case OCOL_HALFSUMNUM:         *values        = 1;          break;
+        case OCOL_FRACMAX1NUM:        *values        = 1;          break;
+        case OCOL_FRACMAX1SUM:        *values        = 1;          break;
+        case OCOL_FRACMAX2NUM:        *values        = 1;          break;
+        case OCOL_FRACMAX2SUM:        *values        = 1;          break;
         case OCOL_C_NUMALL:           /* Only clump labels.  */    break;
         case OCOL_C_NUM:              *values        = 1;          break;
         case OCOL_C_SUM:              *values        = 1;          break;
@@ -1099,11 +1101,13 @@ ui_necessary_inputs(struct mkcatalogparams *p, int 
*values, int *sky,
           case CCOL_UPPERLIMIT_S:     *values        = 1;          break;
           case CCOL_UPPERLIMIT_Q:     *values        = 1;          break;
           case CCOL_UPPERLIMIT_SKEW:  *values        = 1;          break;
-          case CCOL_NUMHALFMAX:       *values        = 1;          break;
-          case CCOL_SUMHALFMAX:       *values        = 1;          break;
-          case CCOL_NUMHALFSUM:       *values        = 1;          break;
-          case CCOL_NUMFRACSUM1:      *values        = 1;          break;
-          case CCOL_NUMFRACSUM2:      *values        = 1;          break;
+          case CCOL_HALFMAXNUM:       *values        = 1;          break;
+          case CCOL_HALFMAXSUM:       *values        = 1;          break;
+          case CCOL_HALFSUMNUM:       *values        = 1;          break;
+          case CCOL_FRACMAX1NUM:      *values        = 1;          break;
+          case CCOL_FRACMAX1SUM:      *values        = 1;          break;
+          case CCOL_FRACMAX2NUM:      *values        = 1;          break;
+          case CCOL_FRACMAX2SUM:      *values        = 1;          break;
           default:
             error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "
                   "fix the problem. The code %zu is not a recognized "
diff --git a/bin/mkcatalog/ui.h b/bin/mkcatalog/ui.h
index 18bd57c..265a315 100644
--- a/bin/mkcatalog/ui.h
+++ b/bin/mkcatalog/ui.h
@@ -104,7 +104,7 @@ enum option_keys_enum
   UI_KEY_UPNSIGMA,
   UI_KEY_CHECKUPLIM,
   UI_KEY_NOCLUMPSORT,
-  UI_KEY_FRACSUM,
+  UI_KEY_FRACMAX,
 
   UI_KEY_OBJID,                         /* Catalog columns. */
   UI_KEY_IDINHOSTOBJ,
@@ -181,10 +181,12 @@ enum option_keys_enum
   UI_KEY_HALFSUMAREA,
   UI_KEY_HALFSUMSB,
   UI_KEY_HALFRADIUSOBS,
-  UI_KEY_FRACSUMAREA1,
-  UI_KEY_FRACSUMAREA2,
-  UI_KEY_FRACRADIUSOBS1,
-  UI_KEY_FRACRADIUSOBS2,
+  UI_KEY_FRACMAXSUM1,
+  UI_KEY_FRACMAXSUM2,
+  UI_KEY_FRACMAXAREA1,
+  UI_KEY_FRACMAXAREA2,
+  UI_KEY_FRACMAXRADIUS1,
+  UI_KEY_FRACMAXRADIUS2,
 };
 
 
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 12ca0b0..0f3dafd 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -16014,10 +16014,11 @@ This option takes two values: the first is the 
multiple of @mymath{\sigma}, and
 If the latter is larger than 1, it is read as an integer number and will be 
the number of times to clip.
 If it is smaller than 1, it is interpreted as the tolerance level to stop 
clipping. See @ref{Sigma clipping} for a complete explanation.
 
-@item --fracsum=FLT[,FLT]
-The fractions of summed flux in objects or clumps to be used in the 
@option{--fracsumarea1} and @option{--fracsumarea2} columns, see 
@ref{MakeCatalog measurements}.
-The values must be larger than 0 and smaller than 1.
-When only @option{--fracsumarea1} is requested, one value must be given to 
this option, but if @option{--fracsumarea2} is also requested, two values must 
be given here.
+@item --fracmax=FLT[,FLT]
+The fractions (one or two) of maximum value in objects or clumps to be used in 
the related columns, for example @option{--fracmaxarea1}, 
@option{--fracmaxsum1} or @option{--fracmaxradius1}, see @ref{MakeCatalog 
measurements}.
+For the maximum value, see the description of @option{--maximum} column below.
+The value(s) of this option must be larger than 0 and smaller than 1 (they are 
a fraction).
+When only @option{--fracmaxarea1} or @option{--fracmaxsum1} is requested, one 
value must be given to this option, but if @option{--fracmaxarea2} or 
@option{--fracmaxsum2} are also requested, two values must be given to this 
option.
 The values can be written as simple floating point numbers, or as fractions, 
for example @code{0.25,0.75} and @code{0.25,3/4} are the same.
 @end table
 
@@ -16517,17 +16518,29 @@ For more on @mymath{r_e}, please see @ref{Galaxies}.
 Therefore, when @mymath{r_e} is meaningful for the target (the target is 
elliptically symmetric and can be parametrized as a S@'ersic profile), 
@mymath{r_e} should be derived from fitting the profile with a S@'ersic 
function which has been convolved with the PSF.
 But from the equation above, you see that this radius is derived from the raw 
image's labeled values (after convolution, with no parametric profile), so this 
column's value will generally be (much) smaller than @mymath{r_e}, depending on 
the PSF, depth of the dataset, the morphology, or if a fraction of the profile 
falls on the edge of the image.
 
-@item --fracsumarea1
-@itemx --fracsumarea2
-Similar to @option{--halfsumarea}, but for user-defined fractions of total sum.
-The fractions are given through the @option{--fracsum} option (that can take 
two values) and is described in @ref{MakeCatalog inputs and basic settings}.
-Recall that in @option{--halfsumarea}, the fraction is fixed to 0.5 so added 
with these two columns, you can sample three parts of the profile.
-
-@item --fracradiusobs1
-@itemx --fracradiusobs2
-Similar to @option{--halfradiusobs}, but for user-defined fractions of total 
sum.
-The fractions are given through the @option{--fracsum} option (that can take 
two values) and is described in @ref{MakeCatalog inputs and basic settings}.
-Recall that in @option{--halfradiusobs}, the fraction is fixed to 0.5 so added 
with these two columns, you can sample three parts of the profile.
+@item --fracmaxarea1
+@itemx --fracmaxarea2
+Number of pixels brighter than the given fraction(s) of the maximum pixel 
value.
+For the maximum value, see the description of @option{--maximum} column.
+The fraction(s) are given through the @option{--fracmax} option (that can take 
two values) and is described in @ref{MakeCatalog inputs and basic settings}.
+Recall that in @option{--halfmaxarea}, the fraction is fixed to 0.5.
+Hence, added with these two columns, you can sample three parts of the profile 
area.
+
+@item --fracmaxsum1
+@itemx --fracmaxsum2
+Sum of pixels brighter than the given fraction(s) of the maximum pixel value.
+For the maximum value, see the description of @option{--maximum} column below.
+The fraction(s) are given through the @option{--fracmax} option (that can take 
two values) and is described in @ref{MakeCatalog inputs and basic settings}.
+Recall that in @option{--halfmaxsum}, the fraction is fixed to 0.5.
+Hence, added with these two columns, you can sample three parts of the 
profile's sum of pixels.
+
+@item --fracmaxradius1
+@itemx --fracmaxradius2
+Radius (in units of pixels) derived from the area that contains the given 
fractions of the maximum valued pixel(s) of the label's pixels (value reported 
by @option{--fracmaxarea1} or @option{--fracmaxarea2}).
+For the maximum value, see the description of @option{--maximum} column below.
+The fractions are given through the @option{--fracmax} option (that can take 
two values) and is described in @ref{MakeCatalog inputs and basic settings}.
+Recall that in @option{--fwhmobs}, the fraction is fixed to 0.5.
+Hence, added with these two columns, you can sample three parts of the 
profile's radius.
 
 @item --clumpsarea
 [Objects] The total area of all the clumps in this object.



reply via email to

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