[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 7367a14: Corrected usage of --minnumfalse in N
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 7367a14: Corrected usage of --minnumfalse in NoiseChisel |
Date: |
Mon, 28 Aug 2017 19:05:35 -0400 (EDT) |
branch: master
commit 7367a14886e0bb718bf3a2b6a2e0c00f28111022
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Corrected usage of --minnumfalse in NoiseChisel
After the re-write of NoiseChisel with the new `gal_data_t' structure, I
had forgot to implement the `--minnumfalse' option! For detections, it
would just compare with zero and there were no checks for clumps. This is
corrected with this commit.
---
bin/noisechisel/clumps.c | 6 ++++++
bin/noisechisel/detection.c | 10 ++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/bin/noisechisel/clumps.c b/bin/noisechisel/clumps.c
index 459b212..298f6f9 100644
--- a/bin/noisechisel/clumps.c
+++ b/bin/noisechisel/clumps.c
@@ -1290,6 +1290,12 @@ clumps_true_find_sn_thresh(struct noisechiselparams *p)
for(i=0;i<p->ltl.tottiles;++i)
if(clprm.sn[i].ndim) /* Only on tiles were an S/N was calculated. */
numsn+=clprm.sn[i].size;
+ if( numsn < p->minnumfalse )
+ error(EXIT_FAILURE, 0, "only %zu clumps could be identified in the "
+ "undetected regions. This is less than %zu (value to "
+ "`--minnumfalse' option). Please either decrease this value or "
+ "other options to change prior processing steps", numsn,
+ p->minnumfalse);
/* Allocate the space to keep all the S/N values. */
diff --git a/bin/noisechisel/detection.c b/bin/noisechisel/detection.c
index 930a328..aea3be4 100644
--- a/bin/noisechisel/detection.c
+++ b/bin/noisechisel/detection.c
@@ -698,12 +698,14 @@ detection_pseudo_real(struct noisechiselparams *p)
/* A small sanity check */
- if(sn->size==0)
- error(EXIT_FAILURE, 0, "no pseudo-detections could be found over the "
- "sky region to estimate an S/N. Please adjust parameters like "
+ if( sn->size < p->minnumfalse)
+ error(EXIT_FAILURE, 0, "only %zu pseudo-detections could be found over "
+ "the sky region to estimate an S/N. This is less than %zu (value "
+ "to `--minnumfalse' option). Please adjust parameters like "
"`--dthresh', `--detsnminarea', or make sure that there actually "
"is sufficient sky area after initial detection. You can use "
- "`--checkdetection' to see every step until this point");
+ "`--checkdetection' to see every step until this point", sn->size,
+ p->minnumfalse);
/* Get the S/N quantile and report it if we are in non-quiet mode. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 7367a14: Corrected usage of --minnumfalse in NoiseChisel,
Mohammad Akhlaghi <=