From 43da4bdbeb42915e73b4de5b53ae4cad1b8a72ed Mon Sep 17 00:00:00 2001 From: James Kerns Date: Mon, 23 Oct 2023 15:04:09 -0500 Subject: [PATCH 1/2] small tweaks to pf histogram --- pylinac/picketfence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylinac/picketfence.py b/pylinac/picketfence.py index 0a107af25..929f32b58 100644 --- a/pylinac/picketfence.py +++ b/pylinac/picketfence.py @@ -1008,6 +1008,9 @@ def plot_histogram(self, bins: int = 10, show: bool = True) -> None: ) errors = Enumerable(self.mlc_meas).select_many(lambda m: m.error).to_list() fig, ax = plt.subplots() + ax.axvline(self.tolerance, color="r", linewidth=3) + ax.axvline(-self.tolerance, color="r", linewidth=3) + ax.grid(True) ax.set_title("Leaf error histogram") ax.set_ylabel("Counts") ax.set_xlabel("Error (mm)") From 73a06f5a641aa20385db3658b685e1ae3bd90fb2 Mon Sep 17 00:00:00 2001 From: James Kerns Date: Mon, 23 Oct 2023 15:07:34 -0500 Subject: [PATCH 2/2] add action tolerance --- pylinac/picketfence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylinac/picketfence.py b/pylinac/picketfence.py index 929f32b58..a2571783f 100644 --- a/pylinac/picketfence.py +++ b/pylinac/picketfence.py @@ -1011,6 +1011,9 @@ def plot_histogram(self, bins: int = 10, show: bool = True) -> None: ax.axvline(self.tolerance, color="r", linewidth=3) ax.axvline(-self.tolerance, color="r", linewidth=3) ax.grid(True) + if self.action_tolerance is not None: + ax.axvline(self.action_tolerance, color="m", linewidth=3) + ax.axvline(-self.action_tolerance, color="m", linewidth=3) ax.set_title("Leaf error histogram") ax.set_ylabel("Counts") ax.set_xlabel("Error (mm)")