diff options
Diffstat (limited to 'szilagyi/nomogram.py')
-rw-r--r-- | szilagyi/nomogram.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/szilagyi/nomogram.py b/szilagyi/nomogram.py index 9d76127..91d75c2 100644 --- a/szilagyi/nomogram.py +++ b/szilagyi/nomogram.py @@ -1,7 +1,4 @@ -import csv import math -import os -import re from collections import deque @@ -15,25 +12,6 @@ class Vector(complex): raise IndexError -def load(directory): - def _read(iterable): - for x, y in iterable: - yield Vector(float(x), float(y)) - - def _load(filename): - with open(filename) as fd: - reader = csv.reader(fd) - return list(_read(reader)) - - def _files(directory): - for file in os.listdir(directory): - match = re.match(r"SWI_(-?\d+)\.csv", file) - if match: - yield int(match.group(1)), os.path.join(directory, file) - - return [(x, _load(y)) for x, y in sorted(_files(directory), key=lambda x: x[0])] - - def look_downwards(data, x, start): for i in range(start, 0, -1): if data[i - 1][0] < x: |