1. A method for determining the mineral content of a sample using an electron microscope, said method comprising: directing an electron beam toward a first area of interest of a sample, the first area of interest comprising an unknown composition of minerals; determining a first working distance, the first working distance being the distance between a backscattered electron detector of the microscope and the first area of interest of the sample; compensating for the difference between the first working distance and a predetermined working distance, the predetermined working distance being the working distance that provides desired grayscale values for detected backscattered electrons; and detecting backscattered electrons from the first area of interest of the sample.