def ShowROIStatus(self, left, right, name='', panel=0):
        if left > right:
            return
        sum = self.ydata[left:right].sum()
        dt = self.mca.real_time
        roi_ave = self.roi_aves[panel]
        roi_ave.update(sum)
        cps = roi_ave.get_cps()
        nmsg, cmsg, rmsg = '', '', ''
        if len(name) > 0:
            nmsg = name % " %s"
        cmsg = " Counts={:10,.0f}".format(sum)
        if cps is not None and cps > 0:
            rmsg = " CPS={:10,.1f}".format(cps)
        self.write_message("%s%s%s" % (nmsg, cmsg, rmsg), panel=panel)
dataset/ETHPy150Open xraypy/xraylarch/plugins/epics/xrfcontrol.py/EpicsXRFDisplayFrame.ShowROIStatus/swapped operands of `%`