Importing Fieltrip structure from HCP website

I looked at this file and realized there is some form of conversion that I don’t know how to do here.

In the FieldTrip files, the field .grad.tra indicates how to relate the channel names (.grad.label) and the corresponding coils positions (.grad.coilpos and .grad.coilori). In the case of gradiometers, one channel corresponds to two coils and two positions. I wrote the function in_data_fieldtrip.m with examples from Elekta recordings, where the .tra was only indicating the weights to use for each combination of coils, to get the channel value.

But with the 4D files, it looks like the compensation matrices and/or other SSP/ICA projectors are also mixed in this .tra matrix. I don’t know how to get the correspondence channel-coils in this case.
In Brainstorm we need the projectors and coil weights available separately because we save and process them separately.

I posted a message on the FieldTrip mailing list, but I may not get any interesting answer.
So for now, I added a warning, and started using the channel positions instead… Which is wrong…
I’m not sure how far we can go with these files.

Francois