clip output samples without wrapping
fixed writing sphere file if outfile = *.sph