I think there's a bug with that combination of options.
For raw data, DataMat.F is not the data matrix:
684 ResultsMat.ImageGridAmp = ResultsMat.ImagingKernel * DataMat.F(GoodChannel, :);
Thanks!
Indeed. But this is actually a combination of options that is not possible...
The raw files are loaded in memory by slice, and updated dynamically when changing time window. The source files cannot be loaded in this way. This would cause the two files to have different durations in memory, which is not possible. Improving this would require a lot of work on bst_memory, for a usage that is very limited.
If you file is small enough (or your RAM large enough) for the sources to be fully loaded in memory, then you can afford an additional copy of the recordings in memory and on the hard drive. Simply import the entire file as a single block, then compute the sources, and you'll get the file you want.
I added a clearer error message:
https://github.com/brainstorm-tools/brainstorm3/commit/883afb154739988d0701f922bfb9ba037a2c1c68
Thanks, that's fine. (I was just trying to test something fast and skipping "normal" steps.)