What is the purpose of wrapping the negative times of a response function in discrete convolution? I am trying to rationalize a figure given in the Numerical Recipes in C in the section of Fourier based convolution and deconvolution.
The authors show the example of a continuous convolution with a zero centered response function r(t). Convoluting the continuous signal blurs out the edges and there is no shift.
What is somewhat confusing is that they suggestion for the discrete convolution analogue of the continuous convolution, we should wrap the negative time section of the response function to the extreme right end of the array. What is the mathematical justification of doing N/2 circular shift, where N is even number of samples. The authors do not mention as N/2 circular shift, but it seems this is what they are doing.
These are their actual figures.

It seems the authors are suggesting circular shifting the zero centered response by N/2 (N is even) to get an equivalent convolution to continuous convolution. Why can't we have discrete version of the response function as shown by the squared markers which I drew in MATLAB? I do not get equivalent convolution results if we convolute a square wave with the sampled response function on the right and the left as suggested in Numerical Recipes.
It's about zero-phase filtering.
First, the continuous-time response function $r(t)$ is an even-symmetric, noncausal filter so that its Fourier transform will be a zero-phase function; i.e.,
$R(\omega)$ is a real-valued function of frequency $\omega$.
Note that there's almost a mistake in the figure 13.1.1; the output should begin before $t=0$, even for a zero-phase filter. Because this is a non-causal filter, it will anticipate future inputs before they happen, and put out the response before $t=0$.
I think, however, they wanted to justify this condition, by shifting the input $s(t)$ sufficiently to the right (or assuming that $s(t)=0$ until $t=t_1$) so that the output response before $t=0$ will be zero anyway, and thus eventually we are interested at the output of the filter beginning from $t=0$.
Now, sample the signals $s(t)$ and $r(t)$ (assuming they are bandlimited) and obtain a sampled version of the continuous-time output by performing a discrete-time linear convolution, or equivalently use a DFT based efficient implementation of linear convolution by circular convolution of proper length.
If you choose the first approach, and perform direct discrete-time linear convolution using the sequences $s[n]$ and $r[n]$, then you won't need to shift anything. But remember that a practical implementation will still need some shifts to represent the noncausal impulse response $r[n]$ in the proper index frame.
But if you choose the second approach; using DFT to implement a linear filtering, you have two choices for the filter response $r[n]$ to be registered; (because in the DFT domain, there's no negative time-index $n$, and you are restricted to the range $0 \leq n &lt; N$) first you can linearly shift $r[n]$ sufficiently right to make it a causal filter $r_c[n]$, and follow the procedure as usual; with this choice, the effective discrete-time filter loses its zero-phase (and zero group delay) property and your effective output begins at the group delay position index.
If, instead, you wrap the negative-index portion of $r[n]$ to its far right edge, in the DFT frame of $N$ samples, where $N$ is chosen properly to aviod aliasing in the time-domain to ensure that computed circular convolution will match the desired linear one, then you will maintain the zero-phase property of $r[n]$ while performing the DFT based convolution; your first output at $n=0$ will be what you would get at $t=0$ in the continuous-time case.