Skip to content

Commit

Permalink
Merged in bugfix/RAM-3068_halcyon_mlc_config (pull request #294)
Browse files Browse the repository at this point in the history
RAM-3068 Fix Halycon MLC config

Approved-by: Randy Taylor
  • Loading branch information
jrkerns committed Nov 10, 2023
2 parents 94c70e6 + 6d45ced commit cdd8dd6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ Planar Imaging
ROIs. This result will also be included in the ``results_data`` structure.
This is not done for light/rad phantoms.

Picket Fence
^^^^^^^^^^^^

* The Halcyon MLC configurations were incorrect and have now been fixed. Thanks to Dominic Rafferty for
pointing this out. Previously, it was using a similar configuration as the TrueBeam out of lack of experience
with the system. The new configuration was based on `this paper <https://aapm.onlinelibrary.wiley.com/doi/pdf/10.1002/acm2.12568>`__.

Winston-Lutz
^^^^^^^^^^^^

Expand Down
6 changes: 4 additions & 2 deletions pylinac/picketfence.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ class MLC(enum.Enum):
"name": "MLCi",
"arrangement": MLCArrangement([(40, 10)]),
} #:
# Halcyon reference
# https://aapm.onlinelibrary.wiley.com/doi/pdf/10.1002/acm2.12568
HALCYON_DISTAL = {
"name": "Halcyon distal",
"arrangement": MLCArrangement([(60, 5)], offset=2.5),
"arrangement": MLCArrangement([(28, 10)]),
} #:
HALCYON_PROXIMAL = {
"name": "Halcyon proximal",
"arrangement": MLCArrangement([(60, 5)]),
"arrangement": MLCArrangement([(29, 10)]),
} #:


Expand Down
18 changes: 17 additions & 1 deletion tests_basic/test_picketfence.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_custom_MLC_arrangement(self):
def test_all_mlc_arrangements(self):
"""This isn't really testing the MLCs so much as a constancy check to ensure they haven't changed."""
path = get_file_from_cloud_test_repo([TEST_DIR, "AS500_PF.dcm"])
expected_max_error = [0.13, 0.18, 0.16, 0.14, 0.06, 0.14, 0.14]
expected_max_error = [0.13, 0.18, 0.16, 0.14, 0.06, 0.06, 0.06]
for max_error, mlc in zip(expected_max_error, MLC):
pf = PicketFence(path, mlc=mlc)
pf.analyze()
Expand Down Expand Up @@ -809,6 +809,22 @@ class ChicagoError(PFTestMixin, TestCase):
max_error = 0.3


class HalcyonProximal(PFTestMixin, TestCase):
file_name = "Distal - DoRa - Really proximal.dcm"
mlc = "Halcyon proximal"
max_error = 0.13
num_pickets = 6
mean_picket_spacing = 50


class HalcyonDistal(PFTestMixin, TestCase):
file_name = "Proximal - DoRa - Really distal.dcm"
mlc = "Halcyon distal"
max_error = 0.13
num_pickets = 6
mean_picket_spacing = 50


@skip
class CharlestonRA(PFTestMixin, TestCase):
file_name = ["Charleston", "TB1", "July2016", "RA.dcm"]
Expand Down

0 comments on commit cdd8dd6

Please sign in to comment.