Construct a `ContinuousSource`. + **`frequency` [`number`]** — The frequency *f* in units of $c$/distance or ω in units of 2π$c$/distance. See [Units](Introduction.md#units-in-meep). No default value. You can instead specify `wavelength=x` or `period=x`, which a
(
self,
frequency=None,
start_time=0,
end_time=1.0e20,
width=0,
fwidth=float("inf"),
cutoff=None,
slowness=3.0,
wavelength=None,
is_integrated=False,
**kwargs,
)
| 180 | """ |
| 181 | |
| 182 | def __init__( |
| 183 | self, |
| 184 | frequency=None, |
| 185 | start_time=0, |
| 186 | end_time=1.0e20, |
| 187 | width=0, |
| 188 | fwidth=float("inf"), |
| 189 | cutoff=None, |
| 190 | slowness=3.0, |
| 191 | wavelength=None, |
| 192 | is_integrated=False, |
| 193 | **kwargs, |
| 194 | ): |
| 195 | """ |
| 196 | Construct a `ContinuousSource`. |
| 197 | |
| 198 | + **`frequency` [`number`]** — The frequency *f* in units of $c$/distance or ω in |
| 199 | units of 2π$c$/distance. See [Units](Introduction.md#units-in-meep). No default |
| 200 | value. You can instead specify `wavelength=x` or `period=x`, which are both a |
| 201 | synonym for `frequency=1/x`; i.e. 1/ω in these units is the vacuum wavelength or |
| 202 | the temporal period. |
| 203 | |
| 204 | + **`start_time` [`number`]** — The starting time for the source. Default is 0 |
| 205 | (turn on at $t=0$). |
| 206 | |
| 207 | + **`end_time` [`number`]** — The end time for the source. Default is |
| 208 | 10<sup>20</sup> (never turn off). |
| 209 | |
| 210 | + **`width` [`number`]** — Roughly, the temporal width of the smoothing |
| 211 | (technically, the inverse of the exponential rate at which the current turns off |
| 212 | and on). Default is 0 (no smoothing). You can instead specify `fwidth=x`, which |
| 213 | is a synonym for `width=1/x` (i.e. the frequency width is proportional to the |
| 214 | inverse of the temporal width). |
| 215 | |
| 216 | + **`slowness` [`number`]** — Controls how far into the exponential tail of the |
| 217 | tanh function the source turns on. Default is 3.0. A larger value means that the |
| 218 | source turns on more gradually at the beginning. For a detailed explanation |
| 219 | of the effects of `width` and `slowness` on the time profile of the source, |
| 220 | see [here](FAQ.md##why-doesnt-the-continuous-wave-cw-source-produce-an-exact-single-frequency-response). |
| 221 | |
| 222 | + **`is_integrated` [`boolean`]** — If `True`, the source is the integral of the |
| 223 | current (the [dipole |
| 224 | moment](https://en.wikipedia.org/wiki/Electric_dipole_moment)) which oscillates |
| 225 | but does not increase for a sinusoidal current. In practice, there is little |
| 226 | difference between integrated and non-integrated sources *except* for |
| 227 | [planewaves extending into |
| 228 | PML](Perfectly_Matched_Layer.md#planewave-sources-extending-into-pml). Default |
| 229 | is `False`. |
| 230 | """ |
| 231 | |
| 232 | if frequency is None and wavelength is None: |
| 233 | raise ValueError( |
| 234 | f"Must set either frequency or wavelength in {self.__class__.__name__}." |
| 235 | ) |
| 236 | |
| 237 | if cutoff is not None: |
| 238 | warnings.warn( |
| 239 | "cutoff property is deprecated, use slowness instead.", |
nothing calls this directly
no test coverage detected