diff options
author | Aki <please@ignore.pl> | 2022-09-03 00:41:49 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-09-03 00:41:49 +0200 |
commit | 222bc58e3b51a70e95e15fe4681d50809f54c50a (patch) | |
tree | 14a6bc7409708a3efbf17b868b42fcf36339d855 /szilagyi/plots.py | |
parent | 6a5f689cf6acfc0ad99134a8e65854f8a8aa1774 (diff) | |
download | szilagyi-222bc58e3b51a70e95e15fe4681d50809f54c50a.zip szilagyi-222bc58e3b51a70e95e15fe4681d50809f54c50a.tar.gz szilagyi-222bc58e3b51a70e95e15fe4681d50809f54c50a.tar.bz2 |
Moved all calculation logic to nomogram
Diffstat (limited to 'szilagyi/plots.py')
-rw-r--r-- | szilagyi/plots.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/szilagyi/plots.py b/szilagyi/plots.py index 072a32d..b38b99e 100644 --- a/szilagyi/plots.py +++ b/szilagyi/plots.py @@ -15,12 +15,6 @@ def grid(start, end, steps): if __name__ == "__main__": - swis = _dataset.INDICES - - def _swi(x, y): # dt, depth - segments = find_boundary_curves(swis, x, y) - return calculate_swi(segments, x, y) - C = [] X = list(grid(0, 40, 1000)) Y = list(grid(0, 50000, 1000)) @@ -30,12 +24,12 @@ if __name__ == "__main__": for x_scaled in range(0, 1000): x = x_scaled / 25 try: - swi = _swi(x, y) + swi = calculate_swi(x, y) except (IndexError, RuntimeError): swi = -10 row.append(swi) C.append(row) plot.pcolormesh(X, Y, C, cmap='viridis', vmin=-10, vmax=10, rasterized=True) - for _, data in swis: + for _, data in _dataset.INDICES: plot.plot([x[0] for x in data], [x[1] for x in data]) plot.show() |