From 5a67e5decbc3f135fd3b0380c966a9894c34899e Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Thu, 26 Sep 2024 09:30:00 +0200
Subject: [PATCH] fix units

---
 matlab/TCV/gdat_tcv.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m
index e6931714..80f4889b 100644
--- a/matlab/TCV/gdat_tcv.m
+++ b/matlab/TCV/gdat_tcv.m
@@ -1373,10 +1373,11 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
                gdat_data_data_refs{i}.data_fullpath = params_eff.data_request;
              end
              params_eff.data_request = sprintf('\\atlas::top.system.gas.valve_0%.2d:flow',i);
-             gasrequest = gdat_tcv(gdat_data.shot,params_eff); gasrequest.units = 'V';
+             gasrequest = gdat_tcv(gdat_data.shot,params_eff);
              gdat_data_data{i} = gasrequest;
              if ~isempty(gasrequest.t) && isempty(gdat_data.t) % copy 1st non-empty
                gdat_data.units = gasrequest.units;
+               if isempty(strtrim(gdat_data.units)), gdat_data.units = 'particles/s'; end
                gdat_data.t = gasrequest.t;
                gdat_data.data_fullpath = gasrequest.data_fullpath;
              end
-- 
GitLab