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

simplify run_torbeam

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4454 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 0aa9c445
No related branches found
No related tags found
No related merge requests found
......@@ -47,23 +47,32 @@ end
if shot>0
pgyro=gdat(shot,'pgyro',1);
hhDCR = sfread('DCR', shot);
dousedcr = '';
if hhDCR.handle~=0;
dousedcr = '-usedcr';
disp('can usedcr since DCR shotfile exists');
else
disp('do not use dcr since DCR shotfile does not seem to exists')
end
run_with_IDA = 0;
% test if IDA present
hhIDA = sfread('IDA', shot);
dousebetapol = '-betapol';
if hhIDA.handle~=0;
netest=gdat(shot,'IDA/ne');
tetest=gdat(shot,'IDA/te');
if ~isempty(netest.data) && ~isempty(tetest.data)
run_with_IDA = 1;
dousebetapol = ''; % can use Te from IDA
dousedcr = ''; % can use ne from IDA
disp('use IDA since shotfile exists')
else
disp('do not use IDA since shotfile does not seem to exist')
end
end
hhDLP = sfread('DLP', shot);
dousedcr = '';
if hhDLP.handle~=0;
dousedcr = '-usedcr';
disp('can usedcr since DLP shotfile exists');
else
disp('do not use IDA since shotfile does not seem to exist')
end
for igyro=1:8
......@@ -79,19 +88,9 @@ if shot>0
disp(['running system ' num2str(igyro) '...']);
for j=1:length(itt_tok)
if pgyro_tok(j)>1e5
if run_with_IDA==0
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -usedcr -eqdiag EQI -betapol -usemirror -cdrive 1 >> ' ['.' filename]]);
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm -usedcr -eqdiag EQI -betapol -usemirror -cdrive 1 >> ' ['.' filename]]);
[a,b]=unix(['~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm ' dousedcr ' -eqdiag EQI -betapol -usemirror -cdrive 1 >> ' ['.' filename]]);
else
% -shot 29672 -time 3.0 -system 5 -batch -ntm -silent -usemirror -cdrive 1
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm -usemirror -cdrive 1 >> ' ['.' filename]]);
[a,b]=unix(['~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm -usemirror -cdrive 1 >> ' ['.' filename]]);
end
[a,b]=unix(['~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm ' dousedcr ' ' dousebetapol ' -eqdiag EQH -usemirror -cdrive 1 >> ' ['.' filename]]); % -exp AUGE
end
end
% [a,b]=unix(['grep -v ''could not''' ' .' filename '| grep -v ''invalid'' | grep -v ''Error'' | egrep -e ''^$'' -v > ' filename]);
[a,b]=unix(['egrep -e ''^Shot''' ' .' filename ' > ' filename]);
end
end
......@@ -122,3 +121,14 @@ if exist('tbout');
end
fig_handles=plot_torbeam(torbeam_out_struct);
% comments for hiytory backup:
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -usedcr -eqdiag EQI -betapol -usemirror -cdrive 1 >> ' ['.' filename]]);
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm -usedcr -eqdiag EQI -betapol -usemirror -cdrive 1 >> ' ['.' filename]]);
% -shot 29672 -time 3.0 -system 5 -batch -ntm -silent -usemirror -cdrive 1
% [a,b]=unix(['ssh sxaug21.aug.ipp.mpg.de ~rem/public/tbm_demo/tbmdemo -batch -silent -shot ' num2str(shot) ' -time ' num2str(time_array(itt_tok(j))) ' -system ' num2str(igyro) ' -ntm -usemirror -cdrive 1 >> ' ['.' filename]]);
% [a,b]=unix(['grep -v ''could not''' ' .' filename '| grep -v ''invalid'' | grep -v ''Error'' | egrep -e ''^$'' -v > ' filename]);
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