diff --git a/code/classes/SCDclass_taskmdsloadprevADC.m b/code/classes/SCDclass_taskmdsloadprevADC.m index 8720ad93db03bfeb2e69eb0db7468b2ef2c4ff5e..c3350e4d793bd5cb6bd1a5c5daa300e34f8e581b 100644 --- a/code/classes/SCDclass_taskmdsloadprevADC.m +++ b/code/classes/SCDclass_taskmdsloadprevADC.m @@ -41,7 +41,11 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task switch(obj.node) case 2 - [~,value]=obj.getdataNode02ACQ196(shot); %% Here we need to switch betweeen old and new acquisition unit and tcv standard also + if shot<65113 + [~,value]=obj.getdataNode02ACQ196(shot); %% Here we need to switch betweeen old and new acquisition unit and tcv standard also + else + [~,value]=obj.getdataNode02tst(shot); %% Here we need to switch betweeen old and new acquisition unit and tcv standard also + end end end @@ -121,6 +125,33 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task end end + function [obj, value] = getdataNode02tst(obj, shot) + % TODO: this should go away as soon as we use the official rtc + % tree + mdsopen('rtctst',shot); + T=timeseries; + timebase=mdsvalue('dim_of(\top.tcvrt02.adc.adc_001)'); %% TODO: check with marte + d_time = double(mdsvalueraw( '\top.tcvrt02.params:d_time' ))*1.0e-6; + %timebase = round(timebase.*1/d_time)*d_time-d_time/2; + timebase = round(timebase.*1/d_time)*d_time-d_time/100; + T.Time=timebase; + T.Data=zeros(numel(timebase),192); + if obj.verbose==1 + fprintf('Getting data for bus: ''%s'' (%s, shot %d) ', obj.modelbus, obj.classname, shot); + end + for ii=1:192 + channelstr=sprintf('\\top.tcvrt02.adc.adc_%03d.raw',ii); + T.Data(:,ii)=int16(mdsvalue(channelstr)); + if obj.verbose==1 && mod(ii,4)==0 + fprintf('.'); + end + end + value=T; + if obj.verbose==1 + fprintf('\n'); + end + end + end end