coefficientMatrixSpheroids: Coefficients for trivariate unfolding

Description Usage Arguments Details Value Author(s) Examples

View source: R/spheroid.R

Description

Compute coefficients of the discretized integral equation for unfolding

Usage

1
2
3
4
5
6
coefficientMatrixSpheroids(
  breaks,
  stype = c("prolate", "oblate"),
  check = TRUE,
  nCores = getOption("par.unfoldr", 1)
)

Arguments

breaks

list of bin vectors, see setbreaks

stype

type of spheroid, either "prolate" or "oblate"

check

logical, whether to run some input checks

nCores

number of cpu cores used to compute the coefficients

Details

In order to apply the Expectation Maximization (EM) algorithm to the stereological unfolding procedure for the joint size-shape-orientation distribution in 3D one first has to compute the coefficients of a discretized integral equation. This step is the most time consuming part of unfolding and therefore has been separated in its own function and can be called separately if needed. The number of bin classes for the size, shape and orientation do not need to be the same, but the given class limits are also used for binning the spatial values. One can define the number of cpu cores by the global option par.unfoldr or passing the number of cores nCores directly to the function.

Value

numeric 6D array of coefficients

Author(s)

M. Baaske

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
## Comment: Set breaks vector and compute the coefficient matrix 
## for spheroid unfolding
	
options(par.unfoldr=2L)
breaks <- setbreaks(c(6,5,6),maxSize=0.37,kap=1.25)
breaks

P <- coefficientMatrixSpheroids(breaks,check=FALSE)
c(min(P),max(P),sum(P))


## End(Not run)

Example output

$size
[1] 0.00000000 0.06166667 0.12333333 0.18500000 0.24666667 0.30833333 0.37000000

$angle
[1] 0.0000000 0.3141593 0.6283185 0.9424778 1.2566371 1.5707963

$shape
[1] 0.0000000 0.1064905 0.2532786 0.4204482 0.6024013 0.7962023 1.0000000

[1]   0.000000   1.489347 140.678924

unfoldr documentation built on Sept. 25, 2021, 3:01 a.m.