import copy


def to_inch(cam_file):
    """ Convert Gerber or Excellon file units to imperial

    Parameters
    ----------
    cam_file : :class:`gerber.cam.CamFile` subclass
        Gerber or Excellon file to convert

    Returns
    -------
    cam_file : :class:`gerber.cam.CamFile` subclass
        A deep copy of the source file with units converted to imperial.
    """
    cam_file = copy.deepcopy(cam_file)
    cam_file.to_inch()
    return cam_file