EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
eb_tests.volume_correction.test Namespace Reference

Functions

 approx_equal (a, b, eps=0.001)
 read_vols (phant, inp_name)
 compare_results (egslst, inp_name)

Variables

str EGSINP = "vc.egsinp"
int TIME_LIMIT_S_PER_MHZ = 1 / 2993.
dict expected_volumes

Detailed Description

A test of the egs_brachy Monte Carlo volume correction routines.  The volume of
phantom voxels overlapped by sources and other phantoms are calculated by
egs_brachy and compared with analytical values.

Function Documentation

◆ approx_equal()

eb_tests.volume_correction.test.approx_equal ( a,
b,
eps = 0.001 )

Definition at line 28 of file test.py.

◆ compare_results()

eb_tests.volume_correction.test.compare_results ( egslst,
inp_name )

Definition at line 50 of file test.py.

◆ read_vols()

eb_tests.volume_correction.test.read_vols ( phant,
inp_name )
Read voxel values for the phanton named 'phant' and
return the region volumes for that phantom

Definition at line 33 of file test.py.

Variable Documentation

◆ EGSINP

str eb_tests.volume_correction.test.EGSINP = "vc.egsinp"

Definition at line 13 of file test.py.

◆ expected_volumes

dict eb_tests.volume_correction.test.expected_volumes
Initial value:
1= {
2 "source_volume": 4/3.*math.pi*0.1**3,
3 "bounding_shape_volume": 4/3.*math.pi*0.11**3,
4 "extra_bounding_shape_vol": 8**3,
5 "box_reg_0": 10**3 - 6**3,
6 "phantom_reg_0": 6*6*3 - 0.5*(4./3*math.pi*1**3),
7 "phantom_reg_1": 6*6*3 - 0.5*(4./3*math.pi*1**3),
8 "sph_phantom_reg_0": 4/3.*math.pi*(0.3**3 - 0.1**3),
9 "sph_phantom_reg_1": 4./3*math.pi*(1**3 - 0.3**3)
10}

Definition at line 16 of file test.py.

◆ TIME_LIMIT_S_PER_MHZ

int eb_tests.volume_correction.test.TIME_LIMIT_S_PER_MHZ = 1 / 2993.

Definition at line 14 of file test.py.