Export {MCBackscattering}R Documentation

Export Simulation Result

Description

This function exports simulation results in table format. It can be used to save results into file or make customized charts.

Usage

Export(myObject)

Arguments

myObject

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

Details

The Export function, alias Export.MCBS, provides a table with column names. Results of Monte Carlo simulation computed by the Simulation function are given as data.frame. The radii are automatically calculated according to the spatial resolution.

Value

Results are provided as data.frame in table format. Two columns represent radii and photon flux.

Radius

radius of concentric rings, where photon flux is calculated. Starts with incident point at radius of zero (r=0). The unit is cm.

Flux

calculated photon flux, 1/cm^2

See Also

MCBS for construction of object with initial input parameters. Setup for initial computation of specular reflection and transport albedo. Simulation for running the simulation with adjusted parameters. print show adjusted parameters and total backscattered reflection. Chart for plot of calculated photon flux profile.

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)
# the 100 low number of photons is only for demonstration
cfgSimulation <- c(100,0.05,1e-9,3,0.1)
apple <- MCBS(cfgMedia,cfgSimulation)
apple <- Simulation(apple)

# show photon flux near incident point
tbl <- Export(apple)
tbl[1:3,]

# save results into file
write.table(Export(apple),tempfile("apple",fileext=".dat"))

[Package MCBackscattering version 0.1.1 Index]