I have been using the GOLD algorithm to deconvolve the response of a detector from signals measured in an FADC. I have found that the start time of the signal is shifted by 1 bin in time, to larger times, after the deconvolution. This is unphysical as it suggests the repsonse of the detector spreads the signal both forwards and backwards in time. My code looks like this:
//set SPR in an array;
float SPR = new float[NoBins];//define the response function of the system
for (int j = 0; j < NoBins; ++j)
//this is the response function
SPR[j]=1(exp(-1*((j25)+12.5)/67.0) - exp(-1((j*25)+12.5)/13.0));
//deconvolute SPR from trace
float *yf = new float[NoBins];
for (int i=0;i<NoBins;i++)
yf[i] = y[i];
I am now using 5.17/08 and I still get the same problem. Attached is another script which deonvolves then re-convolves the trace. The re-convolved trace (in blue) is shifted 1 bin to the left and matches the original trace (black) well.
I have used the underflow bin on purpose as doing this makes the two histograms line up. If I make the replacement you suggest, the alignment is lost. After all, one would expect the distributions before deconvolution and after re-convolution to be roughly the same.