subpulse/analysis/toa.py
def pulse_phase(times, *frequency_derivatives):
    """
    Calculate pulse phase from the frequency and its derivatives.

    Parameters
    ----------
    times : array of floats
        The times at which the phase is calculated
    *frequency_derivatives: floats
        List of derivatives in increasing order, starting from zero.

    Returns
    -------
    phases : array of floats
        The absolute pulse phase
    """
    phase = np.zeros(len(times))
    for i_f, f in enumerate(frequency_derivatives):
        factorial = fast_factorial(i_f + 1)
        phase += 1 / factorial * times ** (i_f + 1) * f
    phase -= np.floor(phase)
    return phase

    Calculate pulse phase from the frequency and its derivatives.

    Parameters
    ----------
    times : array of floats
        The times at which the phase is calculated
    *frequency_derivatives: floats
        List of derivatives in increasing order, starting from zero.

    Returns
    -------
    phases : array of floats
        The absolute pulse phase
    
Calculate pulse phase from the frequency and its derivatives.
Parameters

times : array of floats
The times at which the phase is calculated
frequency_derivatives: floats
List of derivatives in increasing order, starting from zero.

Returns

phases : array of floats
The absolute pulse phase
Calculate pulse phase from the frequency and its derivatives . Parameters times : array of floats The times at which the phase is calculated frequency_derivatives : floats List of derivatives in increasing order starting from zero . Returns phases : array of floats The absolute pulse phase
def pulse_phase(times, *frequency_derivatives):
    phase = np.zeros(len(times))
    for i_f, f in enumerate(frequency_derivatives):
        factorial = fast_factorial(i_f + 1)
        phase += 1 / factorial * times ** (i_f + 1) * f
    phase -= np.floor(phase)
    return phase
def pulse_phase ( times , * frequency_derivatives ) : phase = np . zeros ( len ( times ) ) for i_f , f in enumerate ( frequency_derivatives ) : factorial = fast_factorial ( i_f + 1 ) phase += 1 / factorial * times ** ( i_f + 1 ) * f phase -= np . floor ( phase ) return phase
Calculate pulse phase from the frequency and its derivatives.
Calculate pulse phase from the frequency and its derivatives .
"""
    Calculate pulse phase from the frequency and its derivatives.

    Parameters
    ----------
    times : array of floats
        The times at which the phase is calculated
    *frequency_derivatives: floats
        List of derivatives in increasing order, starting from zero.

    Returns
    -------
    phases : array of floats
        The absolute pulse phase
    """
times