gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 86d9fab 1/2: Statistics' ignoreblankinsky impl


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 86d9fab 1/2: Statistics' ignoreblankinsky implemented in check images also
Date: Wed, 5 Sep 2018 13:08:28 -0400 (EDT)

branch: master
commit 86d9fab2331bc54f0350883ee4a3f6345f00c2af
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Statistics' ignoreblankinsky implemented in check images also
    
    The `--ignoreblankinsky' option of Statistics (when calculating the Sky
    value) wasn't being implemented in the check images while it worked nicely
    in the output. This could be confusing. With this commit, it has the same
    effect in the check images as the output image.
    
    Also the verbose-mode printed statements are corrected to be more clear and
    a statement is also added for the check image.
---
 bin/statistics/sky.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/bin/statistics/sky.c b/bin/statistics/sky.c
index e61c74d..130a797 100644
--- a/bin/statistics/sky.c
+++ b/bin/statistics/sky.c
@@ -231,10 +231,10 @@ sky(struct statisticsparams *p)
     gal_timing_report(&t1, "All blank tiles filled (interplated).", 1);
   if(p->checksky)
     {
-      gal_tile_full_values_write(p->sky_t, tl, 1, p->checkskyname, NULL,
-                                 PROGRAM_NAME);
-      gal_tile_full_values_write(p->std_t, tl, 1, p->checkskyname, NULL,
-                                 PROGRAM_NAME);
+      gal_tile_full_values_write(p->sky_t, tl, !p->ignoreblankinsky,
+                                 p->checkskyname, NULL, PROGRAM_NAME);
+      gal_tile_full_values_write(p->std_t, tl, !p->ignoreblankinsky,
+                                 p->checkskyname, NULL, PROGRAM_NAME);
     }
 
 
@@ -255,10 +255,12 @@ sky(struct statisticsparams *p)
                           1);
       if(p->checksky)
         {
-          gal_tile_full_values_write(p->sky_t, tl, 1, p->checkskyname, NULL,
-                                     PROGRAM_NAME);
-          gal_tile_full_values_write(p->std_t, tl, 1, p->checkskyname, NULL,
-                                     PROGRAM_NAME);
+          gal_tile_full_values_write(p->sky_t, tl, !p->ignoreblankinsky,
+                                     p->checkskyname, NULL, PROGRAM_NAME);
+          gal_tile_full_values_write(p->std_t, tl, !p->ignoreblankinsky,
+                                     p->checkskyname, NULL, PROGRAM_NAME);
+          if(!cp->quiet)
+            printf("  - Check image written to `%s'.\n", p->checkskyname);
         }
     }
 
@@ -284,7 +286,7 @@ sky(struct statisticsparams *p)
   gal_fits_key_write_config(&p->cp.okeys, "Statistics configuration",
                             "STATISTICS-CONFIG", outname, "0");
   if(!cp->quiet)
-    printf("  - Written to `%s'.\n", outname);
+    printf("  - Sky and its STD written to `%s'.\n", outname);
 
 
   /* Clean up and return. */



reply via email to

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