Hi!
The documentation for Field Analysis says that the symmetry calculation for Elekta protocol is the IEC calculation:
symmetry=100∗max(|Lpt/Rpt|,|Rpt/Lpt|)
But in the code it does not multiply for 100:
def symmetry_pdq_iec(profile: SingleProfile, in_field_ratio: float, **kwargs) → float:
“”“Symmetry calculation by way of PDQ IEC. See :ref:elekta_protocol
.
A negative value means the right side is higher. A positive value means the left side is higher.
“””
field = profile.field_data(in_field_ratio=in_field_ratio)
field_values = field[“field values”]
def calc_sym(lt, rt) → float:
sym1 = lt / rt
sym2 = rt / lt
if abs(sym1) > abs(sym2):
sign = np.sign(sym1)
else:
sign = np.sign(sym2)
return max(abs(lt / rt), abs(rt / lt)) * sign
sym_values = [calc_sym(lt, rt) for lt, rt in zip(field_values, field_values[::-1])]
sym_idx = np.argmax(np.abs(sym_values))
return sym_values[sym_idx]
Am I correct that this should be modified?
Thanks,
Gloria