Translating lag (and possibly complexity eventually)
Many tools used to interrogate complex systems in neuroimaging are written in Matlab. niwaves
initially aimed either to translate these tools or to index existing translations in order to open them to the Python ecosystem. The scope of this project is rather limited, so we hope that our efforts are cannibalised into a more mature toolbox at some point in the future.
As of now, this library contains scripts for lagged correlation analysis following Mitra et al. The code needs to be tested more extensively; for now, if you plan on using this, we strongly suggest that you cross-check results against the existing Matlab version before proceeding.
On our to-do list (maybe):
-
Lag and lag threads (sketched as of December 2018)
-
Network community toolbox: translation of functions by Dr. Shi Gu available here
-
Network control, translation in progress elsewhere
Central to implementing many of these tools will be operationalising a substitute for the excellent genlouvain
. There's a genlouvain function included in Dr. Shi Gu's Network Community Architecture Toolbox.
lag_analysis
: Performs lagged correlation analysis following Mitra et al., taking as inputs the time series to be correlated, a temporal mask indicating the time points to be included, and sampling/lag parameters.lag_sort
: Re-orders lag matrices according to community membership and mean latency. Can additionally plot the re-ordered lag matrix together with a distribution of latencies.simil_plot
: Plots a similarity matrix between vectors extracted from a sample of subjects at different levels (like session or task) -- for instance the similarity between latency vectors.