Crossover from semiconductor to magnetic metal in semi-Heusler phases as a function of valence electron concentration