PYME.Analysis.points.multiview module

PYME.Analysis.points.multiview.applyShiftmaps(datasource, shiftWallet)

applyShiftmaps loads multiview shiftmap parameters from multiviewMapper.shiftWallet, reconstructs the shiftmap objects, applies them to the multiview data, and maps the positions registered to the first channel to the pipeline

x: vector of localization x-positions y: vector of localization y-positions numChan: number of multiview channels
Returns: nothing
Adds shifts into the pipeline which will then be applied automatically by the mappingFilter (see foldX)
PYME.Analysis.points.multiview.calcShifts(datasource, shiftWallet)
PYME.Analysis.points.multiview.coalesceDictSorted(inD, assigned, keys, weights_by_key)

Agregates clumps to a single event Note that this will evaluate the lazy pipeline events and add them into the dict as an array, not a code object. Also note that copying a large dictionary can be rather slow, and a structured ndarray approach may be preferable. DB - we should never have a ‘large’ dictionary (ie there will only ever be a handful of keys)

inD: input dictionary containing fit results assigned: clump assignments to be coalesced keys: list whose elements are strings corresponding to keys to be copied from the input to output dictionaries weights_by_key: dictionary of weights.
fres: output dictionary containing the coalesced results
PYME.Analysis.points.multiview.findClumps(datasource, gap_tolerance, radius_scale, radius_offset, inject=False)
PYME.Analysis.points.multiview.foldX(datasource, mdh, inject=False, chroma_mappings=False)

At this point the origin of x should be the corner of the concatenated frame

Returns: nothing
Adds folded x-coordinates to the datasource Adds channel assignments to the datasource
PYME.Analysis.points.multiview.mergeClumps(datasource, numChan, labelKey='clumpIndex')
PYME.Analysis.points.multiview.probeAwareFindClumps(datasource, gap_tolerance, radius_scale, radius_offset, inject=False)

datasource: PYME datasource object - dictionary-like object with addColumn method gap_tolerance: number of frames acceptable for a molecule to go MIA and still be called the same molecule when

it returns

radius_scale: multiplicative factor applied to the error_x term in deciding search radius for pairing radius_offset: term added to radius_scale*error_x to set search radius

Nothing, but adds clumpIndex column to datasource input

FIXME: This function should probably not exist as channel handling should ideally only be in one place within the code base. A prefered solution would be to split using a colour filter, clump each channel separately, and then merge channels.