From 4ba17e865245ae9db03a7ca3ad8eae1eb486f29d Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Thu, 1 Oct 2015 13:10:40 +0000
Subject: [PATCH] treat no rho as empty in _rho case

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@5095 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 crpptbx/TCV/gdat_tcv.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m
index 34c4b38e..26e0139e 100644
--- a/crpptbx/TCV/gdat_tcv.m
+++ b/crpptbx/TCV/gdat_tcv.m
@@ -849,7 +849,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
         rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))';
       end
     else
-      rho=NaN;
+      if gdat_params.nverbose>=1; warning(['psiscatvol empty?, no rho calculated for data_request = ' data_request_eff]); end
+      rho=[];
     end
     gdat_data.dim{1}=rho;
     gdat_data.dimunits=[{'sqrt(psi_norm)'} ; {'time [s]'}];
-- 
GitLab