SMOLR: Single Molecule Localization Gaussian Image Reconstruction

View source: R/smolr.R

SMOLRR Documentation

Single Molecule Localization Gaussian Image Reconstruction

Description

Visualizes single molecule data (x,y,precision,channel) by plotting a gaussian function with a sigma proportional to the precision of the localizations, and a fixed integrated density.

Usage

SMOLR(x, y, prec, ch, px, xlim, ylim, file, output, fit, fast)
## S3 method for class 'data.frame'
SMOLR(x, px, xlim, ylim, file, output, fit, fast)
## S3 method for class 'list'
SMOLR(x, px, xlim, ylim, file, output, fit, fast)

Arguments

x

X coordinates in nm, a localizations data.frame or a list of data.frames.

y

Y coordinates in nm

prec

Precisions in nm, if not specified 20nm is used

ch

Channel number, if not specified channel is 1

px

Pixelsize in nm of the final image, default=5 nm

xlim

Vector with the upper and lower limit of x axis (x coordinates outside limits will be discarded if fit=TRUE)

ylim

Vector with the upper and lower limit of y axis (y coordinates outside limits will be discarded if fit=TRUE)

output

Type of output: "tiff" will output a tif image as indicated in file. "r" will output an smlmr_image object. Default is "r".

file

Filename to output tiff image to when output is "tiff" if no filename is given a dialog box opens and asks for a filename

fit

If fit=TRUE all coordinates that lie outside of indicated xlim and ylim values are discarded

fast

If fast is TRUE a predefined list of gaussian functions will be loaded in the memory instead of generated for each localization. This Will speed up calculations for large images. This method is less precise placing gaussians in the middle of the pixel instead of the regular subpixel location.

Value

returns a r object of the class smolr_image which is a list containing 3 items

img

an array pixel values between zero and one

parameters

list of parameters of the given data per channel. Nloc number of localizations, max min and mean of x and y coordinates

inputs

list of values that were the input in the function, for back reference

Author(s)

Optical Imaging Centre ErasmusMC Rotterdam

Examples

test <- SMOLR(c(200,150,400,345),c(200,300,400.5,239),ch=c(2,3,4,2), prec=c(15,10,16.3,12))

#test #displays a summery 
#test$img #displays the image array
#test$parameters #displays the parameters of the image
#plot(test)

ErasmusOIC/SMoLR documentation built on July 27, 2023, 8:05 p.m.