  Materials under confinement can possess properties that deviate considerably
from their bulk counterparts. Indeed, confinement makes all physical properties
position-dependent and possibly anisotropic, and characterizing such spatial
variations and directionality is an intense area of focus in experimental and
computational studies of confined matter. While this task is fairly
straightforward for simple mechanical observables, it is far more daunting for
transport properties such as diffusivity that can only be estimated from
autocorrelations of mechanical observables. For instance, there are well
established methods for estimating diffusivity from experimentally observed or
computationally generated trajectories in the bulk. No rigorous generalizations
of such methods, however, exist for confined systems. In this work, we present
two filtered covariance estimators for computing anisotropic and
position-dependent diffusivity tensors and validate them by applying them to
stochastic trajectories generated according to known diffusivity profiles.
These estimators can accurately capture spatial variations spanning over
several orders of magnitude and assuming different functional forms. Our
approach is also very robust to implementation details such as the localization
function and time discretization and performs significantly better than
estimators that are solely based on local covariance. Moreover, the kernel
function does not have to be localized and can instead belong to a dictionary
of orthogonal functions. Therefore, the proposed estimator can be readily used
to obtain functional estimates of diffusivity rather than a tabulated
collection of pointwise estimates. Nonetheless, the susceptibility of the
proposed estimators to time discretization is higher close to hard boundaries.
We demonstrate this heightened susceptibility to be common among all
covariance-based estimators.
