PYME.Analysis.Colocalisation.edtColoc module

PYME.Analysis.Colocalisation.edtColoc.imageDensityAtDistance(A, mask, voxelsize=None, bins=100, roi_mask=None)

Calculates the distribution of a label at varying distances from a mask. Negative distances are on the inside of the mask.

Parameters
A - intensity image
mask - binary mask
voxelsize - size of the pixels/voxels - should be either a constant, or an iterable

with a length equal to the number of dimensions in the data

bins - either a number of bins, or an array of bin edges
Returns
bn - number of pixels in distance bin
bm - mean intensity in distance bin
bins - the bin edges
PYME.Analysis.Colocalisation.edtColoc.image_enrichment_and_fraction_at_distance(A, mask, voxelsize=None, bins=100, roi_mask=None)

returns the relative enrichment of label of a label at a given distance from a mask, along with the total signal enclosed within that distance.

-ve distances correspond to points in the interior of the mask.

PYME.Analysis.Colocalisation.edtColoc.plot_image_dist_coloc_figure(bins, enrichment_BA, enrichment_AA, enclosed_BA, enclosed_AA, enclosed_area, pearson=None, MA=None, MB=None, nameA='A', nameB='B')
PYME.Analysis.Colocalisation.edtColoc.pointDensityAtDistance(points, mask, voxelsize, maskOffset, bins=100)

Calculates the distribution of a label at varying distances from a mask. Negative distances are on the inside of the mask.

Parameters
pointsnp.ndarray

array containing point coordinates

masknp.ndarray

binary mask

voxelsizeiterable

size of the pixels/voxels in mask - should be an iterable with a length equal to the number of dimensions in the data

maskOffsetiterable

iterable with lengh equal to number of dims giving coordinates (in point space) or the 0th pixel in the mask

binsint or ndarray, default=100

either a number of bins, or an array of bin edges

Returns
bnndarray

integrated intensity in distance bin

bmndarray

mean intensity in distance bin

binsndarray

the bin edges