forrestbao / pyeeg

Python + EEG/MEG = PyEEG
GNU General Public License v3.0
241 stars 85 forks source link

Possible error in petrosian fractal dimension calculation #35

Open kellylikesjelly opened 2 years ago

kellylikesjelly commented 2 years ago

Hello! I think there is a bug in the last line causing an error in pfd calculation, it should be numpy.log10(n / (n+0.4*N_delta)). Pls let me know if I made a mistake. Thanks :))

Screenshot 2022-07-12 151915

forrestbao commented 2 years ago

What do you think it should be changed to?

kellylikesjelly commented 2 years ago

I think it should be changed to numpy.log10(n / (n+0.4xN_delta)). because in the current code its doing np.log10((n/n)+(0.4xn_delta))--> np.log10(1+0.4xn_delta) which is not the same as the equation in the paper. image