Added maxwell_pos2ind.