Stochastic Partial Differential Equations and Bayesian Inversion with Applications in Nanoscale Sensors and Tomography