Finished co-occurence function v1

Co-occurrence function now produces 4D co-occurence with horizontal scan