fusion-flap / flap

Fusion Library of Analysis Programs
MIT License
11 stars 5 forks source link

Error in the coherence calculation #63

Closed thelampire closed 4 years ago

thelampire commented 4 years ago

There are three issues:

  1. The first data point in the coherence can have a wrong value. Screen Shot 2019-11-15 at 6 29 04 PM

  2. Coherence can have a value > 1

  3. Coherence is not unity when interval_n=1

thelampire commented 4 years ago

Also, for cross-correlation, the [0,0] pixel has unity or higher correlation probably due to the same reason as the coherency malfunction.

thelampire commented 4 years ago

I found the error. There were multiple lines line the following in plot.py for error checking:

try:
    d[0,0] += 1

This actually adds 1 to the data object, but otherwise doesn't do any good. In thelampire-patch-3 I fixed it to:

try:
    d[0,0]+1