stitch images from z-scan based on maximum value