Skip to content

Commit 0f4f242

Browse files
Revise docstring for BroadbandPulse
1 parent 409564b commit 0f4f242

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tidy3d/components/source/time.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,11 @@ class BroadbandPulse(SourceTime):
623623
lt=0.5,
624624
)
625625
offset: float = pydantic.Field(
626-
5.0,
626+
0.0,
627627
title="Offset",
628-
description="Time delay of the maximum value of the "
629-
"pulse in units of 1 / (``2pi * fwidth``).",
630-
ge=2.5,
628+
description="An automatic time delay of the peak value of the pulse has been applied under the hood "
629+
"to ensure smooth ramping up of the pulse at time = 0. This offfset is added on top of the automatic time delay "
630+
"in units of 1 / [``2pi * (freq_range[1] - freq_range[0])``].",
631631
)
632632

633633
@pydantic.validator("freq_range", always=True)
@@ -676,13 +676,10 @@ def frequency_range_sigma(self, sigma: float = DEFAULT_SIGMA) -> FreqBound:
676676
return self._source.frequency_range(sigma)
677677

678678
def frequency_range(self, num_fwidth: float = DEFAULT_SIGMA) -> FreqBound:
679-
"""Frequency range where the source amplitude is within ``exp(-sigma**2/2)`` of the peak amplitude."""
679+
"""Delegated to `frequency_range_sigma(sigma=num_fwidth)` for computing the frequency range where the source amplitude
680+
is within ``exp(-num_fwidth**2/2)`` of the peak amplitude.
681+
"""
680682
return self.frequency_range_sigma(num_fwidth)
681683

682-
@cached_property
683-
def _freq0(self) -> float:
684-
"""Central frequency from frequency range."""
685-
return np.mean(self.freq_range)
686-
687684

688685
SourceTimeType = Union[GaussianPulse, ContinuousWave, CustomSourceTime, BroadbandPulse]

0 commit comments

Comments
 (0)