GNU Astronomy Utilities - Bugs: bug #62009, Mode becomes nan for large, pure...
You are not allowed to post comments on this tracker with your current authentication level.
bug #62009: Mode becomes nan for large, pure noise images
Submitter: | Mohammad Akhlaghi <makhlaghi> | ||
Submitted: | Tue 08 Feb 2022 10:26:36 AM UTC | ||
Category: | Statistics | Severity: | 3 - Normal |
Item Group: | Output not reasonable | Status: | Postponed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
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.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-02-08 | makhlaghi | Carbon-Copy | - | ![]() |
Added -email is unavailable- |
When a sufficiently large image with raw noise is given to Statistics to find its mode of its pixel distribution, it fails (returning a NaN). This bug can be reproduced with this command (running it multiple times will use a different random number generator; and therefore a different noised value for every pixel):
With Gnuastro 0.16.143-1427d (see [1] below), I tried the command above many times, and in all cases, the output of Statistics was NaN!
However, when I made a smaller noised image with the commands below, it worked perfectly:
Again, repeating this multiple times will mostly work: I did get a NaN for this size when the random number generator was 'ranlxs1', with a seed of '1645053800' or '1644372467'. But generally it worked (for example with seeds of '1644613667', '1645245226' or '1644502467'). For how to set seeds, see the Generating random numbers section of the book.
We need to see what is happening with the mode-finding algorithm that it can't find the mode in these ideal cases (where the mode is approximately in the center, but with many points)!
[1] While writing this report, I found and fixed bug #62008, so please reproduce this bug with a more recent version of Gnuastro.