Z-score normalization complex

Hi everyone.
I wonder about the normalization of complex TF data. If I want to normalize, by zscore, complex TF data by taking into the baseline from the same file (Process 1), I get this error message:

** Error: [process_baseline_norm] Standardize > Baseline normalization
** Cannot process complex values. A measure have to be applied to this data before (power, magnitude, phase...)

However if I want to normalize these data by taking into the baseline from another file (still complex data) (Process2), the normalization by zcore is calculated. Is it normal?

Regards,

Hi @Francois
Have you an opinion about that, please? :slight_smile:
Regards

This is not something that you can do with Brainstorm, and about the meaning of the measure you are trying to compute.

You can probably manage to do it with the Process2 tab and process Other > Run Matlab command.
Otherwise, you can run this from a custom Matlab script.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

Ok, I think I wasn't clear enough in my post, sorry.
In fact, I'm surprised that in one case (process 1) Brainstorm warns that it's not possible to do this normalization on complex numbers while in the other (process 2) it's done even though it's the same calculation (except that in the second case, the baseline is extracted from another file), right?

You are right, calling the Z-score normalization from Process1 or Process2 (with FilesA=FilesB) should lead to exactly the same results, and the same exclusions.

I added an extra test for Process2 to exclude the time-frequency files with complex values as well:
https://github.com/brainstorm-tools/brainstorm3/commit/1043f480f298dcc6dcc250789b6f3842716bf98f

If you want to perform some form of normalization using complex values, you can use the process "Run Matlab command", both in Process1 and Process2.

Thanks for reporting this bug!

1 Like