PYME.localization.FitFactories.AstigGaussGPUFitFR module¶
- PYME.localization.FitFactories.AstigGaussGPUFitFR.FitFactory¶
alias of
GaussianFitFactory
- class PYME.localization.FitFactories.AstigGaussGPUFitFR.GaussianFitFactory(data, metadata, fitfcn=None, background=None, noiseSigma=None, **kwargs)¶
Bases:
object
Create a fit factory which will operate on image data (data), potentially using voxel sizes etc contained in metadata.
- Parameters
- datanumpy.ndarray
Uncorrected data, in raw ADU
- metadataPYME.IO.MetaDataHandler.MDHandlerBase or derived class
- backgroundnumpy.ndarray, warpdrive.buffers.Buffer, or scalar
warpdrive.buffers.Buffer allows asynchronous estimation of the per-pixel background on the GPU.
- FindAndFit(threshold, cameraMaps, **kwargs)¶
- Parameters
- threshold: float
detection threshold, as a multiple of per-pixel noise standard deviation
- cameraMaps: cameraInfoManager object (see remFitBuf.py)
- Returns
- results
- FromPoint(x, y, roiHalfSize=None)¶
This is a bit hacked to work with PYME.localization.Test.fitTestJigSCMOS
- X = None¶
- Y = None¶
- classmethod evalModel(params, md, x=0, y=0, roiHalfSize=5)¶
- get_results()¶
- refresh_warpdrive(cameraMaps)¶
- PYME.localization.FitFactories.AstigGaussGPUFitFR.astigmatic_gaussian(p, X, Y)¶
2D Gaussian model function with independent sigx, sigy
- Parameters
- p: iterable
- Parameter array, in the following order:
- x0: float
x center position [units same as X, Y]
- y0: float
y center position [units same as X, Y]
- A: float
Amplitude, or peak height of the Gaussian [units same as b]
- b: float
background, constant offset [units same as A]
- sx: float
sigma along the x direction [units same as X, Y]
- sy: float
sigma along the y direction [units same as X, Y]
- X: ndarray
y position array (1d)
- Y: ndarray
y position array (1d)
- Returns
- model: ndarray
2D image of gaussian
Notes
This function is not actually used by the GPU fit, but is here as an example, and for testing with, e.g. PYME.localization.Test.fitTestJigSCMOS. See fitTestJig notes about units, particularly the amplitude parameters A and b.