[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 98a81c2c: Segment: --quiet option is now fully
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 98a81c2c: Segment: --quiet option is now fully quiet (was missing a printed line) |
Date: |
Mon, 9 May 2022 07:20:39 -0400 (EDT) |
branch: master
commit 98a81c2c0eb6ebfdb109827cb6c602b525cf5041
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Segment: --quiet option is now fully quiet (was missing a printed line)
Until now, when Segment was called with the '--quiet' option, it would
mistakenly print the "- Finding true clumps..." output line (while every
other output line was supressed). This was happening because I had forgot
to add a check for quiet-mode before printing this!
With this commit, the condition has been added, so Segment is now fully
quiet when the user gives '--quiet'.
This bug was reported by Teet Kuutma.
This fixes bug #62429.
---
NEWS | 2 ++
THANKS | 1 +
bin/segment/segment.c | 16 ++++++++++------
doc/announce-acknowledge.txt | 1 +
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index a79434c9..ed09a778 100644
--- a/NEWS
+++ b/NEWS
@@ -88,6 +88,8 @@ See the end of the file for license conditions.
bug #62309: MakeCatalog segmentation fault when clumps image given as
main input (objects should be given). Reported by Sepideh
Eskandarlou.
+ bug #62429: Segment prints one line status-progress line when called with
+ '--quiet'. Reported by Teet Kuutma.
diff --git a/THANKS b/THANKS
index 9c209059..4fc800c1 100644
--- a/THANKS
+++ b/THANKS
@@ -70,6 +70,7 @@ support in Gnuastro. The list is ordered alphabetically (by
family name).
Johan Knapen jhk@iac.es
Geoffry Krouchi geoffrey.krouchi@etu.univ-lyon1.fr
Martin Kuemmel mkuemmel@usm.lmu.de
+ Teet Kuutma tkuutma@cefca.es
Clotilde Laigle laigle@iap.fr
Floriane Leclercq floriane.leclercq@univ-lyon1.fr
Alan Lefor alefor@astr.tohoku.ac.jp
diff --git a/bin/segment/segment.c b/bin/segment/segment.c
index 3dd83e72..08fd40ac 100644
--- a/bin/segment/segment.c
+++ b/bin/segment/segment.c
@@ -1518,16 +1518,20 @@ segment(struct segmentparams *p)
/* Find the clump S/N threshold. */
if( isnan(p->clumpsnthresh) )
{
- gal_timing_report(NULL, "Finding true clumps...", 1);
+ if(!p->cp.quiet)
+ gal_timing_report(NULL, "Finding true clumps...", 1);
clumps_true_find_sn_thresh(p);
}
else
{
- if( asprintf(&msg, "Given S/N for true clumps: %g",
- p->clumpsnthresh) <0 )
- error(EXIT_FAILURE, 0, "%s: asprintf allocation", __func__);
- gal_timing_report(NULL, msg, 1);
- free(msg);
+ if(!p->cp.quiet)
+ {
+ if( asprintf(&msg, "Given S/N for true clumps: %g",
+ p->clumpsnthresh) <0 )
+ error(EXIT_FAILURE, 0, "%s: asprintf allocation", __func__);
+ gal_timing_report(NULL, msg, 1);
+ free(msg);
+ }
}
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 279b1c97..ba29b85e 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -2,6 +2,7 @@ Alphabetically ordered list to acknowledge in the next release.
Sepideh Eskandarlou
SÃlvia Farras
+Teet Kuutma
Juan Miro
Irene Pintos Castro
Ignacio Ruiz Cejudo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 98a81c2c: Segment: --quiet option is now fully quiet (was missing a printed line),
Mohammad Akhlaghi <=