lib: code for tau_dperp, interpolated gap