Light within Water
LightMC.transfer! — Functiontransfer!(ed::Array{<:Float64,3},esol::Array{<:Float64,2},θ::Float64,ϕ::Float64,fres::Float64,ip::Int64,
xpb::Float64,ypb::Float64,zpb::Float64,area::Vector{Float64},interi::Vector{Int64},
interj::Vector{Int64},randrng,η::Array{<:Float64,2},ph::Array{<:Float64,1},
θps::Array{<:Float64,1},p::Param,mode=0::Int64)Doing the Monte Carlo Simulation.
Arguments
ed::Array{<:Float64,3}: Irradiance solution gridesol::Array{<:Float64,2}:θ::Float64: angle of the light ray relative to the z axis: polar angle.ϕ::Float64: angle of the light ray relative to the x axis: azimuthal angle.fres::Float64: fresnel coefficient or fractional transmission for unpolarized lightip::Int64: current photon's number being simulated (ie. ip ∈ {1, 2,..., nphoton})xpb::Float64: initial x coordination of the photon.ypb::Float64: initial y coordination of the photon.zpb::Float64: initial z coordination of the photon.area::Vector{Float64}: 4 values of the area inside a single grid where a photon lands corresponding to: 4 corners of the square grid.interi::Vector{Int64}: x coordination (grid number) of a single grid where a photon lands: from bottom left, bottom right, upper left, and upper right.interj::Vector{Int64}: y coordination (grid number) of a single grid where a photon lands: from bottom left, bottom right, upper left, and upper right.randrng: PRNGs (pseudorandom number generators) exported by the Random package.η::Array{<:Float64,2}: water surface elevation.ph::Array{<:Float64,1}: cumulation distribution of scattering angle (obtained fromphasePetzold())θps::Array{<:Float64,1}: angle between new trajectory and the direction of the photon before scattering corresponding to eachϕps(obtained fromphasePetzold())p::Param: simulation parameters.mode::Int64:
Another method
LightMC.transfer! — Functiontransfer!(ed1d::Array{<:Float64,1},edi::Array{<:Int64,1},edj::Array{<:Int64,1},
edk::Array{<:Int64,1},count::Array{<:Int64,1},esol::Array{<:Float64,2},θ::Float64,ϕ::Float64,fres::Float64,
ip::Int64,xpb::Float64,ypb::Float64,zpb::Float64,randrng,η::Array{<:Float64,2},
ph::Array{<:Float64,1},θps::Array{<:Float64,1},p::Param,mode=0::Int64)Doing the Monte Carlo Simulation.
Arguments
ed1d::Array{<:Float64,1}: fraction of irradiance that will be assigned to 4 corners of a grid where a photon landsedi::Array{<:Int64,1}: x coordination (grid number) of a single grid where a photon lands: from bottom left, bottom right, upper left, and upper right.edj::Array{<:Int64,1}: y coordination (grid number) of a single grid where a photon lands: from bottom left, bottom right, upper left, and upper right.edk::Array{<:Int64,1}: number of the energy layer that the photons travel, from the top ztop in 1 by 4 arraycount::Array{<:Int64,1}: dummy integer span from 1 to 4 to keep track of the size of the ed1d, edi, edj, edk.esol::Array{<:Float64,2}:θ::Float64: angle of the light ray relative to the z axis: polar angle.ϕ::Float64: angle of the light ray relative to the x axis: azimuthal angle.fres::Float64: fresnel coefficient or fractional transmission for unpolarized light.ip::Int64: current photon's number being simulated (ie. ip ∈ {1, 2,..., nphoton})xpb::Float64: initial x coordination of the photon.ypb::Float64: initial y coordination of the photon.zpb::Float64: initial z coordination of the photon.randrng: PRNGs (pseudorandom number generators) exported by the Random packageη::Array{<:Float64,2}: water surface elevation.ph::Array{<:Float64,1}: cumulation distribution of scattering angle (obtained fromphasePetzold())θps::Array{<:Float64,1}: angle between new trajectory and the direction of the photon before scattering corresponding to eachϕps(obtained fromphasePetzold())p::Param: simulation parameters.mode::Int64: