stray ref to res instead of outres
tabulated error function calculation for speed, and allow skipping
of identical subslices in non-refined regions
small bug fixes, undid the tabulated erf as scipy erf was faster