aboutsummaryrefslogtreecommitdiff
path: root/run.py
blob: 7439bfbaede316a80e13fd058762a51411bb8d7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3

import sys
import yaml
import matplotlib.pyplot as plt

FILE = 'config.yaml'
if len(sys.argv) > 1:
    FILE = sys.argv[1]

conf = None
with open(FILE, 'r') as f:
    conf = yaml.safe_load(f)

for plotter in conf['plotter']:
    modname = plotter['module']
    del plotter['module']

    mod = __import__(modname)
    mod.run(**plotter)

    plt.close('all')