gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 1796c9e: Query: better option grouping in outp


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 1796c9e: Query: better option grouping in output of --help
Date: Wed, 20 Jan 2021 09:02:30 -0500 (EST)

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

    Query: better option grouping in output of --help
    
    After the previous commit where the new '--noblank' option was added, I
    noticed that the option grouping names were outdated. This group of options
    is no longer just about selecting by center. I also noticed that the
    'range' option had been mistakenly added two times in the previous commit.
    
    With this commit, the old "Generate query by center" title for these
    options has been replaced with "Generate query internally".
---
 bin/query/args.h | 46 ++++++++++++++++------------------------------
 bin/query/ui.h   |  2 +-
 2 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/bin/query/args.h b/bin/query/args.h
index 60b2474..e2c5f76 100644
--- a/bin/query/args.h
+++ b/bin/query/args.h
@@ -114,11 +114,11 @@ struct argp_option program_options[] =
 
 
 
-    /* Query by center. */
+    /* Generate query automatically */
     {
       0, 0, 0, 0,
-      "Generate query by center (not compatible with '--query'):",
-      UI_GROUP_BYCENTER,
+      "Generate query internally (not compatible with '--query'):",
+      UI_GROUP_GENQUERY,
     },
     {
       "dataset",
@@ -126,7 +126,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Name of dataset in database.",
-      UI_GROUP_BYCENTER,
+      UI_GROUP_GENQUERY,
       &p->datasetstr,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -149,10 +149,10 @@ struct argp_option program_options[] =
     {
       "center",
       UI_KEY_CENTER,
-      "FLT[,...]",
+      "FLT,FLT",
       0,
-      "Central coordinates of the query.",
-      UI_GROUP_BYCENTER,
+      "Center coords. to select by region in sky.",
+      UI_GROUP_GENQUERY,
       &p->center,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -165,8 +165,8 @@ struct argp_option program_options[] =
       UI_KEY_RADIUS,
       "FLT",
       0,
-      "Radius around center to select targets.",
-      UI_GROUP_BYCENTER,
+      "Radius around --center to select targets.",
+      UI_GROUP_GENQUERY,
       &p->radius,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -179,8 +179,8 @@ struct argp_option program_options[] =
       UI_KEY_WIDTH,
       "FLT[,FLT]",
       0,
-      "Width of box to select targets.",
-      UI_GROUP_BYCENTER,
+      "Width of box around --center to select targets.",
+      UI_GROUP_GENQUERY,
       &p->width,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -194,21 +194,7 @@ struct argp_option program_options[] =
       "STR,FLT:FLT",
       0,
       "Range of selected targets in given column.",
-      UI_GROUP_BYCENTER,
-      &p->range,
-      GAL_TYPE_STRING,
-      GAL_OPTIONS_RANGE_ANY,
-      GAL_OPTIONS_NOT_MANDATORY,
-      GAL_OPTIONS_NOT_SET,
-      gal_options_parse_name_and_float64s
-    },
-    {
-      "range",
-      UI_KEY_RANGE,
-      "STR,FLT:FLT",
-      0,
-      "Range of selected targets in given column.",
-      UI_GROUP_BYCENTER,
+      UI_GROUP_GENQUERY,
       &p->range,
       GAL_TYPE_STRING,
       GAL_OPTIONS_RANGE_ANY,
@@ -221,8 +207,8 @@ struct argp_option program_options[] =
       UI_KEY_NOBLANK,
       "STR[,STR]",
       0,
-      "Remove rows with blank in given columns.",
-      GAL_OPTIONS_GROUP_INPUT,
+      "No rows with blank value in given column(s).",
+      UI_GROUP_GENQUERY,
       &p->noblank,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -235,7 +221,7 @@ struct argp_option program_options[] =
       "STR",
       0,
       "Column names to download from catalog.",
-      UI_GROUP_BYCENTER,
+      UI_GROUP_GENQUERY,
       &p->columns,
       GAL_TYPE_STRLL,
       GAL_OPTIONS_RANGE_ANY,
@@ -248,7 +234,7 @@ struct argp_option program_options[] =
       "INT",
       0,
       "Only download given number of top rows.",
-      UI_GROUP_BYCENTER,
+      UI_GROUP_GENQUERY,
       &p->head,
       GAL_TYPE_SIZE_T,
       GAL_OPTIONS_RANGE_ANY,
diff --git a/bin/query/ui.h b/bin/query/ui.h
index c317ea5..e38c134 100644
--- a/bin/query/ui.h
+++ b/bin/query/ui.h
@@ -33,7 +33,7 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
 /* Option groups particular to this program. */
 enum program_args_groups
 {
-  UI_GROUP_BYCENTER = GAL_OPTIONS_GROUP_AFTER_COMMON,
+  UI_GROUP_GENQUERY = GAL_OPTIONS_GROUP_AFTER_COMMON,
 };
 
 



reply via email to

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