Skip to content

Commit

Permalink
Correction of a bug in test019 when trying to use a number of MU equa…
Browse files Browse the repository at this point in the history
…l to 0
  • Loading branch information
majacquet committed Jul 5, 2024
1 parent ec6dcc3 commit 75d510e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,15 @@ def validation_test_19_rt_plan(
nb_part = 750000
z_linac = linac.size[2]
rt_plan_parameters = rtplan.read(str(paths.data / "DICOM_RT_plan.dcm"))
l_cp = [np.random.randint(0, len(rt_plan_parameters["jaws 1"]), 1)[0]]
MU = 0
while MU == 0:
l_cp = [np.random.randint(0, len(rt_plan_parameters["jaws 1"]), 1)[0]]
MU = rt_plan_parameters["weight"][l_cp[0]]
nb_part = nb_part / MU
versa.set_linac_head_motion(
sim, linac.name, jaws, mlc, rt_plan_parameters, sad=sad, cp_id=l_cp
)
MU = rt_plan_parameters["weight"][l_cp[0]]
nb_part = nb_part / MU


if sim.visu:
add_alpha_source(sim, linac.name, z_linac / 2 - 5.6 * mm, 10)
Expand Down

0 comments on commit 75d510e

Please sign in to comment.