extraction.core.functions.cell

Base functions to extract information from a single cell

These functions are automatically read by extractor.py, and so can only have the cell_mask and trap_image as inputs and must return only one value.

They assume that there are no NaNs in the image.

We use bottleneck when it performs faster than numpy:

  • Median

  • values containing NaNs (We make sure this does not happen)

Functions

area(cell_mask)

Find the area of a cell mask

conical_volume(cell_mask)

Estimates the volume of the cell

eccentricity(cell_mask)

Find the eccentricity using the approximate major and minor axes

max2p5pc(cell_mask, trap_image)

Finds the mean of the brightest 2.5% of pixels in the cell.

max5px(cell_mask, trap_image)

Finds the mean of the five brightest pixels in the cell.

mean(cell_mask, trap_image)

Finds the mean of the pixels in the cell.

median(cell_mask, trap_image)

Finds the median of the pixels in the cell.

min_maj_approximation(cell_mask)

Finds the lengths of the minor and major axes of an ellipse from a cell mask.

spherical_volume(cell_mask)

Estimates the volume of the cell assuming it is a sphere with the mask providing a cross-section through the median plane of the sphere.

std(cell_mask, trap_image)

Finds the standard deviation of the values of the pixels in the cell.

volume(cell_mask)

Estimates the volume of the cell assuming it is an ellipsoid with the mask providing a cross-section through the median plane of the ellipsoid.