Consider what we would do if we swapped "time domain" and "frequency domain". What we would optimally do in that case is what the OP could do here in the goal of finding a "more sophisticated technique". Specifically, if we need to isolate part of the signal in the frequency domain over some range of higher frequencies, we convolve the signal in the time domain with and FIR or IIR bandpass filter designed to optimally select the frequencies of interest while reject other frequencies further away.
If the OP started with a waveform in the frequency domain, then stay in the frequency domain and design a bandpass filter as if the waveform was in the time domain -- my favored technique is to use least squares for an FIR filter design (firls
in MATLAB, Octave or Python scipy.signal). Determine those coefficients and "filter" the frequency domain waveform by convolving the waveform with the coefficients for that filter. The result will be shifted in frequency (the frequency domain equivalent of a time delay) which can either be shifted back by truncating the initial values, or if post-processing, use filtfilt
to filter with a non-causal "zero-phase" filter which will have no offset.
Further consider with the OP's technique the similarity to the inferior "frequency sampling" technique for FIR filter design (inferior for a simple bandpass solution such as this). With the frequency sampling technique, we take the FFT of the signal and select the bins corresponding to the desired frequencies (which is the "gating described"). This is an inferior technique due to time domain aliasing and (without additional processing techniques) results in more passband ripple and less stopband rejection than we could get with the firls
technique described here, given the same filter complexity.