changed the structure of the analysis range for beads such that we can analyze any bead range (not necessarily rectangle), the work is not finished yet. See comment in the code of AnalyzeEncounterFrequencies.m