Closed mchamberland closed 2 months ago
Thanks for reporting. Looks like I made a typo.
Until v3.27 that comes out ~Sept 19th you should be able to work around this by overloading the property like so:
from pylinac.calibration.tg51 import TG51ElectronModern
class FixedTG51ElectronModern(TG51ElectronModern):
# dose dmax depends on the dose at dref which is where the problem is
@property
def dose_mu_dref_adjusted(self) -> float:
"""cGy/MU at the depth of Dref."""
return (
self.tissue_correction
* self.m_corrected_adjustment # here's the fix; was m_corrected_adjusted; typo
* self.kq
* self.n_dw
/ self.mu
)
e51 = FixedTG51ElectronModern(
...
)
dose_adjusted = e51.dose_mu_dmax_adjusted
Great, this works. Thank you!
Describe the bug TG51ElectronModern fails to return an adjusted output because the wrong attribute name is used on line 1319. This should be
m_corrected_adjustment
.To Reproduce Create a TG51ElectronModern instance with all needed parameters, including
m_reference_adjusted
. Then, try to accessdose_mu_dmax_adjusted
.Expected behavior Should return a calculated adjusted dose per MU at dmax.
Additional context Python output: