integrate_slice

integrate_slice#

abtem.potentials.gpaw.integrate_slice(array, gpts, a, b, thickness)[source]#

Integrate the planes of array along its last axis between the heights a and b, and Fourier interpolate the result to gpts.

Plane k is the sample at the height k * dz, with dz the plane spacing, and stands for the heights from k * dz - dz / 2 to k * dz + dz / 2; the grid is periodic, so plane 0 also stands for the heights within dz / 2 below the thickness. A slice takes each plane times the length of the plane’s heights that lie between a and b. Consecutive slices share their limit, so the weights of every plane add up to dz. A limit on a plane splits it between the slices on either side (the trapezoidal rule), so the integral of a slice is centred on the slice. Taking the planes from floor(a / dz) to floor(b / dz) whole (a left Riemann sum) put it dz / 2 below the slice.