PYME.localization.FitFactories.FFBase module

class PYME.localization.FitFactories.FFBase.FFBase(data, metadata, fitfcn=None, background=None, noiseSigma=None)

Bases: object

Create a fit factory which will operate on image data (data), potentially using voxel sizes etc contained in metadata.

Methods

FromPoint(x, y[, z, roiHalfSize, axialHalfSize]) This should be overridden in derived classes to actually do the fitting.
FromPoints(ofd) Fit at a number of points.
getMultiviewROIAtPoint(x, y[, z, ...]) Helper fcn to extract ROI from frame at given x,y, point from a multi-channel image.
getROIAtPoint(x, y[, z, roiHalfSize, ...]) Helper fcn to extract ROI from frame at given x,y, point.
getSplitROIAtPoint(x, y[, z, roiHalfSize, ...]) Helper fcn to extract ROI from frame at given x,y, point from a multi-channel image.
FromPoint(x, y, z=None, roiHalfSize=5, axialHalfSize=15)

This should be overridden in derived classes to actually do the fitting. The function which gets implemented should return a numpy record array, of the dtype defined in the module level FitResultsDType variable (the calling function uses FitResultsDType to pre-allocate an array for the results)

FromPoints(ofd)

Fit at a number of points.

getMultiviewROIAtPoint(x, y, z=None, roiHalfSize=5, axialHalfSize=15)

Helper fcn to extract ROI from frame at given x,y, point from a multi-channel image.

Returns:
Xg - x coordinates of pixels in ROI in nm (channel 1) Yg - y coordinates of pixels in ROI (chanel 1) Xr - x coordinates of pixels in ROI in nm (channel 2) Yr - y coordinates of pixels in ROI (chanel 2) data - raw pixel data of ROI background - extimated background for ROI sigma - estimated error (std. dev) of pixel values xslice - x slice into original data array used to get ROI (channel 1) yslice - y slice into original data array (channel 1) xslice2 - x slice into original data array used to get ROI (channel 2) yslice2 - y slice into original data array (channel 2)
getROIAtPoint(x, y, z=None, roiHalfSize=5, axialHalfSize=15)

Helper fcn to extract ROI from frame at given x,y, point.

Returns:
X - x coordinates of pixels in ROI in nm Y - y coordinates of pixels in ROI data - raw pixel data of ROI background - extimated background for ROI sigma - estimated error (std. dev) of pixel values xslice - x slice into original data array used to get ROI yslice - y slice into original data array zslice - z slice into original data array
getSplitROIAtPoint(x, y, z=None, roiHalfSize=5, axialHalfSize=15)

Helper fcn to extract ROI from frame at given x,y, point from a multi-channel image.

Returns:
Xg - x coordinates of pixels in ROI in nm (channel 1) Yg - y coordinates of pixels in ROI (chanel 1) Xr - x coordinates of pixels in ROI in nm (channel 2) Yr - y coordinates of pixels in ROI (chanel 2) data - raw pixel data of ROI background - extimated background for ROI sigma - estimated error (std. dev) of pixel values xslice - x slice into original data array used to get ROI (channel 1) yslice - y slice into original data array (channel 1) xslice2 - x slice into original data array used to get ROI (channel 2) yslice2 - y slice into original data array (channel 2)
PYME.localization.FitFactories.FFBase.FitFactory

alias of FFBase