Parse a single coordinate

def parse_coordinate(string_rep):
        """
        Parse a single coordinate
        """

        # Any CRTF coordinate representation (sexagesimal or degrees)
        if 'pix' in string_rep:
            return u.Quantity(string_rep[:-3], u.dimensionless_unscaled)
        if 'h' in string_rep or 'rad' in string_rep:
            return coordinates.Angle(string_rep)
        if len(string_rep.split('.')) >= 3:
            string_rep = string_rep.replace('.', ':', 2)

        return coordinates.Angle(string_rep, u.deg)