I attach an article which describes the methods used.
The only slight difference lies in the weighted averaging calculation.
The article uses "blocks of sweeps" for weighting but I modified that slightly so that the weighted averaging does this by individual sweeps not "blocks of sweeps". But all other methods and rationale are the same.
This weighted approach is used in auditory brainstem response (ABR) acquisition and data analysis to minimise the effect of noise on the ABR recording, determine the level of that noise and also set criteria for when to stop recording (i.e. when residual noise falls below X stop the ABR acquisition).
If the number of sweeps used to acquire ABR was small, say less than 1000, this could be done easily and as fast using Excel. But usually, ABR needs a lot of sweeps (in my case 6000) and Excel was becoming quite clunky to handle data size this massive. Therefore Brainstorm is a much better way to process this kind of data.
Hope this is useful.
Once again thank you to both of you for helping me and let me know once you've added my processes to GitHub so that I can share to others also.
Don and Elberling 1994 Evaluating residual background noise in ABRs.pdf (777.2 KB)