Detection of couplings in ensembles of stochastic oscillators.