gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master d48638d 1/7: Key in NoiseChisel objects HDU, f


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master d48638d 1/7: Key in NoiseChisel objects HDU, for clumps extension
Date: Tue, 16 Aug 2016 14:30:37 +0000 (UTC)

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

    Key in NoiseChisel objects HDU, for clumps extension
    
    NoiseChisel now adds a `WCLUMPS' (short for "with-clumps") header keyword
    to its objects HDU. This header will later be used by MakeCatalog to see if
    it should actually look for a clumps input and make a clumps catalog or
    not. If it doesn't exit or be set to "no", then MakeCatalog will no longer
    search for a clumps image or make a clumps catalog.
    
    This can be very useful when clumps cannot be defined, for example
    apperture photometry, where we only have specified regions (objects) and no
    clumps.
---
 src/noisechisel/noisechisel.c |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/noisechisel/noisechisel.c b/src/noisechisel/noisechisel.c
index cd65b3e..6a57abf 100644
--- a/src/noisechisel/noisechisel.c
+++ b/src/noisechisel/noisechisel.c
@@ -70,16 +70,19 @@ makeoutput(struct noisechiselparams *p)
                          s0, s1, 0, p->wcs, NULL, SPACK_STRING);
 
 
-  /* The object labels image with a keyword mentioning the number of
-     objects. */
+  /* Add the necessary FITS keywords for MakeCatalog when reading the
+     objects image. */
+  gal_fits_add_to_fits_header_ll(&keys, TSTRING, "WCLUMPS", 0, "yes", 0,
+                                 "Is there a clumps image companion?",
+                                 0, NULL);
   num[0]=p->numobjects-1;
   gal_fits_add_to_fits_header_ll(&keys, TLONG, "NOBJS", 0, num, 0,
-                                      "Number of objects in the image.", 0,
-                                      NULL);
+                                 "Number of objects in the image.", 0,
+                                 NULL);
   dpt=&p->detsn;
   gal_fits_add_to_fits_header_ll(&keys, TDOUBLE, "DETSN", 0, dpt, 0,
-                                      "Signal to noise of true "
-                                      "pseudo-detections.", 0, NULL);
+                                 "Signal to noise of true "
+                                 "pseudo-detections.", 0, NULL);
   gal_fits_array_to_file(p->cp.output, "Objects", LONG_IMG, p->olab,
                          s0, s1, p->anyblank, p->wcs, keys,
                          SPACK_STRING);
@@ -92,12 +95,12 @@ makeoutput(struct noisechiselparams *p)
      on the 3rd and 4th extensions. */
   num[0] = p->detectonly ? 0 : p->numclumps-1;
   gal_fits_add_to_fits_header_ll(&keys, TLONG, "NCLUMPS", 0, num, 0,
-                                      "Number of clumps in the image.", 0,
-                                      NULL);
+                                 "Number of clumps in the image.", 0,
+                                 NULL);
   dpt=&p->clumpsn;
   gal_fits_add_to_fits_header_ll(&keys, TDOUBLE, "CLUMPSN", 0, dpt, 0,
-                                      "Signal to noise of true clumps.", 0,
-                                      NULL);
+                                 "Signal to noise of true clumps.", 0,
+                                 NULL);
   gal_fits_array_to_file(p->cp.output, "Clumps", LONG_IMG, p->clab, s0,
                          s1, p->anyblank, p->wcs, keys, SPACK_STRING);
   keys=NULL;



reply via email to

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