Since we loose time information when we take a Fourier transform, what happens if we alter a few frequencies from the transform and then reconstruct the signal, do we get the altered frequency at the exact place the original frequency was(in time). Would it be beneficial if we use Wavelet transform or FFT? If yes, how?
The spatial content is carried in the phase of the Fourier transform and not in magnitude. As Marcus pointed out, the difficulty with Fourier transform is that it doesn't allow us to immediately analyze the spatial information while still looking at the frequency. There are methods such as windowed FT which try to make that a bit better.
However, if you alter frequencies in the magnitude and reconstruct, you would get filtering effects. For instance, if we cut the low frequencies, than it would be a high-pass filter, and likewise, cutting high bands would cause a low-pass filter effect. This is analogous to applying, e.g. Mean/Gaussian filter to an image.
Regarding Wavelets, they try to address this time/frequency issue I mentioned above. Wavelets are limited in time and frequency. We slide the wavelets in time domain to construct the Wavelet domain. This provides resolution in the time domain.
On the application side, Wavelet denoising is shown to be superior to Fourier domain denoising. But, such superiority is application dependent, as for some applications one doesn't need that spatial analysis.
You could find some more information on the differentiation here.
Here is an example, based on this one, where we do a low-pass filter by keeping only the low frequency values (both positive and negative):
% make our noisy function t = linspace(1,5,1024); x = -(t-2).^2 + 2; y = awgn(x,0.5); F = fft(y,1024); freqRange = 20; % range of frequencies we want to preserve rectangle = zeros(size(F)); rectangle(1:freqRange+1) = 1; % preserve low positive frequencies y_half = ifft(F.*rectangle,1024); % +ve low-pass filtered signal rectangle(end-freqRange+1:end) = 1; % preserve low negative frequencies y_rect = ifft(F.*rectangle,1024); % full low-pass filtered signal figure; plot(t,y,'g--'); hold on, plot(t,x,'k','LineWidth',2); hold on, plot(t,y_half,'b','LineWidth',2); hold on, plot(t,y_rect,'r','LineWidth',2); legend('noisy signal','true signal','positive low-pass','full low-pass','Location','southwest');
The resulting signals look like this:
You could see here that the altered frequencies effect the whole signal - wherever a high frequency existed gets smoothed. The spatial content is preserved in reconstructing the signal, because FT is a loss-less transformation, but we didn't get the chance to modify the exact spatial locations - the whole signal is effected by a change to the FT magnitude.
Time information is not lost by a DFT. The information about any one transient in time is spread out among ALL the phase information of every frequency bin of a DFT result. But it's still there, and returned by doing a IDFT.
Modifying a single bin can have unknown or arbitrary effects on any time localized transient, either making it bigger or smaller or earlier or later, etc., depending on exactly how the phase of that single frequency bin relates to and contributes to all the other frequency bins (magnitudes and phases) to represent that localized time event.
Different frequencies and phases have different effects, so moving them around is unlikely to generate the same signal in time. Filters change signals.