pyRadPlan 0.3.4__tar.gz → 0.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. {pyradplan-0.3.4 → pyradplan-0.3.5}/PKG-INFO +1 -1
  2. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_fredmc.py +0 -2
  3. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/_beam_modifier.py +100 -54
  4. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan.egg-info/PKG-INFO +1 -1
  5. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyproject.toml +1 -1
  6. {pyradplan-0.3.4 → pyradplan-0.3.5}/LICENSE +0 -0
  7. {pyradplan-0.3.4 → pyradplan-0.3.5}/README.md +0 -0
  8. {pyradplan-0.3.4 → pyradplan-0.3.5}/benchmark/bench_trace_cubes.py +0 -0
  9. {pyradplan-0.3.4 → pyradplan-0.3.5}/docs/conf.py +0 -0
  10. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/intro_minimal_photons.py +0 -0
  11. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/intro_minimal_protons.py +0 -0
  12. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/mc_fred.py +0 -0
  13. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_carbon.py +0 -0
  14. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_helium.py +0 -0
  15. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_photon.py +0 -0
  16. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_photon_forward.py +0 -0
  17. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_proton.py +0 -0
  18. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_proton_let.py +0 -0
  19. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/pencilbeam_vhee.py +0 -0
  20. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/proton_mimicking.py +0 -0
  21. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/raytracer_rad_depth.py +0 -0
  22. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/utils_matrad.py +0 -0
  23. {pyradplan-0.3.4 → pyradplan-0.3.5}/examples/utils_plotting.py +0 -0
  24. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/__init__.py +0 -0
  25. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/analysis/__init__.py +0 -0
  26. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/analysis/_dvh.py +0 -0
  27. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/__init__.py +0 -0
  28. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/_exceptions.py +0 -0
  29. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/_grids.py +0 -0
  30. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/datamodel.py +0 -0
  31. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/np2sitk.py +0 -0
  32. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/resample.py +0 -0
  33. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/xp_utils/__init__.py +0 -0
  34. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/xp_utils/compat.py +0 -0
  35. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/xp_utils/helpers.py +0 -0
  36. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/core/xp_utils/typing.py +0 -0
  37. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/cst/__init__.py +0 -0
  38. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/cst/_cst.py +0 -0
  39. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/cst/_voi.py +0 -0
  40. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/ct/__init__.py +0 -0
  41. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/ct/_ct.py +0 -0
  42. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/ct/_hlut.py +0 -0
  43. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/VHEE_Focused.mat +0 -0
  44. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/VHEE_Generic.mat +0 -0
  45. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/carbon_Generic.mat +0 -0
  46. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/helium_Generic.mat +0 -0
  47. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/photons_Generic.mat +0 -0
  48. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/machines/protons_Generic.mat +0 -0
  49. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/data/phantoms/TG119.mat +0 -0
  50. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dij/__init__.py +0 -0
  51. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dij/_compose_beam_dijs.py +0 -0
  52. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dij/_dij.py +0 -0
  53. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/__init__.py +0 -0
  54. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/_calc_dose.py +0 -0
  55. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/__init__.py +0 -0
  56. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_base.py +0 -0
  57. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_base_montecarlo.py +0 -0
  58. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_base_pencilbeam.py +0 -0
  59. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_base_pencilbeam_particle.py +0 -0
  60. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_factory.py +0 -0
  61. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_hongpb.py +0 -0
  62. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/_svdpb.py +0 -0
  63. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/dose/engines/kernels/_calc_geo_dists_kernel.py +0 -0
  64. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/geometry/__init__.py +0 -0
  65. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/geometry/lps.py +0 -0
  66. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/io/__init__.py +0 -0
  67. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/io/_matlab_file_handler.py +0 -0
  68. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/io/_patient_loader.py +0 -0
  69. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/io/matfile.py +0 -0
  70. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/__init__.py +0 -0
  71. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/_load.py +0 -0
  72. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/_validate.py +0 -0
  73. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/__init__.py +0 -0
  74. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/_base.py +0 -0
  75. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/_external_beam.py +0 -0
  76. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/_factory.py +0 -0
  77. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/base/_internal_beam.py +0 -0
  78. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/__init__.py +0 -0
  79. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_base.py +0 -0
  80. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_beam_cutoff.py +0 -0
  81. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_beam_emittance.py +0 -0
  82. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_beam_energy.py +0 -0
  83. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_beam_focus.py +0 -0
  84. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_ions.py +0 -0
  85. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/_vhee.py +0 -0
  86. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/kernel/__init__.py +0 -0
  87. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/kernel/_base.py +0 -0
  88. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/kernel/_ions.py +0 -0
  89. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/particles/kernel/_vhee.py +0 -0
  90. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/photons/__init__.py +0 -0
  91. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/photons/_base.py +0 -0
  92. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/photons/_calculate_machine_scale.py +0 -0
  93. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/photons/_linac.py +0 -0
  94. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/machines/photons/_svd_kernel.py +0 -0
  95. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/matRad/__init__.py +0 -0
  96. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/matRad/_engine.py +0 -0
  97. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/matRad/_matlab.py +0 -0
  98. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/matRad/_octave.py +0 -0
  99. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/__init__.py +0 -0
  100. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/_fluence_optimization.py +0 -0
  101. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/__init__.py +0 -0
  102. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_eud.py +0 -0
  103. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_factory.py +0 -0
  104. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_max_dvh.py +0 -0
  105. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_mean.py +0 -0
  106. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_min_dvh.py +0 -0
  107. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_objective.py +0 -0
  108. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_squared_dev.py +0 -0
  109. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_squared_mimicking.py +0 -0
  110. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_squared_over.py +0 -0
  111. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_squared_under.py +0 -0
  112. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/objectives/_std.py +0 -0
  113. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/problems/__init__.py +0 -0
  114. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/problems/_factory.py +0 -0
  115. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/problems/_nonlin_fluence.py +0 -0
  116. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/problems/_optiprob.py +0 -0
  117. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/problems/_simple_least_squares.py +0 -0
  118. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/solvers/__init__.py +0 -0
  119. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/solvers/_base_solvers.py +0 -0
  120. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/solvers/_factory.py +0 -0
  121. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/solvers/_ipopt.py +0 -0
  122. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/optimization/solvers/_scipy_solver.py +0 -0
  123. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/plan/__init__.py +0 -0
  124. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/plan/_plans.py +0 -0
  125. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/quantities/__init__.py +0 -0
  126. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/quantities/_base.py +0 -0
  127. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/quantities/_dose.py +0 -0
  128. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/quantities/_let_x_dose.py +0 -0
  129. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/raytracer/__init__.py +0 -0
  130. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/raytracer/_base.py +0 -0
  131. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/raytracer/_numba_perf.py +0 -0
  132. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/raytracer/_siddon.py +0 -0
  133. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/scenarios/__init__.py +0 -0
  134. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/scenarios/_base.py +0 -0
  135. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/scenarios/_nominal.py +0 -0
  136. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/__init__.py +0 -0
  137. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_beam.py +0 -0
  138. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_beamlet.py +0 -0
  139. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_exceptions.py +0 -0
  140. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_generate_stf.py +0 -0
  141. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_rangeshifter.py +0 -0
  142. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_ray.py +0 -0
  143. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/_steeringinformation.py +0 -0
  144. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/__init__.py +0 -0
  145. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_base.py +0 -0
  146. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_externalbeam.py +0 -0
  147. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_factory.py +0 -0
  148. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_ions.py +0 -0
  149. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_photons.py +0 -0
  150. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/stf/generators/_vhee.py +0 -0
  151. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/util/__init__.py +0 -0
  152. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/util/helpers.py +0 -0
  153. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/util/keyboard_listener.py +0 -0
  154. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/visualization/__init__.py +0 -0
  155. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/visualization/_plot_multiple_slices.py +0 -0
  156. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan/visualization/_plot_slice.py +0 -0
  157. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan.egg-info/SOURCES.txt +0 -0
  158. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan.egg-info/dependency_links.txt +0 -0
  159. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan.egg-info/requires.txt +0 -0
  160. {pyradplan-0.3.4 → pyradplan-0.3.5}/pyRadPlan.egg-info/top_level.txt +0 -0
  161. {pyradplan-0.3.4 → pyradplan-0.3.5}/setup.cfg +0 -0
  162. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/analysis/test_dvh.py +0 -0
  163. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/analysis/test_qi.py +0 -0
  164. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/compute/test_math_interp1d.py +0 -0
  165. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/compute/test_math_quantile.py +0 -0
  166. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/compute/test_namespace_conversion.py +0 -0
  167. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/conftest.py +0 -0
  168. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/core/test_coordinates.py +0 -0
  169. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/core/test_datamodel.py +0 -0
  170. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/core/test_np2sitk.py +0 -0
  171. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/core/test_resample.py +0 -0
  172. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/cst/conftest.py +0 -0
  173. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/cst/test_VOI.py +0 -0
  174. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/cst/test_cst.py +0 -0
  175. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/ct/test_ct.py +0 -0
  176. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/ct/test_hlut.py +0 -0
  177. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/data/test_validate_test_data.py +0 -0
  178. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/conftest.py +0 -0
  179. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_base_pencilbeam.py +0 -0
  180. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_dose_engine_base.py +0 -0
  181. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_factory.py +0 -0
  182. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_fred.py +0 -0
  183. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_hongpb.py +0 -0
  184. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_pb_geodist.py +0 -0
  185. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/dose/test_svdpb.py +0 -0
  186. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/geometry/test_lps.py +0 -0
  187. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/machines/test_beam_modifiers.py +0 -0
  188. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_fluence_optiprob.py +0 -0
  189. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_ipopt_solver.py +0 -0
  190. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_objectives.py +0 -0
  191. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_problem_factory.py +0 -0
  192. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_scipy_solver.py +0 -0
  193. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/optimization/test_solver_factory.py +0 -0
  194. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/quantities/test_dose_quantity.py +0 -0
  195. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/quantities/test_let_dose_quantity.py +0 -0
  196. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/stf/test_beamlet.py +0 -0
  197. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/stf/test_stf.py +0 -0
  198. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/stf/test_stf_gen.py +0 -0
  199. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_dij.py +0 -0
  200. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_fileHandling.py +0 -0
  201. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_grid.py +0 -0
  202. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_helpers.py +0 -0
  203. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_machine_model.py +0 -0
  204. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_matlabEngine.py +0 -0
  205. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_octaveEngine.py +0 -0
  206. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_plan.py +0 -0
  207. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_raytracersiddon.py +0 -0
  208. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/test_scenarios.py +0 -0
  209. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/visualization/test_plot_multiple_slices.py +0 -0
  210. {pyradplan-0.3.4 → pyradplan-0.3.5}/test/visualization/test_plot_slice.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyRadPlan
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: A python interface and reimplementation to matRad
5
5
  Author-email: Niklas Wahl <n.wahl@dkfz-heidelberg.de>, Tobias Becher <t.becher@dkfz-heidelberg.de>, Lina Bucher <lina.bucher@dkfz-heidelberg.de>, Louis Ermeneux <louis.ermeneux@gmail.com>, Antonios Kontopoulos <antonios.kontopoulos@dkfz-heidelberg.de>, Julius Laub <julius.laub@dkfz-heidelberg.de>, Florian Leininger <florian.leininger@dkfz-heidelberg.de>, Tim Ortkamp <tim.ortkamp@kit.edu>, Victoria Santiago Aguilar <victoria.santiagoaguilar@dkfz-heidelberg.de>, Goran Stanic <goran.stanic@dkfz-heidelberg.de>, Samir Schulz <samirshivaji.schulz@dkfz-heidelberg.de>, Wilfrid Wangon Zekou <wangonwil@gmail.com>, Jennifer Josephine Hardt <jennifer.hardt@dkfz-heidelberg.de>
6
6
  Maintainer-email: Niklas Wahl <n.wahl@dkfz-heidelberg.de>, Florian Leininger <florian.leininger@dkfz-heidelberg.de>, Tobias Becher <t.becher@dkfz-heidelberg.de>, Tim Ortkamp <tim.ortkamp@kit.edu>
@@ -956,8 +956,6 @@ class ParticleFredMCEngine(MonteCarloEngineAbstract):
956
956
  return dij
957
957
 
958
958
  def _check_saving_options(self) -> None:
959
- if self._save_input is None and self._save_output is None:
960
- return
961
959
  if self._save_input is not None:
962
960
  if not os.path.isdir(self._save_input):
963
961
  raise ValueError(
@@ -17,6 +17,15 @@ import numpy as np
17
17
  from pyRadPlan.core import PyRadPlanBaseModel
18
18
 
19
19
 
20
+ def _smooth_step(coord: NDArray, edge: float, dx: float) -> NDArray:
21
+ """Linear ramp centred on *edge* with transition width *dx*.
22
+
23
+ Returns 0 for ``coord <= edge - dx/2``, 1 for ``coord >= edge + dx/2``,
24
+ and a linear interpolation in between
25
+ """
26
+ return np.clip((coord - edge) / dx + 0.5, 0.0, 1.0)
27
+
28
+
20
29
  class BeamLimitingDevice(PyRadPlanBaseModel):
21
30
  """Base class for beam limiting device objects.
22
31
 
@@ -165,58 +174,77 @@ class MLC(BeamLimitingDevice):
165
174
  def calculate_transmission_mask(
166
175
  self, spacing: Union[float, tuple[NDArray, NDArray]]
167
176
  ) -> NDArray:
168
- """Calculate transmission mask from leaf boundaries and positions."""
169
-
170
- if (self.leaf_position_boundaries is not None) and (self.leaf_positions is not None):
171
- boundaries_max = np.abs(self.leaf_position_boundaries).max()
172
- positions_max = np.abs(self.leaf_positions).max()
173
- half_size = max(boundaries_max, positions_max)
174
- if isinstance(spacing, float):
175
- n = int(np.ceil(2 * half_size / spacing))
176
- # enforce odd mask width, so 0 is centered
177
- if n % 2 == 0:
178
- n += 1
179
- spacing_vector = np.linspace(-half_size, half_size, n)
180
- grid_x, grid_y = np.meshgrid(spacing_vector, spacing_vector, indexing="xy")
181
- elif isinstance(spacing, tuple) and spacing[0].ndim == 1 and spacing[1].ndim == 1:
182
- grid_x, grid_y = np.meshgrid(spacing[0], spacing[1], indexing="xy")
183
- elif isinstance(spacing, tuple) and spacing[0].ndim == 2 and spacing[1].ndim == 2:
184
- grid_x, grid_y = spacing[0], spacing[1]
177
+ """Calculate transmission mask with smooth edge weighting.
178
+
179
+ Each leaf opening contributes a coverage fraction computed from the
180
+ product of two smooth step functions per axis. The transition width
181
+ equals one grid-cell width so values at the edge receive 0.5
182
+ transmission, with a linear ramp over +/- 1/2 cell on either side.
183
+ """
184
+ if (self.leaf_position_boundaries is None) or (self.leaf_positions is None):
185
+ return None
186
+
187
+ boundaries_max = np.abs(self.leaf_position_boundaries).max()
188
+ positions_max = np.abs(self.leaf_positions).max()
189
+ half_size = max(boundaries_max, positions_max)
190
+
191
+ if isinstance(spacing, float):
192
+ n = int(np.ceil(2 * half_size / spacing))
193
+ if n % 2 == 0:
194
+ n += 1
195
+ spacing_vector = np.linspace(-half_size, half_size, n)
196
+ grid_x, grid_y = np.meshgrid(spacing_vector, spacing_vector, indexing="xy")
197
+ dx_x = spacing
198
+ dx_y = spacing
199
+ elif isinstance(spacing, tuple) and spacing[0].ndim == 1 and spacing[1].ndim == 1:
200
+ grid_x, grid_y = np.meshgrid(spacing[0], spacing[1], indexing="xy")
201
+ dx_x = float(np.diff(spacing[0]).min())
202
+ dx_y = float(np.diff(spacing[1]).min())
203
+ elif isinstance(spacing, tuple) and spacing[0].ndim == 2 and spacing[1].ndim == 2:
204
+ grid_x, grid_y = spacing[0], spacing[1]
205
+ dx_x = float(np.diff(grid_x[0, :]).min())
206
+ dx_y = float(np.diff(grid_y[:, 0]).min())
207
+ else:
208
+ raise ValueError(
209
+ "Spacing must be either a float or a tuple of two 1D or two 2D arrays"
210
+ )
211
+
212
+ mask = np.full_like(grid_x, self.leaf_leakage, dtype=np.float32)
213
+ open_weight = 1.0 - self.leaf_leakage
214
+
215
+ for i in range(len(self.leaf_position_boundaries)):
216
+ b_start = self.leaf_position_boundaries[i]
217
+ b_end = b_start + self.leaf_width
218
+ o_start = self.leaf_positions[i, 0]
219
+ o_end = self.leaf_positions[i, 1]
220
+
221
+ if o_end <= o_start:
222
+ # Fully closed leaf — skip entirely
223
+ continue
224
+
225
+ if self.device_orientation == "X":
226
+ # boundary runs along Y axis, opening runs along X axis
227
+ cov_boundary = _smooth_step(grid_y, b_start, dx_y) * (
228
+ 1.0 - _smooth_step(grid_y, b_end, dx_y)
229
+ )
230
+ cov_opening = _smooth_step(grid_x, o_start, dx_x) * (
231
+ 1.0 - _smooth_step(grid_x, o_end, dx_x)
232
+ )
233
+ elif self.device_orientation == "Y":
234
+ # boundary runs along X axis, opening runs along Y axis
235
+ cov_boundary = _smooth_step(grid_x, b_start, dx_x) * (
236
+ 1.0 - _smooth_step(grid_x, b_end, dx_x)
237
+ )
238
+ cov_opening = _smooth_step(grid_y, o_start, dx_y) * (
239
+ 1.0 - _smooth_step(grid_y, o_end, dx_y)
240
+ )
185
241
  else:
186
242
  raise ValueError(
187
- "Spacing must be either a float or a tuple of two 1D or two 2D arrays"
243
+ f"Device orientation {self.device_orientation} not recognized. Must be 'X' or 'Y'."
188
244
  )
245
+ mask += open_weight * cov_boundary * cov_opening
189
246
 
190
- mask = np.full_like(grid_x, self.leaf_leakage, dtype=np.float32)
191
-
192
- for i in range(len(self.leaf_position_boundaries)):
193
- leaf_boundary_start = self.leaf_position_boundaries[i]
194
- leaf_boundary_end = leaf_boundary_start + self.leaf_width
195
- if i + 1 < len(self.leaf_position_boundaries):
196
- assert np.isclose(leaf_boundary_end, self.leaf_position_boundaries[i + 1])
197
- leaf_opening_start = self.leaf_positions[i, 0]
198
- leaf_opening_end = self.leaf_positions[i, 1]
199
-
200
- if self.device_orientation == "X":
201
- leaf_mask = (
202
- (grid_y >= leaf_boundary_start)
203
- & (grid_y < leaf_boundary_end)
204
- & (grid_x >= leaf_opening_start)
205
- & (grid_x < leaf_opening_end)
206
- )
207
- elif self.device_orientation == "Y":
208
- leaf_mask = (
209
- (grid_x >= leaf_boundary_start)
210
- & (grid_x < leaf_boundary_end)
211
- & (grid_y >= leaf_opening_start)
212
- & (grid_y < leaf_opening_end)
213
- )
214
- else:
215
- raise ValueError(
216
- f"Device orientation {self.device_orientation} not recognized. Must be 'X' or 'Y'."
217
- )
218
- mask[leaf_mask] = 1
219
- return mask
247
+ return mask
220
248
 
221
249
 
222
250
  class Jaw(BeamLimitingDevice):
@@ -289,31 +317,49 @@ class Jaw(BeamLimitingDevice):
289
317
  def calculate_transmission_mask(
290
318
  self, spacing: Union[float, tuple[NDArray, NDArray]]
291
319
  ) -> NDArray:
320
+ """Calculate transmission mask with smooth edge weighting.
321
+
322
+ The jaw opening contributes a coverage fraction computed from smooth
323
+ step functions at each jaw edge. The transition width equals one
324
+ grid-cell width, giving 0.5 transmission exactly at the edge and a
325
+ linear ramp over +/- 1/2 cell on either side.
326
+ """
292
327
  if isinstance(spacing, float):
293
328
  n = int(np.ceil(self.field_width / spacing))
294
- # enforce odd mask width, so 0 is centered
295
329
  if n % 2 == 0:
296
330
  n += 1
297
331
  spacing_vector = np.linspace(-self.field_width / 2, self.field_width / 2, n)
298
332
  grid_x, grid_y = np.meshgrid(spacing_vector, spacing_vector, indexing="xy")
333
+ dx_x = spacing
334
+ dx_y = spacing
299
335
  elif isinstance(spacing, tuple) and spacing[0].ndim == 1 and spacing[1].ndim == 1:
300
336
  grid_x, grid_y = np.meshgrid(spacing[0], spacing[1], indexing="xy")
337
+ dx_x = float(np.diff(spacing[0]).min())
338
+ dx_y = float(np.diff(spacing[1]).min())
301
339
  elif isinstance(spacing, tuple) and spacing[0].ndim == 2 and spacing[1].ndim == 2:
302
340
  grid_x, grid_y = spacing[0], spacing[1]
303
-
304
- mask = np.full_like(grid_x, self.leakage, dtype=np.float32)
341
+ dx_x = float(np.diff(grid_x[0, :]).min())
342
+ dx_y = float(np.diff(grid_y[:, 0]).min())
343
+ else:
344
+ raise ValueError(
345
+ "Spacing must be either a float or a tuple of two 1D or two 2D arrays"
346
+ )
305
347
 
306
348
  if self.device_orientation == "X":
307
- jaw_mask = (grid_x >= self.positions[0]) & (grid_x < self.positions[1])
349
+ cov = _smooth_step(grid_x, self.positions[0], dx_x) * (
350
+ 1.0 - _smooth_step(grid_x, self.positions[1], dx_x)
351
+ )
308
352
  elif self.device_orientation == "Y":
309
- jaw_mask = (grid_y >= self.positions[0]) & (grid_y < self.positions[1])
353
+ cov = _smooth_step(grid_y, self.positions[0], dx_y) * (
354
+ 1.0 - _smooth_step(grid_y, self.positions[1], dx_y)
355
+ )
310
356
  else:
311
357
  raise ValueError(
312
358
  f"Device orientation '{self.device_orientation}' not recognized. "
313
359
  "Must be 'X' or 'Y'."
314
360
  )
315
- mask[jaw_mask] = 1
316
361
 
362
+ mask = (self.leakage + (1.0 - self.leakage) * cov).astype(np.float32)
317
363
  return mask
318
364
 
319
365
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyRadPlan
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: A python interface and reimplementation to matRad
5
5
  Author-email: Niklas Wahl <n.wahl@dkfz-heidelberg.de>, Tobias Becher <t.becher@dkfz-heidelberg.de>, Lina Bucher <lina.bucher@dkfz-heidelberg.de>, Louis Ermeneux <louis.ermeneux@gmail.com>, Antonios Kontopoulos <antonios.kontopoulos@dkfz-heidelberg.de>, Julius Laub <julius.laub@dkfz-heidelberg.de>, Florian Leininger <florian.leininger@dkfz-heidelberg.de>, Tim Ortkamp <tim.ortkamp@kit.edu>, Victoria Santiago Aguilar <victoria.santiagoaguilar@dkfz-heidelberg.de>, Goran Stanic <goran.stanic@dkfz-heidelberg.de>, Samir Schulz <samirshivaji.schulz@dkfz-heidelberg.de>, Wilfrid Wangon Zekou <wangonwil@gmail.com>, Jennifer Josephine Hardt <jennifer.hardt@dkfz-heidelberg.de>
6
6
  Maintainer-email: Niklas Wahl <n.wahl@dkfz-heidelberg.de>, Florian Leininger <florian.leininger@dkfz-heidelberg.de>, Tobias Becher <t.becher@dkfz-heidelberg.de>, Tim Ortkamp <tim.ortkamp@kit.edu>
@@ -10,7 +10,7 @@ pyRadPlan = ["data/**/*"]
10
10
 
11
11
  [project]
12
12
  name = "pyRadPlan"
13
- version = "0.3.4"
13
+ version = "0.3.5"
14
14
  # dynamic = ["version"] # Will be used in the future
15
15
  authors = [
16
16
  { name="Niklas Wahl", email = "n.wahl@dkfz-heidelberg.de"},
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes