PYME.localization.ofind_pri module

class PYME.localization.ofind_pri.ObjectIdentifier(data, metadata, filterRadiusLowpass=0.7, axis='x')

Bases: list

Creates an Identifier object to be used for object finding, takes a 2D or 3D slice into a data stack (data), and a filtering mode (filterMode, one of [“fast”, “good”]) where “fast” performs a z-projection and then filters, wheras “good” filters in 3D before projecting. The parameters filterRadiusLowpass and filterRadiusHighpass control the bandpass filter used to identify ‘point-like’ features. filterRadiusZ is the radius used for the axial smoothing filter

Methods

FindObjects(thresholdFactor[, ...]) Finds point-like objects by subjecting the data to a band-pass filtering (as defined when creating the identifier) followed by z-projection and a thresholding procedure where the threshold is progressively decreased from a maximum value (half the maximum intensity in the image) to a minimum defined as [thresholdFactor]*the mode (most frequently occuring value, should correspond to the background) of the image.
append L.append(object) – append object to end
count(...)
extend L.extend(iterable) – extend list by appending elements from the iterable
index((value, [start, ...) Raises ValueError if the value is not present.
insert L.insert(index, object) – insert object before index
pop(...) Raises IndexError if list is empty or index is out of range.
remove L.remove(value) – remove first occurrence of value.
reverse L.reverse() – reverse IN PLACE
sort L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE;
FindObjects(thresholdFactor, numThresholdSteps='default', blurRadius=1, mask=None, splitter=None, debounceRadius=4, maskEdgeWidth=10, discardClumpRadius=0)

Finds point-like objects by subjecting the data to a band-pass filtering (as defined when creating the identifier) followed by z-projection and a thresholding procedure where the threshold is progressively decreased from a maximum value (half the maximum intensity in the image) to a minimum defined as [thresholdFactor]*the mode (most frequently occuring value, should correspond to the background) of the image. The number of steps can be given as [numThresholdSteps], with defualt being 5 when filterMode=”fast” and 10 for filterMode=”good”. At each step the thresholded image is blurred with a Gaussian of radius [blurRadius] to approximate the image of the points found in that step, and subtracted from the original, thus removing the objects from the image such that they are not detected at the lower thresholds. This allows the detection of objects which are relatively close together and spread over a large range of intenstities. A binary mask [mask] may be applied to the image to specify a region (e.g. a cell) in which objects are to be detected.

A copy of the filtered image is saved such that subsequent calls to FindObjects with, e.g., a different thresholdFactor are faster.

class PYME.localization.ofind_pri.OfindPoint(x, y, z=None, detectionThreshold=None)

Creates a point object, potentially with an undefined z-value.

class PYME.localization.ofind_pri.PseudoPointList(parent, varName)
PYME.localization.ofind_pri.calc_gauss_weights(sigma)

calculate a gaussian filter kernel (adapted from scipy.ndimage.filters.gaussian_filter1d)

PYME.localization.ofind_pri.preparePSF(md, axis)