Reproducing the power spectrum outside brainstorm

Hi all,

I need to reproduce the power spectrum as plotted using pwelch inside brainstorm but outside using only matlab.

So far, I have been unsuccessful.

Where is the place in the code pwelch is called?

I would like to see how this is done so I can reproduce it.

In the repository, I can only see pwelch called here:
ImaGIN_spm_eeg_tf(S)

But this doesn't seem right.

Thanks,

-Tom.

Brainstorm does not use the pwelch function from Matlab.
The process process_psd.m calls bst_psd.m, through process_timefreq.m and bst_timefreq.m.

To explore how this is called from the interface: Put a breakpoint in bst_psd.m, then start the execution. When the debugger stops, explore the contents of the variables and the call stack.

Thank you very much Francoise.