PYME.localization.remFitBuf module

class PYME.localization.remFitBuf.BufferManager

Bases: object

Keeps track of data sources and buffering over individual fitTask instances

Methods

updateBuffers(md, dataSourceModule, bufferLen) Update the various buffers.
updateBuffers(md, dataSourceModule, bufferLen)

Update the various buffers.

class PYME.localization.remFitBuf.CameraInfoManager

Bases: object

Manages camera information such as dark frames, variance maps, and flatfielding

Methods

correctImage(md, img)
getDarkMap(md) Returns the dark map specified in the supplied metadata, from cache if possible.
getFlatfieldMap(md) Returns the flatfield map specified in the supplied metadata, from cache if possible The flatfield is a (floating point) value which is multiplied with the image to correct variations in response.
getVarianceMap(md) Returns the pixel variance map specified in the supplied metadata, from cache if possible.
correctImage(md, img)
getDarkMap(md)

Returns the dark map specified in the supplied metadata, from cache if possible. The dark map is in units of camera counts

getFlatfieldMap(md)

Returns the flatfield map specified in the supplied metadata, from cache if possible The flatfield is a (floating point) value which is multiplied with the image to correct variations in response. It should (usually) have a mean value of 1.

getVarianceMap(md)

Returns the pixel variance map specified in the supplied metadata, from cache if possible. The variance map should be in units of photoelectrons.

PYME.localization.remFitBuf.createFitTaskFromTaskDef(task)

Creates a fit task from a new-style json task definition Parameters ———- task : dict

The parsed task definition. As the task definition will need to be parsed by the worker before we get here, we expect this to take the form of a python dictionary.
Returns:a fitTask instance
class PYME.localization.remFitBuf.fitResult(task, results, driftResults)

Bases: PYME.ParallelTasks.taskDef.TaskResult

class PYME.localization.remFitBuf.fitTask(dataSourceID, frameIndex, metadata, dataSourceModule=None, resultsURI=None)

Bases: PYME.ParallelTasks.taskDef.Task

Create a new fit task for performing single molecule localization tasks.

Parameters:

dataSourceID : str

A filename or URI which identifies the data source

frameIndex : int

The frame to fit

metadata : PYME.IO.MetaDataHandler object

The image metadata. This defines most of the analysis parameters.

dataSourceModule : str

The name of the data source module to use. If None, the dataSourceModule is inferred from the dataSourceID.

resultsURI : str

A URI dictating where to store the analysis results.

Attributes

fitMod
is_splitter_fit

Methods

__call__([gui, taskQueue])
calcSigma(md, data)
calcThreshold()
classmethod calcSigma(md, data)
calcThreshold()
fitMod
is_splitter_fit
PYME.localization.remFitBuf.tqPopFcn(workerN, NWorkers, NTasks)