module documentation
Selection of ramping functions. These functions are not meant to be interfaced with by the user, for generating ramps, one should use the function ramp(...) located in ramp.py
Note: a ramp_func-function must have comply with following:
- the signature must be Callable[t:np.ndarray, gamma_t:float, width:float]->np.ndarray
- the function name ends with _ramp_func
Function | cosine |
Creates a cosine squared ramp centered in gamma_t with defined width, relative to the time-vector t: |
Function | gaussian |
Ramp function based on the gaussian gate used by Schneider and Hamstra, 1999 |
Function | hamming |
Ramp based on the Hamming window function |
Function | hann |
Ramp based on the Hann window function |
Function | linear |
Creates a linear ramp from 0.0 to 1.0 for the full duration of t |
Function | _cosine |
Private helper used for cosine-sum ramps, i.e. Hann and Hamming |
Creates a cosine squared ramp centered in gamma_t with defined width, relative to the time-vector t:
ramp = (cos(π*(t − (gammat − width ⁄ 2) + width) ⁄ (2*width))2
Parameters | |
t:np.ndarray | time vector |
gammafloat | center of ramp |
width:float | width of ramp |
Returns | |
np.ndarray |
Ramp function based on the gaussian gate used by Schneider and Hamstra, 1999
Parameters | |
t:np.ndarray | time vector |
gammafloat | center of ramp |
width:float | width of ramp |
Returns | |
np.ndarray |
Ramp based on the Hamming window function
Parameters | |
t:np.ndarray | time vector |
gammafloat | center of ramp |
width:float | width of ramp |
Returns | |
np.ndarray |
Ramp based on the Hann window function
Parameters | |
t:np.ndarray | time vector |
gammafloat | center of ramp |
width:float | width of ramp |
Returns | |
np.ndarray |
Creates a linear ramp from 0.0 to 1.0 for the full duration of t
Note that this ramp function ignores gamma_t and width
Parameters | |
t:np.ndarray | time vector |
gammafloat | _unused_ |
width:float | _unused_ |
Returns | |
np.ndarray |