Trying to understand `source_band_induced_power`

MNE 1.6.0 on Manjaro Linux i3

Hello,
I am an EEG noob trying to perform source estimation and connectivity analyses on continuous EEG.
In this case, I tried using the mne.minimum_norm.source_band_induced_power() on my data - which is basically a 10 minute (600 second) 128 channel EEG split into 5 second epochs. I’ve mainly done this just so that my computer can handle it RAM-wise.
The stc that comes out is number of vertices in the source space x 5 seconds long. I just want to fully be sure of this function’s behavior:

  1. Is the stc that comes out basically an average of all the induced power vs time plots for every epoch (i.e. 120 equally spaced epochs)?
  2. What is n_cycles exactly?
  3. What is the best way of producing an stc that is 10 minutes long? I can’t use the raw because it would require terabytes of RAM, which I don’t have (I have 128 GB, and running the above with significant downsampling for just a single frequency band like gamma consumes at least half my RAM for the duration of the run). I’ve thought of running a for loop for each epoch[i], turning the stc[i] into a numpy array then concatenating, but if there’s a better option I’d appreciate it.
  4. What is the function actually doing? Is it band-pass filtering the epochs for each frequency band then getting a source estimate? Or something more sophisticated?

Thank you

I’d loop over frequencies and epochs and then concatenate, there’s not really an obvious way around the memory issues than that to me at least. You could also use numpy memory mapping to avoid the total array being too large.

The number of cycles controls the time-frequency tradeoff, more cycles better frequency resolution, less cycles better time resolution. It’s generally empiracle but 7 and freqs / 2 are often used.

1 Like

Thanks for the reply.
So, coming back to my first question - what does the function do for epochs? Average power for all contained epochs or does it just take the first epoch as input? Would also appreciate some clarity on question 4. Thank you