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 theNetwork
class 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:
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
Examples
>>> wr1p5band = Frequency(500, 750, 401, 'ghz')