Finished generator script, it now will produce two sets of images, p2m and p13m, checking if images have already been created within the accessed hdf5 file.