- Frequency.__init__(start=0, stop=0, npoints=0, unit='ghz', sweep_type='lin')¶
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.
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
Networkclass for plots vs. frequency. Default is ‘ghz’.
sweep_type (string, optional) – Type of the sweep: ‘lin’ or ‘log’. ‘lin’ for linear and ‘log’ for logarithmic. Default is ‘lin’.
- Return type
The attribute unit sets the frequency multiplier, which is used to scale the frequency when f_scaled is referenced.
The attribute unit is not case sensitive. Hence, for example, ‘GHz’ or ‘ghz’ is the same.
>>> wr1p5band = Frequency(500, 750, 401, 'ghz')