class Save_XLS(SaveBase): """ Save to Excel spreadsheet scan event class """ __extname__ = "Save Excel" def __init__(self, parent = None): SaveBase.__init__(self, parent) self.is_visible = True self.filter = XLS() def run(self, data): fname = self.make_filename() for n in range(self.m_id+1): # save what has been measured before calling 'save' data.data[n].filename = fname self.filter.save(fname, data.data[n], name="M_"+str(n)) if self.backup and hasattr(self,'bfname'): self.filter.save(self.bfname, data.data[n],name="M_"+str(n)) def check_validity(self, data): v = len(data.shape) if v<1 or v>2: return False else: return True
def __init__(self, parent = None): SaveBase.__init__(self, parent) self.is_visible = True self.filter = XLS()