def convert_to_rotation_period(gwfrequency=None, rotationfrequency=None, **kwargs):
    """
    Convert the GW frequency (assumed to be twice the rotation frequency) or
    the rotation frequency into the rotation period.
    """

    if gwfrequency is not None:
        return 2.0 / gwfrequency
    elif rotationfrequency is not None:
        return 1.0 / rotationfrequency
    else:
        raise ValueError("Required conversion parameters are not present")