def time_lag(pha, amp, axis):
"""Introduce a time lag on phase series..
Parameters
----------
pha : array_like
Array of phases of shapes (npha, ..., npts)
amp : array_like
Array of amplitudes of shapes (namp, ..., npts)
axis : int
Location of the time axis.
Returns
-------
pha : array_like
Shiffted version of phases of shapes (npha, ..., npts)
amp : array_like
Original version of amplitudes of shapes (namp, ..., npts)
"""
npts = pha.shape[-1]
return np.roll(pha, np.random.randint(npts), axis=axis), amp
评论列表
文章目录