(c)
return x
Check if parameter is a valid coord system.
    Raise a TypeError exception if it is not, otherwise returns the normalized
    coordinate system name.
Check if parameter is a valid coord system.
    Raise a TypeError exception if it is not, otherwise returns the normalized
    coordinate system name.
Check if parameter is a valid coord system . Raise a TypeError exception if it is not otherwise returns the normalized coordinate system name .
def check_coord(c):
    """Check if parameter is a valid coord system.
    Raise a TypeError exception if it is not, otherwise returns the normalized
    coordinate system name.
    """
    if c is None:
        return c
    if not isinstance(c, str):
        raise TypeError(
            "Coordinate must be a string (G[alactic],"
            " E[cliptic], C[elestial]"
            " or Equatorial=Celestial)"
        )
    if c[0].upper() == "G":
        x = "G"
    elif c[0].upper() == "E" and c != "Equatorial":
        x = "E"
    elif c[0].upper() == "C" or c == "Equatorial":
        x = "C"
    else:
        raise ValueError(
            "Wrong coordinate (either G[alactic],"
            " E[cliptic], C[elestial]"
            " or Equatorial=Celestial)"
        )
    return x
def check_coord ( c ) : if c is None : return c if not isinstance ( c , str ) : raise TypeError ( "Coordinate must be a string (G[alactic]," " E[cliptic], C[elestial]" " or Equatorial=Celestial)" ) if c [ 0 ] . upper ( ) == "G" : x = "G" elif c [ 0 ] . upper ( ) == "E" and c != "Equatorial" : x = "E" elif c [ 0 ] . upper ( ) == "C" or c == "Equatorial" : x = "C" else : raise ValueError ( "Wrong coordinate (either G[alactic]," " E[cliptic], C[elestial]" " or Equatorial=Celestial)" ) return x