-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvisualize.py
More file actions
20 lines (17 loc) · 757 Bytes
/
visualize.py
File metadata and controls
20 lines (17 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys
from utils import draw_genotype
import numpy as np
import genotypes
if __name__ == '__main__':
if len(sys.argv) != 2:
print("usage:\n python {} ARCH_NAME".format(sys.argv[0]))
sys.exit(1)
genotype_name = sys.argv[1]
print(genotype_name)
try:
genotype = eval('genotypes.{}'.format(genotype_name))
except AttributeError:
print("{} is not specified in genotypes.py".format(genotype_name))
sys.exit(1)
draw_genotype(genotype.normal, np.max(list(genotype.normal_concat) + list(genotype.reduce_concat)) -1, "normal", genotype.normal_concat)
draw_genotype(genotype.reduce, np.max(list(genotype.normal_concat) + list(genotype.reduce_concat)) -1, "reduction", genotype.reduce_concat)