skrf.frequency.Frequency

class skrf.frequency.Frequency(start=0, stop=0, npoints=0, unit='ghz', sweep_type='lin')[source]

A frequency band.

The frequency object provides a convenient way to work with and access a frequency band. It contains a frequency vector as well as a frequency unit. This allows a frequency vector in a given unit to be available (f_scaled), as well as an absolute frequency axis in ‘Hz’ (f).

A Frequency object can be created from either (start, stop, npoints) using the default constructor, __init__(). Or, it can be created from an arbitrary frequency vector by using the class method from_f().

Internally, the frequency information is stored in the f property combined with the unit property. All other properties, start stop, etc are generated from these.

Attributes

center Center frequency in Hz
center_idx closes idx of f to the center frequency
center_scaled Center frequency in unit’s
df the gradient of the frequency vector (in hz)
df_scaled the gradient of the frequency vector (in self.unit)
dw the gradient of the frequency vector (in radians)
f Frequency vector in Hz
f_scaled Frequency vector in units of unit
multiplier Multiplier for formatting axis
multiplier_dict
npoints number of points in the frequency
span the frequency span
span_scaled the frequency span
start starting frequency in Hz
start_scaled starting frequency in unit’s
step the inter-frequency step size (in hz) for evenly-spaced frequency sweeps
step_scaled the inter-frequency step size (in self.unit) for evenly-spaced frequency sweeps
stop stop frequency in Hz
stop_scaled stop frequency in unit’s
t time vector in s.
t_ns time vector in ns.
unit Unit of this frequency band.
unit_dict
w Frequency vector in radians/s

Methods

__init__ Frequency initializer.
copy returns a new copy of this frequency
from_f Construct Frequency object from a frequency vector.
labelXAxis Label the x-axis of a plot.
overlap Calculates overlapping frequency between self and f2
plot Plot something vs this frequency
round_to Round off frequency values to a specified precision.