def loadPrsOrd(vecRunLngth, strPathPresOrd, vecVslStim):
print('<STR_LIT>')<EOL>aryPresOrd = np.empty((<NUM_LIT:0>, <NUM_LIT:2>))<EOL>for idx01 in range(<NUM_LIT:0>, len(vecRunLngth)):<EOL><INDENT>filename1 = (strPathPresOrd + str(vecVslStim[idx01]) +<EOL>'<STR_LIT>')<EOL>with open(filename1, '<STR_LIT:rb>') as handle:<EOL><INDENT>array1 = pickle.load(handle)<EOL><DEDENT>tempCond = array1["<STR_LIT>"]<EOL>tempCond = tempCond[:vecRunLngth[idx01], :]<EOL>aryPresOrd = np.concatenate((aryPresOrd, tempCond), axis=<NUM_LIT:0>)<EOL><DEDENT>aryPresOrdAprt = aryPresOrd[:, <NUM_LIT:0>].astype(int)<EOL>aryPresOrdMtn = aryPresOrd[:, <NUM_LIT:1>].astype(int)<EOL>return aryPresOrdAprt, aryPresOrdMtn<EOL>
Load presentation order of motion directions.

    Parameters
    ----------
    vecRunLngth : list
        Number of volumes in every run
    strPathPresOrd : str
        Path to the npy vector containing order of presented motion directions.
    vecVslStim: list
        Key of (stimulus) condition presented in every run
    Returns
    -------
    aryPresOrdAprt : 1d numpy array, shape [n_vols]
        Presentation order of aperture position.
    aryPresOrdMtn : 1d numpy array, shape [n_vols]
        Presentation order of motion direction.