diffpy / diffpy.fourigui

Other
0 stars 7 forks source link

Condition to handle NaNs #44

Closed cadenmyers13 closed 3 weeks ago

cadenmyers13 commented 4 weeks ago

I had a chat with Bob this morning about the RuntimeWarning. The goal of the test is to verify that the applycutoff method is working as expected for a given qmin and qmax. We agreed that the test was okay. We came up with two possible fixes for this through modification of the source code.

1) If a slice of all NaNs is encountered, set all those NaNs to zero. This we thought to be simpler and is the solution in this PR. 2) Find a different way to represent NaN values in the data such as replacing all NaNs with zeros. This seems to have a lot of moving parts and could cause more trouble.

The below images are from the GUI where all NaNs are present and where some NaNs are present (for reference). These images were taken after applying the edits made on this PR. @sbillinge does this seem valid to you?

Screenshot 2024-10-28 at 11 01 38 AM Screenshot 2024-10-28 at 11 01 51 AM Screenshot 2024-10-28 at 11 02 01 AM