def test_dm_dist(dist_ctx): files = dist_ctx.executor.run_function(lambda: list(sorted(glob.glob("/data/dm/*.dm4")))) print(files) ds = DMDataSet(files=files) ds = ds.initialize(dist_ctx.executor) analysis = dist_ctx.create_sum_analysis(dataset=ds) roi = np.random.choice([True, False], size=len(files)) results = dist_ctx.run(analysis, roi=roi) assert results[0].raw_data.shape == (3838, 3710)
def test_detect_1(lt_ctx): fpath = os.path.join(DM_TESTDATA_PATH, '2018-7-17 15_29_0000.dm4') assert DMDataSet.detect_params( path=fpath, executor=lt_ctx.executor, ) == { 'files': [fpath], }
def test_detect_2(lt_ctx): assert DMDataSet.detect_params( path="nofile.someext", executor=lt_ctx.executor, ) is False