mirror of
https://github.com/pim-n/pg-rad
synced 2026-03-11 19:58:11 +01:00
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
import numpy as np
|
|
|
|
|
|
def phi_single_source(
|
|
r: float,
|
|
activity: float | int,
|
|
branching_ratio: float,
|
|
mu_mass_air: float,
|
|
air_density: float,
|
|
) -> float:
|
|
"""Compute the contribution of a single point source to the
|
|
primary photon fluence rate phi at position (x,y,z).
|
|
|
|
Args:
|
|
r (float): [m] Distance to the point source.
|
|
activity (float | int): [Bq] Activity of the point source.
|
|
branching_ratio (float): Branching ratio for the photon energy E_gamma.
|
|
mu_mass_air (float): [cm^2/g] Mass attenuation coefficient for air.
|
|
air_density (float): [kg/m^3] Air density.
|
|
|
|
Returns:
|
|
phi (float): [s^-1 m^-2] Primary photon fluence rate at distance r from
|
|
a point source.
|
|
"""
|
|
|
|
# Linear photon attenuation coefficient in m^-1.
|
|
mu_mass_air *= 0.1
|
|
mu_air = 0.1 * mu_mass_air * air_density
|
|
|
|
phi = (
|
|
activity
|
|
* branching_ratio
|
|
* np.exp(-mu_air * r)
|
|
/ (4 * np.pi * r**2)
|
|
)
|
|
|
|
return phi
|