aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boundaryDefinition.txt4
-rwxr-xr-xmakeBoundary.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/boundaryDefinition.txt b/boundaryDefinition.txt
index 2c3a021..36c74d5 100644
--- a/boundaryDefinition.txt
+++ b/boundaryDefinition.txt
@@ -2,8 +2,8 @@
# Boundary Definition File
#
-# Boundary location (top, bottom, left, right):
-location: top
+# Boundary location ("top", "bottom", "left", "right"):
+location: "top"
# Local gradient:
slope: -0.003646
diff --git a/makeBoundary.py b/makeBoundary.py
index 1fc6b69..21b1113 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -3,6 +3,7 @@
import matplotlib.pyplot as plt
import numpy as np
import bisect
+import ast
def read_definition(filename):
ddict = {}
@@ -10,7 +11,7 @@ def read_definition(filename):
for line in f:
items = line.split(': ', 1)
if len(items) == 2:
- ddict[items[0]] = eval(items[1])
+ ddict[items[0]] = ast.literal_eval(items[1])
return ddict
# read boundary definition file.