bugGNU Astronomy Utilities - Bugs: bug #60923, Standard deviation returning NaN

 
 

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

bug #60923: Standard deviation returning NaN

Submitter:  Natáli Anzanello <ndanzanello>
Submitted:  Fri 16 Jul 2021 01:44:53 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Output not reasonable Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 16 Jul 2021 01:06:25 PM UTC, comment #1: 

Thanks a lot Natáli, it has been merged in Commit 35c14b7db28. Just some points:

1. In the 'gal_statistics_mean_std' function, the value should have been written into 'o[1]' (the mean is written in 'o[0]'). I fixed this in your commit.

2. When describing the problem in comments give a specific description of what caused problem. When you simply say "floating point errors", it is very vague. But if you say the points are all equal except for floating point errors, it becomes much more clear.

3. In comments or the commit message, when you are using code snippets within English writing, put them within a single quote, for example in point one above.

I have fixed all of these in the merged commit, but its good to have them in mind for the future ;-).

Thanks again for finding and fixing this problem.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Fri 16 Jul 2021 01:44:53 AM UTC, original submission:  

The standard deviation calculation (within gal_statistics_std and gal_statistics_mean_std) is returning a NaN value in some situations.

This is due to calculations involving floating numbers giving the square of the average value greater than the average of the squares of the values, thus making a square root of a negative number.


Natáli Anzanello <ndanzanello>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-16 makhlaghi StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code