cycle_matrix optionally takes several signals with corresponding weights