nanopyx.core.analysis.pearson_correlation
def
calculate_ppmcc(im1, im2, shift_x, shift_y):
Calculates the Pearson's correlation between two images after applying a shift.
Parameters
- im1: numpy array with shape (y, x)
- im2: numpy array with shape (y, x)
- shift_x: int; value to shift images in x dimension
- shift_y: int; value to shift images in y dimension
Returns
float; value of Pearson's Correlation function after shifting the two images.
def
pearson_correlation(im1, im2):
Calculates the Pearson's correlation between two images.
Parameters
- im1: numpy array with shape (y, x)
- im2: numpy array with shape (y, x)
Returns
float; value of Pearson's correlation between two images