From 7638470d08f88dedf7e78d807364c6d283f82b12 Mon Sep 17 00:00:00 2001 From: James Kerns Date: Thu, 9 Nov 2023 12:36:16 -0600 Subject: [PATCH 1/2] fix Halycon MLC config --- docs/source/changelog.rst | 7 +++++++ pylinac/picketfence.py | 6 ++++-- tests_basic/test_picketfence.py | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 045df158..cb53e4d5 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -22,6 +22,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 `__. + Winston-Lutz ^^^^^^^^^^^^ diff --git a/pylinac/picketfence.py b/pylinac/picketfence.py index 2f5f20e4..69d19bed 100644 --- a/pylinac/picketfence.py +++ b/pylinac/picketfence.py @@ -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)]), } #: diff --git a/tests_basic/test_picketfence.py b/tests_basic/test_picketfence.py index c9e7cc91..b499c4bd 100644 --- a/tests_basic/test_picketfence.py +++ b/tests_basic/test_picketfence.py @@ -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"] From 6d45cedf6d046fc93bc744007873cd0adb4979b1 Mon Sep 17 00:00:00 2001 From: James Kerns Date: Thu, 9 Nov 2023 13:42:45 -0600 Subject: [PATCH 2/2] fix test --- tests_basic/test_picketfence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_basic/test_picketfence.py b/tests_basic/test_picketfence.py index b499c4bd..dbbd180f 100644 --- a/tests_basic/test_picketfence.py +++ b/tests_basic/test_picketfence.py @@ -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()