gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 98c4b0b: NoiseChisel's checksky option now sav


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 98c4b0b: NoiseChisel's checksky option now saves blank pixel value
Date: Thu, 1 Sep 2016 17:24:27 +0000 (UTC)

branch: master
commit 98c4b0bfcbb1ef10d3fcd4fa519fdb9659312910
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    NoiseChisel's checksky option now saves blank pixel value
    
    When the `--checksky' option is given to NoiseChisel it creates a
    multi-extension FITS image with the detected pixels as the first layer and
    the next extensions showing the progressive states of getting to the Sky
    value.
    
    When creating the first FITS extension to show the binary (0 or 1 pixel
    valued image for undetected and detected pixels respectively), it ignored
    the possibility of blank pixels. In other words the value to the seventh
    argument of `gal_fits_array_to_file' function was set to `0'. It is now set
    to 'p->anyblank', which is `1' when there are blank pixels in the image. So
    the blank pixel value is passed on to the FITS header and FITS viewers will
    respect those pixels.
    
    This was not a major problem for any crash, it just made viewing the image
    very hard (blank pixels would have a value of 255, while all the rest would
    have 0 or 1).
---
 src/noisechisel/sky.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/noisechisel/sky.c b/src/noisechisel/sky.c
index 285429a..d27d19f 100644
--- a/src/noisechisel/sky.c
+++ b/src/noisechisel/sky.c
@@ -133,8 +133,8 @@ findavestdongrid(struct noisechiselparams *p, char *outname)
   if(outname)
     {
       if(smp->meshbasedcheck==0)
-        gal_fits_array_to_file(outname, "Detected", BYTE_IMG, p->byt,
-                               s0, s1, 0, p->wcs, NULL, SPACK_STRING);
+        gal_fits_array_to_file(outname, "Detected", BYTE_IMG, p->byt, s0,
+                               s1, p->anyblank, p->wcs, NULL, SPACK_STRING);
       gal_mesh_value_file(smp, outname, "Calculated Sky", "Calculated Sky STD",
                           p->wcs, SPACK_STRING);
     }



reply via email to

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