write_waves_ITM

PURPOSE ^

LUKE_ITM - Function that writes LUKE results into the 'waves' CPO of ITM MDS+ database

SYNOPSIS ^

function [flag] = write_waves_ITM(remote_mode,numshot,numrun,LUKE_waves,iter,occurrence)

DESCRIPTION ^

LUKE_ITM - Function that writes LUKE results into the 'waves' CPO of ITM MDS+ database

Function that writes LUKE results into the 'waves' CPO of ITM MDS+ database

by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [flag] = write_waves_ITM(remote_mode,numshot,numrun,LUKE_waves,iter,occurrence)
0002 %LUKE_ITM - Function that writes LUKE results into the 'waves' CPO of ITM MDS+ database
0003 %
0004 %Function that writes LUKE results into the 'waves' CPO of ITM MDS+ database
0005 %
0006 %by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)
0007 %
0008 if nargin < 4,error('Not enough input arguments in write_waves_ITM.m');end
0009 %
0010 if nargin == 4,
0011     iter = 1;
0012     occurrence = 0;
0013 end
0014 %
0015 if nargin == 5,
0016     occurrence = 0;
0017 end
0018 %
0019 if remote_mode,
0020     import_ual;%done once only (each time a new matlab is called otherwise... crash)
0021 end
0022 %
0023 CPO = 'waves';
0024 %
0025 expIdx  = euitm_create('euitm',numshot,numrun);%recreate the database otherwise no refreshment when writing (4.09a problem apparently)
0026 euitm_close(expIdx,'euitm',numshot,numrun);
0027 %
0028 expIdx = euitm_open('euitm',numshot,numrun);%Open the ITM MDS+ database
0029 %
0030 nslices = length(LUKE_waves);
0031 %
0032 try
0033     if nslices > 1,
0034         %
0035         ITM_waves = CPO_gen(CPO,length(LUKE_waves));%the number of time slice
0036         %
0037         ITM_waves = LUKE_waves;
0038         %
0039         euitm_put(expIdx,CPO,ITM_waves);%write results in the 'waves' CPO
0040         %
0041     else
0042         expIdx = euitm_open('euitm',numshot,numrun);%Open the ITM MDS+ database
0043         %
0044         ITM_waves = CPO_gen(CPO,1);%One time slice only
0045         %
0046         ITM_waves = LUKE_waves;
0047         %
0048         if ~isempty(occurrence),
0049             if occurrence ~= 0,
0050                 CPO = [CPO,'/',num2str(occurrence)];
0051             end
0052         end
0053         %
0054         if iter == 1,
0055             euitm_put_non_timed(expIdx,CPO,ITM_waves);%write time-independent results in the 'waves' CPO
0056             euitm_put_slice(expIdx,CPO,ITM_waves);%write time-dependent results in the 'waves' CPO
0057         else
0058             euitm_put_slice(expIdx,CPO,ITM_waves);%write time-dependent results in the 'waves' CPO
0059         end
0060         %
0061     end
0062     %
0063     flag = 'Data structures for ''waves'' CPO successfully writen from the ITM-MDS+ database';
0064     %
0065 catch
0066     flag = 'Problem while writing into the ITM-MDS+ database';
0067 end
0068 %
0069 euitm_close(expIdx,'euitm',numshot,numrun);%Close the currently open database
0070

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.