A quantitative measure of medium-range order in amorphous materials from transmission electron micrographs