def fdfilter(data, *filt, **kwargs):
<EOL>inplace = kwargs.pop('<STR_LIT>', False)<EOL>analog = kwargs.pop('<STR_LIT>', False)<EOL>fs = kwargs.pop('<STR_LIT>', None)<EOL>if kwargs:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>% list(kwargs.keys())[<NUM_LIT:0>])<EOL><DEDENT>if fs is None:<EOL><INDENT>fs = <NUM_LIT:2> * (data.shape[-<NUM_LIT:1>] * data.df).to('<STR_LIT>').value<EOL><DEDENT>form, filt = parse_filter(filt, analog=analog, sample_rate=fs)<EOL>lti = signal.lti(*filt)<EOL>freqs = data.frequencies.value.copy()<EOL>fresp = numpy.nan_to_num(abs(lti.freqresp(w=freqs)[<NUM_LIT:1>]))<EOL>if inplace:<EOL><INDENT>data *= fresp<EOL>return data<EOL><DEDENT>new = data * fresp<EOL>return new<EOL>
Filter a frequency-domain data object

    See Also
    --------
    gwpy.frequencyseries.FrequencySeries.filter
    gwpy.spectrogram.Spectrogram.filter