Python code to reproduce a novel one-step method that estimates the cross-power spectrum directly from the observable M\EEG process by setting up a linear optimization problem exploting FISTA algorithm.
The performed analysis are described in the following manuscript:
L. Carini, I. Furci, S.Sommariva - Sparse optimization for estimating the cross-power spectrum in linear inverse models : from theory to the application in brain connectivity.
- Run generate_fwd.py to generate leadfield matrixs for the forward and inverse problems, respectively “originalG_forward-fwd.fif” and “originalG_inverse-fwd.fif”.
- Run generate_data.py to compute simulated data and ground true reconstructions. Note that the code needs the variable config to be specified (may be ‘config1’ or ‘config2’). It returns ground true cross power spectrum SX, cross power spectrum at sensor level SY, brain activity X, meg recordings Y, noise N and fista input SX0.
- Run main.py to perform cross-power spectrum estimation. Note that the code needs the variable config to be specified (may be ‘config1’ or ‘config2’). Returns cross power spectrum estimates for both 1step and 2step approaches.
- Run compute_distances.py to perform evaluation analysis on the obtained results. Note that the code needs the variable conf to be specified (may be 1 or 2).