Skip to content

flex_rf.tidy3d.FreqRange

Type: class Base(s): Tidy3dBaseModel

Convenience class for handling frequency/wavelength conversion; it simplifies specification of frequency ranges and sample points for sources and monitors.

Depending on the context the user can define desired frequency range by specifying:

  • central frequency freq0 and frequency bandwidth fwidth;
  • frequency interval [fmin,fmax];
  • central wavelength wvl0 and wavelength range wvl_width;
  • wavelength interval [wvl_min, wvl_max].
import tidy3d as td
freq0 = 1e12
fwidth = 1e11
freq_range = td.FreqRange(freq0=freq0, fwidth=fwidth)
central_freq = freq_range.freqs(num_points=1, spacing="uniform_freq")
freqs = freq_range.freqs(num_points=11, spacing="uniform_wvl")
source = freq_range.to_gaussian_pulse()
freq0 [PositiveFloat] = ...

Real-valued positive central frequency.

fwidth [PositiveFloat] = ...

Real-valued positive width of the frequency range (bandwidth).

fmax [float]

Infer highest frequency fmax from central frequency freq0 and bandwidth fwidth.

fmin [float]

Infer lowest frequency fmin from central frequency freq0 and bandwidth fwidth.

wvl0 [float]

Get central wavelength from central frequency and bandwidth.

check_half_fwidth_less_than_freq0()
freqs(num_points: int, spacing: str = 'uniform_freq')

method freqs() returns a numpy array of num_point frequencies uniformly sampled from the specified frequency range; if num_points == 1 method returns the central frequency freq0.

from_freq_interval(fmin: float, fmax: float)

method from_freq_interval() creates instance of class FreqRange from frequency interval defined by arguments fmin and fmax.

from_wvl(wvl0: float, wvl_width: float)

method from_wvl() updated instance of class FreqRange by reassigning new frequency- and wavelength-related parameters.

from_wvl_interval(wvl_min: float, wvl_max: float)

method from_wvl_interval() updated instance of class FreqRange by reassigning new frequency- and wavelength-related parameters.

sweep_decade(num_points_per_decade: int)

Generate frequencies with logarithmic spacing across decades.

to_gaussian_pulse(**kwargs: Any)

to_gaussian_pulse(): Return a GaussianPulse instance based on this frequency range.

wvls(num_points: int, spacing: str = 'uniform_wvl')

method wvls() returns a numpy array of num_points wavelengths uniformly sampled from the range of wavelengths; if num_points == 1 the method returns central wavelength wvl0.