def variable_axis(self): """The axis that is varying. There are five types of images: * Reference : All axes are at 0. * Gantry: All axes but gantry at 0. * Collimator : All axes but collimator at 0. * Couch : All axes but couch at 0. * Combo : More than one axis is not at 0. """ G0 = is_close(self.gantry_angle, [0, 360]) B0 = is_close(self.collimator_angle, [0, 360]) P0 = is_close(self.couch_angle, [0, 360]) if G0 and B0 and not P0: return COUCH elif G0 and P0 and not B0: return COLLIMATOR elif P0 and B0 and not G0: return GANTRY elif P0 and B0 and G0: return REFERENCE else: return COMBO
def z_offset(self): """The offset or distance between the field CAX and BB in z-direction (SI).""" if is_close(self.couch_angle, [0, 360], delta=2): return self.cax2bb_vector.y