unfold: Stereological unfolding

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/unfolding.R

Description

Unfolding the (joint) distribution of planar parameters

Usage

1
unfold(sp, nclass, maxIt = 64, nCores = getOption("par.unfoldr", 2L), ...)

Arguments

sp

section profiles, see sectionProfiles

nclass

number of classes, see details

maxIt

maximum number of EM iterations

nCores

number of cpu cores

...

optional arguments passed to setbreaks

Details

This is a S3 method for either trivariate stereological unfolding or estimation of the 3D diameter distribution of spheres which is better known as the Wicksell's corpuscle problem. The function aggregates all intermediate computations required for the unfolding procedure given the data in the prescribed format, see reference of functions below, and returning the characteristics as count data in form of a trivariate histogram. The section profile objects sp, see sectionProfiles, are either of class prolate or oblate for the reconstruction of the corresponding spheroids or, respectively, spheres. The result of the latter is simply a numeric vector of circle diameters. The number of bin classes for discretization of the underlying integral equations which must be solved is set by the argument nclass. In case of Wicksell's corpuscle problem (spheres as grains) this is simply a scalar value denoting the number of bins for the diameter. For spheroids it refers to a vector of length three defined in the order of the number of size, angle and shape class limits which are used. If sp is a numeric vector (such as for the estimation of the 3D diameter distribution from a 2D section of spheres) the function calls the EM algorithm as described in [3]. The return value of the function is an object of class "unfold" with elements as follows

Value

object of class "unfold", see details

Author(s)

M. Baaske

See Also

setbreaks, binning3d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 lam <- 100
 # parameter rlnorm distribution (radii)
 theta <- list("size"=list("meanlog"=-2.5,"sdlog"=0.5))

 # simulation bounding box
 box <- list("xrange"=c(0,5),"yrange"=c(0,5),"zrange"=c(0,5))
 # simulate only 3D system
 S <- simPoissonSystem(theta,lam,size="rlnorm",box=box,type="spheres",
   perfect=TRUE, pl=1)

 # intersect
 sp <- planarSection(S,d=2.5,intern=TRUE,pl=1)

 # unfolding
 ret <- unfold(sp,nclass=25)
 cat("Intensities: ", sum(ret$N_V)/25, "vs.",lam,"\n")

unfoldr documentation built on Sept. 25, 2021, 1:07 a.m.