// FIXME: This could be done more efficiently, e.g. thanks to hungarian
// Find pairs of matching components
// compute the cross-correlation matrix between components
K = np.corrcoef(components, maps.reshape(4, 400))[4:, :4]
// K should be a permutation matrix, hence its coefficients
// should all be close to 0 1 or -1
K_abs = np.abs(K)
assert_true(np.sum(K_abs > .9) == 4)