def get_coordinate_from_line(coordinate, line):
    """
    Returns a value of a coordinate from a line
    """
    for word in line.split(","):
        if str(coordinate)+"=" in word:
            if coordinate == "phi":
                return float(word[word.index("=")+1:])
            else:
                return float(word[word.index("=")+1:-1])