def dec2ddmmss(deg):
    """Convert DEC coordinate (in degrees) to DD MM SS"""
    from math import modf
    sign = -1 if deg < 0 else 1
    x, dd = modf(abs(deg))
    x, ma = modf(x * 60)
    sa = x * 60
    return int(dd), int(ma), sa, sign
