def load_png(varNumVol, strPathPng, tplVslSpcSze=(<NUM_LIT:200>, <NUM_LIT:200>), varStrtIdx=<NUM_LIT:0>,<EOL>varZfill=<NUM_LIT:3>):
<EOL>lstPngPaths = [None] * varNumVol<EOL>for idx01 in range(<NUM_LIT:0>, varNumVol):<EOL><INDENT>lstPngPaths[idx01] = (strPathPng +<EOL>str(idx01 + varStrtIdx).zfill(varZfill) +<EOL>'<STR_LIT>')<EOL><DEDENT>aryPngData = np.zeros((tplVslSpcSze[<NUM_LIT:0>],<EOL>tplVslSpcSze[<NUM_LIT:1>],<EOL>varNumVol))<EOL>objIm = Image.open(lstPngPaths[<NUM_LIT:0>])<EOL>aryTest = np.array(objIm.resize((objIm.size[<NUM_LIT:0>], objIm.size[<NUM_LIT:1>]),<EOL>Image.ANTIALIAS))<EOL>varNumDim = aryTest.ndim<EOL>del(aryTest)<EOL>for idx01 in range(<NUM_LIT:0>, varNumVol):<EOL><INDENT>objIm = Image.open(lstPngPaths[idx01])<EOL>objIm = objIm.resize((tplVslSpcSze[<NUM_LIT:0>],<EOL>tplVslSpcSze[<NUM_LIT:1>]),<EOL>resample=Image.NEAREST)<EOL>if varNumDim == <NUM_LIT:2>:<EOL><INDENT>aryPngData[:, :, idx01] = np.array(objIm.resize(<EOL>(objIm.size[<NUM_LIT:0>], objIm.size[<NUM_LIT:1>]), Image.ANTIALIAS))[:, :]<EOL><DEDENT>elif varNumDim == <NUM_LIT:3>:<EOL><INDENT>aryPngData[:, :, idx01] = np.array(objIm.resize(<EOL>(objIm.size[<NUM_LIT:0>], objIm.size[<NUM_LIT:1>]), Image.ANTIALIAS))[:, :, <NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>strErrMsg = ('<STR_LIT>'<EOL>+ '<STR_LIT>')<EOL>raise ValueError(strErrMsg)<EOL><DEDENT><DEDENT>aryPngData = (aryPngData > <NUM_LIT:200>).astype(np.int8)<EOL>return aryPngData<EOL>
Load PNGs with stimulus information for pRF model creation.

Parameters
----------
varNumVol : int
    Number of PNG files.
strPathPng : str
    Parent directory of PNG files. PNG files need to be organsied in
    numerical order (e.g. `file_001.png`, `file_002.png`, etc.).
tplVslSpcSze : tuple
    Pixel size (x, y) at which PNGs are sampled. In case of large PNGs it
    is useful to sample at a lower than the original resolution.
varStrtIdx : int
    Start index of PNG files. For instance, `varStrtIdx = 0` if the name of
    the first PNG file is `file_000.png`, or `varStrtIdx = 1` if it is
    `file_001.png`.
varZfill : int
    Zero padding of PNG file names. For instance, `varStrtIdx = 3` if the
    name of PNG files is `file_007.png`, or `varStrtIdx = 4` if it is
    `file_0007.png`.

Returns
-------
aryPngData : np.array
    3D Numpy array with the following structure:
    aryPngData[x-pixel-index, y-pixel-index, PngNumber]

Notes
-----
Part of py_pRF_mapping library.