From 22a29996064494fe2eb46a45cfd45d9926f5cfe7 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Tue, 28 May 2002 16:01:03 +0000
Subject: [PATCH] add comments

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1887 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 AUG/README_mdsplus | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/AUG/README_mdsplus b/AUG/README_mdsplus
index 08d1a0ab..6797cef0 100644
--- a/AUG/README_mdsplus
+++ b/AUG/README_mdsplus
@@ -16,3 +16,28 @@ mdsvalue('1+2')
 zmag.data=mdsvalue('_zmag=augsignal(shot,"FPG","Zmag")');
 zmag.t=mdsvalue('dim_of(_aa,0)');
 
+
+To get subsets of points:
+
+Thanks to Xavier Llobet I have succeeded in fetching only every nth point of the SXR trace. For other purposes a filter would be better so a tdi function should be performed to do it locally, may be it exists already.
+
+In any case, for what I wanted to do, here is the solution:
+
+(Create _sxr data and dimensions on remote host, fetch channel numbers only)
+sxr_channels=mdsvalue('_sxr=augsignal(15133,"SXR","B");_sxr_t=dim_of(_sxr,0);_sxr_chan=dim_of(_sxr,1)');
+
+nth=12;
+
+(use "data" function to remove complicated relation between _sxr array and its dimensions. This relation depends on how the build_signal was used to create the signal. Note Xavier has important suggestion on how to build the dimensions such as to save space in compression, etc, for those interested)
+
+sxr_full_t_dim=mdsvalue('_sxrdata=data(_sxr);size(_sxrdata,0)');
+
+(at this point _sxrdata has just the values and the dimensions are just the indices 0...N, etc, so we can use the array extraction to take every nth point for all channels:)
+
+sxr_data=mdsvalue('_sxrdata[0:sxr_full_t_dim-1:nth,*]');
+eval(['sxr_data=mdsvalue(''_sxrdata[0:' num2str(sxr_full_t_dim-1) ':' num2str(nth) ',*]'');'])
+
+Same for time array
+sxr_data_t=mdsvalue('_sxr_t[0:sxr_full_t_dim-1:nth]');
+eval(['sxr_data_t=mdsvalue(''_sxr_t[0:' num2str(sxr_full_t_dim-1) ':' num2str(nth) ']'');'])
+
-- 
GitLab