gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 9dda05c 040/113: Merged recent work from the m


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 9dda05c 040/113: Merged recent work from the master branch with corrections
Date: Fri, 16 Apr 2021 10:33:40 -0400 (EDT)

branch: master
commit 9dda05ceda412e92b5faa93077c05f8a352ad20f
Merge: e92fd9c 6a81c59
Author: Mohammad Akhlaghi <akhlaghi@gnu.org>
Commit: Mohammad Akhlaghi <akhlaghi@gnu.org>

    Merged recent work from the master branch with corrections
    
    Recent work in the master branch was merged into this branch with one
    correction: values to the `--uprange' option in MakeCatalog's output.
---
 bin/mkcatalog/args.h         |  2 +-
 bin/mkcatalog/authors-cite.h |  4 ++--
 bin/mkcatalog/mkcatalog.c    | 22 ++++++++++++++++++++++
 bin/mkcatalog/ui.c           |  3 ++-
 bin/mknoise/ui.c             |  2 +-
 bin/mkprof/ui.c              |  2 +-
 6 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/bin/mkcatalog/args.h b/bin/mkcatalog/args.h
index 6dd7501..b138516 100644
--- a/bin/mkcatalog/args.h
+++ b/bin/mkcatalog/args.h
@@ -211,7 +211,7 @@ struct argp_option program_options[] =
     /* Upper limit magnitude configurations. */
     {
       0, 0, 0, 0,
-      "Upper limit magnitude:",
+      "Upper limit magnitude settings:",
       UI_GROUP_UPPERLIMIT
     },
     {
diff --git a/bin/mkcatalog/authors-cite.h b/bin/mkcatalog/authors-cite.h
index 5022b41..eaa3427 100644
--- a/bin/mkcatalog/authors-cite.h
+++ b/bin/mkcatalog/authors-cite.h
@@ -32,8 +32,8 @@ along with Gnuastro. If not, see 
<http://www.gnu.org/licenses/>.
    Gnuastro source code directory) as an example.*/
 
 #define PROGRAM_BIBTEX                                                 \
-  "Description of MakeCatalog"                                         \
-  "--------------------------"                                         \
+  "Description of MakeCatalog\n"                                       \
+  "--------------------------\n"                                       \
   "@ARTICLE{2016arXiv161106387A,\n"                                    \
   "   author = {{Akhlaghi}, M.},\n"                                    \
   "    title = \"{Separating detection and catalog production}\",\n"   \
diff --git a/bin/mkcatalog/mkcatalog.c b/bin/mkcatalog/mkcatalog.c
index 0159e79..c13c6a7 100644
--- a/bin/mkcatalog/mkcatalog.c
+++ b/bin/mkcatalog/mkcatalog.c
@@ -837,6 +837,28 @@ mkcatalog_outputs_same_start(struct mkcatalogparams *p, 
int o0c1,
       asprintf(&str, "Number of random samples: %zu", p->upnum);
       gal_list_str_add(&comments, str, 0);
 
+      if(p->uprange)
+        {
+          switch(p->input->ndim)
+            {
+            case 2:
+              asprintf(&str, "Range of random samples about target: %zu, %zu",
+                       p->uprange[1], p->uprange[0]);
+              break;
+            case 3:
+              asprintf(&str, "Range of random samples about target: %zu, "
+                       "%zu, %zu", p->uprange[2], p->uprange[1],
+                       p->uprange[0]);
+              break;
+            default:
+              error(EXIT_FAILURE, 0, "%s: a bug! Please contact us at %s to "
+                    "address the problem. The value %zu is not recognized for "
+                    "`p->input->ndim'", __func__, PACKAGE_BUGREPORT,
+                    p->input->ndim);
+            }
+          gal_list_str_add(&comments, str, 0);
+        }
+
       asprintf(&str, "Random number generator name: %s", p->rngname);
       gal_list_str_add(&comments, str, 0);
 
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 597420f..e76cb3d 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -133,6 +133,7 @@ ui_initialize_options(struct mkcatalogparams *p,
       /* Select individually. */
       switch(cp->coptions[i].key)
         {
+        case GAL_OPTIONS_KEY_LOG:
         case GAL_OPTIONS_KEY_TYPE:
         case GAL_OPTIONS_KEY_SEARCHIN:
         case GAL_OPTIONS_KEY_IGNORECASE:
@@ -859,7 +860,7 @@ ui_preparations_upperlimit(struct mkcatalogparams *p)
 
   /* Set the random number generator. */
   gsl_rng_env_setup();
-  p->rng=gsl_rng_alloc(gsl_rng_default);
+  p->rng=gsl_rng_alloc(gsl_rng_ranlxs1);
   p->seed = ( p->envseed
               ? gsl_rng_default_seed
               : gal_timing_time_based_rng_seed() );
diff --git a/bin/mknoise/ui.c b/bin/mknoise/ui.c
index 606e957..98adb7e 100644
--- a/bin/mknoise/ui.c
+++ b/bin/mknoise/ui.c
@@ -310,7 +310,7 @@ ui_preparations(struct mknoiseparams *p)
 
   /* Allocate the random number generator: */
   gsl_rng_env_setup();
-  p->rng=gsl_rng_alloc(gsl_rng_default);
+  p->rng=gsl_rng_alloc(gsl_rng_ranlxs1);
   p->rng_seed = ( p->envseed
                   ? gsl_rng_default_seed
                   : gal_timing_time_based_rng_seed() );
diff --git a/bin/mkprof/ui.c b/bin/mkprof/ui.c
index c4d1b1d..3249c17 100644
--- a/bin/mkprof/ui.c
+++ b/bin/mkprof/ui.c
@@ -1722,7 +1722,7 @@ ui_preparations(struct mkprofparams *p)
 
   /* Allocate the random number generator: */
   gsl_rng_env_setup();
-  p->rng=gsl_rng_alloc(gsl_rng_default);
+  p->rng=gsl_rng_alloc(gsl_rng_ranlxs1);
 
   /* Make the log linked list. */
   ui_make_log(p);



reply via email to

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