Convolution in the time domain is the same as multiplication in the frequency domain.
My data is sampled at 200 Hz, which means that the Nyquist frequency is 100 Hz, and all frequency content is <= 100 Hz. If I take a rectangle function in the time domain, with 1s everywhere below 100 Hz, FFT it, and convolve my data with that, it shouldn't make a difference. Indeed, the FFT of the rectangle function is
sin(pi*x)/(pi*x), which is 0 at all integers except the origin.
When FFTing something like
cos(2*pi*x/40), a sine wave at 5 Hz, you get two peaks. One at 5 Hz as expected, and one at -5 Hz. This can be thought of as two spirals
e^(-2*pi*i*x/40)/2, one rotating counterclockwise, the other clockwise. When added, their complex parts cancel out, leaving only a real sine wave.
I want to extract only the part of my data with positive frequencies. For example,
cos(2*pi*x/40) should become
e^(2*pi*i*x/40)/2. This should reasonably make the data contain complex samples.
I thought to do this by creating a rectangle function with 1s where 0 <= x <= 100 Hz, FFTing that, and then convolving my data with the result. The resulting function (according to WolframAlpha) is
0.5 * e^(-pi*i*x) * sin(pi*x/2)/(pi*x/2) (graph, real part blue, imaginary part red). The problem is that the imaginary part is always zero at integers, which is weird. Since my data is real, and this function is always real at integers, the result of convolution must be entirely real, which contradicts the previous paragraph.
What is going on here? And how do I actually get what I want?