SMLM models

class @SMLMModel.SMLMModel

SMLMModel is a super-class for defining how to deal with a geometric model.

ParentObject = '[]'

Parental SMLMModelFit object.

ID = None

The model’s ID in the parental SMLMModelFit object.

img = None

Model image.

parVal = None


mPars = None

Model parameters.

modelObj = None

Source geometric model object.

modelFun = None

The function for creating coordinates based on the geometric model.

sourcePath = None

The path of the m file of the geometric model.

dimension = None

Dimension of the geometric model.

modelType = None

Type of the model, either discrete, discretized, continuous, intensity, or image.

fixSigma = 'false'

Fix the sigma to a specific value.

displayLut = "'red hot'"

The lookup table for the model.

layer = '1'

The layer that this model is fitted to.


Add the parental SMLMModelFit object.


Export model parameters and their default values.

class @functionModel.functionModel(model2load)

A sub-class of SMLMModel. functionModel class handles any geometric model in the form of a function. functionModel handles the function differently based on its modelType. The modelType is per geometric model and defined in modelType of the geometricModel.

Last update:


pixelSize = '5'

Pixel size of the model

sigma = '15'

Standard deviation of the gaussian kernel used for smoothing the model.

sigmaFactor = '1'

The scaling factor of the kernel’s standard deviation.

samplingFactor = '0.75'

For continuous model, deciding the distance between ref points. In the unit of sigma. 0.75 means 0.75*sigma.

sigmaSet = None

The set of sigma.

sigmaZSet = None

The set of sigma in Z.

extraBlurr = None

This is a parameter determined by lPars.variation.

locsPrecFactor = None

The min sqrt(locprec^2+varation^2)


The constructor of the functional model object. This function fetches the default values from the geometric model.


This function updates the mPars’ arguments based on the change of the geometric model.

getPoint(mPars, varargin)

Getting sampled points from the model.

fun(mPars, dx)

convert the output of model for voxelblurr

deriveSigma(locs, varargin)

deriveSigma() derives the final sigma used for fitting. When fixSigma is set as true, sigmas are derived based on pre-defined values. Otherwise, sigmas are derived based on localization precisions. For a continuous model, the minimum sigma is defined as the median of localization precisions.



  • locs (structure array) – a typical localization structure array used in SMAP.

  • sigmaFactor (numeric vector) – a 1-by-2 vector that determines the fold of localization precisions used for fitting.

  • sigmaSet (numeric vector | numeric scalar) – sigma used for fitting. A N-by-1 vector, where N is the number of localiztions when fixSigma is true.

  • sigmaZSet (numeric vector | numeric scalar) – z sigma used for fitting. A N-by-1 vector, where N is the number of localiztions when fixSigma is true.

Last update:


See also


class @imageModel.imageModel(img, varargin)
imageModel(img, varargin)

parse varargin

getImage(mPars, varargin)

parse varargin