ICA - spectrum

Hi,

Is there a way to visualize the spectrum for the ICA components already computed?

Thank you,

Have a great day.
Véronique M.

Hi Veronique,

You would like to extract the time series for a few ICA components, and compute the power spectrum for these exported signals?
No, it’s not possible yet with the interface, but it’s something we could think about adding.

If you’re familiar with Matlab, it’s something you can do manually with the following instructions:

  • Right-click on the channel file > File > Export to Matlab (or load the file directly with the load() function)
  • Right-click on the “Link to raw file” > File > Copy file path to clipboard
  • Execute the following code from the Matlab command line:
% Read file segment
LinkFile = '...\@raw...\data_0raw_....mat';  % CTRL+V to paste the file name
DataMat = in_bst(LinkFile, [0 10]);
% Get ICA projector
iICA = find(cellfun(@(c)isequal(c,'ICA'), {ChannelMat.Projector.SingVal}));
Proj = ChannelMat.Projector(iICA(1)); 
iChannels = find(any(Proj.Components,2));
W = Proj.Components(iChannels,:)';
% Compute ICA time series: IC = [Ncomponents x Ntime]
IC = W * DataMat.F(iChannels,:);

  • Compute and display the spectrum with a Matlab function

Cheers,
Francois