analyses/utils.py
def define_control_integrated(controls: list, nstep: int, key: str = "tau"):
    """
    Creates the integrated vector of controls for a chosen key

    Parameters
    ----------
    controls : list[dict]
        List of controls
    nstep : int
        Number of steps of the OdeSolver
    key : str
        Key of the chosen control such as "tau" or "qddot"
    """
    tau_integrated = np.hstack(
        (
            np.repeat(controls[0][key], nstep + 1, axis=1)[:, :-nstep],
            np.repeat(controls[1][key], nstep + 1, axis=1)[:, :-nstep],
        )
    )
    return tau_integrated

    Creates the integrated vector of controls for a chosen key

    Parameters
    ----------
    controls : list[dict]
        List of controls
    nstep : int
        Number of steps of the OdeSolver
    key : str
        Key of the chosen control such as "tau" or "qddot"
    
Creates the integrated vector of controls for a chosen key
Parameters

controls : list[dict]
List of controls
nstep : int
Number of steps of the OdeSolver
key : str
Key of the chosen control such as "tau" or "qddot"
Creates the integrated vector of controls for a chosen key Parameters controls : list [ dict ] List of controls nstep : int Number of steps of the OdeSolver key : str Key of the chosen control such as " tau " or " qddot "
def define_control_integrated(controls: list, nstep: int, key: str = "tau"):
    tau_integrated = np.hstack(
        (
            np.repeat(controls[0][key], nstep + 1, axis=1)[:, :-nstep],
            np.repeat(controls[1][key], nstep + 1, axis=1)[:, :-nstep],
        )
    )
    return tau_integrated
def define_control_integrated ( controls : list , nstep : int , key : str = "tau" ) : tau_integrated = np . hstack ( ( np . repeat ( controls [ 0 ] [ key ] , nstep + 1 , axis = 1 ) [ : , : - nstep ] , np . repeat ( controls [ 1 ] [ key ] , nstep + 1 , axis = 1 ) [ : , : - nstep ] , ) ) return tau_integrated
Creates the integrated vector of controls for a chosen key
Parameters
Creates the integrated vector of controls for a chosen key Parameters
"""
    Creates the integrated vector of controls for a chosen key

    Parameters
    ----------
    controls : list[dict]
        List of controls
    nstep : int
        Number of steps of the OdeSolver
    key : str
        Key of the chosen control such as "tau" or "qddot"
    """
controls
list
nstep
int
key
str