Change the way of gain determination in MG fit, use linear fit from mean_of_peaks vs peak_orders. caution: if multiple peak at the same place is found, this method can not get the correct gain.