def ethinca_order_from_string(order):
    """
    Returns the integer giving twice the post-Newtonian order
    used by the ethinca calculation. Currently valid only for TaylorF2 metric

    Parameters
    ----------
    order : string

    Returns
    -------
    int
    """
    if order in get_ethinca_orders().keys():
        return get_ethinca_orders()[order]
    else: raise ValueError("Order "+str(order)+" is not valid for ethinca"
                           "calculation! Valid orders: "+
                           str(get_ethinca_orders().keys()))