Oxygen sensing and oxide formation: Optimisation and novel X-ray studies