[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master b41a8dd 1/2: NoiseChisel timings corrected
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master b41a8dd 1/2: NoiseChisel timings corrected |
Date: |
Tue, 12 Sep 2017 18:38:26 -0400 (EDT) |
branch: master
commit b41a8dded4099381e18f28a870128c119b44ee67
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
NoiseChisel timings corrected
In some places during detected, NoiseChisel would not calculate the current
time, so when reporting the time, the time appeared cumulative. This is now
corrected and the time steps for each step are correctly reported. Also in
the end of the detection process, it says how long the whole detection
process took.
---
bin/noisechisel/detection.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/noisechisel/detection.c b/bin/noisechisel/detection.c
index 839e8ad..cffe814 100644
--- a/bin/noisechisel/detection.c
+++ b/bin/noisechisel/detection.c
@@ -958,6 +958,7 @@ detection(struct noisechiselparams *p)
/* Find the real pseudo-detections. */
+ if(!p->cp.quiet) gettimeofday(&t1, NULL);
workbin=detection_pseudo_real(p);
@@ -974,6 +975,7 @@ detection(struct noisechiselparams *p)
/* If the user asked for dilation, then apply it. */
+ if(!p->cp.quiet) gettimeofday(&t1, NULL);
if(p->dilate)
{
gal_binary_dilate(workbin, p->dilate, p->dilatengb==4 ? 1 : 2 , 1);
@@ -984,7 +986,7 @@ detection(struct noisechiselparams *p)
{
asprintf(&msg, "%zu detections after %zu dilation%s",
num_true_initial, p->dilate, p->dilate>1 ? "s." : ".");
- gal_timing_report(&t0, msg, 2);
+ gal_timing_report(&t1, msg, 2);
free(msg);
}