Skip to content
Snippets Groups Projects
Commit 22a29996 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add comments

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1887 d63d8f72-b253-0410-a779-e742ad2e26cf
parent afc4e3fb
No related branches found
No related tags found
No related merge requests found
...@@ -16,3 +16,28 @@ mdsvalue('1+2') ...@@ -16,3 +16,28 @@ mdsvalue('1+2')
zmag.data=mdsvalue('_zmag=augsignal(shot,"FPG","Zmag")'); zmag.data=mdsvalue('_zmag=augsignal(shot,"FPG","Zmag")');
zmag.t=mdsvalue('dim_of(_aa,0)'); 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) ']'');'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment