bebi103.image.costes_coloc

bebi103.image.costes_coloc(im_1, im_2, psf_width=3, n_scramble=1000, thresh_r=0.0, roi=None, roi_method='all', do_manders=True)

Perform Costes colocalization analysis on a pair of images.

Parameters
  • im_1 (array_like) – Intensity image for colocalization. Must be the same shame as im_1.

  • im_2 (array_like) – Intensity image for colocalization. Must be the same shame as im_2.

  • psf_width (int, default 3) – Width, in pixels of the point spread function.

  • n_scramble (int, default 1000) – Number of strambled image comparisons to do to get statistics.

  • thresh_r (float, default 0.0) – Threshold Pearson r value to be considered colocalized.

  • roi (array_like, dtype bool, default None) – Boolean image the same shape as im_1 and im_2 that is True for pixels within the ROI.

  • roi_method (str, default 'all') – If ‘all’, all pixels of a given subimage must be within the ROI for the subimage itself to be considered part of the ROI. If ‘any’, if any one pixel is within the ROI, the subimage is considered part of the ROI.

  • do_manders (bool, default True) – If True, compute the Manders coefficients.

Returns

output

The CostesColocalization instance has the following attributes.
im_1, im_2, psf_width, n_scramble, thresh_r, roi,

roi_method: As in the input parameters.

a: slope of the regression line I_2 = a * I_1 + b b: intercept of regression line I_2 = a * I_1 + b M_1: Manders coefficient for image 1 M_2: Manders coefficient for image 2 pearson_r: Pearson coerrelaction coefficient of the pixels

in the two images.

p_coloc: The probability of colocalization being present

in the two images.

Return type

A CostesColocalization instance.