[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 8e48ac6: NoiseChisel's opening connectivity co
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 8e48ac6: NoiseChisel's opening connectivity corrected in verbose mode |
Date: |
Wed, 5 Sep 2018 09:55:18 -0400 (EDT) |
branch: master
commit 8e48ac6fa7e6989bef94d3c643f43eb769497ca1
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
NoiseChisel's opening connectivity corrected in verbose mode
When printing the steps of the analysis, instead of printing the number
directly, NoiseChisel was actually converting the number to a string, then
printing the string. With this commit, the number is written in the string
directly to avoid extra complications.
Also, to avoid confusion in using the "connectivity" term (for example with
Arithmetic, where connectivity is defined from 1 to the number of
dimensions, for example 4-connected neighbors are have a 1-connectivity),
NoiseChisel now reports things like `4-connected' instead of
`4-connectivity'.
---
bin/noisechisel/detection.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/noisechisel/detection.c b/bin/noisechisel/detection.c
index 62b109b..194923d 100644
--- a/bin/noisechisel/detection.c
+++ b/bin/noisechisel/detection.c
@@ -83,7 +83,7 @@ detection_initial(struct noisechiselparams *p)
gal_binary_erode(p->binary, p->erode, p->erodengb==4 ? 1 : 2, 1);
if(!p->cp.quiet)
{
- if( asprintf(&msg, "Eroded %zu time%s (%zu-connectivity).", p->erode,
+ if( asprintf(&msg, "Eroded %zu time%s (%zu-connected).", p->erode,
p->erode>1?"s":"", p->erodengb)<0 )
error(EXIT_FAILURE, 0, "%s: asprintf allocation", __func__);
gal_timing_report(&t1, msg, 2);
@@ -107,8 +107,8 @@ detection_initial(struct noisechiselparams *p)
gal_binary_open(p->binary, p->opening, p->openingngb==4 ? 1 : 2, 1);
if(!p->cp.quiet)
{
- if( asprintf(&msg, "Opened (depth: %zu, %s connectivity).",
- p->opening, p->openingngb==4 ? "4" : "8")<0 )
+ if( asprintf(&msg, "Opened (depth: %zu, %zu-connected).",
+ p->opening, p->openingngb)<0 )
error(EXIT_FAILURE, 0, "%s: asprintf allocation", __func__);
gal_timing_report(&t1, msg, 2);
free(msg);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 8e48ac6: NoiseChisel's opening connectivity corrected in verbose mode,
Mohammad Akhlaghi <=