def process_batch(self): files = self.batchlist for f in files: proc = np.load(f, allow_pickle=True).item() savename = process.run(proc['filenames'], parent=None, proc=proc, savepath=proc['save_path']) if len(files)==1: self.openProc(savename)
def process_ROIs(self): self.sbin = int(self.binSpinBox.value()) # save running parameters as defaults ops = self.save_ops() if len(self.save_path) > 0: savepath = self.save_path else: savepath = None print(savepath) savename = process.run(self.filenames, self, savepath=savepath) self.openProc(savename)
def main(): ops = np.load('ops.npy') ops = ops.item() if __name__ == '__main__': parser = argparse.ArgumentParser(description='Movie files') parser.add_argument('--ops', default=[], type=str, help='options') parser.add_argument('--movie', default=[], type=str, help='moviefile') parser.add_argument('--savedir', default=[], type=str, help='savedir') args = parser.parse_args() if len(args.movie) > 0: moviefile = args.movie else: moviefile = None if len(args.savedir) > 0: savedir = args.savedir else: savedir = None ops = {} if len(args.ops) > 0: ops = np.load(args.ops) ops = ops.item() if len(args.movie) > 0: process.run(args.movie, ops) else: gui.run(moviefile, savedir)