Measurement of mercury in materials