bugGNU Astronomy Utilities - Bugs: bug #62702, Clumps on strong gradients of...


You are not allowed to post comments on this tracker with your current authentication level.

bug #62702: Clumps on strong gradients of larger galaxies become too large

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Sun 03 Jul 2022 11:29:31 PM UTC
Category:  Segment Severity:  3 - Normal
Item Group:  Output not reasonable Status:  In Progress
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Open

Mon 16 Jan 2023 11:29:38 AM UTC, comment #2: 

Until now, I had been investigating ways to step back to brighter pixels for finding a good stage to stop the growth of the clump. However, a few days ago, while investigating another issue with Sepideh Eskandarlou, we discovered a very interesting potential solution:

We can derive the azimuthal angle of a pixel in a profile by looking at its four-connected neighbors: If we define 'dx' as the difference of value between the next and previous pixels in the horizontal (X) direction, and 'dy' similarly for the Y direction, we can obtain the azimuthal angle of the pixel by taking the 'atan2' of 'dy/dx'.

In the left image below, you can see a small point-source on the wing of a bright elliptical Sersic profile. and on the right, you can see how the output of the analysis above (done through simple kernels with 'arithmetic').

As you see from this image, as long as we are primarily influenced by the point source, we fully cover the range of azimuthal degrees (0 to 360). But once we reach the part where the main galaxy dominates, the range of azimuthal angles significantly decreases to one small interval.

By checking the interval of the azimuthal angles as layers are added, we should be able to constrain the border of the small object without eating too much of the wing of the bright one.

We can use bits in one integer (maybe 16bit) to keep track of the azimuthal coverage as we expand the clump. We should explore this...

Thanks a lot to Sepideh for the very productive discussion that lead to this.

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Sun 03 Jul 2022 11:35:44 PM UTC, comment #1: 

The image below is the output of the script in the original post:

large clump

On the left, you see the image before adding noise. In the middle, the image with noise is shown. On the right, you can see the pixels associated with the two clumps as the white and yellow regions. The blue pixels are the undetected sky regions, and the black pixels are the detected, but diffuse regions that couldn't be associated with any individual clump.

As you see above, a small star has been placed very close to the larger galaxy's center.

We expect the "clump" of the star to only be as large as the black circle that the two white arrows point to. However, because it has the gradient of the background galaxy under it, Segment's current algorithm will associate the full right-side of the larger galaxy to also be part of this clump.

We need to define a way to stop the growth of the smaller clump in such cases and let the galaxy take the pixels that belong to it.

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Sun 03 Jul 2022 11:29:31 PM UTC, original submission:  

When a clump falls on the gradient of a large object, in the current implementation of Segment, it will steal a large fraction of flux from the large object. The code below in the P.S can be put in a simple shell script to reproduce the problem.

P.S. Code to reproduce the problem.

# Parameters.

# Abort in case of an error.
set -e

# Make a build directory if it doesn't already exist.
if ! [ -d build ]; then mkdir build; fi

# Generate the catalog
echo "1 0   0   2 3  2.8 0 1   5  5"  > $cat # PSF
echo "1 100 100 1 15 1   0 0.4 9  5" >> $cat # Galaxy
echo "1 110 100 4 0  0   0 0   13 0" >> $cat # Star

# Build an image and a convolution kernel.
astmkprof $cat --mergedsize=200,200 \
          --zeropoint=$zeropoint -o$raw \
mv build/0_raw.fits $psf

# Convolve the image with the kernel.
astconvolve $raw --kernel=$psf -o$conv

# Undersample the convolved image.
astwarp $conv --centeroncorner --scale=1/$oversample \

# Add noise
export GSL_RNG_SEED=1657794821
astarithmetic $nonoise $background $zeropoint \
              mag-to-counts mknoise-poisson \
              -o$noised --envseed

# Detect the signal
astnoisechisel $noised --tilesize=10,10 -o$det

# Segment the signal
astsegment $det -o$seg

Mohammad Akhlaghi <makhlaghi>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #54234:  azimuthal-angle.png added by makhlaghi (37KiB - image/png)
file #53390:  large-clump.png added by makhlaghi (62KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-16 makhlaghi Attached File- Added azimuthal-angle.png, #54234
    2022-07-03 makhlaghi Attached File- Added large-clump.png, #53390
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.9