t_funcs.sin2
t_funcs.sin2(index)Return a sin-squared (Hann) pulse time function.
A smooth pulse of finite duration: ampl * sin^2(pi (t - on) / (off - on)) between on and off, zero outside.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| index | int | Integer suffix used to look up parameters in args. | required |
Returns
| Name | Type | Description |
|---|---|---|
| TFunc | Callable f(t, args) reading ampl_{index}, on_{index} and |
|
| TFunc | off_{index} from args. Raises ValueError if off <= on. |
Notes
The peak, ampl, is at the midpoint of on and off. The FWHM is (off - on) / 2 and the area is ampl * (off - on) / 2.