def sex2dec(rain,decin):
    """
    Converts sexagesimal coordinates to decimal. HMS and DMS separated by colons (:)
    
    Parameters
    ----------
    rain : str 
        input Right Ascension as a sexagesimal string -- e.g.,  '03:45:6789'
    decin : str 
        input Declination as a sexagesimal string -- e.g.,  '-12:34:5678998765'
    
    Returns
    -------
    list
        [12.345678, -10.987654]
    """
    if ':' in rain: ra=[float(val)*360./24 for val in rain.split(':')]
    else: ra=[float(val)*360./24 for val in rain.split(' ')]
    raout=ra[0]+ra[1]/60.+ra[2]/3600.
    if ':' in decin: dec=[float(val) for val in decin.split(':')]
    else: dec=[float(val) for val in decin.split(' ')]
    if dec[0]<0: decout=dec[0]-dec[1]/60.-dec[2]/3600.
    else: decout=dec[0]+dec[1]/60.+dec[2]/3600.
    return [raout,decout]