Custom process that involves merging of channels

Hi there BST community,

I am currently writing a process that involves merging channels 4 and 5 in the channel editor shown below. The merging process is based on the article attached - merging through weighted averaging.

The coding for calculations is easy to compute. However, what I am worried about is the "merging" of the channels. The calculations involve merging channels "left (4)" and "right (5)" to give a "merged" channel. Therefore if the input file contained 6 channels as you can see, the output channel will contain 5 channels (because the left and the right are merged together through the calculations process).

Is this possible for Brainstorm?


Ching et al. 2023 ACC for assessing discrimination in NH and HI infants.pdf (1.7 MB)

This has been resolved - instead of merging the channels and removing channels 4 and 5, I've replaced the data within channels 4 and 5 with the calculated data of the merged channel.
So I still have the 6 channels but channels 4 and 5 no longer show left and right channel data but instead show the merged channel data.

I attach the custom process that I made here.
process_weighted_merging.m (5.5 KB)