Eden-Kramer-Lab / spectral_connectivity

Frequency domain estimation and functional and directed connectivity analysis tools for electrophysiological data
GNU General Public License v3.0
121 stars 43 forks source link

[JOSS] PLV returns complex values #45

Closed EtienneCmb closed 1 year ago

EtienneCmb commented 1 year ago

The phase_locking_value method returns complex value because the np.abs is missing. I guess you made this choice because it's then used in the ppc but from the user side, especially for non-expert, it might be confusing.

A quick fix could be to have a _phase_locking_value without the absolute value and with :

def phase_locking_value()
    return xp.abs(self._phase_locking_value())

And the ppc could use _phase_locking_value method instead. What do you think?

JOSS reference (https://github.com/openjournals/joss-reviews/issues/4840),

edeno commented 1 year ago

That seems like a sensible change. The PLV can be used directionally so think I was aiming to leave it flexible, but people probably expect it to be the undirected version.

edeno commented 1 year ago

@EtienneCmb should be fixed in 649db3e2a595862f771ac5b4585f33d3dfff8c33