analyses/utils.py
def define_integrated_time(time: list, n_shooting: tuple, nstep: int):
    """
    Create the time vector corresponding to the integrated time

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    nstep : int
        Number of integration steps
    """
    time_integrated = np.array([])
    cum_time = get_cum_time(time)
    for i, n_shoot in enumerate(n_shooting):
        periode = (cum_time[i + 1] - cum_time[i]) / n_shoot
        for ii in range(n_shoot):
            t_linspace = np.linspace(cum_time[i] + ii * periode, cum_time[i] + (ii + 1) * periode, (nstep + 1))
            time_integrated = np.hstack((time_integrated, t_linspace))
        time_integrated = np.hstack((time_integrated, cum_time[i + 1]))
    return time_integrated

    Create the time vector corresponding to the integrated time

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    nstep : int
        Number of integration steps
    
Create the time vector corresponding to the integrated time
Parameters

time : list
List of duration of each phase of the simulation
n_shooting : tuple
Number of shooting points for each phase
nstep : int
Number of integration steps
Create the time vector corresponding to the integrated time Parameters time : list List of duration of each phase of the simulation n_shooting : tuple Number of shooting points for each phase nstep : int Number of integration steps
def define_integrated_time(time: list, n_shooting: tuple, nstep: int):
    time_integrated = np.array([])
    cum_time = get_cum_time(time)
    for i, n_shoot in enumerate(n_shooting):
        periode = (cum_time[i + 1] - cum_time[i]) / n_shoot
        for ii in range(n_shoot):
            t_linspace = np.linspace(cum_time[i] + ii * periode, cum_time[i] + (ii + 1) * periode, (nstep + 1))
            time_integrated = np.hstack((time_integrated, t_linspace))
        time_integrated = np.hstack((time_integrated, cum_time[i + 1]))
    return time_integrated
def define_integrated_time ( time : list , n_shooting : tuple , nstep : int ) : time_integrated = np . array ( [ ] ) cum_time = get_cum_time ( time ) for i , n_shoot in enumerate ( n_shooting ) : periode = ( cum_time [ i + 1 ] - cum_time [ i ] ) / n_shoot for ii in range ( n_shoot ) : t_linspace = np . linspace ( cum_time [ i ] + ii * periode , cum_time [ i ] + ( ii + 1 ) * periode , ( nstep + 1 ) ) time_integrated = np . hstack ( ( time_integrated , t_linspace ) ) time_integrated = np . hstack ( ( time_integrated , cum_time [ i + 1 ] ) ) return time_integrated
Create the time vector corresponding to the integrated time
Parameters
Create the time vector corresponding to the integrated time Parameters
"""
    Create the time vector corresponding to the integrated time

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    nstep : int
        Number of integration steps
    """
time
list
n_shooting
tuple
nstep
int