Probing The Local And Average Structure of Functional Materials