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. They must return only one value.

They assume that there are no NaNs in the image.

We use the module bottleneck when it performs faster than numpy: - Median - values containing NaNs (but we make sure this does not happen)

Functions

area(cell_mask)

Find the area of a cell mask.

conical_volume(cell_mask)

Estimate the volume of the cell.

eccentricity(cell_mask)

Find the eccentricity using the approximate major and minor axes.

max2p5pc(cell_mask, trap_image)

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

max5px(cell_mask, trap_image)

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

mean(cell_mask, trap_image)

Find the mean of the pixels in the cell.

median(cell_mask, trap_image)

Find the median of the pixels in the cell.

min_maj_approximation(cell_mask)

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

spherical_volume(cell_mask)

Estimate the volume of the cell.

std(cell_mask, trap_image)

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

volume(cell_mask)

Estimate the volume of the cell.