Skip to content

flex_rf.tidy3d.CustomSourceTime

Type: class Base(s): Pulse

Custom source time dependence consisting of a real or complex envelope modulated at a central frequency, as shown below.

amp_time(t)=amplitude eiphase2πifreq0t envelope(toffset/(2πfwidth))amp\_time(t) = amplitude \cdot \ e^{i \cdot phase - 2 \pi i \cdot freq0 \cdot t} \cdot \ envelope(t - offset / (2 \pi \cdot fwidth))

Depending on the envelope, field decay may not occur. If field decay does not occur, then the simulation will run for the full run_time. Also, if field decay does not occur, then source normalization of frequency-domain monitors is not meaningful.

The source time dependence is linearly interpolated to the simulation time steps. The sampling rate should be sufficiently fast that this interpolation does not introduce artifacts. The source time dependence should also start at zero and ramp up smoothly. The first and last values of the envelope will be used for times that are out of range of the provided data.

cst = CustomSourceTime.from_values(freq0=1, fwidth=0.1,
values=np.linspace(0, 9, 10), dt=0.1)
freq0 [PositiveFloat]

Central frequency of the pulse.

fwidth [PositiveFloat]

Standard deviation of the frequency content of the pulse.

amplitude [NonNegativeFloat] = 1.0

Real-valued maximum amplitude of the time dependence.

phase [float] = 0.0

Phase shift of the time dependence.

offset [float] = 0.0

Time delay of the envelope in units of 1 / (2pi * fwidth).

source_time_dataset [TimeDataset | None] = None

Dataset for storing the envelope of the custom source time. This envelope will be modulated by a complex exponential at frequency freq0.

data_times [ArrayFloat1D]

Times of envelope definition.

amp_time(time: float | ArrayFloat1D)

Complex-valued source amplitude as a function of time.

end_time()

Time after which the source is effectively turned off / close to zero amplitude.

from_values(freq0: float, fwidth: float, values: ArrayComplex1D, dt: float)

Create a CustomSourceTime from a numpy array.