aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakeBoundary.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index e3d30cb..e1ca2de 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -4,6 +4,19 @@ import matplotlib.pyplot as plt
import numpy as np
import bisect
+def read_definition(filename):
+ ddict = {}
+ with open(filename, "r") as f:
+ for line in f:
+ items = line.split(': ', 1)
+ if len(items) == 2:
+ ddict[items[0]] = eval(items[1])
+ return ddict
+
+definition_dict = read_definition('boundaryDefinition.txt')
+for dd in definition_dict:
+ print(definition_dict[dd])
+
with open('./1D_top.txt', "r") as data:
xch, ych, zch = np.loadtxt(data, delimiter=' ', unpack=True)