From d0c4f2f65fd4c04a5a4ac9e17021d4d8537f483f Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Tue, 22 Sep 2015 14:19:37 +0000
Subject: [PATCH] reduce print out when shot>100'000 and no Thomson

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@5038 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 crpptbx/TCV/gdat_tcv.m | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m
index 3b3aed5c..56637e10 100644
--- a/crpptbx/TCV/gdat_tcv.m
+++ b/crpptbx/TCV/gdat_tcv.m
@@ -651,14 +651,18 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
     try
       time=mdsdata('\results::thomson:times');
     catch
-      warning('Problems with \results::thomson:times')
-      disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      if (nverbose>=1) && shot<100000
+        warning('Problems with \results::thomson:times')
+        disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      end
       return
     end
     if isempty(time) || ischar(time)
-      thomsontimes=time
-      warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times  is empty? Check')
-      disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      thomsontimes=time;
+      if (nverbose>=1) && shot<100000
+        warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times  is empty? Check')
+        disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      end
       return
     end
     if strcmp(data_request_eff(1:2),'ne')
@@ -682,14 +686,18 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
     try
       time=mdsdata('\results::thomson:times');
     catch
-      warning('Problems with \results::thomson:times')
-      warning(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      if (nverbose>=1) && shot<100000
+        warning('Problems with \results::thomson:times')
+        warning(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      end
       return
     end
     if isempty(time) || ischar(time)
-      thomsontimes=time
-      warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times  is empty? Check')
-      disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      thomsontimes=time;
+      if (nverbose>=1) && shot<100000
+        warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times  is empty? Check')
+        disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff])
+      end
       return
     end
     zshift = 0.;
-- 
GitLab