Set source signal
set_source_signalAssign a custom time-domain signal to an existing FDTD/FDFD source by providing time, amplitude, and phase vectors for pulses such as modulated Gaussian or multi-peak waveforms.
Instructions
Assign a user-defined time-domain signal to an existing source (setsourcesignal).
Used in FDTD / FDFD for custom pulses (modulated Gaussian, multi-peak, etc.).
This is not set_property — ordinary wavelength / pulse settings still use
set_property on the selected source.
t, amplitude, and phase must be equal-length 1D vectors (SI: s, —, rad).
Prefer starting t at 0 so the initial field is zero.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_name": "<source_name>",
"t": "<t>",
"amplitude": "<amplitude>",
"phase": "<phase>"
},
"name": "set_source_signal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| t | Yes | Time samples in seconds (SI), same length as amplitude and phase. | |
| phase | Yes | Phase samples (radians), same length as t. | |
| fcentre | No | Optional center frequency in Hz (SI). If set with bandwidth, used for material fits, mesh, and source limits; otherwise estimated from the signal. | |
| amplitude | Yes | Amplitude envelope samples, same length as t. | |
| bandwidth | No | Optional bandwidth in Hz (SI). Use together with fcentre. | |
| source_name | Yes | Existing source path, e.g. 'FDTD::plane'. Does not create a source — add + optionally rename first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |