skrf.time.time_gate

skrf.time.time_gate(ntwk, start=None, stop=None, center=None, span=None, mode='bandpass', window=('kaiser', 6))[source]

Time-domain gating of one-port s-parameters with a window function from scipy.signal.windows.

The gate can be defined with start/stop times, or by center/span. All times are in units of nanoseconds. Common windows are:

  • (‘kaiser’, 6)

  • 6 # integers are interpreted as kaiser beta-values

  • ‘hamming’

  • ‘boxcar’ # a straight up rect

If no parameters are passed this will try to auto-gate the largest peak.

Parameters
  • ntwk (Network) – network to operate on

  • start (number, or None) – start of time gate, (ns).

  • stop (number, or None) – stop of time gate (ns).

  • center (number, or None) – center of time gate, (ns). If None, and span is given, the gate will be centered on the peak.

  • span (number, or None) – span of time gate, (ns). If None span will be half of the distance to the second tallest peak

  • mode (['bandpass', 'bandstop']) – mode of gate

  • window (string, float, or tuple) – passed to window arg of scipy.signal.get_window()

Return type

Network

Note

You cant gate things that are ‘behind’ strong reflections. This is due to the multiple reflections that occur.

If you need to time-gate an N-port network, then you should gate each s-parameter independently.

Returns

  • ntwk (Network) – copy of ntwk with time-gated s-parameters

  • .. warning:: – Depending on sharpness of the gate, the band edges may be inaccurate, due to properties of FFT. We do not re-normalize anything.

Parameters
  • ntwk (Network) –

  • start (float) –

  • stop (float) –

  • center (float) –

  • span (float) –

  • mode (str) –

Return type

Network