Setup {MCBackscattering}R Documentation

Initial Configuration of MCBS Class

Description

This function performs the basic configuration of Monte Carlo Backscattering (MCBS) class. It calculates specular reflection, transport albedo, critical angle and similar parameters.

Usage

Setup(myObject)

Arguments

myObject

The mandatory parameter of this function is the MCBS class created by MCBS constructor function.

Details

The function Setup, alias Setup.MCBS, performs the initial calculation of essential parameters for computation. Additionally, computes the maximum expected trajectory length and prepares the launch position of all photons with random polar coordinates within circular beam.

Value

The Setup function returns an MCBS object as class. Typically the same object is used in argument and result. The new parameters calculated in Setup are:

albedo

transport albedo

rs

specular reflection

cangle

cosine value of critical angle

MAXLEN

maximum expected length of photon trajectory. This length depends on the albedo and limiting energy.

There are additional containers for random launch position of photons. Launch position is given with polar coordinates (radius, angle).

Note

Please note that this function is designed to be used in Simulation function. You may use it separately in case you design your own procedure.

See Also

MCBS for construction of object with initial input parameters. Simulation for running the simulation with adjusted parameters. Chart for plot of calculated photon flux profile. Export for export of photon flux with corresponding radii. Launch for start position of single photon and initial direction in media. Randomize for adjustment of random trajectory vectors.

Examples

## Apple simulation data according to Qin and Lu (2006).
## DOI: 10.13031/2013.20862

# create object
cfgMedia <- c(0.63,30,0,1.4)
cfgSimulation <- c(1e6,0.05,1e-9,3,0.012)
apple <- MCBS(cfgMedia,cfgSimulation)

apple <- Setup(apple)
# transport albedo
apple$albedo
# specular reflection
apple$rs

[Package MCBackscattering version 0.1.1 Index]