Skip to content

PLEnuM-group/PhotonPropagation.jl

Repository files navigation

PhotonPropagation

Stable Dev Build Status Coverage

CUDA-accelerated Monte-Carlo simulation of photon transport in homogeneous media.

Installation

This package is registered in the PLEnuM julia package registry. In order to use this registry run:

using Pkg
pkg"registry add https://github.com/PLEnuM-group/julia-registry"

Then install the package:

using Pkg
pkg"add PhotonPropagation"

Example

using PhotonPropagation
using StaticArrays
using PhysicsTools
using CUDA


# Target Shape
module_position = SA[0., 0., 10.]
module_radius = 0.3
active_area = 16 * π * (0.0762)^2
shape = Spherical(module_position, module_radius)

# convert to Float32 for fast computation on gpu
shape = convert(Spherical{Float32}, shape)

# Setup target
target = HomogeneousDetector(shape, active_area, UInt16(1))

# Setup source
position = SA_F32[0., 0., 0.]
source = PointlikeIsotropicEmitter(position, 0f0, 100000)

# Setup medium
mean_sca_angle = 0.99f0
medium = make_cascadia_medium_properties(mean_sca_angle)

# Setup spectrum
spectrum = Monochromatic(450f0)

seed = 1

# Setup propagation
setup = PhotonPropSetup([source], [target], medium, spectrum, seed)

# Run propagation
photons = propagate_photons(setup)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published