[Top][All Lists]

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

[gnuastro-commits] master c6a46f1: MakeCatalog: good sky subtraction on

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master c6a46f1: MakeCatalog: good sky subtraction on one-element-per-tile sky
Date: Fri, 25 Dec 2020 23:43:24 -0500 (EST)

branch: master
commit c6a46f1b01123c87ddc7affbe073566b0e508b6a
Author: Mohammad Akhlaghi <>
Commit: Mohammad Akhlaghi <>

    MakeCatalog: good sky subtraction on one-element-per-tile sky
    Until now, when the given Sky image that should have been subtracted was a
    single-element-per-tile tessellation (for example output of NoiseChisel's
    '--oneelempertile' option), MakeCatalog would mistakenly subtract it from
    the object label image! This was happening because MakeCatalog's original
    tessellation is done over the objects image.
    With this commit, the main macro-like function that does the parsing over
    the tiles for Sky subtraction is also given the 'values' array and the Sky
    value is subtracted from that (only using the objects image as a grid/guide
    for the pixel positions).
    This fixes bug #59765.
 NEWS               | 2 ++
 bin/mkcatalog/ui.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 31b2432..9940cda 100644
--- a/NEWS
+++ b/NEWS
@@ -197,6 +197,8 @@ See the end of the file for license conditions.
   bug #59459: Unclear WCS when both PC and CD exist in input, but conflict.
   bug #59625: MakeProfiles uses last --kernel, if it is called more than once.
   bug #59700: Segment's excessive RAM usage when many clumps over a detection.
+  bug #59765: MakeCatalog crash when to-be-subtracted Sky is a single-element
+              per tile tessellation (e.g., NoiseChisel's '--oneelempertile').
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 9b8417e..5af29b5 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -1197,7 +1197,7 @@ ui_subtract_sky(struct mkcatalogparams *p)
           /* Subtract the Sky value from the input image. */
-          GAL_TILE_PARSE_OPERATE(tile, NULL, 0, 0, {*i-=skyarr[tid];});
+          GAL_TILE_PARSE_OPERATE(tile, p->values, 1, 0, {*o-=skyarr[tid];});

reply via email to

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