how does xrd works in analysis of copper ore