def two_time_state_to_results(state):
"""Convert the internal state of the two time generator into usable results
Parameters
----------
state : namedtuple
The internal state that is yielded from `lazy_two_time`
Returns
-------
results : namedtuple
A results object that contains the two time correlation results
and the lag steps
"""
for q in range(np.max(state.label_array)):
x0 = (state.g2)[q, :, :]
(state.g2)[q, :, :] = (np.tril(x0) + np.tril(x0).T -
np.diag(np.diag(x0)))
return results(state.g2, state.lag_steps, state)
评论列表
文章目录