def get_phase(bursts, period, ref_mjd=58369.30):
    """
    Calculate phases of the bursts given a reference MJD and period

    :param bursts: Array of burst MJDs
    :param period: Period (in days)
    :param ref_mjd: Reference MJD
    :return:
    """
    return ((bursts - ref_mjd) % period) / period