code: def notch_fir(timeseries, f1, f2, order, beta=5.0):
      
      k1 = f1 / float((int(1.0 / timeseries.delta_t) / 2))
      k2 = f2 / float((int(1.0 / timeseries.delta_t) / 2))
      coeff = scipy.signal.firwin(order * 2 + 1, [k1, k2], window=('kaiser', beta))
      data = fir_zero_filter(coeff, timeseries)
      return TimeSeries(data, epoch=timeseries.start_time, delta_t=timeseries.delta_t)
docs: notch filter the time series using an FIR filtered generated from
      the ideal response passed through a time-domain kaiser window (beta = 5.0)
  
      The suppression of the notch filter is related to the bandwidth and
      the number of samples in the filter length. For a few Hz bandwidth,
      a length corresponding to a few seconds is typically
      required to create significant suppression in the notched band.
      To achieve frequency resolution df at sampling frequency fs,
      order should be at least fs/df.
  
      Parameters
      ----------
      Time Series: TimeSeries
          The time series to be notched.
      f1: float
          The start of the frequency suppression.
      f2: float
          The end of the frequency suppression.
      order: int
          Number of corrupted samples on each side of the time series
          (Extent of the filter on either side of zero)
      beta: float
          Beta parameter of the kaiser window that sets the side lobe attenuation.