From 39b592168087c606d6e4d2c2d34aae368ada50c3 Mon Sep 17 00:00:00 2001
From: Lewin Probst <info@emirror.de>
Date: Thu, 19 Dec 2019 15:06:23 +0100
Subject: [PATCH] Updated save optimum values procedure.

---
 VERSION                                          | 2 +-
 lib/+artoa/+controller/+file/saveOptimumTables.m | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/VERSION b/VERSION
index b000479..9da06a1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-159
\ No newline at end of file
+160
\ No newline at end of file
diff --git a/lib/+artoa/+controller/+file/saveOptimumTables.m b/lib/+artoa/+controller/+file/saveOptimumTables.m
index 2028b3a..9c483b2 100644
--- a/lib/+artoa/+controller/+file/saveOptimumTables.m
+++ b/lib/+artoa/+controller/+file/saveOptimumTables.m
@@ -10,9 +10,12 @@ unfilteredB = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'unfilteredB'
 A = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'A'}, false);
 B = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'B'}, false);
 X = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'X'}, false);
+offsets = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'offsets'}, false);
+soundspeed = artoa.data.getMember(artoaWorkspace, {'editOffsets', 'soundspeed'}, false);
 
 if islogical(unfilteredA) || islogical(unfilteredB) ...
-        || islogical(A) || islogical(B) || islogical(X)
+        || islogical(A) || islogical(B) || islogical(X) ...
+        || islogical(offsets) || islogical(soundspeed)
     errordlg('At least one of the matrices to save is not available. Please recalculate!', 'Matrices not found');
     return;
 end
@@ -26,7 +29,7 @@ filter = artoa.data.getMember(artoaDataInput, {'ini', 'filemask', 'optimumtables
 
 filepath = fullfile(pathname, filename);
 
-save(filepath, 'unfilteredA', 'unfilteredB', 'A', 'B', 'X');
+save(filepath, 'unfilteredA', 'unfilteredB', 'A', 'B', 'X', 'offsets', 'soundspeed');
 
 
 end
-- 
GitLab