gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 4f1a586: Option group identifiers corrected to


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 4f1a586: Option group identifiers corrected to UI_GROUP
Date: Thu, 26 Oct 2017 18:38:23 -0400 (EDT)

branch: master
commit 4f1a586bbc9455fbf6f1d75e19d111fed6ea84e9
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Option group identifiers corrected to UI_GROUP
    
    The identifiers of option groups in all the different programs started with
    `ARGS_GROUP' and the enum defining them was in `ui.c'. This was contrary to
    the naming convention in Gnuastro and so made it hard to tell where they
    were defined. In the previous commit, this was corrected for the
    CosmicCalculator and Statistics programs. In this commit, it is corrected
    for all the other programs.
    
    Now all program specific option groups are defined in the program's `ui.h'
    and they start with `UI_GROUP'.
---
 bin/TEMPLATE/ui.h      |   3 ++
 bin/arithmetic/ui.h    |   6 +++
 bin/buildprog/ui.h     |   3 ++
 bin/convertt/args.h    |  18 ++++----
 bin/convertt/ui.c      |  10 -----
 bin/convertt/ui.h      |  13 ++++++
 bin/convolve/ui.c      |   9 ----
 bin/convolve/ui.h      |  13 ++++++
 bin/cosmiccal/ui.h     |   2 +-
 bin/crop/args.h        |  26 ++++++------
 bin/crop/ui.c          |  15 +------
 bin/crop/ui.h          |  16 +++++++
 bin/fits/args.h        |  28 ++++++-------
 bin/fits/ui.c          |   8 ----
 bin/fits/ui.h          |  14 +++++++
 bin/mkcatalog/args.h   | 110 ++++++++++++++++++++++++-------------------------
 bin/mkcatalog/ui.c     |   8 +---
 bin/mkcatalog/ui.h     |  14 +++++++
 bin/mknoise/ui.h       |   3 ++
 bin/mkprof/args.h      |  60 +++++++++++++--------------
 bin/mkprof/ui.c        |  11 -----
 bin/mkprof/ui.h        |  15 +++++++
 bin/noisechisel/args.h |  64 ++++++++++++++--------------
 bin/noisechisel/ui.c   |   6 ---
 bin/noisechisel/ui.h   |  14 +++++++
 bin/statistics/ui.h    |   3 +-
 bin/table/ui.h         |   3 ++
 bin/warp/args.h        |  20 ++++-----
 bin/warp/ui.c          |   9 ----
 bin/warp/ui.h          |  13 ++++++
 30 files changed, 298 insertions(+), 239 deletions(-)

diff --git a/bin/TEMPLATE/ui.h b/bin/TEMPLATE/ui.h
index ec2a41b..290caa1 100644
--- a/bin/TEMPLATE/ui.h
+++ b/bin/TEMPLATE/ui.h
@@ -23,6 +23,9 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
 
 
 
diff --git a/bin/arithmetic/ui.h b/bin/arithmetic/ui.h
index 63ecc17..5fcffce 100644
--- a/bin/arithmetic/ui.h
+++ b/bin/arithmetic/ui.h
@@ -23,6 +23,12 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
 
 /* Available letters for short options:
 
diff --git a/bin/buildprog/ui.h b/bin/buildprog/ui.h
index 40c72ad..712147b 100644
--- a/bin/buildprog/ui.h
+++ b/bin/buildprog/ui.h
@@ -23,6 +23,9 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
 
 
 
diff --git a/bin/convertt/args.h b/bin/convertt/args.h
index 9bbcec4..950ceea 100644
--- a/bin/convertt/args.h
+++ b/bin/convertt/args.h
@@ -91,7 +91,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Flux:",
-      ARGS_GROUP_FLUX
+      UI_GROUP_FLUX
     },
     {
       "fluxlow",
@@ -99,7 +99,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Lower flux truncation value.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->fluxlowstr,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -112,7 +112,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Higher flux truncation value.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->fluxhighstr,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -125,7 +125,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Maximum byte value for all color channels.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->maxbyte,
       GAL_TYPE_UINT8,
       GAL_OPTIONS_RANGE_GE_0,
@@ -138,7 +138,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Set value of fluxlow as the minimum byte value.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->flminbyte,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -151,7 +151,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Set value of fluxhigh as the maximum byte value.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->fhmaxbyte,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -164,7 +164,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Change pixel values `from_1:to_1,from_2:to_2`.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->changestr,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -177,7 +177,7 @@ struct argp_option program_options[] =
       0,
       0,
       "First truncate then change pixel values.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->changeaftertrunc,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -190,7 +190,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Invert the values in JPEG and EPS/PDF.",
-      ARGS_GROUP_FLUX,
+      UI_GROUP_FLUX,
       &p->invert,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/convertt/ui.c b/bin/convertt/ui.c
index e52d85b..65d01f6 100644
--- a/bin/convertt/ui.c
+++ b/bin/convertt/ui.c
@@ -80,16 +80,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will convert 
any of the "
 
 
 
-/* Option groups particular to this program */
-enum program_args_groups
-{
-  ARGS_GROUP_FLUX = GAL_OPTIONS_GROUP_AFTER_COMMON,
-};
-
-
-
-
-
 
 
 
diff --git a/bin/convertt/ui.h b/bin/convertt/ui.h
index bd60bae..2afe039 100644
--- a/bin/convertt/ui.h
+++ b/bin/convertt/ui.h
@@ -23,6 +23,19 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program */
+enum program_args_groups
+{
+  UI_GROUP_FLUX = GAL_OPTIONS_GROUP_AFTER_COMMON,
+};
+
 
 
 
diff --git a/bin/convolve/ui.c b/bin/convolve/ui.c
index cff73b9..014f8e3 100644
--- a/bin/convolve/ui.c
+++ b/bin/convolve/ui.c
@@ -79,15 +79,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will 
convolve an input "
 
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_MESH_GRID = GAL_OPTIONS_GROUP_AFTER_COMMON,
-};
-
-
-
-
 
 
 
diff --git a/bin/convolve/ui.h b/bin/convolve/ui.h
index fc02db3..9cff5a0 100644
--- a/bin/convolve/ui.h
+++ b/bin/convolve/ui.h
@@ -23,6 +23,19 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_MESH_GRID = GAL_OPTIONS_GROUP_AFTER_COMMON,
+};
+
 
 
 
diff --git a/bin/cosmiccal/ui.h b/bin/cosmiccal/ui.h
index 3ab8732..40cc70f 100644
--- a/bin/cosmiccal/ui.h
+++ b/bin/cosmiccal/ui.h
@@ -23,7 +23,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
-/* For common options groupings. */
+/* For common options groups. */
 #include <gnuastro-internal/options.h>
 
 
diff --git a/bin/crop/args.h b/bin/crop/args.h
index 83f42fa..114228e 100644
--- a/bin/crop/args.h
+++ b/bin/crop/args.h
@@ -123,7 +123,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Crop by center",
-      ARGS_GROUP_CENTER_GENERAL
+      UI_GROUP_CENTER_GENERAL
     },
     {
       "checkcenter",
@@ -131,7 +131,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Width (in pixels) of box at center to check.",
-      ARGS_GROUP_CENTER_GENERAL,
+      UI_GROUP_CENTER_GENERAL,
       &p->checkcenter,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_0_OR_ODD,
@@ -144,7 +144,7 @@ struct argp_option program_options[] =
       "FLT[,...]",
       0,
       "Width when crop is defined by its center.",
-      ARGS_GROUP_CENTER_GENERAL,
+      UI_GROUP_CENTER_GENERAL,
       &p->width,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -158,7 +158,7 @@ struct argp_option program_options[] =
       "FLT[,...]",
       0,
       "Central coordinates of a single crop.",
-      ARGS_GROUP_CENTER_GENERAL,
+      UI_GROUP_CENTER_GENERAL,
       &p->center,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -176,7 +176,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Crop by center (when a catalog is given)",
-      ARGS_GROUP_CENTER_CATALOG
+      UI_GROUP_CENTER_CATALOG
     },
     {
       "catalog",
@@ -184,7 +184,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Input catalog filename.",
-      ARGS_GROUP_CENTER_CATALOG,
+      UI_GROUP_CENTER_CATALOG,
       &p->catname,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -197,7 +197,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "HDU of catalog, if it is a FITS table.",
-      ARGS_GROUP_CENTER_CATALOG,
+      UI_GROUP_CENTER_CATALOG,
       &p->cathdu,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -210,7 +210,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Column no./info of crop filename (no suffix).",
-      ARGS_GROUP_CENTER_CATALOG,
+      UI_GROUP_CENTER_CATALOG,
       &p->namecol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -223,7 +223,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Column no./info containing coordinates.",
-      ARGS_GROUP_CENTER_CATALOG,
+      UI_GROUP_CENTER_CATALOG,
       &p->coordcol,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -238,7 +238,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Crop by region",
-      ARGS_GROUP_REGION
+      UI_GROUP_REGION
     },
     {
       "section",
@@ -246,7 +246,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Image section string specifying crop range.",
-      ARGS_GROUP_REGION,
+      UI_GROUP_REGION,
       &p->section,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -259,7 +259,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Polygon vertices of region to crop, keep inside.",
-      ARGS_GROUP_REGION,
+      UI_GROUP_REGION,
       &p->polygon,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -272,7 +272,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Keep the polygon's outside, mask the inside.",
-      ARGS_GROUP_REGION,
+      UI_GROUP_REGION,
       &p->outpolygon,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/crop/ui.c b/bin/crop/ui.c
index c4336f1..af52d5e 100644
--- a/bin/crop/ui.c
+++ b/bin/crop/ui.c
@@ -83,19 +83,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will create 
cutouts, "
 
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_CENTER_GENERAL = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  ARGS_GROUP_CENTER_SINGLE,
-  ARGS_GROUP_CENTER_CATALOG,
-  ARGS_GROUP_REGION,
-};
-
-
-
-
-
 
 
 
@@ -155,7 +142,7 @@ ui_initialize_options(struct cropparams *p,
 
         case GAL_OPTIONS_KEY_SEARCHIN:
         case GAL_OPTIONS_KEY_IGNORECASE:
-          cp->coptions[i].group=ARGS_GROUP_CENTER_CATALOG;
+          cp->coptions[i].group=UI_GROUP_CENTER_CATALOG;
           break;
         }
 
diff --git a/bin/crop/ui.h b/bin/crop/ui.h
index 46d520f..fd15de0 100644
--- a/bin/crop/ui.h
+++ b/bin/crop/ui.h
@@ -23,6 +23,22 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_CENTER_GENERAL = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_CENTER_SINGLE,
+  UI_GROUP_CENTER_CATALOG,
+  UI_GROUP_REGION,
+};
+
 
 
 
diff --git a/bin/fits/args.h b/bin/fits/args.h
index 8c71928..44abbfe 100644
--- a/bin/fits/args.h
+++ b/bin/fits/args.h
@@ -35,7 +35,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "HDUs (extensions):",
-      ARGS_GROUP_EXTENSION
+      UI_GROUP_EXTENSION
     },
     {
       "remove",
@@ -43,7 +43,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Remove extension from input file.",
-      ARGS_GROUP_EXTENSION,
+      UI_GROUP_EXTENSION,
       &p->remove,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -56,7 +56,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Copy extension to output file.",
-      ARGS_GROUP_EXTENSION,
+      UI_GROUP_EXTENSION,
       &p->copy,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -69,7 +69,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Copy extension to output and remove from input.",
-      ARGS_GROUP_EXTENSION,
+      UI_GROUP_EXTENSION,
       &p->cut,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -82,7 +82,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Keywords (in one HDU):",
-      ARGS_GROUP_KEYWORD
+      UI_GROUP_KEYWORD
     },
     {
       "asis",
@@ -90,7 +90,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Write the argument string as is into the header.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->asis,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -103,7 +103,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Delete a keyword from the header.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->delete,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -116,7 +116,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Rename keyword, keeping value and comments.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->rename,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -129,7 +129,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Update a keyword value or comments.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->update,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -142,7 +142,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Write a keyword (with value, comments and units).",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->write,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -155,7 +155,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Add HISTORY keyword, any length is ok.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->history,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -168,7 +168,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Add COMMENT keyword, any length is ok.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->comment,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -181,7 +181,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Set the DATE keyword to the current time.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->date,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -194,7 +194,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Print all keywords in the selected HDU.",
-      ARGS_GROUP_KEYWORD,
+      UI_GROUP_KEYWORD,
       &p->printallkeys,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/fits/ui.c b/bin/fits/ui.c
index 33576d2..880ea35 100644
--- a/bin/fits/ui.c
+++ b/bin/fits/ui.c
@@ -71,14 +71,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" allows you 
to view and "
 
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_EXTENSION = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  ARGS_GROUP_KEYWORD,
-};
-
-
 
 
 
diff --git a/bin/fits/ui.h b/bin/fits/ui.h
index f31ce05..390f171 100644
--- a/bin/fits/ui.h
+++ b/bin/fits/ui.h
@@ -23,6 +23,20 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_EXTENSION = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_KEYWORD,
+};
+
 
 
 
diff --git a/bin/mkcatalog/args.h b/bin/mkcatalog/args.h
index 30db17b..eb3b49b 100644
--- a/bin/mkcatalog/args.h
+++ b/bin/mkcatalog/args.h
@@ -212,7 +212,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Upper limit magnitude:",
-      ARGS_GROUP_UPPERLIMIT
+      UI_GROUP_UPPERLIMIT
     },
     {
       "upmaskfile",
@@ -220,7 +220,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Mask image file name only for upper limit.",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->upmaskfile,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -233,7 +233,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Mask image HDU only for upper limit.",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->upmaskhdu,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -246,7 +246,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Number of randomly positioned samples",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->upnum,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -259,7 +259,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Use GSL_RNG_SEED environment variable for seed.",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->envseed,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -272,7 +272,7 @@ struct argp_option program_options[] =
       "FLT,FLT",
       0,
       "Sigma multiple and, tolerance or number.",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->upsigmaclip,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -286,7 +286,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Multiple of sigma to define upperlimit.",
-      ARGS_GROUP_UPPERLIMIT,
+      UI_GROUP_UPPERLIMIT,
       &p->upnsigma,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GT_0,
@@ -302,7 +302,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Output catalog columns",
-      ARGS_GROUP_COLUMNS
+      UI_GROUP_COLUMNS
     },
     {  /* `ids' is not a unique column, it is a combination of several
           columns. */
@@ -311,7 +311,7 @@ struct argp_option program_options[] =
       0,
       0,
       "All IDs of objects and clumps.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -325,7 +325,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Object label/ID.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -339,7 +339,7 @@ struct argp_option program_options[] =
       0,
       0,
       "ID of object hosting this clump.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -353,7 +353,7 @@ struct argp_option program_options[] =
       0,
       0,
       "ID of clump in host object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -367,7 +367,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Number of clumps in this object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -381,7 +381,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Number of pixels in clump or object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -395,7 +395,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Sum of all clump areas in an object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -409,7 +409,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Area used for flux weighted positions.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -423,7 +423,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center in first FITS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -437,7 +437,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center in second FITS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -451,7 +451,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center in first FITS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -465,7 +465,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center in second FITS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -479,7 +479,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux.wht center of all clumps in obj. (X).",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -493,7 +493,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux.wht center of all clumps in obj. (Y).",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -507,7 +507,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center of all clumps in obj. (X).",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -521,7 +521,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center of all clumps in obj. (Y).",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -535,7 +535,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center right ascension.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -549,7 +549,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center declination.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -563,7 +563,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center in first WCS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -577,7 +577,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted center in second WCS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -591,7 +591,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center in first WCS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -605,7 +605,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center in second WCS axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -619,7 +619,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux.wht center of all clumps in 1st WCS.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -633,7 +633,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux.wht center of all clumps in 2nd WCS.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -647,7 +647,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center of all clumps in 1st WCS.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -661,7 +661,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric center of all clumps in 2nd WCS.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -675,7 +675,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Brightness (sum of pixel values).",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -689,7 +689,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Brightness of clumps in an object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -703,7 +703,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Sky (not river) subtracted clump brightness.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -717,7 +717,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Total magnitude of objects or clumps.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -731,7 +731,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Magnitude error of objects or clumps.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -745,7 +745,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Magnitude of all clumps in object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -759,7 +759,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Upper-limit value, use other options to config.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -773,7 +773,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Upper-limit mag. use other options to config.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -787,7 +787,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Average river value surrounding a clump.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -801,7 +801,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Number of river pixels around a clump.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -815,7 +815,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Signal to noise ratio of objects or clumps.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -829,7 +829,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Average Sky value under this clump or object.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -843,7 +843,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Average Sky standard deviation.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -857,7 +857,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted semi-major axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -871,7 +871,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted semi-minor axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -885,7 +885,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted axis ratio.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -899,7 +899,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Flux weighted position angle.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -913,7 +913,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric semi-major axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -927,7 +927,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric semi-minor axis.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -941,7 +941,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric axis ratio.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -955,7 +955,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Geometric position angle.",
-      ARGS_GROUP_COLUMNS,
+      UI_GROUP_COLUMNS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index f196824..c780516 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -76,12 +76,8 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will create 
a catalog from "
   "\v"
   PACKAGE_NAME" home page: "PACKAGE_URL;
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_UPPERLIMIT = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  ARGS_GROUP_COLUMNS,
-};
+
+
 
 
 
diff --git a/bin/mkcatalog/ui.h b/bin/mkcatalog/ui.h
index 5173056..cc0cdaf 100644
--- a/bin/mkcatalog/ui.h
+++ b/bin/mkcatalog/ui.h
@@ -23,6 +23,20 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_UPPERLIMIT = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_COLUMNS,
+};
+
 
 
 
diff --git a/bin/mknoise/ui.h b/bin/mknoise/ui.h
index 38c1d1f..eed9b92 100644
--- a/bin/mknoise/ui.h
+++ b/bin/mknoise/ui.h
@@ -23,6 +23,9 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
 
 
 
diff --git a/bin/mkprof/args.h b/bin/mkprof/args.h
index 931d909..f5e4f6c 100644
--- a/bin/mkprof/args.h
+++ b/bin/mkprof/args.h
@@ -162,7 +162,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Profiles:",
-      ARGS_GROUP_PROFILES
+      UI_GROUP_PROFILES
     },
     {
       "mode",
@@ -170,7 +170,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Mode of `--ccol': `img' or `wcs'.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->mode,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -184,7 +184,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "No. of random points in Monte Carlo integration.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->numrandom,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -197,7 +197,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Use GSL_RNG_SEED environment variable for seed.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->envseed,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -210,7 +210,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Tolerance to switch to less accurate method.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->tolerance,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0_LE_1,
@@ -223,7 +223,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Truncation is in units of pixels, not radius.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->tunitinp,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -236,7 +236,7 @@ struct argp_option program_options[] =
       0,
       0,
       "mcol is flat pixel value (when fcol is 5 or 6)",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->mforflatpix,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -249,7 +249,7 @@ struct argp_option program_options[] =
       0,
       0,
       "mcol is total brightness, not magnitude.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->mcolisbrightness,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -262,7 +262,7 @@ struct argp_option program_options[] =
       "INT[, ...]",
       0,
       "Shift profile centers in output image.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->shift,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -276,7 +276,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Shift and expand based on first catalog PSF.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->prepforconv,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -289,7 +289,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Magnitude zero point.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->zeropoint,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_ANY,
@@ -302,7 +302,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Magnitude is for peak pixel, not full profile.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->magatpeak,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -315,7 +315,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Width of circumference (inward) profiles",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->circumwidth,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GT_0,
@@ -328,7 +328,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Replace overlapping profile pixels, don't add.",
-      ARGS_GROUP_PROFILES,
+      UI_GROUP_PROFILES,
       &p->replace,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -343,7 +343,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Columns, by info (see `--searchin'), or number (starting from 1):",
-      ARGS_GROUP_CATALOG
+      UI_GROUP_CATALOG
     },
     {
       "ccol",
@@ -351,7 +351,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Coordinate columns (one call for each dimension).",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->ccol,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -365,7 +365,7 @@ struct argp_option program_options[] =
       0,
       "sersic (1), moffat (2), gaussian (3), point (4), "
       "flat (5), circumference (6), distance (7).",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->fcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -378,7 +378,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Effective radius or FWHM in pixels.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->rcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -391,7 +391,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Sersic index or Moffat beta.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->ncol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -404,7 +404,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Position angle.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->pcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -417,7 +417,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Axis ratio.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->qcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -430,7 +430,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Magnitude.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->mcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -443,7 +443,7 @@ struct argp_option program_options[] =
       "STR/INT",
       0,
       "Truncation in units of --rcol, unless --tunitinp.",
-      ARGS_GROUP_CATALOG,
+      UI_GROUP_CATALOG,
       &p->tcol,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -458,7 +458,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "WCS parameters:",
-      ARGS_GROUP_WCS
+      UI_GROUP_WCS
     },
     {
       "crpix",
@@ -466,7 +466,7 @@ struct argp_option program_options[] =
       "FLT[, ...]",
       0,
       "Pixel coordinates of reference point.",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->crpix,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
@@ -480,7 +480,7 @@ struct argp_option program_options[] =
       "FLT[, ...]",
       0,
       "WCS coordinates of reference point.",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->crval,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
@@ -494,7 +494,7 @@ struct argp_option program_options[] =
       "FLT[, ...]",
       0,
       "Resolution in each dimension.",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->cdelt,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
@@ -508,7 +508,7 @@ struct argp_option program_options[] =
       "FLT[, ...]",
       0,
       "WCS rotation matrix (all elements).",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->pc,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
@@ -522,7 +522,7 @@ struct argp_option program_options[] =
       "STR[, ... ]",
       0,
       "Units of the WCS coordinates (e.g., `deg').",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->cunit,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
@@ -536,7 +536,7 @@ struct argp_option program_options[] =
       "STR[, ... ]",
       0,
       "One of FITS standard WCS types.",
-      ARGS_GROUP_WCS,
+      UI_GROUP_WCS,
       &p->ctype,
       GAL_TYPE_FLOAT64,
       GAL_OPTIONS_RANGE_ANY,
diff --git a/bin/mkprof/ui.c b/bin/mkprof/ui.c
index 16fe676..8f239ce 100644
--- a/bin/mkprof/ui.c
+++ b/bin/mkprof/ui.c
@@ -79,17 +79,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will create 
a FITS image "
 
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_PROFILES = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  ARGS_GROUP_CATALOG,
-  ARGS_GROUP_WCS,
-};
-
-
-
-
 
 
 
diff --git a/bin/mkprof/ui.h b/bin/mkprof/ui.h
index 4aa48b0..a6c40c8 100644
--- a/bin/mkprof/ui.h
+++ b/bin/mkprof/ui.h
@@ -23,6 +23,21 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_PROFILES = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_CATALOG,
+  UI_GROUP_WCS,
+};
+
 
 
 
diff --git a/bin/noisechisel/args.h b/bin/noisechisel/args.h
index cf9934b..d672e28 100644
--- a/bin/noisechisel/args.h
+++ b/bin/noisechisel/args.h
@@ -179,7 +179,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Detection:",
-      ARGS_GROUP_DETECTION
+      UI_GROUP_DETECTION
     },
     {
       "mirrordist",
@@ -187,7 +187,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Max. dist. (error multip.) to find mode.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->mirrordist,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_ANY,
@@ -200,7 +200,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Max. mode and median quant diff. per tile.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->modmedqdiff,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0,
@@ -213,7 +213,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Quantile threshold on convolved image.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->qthresh,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0_LT_1,
@@ -226,7 +226,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Remove tiles at higher quantiles.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->qthreshtilequant,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0_LE_1,
@@ -239,7 +239,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Flat kernel width to smooth interpolated.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->smoothwidth,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_0_OR_ODD,
@@ -252,7 +252,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Save quantile threshold estimation in file.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->checkqthresh,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -265,7 +265,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Number of erosions after thresholding.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->erode,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GE_0,
@@ -278,7 +278,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "4 or 8 connectivity in erosion.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->erodengb,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -291,7 +291,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Quantile for no erosion.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->noerodequant,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0_LE_1,
@@ -304,7 +304,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Depth of opening after erosion.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->opening,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -317,7 +317,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "4 or 8 connectivity in opening.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->openingngb,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -330,7 +330,7 @@ struct argp_option program_options[] =
       "FLT,FLT",
       0,
       "Sigma multiple and, tolerance or number.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->sigmaclip,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -344,7 +344,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Save Sky value estimation for pseudo-dets.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->checkdetsky,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -357,7 +357,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Sigma threshold for Pseudo-detections.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->dthresh,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_ANY,
@@ -370,7 +370,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Min. pseudo-detection area for S/N dist.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->detsnminarea,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_ANY,
@@ -383,7 +383,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Save pseudo-detection S/N values to a file.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->checkdetsn,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -396,7 +396,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Quantile in pseudo-det. to define true.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->detquant,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GT_0_LT_1,
@@ -409,7 +409,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Minimum quant. to expand true detections.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->detgrowquant,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0_LE_1,
@@ -422,7 +422,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Max. area of holes after growth to fill.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->detgrowmaxholesize,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GE_0,
@@ -435,7 +435,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Remove small S/N grown detections.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->cleangrowndet,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_ANY,
@@ -448,7 +448,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Save all the detection steps to a file.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->checkdetection,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -461,7 +461,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Final sky and its STD steps in a file.",
-      ARGS_GROUP_DETECTION,
+      UI_GROUP_DETECTION,
       &p->checksky,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -475,7 +475,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Segmentation:",
-      ARGS_GROUP_SEGMENTATION
+      UI_GROUP_SEGMENTATION
     },
     {
       "segsnminarea",
@@ -483,7 +483,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Minimum area of clumps for S/N estimation.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->segsnminarea,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_GT_0,
@@ -496,7 +496,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Save Sky clump S/N values into a file.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->checkclumpsn,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -509,7 +509,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "S/N Quantile of true sky clumps.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->segquant,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GT_0,
@@ -522,7 +522,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Keep clumps with peak touching a river.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->keepmaxnearriver,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
@@ -535,7 +535,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Multiple of STD to stop growing clumps.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->gthresh,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_ANY,
@@ -548,7 +548,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Minimum len of useful grown clump rivers.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->minriverlength,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_ANY,
@@ -561,7 +561,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Min. S/N for grown clumps as one object.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->objbordersn,
       GAL_TYPE_FLOAT32,
       GAL_OPTIONS_RANGE_GE_0,
@@ -574,7 +574,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Store segmentation steps in a file.",
-      ARGS_GROUP_SEGMENTATION,
+      UI_GROUP_SEGMENTATION,
       &p->checksegmentation,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/noisechisel/ui.c b/bin/noisechisel/ui.c
index 2c72873..78ffd59 100644
--- a/bin/noisechisel/ui.c
+++ b/bin/noisechisel/ui.c
@@ -74,12 +74,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" Detects and 
segments signal "
   PACKAGE_NAME" home page: "PACKAGE_URL;
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_DETECTION = GAL_OPTIONS_GROUP_AFTER_COMMON,
-  ARGS_GROUP_SEGMENTATION,
-};
 
 
 
diff --git a/bin/noisechisel/ui.h b/bin/noisechisel/ui.h
index c8209ae..9481981 100644
--- a/bin/noisechisel/ui.h
+++ b/bin/noisechisel/ui.h
@@ -23,6 +23,20 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_DETECTION = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_SEGMENTATION,
+};
+
 
 
 
diff --git a/bin/statistics/ui.h b/bin/statistics/ui.h
index 14bdfca..64b4cea 100644
--- a/bin/statistics/ui.h
+++ b/bin/statistics/ui.h
@@ -23,8 +23,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
-
-/* For common options groupings. */
+/* For common options groups. */
 #include <gnuastro-internal/options.h>
 
 
diff --git a/bin/table/ui.h b/bin/table/ui.h
index 5637881..15f4bbb 100644
--- a/bin/table/ui.h
+++ b/bin/table/ui.h
@@ -23,6 +23,9 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
 
 
 
diff --git a/bin/warp/args.h b/bin/warp/args.h
index 195e7fd..2c028a6 100644
--- a/bin/warp/args.h
+++ b/bin/warp/args.h
@@ -94,7 +94,7 @@ struct argp_option program_options[] =
     {
       0, 0, 0, 0,
       "Warps:",
-      ARGS_GROUP_WARPS
+      UI_GROUP_WARPS
     },
     {
       "align",
@@ -102,7 +102,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Align the image and celestial axes.",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -116,7 +116,7 @@ struct argp_option program_options[] =
       "FLT",
       0,
       "Rotate by the given angle in degrees.",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -130,7 +130,7 @@ struct argp_option program_options[] =
       "FLT[,FLT]",
       0,
       "Scale along the given axis(es).",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -144,7 +144,7 @@ struct argp_option program_options[] =
       "INT[,INT]",
       0,
       "Flip along the given axis(es).",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -158,7 +158,7 @@ struct argp_option program_options[] =
       "FLT[,FLT]",
       0,
       "Shear along the given axis(es).",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -172,7 +172,7 @@ struct argp_option program_options[] =
       "FLT[,FLT]",
       0,
       "Translate along the given axis(es).",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -186,7 +186,7 @@ struct argp_option program_options[] =
       "FLT[,FLT]",
       0,
       "Project along the given axis(es).",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       0,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -200,7 +200,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Raw transformation matrix, highest priority.",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       &p->matrix,
       GAL_TYPE_INVALID,
       GAL_OPTIONS_RANGE_ANY,
@@ -214,7 +214,7 @@ struct argp_option program_options[] =
       0,
       0,
       "Center of coordinates on first pixel corner.",
-      ARGS_GROUP_WARPS,
+      UI_GROUP_WARPS,
       &p->centeroncorner,
       GAL_OPTIONS_NO_ARG_TYPE,
       GAL_OPTIONS_RANGE_0_OR_1,
diff --git a/bin/warp/ui.c b/bin/warp/ui.c
index 70fa80c..c1eb06e 100644
--- a/bin/warp/ui.c
+++ b/bin/warp/ui.c
@@ -75,15 +75,6 @@ doc[] = GAL_STRINGS_TOP_HELP_INFO PROGRAM_NAME" will 
warp/transform the "
 
 
 
-/* Option groups particular to this program. */
-enum program_args_groups
-{
-  ARGS_GROUP_WARPS = GAL_OPTIONS_GROUP_AFTER_COMMON,
-};
-
-
-
-
 
 
 
diff --git a/bin/warp/ui.h b/bin/warp/ui.h
index a8b140d..f78f203 100644
--- a/bin/warp/ui.h
+++ b/bin/warp/ui.h
@@ -23,6 +23,19 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 #ifndef UI_H
 #define UI_H
 
+/* For common options groups. */
+#include <gnuastro-internal/options.h>
+
+
+
+
+
+/* Option groups particular to this program. */
+enum program_args_groups
+{
+  UI_GROUP_WARPS = GAL_OPTIONS_GROUP_AFTER_COMMON,
+};
+
 
 
 



reply via email to

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