This is useful code anyway. The most important fact is that it points out that stimuli are not returned with absolute paths, which make them unusable for the end-user. I have fixed that and here is the same code to show them:

    if take_a_look_at_stimuli:
        import Image
        import pylab as pl
        for stim_type, files in data_files.stimuli.items():
            if stim_type == "controls":
                # skip control images, there are too many
                continue
            pl.figure()
            for i in range(48):
                pl.subplot(6, 8, i + 1)
                try:
                    pl.imshow(Image.open(files[i]), origin="lower")
                    pl.gray()
                    pl.axis("off")
                except:
                    # just go to the next one if the file is not present
                    continue
            pl.title(stim_type)
        pl.show()