def loadPng(varNumVol, tplPngSize, strPathPng):
print('<STR_LIT>')<EOL>lstPngPaths = [None] * varNumVol<EOL>for idx01 in range(<NUM_LIT:0>, varNumVol):<EOL><INDENT>lstPngPaths[idx01] = (strPathPng + str(idx01) + '<STR_LIT>')<EOL><DEDENT>aryPngData = np.zeros((tplPngSize[<NUM_LIT:0>],<EOL>tplPngSize[<NUM_LIT:1>],<EOL>varNumVol))<EOL>for idx01 in range(<NUM_LIT:0>, varNumVol):<EOL><INDENT>aryPngData[:, :, idx01] = np.array(Image.open(lstPngPaths[idx01]))<EOL><DEDENT>aryPngData = (aryPngData > <NUM_LIT:0>).astype(int)<EOL>return aryPngData<EOL>
Load PNG files.

    Parameters
    ----------
    varNumVol : float
        Number of volumes, i.e. number of time points in all runs.
    tplPngSize : tuple
        Shape of the stimulus image (i.e. png).
    strPathPng: str
        Path to the folder cointaining the png files.
    Returns
    -------
    aryPngData : 2d numpy array, shape [png_x, png_y, n_vols]
        Stack of stimulus data.