Calculate signal to noise ratio from the Hillbert envelope of a stacked signal
Based on this section of the paper:



Here is my attempt at doing a calculation like that. 



The plot above shows three plots:


The average of the dailies (in green) and all the daily data (in black).
The function $\sigma$ calculated from the dailies.
The SNR calculated from $\sigma$ and the dailies.


Scilab code for what I did is below.

// 25624
Tdata = 33;
stack_average = wfir("hp",Tdata,[.3 0],"hm",[0 0]);

Ndays = 30;

ccs = zeros(Ndays,Tdata);

for k=1:Ndays,
    ccs(k,:) =  stack_average + 0.05*rand(1,Tdata,'norm').*window('hm', Tdata);
end;

clf
subplot(311)
plot(ccs','k')
plot(stack_average,'g')
xtitle('$\mbox{All } cc \mbox{ in black and } &lt;cc&gt; \mbox{ in green}$')

sigma_N_t = sqrt((mean(ccs.^2,'r') - mean(ccs,'r').^2)/(Ndays-1));
s_N_t = abs(hilbert(mean(ccs,'r')));
SNR_N_t = s_N_t ./ sigma_N_t;

subplot(312)
plot(sigma_N_t)
xtitle('$\mbox{\rm Level of noise,}\ \sigma$')

subplot(313)
plot(s_N_t, 'r')
xtitle('$\mbox{\rm Signal to noise ratio,}\ SNR$')