polyTEM.statistics.xcorr_slow

polyTEM.statistics.xcorr_slow(stack_list1, stack_list2=None, prematched=False)

Across many samples, performs crosscorrelation of two 3-D datacubes that originate from the same sample. First, checks that the datasets come match sample name Second, perform crosscorrelation (convolution of the datacubes) using scipy.signal.correlate This method is slow, tqdm will print progress – INPUT stack_list1: List of CrystalStack instances stack_list2: List of CrystalStack instances, if not inputted, then perform autocorrelation instead – OUTPUT xc_array: 4-D array of shape (len(matches), size[0]*2 - 1, size[1]*2 - 1, size[2]*2-1)

that represents (sample, lagx, lagy, lag_theta), centered around 0 lag

— KNOWN BUGS This uses A LOT of RAM space Takes about 5 seconds per pair of images.