Incorporating two changes to the spectral Granger causality SPI:
Only examining F values for frequencies > 0 rather than >=0.
Flag ignore_NaN that defaults to True, in which case np.nanmean or np.nanmax is used instead of np.mean or np.max.
For #2, also added a catch that if >10% of F values in the given frequency range are NaN, the result will be manually set to NaN in the corresponding directed region pair.
Incorporating two changes to the spectral Granger causality SPI:
ignore_NaN
that defaults to True, in which casenp.nanmean
ornp.nanmax
is used instead ofnp.mean
ornp.max
.For #2, also added a catch that if >10% of F values in the given frequency range are NaN, the result will be manually set to NaN in the corresponding directed region pair.