The effect of trace gases on neodymium ion formation