def calc_phase(p, t):
    """
    Calculate the phase array.

    Args:
        t (array): The time array (in days).
        p (float): Period (in days)

    Returns
        phase (array): The phase array.
    """
    return t % p / p
