calc slices' mean value from a memory file