# Path: pylinac/core/scale.py
# class MachineScale(Enum):
#     """Possible machine scales. Used for specifying input and and output scales for conversion.
#     The enum keys are conversion functions for each axis relative to IEC 61217"""
# 
#     IEC61217 = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": noop,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": noop,
#     }
#     ELEKTA_IEC = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": mirror_360,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": mirror_360,
#     }
#     VARIAN_IEC = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": mirror_360,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": mirror_360,
#     }
#     VARIAN_STANDARD = {
#         "gantry_to_iec": shift_and_mirror_360,
#         "collimator_to_iec": shift_and_mirror_360,
#         "rotation_to_iec": shift_and_mirror_360,
#         "gantry_from_iec": inv_shift_and_mirror_360,
#         "collimator_from_iec": inv_shift_and_mirror_360,
#         "rotation_from_iec": inv_shift_and_mirror_360,
#     }
# 
# def convert(
#     input_scale: MachineScale,
#     output_scale: MachineScale,
#     gantry: float,
#     collimator: float,
#     rotation: float,
# ) -> Tuple[float, float, float]:
#     """Convert from one coordinate scale to another. Returns gantry, collimator, rotation."""
#     # convert to IEC61217 since everything is defined relative to it
#     g = input_scale.value["gantry_to_iec"](gantry)
#     c = input_scale.value["collimator_to_iec"](collimator)
#     r = input_scale.value["rotation_to_iec"](rotation)
#     # now apply the inverse to go from 61217 to output scale
#     g_out = output_scale.value["gantry_from_iec"](g)
#     c_out = output_scale.value["collimator_from_iec"](c)
#     r_out = output_scale.value["rotation_from_iec"](r)
#     return g_out, c_out, r_out


from pylinac.core.scale import MachineScale, convert


def test_iec_to_iec():
    # should return the same values
    g = 5
    c = 5
    r = 5

# Path: pylinac/core/scale.py
# class MachineScale(Enum):
#     """Possible machine scales. Used for specifying input and and output scales for conversion.
#     The enum keys are conversion functions for each axis relative to IEC 61217"""
# 
#     IEC61217 = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": noop,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": noop,
#     }
#     ELEKTA_IEC = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": mirror_360,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": mirror_360,
#     }
#     VARIAN_IEC = {
#         "gantry_to_iec": noop,
#         "collimator_to_iec": noop,
#         "rotation_to_iec": mirror_360,
#         "gantry_from_iec": noop,
#         "collimator_from_iec": noop,
#         "rotation_from_iec": mirror_360,
#     }
#     VARIAN_STANDARD = {
#         "gantry_to_iec": shift_and_mirror_360,
#         "collimator_to_iec": shift_and_mirror_360,
#         "rotation_to_iec": shift_and_mirror_360,
#         "gantry_from_iec": inv_shift_and_mirror_360,
#         "collimator_from_iec": inv_shift_and_mirror_360,
#         "rotation_from_iec": inv_shift_and_mirror_360,
#     }
# 
# def convert(
#     input_scale: MachineScale,
#     output_scale: MachineScale,
#     gantry: float,
#     collimator: float,
#     rotation: float,
# ) -> Tuple[float, float, float]:
#     """Convert from one coordinate scale to another. Returns gantry, collimator, rotation."""
#     # convert to IEC61217 since everything is defined relative to it
#     g = input_scale.value["gantry_to_iec"](gantry)
#     c = input_scale.value["collimator_to_iec"](collimator)
#     r = input_scale.value["rotation_to_iec"](rotation)
#     # now apply the inverse to go from 61217 to output scale
#     g_out = output_scale.value["gantry_from_iec"](g)
#     c_out = output_scale.value["collimator_from_iec"](c)
#     r_out = output_scale.value["rotation_from_iec"](r)
#     return g_out, c_out, r_out


# Path: tests_basic/core/test_scale.py
from pylinac.core.scale import MachineScale, convert



def test_iec_to_iec():
    # should return the same values
    g = 5
    c = 5
    r = 5

    go, co, ro = convert(input_scale=MachineScale.IEC61217, output_scale=MachineScale.IEC61217, gantry=g, collimator=c, rotation=r)