def live_monitor(self, input_ws, output_ws): """ :return: """ # Now get the data, read the first spectra spectra = input_ws.readY(0) # extract the first value from the array count = spectra[0] print(f'Total count: {count}') count = input_ws.getNumberEvents() # output it as a log message logger.notice("Total counts so far " + str(count)) # if my ouput workspace has not been created yet, create it. if not mtd.doesExist(output_ws): table = CreateEmptyTableWorkspace(OutputWorkspace=output_ws) table.setTitle("Event Rate History") table.addColumn("str", "Time") table.addColumn('str', 'EventsS') table.addColumn("int", "Events") table = mtd[output_ws] assert table