skrf.frequency.Frequency.__init__

Frequency.__init__(start=0, stop=0, npoints=0, unit=None, sweep_type='lin')[source]

Frequency initializer.

Creates a Frequency object from start/stop/npoints and a unit. Alternatively, the class method from_f() can be used to create a Frequency object from a frequency vector instead.

Parameters:
  • start (number, optional) – start frequency in units of unit. Default is 0.

  • stop (number, optional) – stop frequency in units of unit. Default is 0.

  • npoints (int, optional) – number of points in the band. Default is 0.

  • unit (string, optional) – Frequency unit of the band: ‘hz’, ‘khz’, ‘mhz’, ‘ghz’, ‘thz’. This is used to create the attribute f_scaled. It is also used by the Network class for plots vs. frequency. Default is ‘hz’.

  • sweep_type (string, optional) – Type of the sweep: ‘lin’ or ‘log’. ‘lin’ for linear and ‘log’ for logarithmic. Default is ‘lin’.

Return type:

None

Note

The attribute unit sets the frequency multiplier, which is used to scale the frequency when f_scaled is referenced.

Note

The attribute unit is not case sensitive. Hence, for example, ‘GHz’ or ‘ghz’ is the same.

See also

from_f

constructs a Frequency object from a frequency vector instead of start/stop/npoints.

unit

frequency unit of the band

Examples

>>> wr1p5band = Frequency(start=500, stop=750, npoints=401, unit='ghz')
>>> logband = Frequency(1, 1e9, 301, sweep_type='log')