the apparatus and method of the invention provide for assigning coordinates to samples in an array . the method is based on a hierarchical pattern matching to a local lattice structure that is used as a template . starting from the best local match , the pattern is expanded hierarchically to encompass the entire array .