Skip to content

Commit

Permalink
Merged in bugfix/RAM-3508_hdmlc (pull request #379)
Browse files Browse the repository at this point in the history
RAM-3508 Fix HD MLC arrangement definition

Approved-by: Randy Taylor
  • Loading branch information
jrkerns committed Apr 23, 2024
2 parents ad5ac1c + b185489 commit d388884
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
12 changes: 12 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
Changelog
=========

v 3.23.0
--------

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

* The HDMLC arrangement was changed from 10x40x10 leaves to 14x32x14 leaves to match reality.
This may affect the max leaf error metric slightly. In our tests, the change did not skew positive
or negative. The mean change was approximately 0.05mm. While changing a definition is not
desirable, matching the actual configuration is more important. If for some reason you need
the old configuration, you can create a custom MLC arrangement. See the :ref:`customizing_pf_mlcs` section.

v 3.22.0
--------

Expand Down
5 changes: 3 additions & 2 deletions docs/source/picketfence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,10 @@ Results will look similar. Here's an example of the results of using a log:
Customizing MLCs
----------------

As of v2.5, MLC configuration is set a priori (vs empirical determination as before) and the user can also create
custom MLC types. Pylinac was only able to handle Millennium and HD Millennium previously.
.. versionadded:: 2.5

MLC configuration is set a priori (vs empirical determination in 2.4 and below) and the user can also create
custom MLC types.

Preset configurations
^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion pylinac/picketfence.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MLC(enum.Enum):
} #:
HD_MILLENNIUM = {
"name": "HD Millennium",
"arrangement": MLCArrangement([(10, 5), (40, 2.5), (10, 5)]),
"arrangement": MLCArrangement([(14, 5), (32, 2.5), (14, 5)]),
} #:
BMOD = {
"name": "B Mod",
Expand Down
14 changes: 7 additions & 7 deletions tests_basic/test_picketfence.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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.06, 0.06]
expected_max_error = [0.13, 0.14, 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 @@ -477,7 +477,7 @@ def test_percent_passing(self):
self.assertAlmostEqual(self.pf.percent_passing, self.percent_passing, delta=1)

def test_max_error(self):
self.assertAlmostEqual(self.pf.max_error, self.max_error, delta=0.1)
self.assertAlmostEqual(self.pf.max_error, self.max_error, delta=0.05)

def test_abs_median_error(self):
self.assertAlmostEqual(
Expand Down Expand Up @@ -715,7 +715,7 @@ class AS5004(PFTestMixin, TestCase):
"""Tests for the AS500#4 image."""

file_name = "AS500#4.dcm"
max_error = 0.28
max_error = 0.21
abs_median_error = 0.06
mlc_skew = -0.3

Expand All @@ -741,7 +741,7 @@ class AS5007(PFTestMixin, TestCase):
"""Tests for the AS500#4 image."""

file_name = "AS500#7.dcm"
max_error = 0.24
max_error = 0.18
abs_median_error = 0.05
mlc_skew = -0.3

Expand All @@ -759,7 +759,7 @@ class AS5009(PFTestMixin, TestCase):
"""Tests for the AS500#4 image."""

file_name = "AS500#9.dcm"
max_error = 0.24
max_error = 0.16
abs_median_error = 0.04
mlc_skew = -0.3

Expand Down Expand Up @@ -842,7 +842,7 @@ class AS1000HDFull(PFTestMixin, TestCase):

file_name = "AS1000-HD-full.dcm"
mlc = "HD"
max_error = 0.2
max_error = 0.12
abs_median_error = 0.06


Expand Down Expand Up @@ -926,7 +926,7 @@ class ChicagoNoError(PFTestMixin, TestCase):
file_name = "PF no error.dcm"
# log = ['Chicago', 'PF no error tlog.bin']
mlc = "HD"
max_error = 0.24
max_error = 0.3


class ChicagoError(PFTestMixin, TestCase):
Expand Down

0 comments on commit d388884

Please sign in to comment.