Optmization for the emission matrix