Total Complexity | 0 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import os |
||
2 | import amd |
||
3 | import pickle |
||
4 | |||
5 | root_dir = r'average-minimum-distance\tests\data' |
||
6 | |||
7 | filenames = { |
||
8 | 'cubic': r'cubic.hdf5', |
||
9 | 'T2_simulated': r'T2_simulated.hdf5', |
||
10 | 'T2_experimental': r'T2_experimental.hdf5', |
||
11 | 'CSD_families': r'CSD_families.hdf5', |
||
12 | } |
||
13 | |||
14 | paths = {name: os.path.join(root_dir, filenames[name]) for name in filenames} |
||
15 | |||
16 | refs = {name: list(amd.SetReader(paths[name])) for name in paths} |
||
17 | |||
18 | for name, psets in refs.items(): |
||
19 | with open(os.path.join(root_dir, name + '.pkl'), 'wb') as f: |
||
20 | pickle.dump(psets, f) |