def propagate_sign(val1, val2, val3):
    """
    casacore (reasonably enough) demands that a minus sign (if required)
    comes at the start of the quantity. Thus "-0D30M" rather than "0D-30M".
    Python regards "-0" as equal to "0"; we need to split off a separate sign
    field.

    If more than one of our inputs is negative, it's not clear what the user
    meant: we raise.

    Args:
        val1(float): (,val2,val3) input values (hour/min/sec or deg/min/sec)

    Returns:
        tuple: "+" or "-" string denoting sign,
            val1, val2, val3 (numeric) denoting absolute values of inputs.
    """
    signs = [x<0 for x in (val1, val2, val3)]
    if signs.count(True) == 0:
        sign = "+"
    elif signs.count(True) == 1:
        sign, val1, val2, val3 = "-", abs(val1), abs(val2), abs(val3)
    else:
        raise ValueError("Too many negative coordinates")
    return sign, val1, val2, val3