Skip to content

Commit 6d3c8e1

Browse files
committed
Update RAM to be able to run it on VIP EGI grid
Output in log file Do not download the test data, use the data available in the package Use python 3.12 because pymedphys cannot be used with python >= 3.13
1 parent 3c4573d commit 6d3c8e1

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

opengate/tests/src/advanced_tests/linacs/Dockerfile_opengate_vip

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ MAINTAINER Thomas Baudier <thomas.baudier@creatis.insa-lyon.fr>
1313
RUN yum install -y wget \
1414
&& /opt/python/cp312-cp312/bin/pip install opengate \
1515
&& export PATH=/opt/python/cp312-cp312/bin:$PATH \
16-
&& opengate_tests \
16+
&& opengate_info \
1717
&& cd /opt/python/cp312-cp312/lib/python3.12/site-packages/opengate/tests/src/advanced_tests/linacs/ \
1818
&& wget http://www.creatis.insa-lyon.fr/~baudier/data_advanced_test_linac.zip \
1919
&& unzip data_advanced_test_linac.zip \
2020
&& rm -f data_advanced_test_linac.zip \
2121
&& mkdir output \
22-
&& pip install "pymedphys[tests]==0.41.0"
22+
&& /opt/python/cp312-cp312/bin/pip install "pymedphys[tests]==0.41.0"
2323

2424
# docker commit <container_name>
25-
# docker tag <image_id> tbaudier/opengate_vip:0.1.0
26-
# docker run --rm tbaudier/opengate_vip:0.1.0 /opt/python/cp312-cp312/lib/python3.12/site-packages/opengate/tests/src/advanced_tests/linacs/run_linac_test.sh
27-
25+
# docker tag <image_id> tbaudier/opengate_vip:0.1.1
26+
# docker run --rm tbaudier/opengate_vip:0.1.1 /opt/python/cp312-cp312/lib/python3.12/site-packages/opengate/tests/src/advanced_tests/linacs/run_linac_test.sh

opengate/tests/src/advanced_tests/linacs/comparison_deposited_dose_mc_tps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import os
55
from pathlib import Path
6+
67
import click
78
import itk
89
import matplotlib.colors as mcolors
@@ -192,7 +193,7 @@ def gamma_index_comparison(path, path_output):
192193
"max_gamma": 1.5,
193194
"random_subset": None,
194195
"local_gamma": True,
195-
"ram_available": 40 * 2**29, # 40 * 1/2 GB
196+
"ram_available": 7 * 2**30, # < 8 GB
196197
"interp_algo": "scipy",
197198
}
198199

opengate/tests/src/advanced_tests/linacs/run_linac_test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ cd /opt/python/cp312-cp312/lib/python3.12/site-packages/opengate/tests/src/advan
44
export PATH=/opt/python/cp312-cp312/bin:$PATH
55
python run_vmat_mc.py --json_name data_advanced_test_linac/header.json
66
python normalize_dose.py --path data_advanced_test_linac
7-
python comparison_deposited_dose_mc_tps.py --path data_advanced_test_linac --path_output output
8-
7+
python comparison_deposited_dose_mc_tps.py --path data_advanced_test_linac --path_output output > output/output.log 2>&1

opengate/tests/src/advanced_tests/linacs/vmat_mc_helpers.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import itk
2+
import numpy as np
3+
14
import opengate as gate
2-
from opengate.tests import utility
3-
from opengate.contrib.linacs import elektaversa as versa
5+
from opengate import utility as ut
46
from opengate.contrib.linacs import dicomrtplan as rtplan
5-
import numpy as np
6-
import itk
7+
from opengate.contrib.linacs import elektaversa as versa
8+
from opengate.tests import utility
79

810

911
def information_img_patient(path_img=None, open_img=True, img=None):
@@ -90,8 +92,8 @@ def add_patient_image(
9092
patient.image = path_image + img
9193
patient.mother = name
9294
patient.material = "G4_AIR" # material used by default
93-
f1 = paths.data / "Schneider2000MaterialsTable.txt"
94-
f2 = paths.data / "Schneider2000DensitiesTable.txt"
95+
f1 = ut.get_data_folder() / "Schneider2000MaterialsTable.txt"
96+
f2 = ut.get_data_folder() / "Schneider2000DensitiesTable.txt"
9597
tol = 0.05 * gcm3
9698
patient.voxel_materials, materials = (
9799
gate.geometry.materials.HounsfieldUnit_to_material(sim, tol, f1, f2)

0 commit comments

Comments
 (0)