From 5cfc9cd66e1fa308a14ad6fbfd26caa677df1009 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Fri, 28 Jun 2019 09:12:14 +0000 Subject: [PATCH] rm obsolete crpptbx_new, used when changing gdat to new structure git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@12239 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx_new/AUG/AUG_innerouterwall.data | 115 -- crpptbx_new/AUG/AUG_innerwall.data | 72 - crpptbx_new/AUG/AUG_outerwall.data | 42 - crpptbx_new/AUG/README_mdsplus | 43 - crpptbx_new/AUG/TRANSP_signals.m | 585 ------- crpptbx_new/AUG/adaptPFM_rda.m | 17 - crpptbx_new/AUG/adapt_rda.m | 22 - crpptbx_new/AUG/aug_requests_mapping.m | 169 -- crpptbx_new/AUG/gdat_aug.m | 426 ----- crpptbx_new/AUG/geteqdskAUG.m | 111 -- crpptbx_new/AUG/loadAUGdata.m | 1562 ------------------ crpptbx_new/AUG/plot_torbeam.m | 64 - crpptbx_new/AUG/rdaAUG_eff.m | 169 -- crpptbx_new/AUG/run_torbeam_fullshot.m | 135 -- crpptbx_new/AUG/sxrageometry.m | 66 - crpptbx_new/AUG/sxrbgeometry.m | 66 - crpptbx_new/JET/MatlabvesselcoordsJET.txt | 164 -- crpptbx_new/JET/Ra_rho_t.m | 84 - crpptbx_new/JET/geteqdskJET.m | 311 ---- crpptbx_new/JET/jet_mkiigb_wall_coords.data | 143 -- crpptbx_new/JET/jet_mkiigb_wall_coords2.m | 142 -- crpptbx_new/JET/loadJETdata.m | 648 -------- crpptbx_new/JET/mapflux_fast.m | 110 -- crpptbx_new/JET/psinrzjet.m | 138 -- crpptbx_new/JET/psirz.m | 185 --- crpptbx_new/JET/rda_eff.m | 189 --- crpptbx_new/KSTAR/loadKSTARdata.m | 639 ------- crpptbx_new/TCV/VsxrTCVradius.m | 24 - crpptbx_new/TCV/ece_te.m | 67 - crpptbx_new/TCV/gdat_tcv.m | 1170 ------------- crpptbx_new/TCV/get_xtomo_data.m | 496 ------ crpptbx_new/TCV/loadTCVdata.m | 1423 ---------------- crpptbx_new/TCV/private/angular_fact_1.mat | Bin 3664 -> 0 bytes crpptbx_new/TCV/private/bad_channels.mat | Bin 28504 -> 0 bytes crpptbx_new/TCV/private/common_ece.m | 75 - crpptbx_new/TCV/private/ece_bad_channels.m | 19 - crpptbx_new/TCV/private/ece_calib.m | 155 -- crpptbx_new/TCV/private/ece_conf.m | 85 - crpptbx_new/TCV/private/ece_d.m | 51 - crpptbx_new/TCV/private/ece_mode.m | 99 -- crpptbx_new/TCV/private/ece_raw_signals.m | 408 ----- crpptbx_new/TCV/private/ece_rho.m | 129 -- crpptbx_new/TCV/private/get_xtomo_gains.m | 87 - crpptbx_new/TCV/private/tcv_vesc1.mat | Bin 3488 -> 0 bytes crpptbx_new/TCV/private/thom_rho.m | 255 --- crpptbx_new/TCV/private/writeece.m | 8 - crpptbx_new/TCV/tcv_requests_mapping.m | 275 --- crpptbx_new/TCV/xtomo_geometry.m | 402 ----- crpptbx_new/examples.m | 54 - crpptbx_new/gdat.m | 181 -- crpptbx_new/gdat_data_request_names.xlsx | Bin 11917 -> 0 bytes crpptbx_new/gdat_data_request_names_rho.xlsx | Bin 12190 -> 0 bytes crpptbx_new/gdat_plot.m | 41 - crpptbx_new/get_data_request_names.m | 45 - crpptbx_new/subcall_all2str.m | 59 - crpptbx_new/test_all_requestnames.m | 12 - 56 files changed, 12037 deletions(-) delete mode 100644 crpptbx_new/AUG/AUG_innerouterwall.data delete mode 100644 crpptbx_new/AUG/AUG_innerwall.data delete mode 100644 crpptbx_new/AUG/AUG_outerwall.data delete mode 100644 crpptbx_new/AUG/README_mdsplus delete mode 100644 crpptbx_new/AUG/TRANSP_signals.m delete mode 100644 crpptbx_new/AUG/adaptPFM_rda.m delete mode 100644 crpptbx_new/AUG/adapt_rda.m delete mode 100644 crpptbx_new/AUG/aug_requests_mapping.m delete mode 100644 crpptbx_new/AUG/gdat_aug.m delete mode 100644 crpptbx_new/AUG/geteqdskAUG.m delete mode 100644 crpptbx_new/AUG/loadAUGdata.m delete mode 100644 crpptbx_new/AUG/plot_torbeam.m delete mode 100644 crpptbx_new/AUG/rdaAUG_eff.m delete mode 100644 crpptbx_new/AUG/run_torbeam_fullshot.m delete mode 100644 crpptbx_new/AUG/sxrageometry.m delete mode 100644 crpptbx_new/AUG/sxrbgeometry.m delete mode 100644 crpptbx_new/JET/MatlabvesselcoordsJET.txt delete mode 100644 crpptbx_new/JET/Ra_rho_t.m delete mode 100644 crpptbx_new/JET/geteqdskJET.m delete mode 100644 crpptbx_new/JET/jet_mkiigb_wall_coords.data delete mode 100644 crpptbx_new/JET/jet_mkiigb_wall_coords2.m delete mode 100644 crpptbx_new/JET/loadJETdata.m delete mode 100644 crpptbx_new/JET/mapflux_fast.m delete mode 100644 crpptbx_new/JET/psinrzjet.m delete mode 100644 crpptbx_new/JET/psirz.m delete mode 100644 crpptbx_new/JET/rda_eff.m delete mode 100644 crpptbx_new/KSTAR/loadKSTARdata.m delete mode 100644 crpptbx_new/TCV/VsxrTCVradius.m delete mode 100755 crpptbx_new/TCV/ece_te.m delete mode 100644 crpptbx_new/TCV/gdat_tcv.m delete mode 100755 crpptbx_new/TCV/get_xtomo_data.m delete mode 100644 crpptbx_new/TCV/loadTCVdata.m delete mode 100755 crpptbx_new/TCV/private/angular_fact_1.mat delete mode 100755 crpptbx_new/TCV/private/bad_channels.mat delete mode 100755 crpptbx_new/TCV/private/common_ece.m delete mode 100755 crpptbx_new/TCV/private/ece_bad_channels.m delete mode 100755 crpptbx_new/TCV/private/ece_calib.m delete mode 100755 crpptbx_new/TCV/private/ece_conf.m delete mode 100755 crpptbx_new/TCV/private/ece_d.m delete mode 100755 crpptbx_new/TCV/private/ece_mode.m delete mode 100755 crpptbx_new/TCV/private/ece_raw_signals.m delete mode 100755 crpptbx_new/TCV/private/ece_rho.m delete mode 100755 crpptbx_new/TCV/private/get_xtomo_gains.m delete mode 100644 crpptbx_new/TCV/private/tcv_vesc1.mat delete mode 100755 crpptbx_new/TCV/private/thom_rho.m delete mode 100755 crpptbx_new/TCV/private/writeece.m delete mode 100644 crpptbx_new/TCV/tcv_requests_mapping.m delete mode 100644 crpptbx_new/TCV/xtomo_geometry.m delete mode 100644 crpptbx_new/examples.m delete mode 100644 crpptbx_new/gdat.m delete mode 100644 crpptbx_new/gdat_data_request_names.xlsx delete mode 100644 crpptbx_new/gdat_data_request_names_rho.xlsx delete mode 100644 crpptbx_new/gdat_plot.m delete mode 100644 crpptbx_new/get_data_request_names.m delete mode 100644 crpptbx_new/subcall_all2str.m delete mode 100644 crpptbx_new/test_all_requestnames.m diff --git a/crpptbx_new/AUG/AUG_innerouterwall.data b/crpptbx_new/AUG/AUG_innerouterwall.data deleted file mode 100644 index d2fdf0b1..00000000 --- a/crpptbx_new/AUG/AUG_innerouterwall.data +++ /dev/null @@ -1,115 +0,0 @@ -% RR ZZ (through tdic augvessel(28215)) -2.521000 0.000000 -2.505910 0.210064 -2.460960 0.415815 -2.387070 0.613032 -2.285760 0.797666 -2.159100 0.965927 -2.009700 1.114360 -1.840610 1.239920 -1.840680 1.239890 -1.705260 1.302920 -1.558120 1.328610 -1.409360 1.315190 -1.269190 1.263590 -1.147240 1.177340 -1.051880 1.062380 -0.989661 0.926584 -0.964858 0.779291 -0.964798 0.778768 -0.957132 0.519238 -0.952534 0.259636 -0.951000 0.000003 -0.952534 -0.259635 -0.957132 -0.519237 -0.964798 -0.778767 -0.964858 -0.779291 -0.989661 -0.926584 -1.051880 -1.062380 -1.147240 -1.177340 -1.269190 -1.263590 -1.409360 -1.315190 -1.558120 -1.328610 -1.705260 -1.302920 -1.840680 -1.239890 -1.840610 -1.239920 -2.009700 -1.114360 -2.159100 -0.965927 -2.285760 -0.797666 -2.387070 -0.613032 -2.460960 -0.415815 -2.505910 -0.210063 -2.521000 0.000000 -% RR ZZ (by clicking on plot) -2.201873 0.069525 -2.204467 0.159907 -2.191499 0.274623 -2.165562 0.368482 -2.137032 0.441483 -2.105908 0.504056 -2.150000 0.552723 -1.971037 0.865585 -1.867291 0.935110 -1.779107 1.074160 -1.504179 1.185400 -1.408213 1.171495 -1.366715 1.174971 -1.327810 1.108922 -1.335591 1.088065 -1.288905 1.022016 -1.247406 0.962920 -1.208501 0.893395 -1.185159 0.813441 -1.167003 0.761298 -1.146254 0.702202 -1.122911 0.632677 -1.112536 0.563152 -1.094380 0.500579 -1.081412 0.438007 -1.068444 0.368482 -1.058069 0.298957 -1.055476 0.232908 -1.047695 0.159907 -1.045101 0.100811 -1.047695 0.020857 -1.045101 -0.045191 -1.047695 -0.114716 -1.047695 -0.184241 -1.058069 -0.243337 -1.065850 -0.312862 -1.071037 -0.378911 -1.086599 -0.451912 -1.096974 -0.504056 -1.112536 -0.577057 -1.073631 -0.636153 -1.078818 -0.663963 -1.138473 -0.650058 -1.187752 -0.726535 -1.250000 -0.820394 -1.262968 -0.848204 -1.275937 -0.869061 -1.294092 -0.924681 -1.288905 -0.969873 -1.283718 -1.004635 -1.237032 -1.119351 -1.281124 -1.122827 -1.327810 -1.060255 -1.460086 -1.063731 -1.460086 -1.060255 -1.558646 -1.168019 -1.574207 -1.223638 -1.600144 -1.227115 -1.636455 -0.997683 -1.644236 -0.959444 -1.675360 -0.907300 -1.709078 -0.862109 -1.747983 -0.830823 -1.991787 -0.552723 -1.989193 -0.517961 -2.028098 -0.458864 -2.067003 -0.403244 -2.100720 -0.337196 -2.147406 -0.232908 -2.170749 -0.159907 -2.191499 -0.045191 -2.201873 0.069525 diff --git a/crpptbx_new/AUG/AUG_innerwall.data b/crpptbx_new/AUG/AUG_innerwall.data deleted file mode 100644 index 663bc7e6..00000000 --- a/crpptbx_new/AUG/AUG_innerwall.data +++ /dev/null @@ -1,72 +0,0 @@ -% RR ZZ (by clicking on plot) -1.460086 -1.060255 -1.558646 -1.168019 -1.574207 -1.223638 -1.600144 -1.227115 -1.636455 -0.997683 -1.644236 -0.959444 -1.675360 -0.907300 -1.709078 -0.862109 -1.747983 -0.830823 -1.991787 -0.552723 -1.989193 -0.517961 -2.028098 -0.458864 -2.067003 -0.403244 -2.100720 -0.337196 -2.147406 -0.232908 -2.170749 -0.159907 -2.191499 -0.045191 -2.201873 0.069525 -2.204467 0.159907 -2.191499 0.274623 -2.165562 0.368482 -2.137032 0.441483 -2.105908 0.504056 -2.150000 0.552723 -1.971037 0.865585 -1.867291 0.935110 -1.779107 1.074160 -1.504179 1.185400 -1.408213 1.171495 -1.366715 1.174971 -1.327810 1.108922 -1.335591 1.088065 -1.288905 1.022016 -1.247406 0.962920 -1.208501 0.893395 -1.185159 0.813441 -1.167003 0.761298 -1.146254 0.702202 -1.122911 0.632677 -1.112536 0.563152 -1.094380 0.500579 -1.081412 0.438007 -1.068444 0.368482 -1.058069 0.298957 -1.055476 0.232908 -1.047695 0.159907 -1.045101 0.100811 -1.047695 0.020857 -1.045101 -0.045191 -1.047695 -0.114716 -1.047695 -0.184241 -1.058069 -0.243337 -1.065850 -0.312862 -1.071037 -0.378911 -1.086599 -0.451912 -1.096974 -0.504056 -1.112536 -0.577057 -1.073631 -0.636153 -1.078818 -0.663963 -1.138473 -0.650058 -1.187752 -0.726535 -1.250000 -0.820394 -1.262968 -0.848204 -1.275937 -0.869061 -1.294092 -0.924681 -1.288905 -0.969873 -1.283718 -1.004635 -1.237032 -1.119351 -1.281124 -1.122827 -1.327810 -1.060255 -1.460086 -1.063731 diff --git a/crpptbx_new/AUG/AUG_outerwall.data b/crpptbx_new/AUG/AUG_outerwall.data deleted file mode 100644 index e6f06860..00000000 --- a/crpptbx_new/AUG/AUG_outerwall.data +++ /dev/null @@ -1,42 +0,0 @@ -% RR ZZ (through tdic augvessel(28215)) -2.521000 0.000000 -2.505910 0.210064 -2.460960 0.415815 -2.387070 0.613032 -2.285760 0.797666 -2.159100 0.965927 -2.009700 1.114360 -1.840610 1.239920 -1.840680 1.239890 -1.705260 1.302920 -1.558120 1.328610 -1.409360 1.315190 -1.269190 1.263590 -1.147240 1.177340 -1.051880 1.062380 -0.989661 0.926584 -0.964858 0.779291 -0.964798 0.778768 -0.957132 0.519238 -0.952534 0.259636 -0.951000 0.000003 -0.952534 -0.259635 -0.957132 -0.519237 -0.964798 -0.778767 -0.964858 -0.779291 -0.989661 -0.926584 -1.051880 -1.062380 -1.147240 -1.177340 -1.269190 -1.263590 -1.409360 -1.315190 -1.558120 -1.328610 -1.705260 -1.302920 -1.840680 -1.239890 -1.840610 -1.239920 -2.009700 -1.114360 -2.159100 -0.965927 -2.285760 -0.797666 -2.387070 -0.613032 -2.460960 -0.415815 -2.505910 -0.210063 -2.521000 0.000000 diff --git a/crpptbx_new/AUG/README_mdsplus b/crpptbx_new/AUG/README_mdsplus deleted file mode 100644 index 6797cef0..00000000 --- a/crpptbx_new/AUG/README_mdsplus +++ /dev/null @@ -1,43 +0,0 @@ -To connect from JET to IPP with mdsplus: - -need 2 windows - -1st window, create tunneling with slogin: - -slogin -losauter -L 8001:seaug.ipp.mpg.de:8000 gate1.aug.ipp.mpg.de -(mdsplus too slow now) - -In other window, open matlab and do: -mdsconnect('localhost:8001') - -To check the connection: -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) ']'');']) - diff --git a/crpptbx_new/AUG/TRANSP_signals.m b/crpptbx_new/AUG/TRANSP_signals.m deleted file mode 100644 index b90136d2..00000000 --- a/crpptbx_new/AUG/TRANSP_signals.m +++ /dev/null @@ -1,585 +0,0 @@ -%Setup ; Parameter-Set ; Namelist parameters and switches -%NBIpar ; Parameter-Set ; Parameters of Neutral Beam Injection -clear transp_sig -i=0; -i=i+1;transp_sig{i,1}= 'TIME'; transp_sig{i,2}='Time-Base'; transp_sig{i,3}='Time grid of time traces'; -i=i+1;transp_sig{i,1}= 'ALPC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAG:ALPHA, CALCULATED [ ]'; -i=i+1;transp_sig{i,1}= 'ASHAF'; transp_sig{i,2}='Signal'; transp_sig{i,3}='SHAFRANOV AXIS SHIFT [CM ]'; -i=i+1;transp_sig{i,1}= 'BBNTS'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM-BEAM NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BBPAR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM BETA(POLOIDAL) PLL [ ]'; -i=i+1;transp_sig{i,1}= 'BBPER'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM BETA(POLOIDAL) PERP [ ]'; -i=i+1;transp_sig{i,1}= 'BDNDT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D/DT(FAST ION POPULATION) [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDNDTX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D/DT(FAST IONS OUTSIDE PLASMA) [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BETAE'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELECTRON BETA (POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BETAI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='THERMAL ION BETA POLOIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BETAR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ROTATION BETA (POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BETAT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL BETA(POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BPCAP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM POWER CAPTURED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCI0'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX SCE POWER (INT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCPR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: COMPRESSION OF FAST IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCRI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX RECAPTURE (INT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCRX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX RECAPTURE (EXT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCX0'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX SCE POWER (EXT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCXE'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX TRACKER ERROR [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCXI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION POWER TO CX (INT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPCXX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION POWER TO CX (EXT) [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPDA1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='1D DIAMAGNETIC BETA(POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BPDC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='KINETIC BETA(DIA) [ ]'; -i=i+1;transp_sig{i,1}= 'BPDIA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='DIAMAGNETIC BETA(POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BPDM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAGNETICS EST. BETA(DIA) [ ]'; -i=i+1;transp_sig{i,1}= 'BPEPHI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Electrostatic field -> fast ions [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPEPHI_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELECTROSTATIC ACCEL.: D BEAM [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPEQ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='EQUILIBRIUM BETA(POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BPERR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION ORBIT POWER ERROR [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPFASTPA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL FAST ION BETA(POL) PLL [ ]'; -i=i+1;transp_sig{i,1}= 'BPFASTPP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL FAST ION BETA(POL) PERP [ ]'; -i=i+1;transp_sig{i,1}= 'BPHCK'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. BALANCE CHECK [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHCL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. COLLISIONAL TORQUE [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHCX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. CX LOSS [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHDFB_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM: ANOM.DIFF. TORQUE [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHDP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. DEPOSITION [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHER'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ORBIT TORQUE ERROR [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION ANGULAR MOMENTUM [NT-M-SEC ]'; -i=i+1;transp_sig{i,1}= 'BPHOH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. FROM OH [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHOR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. ORBIT LOSS [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHRC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. CX RECAPTURE [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHST'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. ANGULAR MOMENTUM GAIN [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHTH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. THERMALIZATION [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHTO'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL FAST ION HEATING [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPHW0'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. NEUTRAL ESCAPE [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPHXB'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FI ROT. JXB TORQUE [NT-M ]'; -i=i+1;transp_sig{i,1}= 'BPLIM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION ORBIT LOSS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPOH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: OH CIRCUIT TO FAST IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPSHI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION SHINE-THRU POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPST'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION POWER STORED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPTE'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM POWER TO ELECTRONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPTH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION POWER THERMALIZED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BPTI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM POWER TO IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'BSBAL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION PTCL BALANCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BSNXI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX SINK (INT) [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BSNXO'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX SINK (EXT) [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BSORB'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION ORBIT LOSSES [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BSTH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION THERMALIZATIONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BTDIA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='DIAMAGNETIC BETA(TOROIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BTEQ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='EQUILIBRIUM BETA(TOROIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'BTNTS'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM-TARGET NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BTNTS_DD'; transp_sig{i,2}='Signal'; transp_sig{i,3}='DD BEAM-TARGET NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'BZ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BZ @R=RMAJOR OUTSIDE PLASMA [TESLA ]'; -i=i+1;transp_sig{i,1}= 'BZXR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='VACUUM FIELD "BZ*R" [TESLA*CM ]'; -i=i+1;transp_sig{i,1}= 'BZXRC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CALCULATED VACUUM FIELD "BZ*R" [TESLA*CM ]'; -i=i+1;transp_sig{i,1}= 'CPTIM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CPU TIME USED SO FAR [HOURS ]'; -i=i+1;transp_sig{i,1}= 'DFLUX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='COMPUTED DIAMAGNETIC FLUX [WEBERS ]'; -i=i+1;transp_sig{i,1}= 'DT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ENERGY BALANCE TIMESTEP [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'DTG'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TIMESTEP FOR GEO & SOURCES [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'DTPROFIL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TIME SPACING FOR PROFILE OUTPUT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'DTSCALAR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TIME SPACING FOR SCALAR OUTPUT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'E0INR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='T0 (RECYCLING) @EDGE [EV ]'; -i=i+1;transp_sig{i,1}= 'ECEGAP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ECE B(R) monotonicity gap [CM ]'; -i=i+1;transp_sig{i,1}= 'EINJ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAX INITIAL BEAM ENERGY [EV ]'; -i=i+1;transp_sig{i,1}= 'EINJAV_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D: avg full injection energy [EV ]'; -i=i+1;transp_sig{i,1}= 'ELDOT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELDOT: GRID MOTION [1/SEC ]'; -i=i+1;transp_sig{i,1}= 'FLSTA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FALSI ERROR CODE [0=NORMAL ]'; -i=i+1;transp_sig{i,1}= 'GASD'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D0 GAS FLOW SOURCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'GASH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='H0 GAS FLOW SOURCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'GSERROR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='REL.EQUIL.GRAD-SHAFRANOV ERROR [ ]'; -i=i+1;transp_sig{i,1}= 'HIO2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='INDUCTANCE (HI/2) [ ]'; -i=i+1;transp_sig{i,1}= 'IPXVS'; transp_sig{i,2}='Signal'; transp_sig{i,3}='PCUR * VSUR [WATTS ]'; -i=i+1;transp_sig{i,1}= 'KAINT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='K(ALPHA) LINE INTENSITY [ARB.UNITS ]'; -i=i+1;transp_sig{i,1}= 'KATX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='COMPUTED K(ALPHA) T(IMPURITY) [EV ]'; -i=i+1;transp_sig{i,1}= 'L2PB1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='1D DEFINITION LI/2+BETA [ ]'; -i=i+1;transp_sig{i,1}= 'LAMDC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='KINETIC+J EST. LAMDA [ ]'; -i=i+1;transp_sig{i,1}= 'LAMDM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAGNETICS EST. LAMDA [ ]'; -i=i+1;transp_sig{i,1}= 'LI2PB'; transp_sig{i,2}='Signal'; transp_sig{i,3}='LI/2 + BETA(POLOIDAL) [ ]'; -i=i+1;transp_sig{i,1}= 'LIO2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='INDUCTANCE (LI/2) [ ]'; -i=i+1;transp_sig{i,1}= 'LIO21'; transp_sig{i,2}='Signal'; transp_sig{i,3}='1D DEFINITION OF LI/2 [ ]'; -i=i+1;transp_sig{i,1}= 'LIO2C'; transp_sig{i,2}='Signal'; transp_sig{i,3}='LI/2 (COMPUTED FROM J PROFILE) [ ]'; -i=i+1;transp_sig{i,1}= 'LIO2M'; transp_sig{i,2}='Signal'; transp_sig{i,3}='LI/2 (MAGNETICS DATA ESTIMATE) [ ]'; -i=i+1;transp_sig{i,1}= 'MUIC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TRANSP EST. MU(DIA) MHD EQ [ ]'; -i=i+1;transp_sig{i,1}= 'MUIM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAGNETICS EST. MU(DIA) [ ]'; -i=i+1;transp_sig{i,1}= 'NEUTT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'NEUTX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='THERMONUCLEAR NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'NEUTX_DD'; transp_sig{i,2}='Signal'; transp_sig{i,3}='DD THERMONUCLEAR NEUTRONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'NMCLOSS_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam D MC Prompt Loss [N ]'; -i=i+1;transp_sig{i,1}= 'NMCTOT_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam D Total MC Ions [N ]'; -i=i+1;transp_sig{i,1}= 'P0BAL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='NEUTRAL POWER BALANCE CHECK [WATTS ]'; -i=i+1;transp_sig{i,1}= 'P0CXT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL CX POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'P0ESC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='NEUTRAL POWER ESCAPED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'P0FIN'; transp_sig{i,2}='Signal'; transp_sig{i,3}='NEUTRAL INFLUX POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'P0INZ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='NEUTRAL POWER IONIZED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'P0RFL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='NEUTRAL POWER REFLECTED IN [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PAREA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='PLASMA CROSS SECTION AREA [CM**2 ]'; -i=i+1;transp_sig{i,1}= 'PCUR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MEASURED PLASMA CURRENT [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PCURC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CALCULATED PLASMA CURRENT [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PCUREQ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='EQ PLASMA CURRENT [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PEEDG'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELECTRON ENERGY VIA BDY [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECHT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ECRF ELECTRON HEATING [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ECRF INPUT POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 1 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 2 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN3'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 3 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN4'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 4 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN5'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 5 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN6'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 6 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN7'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 7 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PECIN8'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER FROM GYRO 8 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHA1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER ON ICRF ANTENNA #1 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHA2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER ON ICRF ANTENNA #2 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHA3'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER ON ICRF ANTENNA #3 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHA4'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER ON ICRF ANTENNA #4 [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHBAL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='RF POWER BALANCE [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHE'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: ICH DIRECT TO ELECTRONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHEXT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='RF POWER BEYOND SEPARATRIX [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHFAST'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: ICH DIRECT TO Fast ions [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHI'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: ICH DIRECT TO TH.IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHMC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: ICH TO MODE CONVERSION [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHMIN'; transp_sig{i,2}='Signal'; transp_sig{i,3}='POWER: ICH TO MINORITY IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PICHTOT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL ICRF ANTENNA POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PIEDG'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ION ENERGY VIA BDY [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='BEAM POWER INJECTED [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ01'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#01(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ02'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#02(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ03'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#03(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ04'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#04(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ05'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#05(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ06'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#06(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ07'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#07(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PINJ08'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam#08(D) injected power [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PLFLXA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ENCLOSED POLOIDAL FLUX [WEBERS ]'; -i=i+1;transp_sig{i,1}= 'POHT'; transp_sig{i,2}='Signal'; transp_sig{i,3}='OHMIC INPUT POWER [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PRFB_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='RF POWER -> D BEAM IONS [WATTS ]'; -i=i+1;transp_sig{i,1}= 'PVOL'; transp_sig{i,2}='Signal'; transp_sig{i,3}='PLASMA VOLUME [CM**3 ]'; -i=i+1;transp_sig{i,1}= 'RAXIS'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAJOR RADIUS OF MAG. AXIS [CM ]'; -i=i+1;transp_sig{i,1}= 'RCYD'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D0 RECYCLING SOURCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'RCYH'; transp_sig{i,2}='Signal'; transp_sig{i,3}='H0 RECYCLING SOURCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'RTPC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAG:RT, CALCULATED [CM ]'; -i=i+1;transp_sig{i,1}= 'RTXUV'; transp_sig{i,2}='Signal'; transp_sig{i,3}='UV DOPPLER TI RADIUS [CM ]'; -i=i+1;transp_sig{i,1}= 'RZITER'; transp_sig{i,2}='Signal'; transp_sig{i,3}='RZSOLVER iterations [ ]'; -i=i+1;transp_sig{i,1}= 'SBCX0MC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM CX NEUTRALS LAUNCHED [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXBAL_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM CX NEUTRAL PTCL BAL [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXESC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM CX NEUTRALS ESCAPED [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXRMC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM CX MC IONS RECAPTURED [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXRR_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM CX NEUTRALS "R.R." [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CX FAST ION LOSS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDBBCX_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP: BEAM-BEAM CX [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDBBIZ_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP: BEAM-BEAM IONIZ. [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPBA_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP PTCL BALANCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPCX_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP: CX W/THERMAL IONS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPIZ_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP: TH.IONIZATION [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPMC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM MC IONS DEPOSITED [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPRR_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM DEP "RUSSIAN ROULETTE" [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDEPSC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM TOTAL DEPOSITION SCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBDTBMC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM MC RATE OF CHANGE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBORBAL_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ORBIT PTCL BALANCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBORBRR_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ORBIT CODE "R.R." [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBRBBCX_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM RECAP: BEAM-BEAM CX [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBRBBIZ_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM RECAP: BEAM-BEAM IONIZ. [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBSHINE_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM SHINE-THROUGH [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRCCX_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM RECAP: TH.CX [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRCIZ_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM RECAP: TH.IONIZATION [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRCSC_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM TOTAL RECAPTURE SCE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SEEDG'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELECTRONS VIA BDY [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SFDEP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION SCE: DEPOSITION [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SFRCAP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST ION CX RECAPTURE [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SHFSC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CALCULATED S1+S2 [ ]'; -i=i+1;transp_sig{i,1}= 'SHFSM'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MAGNETICS EST. S1+S2 [ ]'; -i=i+1;transp_sig{i,1}= 'SINJ'; transp_sig{i,2}='Signal'; transp_sig{i,3}='FAST NEUTRALS INJECTED [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SNBXBB0_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ION CX W/ BEAM NEUTS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SNBXBB1_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ION CX W/ FAST CX NEUTS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SNBXTOT_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL D BEAM ION CX SINK [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SNBXV0_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ION CX SINK: HALO NEUTS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'SNBXW0_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D BEAM ION CX SINK: WALL NEUTS [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'TAUA1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ENERGY CONFINEMENT (TOTAL) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TAUEA'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ENERGY CONFINEMENT (THERMAL) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TAUEE'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ELECTRON ENERGY CONFINEMENT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TFLUX'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ENCLOSED TOROIDAL FLUX [WEBERS ]'; -i=i+1;transp_sig{i,1}= 'TOTDDN'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL D(D,N)HE3 FUSION [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'TOTDDP'; transp_sig{i,2}='Signal'; transp_sig{i,3}='TOTAL D(D,P)T FUSION [N/SEC ]'; -i=i+1;transp_sig{i,1}= 'TRAPB0_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D beam full E dep banana frac. [ ]'; -i=i+1;transp_sig{i,1}= 'TRAPB_D'; transp_sig{i,2}='Signal'; transp_sig{i,3}='D beam ions banana fraction [ ]'; -i=i+1;transp_sig{i,1}= 'TXUV'; transp_sig{i,2}='Signal'; transp_sig{i,3}='UV DOPPLER T(IMPURITY) [EV ]'; -i=i+1;transp_sig{i,1}= 'VISBC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CHORDAL VB LIGHT (CALCULATED) [VB UNITS ]'; -i=i+1;transp_sig{i,1}= 'VSUR'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MEAS.AVG. SURFACE VOLTAGE [VOLTS ]'; -i=i+1;transp_sig{i,1}= 'VSUR0'; transp_sig{i,2}='Signal'; transp_sig{i,3}='SURFACE VOLTAGE [VOLTS ]'; -i=i+1;transp_sig{i,1}= 'VSURC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='CALC.AVG. SURFACE VOLTAGE [VOLTS ]'; -i=i+1;transp_sig{i,1}= 'WNMCTOT_'; transp_sig{i,2}='Signal'; transp_sig{i,3}='Beam D Total MC Ions [#ptcls ]'; -i=i+1;transp_sig{i,1}= 'XBFAC'; transp_sig{i,2}='Signal'; transp_sig{i,3}='MHD BETA ADJUSTMENT FACTOR [ ]'; -i=i+1;transp_sig{i,1}= 'XIQ1'; transp_sig{i,2}='Signal'; transp_sig{i,3}='xi of Q=1 surface [ ]'; -i=i+1;transp_sig{i,1}= 'XIQ2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='xi of Q=2 surface [ ]'; -i=i+1;transp_sig{i,1}= 'XIQ3'; transp_sig{i,2}='Signal'; transp_sig{i,3}='xi of Q=3 surface [ ]'; -i=i+1;transp_sig{i,1}= 'XIQ3_2'; transp_sig{i,2}='Signal'; transp_sig{i,3}='xi of Q=3/2 surface [ ]'; -i=i+1;transp_sig{i,1}= 'YAXIS'; transp_sig{i,2}='Signal'; transp_sig{i,3}='ASYMMETRIC GEO: Y OF MAG. AXIS [CM ]'; -i=i+1;transp_sig{i,1}= 'YMPBDY'; transp_sig{i,2}='Signal'; transp_sig{i,3}='"MIDPLANE" Y OF ASYM BDY SURFACE [CMU ]'; -i=i+1;transp_sig{i,1}= 'TIME3'; transp_sig{i,2}='Time-Base'; transp_sig{i,3}='Time grid for profile data'; -i=i+1;transp_sig{i,1}= 'X'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='rho_tor (full radial resolution)'; -i=i+1;transp_sig{i,1}= 'AMOI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Total Therm Ang Inertia Dens [NtM2/CM3 ]'; -i=i+1;transp_sig{i,1}= 'BBETA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM BETA POLOIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BBNTX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM-BEAM NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDENS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM ION DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BDEPE_D1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FULL E D BEAM DEP (TOTAL) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDEPE_D2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='HALF E D BEAM DEP (TOTAL) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDEPE_D3'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='1/3 E D BEAM DEP (TOTAL) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDEP_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D BEAM DEPOSITION (TOTAL) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BN0T1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEUTRALS:1.GEN 1/1*EB [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BN0T2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEUTRALS:1.GEN 1/2*EB [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BN0T3'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEUTRALS:1.GEN 1/3*EB [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BTBE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BTE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BTI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BTNTX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM-TARGET NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BTPL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='PLASMA BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BTRAP0_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D beam full E dep banana frac. [ ]'; -i=i+1;transp_sig{i,1}= 'BTRAP_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D beam ions banana fraction [ ]'; -i=i+1;transp_sig{i,1}= 'BTROT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ROTATION BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'BTTOT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL BETA TOROIDAL [ ]'; -i=i+1;transp_sig{i,1}= 'CICHD_AL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH DIRECT CUR DRIVE [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CICHM_AL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH MINORITY CUR DRIVE [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CLOGE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON COULOMB LOG [ ]'; -i=i+1;transp_sig{i,1}= 'CLOGI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION COULOMB LOG [ ]'; -i=i+1;transp_sig{i,1}= 'CUR'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL PLASMA CURRENT [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DRIVEN CURRENT [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURBS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BOOTSTRAP CURRENT [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURBSEPS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Aspect Ratio Bootstrap Current [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURBSSAU'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Sauter Bootstrap Current [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURBSWNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NCLASS Bootstrap Current [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CURGP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GRAD(P) TOROIDAL CUR [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'CUROH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='OHMIC PLASMA CURRENT [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'DAREA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ZONE CROSS SECTIONAL AREA [CM**2 ]'; -i=i+1;transp_sig{i,1}= 'DIVFD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DIV(ION FLUX D+) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIVFE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DIV(ELECTRON FLUX) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIVFI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DIV(TOTAL ION FLUX) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'DN0VD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOL NEUTRAL DENSITY G=D [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'DN0VH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOL NEUTRAL DENSITY G=H [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'DN0WD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='WALL NEUTRAL DENS G=D [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'DN0WH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='WALL NEUTRAL DENS G=H [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'DNDDT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D/DT(ION DENS D+) [N/CM3/SEC]'; -i=i+1;transp_sig{i,1}= 'DVOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ZONE VOLUME [CM**3 ]'; -i=i+1;transp_sig{i,1}= 'EBEAM_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='AVG D BEAM ION ENERGY [EV ]'; -i=i+1;transp_sig{i,1}= 'ECCUR'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 1) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 2) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR3'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 3) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR4'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 4) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR5'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 5) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR6'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 6) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR7'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 7) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'ECCUR8'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH CURRENT (GYRO 8) [A/CM2 ]'; -i=i+1;transp_sig{i,1}= 'EHEAT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ELECTRON HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'ETA_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC RESISTIVITY (old fit) [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_SNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Sauter Neoclassical Resistivity [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_SP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='SPITZER RESISTIVITY [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_SPS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='SPITZER RESISTIVITY (Sauter) [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_TSC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TSC Neoclassical Resistivity [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_USE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RESISTIVITY USED OR INFERRED [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'ETA_WNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NCLASS Resistivity [OHM*CM ]'; -i=i+1;transp_sig{i,1}= 'FMCK_WNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NCLASS Fm convergence check [ ]'; -i=i+1;transp_sig{i,1}= 'FPAX_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D BEAM SCATTERING >IMPURITIES [ ]'; -i=i+1;transp_sig{i,1}= 'FPBX_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D BEAM DRAG >IMPURITIES [ ]'; -i=i+1;transp_sig{i,1}= 'FTOTDDN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL D(D,N)HE3 FUSION [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'FTOTDDP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL D(D,P)T FUSION [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'GAINE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON GAIN [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'GAINI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION GAIN [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'GMAG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GMAG (RT) PRESSURE PROFILE [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'GR2X2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='<R**2*GRAD(XI)**2> FLX.SURF.AVG [ ]'; -i=i+1;transp_sig{i,1}= 'GXI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='<GRAD(XI)> FLUX SURF VOL.AVG [CM**-1 ]'; -i=i+1;transp_sig{i,1}= 'GXI2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='<GRAD(XI)**2> FLUX SURF VOL.AVG [CM**-2 ]'; -i=i+1;transp_sig{i,1}= 'IHEAT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ION HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'JBFAC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Species avg Jb shielding [ ]'; -i=i+1;transp_sig{i,1}= 'JBFACZ1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Z=1 Jb shielding [ ]'; -i=i+1;transp_sig{i,1}= 'M0NET'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NET CX MOMENTUM LOSS [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'MCONV'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CONVECTIVE TRANSPORT [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'MODOT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MOMENTUM GAIN [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'MVISC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VISCOUS TRANSPORT [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'N0BCXD0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CX FAST NEUTRAL DENSITY (D0) [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'N0BD0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='1.GEN FAST NEUTRAL DENSITY (D0) [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NB_F1_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='density: full energy D beam [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NB_F2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='density: half energy D beam [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NB_F3_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='density: 1/3 energy D beam [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NCFT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC trapping fraction (net) [ ]'; -i=i+1;transp_sig{i,1}= 'NCFTMINU'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC trapping fraction lower limit [ ]'; -i=i+1;transp_sig{i,1}= 'NCFTPLUS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC trapping fraction upper limit [ ]'; -i=i+1;transp_sig{i,1}= 'ND'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DEUTERIUM ION DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='HYDROGEN ION DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NHE4'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='HELIUM-4 ION DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ION DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NIMP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL IMPURITY DENSITY [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'NMC_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Beam D No. of MC Ions [N ]'; -i=i+1;transp_sig{i,1}= 'NUSTE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON COLLISIONALITY [ ]'; -i=i+1;transp_sig{i,1}= 'NUSTI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION COLLISIONALITY [ ]'; -i=i+1;transp_sig{i,1}= 'OMEGA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOROIDAL ANGULAR VELOCITY [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEGA_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='N.C. TOROIDAL ANGULAR VELOCITY [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEGB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM ION AVG ANG.VELOCITY [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEGB_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D BEAM ION AVG ANG.VELOCITY [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEGDATA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Toroidal Ang.Velocity Data [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'P0NET'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NET CHARGE EXCHANGE LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBCX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='THERMAL ION LOSS, FAST ION CX [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM HEATING OF ELECTRONS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBEPHI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Electrostatic field -> fast ions [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBE_F1_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbe: full energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBE_F2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbe: half energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBE_F3_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbe: 1/3 energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM HEATING OF IONS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBI_F1_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbi: full energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBI_F2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbi: half energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBI_F3_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Pbi: 1/3 energy D beam [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PBTH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION THERMALIZATION POWER [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCMPE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON COMPRESSION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCMPI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION COMPRESSION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCNDE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON CONDUCTION LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCNVE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON CONVECTION LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCOND'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION CONDUCTION LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCONV'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION CONVECTION LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCPRB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POWER: COMPRESSION OF FAST IONS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PCX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHARGE EXCHANGE LOSS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 1) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 2) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH3'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 3) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH4'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 4) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH5'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 5) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH6'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 6) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH7'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 7) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEECH8'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ECRH ELECTRON HEATING (GYRO 8) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PEICH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF ELECTRON HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PHBAL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ANGULAR MOMENTUM BALANCE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PICF01N0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF PWR, Nphi= 12, FREQ#1 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PICF02N0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF PWR, Nphi= 12, FREQ#2 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PICF03N0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF PWR, Nphi= 12, FREQ#3 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PICF04N0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF PWR, Nphi= 12, FREQ#4 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PIC_F1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RF PWR Absorbed, Freq.1 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PIC_F2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RF PWR Absorbed, Freq.2 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PIC_F3'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RF PWR Absorbed, Freq.3 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PIC_F4'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RF PWR Absorbed, Freq.4 [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PIICH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRF ION HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PION'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEUTRAL IONIZATION WORK [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PMHD_IN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='PRESSURE INPUT to MHD SOLVER [PASCALS ]'; -i=i+1;transp_sig{i,1}= 'PNI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEUTRAL IONIZATION SOURCE [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'POH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='OHMIC HEATING POWER [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'POHB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POWER: OH CIRCUIT TO FAST IONS [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PPLAS'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='PLASMA PRESSURE [PASCALS ]'; -i=i+1;transp_sig{i,1}= 'PRAD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NET RADIATED POWER [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PRADC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NET RADIATED POWER CALCULATED [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PRADS_TO'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOK Impurity Radiation [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PRAD_BR'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BREMSSTRAHLUNG RADIATION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PRAD_CY'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CYCLOTRON RADIATION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PRAD_LI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='LINE RADIATION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PTMIN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MINORITY TRANSPORT [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'PTOWB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='KINETIC MHD PRESSURE W/FAST IONS [PASCALS ]'; -i=i+1;transp_sig{i,1}= 'QICHA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ICH HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QICHE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH DIRECT ELECTRON HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QICHFAST'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH Heating of Beam & Fusn Ions [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QICHI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH DIRECT TH.ION HEATING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QICHMC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH HEATING BY MODE CONVERSION [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QICHMIN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH PWR TO MINORITY [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QIE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION-ELECTRON COUPLING [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'QMINICH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICRH Power (Renormalized QL0) [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'S0RCD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RECOMB NEUTRAL SCE G=D [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'S0RCH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RECOMB NEUTRAL SCE G=H [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'S0VLE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL NEUTRAL VOL SCE [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'S0VOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL NEUTRAL VOL E-SCE [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SB0ID'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D0 NEUTRAL SINK BEAM II [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SB0IH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='H0 NEUTRAL SINK BEAM II [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SB0XD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D0 NEUTRAL SINK BEAM CX [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SB0XH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='H0 NEUTRAL SINK BEAM CX [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCX0'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION CX: NEUTRALS BORN [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D0 NEUTRAL SOURCE BEAM CX [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBCXH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='H0 NEUTRAL SOURCE BEAM CX [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON SCE FAST ION DEPOSITION [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBHD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D+ ION SCE DUE TO BEAM [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBHH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='H+ ION SCE DUE TO BEAM [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBTH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION THERMALIZATION SOURCE [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBTOT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ION SCE(VOL. NEUTRALS) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION CX: BEAM-BEAM RECAPTURE [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM CX: RECAPTURE BY CX W/D+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXRH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM CX: RECAPTURE BY CX W/H+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXR_IE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RECAPTURE on electrons [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXR_II'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RECAPTURE on th.ions [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SBXR_IZ'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RECAPTURE on impurities [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SCEE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON SOURCE (TH.NEUTRALS) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SCEV'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON SCE (VOL. NEUTRALS) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SCEW'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON SCE (WALL NEUTRALS) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SCIMP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='IMPURITY SOURCE [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDBBI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEPOSITION: BEAM-BEAM II [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDBBX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEPOSITION: BEAM-BEAM CX [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDB_IE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEP: ioniz. on electrons [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDB_II'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEP: ioniz. on therm. ions [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDB_IZ'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEP: ioniz. on impurities [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDCXD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEPOSITION: CX W/D+ IONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SDCXH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM DEPOSITION: CX W/H+ IONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SERUN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='RUNAWAY ELEC SOURCE RATE [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SFETO'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRONS -> FAST NEUTRALS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SVD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOT ION SCE VOL. D+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SVH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOT ION SCE VOL. H+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SWD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOT ION SCE WALL D+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SWH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOT ION SCE WALL H+ [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'SWTOT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ION SCE(WALL NEUTRALS) [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'T0VD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOL NEUTRAL TEMP G=D [EV ]'; -i=i+1;transp_sig{i,1}= 'T0VH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOL NEUTRAL TEMP G=H [EV ]'; -i=i+1;transp_sig{i,1}= 'T0WD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='WALL NEUTRAL TEMP G=D [EV ]'; -i=i+1;transp_sig{i,1}= 'T0WH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='WALL NEUTRAL TEMP G=H [EV ]'; -i=i+1;transp_sig{i,1}= 'TE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON TEMPERATURE [EV ]'; -i=i+1;transp_sig{i,1}= 'THNTX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='THERMONUCLEAR NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'TI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION TEMPERATURE [EV ]'; -i=i+1;transp_sig{i,1}= 'TPA1A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D FULL E TAU(SCATTERING,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TPA2A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D HALF E TAU(SCATTERING,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TPA3A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D 1/3 E TAU(SCATTERING,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TQBCO'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM COLLISIONAL TORQUE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TQBTH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM THERMALIZATION TORQUE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TQICHMIN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ICH Torque TO MINORITY IONS [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TQIN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL INPUT TORQUE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TQJXB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM JXB TORQUE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TQRPL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM RPL JXB TORQUE [Nt-M/CM3 ]'; -i=i+1;transp_sig{i,1}= 'TSL1A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D FULL E TAU(SLOWING DOWN,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TSL2A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D HALF E TAU(SLOWING DOWN,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TSL3A_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D 1/3 E TAU(SLOWING DOWN,CO) [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TTNTX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'TX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='IMPURITY TEMPERATURE [EV ]'; -i=i+1;transp_sig{i,1}= 'UBPAR'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM PLL ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UBPOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POLOIDAL FIELD ENERGY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UBPRP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='BEAM PERP ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UBTOR'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOROIDAL FIELD ENERGY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UCURB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='UNSHIELDED BEAM CURRENT [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'UDEXB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='E CROSS B POWER [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UFASTPA'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION PLL ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UFASTPP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION PERP ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UJBCO'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='UNSHIELDED BEAM CUR (CO BEAMS) [AMPS/CM2 ]'; -i=i+1;transp_sig{i,1}= 'UPHI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='THERMAL PLASMA ROTATIONAL ENERGY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UPHIN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ROTATIONAL ENERGY INPUT [WATTS/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UTHRM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='THERMAL ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'UTOTL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL ENERGY DENSITY [JLES/CM3 ]'; -i=i+1;transp_sig{i,1}= 'V'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOLTAGE [VOLTS ]'; -i=i+1;transp_sig{i,1}= 'VPB_F1_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Vpll.B: full energy D beam [T*(cm/sec)]'; -i=i+1;transp_sig{i,1}= 'VPB_F2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Vpll.B: half energy D beam [T*(cm/sec)]'; -i=i+1;transp_sig{i,1}= 'VPB_F3_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Vpll.B: 1/3 energy D beam [T*(cm/sec)]'; -i=i+1;transp_sig{i,1}= 'VPOH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VOLTAGE for POH calculation [VOLTS ]'; -i=i+1;transp_sig{i,1}= 'WNMC_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Beam D No. of MC Ions [#ptcls ]'; -i=i+1;transp_sig{i,1}= 'ZEFFI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='INPUT ZEFF (UNCONSTRAINED) [ ]'; -i=i+1;transp_sig{i,1}= 'ZEFMD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MAGDIF ZEFF PROFILE [ ]'; -i=i+1;transp_sig{i,1}= 'XB'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='rho_tor "boundary"'; -i=i+1;transp_sig{i,1}= 'BPOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POLOIDAL FIELD [Tesla ]'; -i=i+1;transp_sig{i,1}= 'CHPHI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MOMENTUM DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CONDE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON HEAT DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CONDEF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='1 FLUID "EFFECTIVE" CHI [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CONDI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION HEAT DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CONDICWN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NCLASS ion class heat conduct [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CONDIWNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NCLASS ion heat conductivity [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'CURBRABD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RAD.CUR (ANOM DIFFUS) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'CURBRFSH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RAD.CUR (FISHBONES) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'CURBRORB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RADIAL CURRENT (ORBIT) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'CURBRRIP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FAST ION RAD.CUR (RIPPLE LOSS) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'DIFB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ANOMOLOUS FAST ION DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='EFF. D+ ION DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELEC PTCL DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='EFF. H+ ION DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION DIFFUSIVITY FROM TOTAL FLUX [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFIGLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 ION DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFWE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELEC PTCL DIFFUSIVITY (WARE) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'DIFFX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='EFF. IMP ION DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'ELONG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Flux surface elongation [ ]'; -i=i+1;transp_sig{i,1}= 'ETAE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D(LN(TE))/D(LN(NE)) [ ]'; -i=i+1;transp_sig{i,1}= 'ETAI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D(LN(TI))/D(LN("NI")) [ ]'; -i=i+1;transp_sig{i,1}= 'ETAIE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D(LN(TI))/D(LN(NE)) [ ]'; -i=i+1;transp_sig{i,1}= 'ETPARGLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 MOM (PAR) DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'ETPERGLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 MOM (PERP) DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'ETPHIGLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 MOM (TOR) DIFFUSIVITY [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'EXBGLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 EXB SHEAR RATE [/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKBOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC BOLTON [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKCH2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC CHANG-HINTON VSN 2 [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKCHH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC CHANG-HINTON ORIGINAL [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKCHZ'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC CHANG-HINTON Z-CORR [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKHZH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC HAZELTINE-HINTON [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FKJUL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='CHI(I) NC RUTHERFORD-JULICH [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'FRAT1GLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 LEADING MODE FREQUENCY [/SEC ]'; -i=i+1;transp_sig{i,1}= 'FRAT2GLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 SCND LEADING MODE FREQ [/SEC ]'; -i=i+1;transp_sig{i,1}= 'GAMMMM1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 GRTH RATE MODE=1 [1/SEC ]'; -i=i+1;transp_sig{i,1}= 'GAMMMM2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 GRTH RATE MODE=2 [1/SEC ]'; -i=i+1;transp_sig{i,1}= 'GFUN'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='G: PARA/DIAMAGNETISM [ ]'; -i=i+1;transp_sig{i,1}= 'GFUNC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='G: GRAD-SHAF EQUILIBRIUM CHECK [ ]'; -i=i+1;transp_sig{i,1}= 'GRAT1GLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 GROWTH RT OF LEADING MODE [/SEC ]'; -i=i+1;transp_sig{i,1}= 'GRAT2GLF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 GRTH RT SCND LEADING MODE [/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEMMM1'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 FREQUENCY MODE=1 [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'OMEMMM2'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 FREQUENCY MODE=2 [RAD/SEC ]'; -i=i+1;transp_sig{i,1}= 'PLCURPLL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POLOIDAL CUR (J PLL) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PLCURPRP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POLOIDAL CUR (J PERP) [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PLCURTOT'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL POLOIDAL CUR TO WALL [AMPS ]'; -i=i+1;transp_sig{i,1}= 'PLFLX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='POLOIDAL FLUX [Wb/rad ]'; -i=i+1;transp_sig{i,1}= 'PLFLX2PI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOTAL POLOIDAL FLUX [Webers ]'; -i=i+1;transp_sig{i,1}= 'Q'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Q PROFILE [ ]'; -i=i+1;transp_sig{i,1}= 'RLTCRGKF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='R/LTi: critical ITG main br. [ ]'; -i=i+1;transp_sig{i,1}= 'RLTCRGKZ'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='R/LTi: critical ITG Carbon br. [ ]'; -i=i+1;transp_sig{i,1}= 'RLTI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='R/LTi: actual ITG:R*Grad(Ti)/Ti [ ]'; -i=i+1;transp_sig{i,1}= 'RMJMP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FLUX SURFACE CTRS [CM ]'; -i=i+1;transp_sig{i,1}= 'RMNMP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MIDPLANE RADII [CM ]'; -i=i+1;transp_sig{i,1}= 'SREXBMMM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ExB Shear Rate (MMM95) [SEC**-1 ]'; -i=i+1;transp_sig{i,1}= 'SSHAF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='SHAFRANOV SHIFT [CM ]'; -i=i+1;transp_sig{i,1}= 'SURF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='FLUX SURFACE AREA [CM**2 ]'; -i=i+1;transp_sig{i,1}= 'TAPWE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON TAU(P) WARE CORRECTION [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TAUE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='PLASMA ENERGY CONFINEMENT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TAUPE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON PTCL CONFINEMNT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TAUPI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION PTCL CONFINEMENT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TEE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON ENERGY CONFINEMENT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'TEI'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION ENERGY CONFINEMENT [SECONDS ]'; -i=i+1;transp_sig{i,1}= 'THDIG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION DIFF (WEILAND) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THDKB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION DIFF (KB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THDRB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION DIFF (RB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THEIG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ELEC THER DIFF (WEILAND) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THEKB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ELEC THER DIFF (KB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THERB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ELEC THER DIFF (RB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THIIG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION THER DIFF (WEILAND) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THIKB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION THER DIFF (KB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THIRB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 ION THER DIFF (RB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THZIG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 IMP DIFF (WEILAND) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THZKB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 IMP DIFF (KB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'THZRB'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 IMP DIFF (RB) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'TRFLX'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOROIDAL FLUX [Webers ]'; -i=i+1;transp_sig{i,1}= 'TRIANG'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Flux surface triangularity [ ]'; -i=i+1;transp_sig{i,1}= 'TRIANGL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Flux surf. lower triangularity [ ]'; -i=i+1;transp_sig{i,1}= 'TRIANGU'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Flux surf. upper triangularity [ ]'; -i=i+1;transp_sig{i,1}= 'VCONEMMM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 MODEL ELEC. CONV. VEL. [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VCONIMMM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 MODEL ION CONV. VEL. [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VCONZMMM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 MODEL IMP. CONV. VEL. [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VELD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION VELOCITY (NET) D+ [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VELE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON RADIAL VELOCITY [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VELH'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ION VELOCITY (NET) H+ [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VELIM'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='IMPURITY RADIAL VELOCITY [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VELWE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='ELECTRON WARE VELOCITY [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VMO_PBAL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='Momentum v_rad from ptcl-bal [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKAPEGKF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='IFS-PPPL GYROFLUID MODEL CHI(E) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKAPIGKF'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='IFS-PPPL GYROFLUID MODEL CHI(I) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKEGLF23'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 MODEL CHI(E) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKEMMM95'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 MODEL CHI(E) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKIGLF23'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='GLF23 MODEL CHI(I) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKIMMM95'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MMM95 MODEL CHI(I) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'XKINC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NEOCLASSICAL CHI(I) [CM**2/SEC ]'; -i=i+1;transp_sig{i,1}= 'RMAJM'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='R values'; -i=i+1;transp_sig{i,1}= 'TRFMP'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='TOROIDAL FLUX [WEBERS ]'; -i=i+1;transp_sig{i,1}= 'VPOLD_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC D+ poloidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VPOLE_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC electron poloidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VPOLH_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC H+ poloidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VPOLX_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC impurity poloidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VTORD_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC D+ toroidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VTORE_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC electron toroidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VTORH_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC H+ toroidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'VTORX_NC'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='NC impurity toroidal velocity [CM/SEC ]'; -i=i+1;transp_sig{i,1}= 'RMJSYM'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='R values (both field sides)'; -i=i+1;transp_sig{i,1}= 'VP2_USE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='VP2 data as used [rad/sec ]'; -i=i+1;transp_sig{i,1}= 'MSElabel'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='MSE label'; -i=i+1;transp_sig{i,1}= 'BPHI_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='B_phi at (R,Z) of detector [TESLA ]'; -i=i+1;transp_sig{i,1}= 'BR_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='B_R at (R,Z) of detector [TESLA ]'; -i=i+1;transp_sig{i,1}= 'BZ_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='B_Z at (R,Z) of detector [TESLA ]'; -i=i+1;transp_sig{i,1}= 'ER_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='E_R at (R,Z) of detector [V/M ]'; -i=i+1;transp_sig{i,1}= 'EZ_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='E_Z at (R,Z) of detector [V/M ]'; -i=i+1;transp_sig{i,1}= 'GAM1_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MSE Signal (due to B only) [ ]'; -i=i+1;transp_sig{i,1}= 'GAM2_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='MSE Signal (due to B and E) [ ]'; -i=i+1;transp_sig{i,1}= 'VBA_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='beam energy/nucleon [eV/AMU ]'; -i=i+1;transp_sig{i,1}= 'X_MSE'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='flux surface x=sqrt(phi/phlim) [ ]'; -i=i+1;transp_sig{i,1}= 'MCINDX'; transp_sig{i,2}='Area-Base'; transp_sig{i,3}='Monte Carlo index for f(r,theta)'; -i=i+1;transp_sig{i,1}= 'BBNT2_DD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DD BEAM-BEAM NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BDENS2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D Beam ion density [N/CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BEPRP2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D Beam ion <Eperp> [eV ]'; -i=i+1;transp_sig{i,1}= 'BEPLL2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D Beam ion <Epll> [eV ]'; -i=i+1;transp_sig{i,1}= 'BMVOL'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='2d MC grid zone volumes [CM**3 ]'; -i=i+1;transp_sig{i,1}= 'BTNT2_DD'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='DD BEAM-TARGET NEUTRONS [N/CM3/SEC ]'; -i=i+1;transp_sig{i,1}= 'BVTOR2_D'; transp_sig{i,2}='Signal-Group'; transp_sig{i,3}='D Beam ion <Vtor> [cm/sec ]'; diff --git a/crpptbx_new/AUG/adaptPFM_rda.m b/crpptbx_new/AUG/adaptPFM_rda.m deleted file mode 100644 index cd73a1d9..00000000 --- a/crpptbx_new/AUG/adaptPFM_rda.m +++ /dev/null @@ -1,17 +0,0 @@ -function [nodeout]=adaptPFM_rda(nodein,ndim1,ndim2,ndim3); -% -% 3D case is special -% -% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2 and same for ndim3 -% -% re-generate .x and .t -% -% change .value, .data, .x and .t -% - -nodeout = nodein; - -nodeout.value = nodeout.value(1:ndim1,1:ndim2,1:ndim3); -nodeout.data = nodeout.value; -nodeout.x = [1:ndim1]; -nodeout.t = [1:ndim3]; diff --git a/crpptbx_new/AUG/adapt_rda.m b/crpptbx_new/AUG/adapt_rda.m deleted file mode 100644 index 58e4fd9b..00000000 --- a/crpptbx_new/AUG/adapt_rda.m +++ /dev/null @@ -1,22 +0,0 @@ -function [nodeout]=adapt_rda(nodein,ndim1,ndim2,itotransposeback,varargin); -% -% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2 -% if itotransposeback==1, transpose back matrix and use ndim1 for ndim2 and vice versa -% -% change .value, .data, .x and .t -% - -nodeout = nodein; - -if itotransposeback==1 - nodeout.value = nodeout.value'; - nodeout.data = nodeout.data'; - temp = nodeout.x; - nodeout.x = nodeout.t; - nodeout.t = temp; -end - -nodeout.value = nodeout.value(1:ndim1,1:ndim2); -nodeout.data = nodeout.value; -nodeout.x = nodeout.x(1:ndim1); -nodeout.t = nodeout.t(1:ndim2); diff --git a/crpptbx_new/AUG/aug_requests_mapping.m b/crpptbx_new/AUG/aug_requests_mapping.m deleted file mode 100644 index 15b98dd6..00000000 --- a/crpptbx_new/AUG/aug_requests_mapping.m +++ /dev/null @@ -1,169 +0,0 @@ -function mapping = aug_requests_mapping(data_request) - -% Defaults -mapping = struct(... - 'label', '', ... - 'method', '', ... - 'expression','', ... - 'timedim', -1, ... % dim which is the time, to copy in .t, the other dims are in .x (-1 means last dimension) - 'new_timedim',0, ... % if need to reshape data and dim orders to have timedim as new_timedim (shifting time to new_timedim) - 'min', -inf, ... - 'max', inf); - -if ~exist('data_request') || isempty(data_request) - return -end - -% default label: data_request keyword itself -mapping.label = data_request; - -% for AUG, following choices are set so far: -% method = 'tdi' and then expression is the string within tdi (usual case when there is a direct link to an existing signal) -% with tdi, if expression cell array, call tdi(cell{1},cell{2},...) -% method = 'function', then expression is the funtion to call which should return the correct structure -% method = 'switchcase', then there will be a specific case within gdat_aug (usual case when not directly a signal) -% -% label is used for plotting -switch lower(data_request) - case 'b0' - mapping.label = 'B_0'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'betan' - mapping.label = '\beta_N'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'betap' - mapping.label = '\beta_p'; - mapping.method = 'tdi'; - mapping.expression = '\results::beta_pol'; - case 'cxrs' - mapping.label = 'cxrs'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'delta' - mapping.method = 'tdi'; - mapping.expression = '\results::delta_edge'; - mapping.method = 'function'; - mapping.expression = ['tdi(''\results::q_psi'');']; - case 'delta_top' - mapping.label = 'delta\_top'; - mapping.method = 'tdi'; - mapping.expression = '\results::delta_ed_top'; - case 'delta_bottom' - mapping.label = 'delta\_bottom'; - mapping.method = 'tdi'; - mapping.expression = '\results::delta_ed_bot'; - case 'ece' - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'eqdsk' - mapping.method = 'switchcase'; % could use function make_eqdsk directly? - mapping.expression = ''; - case 'halpha' - mapping.label = 'Halpha'; - mapping.method = 'tdi'; - mapping.expression = '\base::pd:pd_011'; - case 'ioh' - mapping.label = 'I ohmic transformer'; - mapping.method = 'tdi'; - mapping.expression = [{'\magnetics::ipol[*,$1]'} {'OH_001'}]; - case 'ip' - mapping.label = 'Plasma current'; - mapping.method = 'tdi'; - mapping.expression = '\magnetics::iplasma:trapeze'; - case 'kappa' - mapping.method = 'tdi'; - mapping.expression = '\results::kappa_edge'; - case 'mhd' - mapping.label = 'n=1,2, etc'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'ne' - mapping.method = 'switchcase'; - case 'neint' - mapping.label = 'line integrated el. density'; - mapping.method = 'tdi'; - mapping.expression = '\results::fir:lin_int_dens'; - case 'nel' - mapping.label = 'line-averaged el. density'; - mapping.method = 'tdi'; - mapping.expression = '\results::fir:n_average'; - case 'nerho' - mapping.label = 'ne'; - mapping.method = 'switchcase'; - case 'neterho' - mapping.label = 'ne and Te'; - mapping.method = 'switchcase'; - case 'ni' - mapping.method = 'switchcase'; % especially since might have option fit, etc - case 'powers' - mapping.label = 'various powers'; - mapping.method = 'switchcase'; - case 'q0' - mapping.method = 'tdi'; - mapping.expression = '\results::q_zero'; - case 'q95' - mapping.method = 'tdi'; - mapping.expression = '\results::q_95'; - case 'qedge' - mapping.method = 'tdi'; - mapping.expression = '\results::q_edge'; - case 'qrho' - mapping.label = 'q'; - mapping.method = 'switchcase'; - case 'rgeom' - mapping.label = 'Rgeom'; - mapping.method = 'switchcase'; - case 'rhovol' - mapping.label = 'rhovol\_norm'; - mapping.method = 'switchcase'; % from conf if exist otherwise computes it - case 'rmag' - mapping.label = 'R\_magaxis'; - mapping.method = 'tdi'; - mapping.expression = '\results::r_axis'; - case 'sxr' - mapping.method = 'switchcase'; - case 'te' - mapping.label = 'Te'; - mapping.method = 'switchcase'; - case 'terho' - mapping.label = 'Te'; - mapping.method = 'switchcase'; - case 'ti' - mapping.label = 'Ti'; - mapping.method = 'switchcase'; - case 'transp' - mapping.label = 'transp output'; - mapping.method = 'switchcase'; - case 'vloop' - mapping.label = ''; - mapping.method = 'tdi'; - mapping.expression = ''; - case 'vol' - mapping.label = 'Volume'; - mapping.method = 'switchcase'; - % mapping.expression = '\results::psitbx:vol'; (if exists for liuqe2 and 3 as well) - case 'zeff' - mapping.label = 'zeff from Ip-Ibs'; - mapping.method = 'tdi'; - mapping.expression = '\results::ibs:z_eff'; - case 'zgeom' - mapping.label = 'Zgeom'; - mapping.method = 'switchcase'; - case 'zmag' - mapping.label = 'Zmagaxis'; - mapping.method = 'tdi'; - mapping.expression = '\results::z_axis'; -% $$$ case '' -% $$$ mapping.label = ''; -% $$$ mapping.method = 'tdi'; -% $$$ mapping.expression = ''; - otherwise - mapping.label = data_request; - mapping.method = 'tdi'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...) - mapping.expression = data_request; - -end - - diff --git a/crpptbx_new/AUG/gdat_aug.m b/crpptbx_new/AUG/gdat_aug.m deleted file mode 100644 index f070e344..00000000 --- a/crpptbx_new/AUG/gdat_aug.m +++ /dev/null @@ -1,426 +0,0 @@ -function [gdat_data,gdat_params,error_status,varargout] = gdat_aug(shot,data_request,varargin) -% -% function [gdat_data,gdat_params,error_status,varargout] = gdat(shot,data_request,varargin) -% -% Aim: get data from a given machine using full path or keywords. -% data_request are and should be case independent (transformed in lower case in the function and outputs) -% -% If no inputs are provided, return the list of available pre-defined data_request in gdat_data and default parameters gdat_params -% -% Inputs: -% -% no inputs: return default parameters in a structure form in gdat_params -% shot: shot number -% data_request: keyword (like 'ip') or trace name or structure containing all parameters but shot number -% varargin{i},varargin{i+1},i=1:nargin-2: additional optional parameters given in pairs: param_name, param_value -% The optional parameters list might depend on the data_request -% examples of optional parameters: -% 'plot',1 (plot is set by default to 0) -% 'machine','AUG' (the default machine is the local machine) -% -% -% Outputs: -% -% gdat_data: structure containing the data, the time trace if known and other useful information -% gdat_data.t : time trace -% gdat_data.data: requested data values -% gdat_data.dim : values of the various coordinates related to the dimensions of .data(:,:,...) -% note that one of the dim is the time, replicated in .t for clarity -% gdat_data.dimunits : units of the various dimensions, 'dimensionless' if dimensionless -% gdat_data.error_bar : if provided -% gdat_data.gdat_call : list of parameters provided in the gdat call (so can be reproduced) -% gdat_data.shot: shot number -% gdat_data.machine: machine providing the data -% gdat_data.gdat_request: keyword for gdat if relevant -% gdat_data.data_fullpath: full path to the data node if known and relevant, or expression, or relevant function called if relevant -% gdat_data.gdat_params: copy gdat_params for completeness -% gdat_data.xxx: any other relevant information -% -% -% Examples: -% (should add working examples for various machines (provides working shot numbers for each machine...)) -% -% [a1,a2]=gdat; -% a2.data_request = 'Ip'; -% a3=gdat(48836,a2); % gives input parameters as a structure, allows to call the same for many shots -% a4=gdat('opt1',123,'opt2',[1 2 3],'shot',48832,'data_request','Ip','opt3','aAdB'); % all in pairs -% a5=gdat(48836,'ip'); % standard call -% a6=gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc'); % standard call with a few options (note all lowercase in output) - -% -% Comments for local developer: -% This gdat is just a "header routine" calling the gdat for the specific machine gdat_`machine`.m which can be called -% directly, thus which should be able to treat the same type of input arguments -% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Prepare some variables, etc - -varargout{1}=cell(1,1); -error_status=1; - -% construct default parameters structure -gdat_params.data_request = ''; -default_machine = 'aug'; - -gdat_params.machine=default_machine; -gdat_params.doplot = 0; - -% construct list of keywords from global set of keywords and specific AUG set -% get data_request names from centralized function -data_request_names = get_data_request_names; - -% add AUG specific to all: -if ~isempty(data_request_names.aug) - aug_names = fieldnames(data_request_names.aug); - for i=1:length(aug_names) - data_request_names.all.(aug_names{i}) = data_request_names.aug.(aug_names{i}); - end -end -data_request_names_all = fieldnames(data_request_names.all); - -% $$$ data_request_names_all= [{'ip'} {'b0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ... -% $$$ {'delta'} {'deltatop'} {'deltabot'} {'neint'} {'nel'} ... -% $$$ {'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... -% $$$ {'neft'} {'teft'} {'neftav'} {'teftav'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} ... -% $$$ {'sxr'} {'sxr'} {'ece'} {'mpx'} {'ioh'} {'vloop'} {'pgyro'} {'jtor'} {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'ti'} {'tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}]; - -% construct default output structure -gdat_data.data = []; -gdat_data.units = []; -gdat_data.dim = []; -gdat_data.dimunits = []; -gdat_data.t = []; -gdat_data.x = []; -gdat_data.shot = []; -gdat_data.gdat_request = []; -gdat_data.gdat_params = gdat_params; -gdat_data.data_fullpath = []; - - -% Treat inputs: -ivarargin_first_char = 3; -data_request_eff = ''; -if nargin>=2 && ischar(data_request); data_request = lower(data_request); end - -gdat_data.gdat_request = data_request_names_all; % so if return early gives list of possible request names -% no inputs -if nargin==0 - % return defaults and list of keywords - return -end - -do_mdsopen_mdsclose = 1; -% treat 1st arg -if nargin>=1 - if isempty(shot) - % means mdsopen(shot) already performed - shot = mdsipmex(2,'$SHOT'); - gdat_data.shot = shot; - do_mdsopen_mdsclose = 0; - elseif isnumeric(shot) - gdat_data.shot = shot; - elseif ischar(shot) - ivarargin_first_char = 1; - else - warning('type of 1st argument unexpected, should be numeric or char') - error_status=2; - return - end - if nargin==1 - % Only shot number given. If there is a default data_request set it and continue, otherwise return - return - end -end -% 2nd input argument if not part of pairs -if nargin>=2 && ivarargin_first_char~=1 - if isempty(data_request) - return - end - % 2nd arg can be a structure with all options except shot_number, or a string for the pathname or keyword, or the start of pairs string/value for the parameters - if isstruct(data_request) - if ~isfield(data_request,'data_request') - warning('expects field data_request in input parameters structure') - error_status=3; - return - end - data_request.data_request = lower(data_request.data_request); - data_request_eff = data_request.data_request; - gdat_params = data_request; - else - % since data_request is char check from nb of args if it is data_request or a start of pairs - if mod(nargin-1,2)==0 - ivarargin_first_char = 2; - else - ivarargin_first_char = 3; - data_request_eff = data_request; - end - end -end - -if ~isstruct(data_request) - gdat_params.data_request = data_request_eff; -end - -% if start pairs from shot or data_request, shift varargin -if ivarargin_first_char==1 - varargin_eff{1} = shot; - varargin_eff{2} = data_request; - varargin_eff(3:nargin) = varargin(:); -elseif ivarargin_first_char==2 - varargin_eff{1} = data_request; - varargin_eff(2:nargin-1) = varargin(:); -else - varargin_eff(1:nargin-2) = varargin(:); -end - -% extract parameters from pairs of varargin: -if (nargin>=ivarargin_first_char) - if mod(nargin-ivarargin_first_char+1,2)==0 - for i=1:2:nargin-ivarargin_first_char+1 - if ischar(varargin_eff{i}) - % enforce lower case for any character driven input - if ischar(varargin_eff{i+1}) - gdat_params.(lower(varargin_eff{i})) = lower(varargin_eff{i+1}); - else - gdat_params.(lower(varargin_eff{i})) = varargin_eff{i+1}; - end - else - warning(['input argument nb: ' num2str(i) ' is incorrect, expects a character string']) - error_status=401; - return - end - end - else - warning('number of input arguments incorrect, cannot make pairs of parameters') - error_status=402; - return - end -end -data_request_eff = gdat_params.data_request; % in case was defined in pairs - -% if it is a request_keyword copy it: -ij=strmatch(data_request_eff,data_request_names_all,'exact'); -if ~isempty(ij); - gdat_data.gdat_request = data_request_names_all{ij}; - if isfield(data_request_names.all.(data_request_names_all{ij}),'description') && ~isempty(data_request_names.all.(data_request_names_all{ij}).description) - % copy description of keyword - gdat_data.request_description = data_request_names.all.(data_request_names_all{ij}).description; - end -end - -% special treatment if shot and data_request given within pairs -if isfield(gdat_params,'shot') - shot = gdat_params.shot; % should use only gdat_params.shot but change shot to make sure - gdat_data.shot = gdat_params.shot; - gdat_params=rmfield(gdat_params,'shot'); -end -if ~isfield(gdat_params,'data_request') || isempty(gdat_params.data_request) - % warning('input for ''data_request'' missing from input arguments') % might be correct, asking for list of requests - error_status=5; - return -end -gdat_data.gdat_params = gdat_params; - -% re-assign main variables to make sure use the one in gdat_data structure -shot = gdat_data.shot; -data_request_eff = gdat_data.gdat_params.data_request; -error_status = 6; % at least reached this level - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Specifications on how to get the data provided in aug_requests_mapping -mapping_for_aug = aug_requests_mapping(data_request_eff); -gdat_data.label = mapping_for_aug.label; - -ishot=NaN; -if do_mdsopen_mdsclose - mdsdefaultserver aug1.epfl.ch; % should be in aug general path, but set-it in the meantime... - ishot = mdsopen(shot); % if ishot equal to shot, then mdsclose at the end - if ishot~=shot - warning(['cannot open shot= ' num2str(shot)]) - return - end -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% 1st treat the simplest method: "tdi" -if strcmp(mapping_for_aug.method,'tdi') - % need to treat liuqe2, model, etc from options.... - if iscell(mapping_for_aug.expression) - if length(mapping_for_aug.expression)>0 - % series of arguments for tdi given in each cell - eval_expr = ['aatmp=tdi(''' mapping_for_aug.expression{1} '''']; - for i=2:length(mapping_for_aug.expression) - eval_expr = [eval_expr ',''' mapping_for_aug.expression{i} '''']; - end - eval_expr = [eval_expr ');']; - eval(eval_expr); - else - % empty or wrong expression - error_status=701; - return - end - else - eval_expr = ['aatmp=tdi(''' mapping_for_aug.expression ''');']; - eval(eval_expr); - end - gdat_data.data = aatmp.data; - gdat_data.dim = aatmp.dim; - nbdims = length(gdat_data.dim); - if mapping_for_aug.timedim==-1; - mapping_for_aug.timedim = nbdims; - if (size(gdat_data.data,nbdims)==1 && nbdims>1); mapping_for_aug.timedim = nbdims-1; end - end - dim_nontim = setdiff([1:nbdims],mapping_for_aug.timedim); - if ~isempty(dim_nontim) - % since most cases have at most 2d, copy as array if data is 2D and as cell if 3D or more - if length(dim_nontim)==1 - gdat_data.x = gdat_data.dim{dim_nontim(1)}; - else - gdat_data.x = gdat_data.dim(dim_nontim); - end - end - gdat_data.t = gdat_data.dim{mapping_for_aug.timedim}; - gdat_data.units = aatmp.units; - gdat_data.dimunits = aatmp.dimunits; - if mapping_for_aug.new_timedim>0 && mapping_for_aug.new_timedim ~= mapping_for_aug.timedim - % shift timedim to new_timedim data(i,j,...itime,k,...) -> data(i,inewtime,j,...,k,...) - % note that this means that gdat_data.x and gdat_data.t are same and correct, - % only .data, .dim and .dimunits need to be changed - iprev=[1:nbdims]; - ij=find(dim_nontim>mapping_for_aug.new_timedim-1); - inew=[1:mapping_for_aug.new_timedim-1 mapping_for_aug.timedim dim_nontim(ij)]; - data_sizes = size(aatmp.data); - gdat_data.data = NaN*ones(data_sizes(inew)); - abcol=ones(1,nbdims)*double(':'); abcomma=ones(1,nbdims)*double(','); - dimstr_prev=['(' repmat(':,',1,mapping_for_aug.timedim-1) 'it,' ... - repmat(':,',1,nbdims-mapping_for_aug.timedim-1) ':)']; - dimstr_new=['(' repmat(':,',1,mapping_for_aug.new_timedim-1) 'it,' ... - repmat(':,',1,nbdims-mapping_for_aug.new_timedim-1) ':)']; - % eval gdat_data.data(;,:,...,it,...) = aatmp.data(:,:,:,it,...); - for it=1:size(aatmp.data,mapping_for_aug.timedim) - shift_eval = ['gdat_data.data' dimstr_new ' = aatmp.data' dimstr_prev ';']; - eval(shift_eval); - end - gdat_data.dim = aatmp.dim(inew); - gdat_data.dimunits = aatmp.dimunits(inew); - end - gdat_data.data_fullpath=mapping_for_aug.expression; - % end of method "tdi" - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -elseif strcmp(mapping_for_aug.method,'function') - % 2nd: method="function" - % assume expression contains function to call and which returns a structure - % we copy the structure, to make sure default nodes are defined and to avoid if return is an closed object like tdi - eval_expr = ['aatmp=' mapping_for_aug.expression ';']; - eval(eval_expr); - if isempty(aatmp) || (~isstruct(aatmp) & ~isobject(aatmp)) - warning(['function expression does not return a structure: ' eval_expr]) - error_status=801; - return - end - tmp_fieldnames = fieldnames(aatmp); - if sum(strcmp(tmp_fieldnames,'data'))==0 % note: cannot do isfield since aatmp might be an object - warning(['function does not return a child name ''data'' for ' data_request_eff]) - end - for i=1:length(tmp_fieldnames) - gdat_data.(tmp_fieldnames{i}) = aatmp.(tmp_fieldnames{i}); - end - % add .t and .x in case only dim is provided - % do not allow shifting of timedim since should be treated in the relevant function - ijdim=find(strcmp(tmp_fieldnames,'dim')==1); - if ~isempty(ijdim) - nbdims = length(gdat_data.dim); - if mapping_for_aug.timedim==-1; - mapping_for_aug.timedim = nbdims; - if (size(gdat_data.data,nbdims)==1 && nbdims>1); mapping_for_aug.timedim = nbdims-1; end - end - dim_nontim = setdiff([1:nbdims],mapping_for_aug.timedim); - ijt=find(strcmp(tmp_fieldnames,'t')==1); - if isempty(ijt) - gdat_data.t = gdat_data.dim{mapping_for_aug.timedim}; - end - ijx=find(strcmp(tmp_fieldnames,'x')==1); - if isempty(ijx) - if ~isempty(dim_nontim) - % since most cases have at most 2d, copy as array if data is 2D and as cell if 3D or more - if length(dim_nontim)==1 - gdat_data.x = gdat_data.dim{dim_nontim(1)}; - else - gdat_data.x = gdat_data.dim(dim_nontim); - end - end - end - gdat_data.data_fullpath=mapping_for_aug.expression; - end - % end of method "function" - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -elseif strcmp(mapping_for_aug.method,'switchcase') - switch data_request_eff % not lower(...) since data_request_eff should be lower case already at this stage - case {'ne','te'} - % ne or Te from Thomson data on raw z mesh vs (z,t) - mdsopen(shot); - nodenameeff=['\results::thomson:' data_request_eff]; - tracetdi=tdi(nodenameeff); - tracestd=tdi(['\results::thomson:' data_request_eff ':error_bar']); - trace_fir_rat=tdi('\results::thomson:fir_thom_rat'); - gdat_data.data=tracetdi.data'; % Thomson data as (t,z) - gdat_data.error_bar=tracestd.data'; - gdat_data.data_fullpath=[nodenameeff]; - % add correct dimensions - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - if strcmp(data_request_eff(1:2),'ne') - tracefirrat_data = get_fir_thom_rat_data('thomson',time); - gdat_data.data_abs = gdat_data.data * diag(tracefirrat_data); - gdat_data.error_bar_abs = gdat_data.error_bar * diag(tracefirrat_data); - gdat_data.firrat=tracefirrat_data; - gdat_data.data_fullpath=[gdat_data.data_fullpath ' ; _abs includes *firrat']; - end - z=mdsdata('\diagz::thomson_set_up:vertical_pos'); - gdat_data.dim=[{z};{time}]; - gdat_data.dimunits=[{'Z [m]'} ; {'time [s]'}]; - gdat_data.x=z; - gdat_data.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus use fieldnames - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.units=tracetdi.units; - end - - - case 'nerho' - - - otherwise - warning(['switchcase= ' data_request_eff ' not known in gdat_aug']) - error_status=901; - return - end - -else - warning(['AUG method=' mapping_for_aug.method ' not known yet, contact Olivier.Sauter@epfl.ch']) - error_status=602; - return -end - -if ishot==shot; mdsclose; end - -gdat_data.mapping_for_aug = mapping_for_aug; -error_status=0; - -return - diff --git a/crpptbx_new/AUG/geteqdskAUG.m b/crpptbx_new/AUG/geteqdskAUG.m deleted file mode 100644 index d96a944d..00000000 --- a/crpptbx_new/AUG/geteqdskAUG.m +++ /dev/null @@ -1,111 +0,0 @@ -function [eqdskAUG, equil_all_t, equil_t_index]=geteqdskAUG(shot,time,NR,NZ,savedir,deltaz,varargin); -% -% [eqdskAUG, equil_all_t, equil_t_index]=geteqdskAUG(shot,time,NR,NZ,savedir,deltaz,varargin); -% -% you can then do: -% write_eqdsk('fname',eqdskAUG,17); % EQI is COCOS=17 by default, use [17,11] if you want an ITER version -% write_eqdsk('fname',eqdskAUG,[17 11]); % if you want an ITER version with COCOS=11 -% - - -if ~exist('time'); - time_eff = 2.0; -else - time_eff = time; -end - -if ~exist('savedir') - savedir_eff = '.'; -else - savedir_eff = savedir; -end - -if ~exist('deltaz') - deltaz_eff = NaN; % no shift -else - deltaz_eff = deltaz; -end - -equil=gdat(shot,'equil'); -[zz it]=min(abs(equil.t-time_eff)); - -equil_all_t = equil; -equil_t_index = it; - -eqdsk.cocos=17; -eqdsk.nr = size(equil.Rmesh,1); -eqdsk.nz = size(equil.Zmesh,1); -eqdsk.rmesh = equil.Rmesh(:,it); -eqdsk.zmesh = equil.Zmesh(:,it); -eqdsk.p = equil.pressure(:,it); -eqdsk.pprime = equil.dpressuredpsi(:,it); -eqdsk.FFprime = equil.ffprime(:,it); -eqdsk.q = equil.qvalue(:,it); -eqdsk.psimesh = equil.psi(:,it); -eqdsk.rhopsi = equil.rhopolnorm(:,it); -eqdsk.psi = equil.psi2D(:,:,it); -eqdsk.psirz = equil.psi2D(:,:,it); -eqdsk.rboxlen = equil.Rmesh(end,it) - equil.Rmesh(1,it) ; -eqdsk.rboxleft=eqdsk.rmesh(1); -eqdsk.zboxlen = equil.Zmesh(end,it) - equil.Zmesh(1,it) ; -eqdsk.zmid = 0.5*(equil.Zmesh(end,it) + equil.Zmesh(1,it)) ; -eqdsk.psiaxis = equil.psi_axis(it); -eqdsk.psiedge = equil.psi_lcfs(it); -eqdsk.ip = equil.Ip(it); -eqdsk.stitle=['AUGD equil_cliste t=' num2str(time_eff)]; -eqdsk.ind1=1; - -psisign = sign(eqdsk.psimesh(end)-eqdsk.psimesh(1)); -[dum1,dum2,dum3,F2_05]=interpos(psisign.*eqdsk.psimesh,eqdsk.FFprime,-0.1); - -b0=gdat(shot,'b0'); -[zz itb0]=min(abs(b0.t-time_eff)); -eqdsk.b0 = b0.data(itb0); -eqdsk.r0 = 1.65; -fedge=eqdsk.r0.*eqdsk.b0; -F2 = psisign.*2.*F2_05 + fedge.^2; -eqdsk.F = sqrt(F2)*sign(eqdsk.b0); - -rmag=gdat(shot,'rmag'); -[zz itrmag]=min(abs(rmag.t-time_eff)); -eqdsk.raxis = rmag.data(itrmag); -zmag=gdat(shot,'zmag'); -eqdsk.zaxis = zmag.data(itrmag); - -% get plasma boundary -figure -contour(eqdsk.rmesh,eqdsk.zmesh,eqdsk.psi',100) -hold -psiedge_eff = 0.001*eqdsk.psiaxis + 0.999*eqdsk.psiedge; -[hh1 hh2]=contour(eqdsk.rmesh,eqdsk.zmesh,eqdsk.psi',[psiedge_eff psiedge_eff],'k'); -axis equal -ij=1; -ij_prev = 0; -nbhh1(ij)=hh1(2,ij_prev+1); -Rbnd{ij}=hh1(1,2:1+nbhh1(ij)); -Zbnd{ij}=hh1(2,2:1+nbhh1(ij)); -ij_prev = ij_prev+1+nbhh1(ij); -while (ij_prev+1<size(hh1,2)) - % next - ij=ij + 1; - nbhh1(ij)=hh1(2,ij_prev+1); - Rbnd{ij}=hh1(1,ij_prev+2:ij_prev+1+nbhh1(ij)); - Zbnd{ij}=hh1(2,ij_prev+2:ij_prev+1+nbhh1(ij)); - ij_prev = ij_prev+1+nbhh1(ij); -end -% assume LCFS with most points -[zzz irz]=max(nbhh1); -eqdsk.nbbound = nbhh1(irz); -eqdsk.rplas = Rbnd{irz}'; -eqdsk.zplas = Zbnd{irz}'; -plot(eqdsk.rplas,eqdsk.zplas,'k-') - -[aget]=which('geteqdskAUG'); -[path1,name2,ext3]=fileparts(aget); -eval(['load ' fullfile(path1,'AUG_innerouterwall.data')]) -eqdsk.nblim=size(AUG_innerouterwall,1); -eqdsk.rlim=AUG_innerouterwall(:,1); -eqdsk.zlim=AUG_innerouterwall(:,2); -plot(eqdsk.rlim,eqdsk.zlim,'k-') - -eqdskAUG = eqdsk; diff --git a/crpptbx_new/AUG/loadAUGdata.m b/crpptbx_new/AUG/loadAUGdata.m deleted file mode 100644 index 8978a6eb..00000000 --- a/crpptbx_new/AUG/loadAUGdata.m +++ /dev/null @@ -1,1562 +0,0 @@ -function [trace,error,varargout]=loadAUGdata(shot,data_type,varargin) -% -% data_type: -% 'Ip' = current -% 'zmag' = vertical position of the center of the plasma (magnetic axis) -% 'rmag' = radial position of the center of the plasma -% 'sxr' = soft x-ray emission -% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{5}!) -% 'SXB' = soft x-ray emission from (by default camera J) SXB/J_xx camera (sxb, sxB, etc all work) -% 'SXF' = soft x-ray emission from (by default camera J) SXF/I_xx camera (sxf, sxF, etc all work) -% 'SSX_H' = from SSX, H channel, same for G, I, etc -% 'SSX' : gets the SSX_G by default at this stage -% -% gdat(15133,'MAG/Ipa',1,'AUG') % uses experiment=AUGD shotfiles per default -% gdat(15133,'MAG/Ipa',1) (sufficient at AUG since 'AUG' per defaut, same with gdat(15133,'ip',1) -% gdat(15133,'AUGD/MAG/Ipa',1,'AUG') % to specify experiment explicitely like in: -% gdat(30230,'ECED/RMD/Trad-A',1,'AUG') % -% gdat(30230,'ECED/CEC/Trad-A',1,'AUG') % -% gdat(31053,'MSP/IGP_07Co',1); % N gas opening at -6s (03 as well) -% -% INPUT: -% shot: shot number -% data_type: type of the required data: 'diag_name/sig_name' -% -% examples: -% data_type='SXR/B', 'TOT/beta_N', 'SXB/J_053', 'SXB' -% data_type='POT/ELMa-Han', 'MOD/OddNAmp', 'MOD/EvenNAmp', 'TOT/PNBI_TOT', 'TOT/P_TOT' -% -% Meaning of varargin depends on data_type: -% -% data_type=sxr, sxb, sxf or ece, eced: -% varargin{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2 -% varargin{2}: channel status: 1=unread yet, 0=read -% (for traces with many channel, enables to load additional channels, -% like SXR, ECE, etc.) -% varargin{3}: zmag for varargout{1} computation -% varargin{4}: time range [t1 t2] (to limit data collected) -% varargin{5}: nth to keep only nth time points of traces -% varargin{6}: camera to use: 'B' (default), 'A', -% -% OUTPUT: -% trace.data: data structure -% trace.t: time of reference -% trace.x: space of reference -% .... others related to data -% error: error in loading signal (0=> OK, 1=> error) -% -% Additional Output arguments depending on data_type -% -% data_type=sxR: -% varargout{1}: intersection of the view lines with magnetic axis -% -% functions needed: SF2ML or mdsplus routines -% -% Example: -% [ip,error]=loadAUGdata(shot,'ip'); -% [ip,error]=loadAUGdata(shot,'MAG/Ipi'); -% [n2,error]=loadAUGdata(shot,'MOD/EvenNAmp'); -% -% List of keywords (can be used in adition to 'DIAG/tracenam'), with comments when not obvious: -% -% Ip : -% b0 : -% zmag : -% rmag : -% rgeo : -% zgeo : -% q0 : -% q95 : -% kappa : -% delta : -% deltatop : -% deltabot : -% neint : -% neterho : -% cxrs : CXRS structure from CEZ with vrot, Ti, ... -% cxrs_rho : same as cxrs but project on rho as well (using 'equil' information) -% equil : equilibrium structure, rhopol, rhotor, rhovol, etc from EQI -% equil_fpp : as equil but from FPP -% equil_eqm : as equil but from EQM -% equil_eqr : as equil but from EQR -% equil_eqh : as equil but from EQH -% sxr : from SXR/A or B (from old stuff, not sure still OK) -% sxR : from SXR/A or B adding R of chords (from old stuff, not sure still OK) -% sxb : 'SXB/J' chords -% sxf : 'SXF/I' chords -% transp_EXPNAME : data from TRA using experiment name = "EXPNAME" -% ece : -% ece_rho : -% eced : -% eced_rho : -% eced_rmd : -% Halpha : -% pgyro : for each gyrotrons, power, freq, etc (ask for more) -% powers : power traces for each sources -% - - -varargout={cell(1,1)}; -error=1; -shotfile_exp = 'AUGD'; - -% To allow multiple ways of writing a specific keyword, use data_type_eff within this routine -data_type_eff=data_type; -if size(data_type,1)==1 - % there might be "/" in the name, add backslash to protect it, thus remove in the name afterwards: - inotok=findstr('\/',data_type); - iok=regexp(data_type,'[^\\]/'); - iok=iok+1; - if ~isempty(inotok) - % remove \/ and construct index of real separators "/" - for ij=1:length(inotok) - ijk=find(iok>inotok(ij)); - if ~isempty(ijk) - iok(ijk) = iok(ijk) - 1; - end - end - end - inobackslash=regexp(data_type,'[^\\]'); - data_type=data_type(inobackslash); - index_slash = iok; - % i=findstr('/',data_type); - i = index_slash; - if length(i)==1 - % assumes given a la 'MAG/Ipi' - data_type_eff=[{data_type(1:i(1)-1)} ; {data_type(i(1)+1:end)}]; - elseif length(i)==2 - % assumes given a la 'AUGD/MAG/Ipi' or 'ECED/RMP/Trad-A' - data_type_eff=[{data_type(i(1)+1:i(2)-1)} ; {data_type(i(2)+1:end)}]; - shotfile_exp = data_type(1:i(1)-1); - elseif length(i)>2 - disp(['more / than expected in tracename: length(i)= ' num2str(length(i))]) - data_type - end -elseif isempty(data_type) - data_type_eff = ' '; -end - -i_efitm=0; -i_ext=length(data_type_eff)+1; -name_ext=''; -if size(data_type_eff,1)==1 - data_type_eff_noext=data_type_eff(1:i_ext-1); - if ~isempty(strmatch(data_type_eff_noext,[{'ip'} {'i_p'} {'IP'} {'iP'} {'xip'}],'exact')) - data_type_eff_noext='Ip'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'B0'}],'exact')) - data_type_eff_noext='b0'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact')) - data_type_eff_noext='te'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Ne'} {'n_e'} {'NE'} {'N_e'}],'exact')) - data_type_eff_noext='ne'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Terho'}],'exact')) - data_type_eff_noext='terho'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'neterho'}],'exact')) - data_type_eff_noext='neterho'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'cxrs'} {'vrot'} {'ti'}],'exact')) - data_type_eff_noext='cxrs'; % load full CEZ structure - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'cxrs_rhos'} {'cxrs_rho'} {'cxrsrho'} {'cxrsrhos'}],'exact')) - data_type_eff_noext='cxrs_rho'; % load full CEZ structure - end - if ~isempty(strmatch(data_type_eff_noext,[{'SXR'}],'exact')) - data_type_eff_noext='sxr'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'SXB'} {'sxb'} {'Sxb'} {'sXb'} {'sxB'} {'SXb'}],'exact')) - data_type_eff_noext='sxb'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'SXF'} {'sxf'} {'Sxf'} {'sXf'} {'sxf'} {'SXf'}],'exact')) - data_type_eff_noext='sxf'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ssx_g'} {'ssx'}],'exact')) - data_type_eff_noext='ssx_g'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ssx_h'} {'ssx'}],'exact')) - data_type_eff_noext='ssx_h'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ssx_i'} {'ssx'}],'exact')) - data_type_eff_noext='ssx_i'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ssx_j'} {'ssx'}],'exact')) - data_type_eff_noext='ssx_j'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ssx'}],'exact')) - data_type_eff_noext='ssx'; - end - if ~isempty(strmatch(lower(data_type_eff_noext(1:min(7,length(data_type_eff_noext)))),[{'transp_'}],'exact')) - shotfile_exp = data_type_eff_noext(8:end) - data_type_eff_noext='transp' - end - if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) - data_type_eff_noext='ece'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'ece_rho'}],'exact')) - data_type_eff_noext='ece_rho'; - end - if ~isempty(strmatch(upper(data_type_eff_noext),[{'ECED'}],'exact')) - data_type_eff_noext='eced'; - end - if ~isempty(strmatch(upper(data_type_eff_noext),[{'ECED_RHO'}],'exact')) - data_type_eff_noext='eced_rho'; - end - if ~isempty(strmatch(upper(data_type_eff_noext),[{'ECED_RMD'}],'exact')) - data_type_eff_noext='eced_rmd'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact')) - data_type_eff_noext='vol'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'q_0'} {'Q0'}],'exact')) - data_type_eff_noext='q0'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'q_95'} {'Q95'}],'exact')) - data_type_eff_noext='q95'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'elongation'} {'elon'}],'exact')) - data_type_eff_noext='kappa'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'triangularity'} {'triang'}],'exact')) - data_type_eff_noext='delta'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltaup'} {'deltau'} {'triangtop'} {'triangu'} {'triangup'}],'exact')) - data_type_eff_noext='deltatop'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltalow'} {'deltal'} {'triangbot'} {'triangl'} {'trianglow'}],'exact')) - data_type_eff_noext='deltabot'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'qrho_FPP'}],'exact')) - data_type_eff_noext='qrho_fpp'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'equil_FPP'}],'exact')) - data_type_eff_noext='equil_fpp'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'equil_eqm'}],'exact')) - data_type_eff_noext='equil_eqm'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'equil_eqr'}],'exact')) - data_type_eff_noext='equil_eqr'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'equil_eqh'}],'exact')) - data_type_eff_noext='equil_eqh'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rmag'}],'exact')) - data_type_eff_noext='rmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rgeo'}],'exact')) - data_type_eff_noext='rgeo'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zmag'}],'exact')) - data_type_eff_noext='zmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zgeo'}],'exact')) - data_type_eff_noext='zgeo'; - end -% $$$ if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact')) -% $$$ data_type_eff_noext='rcont'; -% $$$ end -% $$$ if ~isempty(strmatch(data_type_eff_noext,[{'Zcont'}],'exact')) -% $$$ data_type_eff_noext='zcont'; -% $$$ end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'betan'} {'betn'} {'beta_n'}],'exact')) - data_type_eff_noext='betan'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'betap'} {'betp'} {'betpol'} {'betapol'} {'beta_p'} {'beta_pol'}],'exact')) - data_type_eff_noext='betap'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Ha'} {'ha'} {'Halpha'} {'halpha'}],'exact')) - data_type_eff_noext='Halpha'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'pgyro'} {'pec'} {'pech'} {'pecrh'} {'p_ec'} {'p_gyro'}],'exact')) - data_type_eff_noext='pgyro'; - end - if ~isempty(strmatch(lower(data_type_eff_noext),[{'powers'} {'ptot'} {'ptots'}],'exact')) - data_type_eff_noext='powers'; - end -else - i_ext=length(data_type_eff{2})+1; - name_ext=''; - data_type_eff_noext=data_type_eff{2}(1:i_ext-1); -end - -% all keywords and corresponding case to run below -AUGkeywrdall=[{'Ip'} {'b0'} {'zmag'} {'rmag'} {'rgeo'} {'zgeo'} {'vol'} {'qrho'} {'qrho_fpp'} {'q0'} {'q95'} {'kappa'} ... - {'delta'} {'deltatop'} {'deltabot'} {'neint'} {'ne'} {'te'} ... - {'nerho'} {'neterho'} {'terho'} {'cxrs'} {'cxrs_rho'} {'equil'} {'equil_fpp'} {'equil_eqm'} ... - {'equil_eqr'} {'equil_eqh'} {'sxr'} {'sxR'} {'sxb'} {'sxf'} {'ssx_g'} {'ssx_h'} {'ssx_i'} {'ssx_j'} {'ssx'} ... - {'transp'} {'ece'} {'ece_rho'} {'eced'} {'eced_rho'} {'eced_rmd'} {'Halpha'} {'pgyro'} {'powers'} ... - {'betan'} {'betap'}]; % rm, not yet implemented: {'rcont'} {'zcont'} -AUGsig.iip=strmatch('Ip',AUGkeywrdall,'exact'); -AUGsig.ib0=strmatch('b0',AUGkeywrdall,'exact'); -AUGsig.izmag=strmatch('zmag',AUGkeywrdall,'exact'); -AUGsig.irmag=strmatch('rmag',AUGkeywrdall,'exact'); -AUGsig.irgeo=strmatch('rgeo',AUGkeywrdall,'exact'); -AUGsig.izgeo=strmatch('zgeo',AUGkeywrdall,'exact'); -% $$$ AUGsig.ircont=strmatch('rcont',AUGkeywrdall,'exact'); -% $$$ AUGsig.izcont=strmatch('zcont',AUGkeywrdall,'exact'); -AUGsig.ivol=strmatch('vol',AUGkeywrdall,'exact'); -AUGsig.iqrho=strmatch('qrho',AUGkeywrdall,'exact'); -AUGsig.iqrho_fpp=strmatch('qrho_fpp',AUGkeywrdall,'exact'); -AUGsig.iequil=strmatch('equil',AUGkeywrdall,'exact'); -AUGsig.iequil_fpp=strmatch('equil_fpp',AUGkeywrdall,'exact'); -AUGsig.iequil_eqm=strmatch('equil_eqm',AUGkeywrdall,'exact'); -AUGsig.iequil_eqr=strmatch('equil_eqr',AUGkeywrdall,'exact'); -AUGsig.iequil_eqh=strmatch('equil_eqh',AUGkeywrdall,'exact'); -AUGsig.iq0=strmatch('q0',AUGkeywrdall,'exact'); -AUGsig.iq95=strmatch('q95',AUGkeywrdall,'exact'); -AUGsig.ikappa=strmatch('kappa',AUGkeywrdall,'exact'); -AUGsig.idelta=strmatch('delta',AUGkeywrdall,'exact'); -AUGsig.ideltatop=strmatch('deltatop',AUGkeywrdall,'exact'); -AUGsig.ideltabot=strmatch('deltabot',AUGkeywrdall,'exact'); -AUGsig.ibetan=strmatch('betan',AUGkeywrdall,'exact'); -AUGsig.ibetap=strmatch('betap',AUGkeywrdall,'exact'); -AUGsig.ineint=strmatch('neint',AUGkeywrdall,'exact'); -AUGsig.ine=strmatch('ne',AUGkeywrdall,'exact'); -AUGsig.ite=strmatch('te',AUGkeywrdall,'exact'); -AUGsig.inerho=strmatch('nerho',AUGkeywrdall,'exact'); -AUGsig.iterho=strmatch('terho',AUGkeywrdall,'exact'); -AUGsig.ineterho=strmatch('neterho',AUGkeywrdall,'exact'); -AUGsig.icxrs=strmatch('cxrs',AUGkeywrdall,'exact'); -AUGsig.icxrs_rho=strmatch('cxrs_rho',AUGkeywrdall,'exact'); -AUGsig.isxr=strmatch('sxr',AUGkeywrdall,'exact'); -AUGsig.isxR=strmatch('sxR',AUGkeywrdall,'exact'); -AUGsig.isxb=strmatch('sxb',AUGkeywrdall,'exact'); -AUGsig.isxf=strmatch('sxf',AUGkeywrdall,'exact'); -AUGsig.issx_g=strmatch('ssx_g',AUGkeywrdall,'exact'); -AUGsig.issx_h=strmatch('ssx_h',AUGkeywrdall,'exact'); -AUGsig.issx_i=strmatch('ssx_i',AUGkeywrdall,'exact'); -AUGsig.issx_j=strmatch('ssx_j',AUGkeywrdall,'exact'); -AUGsig.issx=strmatch('ssx',AUGkeywrdall,'exact'); -AUGsig.itransp=strmatch('transp',AUGkeywrdall,'exact'); -AUGsig.iece=strmatch('ece',AUGkeywrdall,'exact'); -AUGsig.ieced=strmatch('eced',AUGkeywrdall,'exact'); -AUGsig.iece_rho=strmatch('ece_rho',AUGkeywrdall,'exact'); -AUGsig.ieced_rho=strmatch('eced_rho',AUGkeywrdall,'exact'); -AUGsig.ieced_rmd=strmatch('eced_rmd',AUGkeywrdall,'exact'); -AUGsig.iHalpha=strmatch('Halpha',AUGkeywrdall,'exact'); -AUGsig.ipgyro=strmatch('pgyro',AUGkeywrdall,'exact'); -AUGsig.ipowers=strmatch('powers',AUGkeywrdall,'exact'); - -% For each keyword, specify which case to use. As most common is 'simplereaddata', fill in with this and change -% only indices needed. Usually use name of case same as keyword name -AUGkeywrdcase=cell(size(AUGkeywrdall)); -AUGkeywrdcase(:)={'simplereaddata'}; -AUGkeywrdcase(AUGsig.iqrho)=AUGkeywrdall(AUGsig.iqrho); % special as efit q on psi -AUGkeywrdcase(AUGsig.iqrho_fpp)=AUGkeywrdall(AUGsig.iqrho_fpp); % special as efit q on psi -AUGkeywrdcase(AUGsig.iequil)=AUGkeywrdall(AUGsig.iequil); % special as efit q on psi -AUGkeywrdcase(AUGsig.iequil_fpp)=AUGkeywrdall(AUGsig.iequil_fpp); % special as efit q on psi -AUGkeywrdcase(AUGsig.iequil_eqm)=AUGkeywrdall(AUGsig.iequil_eqm); % special as efit q on psi -AUGkeywrdcase(AUGsig.iequil_eqr)=AUGkeywrdall(AUGsig.iequil_eqr); % special as efit q on psi -AUGkeywrdcase(AUGsig.iequil_eqh)=AUGkeywrdall(AUGsig.iequil_eqh); -%AUGkeywrdcase(AUGsig.idelta)=AUGkeywrdall(AUGsig.idelta); % special as average of triu and tril -AUGkeywrdcase(AUGsig.ine)=AUGkeywrdall(AUGsig.ine); % special as adds error bars -AUGkeywrdcase(AUGsig.ite)=AUGkeywrdall(AUGsig.ite); % idem -AUGkeywrdcase(AUGsig.inerho)=AUGkeywrdall(AUGsig.inerho); % idem -AUGkeywrdcase(AUGsig.ineterho)=AUGkeywrdall(AUGsig.ineterho); % idem -AUGkeywrdcase(AUGsig.iterho)=AUGkeywrdall(AUGsig.iterho); % idem -AUGkeywrdcase(AUGsig.isxr)=AUGkeywrdall(AUGsig.isxr); -AUGkeywrdcase(AUGsig.isxR)=AUGkeywrdall(AUGsig.isxR); -AUGkeywrdcase(AUGsig.isxb)=AUGkeywrdall(AUGsig.isxb); -AUGkeywrdcase(AUGsig.isxf)=AUGkeywrdall(AUGsig.isxf); -AUGkeywrdcase(AUGsig.issx_g)=AUGkeywrdall(AUGsig.issx_g); -AUGkeywrdcase(AUGsig.issx_h)=AUGkeywrdall(AUGsig.issx_h); -AUGkeywrdcase(AUGsig.issx_i)=AUGkeywrdall(AUGsig.issx_i); -AUGkeywrdcase(AUGsig.issx_j)=AUGkeywrdall(AUGsig.issx_j); -AUGkeywrdcase(AUGsig.issx)=AUGkeywrdall(AUGsig.issx); -AUGkeywrdcase(AUGsig.itransp)={data_type_eff_noext}; -AUGkeywrdcase(AUGsig.iece)=AUGkeywrdall(AUGsig.iece); -AUGkeywrdcase(AUGsig.ieced)=AUGkeywrdall(AUGsig.ieced); -AUGkeywrdcase(AUGsig.iece_rho)=AUGkeywrdall(AUGsig.iece_rho); -AUGkeywrdcase(AUGsig.ieced_rho)=AUGkeywrdall(AUGsig.ieced_rho); -AUGkeywrdcase(AUGsig.icxrs)=AUGkeywrdall(AUGsig.icxrs); -AUGkeywrdcase(AUGsig.icxrs_rho)=AUGkeywrdall(AUGsig.icxrs_rho); -AUGkeywrdcase(AUGsig.ipgyro)=AUGkeywrdall(AUGsig.ipgyro); % idem -AUGkeywrdcase(AUGsig.ipowers)=AUGkeywrdall(AUGsig.ipowers); % idem - -% Information about which dimension has time, always return 2D data as (x,t) array -% as most are 1D arrays with time as first index, fill in with ones and change only those needed -AUGsigtimeindx=ones(size(AUGkeywrdall)); - -% For the 'simplereaddata' cases, we need the full node in case gdat was called with full location directly -% for the other cases, leave this location empty -AUGsiglocation=cell(2,size(AUGkeywrdall,2)); -AUGsiglocation(:)={''}; -AUGsiglocation(:,AUGsig.iip)={'MAG'; 'Ipa'}; -AUGsiglocation(:,AUGsig.ib0)={'FPC'; 'BTF'}; % at 1.65m (?) -AUGsiglocation(:,AUGsig.izmag)={'FPG'; 'Zmag'}; -AUGsiglocation(:,AUGsig.irmag)={'FPG'; 'Rmag'}; -AUGsiglocation(:,AUGsig.irgeo)={'FPG'; 'Rgeo'}; -AUGsiglocation(:,AUGsig.izgeo)={'FPG'; 'Zgeo'}; -% $$$ AUGsiglocation(:,AUGsig.ircont)={'' ; ''}; AUGsigtimeindx(AUGsig.ircont)=2; -% $$$ AUGsiglocation(:,AUGsig.izcont)={'' ; ''}; AUGsigtimeindx(AUGsig.izcont)=2; -AUGsiglocation(:,AUGsig.ivol)={'FPG'; 'Vol'}; -AUGsiglocation(:,AUGsig.iq0)={'FPG'; 'q0'}; -AUGsiglocation(:,AUGsig.iq95)={'FPG'; 'q95'}; -AUGsiglocation(:,AUGsig.ikappa)={'FPG'; 'k'}; -AUGsiglocation(:,AUGsig.ideltatop)={'FPG'; 'delRoben'}; -AUGsiglocation(:,AUGsig.ideltabot)={'FPG'; 'delRuntn'}; -AUGsiglocation(:,AUGsig.ibetan)={'TOT'; 'beta_N'}; -AUGsiglocation(:,AUGsig.ibetap)={'FPG'; 'betpol'}; -AUGsiglocation(:,AUGsig.ineint)={'DCN'; 'H-1'}; -AUGsiglocation(:,AUGsig.iece)={'CEC'; 'Trad-A'}; -AUGsiglocation(:,AUGsig.ieced)={'CEC'; 'Trad-A'}; % ECED -AUGsiglocation(:,AUGsig.iece_rho)={'CEC'; 'Trad-A'}; -AUGsiglocation(:,AUGsig.ieced_rho)={'CEC'; 'Trad-A'}; % ECED -AUGsiglocation(:,AUGsig.ieced_rmd)={'RMD'; 'Trad-A'}; % ECED_RMD -AUGsiglocation(:,AUGsig.iHalpha)={'POT'; 'ELMa-Han'}; - -% For the 'simplereaddata' cases, we need the full node in case gdat was called with full location directly -% for the other cases, leave this location empty -AUGexplocation=cell(size(AUGkeywrdall,2),1); -AUGexplocation(:)={'AUGD'}; -% cases with a "private" shotfile: -AUGexplocation(AUGsig.ieced)={'ECED'}; -AUGexplocation(AUGsig.ieced_rho)={'ECED'}; -AUGexplocation(AUGsig.ieced_rmd)={'ECED'}; -AUGexplocation(AUGsig.itransp)={shotfile_exp}; - -if shot==-9 - clear trace - for i=1:length(AUGkeywrdall) - fieldname_eff = lower(AUGkeywrdall{i}); - keyword_eff = AUGkeywrdall{i}; - ij=findstr(fieldname_eff,':'); - if ~isempty(ij); - fieldname_eff(ij)='_'; - keyword_eff(ij:end+1)=[':i' keyword_eff(ij+1:end)] ; - end - trace.(fieldname_eff) = keyword_eff; - end - % add example for Ip trace full call - trace.ipfullcall = 'MAG/Ipa'; - % trace.data=[]; - return -end - -% initialize order of substructures and allows just a "return" if data empty -trace.data=[]; -trace.x=[]; -trace.t=[]; -trace.dim=[]; -trace.dimunits=[]; -trace.name=[]; - -% find index of signal called upon -if size(data_type_eff,1)==2 - % in case node name was given in 2 parts directly (as old way) - ii1=strmatch(data_type_eff(1),AUGsiglocation(1,:),'exact'); - iiindex=strmatch(data_type_eff_noext,AUGsiglocation(2,ii1),'exact'); - if ~isempty(iiindex) - index=ii1(iiindex); - else - index=[]; - end - if isempty(index) -% $$$ disp('********************') -% $$$ disp('trace not yet registered.') -% $$$ disp('If standard data, ask andrea.scarabosio@epfl.ch or olivier.sauter@epfl.ch to create a keyqord entry for this data') -% eval(['!mail -s ''' data_type_eff{1} ' ' data_type_eff{2} ' ' num2str(shot) ' ' ... -% getenv('USER') ' AUG'' olivier.sauter@epfl.ch < /dev/null']) - disp('********************') - % temporarily add entry in arrays, so can work below - index=length(AUGkeywrdall)+1; - AUGkeywrdall(end+1)={'new'}; - AUGkeywrdcase(end+1)={'simplereaddata'}; - AUGsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; - AUGexplocation{end+1}=shotfile_exp; - AUGsigtimeindx(end+1)=0; - AUGkeywrdcase{index} - elseif length(index)>1 || ~strcmp(AUGkeywrdcase{index},'simplereaddata') -% $$$ msgbox(['Problem in loadAUGdata with data_type_eff = ' char(data_type_eff(end)) ... -% $$$ '. Full paths of nodes should only be for case simplereaddata'],'in loadAUGdata','error') -% $$$ error('in loadAUGdata') - % chose a full path which coincides with a keyword - disp('the node path seems to coincide with the following keywords, which might be better to use:') - disp(' ') - disp(AUGkeywrdcase(index)) - disp('proceed as is in any case') - index=length(AUGkeywrdall)+1; - AUGkeywrdall(end+1)={'new'}; - AUGkeywrdcase(end+1)={'simplereaddata'}; - AUGsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; - AUGexplocation{end+1}=shotfile_exp; - AUGsigtimeindx(end+1)=0; - AUGkeywrdcase{index} - end -else - index=strmatch(data_type_eff_noext,AUGkeywrdall,'exact'); - if isempty(index) - disp(' ') - disp('********************') - if iscell(data_type_eff) - disp(['no such keyword: ' data_type_eff{1} '/' data_type_eff{2}]) - else - disp(['no such keyword: ' data_type_eff]) - end - disp(' ') - disp('Available keywords:') - AUGkeywrdall(:) - disp('********************') - return - end -end -disp(' ') -if iscell(data_type_eff) - disp(['loading' ' ' data_type_eff{1} '/' data_type_eff{2} ' from AUG shot #' num2str(shot)]); -else - disp(['loading' ' ' data_type_eff ' from AUG shot #' num2str(shot)]); -end -disp(['case ' AUGkeywrdcase{index}]) -disp(' ') - -switch AUGkeywrdcase{index} - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'simplereaddata' - - ppftype=AUGsiglocation{1,index}; - shotfile_exp_eff = AUGexplocation{index}; - if i_efitm; - tracename=['eftm' AUGsiglocation{2,index}(5:end) name_ext]; - else - tracename=[AUGsiglocation{2,index} name_ext]; - end - ij=find(tracename~=''''); - tracename=tracename(ij) - [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff); -% switch tracename -% special cases if traces do not exist for some shot or other -% end - - trace=a; - clear error - error=e; - if isempty(trace.data) - trace.dimunits=[]; - elseif length(size(trace.data))==1 | (length(size(trace.data))==2 & size(trace.data,2)==1) - trace.dim=[{trace.t}]; - trace.dimunits={'time [s]'}; - elseif length(size(trace.data))==2 - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'R [m] or rho=sqrt(psi_norm)'} ; {'time [s]'}]; - else - % disp('how to deal with 3D arrays?') - % find time dimension - ilentime=length(trace.t); - ij=find(size(trace.value)==ilentime); - if ij==1; - % as expected - trace.x = [1:size(trace.value,2)]; - trace.dim=[{trace.t} ; {trace.x} ; {[1:size(trace.value,3)]}]; - trace.dimunits=[{'time [s]'} ; {''} ; {''}]; - else - trace.dim=[{[]} ; {[]} ; {[]}]; - trace.dim{ij} = trace.t; - trace.dimunits=[{[]} ; {[]} ; {[]}]; - trace.dimunits{ij}='time [s]'; - end - end - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'sxr','sxR'} - % LOAD MULTI CHANNEL DATA - % load AUG soft x-ray data - - shotfile_exp_eff = AUGexplocation{index}; - - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=30; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi-starti+1,1); - end - if nargin>=6 & ~isempty(varargin{4}) - timerange=varargin{4}; - else - timerange=[1 7]; - end - if nargin>=7 & ~isempty(varargin{5}) - nth=varargin{5}; - else - nth=13; - end - if nargin>=8 & ~isempty(varargin{6}) - tracename=varargin{6}; - else - tracename='B'; - end - trace.t=[]; - trace.x=[]; - ppftype='SXR'; - [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff,timerange); - trace=a; - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.x=trace.dim{1}; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.units='W/m^2'; - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - % keep only nth points - trace.t=trace.t(1:nth:end); - trace.data=trace.data(:,1:nth:end); - trace.dim{2}=trace.t; - % calculating intersection of the view lines with magnetics axis - if strcmp(data_type_eff_noext,'sxR') - if nargin>=5 & ~isempty(varargin{3}) - zmag=varargin{3}; - else - zmag=loadAUGdata(shot,'zmag'); - end - zmageff=interp1(zmag.t,zmag.data,trace.t); - if strcmp(tracename,'B') - [R_B, Z_B, ang_B,Rsxr]=sxrbgeometry(zmageff); - elseif strcmp(tracename,'A') - [R_A, Z_A, ang_A,Rsxr]=sxrageometry(zmageff); - else - disp(['sxr camera: ' tracename ' not set yet for calculating R projection']) - return - end - radius.data=Rsxr; - radius.t=trace.t; - varargout{1}={radius}; - trace.R=radius; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'sxb', 'sxf', 'ssx', 'ssx_g', 'ssx_h', 'ssx_i', 'ssx_j'} - % LOAD MULTI CHANNEL DATA SXB/J_0xx (or other than J camera if specified in varargin{8}) - % load AUG soft x-ray data - - shotfile_exp_eff = AUGexplocation{index}; - - if nargin>=3 & ~isempty(varargin{1}) - % chords to be loaded - starti=varargin{1}(1); - endi=varargin{1}(2); - elseif strcmp(AUGkeywrdcase{index}(1:3),'ssx') - starti=1; - endi=60; - else - starti=52; - endi=54; - end - if nargin>=4 & ~isempty(varargin{2}) - % chords already loaded, 1=not loaded (to load), 0=loaded - status=varargin{2}; - else - status=ones(endi-starti+1,1); - end - if nargin>=6 & ~isempty(varargin{4}) - timerange=varargin{4}; - else - timerange=[0 10]; - end - if nargin>=7 & ~isempty(varargin{5}) - nth=varargin{5}; - else - nth=13; - end - if nargin>=8 & ~isempty(varargin{6}) - tracename=varargin{6}; - else - if strcmp(AUGkeywrdcase{index},'sxb') - tracename='J'; - elseif strcmp(AUGkeywrdcase{index},'sxf') - tracename='I'; - elseif strcmp(AUGkeywrdcase{index},'ssx') - tracename='G'; - elseif strcmp(AUGkeywrdcase{index}(1:4),'ssx_') - tracename=upper(AUGkeywrdcase{index}(5)); - else - disp('should not be here, ask O. Sauter'); - end - end - trace.t=[]; - trace.x=[]; - ppftype=upper(AUGkeywrdcase{index}(1:3)); - iok=0; - for ichord=starti:endi - tracename_eff = [tracename '_' num2str(ichord,'%.3d')]; - try - [a,e]=rdaAUG_eff(shot,ppftype,tracename_eff,shotfile_exp_eff,timerange); - catch - a = []; - end - if isempty(a) || e~=0 - if ~exist('trace_all') - trace_all = struct([]); - else - end - else - if iok==0 - trace_all = a; - trace_all = rmfield(trace_all,[{'value'},{'data'}]); - iok = iok+1; - else - iok = iok+1; - end - trace_all.value(ichord,:) = a.value; - trace_all.data(ichord,:) = a.data; - end - end - if ~isempty(trace_all) - trace_all.dim=[{[starti:endi]'} ; {trace.t}]; - trace = trace_all; - trace.x=trace.dim{1}; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.units='W/m^2'; - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - % keep only nth points - trace.t=trace.t(1:nth:end); - trace.data=trace.data(:,1:nth:end); - trace.dim{2}=trace.t; - trace.value=trace.value(:,1:nth:end); - trace.time_aug.value=trace.time_aug.value(1:nth:end); - else - trace.data = []; - trace.dim = []; - trace.dimunits = []; - trace.x = []; - trace.t = []; - trace.units = []; - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'ece','eced','ece_rho','eced_rho'} - % LOAD MULTI CHANNEL DATA - % load AUG ece data - - shotfile_exp_eff = AUGexplocation{index}; - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=30; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi-starti+1,1); - end - if nargin>=6 & ~isempty(varargin{4}) - timerange=varargin{4}; - else - timerange=[0 10]; - end - if nargin>=7 & ~isempty(varargin{5}) - nth=varargin{5}; - else - nth=1; - end - trace.t=[]; - trace.x=[]; - ppftype=AUGsiglocation{1,index}; - tracename=AUGsiglocation{2,index}; - [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff,timerange); - starti=1; - endi=size(a.value,1); - trace=a; - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.x=trace.dim{1}; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.units='W/m^2'; - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - % keep only nth points - trace.t=trace.t(1:nth:end); - trace.data=trace.data(:,1:nth:end); - trace.dim{2}=trace.t; - % get R - try - [aR,e]=rdaAUG_eff(shot,ppftype,'R-A',shotfile_exp_eff,timerange); - catch - end - try - [aZ,e]=rdaAUG_eff(shot,ppftype,'z-A',shotfile_exp_eff,timerange); % (problem now) - %aZ=aR; - %aZ.data=ones(size(aR.data)); - catch - disp(['problem with getting z-A in ' ppftype]) - end - domatchRtime=0; - if domatchRtime - % interpolate R structure on ece data time array, to ease plot vs R - for i=starti:endi - radius.data(i,:) = interp1(aR.t,aR.data(i,:),trace.t); - zheight.data(i,:) = interp1(aZ.t,aZ.data(i,:),trace.t); - end - radius.t=trace.t; - zheight.t=trace.t; - else - radius.data = aR.data; - radius.t=aR.t; - zheight.data = aZ.data; - zheight.t=aR.t; - end - ij=find(trace.data==0); - trace.data(ij)=NaN; - varargout{1}={radius}; - trace.R=radius; - trace.Z=zheight; - - if strcmp(AUGkeywrdcase{index},'ece_rho') || strcmp(AUGkeywrdcase{index},'eced_rho') - equil=gdat(shot,'equil',0); - inb_chord_ece=size(trace.R.data,1); - inb_time_ece=size(trace.R.data,2); - psi_out = NaN*ones(inb_chord_ece,inb_time_ece); - rhopsinorm_out = NaN*ones(inb_chord_ece,inb_time_ece); - rhotornorm_out = NaN*ones(inb_chord_ece,inb_time_ece); - rhovolnorm_out = NaN*ones(inb_chord_ece,inb_time_ece); - % constructs intervals within which a given equil is used: [time_equil(i),time_equil(i+1)] - time_equil=[1.5*equil.t(1)-0.5*equil.t(2) 0.5.*(equil.t(1:end-1)+equil.t(2:end)) 1.5*equil.t(end)-0.5*equil.t(end-1)]; - iok=find(aR.data(:,1)>0); - for itequil=1:length(time_equil)-1 - rr=equil.Rmesh(:,itequil); - zz=equil.Zmesh(:,itequil); - psirz_in = equil.psi2D(:,:,itequil); - it_ece_inequil = find(trace.R.t>=time_equil(itequil) & trace.R.t<=time_equil(itequil+1)); - if ~isempty(it_ece_inequil) - rout=trace.R.data(iok,it_ece_inequil); - ijok=find(~isnan(rout)); - if ~isempty(ijok) - zout=trace.Z.data(iok,it_ece_inequil); - psi_at_routzout = interpos2Dcartesian(rr,zz,psirz_in,rout,zout); - psi_out(iok,it_ece_inequil) = reshape(psi_at_routzout,length(iok),length(it_ece_inequil)); - rhopsinorm_out(iok,it_ece_inequil) = sqrt(abs((psi_out(iok,it_ece_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil)))); - for it_cx=1:length(it_ece_inequil) - rhotornorm_out(iok,it_ece_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhotornorm(:,itequil),rhopsinorm_out(iok,it_ece_inequil(it_cx)),-3,[2 2],[0 1]); - rhovolnorm_out(iok,it_ece_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhovolnorm(:,itequil),rhopsinorm_out(iok,it_ece_inequil(it_cx)),-3,[2 2],[0 1]); - end - end - end - end - trace.rhos.psi_on_rztime = psi_out; - trace.rhos.rhopsinorm_on_rztime = rhopsinorm_out; - trace.rhos.rhotornorm_on_rztime = rhotornorm_out; - trace.rhos.rhovolnorm_on_rztime = rhovolnorm_out; - trace.rhos.t = trace.R.t; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'cxrs', 'cxrs_rho'} - % LOAD CEZ data - % - - shotfile_exp_eff = AUGexplocation{index}; - - trace.t=[]; - trace.x=[]; - ppftype='CEZ'; - [a,e]=rdaAUG_eff(shot,ppftype,'vrot',shotfile_exp_eff); - if isempty(a) || e~=0 - cxrs = struct([]); - else - cxrs.vrot = a; - rmfield(cxrs.vrot,'x'); rmfield(cxrs.vrot,'t'); rmfield(cxrs.vrot,'data'); - cxrs.x = a.x; - cxrs.data = a.data; - cxrs.t = a.t; - cxrs.x = a.x; - end - if ~isempty(cxrs) - cxrs.dim=[{cxrs.x} ; {cxrs.t}]; - cxrs.dimunits=[{'chord'} ; {'time [s]'}]; - cxrs.name=[num2str(shot) '/' ppftype '/vrot;Ti;Ti_c']; - [aerr,e]=rdaAUG_eff(shot,ppftype,'err_vrot',shotfile_exp_eff); - cxrs.vrot.error = aerr.value; - [r_time]=sf2ab(ppftype,shot,'R_time','-exp',shotfile_exp_eff); - cxrs.r_time = r_time.value{1}; - [z_time]=sf2ab(ppftype,shot,'z_time','-exp',shotfile_exp_eff); - cxrs.z_time = z_time.value{1}; - [a,e]=rdaAUG_eff(shot,ppftype,'Ti',shotfile_exp_eff); - [aerr,e]=rdaAUG_eff(shot,ppftype,'err_Ti',shotfile_exp_eff); - cxrs.ti = a; - cxrs.ti.error = aerr.value; - [a,e]=rdaAUG_eff(shot,ppftype,'Ti_c',shotfile_exp_eff); - [aerr,e]=rdaAUG_eff(shot,ppftype,'err_Ti_c',shotfile_exp_eff); - cxrs.ti_c = a; - cxrs.ti_c.error = aerr.value; - % - if strcmp(AUGkeywrdcase{index},'cxrs_rho') - equil=gdat(shot,'equil',0); - inb_chord_cxrs=size(cxrs.r_time,1); - inb_time_cxrs=size(cxrs.r_time,2); - psi_out = NaN*ones(inb_chord_cxrs,inb_time_cxrs); - rhopsinorm_out = NaN*ones(inb_chord_cxrs,inb_time_cxrs); - rhotornorm_out = NaN*ones(inb_chord_cxrs,inb_time_cxrs); - rhovolnorm_out = NaN*ones(inb_chord_cxrs,inb_time_cxrs); - % constructs intervals within which a given equil is used: [time_equil(i),time_equil(i+1)] - time_equil=[1.5*equil.t(1)-0.5*equil.t(2) 0.5.*(equil.t(1:end-1)+equil.t(2:end)) 1.5*equil.t(end)-0.5*equil.t(end-1)]; - iok=find(cxrs.r_time(:,1)>0); - for itequil=1:length(time_equil)-1 - rr=equil.Rmesh(:,itequil); - zz=equil.Zmesh(:,itequil); - psirz_in = equil.psi2D(:,:,itequil); - it_cxrs_inequil = find(cxrs.t>=time_equil(itequil) & cxrs.t<=time_equil(itequil+1)); - if ~isempty(it_cxrs_inequil) - rout=cxrs.r_time(iok,it_cxrs_inequil); - zout=cxrs.z_time(iok,it_cxrs_inequil); - psi_at_routzout = interpos2Dcartesian(rr,zz,psirz_in,rout,zout); - psi_out(iok,it_cxrs_inequil) = reshape(psi_at_routzout,length(iok),length(it_cxrs_inequil)); - rhopsinorm_out(iok,it_cxrs_inequil) = sqrt((psi_out(iok,it_cxrs_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil))); - for it_cx=1:length(it_cxrs_inequil) - rhotornorm_out(iok,it_cxrs_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhotornorm(:,itequil),rhopsinorm_out(iok,it_cxrs_inequil(it_cx)),-3,[2 2],[0 1]); - rhovolnorm_out(iok,it_cxrs_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhovolnorm(:,itequil),rhopsinorm_out(iok,it_cxrs_inequil(it_cx)),-3,[2 2],[0 1]); - end - end - end - cxrs.psi_on_rztime = psi_out; - cxrs.rhopsinorm_on_rztime = rhopsinorm_out; - cxrs.rhotornorm_on_rztime = rhotornorm_out; - cxrs.rhovolnorm_on_rztime = rhovolnorm_out; - end - - trace = cxrs; - else - trace.data = []; - trace.dim = []; - trace.dimunits = []; - trace.x = []; - trace.t = []; - trace.units = []; - trace.name=[num2str(shot) '/' ppftype '/' 'vrot, Ti_c,...']; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'neterho'} % 'nerho', 'terho', - % LOAD VTA data - % Vertical Thomson core and edge - - shotfile_exp_eff = AUGexplocation{index}; - - trace.t=[]; - trace.x=[]; - ppftype='VTA'; - % if strcmp(AUGkeywrdcase{index},'terho') - [a,e]=rdaAUG_eff(shot,ppftype,'Te_c',shotfile_exp_eff); - if isempty(a) || e~=0 - thomson = struct([]); - else - thomson.te_core = a; - rmfield(thomson.te_core,'x'); rmfield(thomson.te_core,'t'); rmfield(thomson.te_core,'data'); - thomson.x = a.x; - thomson.data = a.data; - thomson.t = a.t; - thomson.time_core = a.t; - thomson.x = a.x; - end - if ~isempty(thomson) - thomson.dim=[{thomson.x} ; {thomson.t}]; - thomson.dimunits=[{'points'} ; {'time [s]'}]; - thomson.name=[num2str(shot) '/' ppftype '/te_c;te_e;ne_c;ne_e']; - [alow,e]=rdaAUG_eff(shot,ppftype,'Telow_c',shotfile_exp_eff); - [aup,e]=rdaAUG_eff(shot,ppftype,'Teupp_c',shotfile_exp_eff); - thomson.te_core.error = max(aup.value-thomson.te_core.value,thomson.te_core.value-alow.value); - % - [a,e]=rdaAUG_eff(shot,ppftype,'Ne_c',shotfile_exp_eff); - thomson.ne_core = a; - rmfield(thomson.ne_core,'x'); rmfield(thomson.ne_core,'t'); rmfield(thomson.ne_core,'data'); - [alow,e]=rdaAUG_eff(shot,ppftype,'Nelow_c',shotfile_exp_eff); - [aup,e]=rdaAUG_eff(shot,ppftype,'Neupp_c',shotfile_exp_eff); - thomson.ne_core.error = max(aup.value-thomson.ne_core.value,thomson.ne_core.value-alow.value); - % - [r_time]=rdaAUG_eff(shot,ppftype,'R_core',shotfile_exp_eff); - thomson.r_core_time = ones(size(thomson.te_core.value,1),1)*r_time.value; - [z_time]=rdaAUG_eff(shot,ppftype,'Z_core',shotfile_exp_eff); - thomson.z_core_time = z_time.value' * ones(1,size(thomson.te_core.value,2)); - % - [a,e]=rdaAUG_eff(shot,ppftype,'Te_e',shotfile_exp_eff); - thomson.te_edge = a; - thomson.time_edge = a.t; - rmfield(thomson.te_edge,'x'); rmfield(thomson.te_edge,'t'); rmfield(thomson.te_edge,'data'); - [alow,e]=rdaAUG_eff(shot,ppftype,'Telow_e',shotfile_exp_eff); - [aup,e]=rdaAUG_eff(shot,ppftype,'Teupp_e',shotfile_exp_eff); - thomson.te_edge.error = max(aup.value-thomson.te_edge.value,thomson.te_edge.value-alow.value); - % - [a,e]=rdaAUG_eff(shot,ppftype,'Ne_e',shotfile_exp_eff); - thomson.ne_edge = a; - rmfield(thomson.ne_edge,'x'); rmfield(thomson.ne_edge,'t'); rmfield(thomson.ne_edge,'data'); - [alow,e]=rdaAUG_eff(shot,ppftype,'Nelow_e',shotfile_exp_eff); - [aup,e]=rdaAUG_eff(shot,ppftype,'Neupp_e',shotfile_exp_eff); - thomson.ne_edge.error = max(aup.value-thomson.ne_edge.value,thomson.ne_edge.value-alow.value); - % - [r_time]=rdaAUG_eff(shot,ppftype,'R_edge',shotfile_exp_eff); - thomson.r_edge_time = ones(size(thomson.te_edge.value,1),1)*r_time.value; - [z_time]=rdaAUG_eff(shot,ppftype,'Z_edge',shotfile_exp_eff); - thomson.z_edge_time = z_time.value' * ones(1,size(thomson.te_edge.value,2)); - % - if strcmp(AUGkeywrdcase{index},'neterho') - equil=gdat(shot,'equil',0); - % core - inb_chord_thomson_core=size(thomson.r_core_time,1); - inb_time_thomson_core=size(thomson.r_core_time,2); - psi_out_core = NaN*ones(inb_chord_thomson_core,inb_time_thomson_core); - rhopsinorm_out_core = NaN*ones(inb_chord_thomson_core,inb_time_thomson_core); - rhotornorm_out_core = NaN*ones(inb_chord_thomson_core,inb_time_thomson_core); - rhovolnorm_out_core = NaN*ones(inb_chord_thomson_core,inb_time_thomson_core); - % edge - inb_chord_thomson_edge=size(thomson.r_edge_time,1); - inb_time_thomson_edge=size(thomson.r_edge_time,2); - psi_out_edge = NaN*ones(inb_chord_thomson_edge,inb_time_thomson_edge); - rhopsinorm_out_edge = NaN*ones(inb_chord_thomson_edge,inb_time_thomson_edge); - rhotornorm_out_edge = NaN*ones(inb_chord_thomson_edge,inb_time_thomson_edge); - rhovolnorm_out_edge = NaN*ones(inb_chord_thomson_edge,inb_time_thomson_edge); - % constructs intervals within which a given equil is used: [time_equil(i),time_equil(i+1)] - time_equil=[1.5*equil.t(1)-0.5*equil.t(2) 0.5.*(equil.t(1:end-1)+equil.t(2:end)) 1.5*equil.t(end)-0.5*equil.t(end-1)]; - for itequil=1:length(time_equil)-1 - rr=equil.Rmesh(:,itequil); - zz=equil.Zmesh(:,itequil); - psirz_in = equil.psi2D(:,:,itequil); - it_thomson_core_inequil = find(thomson.time_core>=time_equil(itequil) & thomson.time_core<=time_equil(itequil+1)); - if ~isempty(it_thomson_core_inequil) - rout_core=thomson.r_core_time(:,it_thomson_core_inequil); - zout_core=thomson.z_core_time(:,it_thomson_core_inequil); - psi_at_routzout = interpos2Dcartesian(rr,zz,psirz_in,rout_core,zout_core); - psi_out_core(:,it_thomson_core_inequil) = reshape(psi_at_routzout,inb_chord_thomson_core,length(it_thomson_core_inequil)); - rhopsinorm_out_core(:,it_thomson_core_inequil) = sqrt((psi_out_core(:,it_thomson_core_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil))); - for it_cx=1:length(it_thomson_core_inequil) - rhotornorm_out_core(:,it_thomson_core_inequil(it_cx)) = ... - interpos(equil.rhopolnorm(:,itequil),equil.rhotornorm(:,itequil),rhopsinorm_out_core(:,it_thomson_core_inequil(it_cx)),-3,[2 2],[0 1]); - rhovolnorm_out_core(:,it_thomson_core_inequil(it_cx)) = ... - interpos(equil.rhopolnorm(:,itequil),equil.rhovolnorm(:,itequil),rhopsinorm_out_core(:,it_thomson_core_inequil(it_cx)),-3,[2 2],[0 1]); - end - end - % edge - it_thomson_edge_inequil = find(thomson.time_edge>=time_equil(itequil) & thomson.time_edge<=time_equil(itequil+1)); - if ~isempty(it_thomson_edge_inequil) - rout_edge=thomson.r_edge_time(:,it_thomson_edge_inequil); - zout_edge=thomson.z_edge_time(:,it_thomson_edge_inequil); - psi_at_routzout = interpos2Dcartesian(rr,zz,psirz_in,rout_edge,zout_edge); - psi_out_edge(:,it_thomson_edge_inequil) = reshape(psi_at_routzout,inb_chord_thomson_edge,length(it_thomson_edge_inequil)); - rhopsinorm_out_edge(:,it_thomson_edge_inequil) = sqrt((psi_out_edge(:,it_thomson_edge_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil))); - for it_cx=1:length(it_thomson_edge_inequil) - rhotornorm_out_edge(:,it_thomson_edge_inequil(it_cx)) = ... - interpos(equil.rhopolnorm(:,itequil),equil.rhotornorm(:,itequil),rhopsinorm_out_edge(:,it_thomson_edge_inequil(it_cx)),-3,[2 2],[0 1]); - rhovolnorm_out_edge(:,it_thomson_edge_inequil(it_cx)) = ... - interpos(equil.rhopolnorm(:,itequil),equil.rhovolnorm(:,itequil),rhopsinorm_out_edge(:,it_thomson_edge_inequil(it_cx)),-3,[2 2],[0 1]); - end - end - end - thomson.core_psi_on_rztime = psi_out_core; - thomson.core_rhopsinorm_on_rztime = rhopsinorm_out_core; - thomson.core_rhotornorm_on_rztime = rhotornorm_out_core; - thomson.core_rhovolnorm_on_rztime = rhovolnorm_out_core; - thomson.edge_psi_on_rztime = psi_out_edge; - thomson.edge_rhopsinorm_on_rztime = rhopsinorm_out_edge; - thomson.edge_rhotornorm_on_rztime = rhotornorm_out_edge; - thomson.edge_rhovolnorm_on_rztime = rhovolnorm_out_edge; - end - - trace = thomson; - else - trace.data = []; - trace.dim = []; - trace.dimunits = []; - trace.x = []; - trace.t = []; - trace.units = []; - trace.name=[num2str(shot) '/' ppftype '/' tracename]; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'te', 'ne'} - - shotfile_exp_eff = AUGexplocation{index}; - - if strcmp(AUGkeywrdcase{index},'te') - [a,e]=rdaAUG_eff(shot,'YPR','Te',shotfile_exp_eff); - else - [a,e]=rdaAUG_eff(shot,'YPR','Ne',shotfile_exp_eff); - end - trace = a; - trace.data = a.value'; - trace.dim{1} = trace.x; - trace.dim{2} = trace.t; - trace.units = trace.unit; - trace.dimunits{1} = a.area.name ; - trace.dimunits{2} = a.time_aug.unit; - - case {'equil', 'equil_fpp', 'equil_eqm', 'equil_eqr', 'equil_eqh', 'qrho', 'qrho_fpp'} - - % In shotfiles time is 1st index in 2D arrays while gdat convention is to have time as last dimension - % so change equil.xxx to (rho,time) on the way... - - shotfile_exp_eff = AUGexplocation{index}; - - if strcmp(AUGkeywrdcase{index},'equil_fpp') || strcmp(AUGkeywrdcase{index},'qrho_fpp') - DIAG = 'FPP'; - elseif strcmp(AUGkeywrdcase{index},'equil_eqm') - DIAG = 'EQM'; - elseif strcmp(AUGkeywrdcase{index},'equil_eqr') - DIAG = 'EQR'; - elseif strcmp(AUGkeywrdcase{index},'equil_eqh') - DIAG = 'EQH'; - else - DIAG = 'EQI'; - end - M_Rmesh_par = sf2par(DIAG,shot,'M','PARMV'); - M_Rmesh = M_Rmesh_par.value + 1; % nb of points - N_Zmesh_par = sf2par(DIAG,shot,'N','PARMV'); - N_Zmesh = N_Zmesh_par.value + 1; % nb of points - NTIME_par = sf2par(DIAG,shot,'NTIME','PARMV'); - NTIME = NTIME_par.value; % nb of points - Lpf_par = rdaAUG_eff(shot,DIAG,'Lpf',shotfile_exp_eff); - % since June, nb of time points in EQ results is not consistent with NTIME and time - % It seems the first NTIME points are correct, so use this explicitely - NTIME_Lpf = length(Lpf_par.value); - if (NTIME < NTIME_Lpf) - disp('WARNING: nb of times points smaller then equil results, use first NTIME points') - elseif (NTIME > NTIME_Lpf) - disp('ERROR: nb of times points LARGER then equil results') - disp('this is unexpected, so stop there and ask Olivier.Sauter@epfl.ch') - return - end - Lpf_tot = Lpf_par.value(1:NTIME); % nb of points: 100000*nb_SOL points + nb_core - Lpf_SOL = fix(Lpf_tot/100000); - Lpf1_t = mod(Lpf_tot,100000)+1; % nb of Lpf points - % since Lpf depends on time, need to load all first and then loop over time for easier mapping - [qpsi,e]=rdaAUG_eff(shot,DIAG,'Qpsi',shotfile_exp_eff); - ndimrho = size(qpsi.data,2); - if ndimrho==NTIME_Lpf - % data seems to be transposed - ndimrho = size(qpsi.data,1); - itotransposeback = 1; % seems x,time inverted so transpose and exchange .x and .t - else - itotransposeback = 0; - end - qpsi=adapt_rda(qpsi,NTIME,ndimrho,itotransposeback); - ijnan=find(isnan(qpsi.value)); - qpsi.value(ijnan)=0; - [psi_tree,e]=rdaAUG_eff(shot,DIAG,'PFL',shotfile_exp); - psi_tree=adapt_rda(psi_tree,NTIME,ndimrho,itotransposeback); - [phi_tree,e]=rdaAUG_eff(shot,DIAG,'TFLx',shotfile_exp); - phi_tree=adapt_rda(phi_tree,NTIME,ndimrho,itotransposeback); - [Vol,e]=rdaAUG_eff(shot,DIAG,'Vol',shotfile_exp); - Vol=adapt_rda(Vol,NTIME,2*ndimrho,itotransposeback); - [Area,e]=rdaAUG_eff(shot,DIAG,'Area',shotfile_exp); - Area=adapt_rda(Area,NTIME,2*ndimrho,itotransposeback); - [Ri,e]=rdaAUG_eff(shot,DIAG,'Ri',shotfile_exp); - Ri=adapt_rda(Ri,NTIME,M_Rmesh,itotransposeback); - [Zj,e]=rdaAUG_eff(shot,DIAG,'Zj',shotfile_exp); - Zj=adapt_rda(Zj,NTIME,N_Zmesh,itotransposeback); - [PFM_tree,e]=rdaAUG_eff(shot,DIAG,'PFM',shotfile_exp); - PFM_tree=adaptPFM_rda(PFM_tree,M_Rmesh,N_Zmesh,NTIME); - [Pres,e]=rdaAUG_eff(shot,DIAG,'Pres',shotfile_exp); - Pres=adapt_rda(Pres,NTIME,2*ndimrho,itotransposeback); - [Jpol,e]=rdaAUG_eff(shot,DIAG,'Jpol',shotfile_exp); - Jpol=adapt_rda(Jpol,NTIME,2*ndimrho,itotransposeback); - [FFP,e]=rdaAUG_eff(shot,DIAG,'FFP',shotfile_exp); - if ~isempty(FFP.value) - FFP=adapt_rda(FFP,NTIME,ndimrho,itotransposeback); - else - FFP.value=NaN*ones(NTIME,max(Lpf1_t)); - end - if strcmp(DIAG,'EQI') || strcmp(DIAG,'EQH') - [Rinv,e]=rdaAUG_eff(shot,DIAG,'Rinv',shotfile_exp); - Rinv=adapt_rda(Rinv,NTIME,ndimrho,itotransposeback); - [R2inv,e]=rdaAUG_eff(shot,DIAG,'R2inv',shotfile_exp); - R2inv=adapt_rda(R2inv,NTIME,ndimrho,itotransposeback); - [Bave,e]=rdaAUG_eff(shot,DIAG,'Bave',shotfile_exp); - Bave=adapt_rda(Bave,NTIME,ndimrho,itotransposeback); - [B2ave,e]=rdaAUG_eff(shot,DIAG,'B2ave',shotfile_exp); - B2ave=adapt_rda(B2ave,NTIME,ndimrho,itotransposeback); - [FTRA,e]=rdaAUG_eff(shot,DIAG,'FTRA',shotfile_exp); - FTRA=adapt_rda(FTRA,NTIME,ndimrho,itotransposeback); - else - Rinv.value=[]; R2inv.value=[]; Bave.value=[]; B2ave.value=[]; FTRA.value=[]; - end - [LPFx,e]=rdaAUG_eff(shot,DIAG,'LPFx',shotfile_exp); - LPFx.value=LPFx.value(1:NTIME); LPFx.data=LPFx.value; LPFx.t=LPFx.t(1:NTIME); - [PFxx,e]=rdaAUG_eff(shot,DIAG,'PFxx',shotfile_exp); - PFxx=adapt_rda(PFxx,NTIME,max(LPFx.value)+1,itotransposeback); - [RPFx,e]=rdaAUG_eff(shot,DIAG,'RPFx',shotfile_exp); - RPFx=adapt_rda(RPFx,NTIME,max(LPFx.value)+1,itotransposeback); - [zPFx,e]=rdaAUG_eff(shot,DIAG,'zPFx',shotfile_exp); - zPFx=adapt_rda(zPFx,NTIME,max(LPFx.value)+1,itotransposeback); - % seems "LCFS" q-value is far too large, limit to some max (when diverted) - max_qValue = 40.0; % Note could just put a NaN on LCFS value since ill-defined when diverted - for it=1:NTIME - Lpf1 = Lpf1_t(it); - % Qpsi and similar data is on (time,radius) with radius being: LCFS..Lpf_points dummy LCFS..SOL part - % change it to (radial,time) and use only Lpf+1 points up to LCFS - ijok=find(qpsi.value(:,1)); % note: eqr fills in only odd points radially - % set NaNs to zeroes - if qpsi.value(ijok(1),1)<0 - equil.qvalue(:,it) = max(qpsi.value(it,Lpf1:-1:1)',-max_qValue); - else - equil.qvalue(:,it) = min(qpsi.value(it,Lpf1:-1:1)',max_qValue); - end - % get x values - equil.psi(:,it)=psi_tree.value(it,Lpf1:-1:1)'; - equil.psi_axis(it)= equil.psi(1,it); - equil.psi_lcfs(it)= equil.psi(end,it); - equil.rhopolnorm(:,it) = sqrt(abs((equil.psi(:,it)-equil.psi_axis(it)) ./(equil.psi_lcfs(it)-equil.psi_axis(it)))); - if strcmp(DIAG,'EQR'); - % q value has only a few values and from center to edge, assume they are from central rhopol values on - % But they are every other point starting from 3rd - ijk=find(equil.qvalue(:,it)~=0); - if length(ijk)>2 - % now shots have non-zero axis values in eqr - rhoeff=equil.rhopolnorm(ijk,it); - qeff=equil.qvalue(ijk,it); % radial order was already inverted above - if ijk(1)>1 - rhoeff = [0.; rhoeff]; - qeff = [qeff(1) ;qeff]; - end - ij_nonan=find(~isnan(equil.rhopolnorm(:,it))); - qfit = zeros(size(equil.rhopolnorm(:,it))); - qfit(ij_nonan)=interpos(rhoeff,qeff,equil.rhopolnorm(ij_nonan,it),-0.01,[1 0],[0 0],[300; ones(size(qeff(1:end-1)))]); - else - qfit = zeros(size(equil.rhopolnorm(:,it))); - end - equil.qvalue(:,it) = qfit; - end - % get rhotor values - equil.phi(:,it) = phi_tree.value(it,Lpf1:-1:1)'; - equil.rhotornorm(:,it) = sqrt(abs(equil.phi(:,it) ./ equil.phi(end,it))); - % get rhovol values - equil.vol(:,it)=Vol.value(it,2*Lpf1-1:-2:1)'; - equil.dvoldpsi(:,it)=Vol.value(it,2*Lpf1:-2:2)'; % 2nd index are dV/dpsi - equil.rhovolnorm(:,it) = sqrt(abs(equil.vol(:,it) ./ equil.vol(end,it))); - equil.area(:,it)=Area.value(it,2*Lpf1-1:-2:1)'; - equil.dareadpsi(:,it)=Area.value(it,2*Lpf1:-2:2)'; % 2nd index are dV/dpsi - equil.Rmesh(:,it) = Ri.value(it,1:M_Rmesh); - equil.Zmesh(:,it) = Zj.value(it,1:N_Zmesh); - equil.psi2D(1:M_Rmesh,1:N_Zmesh,it) = PFM_tree.value(1:M_Rmesh,1:N_Zmesh,it); - equil.pressure(:,it)=Pres.value(it,2*Lpf1-1:-2:1)'; - equil.dpressuredpsi(:,it)=Pres.value(it,2*Lpf1:-2:2)'; % 2nd index are dV/dpsi - if ~isempty(Jpol.value) - equil.jpol(:,it)=Jpol.value(it,2*Lpf1-1:-2:1)'; - equil.djpolpsi(:,it)=Jpol.value(it,2*Lpf1:-2:2)'; % 2nd index are dV/dpsi - else - equil.jpol = []; - equil.djpolpsi = []; - end - equil.ffprime(:,it) = FFP.value(it,Lpf1:-1:1)'; - equil.Xpoints.psi(1:LPFx.value(it)+1,it) = PFxx.value(it,1:LPFx.value(it)+1); - equil.Xpoints.Rvalue(1:LPFx.value(it)+1,it) = RPFx.value(it,1:LPFx.value(it)+1); - equil.Xpoints.Zvalue(1:LPFx.value(it)+1,it) = zPFx.value(it,1:LPFx.value(it)+1); - if ~isempty(Rinv.value) - equil.rinv(:,it) = Rinv.value(it,Lpf1:-1:1)'; - else - equil.rinv = []; - end - if ~isempty(R2inv.value) - equil.r2inv(:,it) = R2inv.value(it,Lpf1:-1:1)'; - else - equil.r2inv = []; - end - if ~isempty(Bave.value) - equil.bave(:,it) = Bave.value(it,Lpf1:-1:1)'; - else - equil.bave = []; - end - if ~isempty(B2ave.value) - equil.b2ave(:,it) = B2ave.value(it,Lpf1:-1:1)'; - else - equil.b2ave = []; - end - if ~isempty(FTRA.value) - equil.ftra(:,it) = FTRA.value(it,Lpf1:-1:1)'; - else - equil.ftra = []; - end - % - end - equil.x = equil.rhopolnorm; - % - [equil_Rcoil,e]=rdaAUG_eff(shot,DIAG,'Rcl',shotfile_exp); - equil.Rcoils=equil_Rcoil.value; - [equil_Zcoil,e]=rdaAUG_eff(shot,DIAG,'Zcl',shotfile_exp); - equil.Zcoils=equil_Zcoil.value; - % get time values - [equil_time,e]=rdaAUG_eff(shot,DIAG,'time',shotfile_exp); - equil.t = equil_time.value(1:NTIME); - % - [IpiPSI,e]=rdaAUG_eff(shot,DIAG,'IpiPSI',shotfile_exp); - equil.Ip = IpiPSI.value(1:NTIME); - % - equil.data = equil.qvalue; % put q in data - equil.unit=[]; % not applicable - equil.name_gdat = [AUGkeywrdcase{index} ' using ' DIAG]; - trace = equil; - trace.dim{1} = trace.x; - trace.dim{2} = trace.t; - trace.units = trace.unit; - trace.dimunits{1} = ''; - trace.dimunits{2} = 's'; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'pgyro'} - % LOAD MULTI CHANNEL DATA ECS - % powers, frequencies, etc - - shotfile_exp_eff = AUGexplocation{index}; - - trace.t=[]; - trace.x=[]; - ppftype='ECS'; - % pgyro tot in index=9 - [a,e]=rdaAUG_eff(shot,ppftype,'PECRH',shotfile_exp_eff); - if isempty(a) || e~=0 - trace_all = struct([]); - else - nb_timepoints = length(a.time_aug.value); - trace_all.pgyro = NaN*ones(nb_timepoints,9); - trace_all.freq_ech = NaN*ones(1,8); - trace_all.pgyro(:,9) = reshape(a.data,nb_timepoints,1); - trace_all.t = a.time_aug.value; - end - for i=1:4 - % "old" ECRH1 gyrotrons: gyro 1 to 4 in pgyro - tracename_eff = ['PG' num2str(i)]; - [a,e]=rdaAUG_eff(shot,ppftype,tracename_eff,shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.ecrh1(i) = a; - trace_all.pgyro(:,i) = reshape(a.data,nb_timepoints,1); - end - try - a = sf2par('ECS',shot,'gyr_freq',['P_sy1_g' num2str(i)]); - catch - % gyr_freq not present (old shots for example) - a=[]; - end - if isempty(a) - else - trace_all.freq_ecrh1(i) = a; - trace_all.freq_ech(i) = a.value; - end - try - a = sf2par('ECS',shot,'GPolPos',['P_sy1_g' num2str(i)]); - catch - % GPolPos not present - a=[]; - end - if isempty(a) - else - trace_all.polpos_ecs(i) = a.value; - end - try - a = sf2par('ECS',shot,'GTorPos',['P_sy1_g' num2str(i)]); - catch - a=[]; - end - if isempty(a) - else - trace_all.torpos_ecs(i) = a.value; - end - % "new" ECRH2 gyrotrons: gyro 5 to 8 in pgyro - tracename_eff = ['PG' num2str(i) 'N']; - [a,e]=rdaAUG_eff(shot,ppftype,tracename_eff,shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.ecrh2(i) = a; - trace_all.pgyro(:,i+4) = reshape(a.data,nb_timepoints,1); - end - try - a = sf2par('ECS',shot,'gyr_freq',['P_sy2_g' num2str(i)]); - catch - a=[]; - end - if isempty(a) - else - trace_all.freq_ecrh2(i) = a; - trace_all.freq_ech(i+4) = a.value; - end - try - a = sf2par('ECS',shot,'GPolPos',['P_sy2_g' num2str(i)]); - catch - a=[]; - end - if isempty(a) - else - trace_all.polpos_ecs(i+4) = a.value; - end - try - a = sf2par('ECS',shot,'GTorPos',['P_sy2_g' num2str(i)]); - catch - a=[]; - end - if isempty(a) - else - trace_all.torpos_ecs(i+4) = a.value; - end - [a,e]=rdaAUG_eff(shot,'ECN',['G' num2str(i) 'POL'],shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.gpol_ecn(i+4) = a; - end - [a,e]=rdaAUG_eff(shot,'ECN',['G' num2str(i) 'TOR'],shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.gtor_ecn(i+4) = a; - end - [a,e]=rdaAUG_eff(shot,'ECN',['G' num2str(i) 'PO4'],shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.gpo4_ecn(i+4) = a; - end - [a,e]=rdaAUG_eff(shot,'ECN',['G' num2str(i) 'PO8'],shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.gpo8_ecn(i+4) = a; - end - end - if ~isempty(trace_all) - trace_all.dim=[{trace_all.t} {[1:9]}]; - trace_all.data = trace_all.pgyro; - trace = trace_all; - trace.x=trace.dim{2}; - trace.dimunits=[{'time [s]'} {'ECRH1(1:4) ECRH2(1:4) ECtot'}]; - trace.units='W'; - trace.freq_ech_units = 'GHz'; - trace.name=[num2str(shot) '/' ppftype '/' 'PGi and PGiN']; - else - trace.data = []; - trace.dim = []; - trace.dimunits = []; - trace.x = []; - trace.t = []; - trace.units = []; - trace.freq_ech_units =[]'; - trace.name=[num2str(shot) '/' ppftype '/' 'PGi and PGiN']; - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'powers'} - % load powers from TOT timebase as well - % - - shotfile_exp_eff = AUGexplocation{index}; - - trace.t=[]; - trace.x=[]; - ppftype='TOT'; - % P ohmic - [a,e]=rdaAUG_eff(shot,ppftype,'P_OH',shotfile_exp_eff); - if isempty(a) || e~=0 - trace_all = struct([]); - else - nb_timepoints = length(a.time_aug.value); - trace_all.powers = NaN*ones(nb_timepoints,5); - trace_all.powers(:,1) = reshape(a.data,nb_timepoints,1); - trace_all.power_names{1} = [ppftype '/P_OH']; - trace_all.pohmic = a; - trace_all.t = a.time_aug.value; - end - % P NBI - [a,e]=rdaAUG_eff(shot,ppftype,'PNBI_TOT',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.powers(:,2) = reshape(a.data,nb_timepoints,1); - trace_all.power_names{2} = [ppftype '/PNBI_TOT']; - trace_all.pnbi = a; - end - % P ECRH - [a,e]=rdaAUG_eff(shot,ppftype,'PECR_TOT',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.powers(:,3) = reshape(a.data,nb_timepoints,1); - trace_all.power_names{3} = [ppftype '/PECR_TOT']; - trace_all.pecrh = a; - end - % P ICRH - [a,e]=rdaAUG_eff(shot,ppftype,'PICR_TOT',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.powers(:,4) = reshape(a.data,nb_timepoints,1); - trace_all.power_names{4} = [ppftype '/PICR_TOT']; - trace_all.picrh = a; - end - trace_all.powers(:,5) = trace_all.powers(:,1) + trace_all.powers(:,2) + trace_all.powers(:,3) + trace_all.powers(:,4); - % tau_tot - [a,e]=rdaAUG_eff(shot,ppftype,'tau_tot',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.tau_tot = a; - ij=find(~isnan(trace_all.tau_tot.value)); - trace_all.tau_tot_spline=interpos(trace_all.t(ij),trace_all.tau_tot.value(ij),trace_all.t,-1e3); - trace_all.tau_tot_spline = max(trace_all.tau_tot_spline,0.); - end - % betaN - [a,e]=rdaAUG_eff(shot,ppftype,'beta_N',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.betan = a; - end - % betaNthermal - [a,e]=rdaAUG_eff(shot,ppftype,'beta_Nth',shotfile_exp_eff); - if isempty(a) || e~=0 - else - trace_all.betan_thermal = a; - end - % - if ~isempty(trace_all) - trace_all.dim=[{trace_all.t} {[1:5]}]; - trace_all.data = trace_all.powers; - trace = trace_all; - trace.x=trace.dim{2}; - trace.dimunits=[{'time [s]'} {'Pohmic Pnbi Pecrh Picrh Ptot'}]; - trace.units='W'; - trace.name=[num2str(shot) '/' ppftype '/' 'P_OH, PNBI_TOT, PECR_TOT, PICR_TOT']; - else - trace.data = []; - trace.dim = []; - trace.dimunits = []; - trace.x = []; - trace.t = []; - trace.units = []; - trace.freq_ech_units =[]'; - trace.name=[num2str(shot) '/' ppftype '/' 'P_OH, PNBI_TOT, PECR_TOT, PICR_TOT']; - end - -%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'transp'} % for TRANSP - % LOAD TRA data into substructures - shotfile_exp_eff = AUGexplocation{index} - trace.t=[]; - trace.x=[]; - ppftype='TRA'; - TRANSP_signals; - for i=1:size(transp_sig,1) - if strcmp(lower(transp_sig{i,2}),'signal') || strcmp(lower(transp_sig{i,2}),'signal-group') - try - eval(['[trace.' transp_sig{i,1} ',e]=rdaAUG_eff(shot,ppftype,''' transp_sig{i,1} ''',shotfile_exp_eff);']); - catch - eval(['trace.' transp_sig{i,1} '=[];']); - end - elseif strcmp(lower(transp_sig{i,2}),'area-base') - clear adata_area - try - [adata_area]=sf2ab(ppftype,shot,transp_sig{i,1},'-exp',shotfile_exp_eff); - catch - adata_area.value = cell(0); - end - eval(['trace.' transp_sig{i,1} '=adata_area;']); - elseif strcmp(lower(transp_sig{i,2}),'time-base') - clear adata_time - try - [adata_time]=sf2tb(ppftype,shot,transp_sig{i,1},'-exp',shotfile_exp_eff); - catch - adata_time.value = cell(0); - end - eval(['trace.' transp_sig{i,1} '=adata_time;']); - end - end - - otherwise - disp('case not yet defined') - -end diff --git a/crpptbx_new/AUG/plot_torbeam.m b/crpptbx_new/AUG/plot_torbeam.m deleted file mode 100644 index b5a3d224..00000000 --- a/crpptbx_new/AUG/plot_torbeam.m +++ /dev/null @@ -1,64 +0,0 @@ -function fig_handles=plot_torbeam(torbeam_out_struct,varargin); -% -% fig_handles=plot_torbeam(torbeam_out_struct,varargin); -% -% Default plots of structure torbeam_out_struct obtained from run_torbeam_fullshot.m -% -% varargin: list of fields to be plotted versus time -% (default: 'pow','rhopol_dep', 'pdens_peak', 'rhopol_pdens_width') -% -% []: if empty then a list with multiple choice is proposed -% - -fig_handles = []; - -if isempty(torbeam_out_struct); return; end - -set_colos; -list_fields = {'pow','rhopol_dep', 'pdens_peak', 'rhopol_pdens_width'}; - -abc=cat(1,torbeam_out_struct{:}); -tb_fields = []; -if ~isempty(abc); tb_fields = fields(abc(1)); end - -if nargin >= 2 - if isempty(varargin{1}) - % asks from list - if ~isempty(tb_fields) - h_for_waitfor=figure; - global field_chosen - h1=uicontrol('Style','listbox','string',tb_fields,'pos',[20 20 200 300],'Max',20, ... - 'callback', ['global field_chosen;field_chosen=get(gcbo,''value'') ;']); - h2=uicontrol('Style','text','pos',[20 330 200 30],'string','choose fields to plot (ctrl-enter for multiple choices) then quit'); - h3=uicontrol('Style','pushbutton','string','quit','pos',[300 20 30 20],'callback', ['close gcf;']); - waitfor(h_for_waitfor); - list_fields = tb_fields(field_chosen); - clear global field_chosen - else - disp('torbeam_out_struct empty'); - return - end - elseif length(varargin) == 1 - list_fields = varargin{1}; - else - list_fields = varargin; - end -end - -for ifield=1:length(list_fields) - titleg = []; - eval(['fig_handles.' list_fields{ifield} '.fig = figure(''name'',''' list_fields{ifield} ''');']); - for igyro=1:length(torbeam_out_struct) - if ~isempty(torbeam_out_struct{igyro}) - eval(['array_to_plot = torbeam_out_struct{igyro}.' list_fields{ifield} ';']); - plotos(torbeam_out_struct{igyro}.time,array_to_plot,'-',[],[],colos(igyro,:)); - hold on - titleg{end+1} = ['L' num2str(igyro)]; - end - end - if ~isempty(titleg) ; legend(titleg); end - eval(['fig_handles.' list_fields{ifield} '.titleg = titleg;']); - xlabel('time [s]') - eval(['ylabel(''' list_fields{ifield} ''');']); - title(['AUG #' num2str(torbeam_out_struct{igyro}.shot(1))]); -end diff --git a/crpptbx_new/AUG/rdaAUG_eff.m b/crpptbx_new/AUG/rdaAUG_eff.m deleted file mode 100644 index 6feeeee3..00000000 --- a/crpptbx_new/AUG/rdaAUG_eff.m +++ /dev/null @@ -1,169 +0,0 @@ -function [adata,error]=rdaAUG_eff(shot,diagname,sigtype,shotfile_exp,varargin); -% -% gets data using sf2sig or mdsplus (when mdsplus will be available) -% 1D arrays: assumes dimension is time -% 2D arrays: assumes data vs (x,time) -% 3D arrays: assumes data vs (x,time,hsig) (for mdsplus) -% -% varargin{1}: time interval or timevalue, will get data closest to that time or within that time interval -% -% examples: -% [data,error]=rdaAUG_eff(15133,'MAG','Ipi'); -% [data,error]=rdaAUG_eff(15133,'MAG','Ipi',[1 5]); -% -% set global variable: usemdsplus to decide if sf2sig or mdsplus is used: -% >> global usemdsplus -% >> usemdsplus=1 % means use mds to get data -% >> usemdsplus=0 % means use sf2sig (default if not defined) -% if ~exist('usemdsplus'); usemdsplus=0; end -% - -global usemdsplus -if isempty(usemdsplus); usemdsplus=1; end - -error=1; - -time_int=[]; -if nargin>=5 & ~isempty(varargin{1}) - time_int=varargin{1}; -end - -if usemdsplus - - % use mdsplus - - if ~unix('test -d /home/duval/mdsplus') - addpath('/home/duval/mdsplus') - end - - if ~unix('test -d /home/osauter/gdat') - mdsconnect('localhost:8001'); - else - mdsconnect('localhost'); - end - - user=getenv('USER'); - if nargin>=5 & ~isempty(varargin{1}) - ['[data,error]=mdsvalue(''_rdaeff' user diagname '=augsignal(' num2str(shot) ',"' diagname '","' sigtype '",,,' ... - num2str(varargin{1}(1),'%.14f') ',' num2str(varargin{1}(end),'%.14f') ')'');'] - eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augsignal(' num2str(shot) ',"' diagname '","' sigtype '",,,' ... - num2str(varargin{1}(1),'%.14f') ',' num2str(varargin{1}(end),'%.14f') ')'');']); - else - eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augsignal(' num2str(shot) ',"' diagname '","' sigtype '")'');']); - end - adata.data=data; - hsig=[]; - ss=size(data); - nbofdim=length(ss); - if ss(end)==1; nbofdim=nbofdim-1; end - nbofdim=max(nbofdim,1); - switch nbofdim - case 1 - eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',0)'');']); - x=[]; - - case 2 - eval(['x=mdsvalue(''dim_of(_rdaeff' user diagname ',0)'');']); - eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',1)'');']); - - case 3 - eval(['x=mdsvalue(''dim_of(_rdaeff' user diagname ',0)'');']); - eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',1)'');']); - disp('3rd dimension in hsig!!!!!!!!!!!!!!!!!!!!!!!!!') - eval(['hsig=mdsvalue(''dim_of(_rdaeff' user diagname ',2)'');']); - - otherwise - disp([' more than 3 dimensions for ' num2str(shot) ' ; ' sigtype '/' diagname]) - error('in rdaAUG_eff') - - end - adata.t=time; - adata.x=x; - adata.hsig=hsig; - mdsdisconnect; - if ~unix('test -d /home/duval/mdsplus') - rmpath('/home/duval/mdsplus') - end - -else - % use sf2sig - if isempty(time_int) - try - [adata,adata_time, adata_area]=sf2sig(diagname,shot,sigtype,'-exp',shotfile_exp); - catch - adata.value = []; - adata.data = []; - adata.dim = []; - adata.t = []; - adata_time.data = []; - adata_area = []; - end - else - try - [adata,adata_time, adata_area]=sf2sig(diagname,shot,sigtype,[time_int(1);time_int(end)],'-exp',shotfile_exp); - catch - adata.value = []; - adata.data = []; - adata.dim = []; - adata.t = []; - adata_time.data = []; - adata_area = []; - end - end - - if isempty(adata.value) - return - end - - % special checks - if strcmp(upper(diagname),'SXB') - % time missing one point - if length(adata.value) == length(adata_time.value)+1 - adata_time.value=linspace(adata_time.range(1),adata_time.range(2),length(adata.value)); - adata_time.index(2) = length(adata.value); - end - end - - adata.time_aug = adata_time; - - adata.area = adata_area; - - adata.exp = shotfile_exp; - if (prod(size(adata.value))==length(adata.value)) - % only time signal - adata.x = []; - adata.value=reshape(adata.value,1,length(adata.value)); - if ~isempty(adata.time_aug) - adata.t=adata.time_aug.value; - else - adata.t=[1:size(adata.value,2)]; - end - else - if length(size(adata.value))<=2; adata.value = adata.value'; end % cannot transpose Nd>2 matrix - if ~isempty(adata.time_aug) - if length(size(adata.value))<=2; - adata.x=[1:prod(size(adata.value))/length(adata_time.value)]; - else - adata.x = []; - end - adata.t=adata.time_aug.value; - else - adata.x=[1:size(adata.value,1)]; - adata.t=[1:size(adata.value,2)]; - end - end - adata.data=adata.value; - adata.units = adata.unit; - % % transpose data as output in C format, reversed from Fortran and matlab standard - % ss=size(a); - % nbofdim=length(ss); - % if ss(end)==1; nbofdim=nbofdim-1; end - % nbofdim=max(nbofdim,1); - % if nbofdim==1 - % data=a; - % else - % data=a'; - % end -end - -error=0; diff --git a/crpptbx_new/AUG/run_torbeam_fullshot.m b/crpptbx_new/AUG/run_torbeam_fullshot.m deleted file mode 100644 index 52ea9891..00000000 --- a/crpptbx_new/AUG/run_torbeam_fullshot.m +++ /dev/null @@ -1,135 +0,0 @@ -function [torbeam_out_struct, file_out_prefix]=run_torbeam_fullshot(shot,varargin); -% -% [torbeam_out_struct, file_out_prefix]=run_torbeam_fullshot(shot,varargin); -% -% Run tbdemo, using line command execution of TORBEAM, to run torbeam acroos full shot on reduced time axis -% -% shot: shot number for which to run Torbeam. -% If empty or not given, ask for it -% if negative, assume output file exists, do not re-run TORBEAM and just reads data into structure torbeam_out_struct -% -% varargin given in pairs: 'keyword', value -% 'time',time_array: time points for which to run Torbeam (by default run every 50ms for each ECRH2 gyrotron having power>0) -% 'file_prefix', filename_prefix: results are saved on [filename '_gyroXX.dat'] (default: tbdemo_shot_gyroXX.dat with XX being the gyro nb) -% -% Examples: -% torbeam_out_struct = run_torbeam_fullshot(shot); % standard call to run Torbeam -% torbeam_out_struct = run_torbeam_fullshot(-shot); % standard call to just read the data from the local file from a previous run -% -% torbeam_out_struct = run_torbeam_fullshot(shot,'time',linspace(tstart,tend,nbpoints)); % to run on given time array -% torbeam_out_struct = run_torbeam_fullshot(shot,'time',[t1 t2 t3...],'file_prefix','tbdemo_shot_fewtimes_gyro'); % to run on specific times - -torbeam_out_struct = []; - -if ~exist('shot') - shot=input('shot: '); -end - -time_array=linspace(0,10,10/0.05); -file_out_prefix = ['tbdemo_' num2str(abs(shot)) '_gyro']; - -if nargin>=3 && mod(length(varargin),2)==0 - for i=1:2:length(varargin)-1 - if ~isempty(varargin{i}) && ~isempty(varargin{i+1}) - switch lower(varargin{i}) - case {'time'} - time_array = varargin{i+1}; - case {'file_prefix'} - file_out_prefix = varargin{i+1}; - otherwise - disp(['case ' lower(varargin{i}) ' not yet implemented, ask Olivier.Sauter@epfl.ch']) - return - end - end - end -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 - else - disp('do not use IDA since shotfile does not seem to exist') - end - - for igyro=1:8 - filename=[file_out_prefix num2str(igyro) '.dat']; - unix(['rm ' filename ' >& /dev/null']); % since cannot write over an existing file by default - unix(['rm ' '.' filename ' >& /dev/null']); % since cannot write over an existing file by default - unix(['touch ' '.' filename]); - itt=find(pgyro.data(:,igyro)>1e5); - if ~isempty(itt) - itt_tok=find(time_array>=pgyro.t(itt(1)) & time_array<=pgyro.t(itt(end))); - if ~isempty(itt_tok) - pgyro_tok=interp1(pgyro.data(itt,igyro),time_array(itt_tok)); - disp(['running system ' num2str(igyro) '...']); - for j=1:length(itt_tok) - if pgyro_tok(j)>1e5 - % keyboard - [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 EQI -usemirror -cdrive 1 >> ' ['.' filename]]); % -exp AUGE - end - end - [a,b]=unix(['egrep -e ''^Shot''' ' .' filename ' > ' filename]); - end - end - end -end - -for igyro=1:8 - try - eval(['[shot_tbnam,tbout{igyro}.shot,time_tbnam,tbout{igyro}.time,gyro_tbnam,tbout{igyro}.gyro,pol_tbnam,tbout{igyro}.pol,tor_tbnam,tbout{igyro}.tor,' ... - 'pow_tbnam,tbout{igyro}.pow,r_tbnam,tbout{igyro}.r,z_tbnam,tbout{igyro}.z,rho_tbnam,tbout{igyro}.rhopol_dep,pwr_dep_tbnam,tbout{igyro}.rhopol_pwr_dep,rhopol_cd_dep_tbnam,tbout{igyro}.rhopol_cd_dep,pdens_peak_tbnam,' ... - 'tbout{igyro}.pdens_peak,rhopol_pdens_wid_tbnam,tbout{igyro}.rhopol_pdens_width,jcd_peak_tbnam,tbout{igyro}.jcd_peak,rhopol_c_wid_tbnam,tbout{igyro}.rhopol_jcd_width,pni_tbnam,tbout{igyro}.pni,picr_tbnam,tbout{igyro}.picr,prad_tbnam,tbout{igyro}.prad,' ... - 'betan_tbnam,tbout{igyro}.betan,ipl_tbnam,tbout{igyro}.ipl,bt_tbnam,tbout{igyro}.bt,a1_tbnam,tbout{igyro}.ampN1,a2_tbnam,tbout{igyro}.ampN2,rhopolntm_tbnam,tbout{igyro}.rhopolntm]=' ... - 'textread(''' file_out_prefix num2str(igyro) '.dat'',''%s%d%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f'');']); - - % eval(['[gyro_tbnam,tbout{igyro}.gyro,shot_tbnam,tbout{igyro}.shot,time_tbnam,tbout{igyro}.time,pol_tbnam,tbout{igyro}.pol,tor_tbnam,tbout{igyro}.tor,' ... - % 'pow_tbnam,tbout{igyro}.pow,r_tbnam,tbout{igyro}.r,z_tbnam,tbout{igyro}.z,pwr_dep_tbnam,tbout{igyro}.rhopol_pwr_dep,rhopol_cd_dep_tbnam,tbout{igyro}.rhopol_cd_dep,jcd_peak_tbnam,' ... - % 'tbout{igyro}.jcd_peak,rhopol_c_wid_tbnam,tbout{igyro}.rhopol_c_wid,pni_tbnam,tbout{igyro}.pni,picr_tbnam,tbout{igyro}.picr,prad_tbnam,tbout{igyro}.prad,' ... - % 'betan_tbnam,tbout{igyro}.betan,ipl_tbnam,tbout{igyro}.ipl,bt_tbnam,tbout{igyro}.bt,a1_tbnam,tbout{igyro}.a1,a2_tbnam,tbout{igyro}.a2,rhopolntm_tbnam,tbout{igyro}.rhopolntm]=' ... - % 'textread(''' file_out_prefix num2str(igyro) '.dat'',''%s%d%s%d%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f%s%f'');']); - - catch - disp(['problems reading file ' file_out_prefix num2str(igyro) '.dat: may be some errors with tbdemo, check file, skipped']) - end -end - -if exist('tbout'); - torbeam_out_struct = 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]); diff --git a/crpptbx_new/AUG/sxrageometry.m b/crpptbx_new/AUG/sxrageometry.m deleted file mode 100644 index 7cd169da..00000000 --- a/crpptbx_new/AUG/sxrageometry.m +++ /dev/null @@ -1,66 +0,0 @@ -function [R_A, Z_A, ang_A,varargout]=sxrageometry(varargin); -% -% [R_A, Z_A, ang_A]=sxrageometry; -% -% returns angles for A SXR camera from AUG -% The R values at a given z=zmag are then given by: -% zmag>Z_A: only ang_A<180 -% R= R_A - (zmag-Z_A)./tan(pi-ang_A.*pi/180); -% zmag<Z_A: only ang_A>180 -% R= R_A - (zmag-Z_A)./tan(pi-ang_A.*pi/180); -% -% varargin{1}: zmag(t) (scalar or array) -% -% output -% R_A, Z_A scalars -% ang_A(nbchannels,1); -% varargout: R(nbchannels,time), with NaN depending on conditions above -% - -R_A=1.411; -Z_A=-1.075; -ang_A= [... - 47.852, ... - 49.967, ... - 52.151 , ... - 54.266 , ... - 56.449 , ... - 58.565 , ... - 60.748 , ... - 62.863 , ... - 65.047 , ... - 67.162 , ... - 69.345 , ... - 71.460 , ... - 73.644 , ... - 75.759 , ... - 77.942 , ... - 80.058 , ... - 82.241 , ... - 84.356 , ... - 86.540 , ... - 88.655 , ... - 90.838 , ... - 92.953 , ... - 95.137 , ... - 97.252 , ... - 99.435 , ... - 101.551 , ... - 103.734 , ... - 105.849 , ... - 108.033 , ... - 110.148]'; - -varargout{1}=[]; -if nargin <1 | isempty(varargin{1}) - return -end - -% compute R -zmag=varargin{1}; -varargout{1}=NaN*ones(length(ang_A),length(zmag)); -for i=1:length(ang_A) - varargout{1}(i,:) = R_A - (zmag'-Z_A)./tan(pi-ang_A(i).*pi/180); -end -iiout=find(varargout{1}<=0 | varargout{1}>=2.5); -varargout{1}(iiout)=NaN; diff --git a/crpptbx_new/AUG/sxrbgeometry.m b/crpptbx_new/AUG/sxrbgeometry.m deleted file mode 100644 index 9d631c2b..00000000 --- a/crpptbx_new/AUG/sxrbgeometry.m +++ /dev/null @@ -1,66 +0,0 @@ -function [R_B, Z_B, ang_B,varargout]=sxrbgeometry(varargin); -% -% [R_B, Z_B, ang_B]=sxrbgeometry; -% -% returns angles for B SXR camera from AUG -% The R values at a given z=zmag are then given by: -% zmag>Z_B: only ang_B<180 -% R= R_B - (zmag-Z_B)./tan(pi-ang_B.*pi/180); -% zmag<Z_B: only ang_B>180 -% R= R_B - (zmag-Z_B)./tan(pi-ang_B.*pi/180); -% -% varargin{1}: zmag(t) (scalar or array) -% -% output -% R_B, Z_B scalars -% ang_B(nbchannels,1); -% varargout: R(nbchannels,time), with NaN depending on conditions above -% - -R_B=2.351; -Z_B=-0.271; -ang_B= [... - 107.955, ... - 111.645, ... - 115.555, ... - 119.245, ... - 123.155, ... - 126.845, ... - 130.755, ... - 134.445, ... - 138.355, ... - 142.045, ... - 145.955, ... - 149.645, ... - 153.555, ... - 157.245, ... - 161.155, ... - 164.845, ... - 168.755, ... - 172.445, ... - 176.355, ... - 180.045, ... - 183.955, ... - 187.645, ... - 191.555, ... - 195.245, ... - 199.155, ... - 202.845, ... - 206.755, ... - 210.445, ... - 214.355, ... - 218.045]'; - -varargout{1}=[]; -if nargin <1 | isempty(varargin{1}) - return -end - -% compute R -zmag=varargin{1}; -varargout{1}=NaN*ones(length(ang_B),length(zmag)); -for i=1:length(ang_B) - varargout{1}(i,:) = R_B - (zmag'-Z_B)./tan(pi-ang_B(i).*pi/180); -end -iiout=find(varargout{1}<=0 | varargout{1}>=2.5); -varargout{1}(iiout)=NaN; diff --git a/crpptbx_new/JET/MatlabvesselcoordsJET.txt b/crpptbx_new/JET/MatlabvesselcoordsJET.txt deleted file mode 100644 index df111072..00000000 --- a/crpptbx_new/JET/MatlabvesselcoordsJET.txt +++ /dev/null @@ -1,164 +0,0 @@ -Gentlemen, although I haven't had time to do anything more with them, -please find attached a little .m containing a series of [R,z] keypoints -for the JET vacuum vessel, obtained finally from Philip Andrew and -Thomas Eich of TFE. Extract the file and do: - -jet_mkiigb_wall_coords; -plot(rz(:,1),rz(:,2),rz(:,1),rz(:,2),'ro');axis('equal');grid; - -I was hoping to find time to write a function that computed a normlaised -coordinate along the vessel perimeter (as Jean-Marc does in tcvtiles.m), -but alas this is not a trivial task and the time hasn't been found yet. -For the moment, it might be useful to you just to have the keypoints. - -R. -____________________________________________ - -Dr. R.A.Pitts Email: richard.pitts@epfl.ch -CRPP-EPFL, Batiment PPB, 1015 Lausanne, Switzerland -Tel: +41 21 693 6003, Fax: 5176, Secr. 3487 -http://crppwww.epfl.ch/~pitts - -rz=[2.0481 -0.9298 -2.1316 -1.1314 -2.29273 -1.3368 -2.36107 -1.33684 -2.3974 -1.3757 -2.41037 -1.40277 -2.40596 -1.38824 -2.41365 -1.42575 -2.41416 -1.43282 -2.41403 -1.42928 -2.41416 -1.47234 -2.41347 -1.48059 -2.41398 -1.47648 -2.40894 -1.5077 -2.39934 -1.5197 -2.42075 -1.59625 -2.42247 -1.61334 -2.42235 -1.60472 -2.42003 -1.6469 -2.41786 -1.65826 -2.41928 -1.65265 -2.40695 -1.693 -2.3688 -1.693 -2.3157 -1.74057 -2.35658 -1.74057 -2.36614 -1.73964 -2.37535 -1.7369 -2.42729 -1.71581 -2.43651 -1.71307 -2.44608 -1.71214 -2.52216 -1.71211 -2.53175 -1.7217 -2.53475 -1.7157 -2.54675 -1.7157 -2.54675 -1.7017 -2.58073 -1.6297 -2.58975 -1.61057 -2.61375 -1.5597 -2.61375 -1.5487 -2.60575 -1.5487 -2.60575 -1.52457 -2.62642 -1.51033 -2.64708 -1.50281 -2.66775 -1.50035 -2.68842 -1.50255 -2.70908 -1.50976 -2.72975 -1.52353 -2.72975 -1.5487 -2.71975 -1.5487 -2.71975 -1.5597 -2.73975 -1.60408 -2.7513 -1.6297 -2.78375 -1.7017 -2.78375 -1.7157 -2.79874 -1.7157 -2.80176 -1.7167 -2.80569 -1.71277 -2.86091 -1.71275 -2.87114 -1.7138 -2.88095 -1.71693 -2.93663 -1.74127 -2.94644 -1.7444 -2.95668 -1.74545 -2.98773 -1.74543 -2.9288 -1.68563 -2.89682 -1.68563 -2.88125 -1.62655 -2.88001 -1.62023 -2.8796 -1.61381 -2.8796 -1.60477 -2.87992 -1.59909 -2.88089 -1.59348 -2.89937 -1.5137 -2.89016 -1.5017 -2.88783 -1.49362 -2.88638 -1.48678 -2.88589 -1.4798 -2.88589 -1.43815 -2.88709 -1.42726 -2.89064 -1.41688 -2.90084 -1.39518 -2.90658 -1.38581 -2.91423 -1.37791 -2.96398 -1.3368 -3.01294 -1.33678 -3.01547 -1.34003 -3.3294 -1.067 -3.4907 -0.8592 -3.5972 -0.722 -3.6605 -0.6267 -3.7113 -0.5254 -3.7665 -0.3947 -3.8039 -0.2876 -3.8352 -0.1787 -3.8602 -0.0681 -3.8789 0.0437 -3.8913 0.1563 -3.8972 0.2695 -3.8967 0.3829 -3.8897 0.496 -3.8764 0.6086 -3.8622 0.6922 -3.8307 0.8306 -3.7984 0.9392 -3.7601 1.0459 -3.7157 1.1502 -3.6787 1.2265 -3.5881 1.4801 -3.4635 1.5923 -3.3038 1.716 -3.1528 1.8211 -2.9806 1.9449 -2.8887 1.98 -2.7897 2.0083 -2.6826 2.022 -2.5797 2.0193 -2.4832 2.0027 -2.3854 1.9708 -2.2842 1.9192 -2.2474 1.8972 -2.1316 1.6866 -2.0481 1.485 -1.9399 1.1653 -1.9122 1.0691 -1.8876 0.972 -1.8663 0.8741 -1.8482 0.7756 -1.8334 0.6766 -1.8219 0.5771 -1.8137 0.4773 -1.8088 0.3773 -1.8073 0.2772 -1.809 0.177 -1.8141 0.077 -1.8225 -0.0228 -1.8342 -0.1222 -1.8491 -0.2213 -1.8674 -0.3197 -1.8889 -0.4175 -1.9137 -0.5146 -1.9416 -0.6107 -2.0481 -0.9298] - diff --git a/crpptbx_new/JET/Ra_rho_t.m b/crpptbx_new/JET/Ra_rho_t.m deleted file mode 100644 index 83c9fc9b..00000000 --- a/crpptbx_new/JET/Ra_rho_t.m +++ /dev/null @@ -1,84 +0,0 @@ -function [R0zmag,azmag,Rminzmag,Rmaxzmag,zmageff]=Ra_rho_t(sspr,sspi,npts); -% -% function [R0zmag,azmag,Rminzmag,Rmaxzmag,zmageff]=Ra_rho_t(sspr,sspi,npts); -% -% Rmax(psi^.5),Rmin(psi^.5) and a(psi^.5) on z=zmag on npts equidistant sqrt(psin) -% -% Assumes all timing the same: sspr.t, sspi.t, zmag.t, rmag.t -% -% cannot use zmag as not good enough with respect to psirz. Better to use min of psirz contours, zmageff -% -% precision within 1e-3 - 1e-4 (as usually min(psi)~a few 1e-4) -% -% Note: this also gives Rin and Rout (psi) directly from Rmin and Rmax, or from R0+a or R0-a of rho^2 -% - -rhopsi=linspace(0,1,npts)'; -figure(92);clf; % used as dummy for contours calculation -set(92,'pos',[600 500 200 200]) -set(92,'MenuBar','none'); -hold on -azmag=sspr; % to get time array and structure same -azmag.data=zeros(length(rhopsi),length(sspr.t)); -azmag.x=rhopsi; -azmag.dim{1}=rhopsi; -azmag.dimunits{1}='rho=sqrt(psin)'; -azmag.name='a(rho,t)=mean minor radius from psi(R,Z) and Ra_rho_t function'; -R0zmag=azmag; -R0zmag.name='R0(rho,t)=mean major radius from psi(R,Z) and Ra_rho_t function'; -Rminzmag=azmag; -Rminzmag.name='Rmin(rho,t)=Rbnd_HFS from psi(R,Z) and Ra_rho_t function'; -Rmaxzmag=azmag; -Rmaxzmag.name='a(rho,t)=Rbnd_LFS from psi(R,Z) and Ra_rho_t function'; -zmageff=NaN*ones(size(sspr.t)); - -% iteff=find(sspr.t>=54 & sspr.t<=69); -for it=1:length(sspr.t) -%for it1=1:length(iteff) -% it=iteff(it1); - [r,z,psinrz]=psinrzjet(-1,sspr.t(it),3*npts,3*npts,[],[],[],0,sspr,sspi,[]); - ir=find(r>2.7 & r<3.3); - iz=find(z>-1 & z<1.5); - psimin=1.2*max(0,min(min(psinrz(ir,iz)))); - [c,h]=contour(r,z,psinrz',[psimin psimin]); - iii=find(c(1,:)==psimin); - rmagpsi=mean(c(1,iii(end)+1:iii(end)+c(2,iii(end)))); - zmagpsi=mean(c(2,iii(end)+1:iii(end)+c(2,iii(end)))); - % make (R,Z) array on which to compute psinrz - nr=sspi.data(1,it); - rmin=sspr.data(1,it)/100; - rmax=sspr.data(nr,it)/100; % in [cm] but will be used in [m] - zeff=zmagpsi; - rgrid=linspace(rmin+1e-4,rmax-1e-4,3*npts); - zgrid=zeff*ones(size(rgrid)); - [r2,z2,psinrz2]=psinrzjet(-1,sspr.t(it),rgrid,zgrid,[],[],[],0,sspr,sspi,[],1); - [a,da1]=interpos(13,r2,psinrz2); - ii=find(da1>0);ii=ii(1); - rmagmin=interp1([da1(ii(1)-1) da1(ii(1))],[r2(ii(1)-1) r2(ii(1))],0); - ii=find(r2>=rmagmin); - [RpsiLFS]=interpos(13,psinrz2(ii).^.5,r2(ii),rhopsi); - ii=find(r2<=rmagmin); - [RpsiHFS]=interpos(13,psinrz2([ii(end):-1:1]).^.5,r2([ii(end):-1:1]),rhopsi); - azmag.data(:,it)=0.5.*(RpsiLFS-RpsiHFS); - azmag.data(1,it)=0; - azmag.data(2,it)=max(0,azmag.data(2,it)); - R0zmag.data(:,it)=0.5.*(RpsiLFS+RpsiHFS); - R0zmag.data(1,it)=rmagmin; - Rminzmag.data(:,it)=RpsiHFS; - Rmaxzmag.data(:,it)=RpsiLFS; - zmageff(it)=zeff; - % get isoflux - % [c1,h1]=contour(r,z,psinrz',rhopsi.^2); - % for ir=1:length(rhopsi) - % ii=find(c1(1,:)==rhopsi(ir)^2); - % if isempty(ii) - % Riso{ir,it}=rmagmin; - % Ziso{ir,it}=zmagpsi; - % else - % [il ij]=max(c1(2,ii)); - % ieff=ii(ij); - % Riso{ir,it}=c1(1,ieff+1:ieff+il)'; - % Ziso{ir,it}=c1(2,ieff+1:ieff+il)'; - % end - % end -end diff --git a/crpptbx_new/JET/geteqdskJET.m b/crpptbx_new/JET/geteqdskJET.m deleted file mode 100644 index fe024ccf..00000000 --- a/crpptbx_new/JET/geteqdskJET.m +++ /dev/null @@ -1,311 +0,0 @@ -function [efitdata]=geteqdskJET(shot,time,nrg,nzg,savedir,deltaz,efitlab,uid,seqd,varargin); -% -% function [efitdata]=geteqdskJET(shot,time,nrg,nzg,savedir,deltaz,efitlab,uid,seqd,varargin); -% -% save eqdsk file to savedir/JET_EQDSK_shot_ttime -% returns data used in structure efitdata (efitdata.shot, efitdata.Rbnd, efitdataZbnd....) -% -% examples: -% efitdata=geteqdskJET(shot,time,33,65,'/tmp') -% efitdata=geteqdskJET(shot,time,33,65,'/tmp',[],[],[],[],1,efitdata); % gives data so no need to load again -% -% INPUTS : -% shot : shot number -% time : single time slice of analysis -% nrg, nzg: nb of R and Z points for R,Z grid -% if nzg<0 force symmetric box aorund z=deltaz -% -% OPTIONAL -% savedir: directory to save eqdsk file (default: './') -% deltaz: shift equilibrium vertically -% = 0: (default) no shift -% = -99: shift so that zmag=0 (thus deltaz=-zmag) -% otherwise: shift Z position by this amount -% efitlab : 'efit' or 'eftm' (default: 'efit') -% uid{i}: user id if different from main database (default: 'jetppf') -% seq(i): sequence number if not last one required (default: 0) -% i: 1 (efit), 2 (chain2: lid2), 3 (equi) -% -% varargin{1}: plot option: 0: do not plot contours, >0 plot contour with varargin{1} nb of contours (60 is good) -% varargin{2}: efitdata in input (no need to load again if shot=efitdata.shot) -% -% OUTPUTS -% efitdata: structure containing all data vs time so that one can call geteqdsk for another time quicker for same shot -% -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -if nargin<=4 | isempty(savedir) - savedir='./'; -end -if unix(['test -d ' savedir]) - disp(['Problems in geteqdskJET, savedir=' savedir ' is not a directory']) - return -end -if nargin<=5 | isempty(deltaz) - deltaz=0; -end -if nargin<=6 | isempty(efitlab) - efitlab='efit'; -end -iexefit=1; -iexchain2=2; -iexequi=3; -uid0{iexefit}='jetppf'; -uid0{iexchain2}='jetppf'; -uid0{iexequi}='jetppf'; -seqd0(1:iexequi)=0; -if nargin>=8 & ~isempty(uid) - for i=length(uid)+1:length(uid0) - uid{i}=uid0{i} - end -else - uid=uid0; -end -if nargin>=9 & ~isempty(seqd) - for i=length(seqd)+1:length(seqd0) - seqd(i)=seqd0(i); - end -else - seqd=seqd0; -end -for i=1:length(uid) - s_extra{i}=['?uid=' uid{i} '+seq=' num2str(seqd(i))]; -end - -ncont=0; -if nargin>=10 & ~isempty(varargin{1}) - ncont=varargin{1}; -end - -iread=1; -if nargin>=11 & ~isempty(varargin{2}) - efitdata=varargin{2}; - if shot==efitdata.shot - iread=0; - else - disp(['shot=' num2str(shot) ' different from efitdata.shot=' num2str(efitdata.shot)]) - warning('reload data with new shot') - end -end - -if iread==1 - efitdata.shot=shot; - % get data needed - efitdata.Rbnd=gdat(shot,['ppf/' efitlab '/RBND' s_extra{iexefit}],0,'JET'); - efitdata.tefit=efitdata.Rbnd.t; - efitdata.Zbnd=gdat(shot,['ppf/' efitlab '/ZBND' s_extra{iexefit}],0,'JET'); - efitdata.R0=gdat(shot,['ppf/' efitlab '/RGEO' s_extra{iexefit}],0,'JET'); - efitdata.a=gdat(shot,['ppf/' efitlab '/CR0' s_extra{iexefit}],0,'JET'); - % $$$ efitdata.Z0=gdat(shot,['ppf/' efitlab '/ZO' s_extra{iexefit}],0,'JET'); - efitdata.rmag=gdat(shot,['ppf/' efitlab '/rmag' s_extra{iexefit}],0,'JET'); - efitdata.zmag=gdat(shot,['ppf/' efitlab '/zmag' s_extra{iexefit}],0,'JET'); - efitdata.faxs=gdat(shot,['ppf/' efitlab '/faxs' s_extra{iexefit}],0,'JET'); - efitdata.fbnd=gdat(shot,['ppf/' efitlab '/fbnd' s_extra{iexefit}],0,'JET'); - efitdata.bvac=gdat(shot,['ppf/' efitlab '/bvac' s_extra{iexefit}],0,'JET'); - efitdata.ip=gdat(shot,['ppf/' efitlab '/xip' s_extra{iexefit}],0,'JET'); - efitdata.F=gdat(shot,['ppf/' efitlab '/F' s_extra{iexefit}],0,'JET'); - efitdata.psin=efitdata.F.x; - efitdata.P=gdat(shot,['ppf/' efitlab '/P' s_extra{iexefit}],0,'JET'); - efitdata.Q=gdat(shot,['ppf/' efitlab '/Q' s_extra{iexefit}],0,'JET'); - efitdata.kappa=gdat(shot,['ppf/' efitlab '/ELON' s_extra{iexefit}],0,'JET'); - efitdata.q95=gdat(shot,['ppf/' efitlab '/q95' s_extra{iexefit}],0,'JET'); - efitdata.btpd=gdat(shot,['ppf/' efitlab '/btpd' s_extra{iexefit}],0,'JET'); - efitdata.bttd=gdat(shot,['ppf/' efitlab '/bttd' s_extra{iexefit}],0,'JET'); - efitdata.btnd=gdat(shot,['ppf/' efitlab '/btnd' s_extra{iexefit}],0,'JET'); - efitdata.btpm=gdat(shot,['ppf/' efitlab '/btpm' s_extra{iexefit}],0,'JET'); - efitdata.bttm=gdat(shot,['ppf/' efitlab '/bttm' s_extra{iexefit}],0,'JET'); - efitdata.btnm=gdat(shot,['ppf/' efitlab '/btnm' s_extra{iexefit}],0,'JET'); - efitdata.xli=gdat(shot,['ppf/' efitlab '/xli' s_extra{iexefit}],0,'JET'); - efitdata.sspr=gdat(shot,['ppf/' efitlab '/sspr' s_extra{iexefit}],0,'JET'); - efitdata.sspi=gdat(shot,['ppf/' efitlab '/sspi' s_extra{iexefit}],0,'JET'); - % add for profiles - efitdata.ti=gdat(shot,['ppf/TION/TI' s_extra{iexchain2}],0,'JET'); - efitdata.p_tion=gdat(shot,['ppf/TION/p' s_extra{iexchain2}],0,'JET'); - efitdata.pi=gdat(shot,['ppf/NION/DD' s_extra{iexchain2}],0,'JET'); - efitdata.zef=gdat(shot,['ppf/NION/ZEF' s_extra{iexchain2}],0,'JET'); - % add for calculating NTM parameters - efitdata.bpol=gdat(shot,['ppf/equi/bpol' s_extra{iexequi}],0,'JET'); - efitdata.bpo2=gdat(shot,['ppf/equi/bpo2' s_extra{iexequi}],0,'JET'); - efitdata.qmag=gdat(shot,['ppf/' efitlab '/qmag' s_extra{iexefit}],0,'JET'); - efitdata.lidrpe=gdat(shot,['ppf/lidr/pe'],0,'JET'); - efitdata.nexav=gdat(shot,['ppf/nex/av'],0,'JET'); - efitdata.nbi=gdat(shot,['ppf/nbi/ptot'],0,'JET'); - efitdata.icrh=gdat(shot,['ppf/icrh/ptot'],0,'JET'); - efitdata.ptot=gdat(shot,['ppf/mg3/yto'],0,'JET'); - efitdata.halpha=gdat(shot,['jpf/dd/s3-ad35'],0,'JET'); - efitdata.n1=gdat(shot,['jpf/da/c1-g101'],0,'JET'); - efitdata.n2=gdat(shot,['jpf/da/c1-g102'],0,'JET'); -end - -tefit=efitdata.tefit; -[zz index_efit]=min(abs(tefit-time)); -time_efit=tefit(index_efit); -disp('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') -disp(['efit at t=' num2str(time_efit)]) -disp('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') - -Rbnd=efitdata.Rbnd.data(:,index_efit); -Zbnd=efitdata.Zbnd.data(:,index_efit); -R0=efitdata.R0.data(index_efit); -% $$$ Z0=efitdata.Z0.data(index_efit); -rmag=efitdata.rmag.data(index_efit); -zmag=efitdata.zmag.data(index_efit); -if deltaz==-99 - deltaz=-zmag; -end -faxs=efitdata.faxs.data(index_efit); -fbnd=efitdata.fbnd.data(index_efit); -bvac=-efitdata.bvac.data(index_efit); -ip=-efitdata.ip.data(index_efit); -psi_efit=efitdata.psin; -F=efitdata.F.data(:,index_efit); -P=efitdata.P.data(:,index_efit); -Q=efitdata.Q.data(:,index_efit); -kappa=efitdata.kappa.data(index_efit); -q95=efitdata.q95.data(index_efit); -if index_efit<=length(efitdata.btpd.data); btpd=efitdata.btpd.data(index_efit); else; btpd=0; end -if index_efit<=length(efitdata.bttd.data); bttd=efitdata.bttd.data(index_efit); else; bttd=0; end -if index_efit<=length(efitdata.btnd.data); btnd=efitdata.btnd.data(index_efit); else; btnd=0; end -if index_efit<=length(efitdata.btpm.data); btpm=efitdata.btpm.data(index_efit); else; btpm=0; end -if index_efit<=length(efitdata.bttm.data); bttm=efitdata.bttm.data(index_efit); else; bttm=0; end -if index_efit<=length(efitdata.btnm.data); btnm=efitdata.btnm.data(index_efit); else; btnm=0; end -xli=efitdata.xli.data(index_efit); - -[R,Z,psinrz]=psirz(shot,time,nrg,nzg,efitlab,uid{iexefit},seqd(iexefit),ncont,efitdata.sspr,efitdata.sspi,deltaz); -nzg=abs(nzg); - -% define file name -s = sprintf('%.6f',time); -fname=sprintf('%s/EQDSK.%st%s',savedir,num2str(shot),s); -fid=fopen(fname,'w'); - -% 1st eqdsk line: 48 characters for file description and then, 3, nr, nz -tdate=date; -ss=['JET #' num2str(shot) ' t= ' num2str(time_efit) ' ' efitlab '?uid=' uid{iexefit} '+seq=' num2str(seqd(iexefit)) ', ' tdate]; -if length(ss)<48 - ss(end:48)=' '; -else - ss=ss(1:48); -end - -fprintf(fid,'%s%4d%4d%4d\n',ss,3,nrg,nzg); - -% 2nd line: rboxlen, zboxlen, r0, rboxlft, zboxmid -rmin=min(R) -rmax=max(R) -zmin=min(Z) -zmax=max(Z) -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',rmax-rmin,zmax-zmin,R0,rmin,0.5*(zmin+zmax)+deltaz); - -% 3rd line: rmag, zmag, psimag, psiedge, B0 -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',rmag,zmag+deltaz,faxs,fbnd,bvac); - -% 4th line: Ip, psiax1, psiax2, raxis1, raxis2 -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',ip,faxs,0.,rmag,0.); - -% 5th line: zaxis1, zaxis2, psi_sep, R_xpoint, Z_xpoint -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',zmag+deltaz,0.0,fbnd,-1,-1); - -% 6th entry: F(psi) on nr equidistant psi mesh -psieq=[0:1/(nrg-1):1]; -psi_efit_eff=faxs+psi_efit.*(fbnd-faxs); -psieq_eff=faxs+psieq.*(fbnd-faxs); -[G Gprime]=interpos(13,psi_efit_eff,-F,psieq_eff); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',G(1:end-1)); -fprintf(fid,'%16.9e\n',G(end)); - -% 7th entry: p(psi) on nr equidistant psi mesh -[press pressprime]=interpos(13,psi_efit_eff,P,psieq_eff); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',press(1:end-1)); -fprintf(fid,'%16.9e\n',press(end)); - -% 8th entry: FF'(psi) on nr equidistant psi mesh -y=G.*Gprime; -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',y(1:end-1)); -fprintf(fid,'%16.9e\n',y(end)); - -% 9th entry: p'(psi) on nr equidistant psi mesh (in MKSA) -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',pressprime(1:end-1)); -fprintf(fid,'%16.9e\n',pressprime(end)); - -% 10th entry: psi(i,j) -psirz=faxs+psinrz.*(fbnd-faxs); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',psirz); -if mod(nrg*nzg,5)~=0 - fprintf(fid,'\n'); -end - -% 11th entry: q profile on nr equidistant psi mesh -y=interpos(13,psi_efit,Q,psieq,1e-6); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',y(1:end-1)); -fprintf(fid,'%16.9e\n',y(end)); - -% 12th entry: (R,Z) plasma boundary and wall position -npts=length(Rbnd); -fprintf(fid,'%5d%5d\n',npts,5); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',[Rbnd Zbnd+deltaz]'); -if mod(2*npts,5) ~= 0 - fprintf(fid,'\n'); -end -rdel=+0.8*(R(2)-R(1)); -zdel=+0.8*(Z(2)-Z(1)); -fprintf(fid,'%16.9e%16.9e%16.9e%16.9e%16.9e\n',min(Rbnd)-rdel,min(Zbnd)+deltaz-zdel, ... - max(Rbnd)+rdel,min(Zbnd)+deltaz-zdel,max(Rbnd)+rdel,max(Zbnd)+deltaz+zdel, ... - min(Rbnd)-rdel,max(Zbnd)+deltaz+zdel,min(Rbnd)-rdel,min(Zbnd)+deltaz-zdel); - -% Some useful data to compare with recomputed equilibria -fprintf(fid,'%18.8e psiedge-psiax\n',fbnd-faxs); -fprintf(fid,'%18.8e r-magaxe\n',rmag); -fprintf(fid,'%18.8e z-magaxe\n',zmag+deltaz); -fprintf(fid,'%18.8e z0 (zaver)\n',0.5.*(min(Zbnd)+max(Zbnd))+deltaz); -fprintf(fid,'%18.8e r-major\n',R0); -fprintf(fid,'%18.8e B0\n',bvac); -fprintf(fid,'%18.8e CURRT -> I-p [A]: %18.8e \n',ip/4e-7/pi,ip); -fprintf(fid,'%18.8e kappa\n',kappa); -fprintf(fid,'%18.8e q_0\n',Q(1)); -y=interpos(13,psi_efit,Q,[0:0.01:1],1e-6); -fprintf(fid,'%18.8e q_edge, from int: %18.8e\n',Q(end),y(end)); -fprintf(fid,'%18.8e q_95, from int: %18.8e\n',q95,y(96)); -[qmin ind]=min(y); -fprintf(fid,'%18.8e q_min, at psinorm= %18.8e\n',qmin,y(ind)); -fprintf(fid,'%18.8e beta_pol(wdia)\n',btpd); -fprintf(fid,'%18.8e beta_pol(efit)\n',btpm); -fprintf(fid,'%18.8e beta_tor(wdia)\n',bttd); -fprintf(fid,'%18.8e beta_tor(efit)\n',bttm); -fprintf(fid,'%18.8e beta_N(wdia)\n',btnd); -fprintf(fid,'%18.8e beta_N(efit)\n',btnm); -fprintf(fid,'%18.8e li\n',xli); - -fprintf(fid,'\n%18.8e time\n',time); -fprintf(fid,' %d shot number\n',shot); -fprintf(fid,' efit version : %s\n',efitlab); -fprintf(fid,' uid : %s, %s, %s\n',uid{1},uid{2},uid{3}); -fprintf(fid,' seq : %d, %d, %d\n',seqd(1:3)); - -fclose(fid); -disp(['wrote ',fname]); - -if ncont>0 - figure; - pos=get(gcf,'position'); - set(gcf,'position',[pos(1)+0.5*pos(3) 0.8*abs(pos(2)-pos(4)) pos(3) 2*pos(4)]) - subplot(3,1,1) - plot(psi_efit,P/P(1),'-') - hold on - plot(psi_efit,F/F(end),'r-') - ss=sprintf('%.4f',time); - title(['JET #' num2str(shot) ' t= ' ss]) - legend('P/P(0)','F/F(edge)',3) - subplot(3,1,2) - plot(psieq,pressprime/abs(pressprime(1)),'-') - hold on - plot(psieq,G.*Gprime/abs(G(1).*Gprime(1)),'r-') - legend('Pprime/|Pprime(0)|','F*Fprime/|F*Fprime(0)|',2) - subplot(3,1,3) - plot(psi_efit,Q,'-') - hold on - aa=axis; - plot([0.95 0.95],[aa(3) aa(4)],'k--') - grid on - xlabel('\psi/\psi_{edge}') -end diff --git a/crpptbx_new/JET/jet_mkiigb_wall_coords.data b/crpptbx_new/JET/jet_mkiigb_wall_coords.data deleted file mode 100644 index 46427e3b..00000000 --- a/crpptbx_new/JET/jet_mkiigb_wall_coords.data +++ /dev/null @@ -1,143 +0,0 @@ -% R Z of JET vacuum vessel, around divertor as well - 2.0481000e+00 -9.2980000e-01 - 2.1316000e+00 -1.1314000e+00 - 2.2927300e+00 -1.3368000e+00 - 2.3610700e+00 -1.3368400e+00 - 2.3974000e+00 -1.3757000e+00 - 2.4103700e+00 -1.4027700e+00 - 2.4059600e+00 -1.3882400e+00 - 2.4136500e+00 -1.4257500e+00 - 2.4141600e+00 -1.4328200e+00 - 2.4140300e+00 -1.4292800e+00 - 2.4141600e+00 -1.4723400e+00 - 2.4134700e+00 -1.4805900e+00 - 2.4139800e+00 -1.4764800e+00 - 2.4089400e+00 -1.5077000e+00 - 2.3993400e+00 -1.5197000e+00 - 2.4207500e+00 -1.5962500e+00 - 2.4224700e+00 -1.6133400e+00 - 2.4223500e+00 -1.6047200e+00 - 2.4200300e+00 -1.6469000e+00 - 2.4178600e+00 -1.6582600e+00 - 2.4192800e+00 -1.6526500e+00 - 2.4069500e+00 -1.6930000e+00 - 2.3688000e+00 -1.6930000e+00 - 2.3157000e+00 -1.7405700e+00 - 2.3565800e+00 -1.7405700e+00 - 2.3661400e+00 -1.7396400e+00 - 2.3753500e+00 -1.7369000e+00 - 2.4272900e+00 -1.7158100e+00 - 2.4365100e+00 -1.7130700e+00 - 2.4460800e+00 -1.7121400e+00 - 2.5221600e+00 -1.7121100e+00 - 2.5317500e+00 -1.7217000e+00 - 2.5347500e+00 -1.7157000e+00 - 2.5467500e+00 -1.7157000e+00 - 2.5467500e+00 -1.7017000e+00 - 2.5807300e+00 -1.6297000e+00 - 2.5897500e+00 -1.6105700e+00 - 2.6137500e+00 -1.5597000e+00 - 2.6137500e+00 -1.5487000e+00 - 2.6057500e+00 -1.5487000e+00 - 2.6057500e+00 -1.5245700e+00 - 2.6264200e+00 -1.5103300e+00 - 2.6470800e+00 -1.5028100e+00 - 2.6677500e+00 -1.5003500e+00 - 2.6884200e+00 -1.5025500e+00 - 2.7090800e+00 -1.5097600e+00 - 2.7297500e+00 -1.5235300e+00 - 2.7297500e+00 -1.5487000e+00 - 2.7197500e+00 -1.5487000e+00 - 2.7197500e+00 -1.5597000e+00 - 2.7397500e+00 -1.6040800e+00 - 2.7513000e+00 -1.6297000e+00 - 2.7837500e+00 -1.7017000e+00 - 2.7837500e+00 -1.7157000e+00 - 2.7987400e+00 -1.7157000e+00 - 2.8017600e+00 -1.7167000e+00 - 2.8056900e+00 -1.7127700e+00 - 2.8609100e+00 -1.7127500e+00 - 2.8711400e+00 -1.7138000e+00 - 2.8809500e+00 -1.7169300e+00 - 2.9366300e+00 -1.7412700e+00 - 2.9464400e+00 -1.7444000e+00 - 2.9566800e+00 -1.7454500e+00 - 2.9877300e+00 -1.7454300e+00 - 2.9288000e+00 -1.6856300e+00 - 2.8968200e+00 -1.6856300e+00 - 2.8812500e+00 -1.6265500e+00 - 2.8800100e+00 -1.6202300e+00 - 2.8796000e+00 -1.6138100e+00 - 2.8796000e+00 -1.6047700e+00 - 2.8799200e+00 -1.5990900e+00 - 2.8808900e+00 -1.5934800e+00 - 2.8993700e+00 -1.5137000e+00 - 2.8901600e+00 -1.5017000e+00 - 2.8878300e+00 -1.4936200e+00 - 2.8863800e+00 -1.4867800e+00 - 2.8858900e+00 -1.4798000e+00 - 2.8858900e+00 -1.4381500e+00 - 2.8870900e+00 -1.4272600e+00 - 2.8906400e+00 -1.4168800e+00 - 2.9008400e+00 -1.3951800e+00 - 2.9065800e+00 -1.3858100e+00 - 2.9142300e+00 -1.3779100e+00 - 2.9639800e+00 -1.3368000e+00 - 3.0129400e+00 -1.3367800e+00 - 3.0154700e+00 -1.3400300e+00 - 3.3294000e+00 -1.0670000e+00 - 3.4907000e+00 -8.5920000e-01 - 3.5972000e+00 -7.2200000e-01 - 3.6605000e+00 -6.2670000e-01 - 3.7113000e+00 -5.2540000e-01 - 3.7665000e+00 -3.9470000e-01 - 3.8039000e+00 -2.8760000e-01 - 3.8352000e+00 -1.7870000e-01 - 3.8602000e+00 -6.8100000e-02 - 3.8789000e+00 4.3700000e-02 - 3.8913000e+00 1.5630000e-01 - 3.8972000e+00 2.6950000e-01 - 3.8967000e+00 3.8290000e-01 - 3.8897000e+00 4.9600000e-01 - 3.8764000e+00 6.0860000e-01 - 3.8622000e+00 6.9220000e-01 - 3.8307000e+00 8.3060000e-01 - 3.7984000e+00 9.3920000e-01 - 3.7601000e+00 1.0459000e+00 - 3.7157000e+00 1.1502000e+00 - 3.6787000e+00 1.2265000e+00 - 3.5881000e+00 1.4801000e+00 - 3.4635000e+00 1.5923000e+00 - 3.3038000e+00 1.7160000e+00 - 3.1528000e+00 1.8211000e+00 - 2.9806000e+00 1.9449000e+00 - 2.8887000e+00 1.9800000e+00 - 2.7897000e+00 2.0083000e+00 - 2.6826000e+00 2.0220000e+00 - 2.5797000e+00 2.0193000e+00 - 2.4832000e+00 2.0027000e+00 - 2.3854000e+00 1.9708000e+00 - 2.2842000e+00 1.9192000e+00 - 2.2474000e+00 1.8972000e+00 - 2.1316000e+00 1.6866000e+00 - 2.0481000e+00 1.4850000e+00 - 1.9399000e+00 1.1653000e+00 - 1.9122000e+00 1.0691000e+00 - 1.8876000e+00 9.7200000e-01 - 1.8663000e+00 8.7410000e-01 - 1.8482000e+00 7.7560000e-01 - 1.8334000e+00 6.7660000e-01 - 1.8219000e+00 5.7710000e-01 - 1.8137000e+00 4.7730000e-01 - 1.8088000e+00 3.7730000e-01 - 1.8073000e+00 2.7720000e-01 - 1.8090000e+00 1.7700000e-01 - 1.8141000e+00 7.7000000e-02 - 1.8225000e+00 -2.2800000e-02 - 1.8342000e+00 -1.2220000e-01 - 1.8491000e+00 -2.2130000e-01 - 1.8674000e+00 -3.1970000e-01 - 1.8889000e+00 -4.1750000e-01 - 1.9137000e+00 -5.1460000e-01 - 1.9416000e+00 -6.1070000e-01 - 2.0481000e+00 -9.2980000e-01 diff --git a/crpptbx_new/JET/jet_mkiigb_wall_coords2.m b/crpptbx_new/JET/jet_mkiigb_wall_coords2.m deleted file mode 100644 index a43dd7f9..00000000 --- a/crpptbx_new/JET/jet_mkiigb_wall_coords2.m +++ /dev/null @@ -1,142 +0,0 @@ -rz=[2.0481 -0.9298 -2.1316 -1.1314 -2.29273 -1.3368 -2.36107 -1.33684 -2.3974 -1.3757 -2.41037 -1.40277 -2.40596 -1.38824 -2.41365 -1.42575 -2.41416 -1.43282 -2.41403 -1.42928 -2.41416 -1.47234 -2.41347 -1.48059 -2.41398 -1.47648 -2.40894 -1.5077 -2.39934 -1.5197 -2.42075 -1.59625 -2.42247 -1.61334 -2.42235 -1.60472 -2.42003 -1.6469 -2.41786 -1.65826 -2.41928 -1.65265 -2.40695 -1.693 -2.3688 -1.693 -2.3157 -1.74057 -2.35658 -1.74057 -2.36614 -1.73964 -2.37535 -1.7369 -2.42729 -1.71581 -2.43651 -1.71307 -2.44608 -1.71214 -2.52216 -1.71211 -2.53175 -1.7217 -2.53475 -1.7157 -2.54675 -1.7157 -2.54675 -1.7017 -2.58073 -1.6297 -2.58975 -1.61057 -2.61375 -1.5597 -2.61375 -1.5487 -2.60575 -1.5487 -2.60575 -1.52457 -2.62642 -1.51033 -2.64708 -1.50281 -2.66775 -1.50035 -2.68842 -1.50255 -2.70908 -1.50976 -2.72975 -1.52353 -2.72975 -1.5487 -2.71975 -1.5487 -2.71975 -1.5597 -2.73975 -1.60408 -2.7513 -1.6297 -2.78375 -1.7017 -2.78375 -1.7157 -2.79874 -1.7157 -2.80176 -1.7167 -2.80569 -1.71277 -2.86091 -1.71275 -2.87114 -1.7138 -2.88095 -1.71693 -2.93663 -1.74127 -2.94644 -1.7444 -2.95668 -1.74545 -2.98773 -1.74543 -2.9288 -1.68563 -2.89682 -1.68563 -2.88125 -1.62655 -2.88001 -1.62023 -2.8796 -1.61381 -2.8796 -1.60477 -2.87992 -1.59909 -2.88089 -1.59348 -2.89937 -1.5137 -2.89016 -1.5017 -2.88783 -1.49362 -2.88638 -1.48678 -2.88589 -1.4798 -2.88589 -1.43815 -2.88709 -1.42726 -2.89064 -1.41688 -2.90084 -1.39518 -2.90658 -1.38581 -2.91423 -1.37791 -2.96398 -1.3368 -3.01294 -1.33678 -3.01547 -1.34003 -3.3294 -1.067 -3.4907 -0.8592 -3.5972 -0.722 -3.6605 -0.6267 -3.7113 -0.5254 -3.7665 -0.3947 -3.8039 -0.2876 -3.8352 -0.1787 -3.8602 -0.0681 -3.8789 0.0437 -3.8913 0.1563 -3.8972 0.2695 -3.8967 0.3829 -3.8897 0.496 -3.8764 0.6086 -3.8622 0.6922 -3.8307 0.8306 -3.7984 0.9392 -3.7601 1.0459 -3.7157 1.1502 -3.6787 1.2265 -3.5881 1.4801 -3.4635 1.5923 -3.3038 1.716 -3.1528 1.8211 -2.9806 1.9449 -2.8887 1.98 -2.7897 2.0083 -2.6826 2.022 -2.5797 2.0193 -2.4832 2.0027 -2.3854 1.9708 -2.2842 1.9192 -2.2474 1.8972 -2.1316 1.6866 -2.0481 1.485 -1.9399 1.1653 -1.9122 1.0691 -1.8876 0.972 -1.8663 0.8741 -1.8482 0.7756 -1.8334 0.6766 -1.8219 0.5771 -1.8137 0.4773 -1.8088 0.3773 -1.8073 0.2772 -1.809 0.177 -1.8141 0.077 -1.8225 -0.0228 -1.8342 -0.1222 -1.8491 -0.2213 -1.8674 -0.3197 -1.8889 -0.4175 -1.9137 -0.5146 -1.9416 -0.6107 -2.0481 -0.9298]; diff --git a/crpptbx_new/JET/loadJETdata.m b/crpptbx_new/JET/loadJETdata.m deleted file mode 100644 index c2e4ab03..00000000 --- a/crpptbx_new/JET/loadJETdata.m +++ /dev/null @@ -1,648 +0,0 @@ -function [trace,error,varargout]=loadJETdata(shot,data_type,varargin) -% -% data_type: -% 'Ip' = current -% 'zmag' = vertical position of the center of the plasma (magnetic axis) -% 'rmag' = radial position of the center of the plasma -% 'rcont' = R of plama boundary vs time -% 'zcont' = Z of plama boundary vs time -% 'vol' = volume of flux surfaces vs rho=sqrt(psi) -% 'qrho' = q profile on rho mesh -% 'q95' = q95 vs time -% 'kappa', 'elon' = edge elongation vs time -% 'delta', 'triang' = edge averaged triangularity vs time -% 'deltatop', 'triangtop' = edge upper (top) triangularity vs time -% 'deltabot', 'triangbot' = edge lower (bottom) triangularity vs time -% 'n1' or 'n2': n=1 or n=2 MHD signal -% 'neint' = line-integrated electron density [m/m^3] -% 'ne'= ne raw profile on (R,t). ADD error bars in .std -% 'te'= Te raw profile on (R,t). ADD error bars in .std -% 'nerho'= ne profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% 'terho'= Te profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% Now, use CHAIN2 lid2/neo and teo for nerho, terho -% 'ece' = electron cyclotron emission -% 'sxr' = soft x-ray emission -% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{5}!) -% 'halpha'= Dalpha signal -% -% Special case compatible with old gdat.m allows (JET related): -% gdat(51994,'ppf','efit/xip',...) % omitting the 'JET' input as assumes JET if 3rd argument is a string -% -% examples: -% aa=gdat(51994,'ppf/efit/xip',1,'JET'); -% aa=gdat(55379,'jpf/di/c1f-chan8/131?type=lpf+diag=kc1f',1); % KC1F -% aa=gdat(53290,'jpf/di/c3-cats<c:001?type=lpf+diag=cats1',0,'JET') % long magnetic 8s by 001, 002, 003, 004 blocks -% aa=gdat(53290,'jpf/di/c3-cats<h:301?type=lpf+diag=cats1',0,'JET'); % fast data coils 301, 302, etc -% sxr10=gdat(53290,'jpf/db/j3-sxr<v10/1',1,'JET'); -% -% INPUT: -% shot: shot number -% data_type: type of the required data. -% -% Allows extension for uid and seq number a la RDA: ?uid=jetthg+seq=110 -% examples: -% -% data_type='Ip?uid=jetthg+seq=110' -% data_type='ppf','efit/xip?uid=jetthg+seq=110' -% -% for EFIT traces, allows keyword extension '_m' to get data from ppf/efitm instead of ppf/efit -% examples: -% -% data_type='Ip_m?uid=jetthg+seq=110' -% data_type='ppf','efitm/xip?uid=jetthg+seq=110' -% -% Meaning of varargin depends on data_type: -% -% data_type=sxr or ece: -% varargin{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2 -% varargin{2}: channel status: 1=unread yet, 0=read -% (for traces with many channel, enables to load additional channels, -% like SXR, ECE, etc.) -% varargin{3}: zmag for varargout{1} computation -% varargin{4}, {5} (used by AUG, time interval and skip interval to reduce time points) -% varargin{6}: sxr camera extra option: use to choose R projection: -% empty or '0'=default (intersection with zmag with 5 degrees) -% '1'=fixed to B. Alper R array (fixed in time) -% -% OUTPUT: -% trace.data: data structure -% trace.t: time of reference -% trace.x: space of reference -% error: error in loading signal (0=> OK, 1=> error) -% -% Additional Output arguments depending on data_type -% -% data_type=sxR: -% varargout{1}: intersection of the view lines with magnetic axis -% uses 5 degrees and zmag (varargin{3} if given) as default -% if varargin{4}==1, uses B. Alper fixed R array for V camera -% -% functions needed: jetreaddata or mdsplus routines -% -% Example: -% [zmag,error]=loadJETdata(shot,'zmag'); -% [n2,error]=loadJETdata(shot,'jpf/da/c1-g102'); -% [halpha,error]=loadJETdata(shot,'jpf/dd/s3-ad35'); -% - -varargout={cell(1,1)}; -error=1; - -% To allow multiple ways of writing a specific keyword, use data_type_eff within this routine -data_type_eff=data_type; -if size(data_type_eff,1)==1 - i=findstr('/',data_type_eff); - if length(i)>1 - % assumes given a la 'ppf/efit/xip' - data_type_eff=[{data_type_eff(1:i(1)-1)} ; {data_type_eff(i(1)+1:end)}]; - end -end - -i_efitm=0; -i_ext=length(data_type_eff)+1; -name_ext=''; -if size(data_type_eff,1)==1 - i=findstr('?',data_type_eff); - if ~isempty(i) - i_ext=i; - name_ext=data_type_eff(i_ext:end); - end - data_type_eff_noext=data_type_eff(1:i_ext-1); - i=findstr('_m',data_type_eff_noext); - if ~isempty(i) - i_efitm=1; - data_type_eff_noext=data_type_eff(1:i-1); - end - if ~isempty(strmatch(data_type_eff_noext,[{'ip'} {'i_p'} {'xip'}],'exact')) - data_type_eff_noext='Ip'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact')) - data_type_eff_noext='te'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Ne'} {'n_e'} {'NE'} {'N_e'}],'exact')) - data_type_eff_noext='ne'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Terho'}],'exact')) - data_type_eff_noext='terho'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'SXR'}],'exact')) - data_type_eff_noext='sxr'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) - data_type_eff_noext='ece'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact')) - data_type_eff_noext='vol'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'q_95'} {'Q95'}],'exact')) - data_type_eff_noext='q95'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'elongation'} {'elon'}],'exact')) - data_type_eff_noext='kappa'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'triangularity'} {'triang'}],'exact')) - data_type_eff_noext='delta'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltaup'} {'deltau'} {'triangtop'} {'triangu'} {'triangup'}],'exact')) - data_type_eff_noext='deltatop'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltalow'} {'deltal'} {'triangbot'} {'triangl'} {'trianglow'}],'exact')) - data_type_eff_noext='deltabot'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'halpha'} {'Halpha'}],'exact')) - data_type_eff_noext='halpha'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'n1'} {'N1'}],'exact')) - data_type_eff_noext='n1'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'n2'} {'N2'}],'exact')) - data_type_eff_noext='n2'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rmag'}],'exact')) - data_type_eff_noext='rmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zmag'}],'exact')) - data_type_eff_noext='zmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact')) - data_type_eff_noext='rcont'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zcont'}],'exact')) - data_type_eff_noext='zcont'; - end -else - i_ext=length(data_type_eff{2})+1; - name_ext=''; - i=findstr('?',data_type_eff{2}); - if ~isempty(i) - i_ext=i; - name_ext=data_type_eff{2}(i_ext:end); - end - data_type_eff_noext=data_type_eff{2}(1:i_ext-1); -end - -% all keywords and corresponding case to run below -JETkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'qrho'} {'q95'} {'kappa'} ... - {'delta'} {'deltatop'} {'deltabot'} {'halpha'} {'n1'} {'n2'} {'neint'} ... - {'ne'} {'te'} {'nerho'} {'terho'} ... - {'sxr'} {'sxR'} {'ece'}]; -JETsig.iip=strmatch('Ip',JETkeywrdall,'exact'); -JETsig.izmag=strmatch('zmag',JETkeywrdall,'exact'); -JETsig.irmag=strmatch('rmag',JETkeywrdall,'exact'); -JETsig.ircont=strmatch('rcont',JETkeywrdall,'exact'); -JETsig.izcont=strmatch('zcont',JETkeywrdall,'exact'); -JETsig.ivol=strmatch('vol',JETkeywrdall,'exact'); -JETsig.iqrho=strmatch('qrho',JETkeywrdall,'exact'); -JETsig.iq95=strmatch('q95',JETkeywrdall,'exact'); -JETsig.ikappa=strmatch('kappa',JETkeywrdall,'exact'); -JETsig.idelta=strmatch('delta',JETkeywrdall,'exact'); -JETsig.ideltatop=strmatch('deltatop',JETkeywrdall,'exact'); -JETsig.ideltabot=strmatch('deltabot',JETkeywrdall,'exact'); -JETsig.ihalpha=strmatch('halpha',JETkeywrdall,'exact'); -JETsig.in1=strmatch('n1',JETkeywrdall,'exact'); -JETsig.in2=strmatch('n2',JETkeywrdall,'exact'); -JETsig.ineint=strmatch('neint',JETkeywrdall,'exact'); -JETsig.ine=strmatch('ne',JETkeywrdall,'exact'); -JETsig.ite=strmatch('te',JETkeywrdall,'exact'); -JETsig.inerho=strmatch('nerho',JETkeywrdall,'exact'); -JETsig.iterho=strmatch('terho',JETkeywrdall,'exact'); -JETsig.isxr=strmatch('sxr',JETkeywrdall,'exact'); -JETsig.isxR=strmatch('sxR',JETkeywrdall,'exact'); -JETsig.iece=strmatch('ece',JETkeywrdall,'exact'); - -% For each keyword, specify which case to use. As most common is 'simplereaddata', fill in with this and change -% only indices needed. Usually use name of case same as keyword name -JETkeywrdcase=cell(size(JETkeywrdall)); -JETkeywrdcase(:)={'simplereaddata'}; -JETkeywrdcase(JETsig.iqrho)=JETkeywrdall(JETsig.iqrho); % special as efit q on psi -JETkeywrdcase(JETsig.idelta)=JETkeywrdall(JETsig.idelta); % special as average of triu and tril -JETkeywrdcase(JETsig.ine)=JETkeywrdall(JETsig.ine); % special as adds error bars -JETkeywrdcase(JETsig.ite)=JETkeywrdall(JETsig.ite); % idem -JETkeywrdcase(JETsig.inerho)=JETkeywrdall(JETsig.inerho); % idem -JETkeywrdcase(JETsig.iterho)=JETkeywrdall(JETsig.iterho); % idem -JETkeywrdcase(JETsig.isxr)=JETkeywrdall(JETsig.isxr); -JETkeywrdcase(JETsig.isxR)=JETkeywrdall(JETsig.isxR); -JETkeywrdcase(JETsig.iece)=JETkeywrdall(JETsig.iece); - -% Information about which dimension has time, always return 2D data as (x,t) array -% as most are 1D arrays with time as first index, fill in with ones and change only those needed -JETsigtimeindx=ones(size(JETkeywrdall)); - -% For the 'simplereaddata' cases, we need the full node in case gdat was called with full location directly -% for the other cases, leave this location empty -JETsiglocation=cell(2,size(JETkeywrdall,2)); -JETsiglocation(:)={''}; -JETsiglocation(:,JETsig.iip)={'ppf'; 'efit/xip'}; -JETsiglocation(:,JETsig.izmag)={'ppf'; 'efit/zmag'}; -JETsiglocation(:,JETsig.irmag)={'ppf'; 'efit/rmag'}; -JETsiglocation(:,JETsig.ircont)={'ppf' ; 'efit/rbnd'}; JETsigtimeindx(JETsig.ircont)=2; -JETsiglocation(:,JETsig.izcont)={'ppf' ; 'efit/zbnd'}; JETsigtimeindx(JETsig.izcont)=2; -JETsiglocation(:,JETsig.ivol)={'ppf'; 'equi/vol'}; -JETsiglocation(:,JETsig.iq95)={'ppf'; 'efit/q95'}; -JETsiglocation(:,JETsig.ikappa)={'ppf'; 'efit/elon'}; -JETsiglocation(:,JETsig.ideltatop)={'ppf'; 'efit/triu'}; -JETsiglocation(:,JETsig.ideltabot)={'ppf'; 'efit/tril'}; -JETsiglocation(:,JETsig.ihalpha)={'jpf'; 'dd/s3-ad35'}; -JETsiglocation(:,JETsig.in1)={'jpf'; 'da/c1-g101'}; -JETsiglocation(:,JETsig.in2)={'jpf'; 'da/c1-g102'}; -JETsiglocation(:,JETsig.ineint)={'ppf'; 'kg1v/lid3'}; - -% initialize order of substructures and allows just a "return" if data empty -trace.data=[]; -trace.x=[]; -trace.t=[]; -trace.dim=[]; -trace.dimunits=[]; -trace.name=[]; - -% find index of signal called upon -if size(data_type_eff,1)==2 - % in case node name was given in 2 parts directly (as old way) - ii1=strmatch(data_type_eff(1),JETsiglocation(1,:),'exact'); - iiindex=strmatch(data_type_eff_noext,JETsiglocation(2,ii1),'exact'); - if ~isempty(iiindex) - index=ii1(iiindex); - else - index=[]; - end - if isempty(index) -% $$$ disp('********************') -% $$$ disp('trace not yet registered.') -% $$$ disp('If standard data, ask andrea.scarabosio@epfl.ch or olivier.sauter@epfl.ch to create a keyqord entry for this data') -% eval(['!mail -s ''' data_type_eff{1} ' ' data_type_eff{2} ' ' num2str(shot) ' ' ... -% getenv('USER') ' JET'' olivier.sauter@epfl.ch < /dev/null']) - disp('********************') - % temporarily add entry in arrays, so can work below - index=length(JETkeywrdall)+1; - JETkeywrdall(end+1)={'new'}; - JETkeywrdcase(end+1)={'simplereaddata'}; - JETsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; - JETsigtimeindx(end+1)=0; - elseif ~strcmp(JETkeywrdcase{index},'simplereaddata') - msgbox(['Problem in loadJETdata with data_type_eff = ' char(data_type_eff(end)) ... - '. Full paths of nodes should only be for case simplereaddata'],'in loadJETdata','error') - error('in loadJETdata') - end -else - index=strmatch(data_type_eff_noext,JETkeywrdall,'exact'); - if isempty(index) - disp(' ') - disp('********************') - if iscell(data_type_eff) - disp(['no such keyword: ' data_type_eff{1} '/' data_type_eff{2}]) - else - disp(['no such keyword: ' data_type_eff]) - end - disp(' ') - disp('Available keywords:') - JETkeywrdall(:) - disp('********************') - return - end -end -disp(' ') -if iscell(data_type_eff) - disp(['loading' ' ' data_type_eff{1} '/' data_type_eff{2} ' from JET shot #' num2str(shot)]); -else - disp(['loading' ' ' data_type_eff ' from JET shot #' num2str(shot)]); -end -disp(['case ' JETkeywrdcase{index}]) -disp(' ') -switch JETkeywrdcase{index} - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'simplereaddata' - - ppftype=JETsiglocation{1,index}; - if i_efitm; - tracename=['eftm' JETsiglocation{2,index}(5:end) name_ext]; - else - tracename=[JETsiglocation{2,index} name_ext]; - end - ij=find(tracename~=''''); - tracename=tracename(ij); - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - switch tracename - case {'efit/btpd','efit/btpd?uid=jetppf+seq=0'} - if isempty(a) | isempty(t); - disp('data or t empty, assumes means btpd not defined'); - [xip,x,t,d,e]=rda_eff(shot,'ppf','efit/xip'); - shot_mg3_list=[47274 47275 47276 47280 47281 47282 47283 47284 47285 47286 47287 47290 47295 47296 47301]; - if isempty(find(shot_mg3_list==shot)) - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','efit/wdia'); - else - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','mg3/wpd'); - wdia=interp1(t1,wdia,t); - end - [rgeo,x3,t3,d,e]=rda_eff(shot,'ppf','efit/rgeo'); - a=2.122e6 .* wdia ./xip.^2 ./ rgeo; - end - case {'efit/btnd','efit/btnd?uid=jetppf+seq=0'} - if isempty(a) | isempty(t); - disp('data or t empty, assumes means btnd not defined'); - [xip,x,t,d,e]=rda_eff(shot,'ppf','efit/xip'); - shot_mg3_list=[47274 47275 47276 47280 47281 47282 47283 47284 47285 47286 47287 47290 47295 47296 47301]; - if isempty(find(shot_mg3_list==shot)) - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','efit/wdia'); - else - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','mg3/wpd'); - wdia=interp1(t1,wdia,t); - end - [rgeo,x3,t3,d,e]=rda_eff(shot,'ppf','efit/rgeo'); - [cr0,x3,t3,d,e]=rda_eff(shot,'ppf','efit/cr0'); - [bvac,x3,t3,d,e]=rda_eff(shot,'ppf','efit/bvac'); - [volm,x3,t3,d,e]=rda_eff(shot,'ppf','efit/volm'); - a=56.605.*wdia.*cr0.*rgeo./xip./volm./bvac; - end - - case {'LIDR/Z','lidr/z','Lidr/Z','LIDR/Z?uid=jetppf+seq=0'} - % 1D but vs R instead of t - x=t; - t=[]; - - end - - trace.data=a; - trace.x=x; - trace.t=t; - clear error - error=e; - if length(size(trace.data))==1 | (length(size(trace.data))==2 & size(trace.data,2)==1) - trace.dim=[{trace.t}]; - trace.dimunits={'time [s]'}; - elseif length(size(trace.data))==2 - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'R [m] or rho=sqrt(psi_norm)'} ; {'time [s]'}]; - else - disp('how to deal with 3D arrays?') - trace.dim=[{trace.x} ; {trace.t} ; {d}]; - trace.dimunits=[{'R [m] or rho=sqrt(psi_norm)'} ; {'time [s]'} ; {'d'}]; - trace.d=d; - end - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case JETkeywrdall{JETsig.iqrho} - % q profile on sqrt(psi_norm) - ppftype='ppf'; - if i_efitm - tracename=['eftm/q' name_ext]; - else - tracename=['efit/q' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=sqrt(x); % x is psi (? to test) - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'sqrt(\psi)'} ; {'time [s]'}]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case JETkeywrdall{JETsig.idelta} - % average of delatop and deltabot - ppftype='ppf'; - tracename1=['efit/triu' name_ext]; - tracename2=['efit/tril' name_ext]; - [a1,x,t,d,e]=rda_eff(shot,ppftype,tracename1); - [a2,x,t,d,e]=rda_eff(shot,ppftype,tracename2); - trace.data=0.5.*(a1+a2); - trace.x=x; - trace.t=t; - trace.dim=[{trace.t}]; - trace.dimunits=[{'time [s]'}]; - trace.name=[ppftype '/' num2str(shot) '/efit/0.5(triu+tril)']; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {JETkeywrdall{JETsig.ine} , JETkeywrdall{JETsig.ite}} - % ne, te raw data from LIDR vs R,t. Add error bars - ppftype='ppf'; - if strcmp(JETkeywrdcase{index},JETkeywrdall{JETsig.ine}) - tracename=['LIDR/NE' name_ext]; - else - tracename=['LIDR/TE' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=x; - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'R [m]'} ; {'time [s]'}]; - trace.std=[]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {JETkeywrdall{JETsig.inerho} , JETkeywrdall{JETsig.iterho}} - % ne, te on rho mesh. use lid2, thus need chain2 to have been run. Add error bars - ppftype='ppf'; - if strcmp(JETkeywrdcase{index},JETkeywrdall{JETsig.inerho}) - tracename=['LID2/NEO' name_ext]; - else - tracename=['LID2/TEO' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=x; - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'rho=sqrt(psi)'} ; {'time [s]'}]; - trace.std=[]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'sxr','sxR'} - % LOAD MULTI CHANNEL DATA - % load JET soft x-ray data - % parameters needed for correct convertion of JET Sxr data - vconvert= [1.379 1.311 1.249 1.191 1.139 1.093 1.049 ... - 1.011 0.975 0.945 0.917 0.893 0.873 0.856 ... - 0.842 0.829 0.821 0.815 0.821 0.829 0.842 ... - 0.856 0.873 0.894 0.918 0.946 0.976 1.012 ... - 1.050 1.094 1.141 1.193 1.251 1.313 1.382]; - rconvert= [3.45 3.43 3.41 3.37 3.33 3.28 3.23 3.18 3.14 ... - 3.09 3.05 3.00 2.94 2.89 2.83 2.77 2.72 2.68 2.63 ... - 2.59 2.55 2.49 2.44 2.40 2.37 2.33 2.29 2.26 2.23 ... - 2.19 2.14 2.12 2.10 2.08 2.06]; - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=24; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi-starti+1,1); - end - trace.t=[]; - trace.x=[]; - iloaded_data=0; - for i=starti:endi - % Read channels from lowchannel to upchannel if necessary - if status(i)==1 - iloaded_data=iloaded_data+1; - % Status=1 => Not Read Yet - % vertical SXR chords - ppftype='jpf'; - tracename=['db/j3-sxr<v' num2str(i) '/1' name_ext]; - if shot<48000 - tracename=['db/j3-sxr<t' num2str(i) '/1' name_ext]; - disp('Using T camera: Radius data probably wrong') - end - a=which('jpfdat'); - if isempty(a) - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - % Convert from raw sxr data to W/m^2 - % EDIT: on JET a is not empty on error - if ~isempty(a) - if ~isempty(t) - trace.data(i,:) = a * vconvert(i); - trace.t=t; - if ~isempty(x) - trace.x(i,:)=x; - end - end - error=e; - end - else - disp(['Reading channel ' tracename]); - [a, t, nwds, title, unit, ier] = jpfdat(tracename, shot); - if ~ier - % Convert from raw sxr data to W/m^2 - trace.data(i,:) = a' * vconvert(i); - trace.t=t'; - end - end - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext]; - end - end - if isempty(trace.t) - disp(['no data in ' trace.name]) - return - end - % calculating intersection of the view lines with magnetics axis - if strcmp(data_type_eff_noext,'sxR') - if iloaded_data>0 - if nargin>=5 & ~isempty(varargin{3}) - zmag=varargin{3}; - else - zmag=loadJETdata(shot,'zmag'); - end - zmageff=interp1(zmag.t,zmag.data,trace.t); - for i=starti:endi - radius.data(i,:)=2.848 + (2.172-zmageff') .* tan(-5.0/180.*3.14159 - atan2(0.99.*(i-18),35.31)); - end - iii=0; - if nargin>=8 & ~isempty(varargin{6}) - iii=str2num(varargin{6}); - end - if iii==1 - for i=starti:endi - radius.data(i,:)=rconvert(i); - end - disp('uses B. Alper fixed R array for SXR R intersection') - end - radius.t=t; - varargout{1}={radius}; - trace.R=radius.data; - else - varargout{1}={struct([])}; - trace.R=[]; - end - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'ece' - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=24; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi,1); - end - % Read channels from lowchannel to upchannel if necessary - for i=starti:endi - if status(i)==1 - % ECE, te0 - % Status=1 => Not Read Yet - ppftype='ppf'; - tracename=['kk3/te' num2str(i,'%2.2d') name_ext]; - disp(tracename) - a=which('ppfread'); - if isempty(a) | ~isempty(name_ext) - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - if isempty(a) & size(trace.data,2)>1 - trace.data(i,:)=NaN; - else - trace.data(i,:)=a; - trace.t=t; - end - if ~isempty(x); trace.x(i,:)=x'; end; - error=e; - else - [a,x,t,unitd,unitx,unitt,comment,sequence,e]= ... - ppfread(shot,'KK3',['TE' num2str(i,'%2.2d')]); - if isempty(a) & size(trace.data,2)>1 - trace.data(i,:)=NaN; - else - trace.data(i,:)=a'; - trace.t=t'; - end - if ~isempty(x); trace.x(i,:)=x; end; - error=e; - end - - ppftypeR='ppf'; - tracenameR=['kk3/rc' num2str(i,'%2.2d') name_ext]; - a=which('ppfdat'); - if isempty(a) | ~isempty(name_ext) - [a,x,t,d,e]=rda_eff(shot,ppftypeR,tracenameR); - if isempty(a) & size(trace.data,2)>1 - radius.data(i,:)=NaN; - else - radius.data(i,:)=a; - radius.t=t; - radius.x=x; - end - else - [a,x,t,unitd,unitx,unitt,comment,sequence,e]= ... - ppfread(shot,'KK3',['RC' num2str(i,'%2.2d')]); - if isempty(a) & size(trace.data,2)>1 - radius.data(i,:)=NaN; - else - radius.data(i,:)=a'; - radius.t=t'; - radius.x=x'; - end - end - end - end - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.name=[ 'ppf/' num2str(shot) '/' 'kk3/teXX' name_ext ]; - if exist('radius') - varargout={{radius}}; - for i=starti:endi - trace.R(i,:)=interp1(radius.t,radius.data(i,:),trace.t); - end - else - varargout={{struct([])}}; - trace.R=[]; - end - - otherwise - disp('case not yet defined') - -end diff --git a/crpptbx_new/JET/mapflux_fast.m b/crpptbx_new/JET/mapflux_fast.m deleted file mode 100644 index d7698a5c..00000000 --- a/crpptbx_new/JET/mapflux_fast.m +++ /dev/null @@ -1,110 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -function flux=mapflux_fast(cij,ri,zi,r,z,varargin) - -% mapflux : carte de flux normalise (r,z) sur jet -% -% syntaxe : flux=mapflux(cij,ri,zi,r,z) -% -% entrees : -% cij : coefficients bspline (efit/sspr(nr+nz+1:nr+nz+nc)) -% ri : points de controle pour r (efit/sspr(1:nr)) -% zi : points de controle pour z (efit/sspr(nr+1:nr+nz)) -% r : grille en r pour la carte de flux (vecteur) -% z : grille en z pour la carte de flux (vecteur) -% -% varargin{1}=1: output as diagonal of flux to get psin on (R,Z) set of points -% 0: output full matrix (default) -% varargin{1}=1: limits spline calculation to relevant ri,zi points -% (useful when computing on a few (r,z) points) -% (default) -% =0: compute all splines (slightly faster when whole grid needed) -% -% sortie : -% flux : matrice donnant le flux normalise sur la grille (r,z) -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% auteur : patrick maget -% date : 13/10/2000 -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -nr=length(ri); -nz=length(zi); -nrout=length(r); -nzout=length(z); -r=reshape(r,1,length(r)); -z=reshape(z,1,length(z)); -absplr=zeros(nrout,nr-4); -if nargin>6 & varargin{2}==0 - i1=1; - i2=nr-4; -else - ii=find(ri>=min(r));i1=ii(1); - ii=find(ri>max(r)); - if ~isempty(ii) - i2=ii(1); - else - i2=nr; - end -end -for i=max(1,i1-4):min(nr-4,i2-1) - absplr(:,i)=bsplinev(ri,r,3,i)'; -end -absplz=zeros(nz-4,nzout); -if nargin>6 & varargin{2}==0 - i1=1; - i2=nz-4; -else - ii=find(zi>=min(z));i1=ii(1); - ii=find(zi>max(z)); - if ~isempty(ii) - i2=ii(1); - else - i2=nz; - end -end -for j=max(1,i1-4):min(nz-4,i2-1) - absplz(j,:)=bsplinev(zi,z,3,j); -end -cij2D=reshape(cij,nz-4,nr-4)'; -flux=absplr*(cij2D*absplz); -if ~isempty(varargin) & varargin{1} - flux=diag(flux); -end - -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% fonction b-spline -% bki=bspline(ti,t,k,i) -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% auteur : patrick maget -% date : 14/12/99 -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% retourne pour la valeur de i, -% le vecteur de poids correspondant au vecteur de demande t -% seuls les elements de t situes entre ti(i) et ti(i+k+1) ont un poids non nul - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -function bki=bsplinev(ti,t,k,i) - -if (i>=length(ti)) - bki=0.0; -elseif (k==0) - bki= ((t>=ti(i))&(t<ti(i+1))); - % if ((t<ti(i)) | (t>=ti(i+1))) - % bki=0.0; - % else - % bki=1.0; - % end -else - if (ti(i+k)==ti(i)) - fac1=0.0; - else - fac1=(t-ti(i))/(ti(i+k)-ti(i)); - end - if (ti(i+k+1)==ti(i+1)) - fac2=0.0; - else - fac2=(ti(i+k+1)-t)/(ti(i+k+1)-ti(i+1)); - end - bki=fac1.*bsplinev(ti,t,k-1,i)+fac2.*bsplinev(ti,t,k-1,i+1); -end diff --git a/crpptbx_new/JET/psinrzjet.m b/crpptbx_new/JET/psinrzjet.m deleted file mode 100644 index 84d105ed..00000000 --- a/crpptbx_new/JET/psinrzjet.m +++ /dev/null @@ -1,138 +0,0 @@ -function [r,z,psinrz,sspr,sspi,tefit_eff]=psinrzjet(shot,time,nrg_rg,nzg_zg,efitlab,uid,seq,varargin); -% -% function [r,z,psinrz,sspr,sspi,tefit_eff]=psinrzjet(shot,time,nrg_rg,nzg_zg,efitlab,uid,seq,varargin); -% -% psirz : reconstruction des surfaces de flux -% -% ce programme utilise les donnees de efit ou eftm -% -% examples: -% [r,z,psinrz,sspr,sspi]=psinrzjet(shot,time,nrg_rg,nzg_zg,[efitlab,uid,seq,ncont]); -% [r,z,psinrz,sspr,sspi]=psinrzjet(50814,60,65,65,[],[],[],60,sspr,sspi); % to get plot and give sspr,sspi -% [r,z,psinrz]=psinrzjet(50814,60.4,[3 3.2],[0 0.1],[],[],[],0,sspr,sspi,[],1); % -% -% entrees : -% shot : numero du choc jet -% time : time de l'analyse -% nrg_rg, nzg_zg: nb de points de la grille en r (resp. en z) sur laquelle on fait la -% reconstruction des surfaces de flux. -% if nzg_zg is negative, make symmetric box around zero -% if array, assumes rout and zout given firectly -% varargin{1}: plot option: 0: do not plot contours, >0 plot contour with varargin{1} nb of contours (60 is good) -% varargin{2}: sspr from ppf/efit/sspr, structure containing sspr.data and sspr.t -% varargin{3}: sspi from ppf/efit/sspi, structure containing sspi.data and sspi.t -% varargin{4}: deltaz -% varargin{5}: idiag: =1 : gives diag(psinrz) as output to give psi at (r,z) points -% idiag=0 (default) full matrix as output -% -% facultatifs : -% efitlab : efit ou eftm (efitlab=efit par defaut) -% uid : eventuellement, donnees ppf privees (uid='jetppf' par defaut). -% seq : "sequence number" de l'uid (0 par defaut -> version la plus recente) -% -% sorties : -% r, z : vecteurs de la grille (r,z) -% psinrz : matrice psin(r,z) (flux normalise) -% -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -if nargin<=4 | isempty(efitlab) - efitlab='efit'; -end -if nargin<=5 | isempty(uid) - uid='jetppf'; -end -if nargin<=6 | isempty(seq) - seqd='0'; -else - if ischar(seq) - seqd=seq; - else - seqd=num2str(seq); - end -end -ncont=0; -if nargin>=8 & ~isempty(varargin{1}) - ncont=varargin{1}; -end - -% equilibre magnetique -%--------------------- -if nargin>=9 & ~isempty(varargin{2}) - sspr=varargin{2}; -else - sspr=gdat(shot,'ppf',[efitlab '/sspr?uid=' uid '+seq=' seqd]); -end -ssprs=sspr.data; -tpefit=sspr.t; -if nargin>=10 & ~isempty(varargin{3}) - sspi=varargin{3}; -else - sspi=gdat(shot,'ppf',[efitlab '/sspi?uid=' uid '+seq=' seqd]); -end -sspis=sspi.data; -tpefit=sspi.t; -if nargin>=11 & ~isempty(varargin{4}) - deltaz=varargin{4}; -else - deltaz=0; -end -if nargin>=12 & ~isempty(varargin{5}) - idiag=varargin{5}; -else - idiag=0; -end - -[x,ind]=min(abs(time-tpefit)); -tefit_eff=tpefit(ind); - -sspr_t=ssprs(:,ind); -sspi_t=sspis(:,ind); - -nr=sspi_t(1); -nz=sspi_t(2); -nc=sspi_t(3); -ri=sspr_t(1:nr); -zi=sspr_t((nr+1):(nr+nz)); -cij=sspr_t((nr+nz+1):(nr+nz+nc)); - -rmin=0.01*sspr_t(1); -rmax=0.01*sspr_t(nr); -zmin=0.01*sspr_t(nr+1); -zmax=0.01*sspr_t(nr+nz); - -rmin=rmin+1e-4; -rmax=rmax-1e-4; -zmin=zmin+1e-4; -zmax=zmax-1e-4; - -if length(nrg_rg)==1 & length(nzg_zg)==1 - r=linspace(rmin,rmax,nrg_rg); - z=linspace(zmin,zmax,abs(nzg_zg)); - if nzg_zg<0 - zlim=max(abs(zmin-deltaz),abs(zmax+deltaz)); - z=linspace(-zlim-deltaz,zlim-deltaz,abs(nzg_zg)); - end -else - r=nrg_rg; - z=nzg_zg; -end - -% mapflux contruit la carte de flux psin sur (r,z) -psinrz=mapflux_fast(cij,0.01*ri,0.01*zi,r,z,idiag); - -if ncont>0 - figure - contour(r,z,psinrz',ncont); - hold on - [h1, h2]=contour(r,z,psinrz',[1 1],'k'); - for i=1:length(h2) - set(h2(i),'LineWidth',2); - end - ss=sprintf('%.4f',time); - title(['JET #' num2str(shot) ' t= ' ss]) - xlabel('R [m]') - ylabel('Z [m]') - axis equal - axis([rmin rmax zmin zmax]) -end diff --git a/crpptbx_new/JET/psirz.m b/crpptbx_new/JET/psirz.m deleted file mode 100644 index 72abd3a4..00000000 --- a/crpptbx_new/JET/psirz.m +++ /dev/null @@ -1,185 +0,0 @@ -function [r,z,psinrz,sspr,sspi]=psirz(shot,time,nrg,nzg,efitlab,uid,seqd,varargin); -% -% psirz : reconstruction des surfaces de flux -% -% ce programme utilise les donnees de efit ou eftm -% -% examples: -% [r,z,psinrz,sspr,sspi]=psirz(shot,time,nrg,nzg,[efitlab,uid,seq,ncont]); -% [r,z,psinrz,sspr,sspi]=psirz(50814,60,65,65,[],[],[],60,sspr,sspi); % to get plot and give sspr,sspi -% -% entrees : -% shot : numero du choc jet -% time : time de l'analyse -% nrg, nzg: nb de points de la grille en r (resp. en z) sur laquelle on fait la -% reconstruction des surfaces de flux. -% if nzg is negative, make symmetric box around zero -% varargin{1}: plot option: 0: do not plot contours, >0 plot contour with varargin{1} nb of contours (60 is good) -% varargin{2}: sspr from ppf/efit/sspr, structure containing sspr.data and sspr.t -% varargin{3}: sspi from ppf/efit/sspi, structure containing sspi.data and sspi.t -% varargin{4}: deltaz -% -% facultatifs : -% efitlab : efit ou eftm (efitlab=efit par defaut) -% uid : eventuellement, donnees ppf privees (uid='jetppf' par defaut). -% seq : "sequence number" de l'uid (0 par defaut -> version la plus recente) -% -% sorties : -% r, z : vecteurs de la grille (r,z) -% psinrz : matrice psin(r,z) (flux normalise) -% -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -if nargin<=4 | isempty(efitlab) - efitlab='efit'; -end -if nargin<=5 | isempty(uid) - uid='jetppf'; -end -if nargin<=6 | isempty(seqd) - seqd='0'; -end -ncont=0; -if nargin>=8 & ~isempty(varargin{1}) - ncont=varargin{1}; -end - -% equilibre magnetique -%--------------------- -if nargin>=9 & ~isempty(varargin{2}) - sspr=varargin{2}; -else - sspr=gdat(shot,'ppf',[efitlab '/sspr?uid=' uid '+seq=' seqd]); -end -ssprs=sspr.data; -tpefit=sspr.t; -if nargin>=10 & ~isempty(varargin{3}) - sspi=varargin{3}; -else - sspi=gdat(shot,'ppf',[efitlab '/sspi?uid=' uid '+seq=' seqd]); -end -sspis=sspi.data; -tpefit=sspi.t; -if nargin>=11 & ~isempty(varargin{4}) - deltaz=varargin{4}; -else - deltaz=0; -end - -[x,ind]=min(abs(time-tpefit)); -sspr_t=ssprs(:,ind); -sspi_t=sspis(:,ind); - -nr=sspi_t(1); -nz=sspi_t(2); -nc=sspi_t(3); -ri=sspr_t(1:nr); -zi=sspr_t((nr+1):(nr+nz)); -cij=sspr_t((nr+nz+1):(nr+nz+nc)); - -rmin=0.01*sspr_t(1); -rmax=0.01*sspr_t(nr); -zmin=0.01*sspr_t(nr+1); -zmax=0.01*sspr_t(nr+nz); - -rmin=rmin+1e-4; -rmax=rmax-1e-4; -zmin=zmin+1e-4; -zmax=zmax-1e-4; - -r=linspace(rmin,rmax,nrg); -z=linspace(zmin,zmax,abs(nzg)); -if nzg<0 - zlim=max(abs(zmin-deltaz),abs(zmax+deltaz)); - z=linspace(-zlim-deltaz,zlim-deltaz,abs(nzg)); -end - -% mapflux contruit la carte de flux psin sur (r,z) -psinrz=mapflux(cij,0.01*ri,0.01*zi,r,z); - -if ncont>0 - figure - contour(r,z,psinrz',ncont); - hold on - [h1, h2]=contour(r,z,psinrz',[1 1],'k'); - for i=1:length(h2) - set(h2(i),'LineWidth',2); - end - ss=sprintf('%.4f',time); - title(['JET #' num2str(shot) ' t= ' ss]) - xlabel('R [m]') - ylabel('Z [m]') - axis equal - axis([rmin rmax zmin zmax]) -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -function flux=mapflux(cij,ri,zi,r,z) - -% mapflux : carte de flux normalise (r,z) sur jet -% -% syntaxe : flux=mapflux(cij,ri,zi,r,z) -% -% entrees : -% cij : coefficients bspline (efit/sspr(nr+nz+1:nr+nz+nc)) -% ri : points de controle pour r (efit/sspr(1:nr)) -% zi : points de controle pour z (efit/sspr(nr+1:nr+nz)) -% r : grille en r pour la carte de flux (vecteur) -% z : grille en z pour la carte de flux (vecteur) -% -% sortie : -% flux : matrice donnant le flux normalise sur la grille (r,z) -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% auteur : patrick maget -% date : 13/10/2000 -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -nr=length(ri); -nz=length(zi); -fpq=zeros(length(r),length(z)); -for i=1:(nr-4) - for j=1:(nz-4) - fpq=fpq+cij(j+(i-1)*(nz-4))*bsplinev(ri,r,3,i)'*bsplinev(zi,z,3,j); - end -end -flux=fpq; - -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% fonction b-spline -% bki=bspline(ti,t,k,i) -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% auteur : patrick maget -% date : 14/12/99 -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% retourne pour la valeur de i, -% le vecteur de poids correspondant au vecteur de demande t -% seuls les elements de t situes entre ti(i) et ti(i+k+1) ont un poids non nul - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -function bki=bsplinev(ti,t,k,i) - -if (i>=length(ti)) - bki=0.0; -elseif (k==0) - bki= ((t>=ti(i))&(t<ti(i+1))); - % if ((t<ti(i)) | (t>=ti(i+1))) - % bki=0.0; - % else - % bki=1.0; - % end -else - if (ti(i+k)==ti(i)) - fac1=0.0; - else - fac1=(t-ti(i))/(ti(i+k)-ti(i)); - end - if (ti(i+k+1)==ti(i+1)) - fac2=0.0; - else - fac2=(ti(i+k+1)-t)/(ti(i+k+1)-ti(i+1)); - end - bki=fac1.*bsplinev(ti,t,k-1,i)+fac2.*bsplinev(ti,t,k-1,i+1); -end diff --git a/crpptbx_new/JET/rda_eff.m b/crpptbx_new/JET/rda_eff.m deleted file mode 100644 index b1bb601b..00000000 --- a/crpptbx_new/JET/rda_eff.m +++ /dev/null @@ -1,189 +0,0 @@ -function [data,x,time,hsig,error]=rda_eff(shot,pftype,tracename,varargin); -% -% gets data using RDA or mdsplus -% 1D arrays: assumes dimension is time -% 2D arrays: assumes data vs (x,time) -% 3D arrays: assumes data vs (x,time,hsig) (for mdsplus) -% -% varargin{1}: time interval or timevalue, will get data closest to that time or within that time interval -% (DOES NOT WORK YET) -% -% examples: -% [data,x,time,hsig,error]=rda_eff(51994,'ppf','efit/xip'); -% [data,x,time,hsig,error]=rda_eff(52206,'ppf','equi/rmji?uid=jetthg+seq=122'); -% -% set global variable: usemdsplus to decide if RDA or mdsplus is used: -% >> global usemdsplus -% >> usemdsplus=1 % means use mds to get data (default if not defined) -% >> usemdsplus=0 % means use jetreaddata routine (RDA) -% if ~exist('usemdsplus'); usemdsplus=1; end -% - -global usemdsplus -if isempty(usemdsplus); usemdsplus=1; end -time_int=[]; -if nargin>=4 & ~isempty(varargin{1}) - time_int=varargin{1}; -end - -if usemdsplus - % use mdsplus - - if ~unix('test -d /home/duval/mdsplus') - addpath('/home/duval/mdsplus') - end - mdsconnect('mdsplus.jet.efda.org'); - - % defines trace to fetch - % after '?' specific details - separator='+'; - mainseparator='?'; - imaintrace=findstr(mainseparator,tracename); - if isempty(imaintrace) - maintrace=tracename; - uid=[]; - seq=[]; - diag=[]; - type=[]; - else - maintrace=tracename(1:imaintrace-1); - rest=tracename(imaintrace+1:end); - % gets uid if any - iuid=findstr('uid=',rest); - if isempty(iuid) - uid=[]; - else - ii=findstr(separator,rest(iuid:end)); - if isempty(ii) - uid=rest(iuid+4:end); - else - uid=rest(iuid+4:iuid+ii(1)-2); - end - end - % gets seq if any - iseq=findstr('seq=',rest); - if isempty(iseq) - seq=[]; - else - ii=findstr(separator,rest(iseq:end)); - if isempty(ii) - seq=rest(iseq+4:end); - else - seq=rest(iseq+4:iseq+ii(1)-2); - end - end - % gets type if any - itype=findstr('type=',rest); - if isempty(itype) - type=[]; - else - ii=findstr(separator,rest(itype:end)); - if isempty(ii) - type=rest(itype+5:end); - else - type=rest(itype+5:itype+ii(1)-2); - end - end - % gets diag if any - idiag=findstr('diag=',rest); - if isempty(idiag) - diag=[]; - else - ii=findstr(separator,rest(idiag:end)); - if isempty(ii) - diag=rest(idiag+5:end); - else - diag=rest(idiag+5:idiag+ii(1)-2); - end - end - - end - - % fetch value - if ~isempty(uid) - eval(['u=mdsvalue(''_sig=ppfuid("' uid '")'');']) - end - if strcmpi(type,'lpf') - pftype=[type '/' diag]; - end - traceeff=[pftype '/' maintrace]; - if ~isempty(seq) - traceeff=[traceeff '/' num2str(seq)]; - end - user=getenv('USER'); - eval(['[data,error]=mdsvalue(''_rdaeff' user '=jet("' traceeff '",' num2str(shot) ')'');']) - hsig=[]; - ss=size(data); - nbofdim=length(ss); - if ss(end)==1; nbofdim=nbofdim-1; end - nbofdim=max(nbofdim,1); - switch nbofdim - case 1 - eval(['time=mdsvalue(''dim_of(_rdaeff' user ',0)'');']); - x=[]; - if isempty(time) & length(data)>1e6 & strcmpi(type,'lpf') & strcmpi(diag,'kc1f') - mdsdisconnect; - mdsconnect('mdsplus.jet.efda.org'); - eval(['aaa=mdsvalue(''_tc91=jet("jpf/da/c1-tc91",' num2str(shot) ');1'');']) - taaa=mdsvalue('_ttc91=dim_of(_tc91,0);_ttc91[0]'); - time=linspace(taaa+1e-6,taaa+4,length(data))'; - end - if isempty(time) & length(data)>1e6 & strcmpi(type,'lpf') & strcmpi(diag,'cats1') - ichannel=findstr(':00',maintrace); - iblock=str2num(maintrace(ichannel+3)); - mdsdisconnect; - mdsconnect('mdsplus.jet.efda.org'); - taaa=39.9989+(iblock-1)*8; - time=linspace(taaa,taaa+8-4e-6,length(data))'; - end - case 2 - eval(['x=mdsvalue(''dim_of(_rdaeff' user ',0)'');']); - eval(['time=mdsvalue(''dim_of(_rdaeff' user ',1)'');']); - - case 3 - eval(['x=mdsvalue(''dim_of(_rdaeff' user ',0)'');']); - eval(['time=mdsvalue(''dim_of(_rdaeff' user ',1)'');']); - disp('3rd dimension in hsig!!!!!!!!!!!!!!!!!!!!!!!!!') - eval(['hsig=mdsvalue(''dim_of(_rdaeff' user ',2)'');']); - - otherwise - disp([' more than 3 dimensions for ' num2str(shot) ' ; ' pftype '/' tracename]) - error('in rda_eff') - - end - - mdsdisconnect; - if ~unix('test -d /home/duval/mdsplus') - rmpath('/home/duval/mdsplus') - end - -else - % use RDA - [a,time,x,hsig,error]=jetreaddata(['http://data.jet.uk/' pftype '/' num2str(shot) '/' tracename]); - % transpose data as output in C format, reversed from Fortran and matlab standard - ss=size(a); - nbofdim=length(ss); - if ss(end)==1; nbofdim=nbofdim-1; end - nbofdim=max(nbofdim,1); - if nbofdim==1 - data=a; - else - data=a'; - end -end - -% to prevent problems when trace empty and time become string -if ischar(time) - time=[]; -end -if ischar(x) - x=[]; -end -if isempty(x) & ~isempty(data) & data==0 - data=[]; -end - -if isempty(data) - x=[]; - time=[]; -end diff --git a/crpptbx_new/KSTAR/loadKSTARdata.m b/crpptbx_new/KSTAR/loadKSTARdata.m deleted file mode 100644 index 01c29260..00000000 --- a/crpptbx_new/KSTAR/loadKSTARdata.m +++ /dev/null @@ -1,639 +0,0 @@ -function [trace,error,varargout]=loadKSTARdata(shot,data_type,varargin) -% -% data_type: -% 'Ip' = current -% 'zmag' = vertical position of the center of the plasma (magnetic axis) -% 'rmag' = radial position of the center of the plasma -% 'rcont' = R of plama boundary vs time -% 'zcont' = Z of plama boundary vs time -% 'vol' = volume of flux surfaces vs rho=sqrt(psi) -% 'qrho' = q profile on rho mesh -% 'q95' = q95 vs time -% 'kappa', 'elon' = edge elongation vs time -% 'delta', 'triang' = edge averaged triangularity vs time -% 'deltatop', 'triangtop' = edge upper (top) triangularity vs time -% 'deltabot', 'triangbot' = edge lower (bottom) triangularity vs time -% 'n1' or 'n2': n=1 or n=2 MHD signal -% 'neint' = line-integrated electron density [m/m^3] -% 'ne'= ne raw profile on (R,t). ADD error bars in .std -% 'te'= Te raw profile on (R,t). ADD error bars in .std -% 'nerho'= ne profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% 'terho'= Te profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% Now, use CHAIN2 lid2/neo and teo for nerho, terho -% 'ece' = electron cyclotron emission -% 'sxr' = soft x-ray emission -% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{5}!) -% 'halpha'= Dalpha signal -% -% -% INPUT: -% shot: shot number -% data_type: type of the required data. -% -% Allows extension for uid and seq number a la RDA: ?uid=jetthg+seq=110 -% examples: -% -% data_type='Ip?uid=jetthg+seq=110' -% data_type='ppf','efit/xip?uid=jetthg+seq=110' -% -% for EFIT traces, allows keyword extension '_m' to get data from ppf/efitm instead of ppf/efit -% examples: -% -% data_type='Ip_m?uid=jetthg+seq=110' -% data_type='ppf','efitm/xip?uid=jetthg+seq=110' -% -% Meaning of varargin depends on data_type: -% -% data_type=sxr or ece: -% varargin{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2 -% varargin{2}: channel status: 1=unread yet, 0=read -% (for traces with many channel, enables to load additional channels, -% like SXR, ECE, etc.) -% varargin{3}: zmag for varargout{1} computation -% varargin{4}, {5} (used by AUG, time interval and skip interval to reduce time points) -% varargin{6}: sxr camera extra option: use to choose R projection: -% empty or '0'=default (intersection with zmag with 5 degrees) -% '1'=fixed to B. Alper R array (fixed in time) -% -% OUTPUT: -% trace.data: data structure -% trace.t: time of reference -% trace.x: space of reference -% error: error in loading signal (0=> OK, 1=> error) -% -% Additional Output arguments depending on data_type -% -% data_type=sxR: -% varargout{1}: intersection of the view lines with magnetic axis -% uses 5 degrees and zmag (varargin{3} if given) as default -% if varargin{4}==1, uses B. Alper fixed R array for V camera -% -% functions needed: jetreaddata or mdsplus routines -% -% Example: -% [zmag,error]=loadKSTARdata(shot,'zmag'); -% [n2,error]=loadKSTARdata(shot,'jpf/da/c1-g102'); -% [halpha,error]=loadKSTARdata(shot,'jpf/dd/s3-ad35'); -% - -varargout={cell(1,1)}; -error=1; - -% To allow multiple ways of writing a specific keyword, use data_type_eff within this routine -data_type_eff=data_type; -if size(data_type_eff,1)==1 - i=findstr('/',data_type_eff); - if length(i)>1 - % assumes given a la 'ppf/efit/xip' - data_type_eff=[{data_type_eff(1:i(1)-1)} ; {data_type_eff(i(1)+1:end)}]; - end -end - -i_efitm=0; -i_ext=length(data_type_eff)+1; -name_ext=''; -if size(data_type_eff,1)==1 - i=findstr('?',data_type_eff); - if ~isempty(i) - i_ext=i; - name_ext=data_type_eff(i_ext:end); - end - data_type_eff_noext=data_type_eff(1:i_ext-1); - i=findstr('_m',data_type_eff_noext); - if ~isempty(i) - i_efitm=1; - data_type_eff_noext=data_type_eff(1:i-1); - end - if ~isempty(strmatch(data_type_eff_noext,[{'ip'} {'i_p'} {'xip'}],'exact')) - data_type_eff_noext='Ip'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact')) - data_type_eff_noext='te'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Ne'} {'n_e'} {'NE'} {'N_e'}],'exact')) - data_type_eff_noext='ne'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Terho'}],'exact')) - data_type_eff_noext='terho'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'SXR'}],'exact')) - data_type_eff_noext='sxr'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) - data_type_eff_noext='ece'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact')) - data_type_eff_noext='vol'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'q_95'} {'Q95'}],'exact')) - data_type_eff_noext='q95'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'elongation'} {'elon'}],'exact')) - data_type_eff_noext='kappa'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'triangularity'} {'triang'}],'exact')) - data_type_eff_noext='delta'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltaup'} {'deltau'} {'triangtop'} {'triangu'} {'triangup'}],'exact')) - data_type_eff_noext='deltatop'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'deltalow'} {'deltal'} {'triangbot'} {'triangl'} {'trianglow'}],'exact')) - data_type_eff_noext='deltabot'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'halpha'} {'Halpha'}],'exact')) - data_type_eff_noext='halpha'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'n1'} {'N1'}],'exact')) - data_type_eff_noext='n1'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'n2'} {'N2'}],'exact')) - data_type_eff_noext='n2'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rmag'}],'exact')) - data_type_eff_noext='rmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zmag'}],'exact')) - data_type_eff_noext='zmag'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact')) - data_type_eff_noext='rcont'; - end - if ~isempty(strmatch(data_type_eff_noext,[{'Zcont'}],'exact')) - data_type_eff_noext='zcont'; - end -else - i_ext=length(data_type_eff{2})+1; - name_ext=''; - i=findstr('?',data_type_eff{2}); - if ~isempty(i) - i_ext=i; - name_ext=data_type_eff{2}(i_ext:end); - end - data_type_eff_noext=data_type_eff{2}(1:i_ext-1); -end - -% all keywords and corresponding case to run below -KSTARkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'qrho'} {'q95'} {'kappa'} ... - {'delta'} {'deltatop'} {'deltabot'} {'halpha'} {'n1'} {'n2'} {'neint'} ... - {'ne'} {'te'} {'nerho'} {'terho'} ... - {'sxr'} {'sxR'} {'ece'}]; -KSTARsig.iip=strmatch('Ip',KSTARkeywrdall,'exact'); -KSTARsig.izmag=strmatch('zmag',KSTARkeywrdall,'exact'); -KSTARsig.irmag=strmatch('rmag',KSTARkeywrdall,'exact'); -KSTARsig.ircont=strmatch('rcont',KSTARkeywrdall,'exact'); -KSTARsig.izcont=strmatch('zcont',KSTARkeywrdall,'exact'); -KSTARsig.ivol=strmatch('vol',KSTARkeywrdall,'exact'); -KSTARsig.iqrho=strmatch('qrho',KSTARkeywrdall,'exact'); -KSTARsig.iq95=strmatch('q95',KSTARkeywrdall,'exact'); -KSTARsig.ikappa=strmatch('kappa',KSTARkeywrdall,'exact'); -KSTARsig.idelta=strmatch('delta',KSTARkeywrdall,'exact'); -KSTARsig.ideltatop=strmatch('deltatop',KSTARkeywrdall,'exact'); -KSTARsig.ideltabot=strmatch('deltabot',KSTARkeywrdall,'exact'); -KSTARsig.ihalpha=strmatch('halpha',KSTARkeywrdall,'exact'); -KSTARsig.in1=strmatch('n1',KSTARkeywrdall,'exact'); -KSTARsig.in2=strmatch('n2',KSTARkeywrdall,'exact'); -KSTARsig.ineint=strmatch('neint',KSTARkeywrdall,'exact'); -KSTARsig.ine=strmatch('ne',KSTARkeywrdall,'exact'); -KSTARsig.ite=strmatch('te',KSTARkeywrdall,'exact'); -KSTARsig.inerho=strmatch('nerho',KSTARkeywrdall,'exact'); -KSTARsig.iterho=strmatch('terho',KSTARkeywrdall,'exact'); -KSTARsig.isxr=strmatch('sxr',KSTARkeywrdall,'exact'); -KSTARsig.isxR=strmatch('sxR',KSTARkeywrdall,'exact'); -KSTARsig.iece=strmatch('ece',KSTARkeywrdall,'exact'); - -% For each keyword, specify which case to use. As most common is 'simplereaddata', fill in with this and change -% only indices needed. Usually use name of case same as keyword name -KSTARkeywrdcase=cell(size(KSTARkeywrdall)); -KSTARkeywrdcase(:)={'simplereaddata'}; -KSTARkeywrdcase(KSTARsig.iqrho)=KSTARkeywrdall(KSTARsig.iqrho); % special as efit q on psi -KSTARkeywrdcase(KSTARsig.idelta)=KSTARkeywrdall(KSTARsig.idelta); % special as average of triu and tril -KSTARkeywrdcase(KSTARsig.ine)=KSTARkeywrdall(KSTARsig.ine); % special as adds error bars -KSTARkeywrdcase(KSTARsig.ite)=KSTARkeywrdall(KSTARsig.ite); % idem -KSTARkeywrdcase(KSTARsig.inerho)=KSTARkeywrdall(KSTARsig.inerho); % idem -KSTARkeywrdcase(KSTARsig.iterho)=KSTARkeywrdall(KSTARsig.iterho); % idem -KSTARkeywrdcase(KSTARsig.isxr)=KSTARkeywrdall(KSTARsig.isxr); -KSTARkeywrdcase(KSTARsig.isxR)=KSTARkeywrdall(KSTARsig.isxR); -KSTARkeywrdcase(KSTARsig.iece)=KSTARkeywrdall(KSTARsig.iece); - -% Information about which dimension has time, always return 2D data as (x,t) array -% as most are 1D arrays with time as first index, fill in with ones and change only those needed -KSTARsigtimeindx=ones(size(KSTARkeywrdall)); - -% For the 'simplereaddata' cases, we need the full node in case gdat was called with full location directly -% for the other cases, leave this location empty -KSTARsiglocation=cell(2,size(KSTARkeywrdall,2)); -KSTARsiglocation(:)={''}; -KSTARsiglocation(:,KSTARsig.iip)={'ppf'; 'efit/xip'}; -KSTARsiglocation(:,KSTARsig.izmag)={'ppf'; 'efit/zmag'}; -KSTARsiglocation(:,KSTARsig.irmag)={'ppf'; 'efit/rmag'}; -KSTARsiglocation(:,KSTARsig.ircont)={'ppf' ; 'efit/rbnd'}; KSTARsigtimeindx(KSTARsig.ircont)=2; -KSTARsiglocation(:,KSTARsig.izcont)={'ppf' ; 'efit/zbnd'}; KSTARsigtimeindx(KSTARsig.izcont)=2; -KSTARsiglocation(:,KSTARsig.ivol)={'ppf'; 'equi/vol'}; -KSTARsiglocation(:,KSTARsig.iq95)={'ppf'; 'efit/q95'}; -KSTARsiglocation(:,KSTARsig.ikappa)={'ppf'; 'efit/elon'}; -KSTARsiglocation(:,KSTARsig.ideltatop)={'ppf'; 'efit/triu'}; -KSTARsiglocation(:,KSTARsig.ideltabot)={'ppf'; 'efit/tril'}; -KSTARsiglocation(:,KSTARsig.ihalpha)={'jpf'; 'dd/s3-ad35'}; -KSTARsiglocation(:,KSTARsig.in1)={'jpf'; 'da/c1-g101'}; -KSTARsiglocation(:,KSTARsig.in2)={'jpf'; 'da/c1-g102'}; -KSTARsiglocation(:,KSTARsig.ineint)={'ppf'; 'kg1v/lid3'}; - -% initialize order of substructures and allows just a "return" if data empty -trace.data=[]; -trace.x=[]; -trace.t=[]; -trace.dim=[]; -trace.dimunits=[]; -trace.name=[]; - -% find index of signal called upon -if size(data_type_eff,1)==2 - % in case node name was given in 2 parts directly (as old way) - ii1=strmatch(data_type_eff(1),KSTARsiglocation(1,:),'exact'); - iiindex=strmatch(data_type_eff_noext,KSTARsiglocation(2,ii1),'exact'); - if ~isempty(iiindex) - index=ii1(iiindex); - else - index=[]; - end - if isempty(index) -% $$$ disp('********************') -% $$$ disp('trace not yet registered.') -% $$$ disp('If standard data, ask andrea.scarabosio@epfl.ch or olivier.sauter@epfl.ch to create a keyqord entry for this data') -% eval(['!mail -s ''' data_type_eff{1} ' ' data_type_eff{2} ' ' num2str(shot) ' ' ... -% getenv('USER') ' KSTAR'' olivier.sauter@epfl.ch < /dev/null']) - disp('********************') - % temporarily add entry in arrays, so can work below - index=length(KSTARkeywrdall)+1; - KSTARkeywrdall(end+1)={'new'}; - KSTARkeywrdcase(end+1)={'simplereaddata'}; - KSTARsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; - KSTARsigtimeindx(end+1)=0; - elseif ~strcmp(KSTARkeywrdcase{index},'simplereaddata') - msgbox(['Problem in loadKSTARdata with data_type_eff = ' char(data_type_eff(end)) ... - '. Full paths of nodes should only be for case simplereaddata'],'in loadKSTARdata','error') - error('in loadKSTARdata') - end -else - index=strmatch(data_type_eff_noext,KSTARkeywrdall,'exact'); - if isempty(index) - disp(' ') - disp('********************') - if iscell(data_type_eff) - disp(['no such keyword: ' data_type_eff{1} '/' data_type_eff{2}]) - else - disp(['no such keyword: ' data_type_eff]) - end - disp(' ') - disp('Available keywords:') - KSTARkeywrdall(:) - disp('********************') - return - end -end -disp(' ') -if iscell(data_type_eff) - disp(['loading' ' ' data_type_eff{1} '/' data_type_eff{2} ' from KSTAR shot #' num2str(shot)]); -else - disp(['loading' ' ' data_type_eff ' from KSTAR shot #' num2str(shot)]); -end -disp(['case ' KSTARkeywrdcase{index}]) -disp(' ') -switch KSTARkeywrdcase{index} - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'simplereaddata' - - ppftype=KSTARsiglocation{1,index}; - if i_efitm; - tracename=['eftm' KSTARsiglocation{2,index}(5:end) name_ext]; - else - tracename=[KSTARsiglocation{2,index} name_ext]; - end - ij=find(tracename~=''''); - tracename=tracename(ij); - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - switch tracename - case {'efit/btpd','efit/btpd?uid=jetppf+seq=0'} - if isempty(a) | isempty(t); - disp('data or t empty, assumes means btpd not defined'); - [xip,x,t,d,e]=rda_eff(shot,'ppf','efit/xip'); - shot_mg3_list=[47274 47275 47276 47280 47281 47282 47283 47284 47285 47286 47287 47290 47295 47296 47301]; - if isempty(find(shot_mg3_list==shot)) - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','efit/wdia'); - else - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','mg3/wpd'); - wdia=interp1(t1,wdia,t); - end - [rgeo,x3,t3,d,e]=rda_eff(shot,'ppf','efit/rgeo'); - a=2.122e6 .* wdia ./xip.^2 ./ rgeo; - end - case {'efit/btnd','efit/btnd?uid=jetppf+seq=0'} - if isempty(a) | isempty(t); - disp('data or t empty, assumes means btnd not defined'); - [xip,x,t,d,e]=rda_eff(shot,'ppf','efit/xip'); - shot_mg3_list=[47274 47275 47276 47280 47281 47282 47283 47284 47285 47286 47287 47290 47295 47296 47301]; - if isempty(find(shot_mg3_list==shot)) - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','efit/wdia'); - else - [wdia,x1,t1,d,e]=rda_eff(shot,'ppf','mg3/wpd'); - wdia=interp1(t1,wdia,t); - end - [rgeo,x3,t3,d,e]=rda_eff(shot,'ppf','efit/rgeo'); - [cr0,x3,t3,d,e]=rda_eff(shot,'ppf','efit/cr0'); - [bvac,x3,t3,d,e]=rda_eff(shot,'ppf','efit/bvac'); - [volm,x3,t3,d,e]=rda_eff(shot,'ppf','efit/volm'); - a=56.605.*wdia.*cr0.*rgeo./xip./volm./bvac; - end - - case {'LIDR/Z','lidr/z','Lidr/Z','LIDR/Z?uid=jetppf+seq=0'} - % 1D but vs R instead of t - x=t; - t=[]; - - end - - trace.data=a; - trace.x=x; - trace.t=t; - clear error - error=e; - if length(size(trace.data))==1 | (length(size(trace.data))==2 & size(trace.data,2)==1) - trace.dim=[{trace.t}]; - trace.dimunits={'time [s]'}; - elseif length(size(trace.data))==2 - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'R [m] or rho=sqrt(psi_norm)'} ; {'time [s]'}]; - else - disp('how to deal with 3D arrays?') - trace.dim=[{trace.x} ; {trace.t} ; {d}]; - trace.dimunits=[{'R [m] or rho=sqrt(psi_norm)'} ; {'time [s]'} ; {'d'}]; - trace.d=d; - end - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case KSTARkeywrdall{KSTARsig.iqrho} - % q profile on sqrt(psi_norm) - ppftype='ppf'; - if i_efitm - tracename=['eftm/q' name_ext]; - else - tracename=['efit/q' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=sqrt(x); % x is psi (? to test) - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'sqrt(\psi)'} ; {'time [s]'}]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case KSTARkeywrdall{KSTARsig.idelta} - % average of delatop and deltabot - ppftype='ppf'; - tracename1=['efit/triu' name_ext]; - tracename2=['efit/tril' name_ext]; - [a1,x,t,d,e]=rda_eff(shot,ppftype,tracename1); - [a2,x,t,d,e]=rda_eff(shot,ppftype,tracename2); - trace.data=0.5.*(a1+a2); - trace.x=x; - trace.t=t; - trace.dim=[{trace.t}]; - trace.dimunits=[{'time [s]'}]; - trace.name=[ppftype '/' num2str(shot) '/efit/0.5(triu+tril)']; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {KSTARkeywrdall{KSTARsig.ine} , KSTARkeywrdall{KSTARsig.ite}} - % ne, te raw data from LIDR vs R,t. Add error bars - ppftype='ppf'; - if strcmp(KSTARkeywrdcase{index},KSTARkeywrdall{KSTARsig.ine}) - tracename=['LIDR/NE' name_ext]; - else - tracename=['LIDR/TE' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=x; - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'R [m]'} ; {'time [s]'}]; - trace.std=[]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {KSTARkeywrdall{KSTARsig.inerho} , KSTARkeywrdall{KSTARsig.iterho}} - % ne, te on rho mesh. use lid2, thus need chain2 to have been run. Add error bars - ppftype='ppf'; - if strcmp(KSTARkeywrdcase{index},KSTARkeywrdall{KSTARsig.inerho}) - tracename=['LID2/NEO' name_ext]; - else - tracename=['LID2/TEO' name_ext]; - end - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - trace.data=a; - trace.x=x; - trace.t=t; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'rho=sqrt(psi)'} ; {'time [s]'}]; - trace.std=[]; - trace.name=[ppftype '/' num2str(shot) '/' tracename]; - error=e; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'sxr','sxR'} - % LOAD MULTI CHANNEL DATA - % load KSTAR soft x-ray data - % parameters needed for correct convertion of KSTAR Sxr data - vconvert= [1.379 1.311 1.249 1.191 1.139 1.093 1.049 ... - 1.011 0.975 0.945 0.917 0.893 0.873 0.856 ... - 0.842 0.829 0.821 0.815 0.821 0.829 0.842 ... - 0.856 0.873 0.894 0.918 0.946 0.976 1.012 ... - 1.050 1.094 1.141 1.193 1.251 1.313 1.382]; - rconvert= [3.45 3.43 3.41 3.37 3.33 3.28 3.23 3.18 3.14 ... - 3.09 3.05 3.00 2.94 2.89 2.83 2.77 2.72 2.68 2.63 ... - 2.59 2.55 2.49 2.44 2.40 2.37 2.33 2.29 2.26 2.23 ... - 2.19 2.14 2.12 2.10 2.08 2.06]; - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=24; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi-starti+1,1); - end - trace.t=[]; - trace.x=[]; - iloaded_data=0; - for i=starti:endi - % Read channels from lowchannel to upchannel if necessary - if status(i)==1 - iloaded_data=iloaded_data+1; - % Status=1 => Not Read Yet - % vertical SXR chords - ppftype='jpf'; - tracename=['db/j3-sxr<v' num2str(i) '/1' name_ext]; - if shot<48000 - tracename=['db/j3-sxr<t' num2str(i) '/1' name_ext]; - disp('Using T camera: Radius data probably wrong') - end - a=which('jpfdat'); - if isempty(a) - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - % Convert from raw sxr data to W/m^2 - % EDIT: on KSTAR a is not empty on error - if ~isempty(a) - if ~isempty(t) - trace.data(i,:) = a * vconvert(i); - trace.t=t; - if ~isempty(x) - trace.x(i,:)=x; - end - end - error=e; - end - else - disp(['Reading channel ' tracename]); - [a, t, nwds, title, unit, ier] = jpfdat(tracename, shot); - if ~ier - % Convert from raw sxr data to W/m^2 - trace.data(i,:) = a' * vconvert(i); - trace.t=t'; - end - end - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.name=[ 'jpf/' num2str(shot) '/' 'db/j3-sxr<vXX' '/1' name_ext]; - end - end - if isempty(trace.t) - disp(['no data in ' trace.name]) - return - end - % calculating intersection of the view lines with magnetics axis - if strcmp(data_type_eff_noext,'sxR') - if iloaded_data>0 - if nargin>=5 & ~isempty(varargin{3}) - zmag=varargin{3}; - else - zmag=loadKSTARdata(shot,'zmag'); - end - zmageff=interp1(zmag.t,zmag.data,trace.t); - for i=starti:endi - radius.data(i,:)=2.848 + (2.172-zmageff') .* tan(-5.0/180.*3.14159 - atan2(0.99.*(i-18),35.31)); - end - iii=0; - if nargin>=8 & ~isempty(varargin{6}) - iii=str2num(varargin{6}); - end - if iii==1 - for i=starti:endi - radius.data(i,:)=rconvert(i); - end - disp('uses B. Alper fixed R array for SXR R intersection') - end - radius.t=t; - varargout{1}={radius}; - trace.R=radius.data; - else - varargout{1}={struct([])}; - trace.R=[]; - end - end - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'ece' - if nargin>=3 & ~isempty(varargin{1}) - starti=varargin{1}(1); - endi=varargin{1}(2); - else - starti=1; - endi=24; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(endi,1); - end - % Read channels from lowchannel to upchannel if necessary - for i=starti:endi - if status(i)==1 - % ECE, te0 - % Status=1 => Not Read Yet - ppftype='ppf'; - tracename=['kk3/te' num2str(i,'%2.2d') name_ext]; - disp(tracename) - a=which('ppfread'); - if isempty(a) | ~isempty(name_ext) - [a,x,t,d,e]=rda_eff(shot,ppftype,tracename); - if isempty(a) & size(trace.data,2)>1 - trace.data(i,:)=NaN; - else - trace.data(i,:)=a; - trace.t=t; - end - if ~isempty(x); trace.x(i,:)=x'; end; - error=e; - else - [a,x,t,unitd,unitx,unitt,comment,sequence,e]= ... - ppfread(shot,'KK3',['TE' num2str(i,'%2.2d')]); - if isempty(a) & size(trace.data,2)>1 - trace.data(i,:)=NaN; - else - trace.data(i,:)=a'; - trace.t=t'; - end - if ~isempty(x); trace.x(i,:)=x; end; - error=e; - end - - ppftypeR='ppf'; - tracenameR=['kk3/rc' num2str(i,'%2.2d') name_ext]; - a=which('ppfdat'); - if isempty(a) | ~isempty(name_ext) - [a,x,t,d,e]=rda_eff(shot,ppftypeR,tracenameR); - if isempty(a) & size(trace.data,2)>1 - radius.data(i,:)=NaN; - else - radius.data(i,:)=a; - radius.t=t; - radius.x=x; - end - else - [a,x,t,unitd,unitx,unitt,comment,sequence,e]= ... - ppfread(shot,'KK3',['RC' num2str(i,'%2.2d')]); - if isempty(a) & size(trace.data,2)>1 - radius.data(i,:)=NaN; - else - radius.data(i,:)=a'; - radius.t=t'; - radius.x=x'; - end - end - end - end - trace.dim=[{[starti:endi]'} ; {trace.t}]; - trace.dimunits=[{'channels'} ; {'time [s]'}]; - trace.name=[ 'ppf/' num2str(shot) '/' 'kk3/teXX' name_ext ]; - if exist('radius') - varargout={{radius}}; - for i=starti:endi - trace.R(i,:)=interp1(radius.t,radius.data(i,:),trace.t); - end - else - varargout={{struct([])}}; - trace.R=[]; - end - - otherwise - disp('case not yet defined') - -end diff --git a/crpptbx_new/TCV/VsxrTCVradius.m b/crpptbx_new/TCV/VsxrTCVradius.m deleted file mode 100644 index 38f1ce9f..00000000 --- a/crpptbx_new/TCV/VsxrTCVradius.m +++ /dev/null @@ -1,24 +0,0 @@ -function radius=VsxrTCVradius(ymag,xchord,ychord) - -% get intersection of magnetics axis with chords -% input: -% Vsawtooth.shot : shot number -% Vsawtooth.expdata.zmag : positions of the magnetic a -% xchord: two x-coordinates. -% ychord: two y-coordinates. -% For each line (2xnl), they specify start + end pointsxis - -% Output : -% Vsxr.radius : intersectionof magnetics axis with chords - -%parameter: start and end of each of the camera number 2 - - -% calculation intersections -xchord=xchord/100; -ychord=ychord/100; -for i=1:size(xchord,2) - a=(ychord(1,i)-ychord(2,i))/(xchord(1,i)-xchord(2,i)); - b=ychord(2,i)-a*xchord(2,i); - radius(:,i)= (ymag-b)/(a+eps); -end diff --git a/crpptbx_new/TCV/ece_te.m b/crpptbx_new/TCV/ece_te.m deleted file mode 100755 index 32f05aa0..00000000 --- a/crpptbx_new/TCV/ece_te.m +++ /dev/null @@ -1,67 +0,0 @@ -function [TE_ECE,TE_ECE_ERR,RHO,R,T,TE_THOM,TE_THOM_ERR,Fcentral,CAL,NE_THOM]=ece_te(shot,Tc,T,SS) - -% [TE_ECE,TE_ECE_ERR,RHO,R,T,TE_THOM,TE_THOM_ERR,Fcentral,CAL,NE_THOM]=ece_te(shot,Tc,T,SS) -% [TE_ECE,TE_ECE_ERR,RHO,R,T,TE_THOM,TE_THOM_ERR,Fcentral,CAL,NE_THOM]=ece_te(19314,[0.1 0.29],[0 1.5],10); -% -% Program that compute TE_ECE and TE_THOM profile over R or RHO -% for all the times T with the error matrices TE_ECE_ERR and TE_THOM_ERR. -% The calibration matrice CAL comes from the ece_calib.m program. -% Fcentral is the central frequency of the ECE working channels. -% -% shot = shot number -% Tc = [a b] temporal boundary on which we want the calibration on -% thomson temperature. If you have no idea, put Tc=[0.1 0.29] -% T = either -% -temporal vector -% -if T=10 => takes all the ECE times -% -if T=[c d];=> c and d are the temporal boundary for the output -% SS >= 1 => sampling rate SS if T=10 or T=[c d] -% -% B est calcule avec la routine BandBres_allt de O.Sauter -% -% Blanchard 25.11.2000 - - -%----------------------------------------------------------------------- -% Recherche de la configuration de l'ECE -%----------------------------------------------------------------------- -[RHOece,Rece,Zece,Tece,Fcentralrho]=ece_rho(shot,T); -[CAL,Fcentral]=ece_calib(shot,Tc); - -%----------------------------------------------------------------------- -% Recherches des signaux voulus -%----------------------------------------------------------------------- -[ECE,TECE,Fcentral]=ece_raw_signals(shot,T,SS); -%[RHOece,Rece,Zece,Tece, Fcentralrho]=ece_rho(shot,T); -%Zece=Zece*ones(size(Rece)); -[TEthom,NEthom,TEerr,NEerr,Tthom,RHOthom]=thom_rho(shot,6); -if exist('TEthom')==0|length(TEthom) ==0 - disp('Le profil Thomson proffit n''existe pas. On prend le profil direct') %(Tthom,Nbre de pts selon rho) - - [TEthom,NEthom,TEerr,NEerr,Tthom,RHOthom]=thom_rho(shot,3); %(Tthom,Nbre de pts selon rho) -end -[t2,i3,i4]=common_ece(Fcentralrho,Fcentral); -Rece=Rece(i3,:);Zece=Zece(i3,:);RHOece=RHOece(i3,:); -TE_ECE=ECE.*repmat(CAL(2,:),length(TECE),1); -T=repmat(TECE,1,length(Fcentral)); -if length(Tece)==1 - RHO=repmat(RHOece,1,length(TECE));RHO=RHO'; - R=repmat(Rece,1,length(TECE));R=R'; - X=size(RHOthom); -else - %RHO=interp2(repmat(Fcentral,1,length(Tece))',repmat(Tece,length(Fcentral),1)', ... - % RHOece',repmat(Fcentral',length(TECE),1)',T'); - RHO=interp2(repmat(Fcentral,1,length(Tece))',repmat(Tece',length(Fcentral),1)', ... - RHOece',repmat(Fcentral',length(TECE),1)',T'); - RHO=RHO'; - R=interp2(repmat(Fcentral,1,length(Tece))',repmat(Tece',length(Fcentral),1)', ... - Rece',repmat(Fcentral',length(TECE),1),T); -end - -X=size(RHOthom); -TE_THOM=griddata(repmat(Tthom,1,X(2)),RHOthom,TEthom,T,RHO); -NE_THOM=griddata(repmat(Tthom,1,X(2)),RHOthom,NEthom,T,RHO); -TE_THOM_ERR=griddata(repmat(Tthom,1,X(2)),RHOthom,TEerr,T,RHO); -TE_ECE_ERR=CAL(4,:);T=T(:,1); - - diff --git a/crpptbx_new/TCV/gdat_tcv.m b/crpptbx_new/TCV/gdat_tcv.m deleted file mode 100644 index 269a3fb2..00000000 --- a/crpptbx_new/TCV/gdat_tcv.m +++ /dev/null @@ -1,1170 +0,0 @@ -function [gdat_data,gdat_params,error_status,varargout] = gdat_tcv(shot,data_request,varargin) -% -% function [gdat_data,gdat_params,error_status,varargout] = gdat(shot,data_request,varargin) -% -% Aim: get data from a given machine using full path or keywords. -% data_request are and should be case independent (transformed in lower case in the function and outputs) -% -% If no inputs are provided, return the list of available pre-defined data_request in gdat_data and default parameters gdat_params -% -% Inputs: -% -% no inputs: return default parameters in a structure form in gdat_params -% shot: shot number -% data_request: keyword (like 'ip') or trace name or structure containing all parameters but shot number -% varargin{i},varargin{i+1},i=1:nargin-2: additional optional parameters given in pairs: param_name, param_value -% The optional parameters list might depend on the data_request -% examples of optional parameters: -% 'plot',1 (plot is set by default to 0) -% 'machine','TCV' (the default machine is the local machine) -% -% -% Outputs: -% -% gdat_data: structure containing the data, the time trace if known and other useful information -% gdat_data.t : time trace -% gdat_data.data: requested data values -% gdat_data.dim : values of the various coordinates related to the dimensions of .data(:,:,...) -% note that one of the dim is the time, replicated in .t for clarity -% gdat_data.dimunits : units of the various dimensions, 'dimensionless' if dimensionless -% gdat_data.error_bar : if provided -% gdat_data.gdat_call : list of parameters provided in the gdat call (so can be reproduced) -% gdat_data.shot: shot number -% gdat_data.machine: machine providing the data -% gdat_data.gdat_request: keyword for gdat if relevant -% gdat_data.data_fullpath: full path to the data node if known and relevant, or expression, or relevant function called if relevant -% gdat_data.gdat_params: copy gdat_params for completeness -% gdat_data.xxx: any other relevant information -% -% -% Examples: -% (should add working examples for various machines (provides working shot numbers for each machine...)) -% -% [a1,a2]=gdat; -% a2.data_request = 'Ip'; -% a3=gdat(48836,a2); % gives input parameters as a structure, allows to call the same for many shots -% a4=gdat('opt1',123,'opt2',[1 2 3],'shot',48832,'data_request','Ip','opt3','aAdB'); % all in pairs -% a5=gdat(48836,'ip'); % standard call -% a6=gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc'); % standard call with a few options (note all lowercase in output) - -% -% Comments for local developer: -% This gdat is just a "header routine" calling the gdat for the specific machine gdat_`machine`.m which can be called -% directly, thus which should be able to treat the same type of input arguments -% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Prepare some variables, etc - -varargout{1}=cell(1,1); -error_status=1; -nverbose = 1; - -% construct default parameters structure -gdat_params.data_request = ''; -default_machine = 'tcv'; - -gdat_params.machine=default_machine; -gdat_params.doplot = 0; -gdat_params.liuqe = 1; - -% construct list of keywords from global set of keywords and specific TCV set -% get data_request names from centralized function -data_request_names = get_data_request_names; -% add TCV specific to all: -if ~isempty(data_request_names.tcv) - tcv_names = fieldnames(data_request_names.tcv); - for i=1:length(tcv_names) - data_request_names.all.(tcv_names{i}) = data_request_names.tcv.(tcv_names{i}); - end -end -data_request_names_all = fieldnames(data_request_names.all); - -% $$$ data_request_names_all= [{'ip'} {'b0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ... -% $$$ {'delta'} {'deltatop'} {'deltabot'} {'neint'} {'nel'} ... -% $$$ {'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... -% $$$ {'neft'} {'teft'} {'neftav'} {'teftav'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} ... -% $$$ {'sxr'} {'sxr'} {'ece'} {'mpx'} {'ioh'} {'vloop'} {'pgyro'} {'jtor'} {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'ti'} {'tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}]; - -% construct default output structure -gdat_data.data = []; -gdat_data.units = []; -gdat_data.dim = []; -gdat_data.dimunits = []; -gdat_data.t = []; -gdat_data.x = []; -gdat_data.shot = []; -gdat_data.gdat_request = []; -gdat_data.gdat_params = gdat_params; -gdat_data.data_fullpath = []; - - -% Treat inputs: -ivarargin_first_char = 3; -data_request_eff = ''; -if nargin>=2 && ischar(data_request); data_request = lower(data_request); end - -gdat_data.gdat_request = data_request_names_all; % so if return early gives list of possible request names -% no inputs -if nargin==0 - % return defaults and list of keywords - return -end - -do_mdsopen_mdsclose = 1; -% treat 1st arg -if nargin>=1 - if isempty(shot) - % means mdsopen(shot) already performed - shot = mdsipmex(2,'$SHOT'); - gdat_data.shot = shot; - do_mdsopen_mdsclose = 0; - elseif isnumeric(shot) - gdat_data.shot = shot; - elseif ischar(shot) - ivarargin_first_char = 1; - else - warning('type of 1st argument unexpected, should be numeric or char') - error_status=2; - return - end - if nargin==1 - % Only shot number given. If there is a default data_request set it and continue, otherwise return - return - end -end -% 2nd input argument if not part of pairs -if nargin>=2 && ivarargin_first_char~=1 - if isempty(data_request) - return - end - % 2nd arg can be a structure with all options except shot_number, or a string for the pathname or keyword, or the start of pairs string/value for the parameters - if isstruct(data_request) - if ~isfield(data_request,'data_request') - warning('expects field data_request in input parameters structure') - error_status=3; - return - end - data_request.data_request = lower(data_request.data_request); - data_request_eff = data_request.data_request; - gdat_params = data_request; - else - % since data_request is char check from nb of args if it is data_request or a start of pairs - if mod(nargin-1,2)==0 - ivarargin_first_char = 2; - else - ivarargin_first_char = 3; - data_request_eff = data_request; - end - end -end - -if ~isstruct(data_request) - gdat_params.data_request = data_request_eff; -end - -% if start pairs from shot or data_request, shift varargin -if ivarargin_first_char==1 - varargin_eff{1} = shot; - varargin_eff{2} = data_request; - varargin_eff(3:nargin) = varargin(:); -elseif ivarargin_first_char==2 - varargin_eff{1} = data_request; - varargin_eff(2:nargin-1) = varargin(:); -else - varargin_eff(1:nargin-2) = varargin(:); -end - -% extract parameters from pairs of varargin: -if (nargin>=ivarargin_first_char) - if mod(nargin-ivarargin_first_char+1,2)==0 - for i=1:2:nargin-ivarargin_first_char+1 - if ischar(varargin_eff{i}) - % enforce lower case for any character driven input - if ischar(varargin_eff{i+1}) - gdat_params.(lower(varargin_eff{i})) = lower(varargin_eff{i+1}); - else - gdat_params.(lower(varargin_eff{i})) = varargin_eff{i+1}; - end - else - warning(['input argument nb: ' num2str(i) ' is incorrect, expects a character string']) - error_status=401; - return - end - end - else - warning('number of input arguments incorrect, cannot make pairs of parameters') - error_status=402; - return - end -end -data_request_eff = gdat_params.data_request; % in case was defined in pairs - -% if it is a request_keyword copy it: -ij=strmatch(data_request_eff,data_request_names_all,'exact'); -if ~isempty(ij); - gdat_data.gdat_request = data_request_names_all{ij}; - if isfield(data_request_names.all.(data_request_names_all{ij}),'description') && ~isempty(data_request_names.all.(data_request_names_all{ij}).description) - % copy description of keyword - gdat_data.request_description = data_request_names.all.(data_request_names_all{ij}).description; - end -end - -% special treatment if shot and data_request given within pairs -if isfield(gdat_params,'shot') - shot = gdat_params.shot; % should use only gdat_params.shot but change shot to make sure - gdat_data.shot = gdat_params.shot; - gdat_params=rmfield(gdat_params,'shot'); -end -if ~isfield(gdat_params,'data_request') || isempty(gdat_params.data_request) - % warning('input for ''data_request'' missing from input arguments') % might be correct, asking for list of requests - error_status=5; - return -end -gdat_data.gdat_params = gdat_params; - -% re-assign main variables to make sure use the one in gdat_data structure -shot = gdat_data.shot; -data_request_eff = gdat_data.gdat_params.data_request; -error_status = 6; % at least reached this level - -liuqe_version = 1; -if isfield(gdat_data.gdat_params,'liuqe') && ~isempty(gdat_data.gdat_params.liuqe) - liuqe_version = gdat_data.gdat_params.liuqe; -end -substr_liuqe = ''; -if liuqe_version==2 || liuqe_version==3 - substr_liuqe = ['_' num2str(liuqe_version)]; -end - -% special treatment for model shot=-1 or preparation shot >=100'000 -begstr = ''; -if shot==-1 || shot>=100000 - % requires FBTE - liuqe_version = -1; - begstr = 'tcv_eq( "'; - substr_liuqe = '", "FBTE" )'; -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Specifications on how to get the data provided in tcv_requests_mapping -mapping_for_tcv = tcv_requests_mapping(data_request_eff); -gdat_data.label = mapping_for_tcv.label; - -ishot=NaN; -if do_mdsopen_mdsclose - % mdsdefaultserver tcv1.epfl.ch; % should be in tcv general path, but set-it in the meantime... - if liuqe_version==-1 - ishot = mdsopen('pcs', shot); - else - ishot = mdsopen(shot); % if ishot equal to shot, then mdsclose at the end - end - if ishot~=shot - warning(['cannot open shot= ' num2str(shot)]) - return - end -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% 1st treat the simplest method: "tdi" (and tdiliuqe) -if strcmp(mapping_for_tcv.method(1:3),'tdi') - % need to treat liuqe2, model, etc from options.... - substr_tdi = ''; - if strcmp(mapping_for_tcv.method,'tdiliuqe'); substr_tdi = substr_liuqe; end - if iscell(mapping_for_tcv.expression) - if length(mapping_for_tcv.expression)>0 - % series of arguments for tdi given in each cell - eval_expr = ['tdi(''' mapping_for_tcv.expression{1} substr_tdi '''']; - for i=2:length(mapping_for_tcv.expression) - eval_expr = [eval_expr ',''' mapping_for_tcv.expression{i} '''']; - end - eval_expr = [eval_expr ');']; - aatmp = eval(eval_expr); - else - % empty or wrong expression - error_status=701; - return - end - else - if liuqe_version==-1 - mapping_for_tcv_expression_eff = mapping_for_tcv.expression; - if strcmp(lower(mapping_for_tcv.expression(1:8)),'\results') - mapping_for_tcv_expression_eff = mapping_for_tcv.expression(11:end); - end - eval_expr = ['tdi(''' begstr mapping_for_tcv_expression_eff substr_liuqe ''');'] - else - eval_expr = ['tdi(''' mapping_for_tcv.expression substr_tdi ''');']; - end - aatmp=eval(eval_expr); - end - if isempty(aatmp.data) || isempty(aatmp.dim) % || ischar(aatmp.data) (to add?) - if (nverbose>=3); warning(['problems loading data for ' eval_expr ' for data_request= ' data_request_eff]); end - return - end - gdat_data.data = aatmp.data; - gdat_data.dim = aatmp.dim; - nbdims = length(gdat_data.dim); - if mapping_for_tcv.timedim==-1; - mapping_for_tcv.timedim = nbdims; - if (size(gdat_data.data,nbdims)==1 && nbdims>1); mapping_for_tcv.timedim = nbdims-1; end - end - dim_nontim = setdiff([1:nbdims],mapping_for_tcv.timedim); - if ~isempty(dim_nontim) - % since most cases have at most 2d, copy as array if data is 2D and as cell if 3D or more - if length(dim_nontim)==1 - gdat_data.x = gdat_data.dim{dim_nontim(1)}; - else - gdat_data.x = gdat_data.dim(dim_nontim); - end - end - gdat_data.t = gdat_data.dim{mapping_for_tcv.timedim}; - gdat_data.units = aatmp.units; - gdat_data.dimunits = aatmp.dimunits; - if mapping_for_tcv.gdat_timedim>0 && mapping_for_tcv.gdat_timedim ~= mapping_for_tcv.timedim - % shift timedim to gdat_timedim data(i,j,...itime,k,...) -> data(i,inewtime,j,...,k,...) - % note that this means that gdat_data.x and gdat_data.t are same and correct, - % only .data, .dim and .dimunits need to be changed - iprev=[1:nbdims]; - ij=find(dim_nontim>mapping_for_tcv.gdat_timedim-1); - inew=[1:mapping_for_tcv.gdat_timedim-1 mapping_for_tcv.timedim dim_nontim(ij)]; - data_sizes = size(aatmp.data); - gdat_data.data = NaN*ones(data_sizes(inew)); - abcol=ones(1,nbdims)*double(':'); abcomma=ones(1,nbdims)*double(','); - dimstr_prev=['(' repmat(':,',1,mapping_for_tcv.timedim-1) 'it,' ... - repmat(':,',1,nbdims-mapping_for_tcv.timedim-1) ':)']; - dimstr_new=['(' repmat(':,',1,mapping_for_tcv.gdat_timedim-1) 'it,' ... - repmat(':,',1,nbdims-mapping_for_tcv.gdat_timedim-1) ':)']; - % eval gdat_data.data(;,:,...,it,...) = aatmp.data(:,:,:,it,...); - for it=1:size(aatmp.data,mapping_for_tcv.timedim) - shift_eval = ['gdat_data.data' dimstr_new ' = aatmp.data' dimstr_prev ';']; - eval(shift_eval); - end - gdat_data.dim = aatmp.dim(inew); - gdat_data.dimunits = aatmp.dimunits(inew); - else - mapping_for_tcv.gdat_timedim = mapping_for_tcv.timedim; - end - gdat_data.data_fullpath=[mapping_for_tcv.expression substr_tdi]; - - % end of method "tdi" - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -elseif strcmp(mapping_for_tcv.method,'expression') - % 2nd: method="expression" - % assume expression contains function to call and which returns a structure into variable gdat_tmp - % we copy the structure, to make sure default nodes are defined and to avoid if return is an closed object like tdi - % eval_expr = [mapping_for_tcv.expression ';']; - eval([mapping_for_tcv.expression ';']); - if isempty(gdat_tmp) || (~isstruct(gdat_tmp) & ~isobject(gdat_tmp)) - warning(['function expression does not return a structure: ' mapping_for_tcv.expression]) - error_status=801; - return - end - tmp_fieldnames = fieldnames(gdat_tmp); - if sum(strcmp(tmp_fieldnames,'data'))==0 % note: cannot do isfield since gdat_tmp might be an object - warning(['function does not return a child name ''data'' for ' data_request_eff]) - end - for i=1:length(tmp_fieldnames) - gdat_data.(tmp_fieldnames{i}) = gdat_tmp.(tmp_fieldnames{i}); - end - % add .t and .x in case only dim is provided - % do not allow shifting of timedim since should be treated in the relevant function - ijdim=find(strcmp(tmp_fieldnames,'dim')==1); - if ~isempty(ijdim) - nbdims = length(gdat_data.dim); - if mapping_for_tcv.timedim==-1; - mapping_for_tcv.timedim = nbdims; - if (size(gdat_data.data,nbdims)==1 && nbdims>1); mapping_for_tcv.timedim = nbdims-1; end - end - dim_nontim = setdiff([1:nbdims],mapping_for_tcv.timedim); - ijt=find(strcmp(tmp_fieldnames,'t')==1); - if isempty(ijt) - gdat_data.t = gdat_data.dim{mapping_for_tcv.timedim}; - end - ijx=find(strcmp(tmp_fieldnames,'x')==1); - if isempty(ijx) - if ~isempty(dim_nontim) - % since most cases have at most 2d, copy as array if data is 2D and as cell if 3D or more - if length(dim_nontim)==1 - gdat_data.x = gdat_data.dim{dim_nontim(1)}; - else - gdat_data.x = gdat_data.dim(dim_nontim); - end - end - end - gdat_data.data_fullpath=mapping_for_tcv.expression; - end - % end of method "function" - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -elseif strcmp(mapping_for_tcv.method,'switchcase') - switch data_request_eff % not lower(...) since data_request_eff should be lower case already at this stage - % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % First the request names valid for "all" machines: - % - case {'a_minor','rgeom'} - % compute average minor or major radius (on z=zaxis normally) - nodenameeff=['\results::r_max_psi' substr_liuqe]; - rmaxpsi=tdi(nodenameeff); - nodenameeff2=['\results::r_min_psi' substr_liuqe]; - rminpsi=tdi(nodenameeff2); - ij=find(rmaxpsi.data<0.5 | rmaxpsi.data>1.2); - if ~isempty(ij); rmaxpsi.data(ij)=NaN; end - ij=find(rminpsi.data<0.5 | rminpsi.data>1.2); - if ~isempty(ij); rminpsi.data(ij)=NaN; end - if strcmp(data_request_eff,'a_minor') - gdat_data.data=0.5.*(rmaxpsi.data(end,:) - rminpsi.data(end,:)); - gdat_data.data_fullpath=[nodenameeff ' - ' nodenameeff2 ' /2']; - elseif strcmp(data_request_eff,'rgeom') - gdat_data.data=0.5.*(rmaxpsi.data(end,:) + rminpsi.data(end,:)); - gdat_data.data_fullpath=[nodenameeff ' + ' nodenameeff2 ' /2']; - else - disp(['should not be in this case with data_request_eff = ' data_request_eff]) - return - end - gdat_data.dim = rmaxpsi.dim(2); - gdat_data.t = gdat_data.dim{1}; - if any(strcmp(fieldnames(rmaxpsi),'units')) - gdat_data.units = rmaxpsi.units; - end - gdat_data.dimunits = rmaxpsi.dimunits(2); - - case {'zgeom'} - % compute average minor or major radius (on z=zaxis normally) - nodenameeff=['\results::z_contour' substr_liuqe]; - zcontour=tdi(nodenameeff); - if strcmp(data_request_eff,'zgeom') - gdat_data.data=0.5.*(max(zcontour.data,[],1) + min(zcontour.data,[],1)); - gdat_data.data_fullpath=['(max+min)/2 of ' nodenameeff]; - gdat_data.dim{1} = zcontour.dim{2}; - gdat_data.dimunits{1} = zcontour.dimunits{2}; - else - disp(['should not be in this case with data_request_eff = ' data_request_eff]) - return - end - gdat_data.t = gdat_data.dim{mapping_for_tcv.gdat_timedim}; - if any(strcmp(fieldnames(zcontour),'units')) - gdat_data.units = zcontour.units; - end - - case {'b0'} - % B0 at R0=0.88 - R0EXP=0.88; - if liuqe_version==-1 - nodenameeff = 'tcv_eq("BZERO","FBTE")'; - tracetdi=tdi(nodenameeff); - gdat_data.data = tracetdi.data; - else - nodenameeff=['\magnetics::iphi']; - tracetdi=tdi(nodenameeff); - gdat_data.data=192.E-07 * 0.996 *tracetdi.data/R0EXP; - end - if isempty(tracetdi.data) || isempty(tracetdi.dim) % || ischar(tracetdi.data) (to add?) - warning(['problems loading data for ' nodenameeff ' for data_request= ' data_request_eff]) - return - end - gdat_data.data_fullpath=[nodenameeff]; - gdat_data.dim = tracetdi.dim; - gdat_data.t = gdat_data.dim{1}; - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.units = tracetdi.units; - end - gdat_data.dimunits = tracetdi.dimunits; - gdat_data.request_description = ['vacuum magnetic field at R0=' num2str(R0EXP) 'm; COCOS=17']; - - case {'betan'} - % 100*beta / |Ip[MA] * B0[T]| * a[m] - % get B0 from gdat_tcv, without re-opening the shot and using the same parameters except data_request - % easily done thanks to structure call for options - params_eff = gdat_data.gdat_params; - params_eff.data_request='b0'; - b0=gdat_tcv([],params_eff); % note: no need to set .doplot=0 since gdat_tcv does not call gdat_plot in any case - params_eff.data_request='ip'; - ip=gdat_tcv([],params_eff); - params_eff.data_request='beta'; - beta=gdat_tcv([],params_eff); - params_eff.data_request='a_minor'; - a_minor=gdat_tcv([],params_eff); - % use beta as time base - if isempty(b0.data) || isempty(b0.dim) || isempty(ip.data) || isempty(ip.dim) || isempty(a_minor.data) || isempty(a_minor.dim) || isempty(beta.data) || isempty(beta.dim) - warning(['problems loading data for ' nodenameeff ' for data_request= ' data_request_eff]) - return - end - gdat_data.dim = beta.dim; - gdat_data.t = beta.dim{1}; - gdat_data.data = beta.data; - ij=find(~isnan(ip.data)); - ip_t = interp1(ip.dim{1}(ij),ip.data(ij),gdat_data.t); - ij=find(~isnan(b0.data)); - b0_t = interp1(b0.dim{1}(ij),b0.data(ij),gdat_data.t); - ij=find(~isnan(a_minor.data)); - a_minor_t = interp1(a_minor.dim{1}(ij),a_minor.data(ij),gdat_data.t); - gdat_data.data = 100.*beta.data ./ abs(ip_t).*1.e6 .* abs(b0_t) .* a_minor_t; - gdat_data.data_fullpath='100*beta/ip*1e6*b0*a_minor, each from gdat_tcv'; - gdat_data.units = ''; - gdat_data.dimunits{1} = 's'; - - case {'cxrs'} - %not yet finished, just started - return - % load typical data from cxrs, Ti, ni, vtori and vpoli (if available), as well as zeff from cxrs - % if 'fit' option is added: 'fit',1, then the fitted profiles are returned - % - sub_nodes = {'Ti','vi_tor','vi_pol','ni','zeff'}; % first node is also copied into data, choose "default' one - % sub_nodes_fit = {'Tifit','vi_torfit','vi_polfit','nifit','zefffit'}; - params_eff = gdat_data.gdat_params; - % use A. Karpushov routine to get profiles and then copy the data or the fitted profiles - param_cxrs.k_plot=0; param_cxrs.k_debug=0; - cxrs_profiles = CXRS_get_profiles(48836,[],[],param_cxrs); - if isfield(params_eff,'fit') && params_eff.fit>0 - sub_nodes_eff = sub_nodes_fit; - else - sub_nodes_eff = sub_nodes; - end - - - gdat_data.dim = beta.dim; - gdat_data.t = beta.dim{1}; - gdat_data.data = beta.data; - ij=find(~isnan(ip.data)); - ip_t = interp1(ip.dim{1}(ij),ip.data(ij),gdat_data.t); - ij=find(~isnan(b0.data)); - b0_t = interp1(b0.dim{1}(ij),b0.data(ij),gdat_data.t); - ij=find(~isnan(a_minor.data)); - a_minor_t = interp1(a_minor.dim{1}(ij),a_minor.data(ij),gdat_data.t); - gdat_data.data = 100.*beta.data ./ abs(ip_t).*1.e6 .* abs(b0_t) .* a_minor_t; - gdat_data.data_fullpath='100*beta/ip*1e6*b0*a_minor, each from gdat_tcv'; - gdat_data.units = ''; - gdat_data.dimunits = beta.dimunits; - - case {'eqdsk'} - % - time=1.; % default time - if isfield(gdat_data.gdat_params,'time') && ~isempty(gdat_data.gdat_params.time) - time = gdat_data.gdat_params.time; - else - disp(['"time" is expected as an option, choose default time = ' num2str(time)]); - end - gdat_data.gdat_params.time = time; - gdat_data.t = time; - zshift = 0.; - if isfield(gdat_data.gdat_params,'zshift') && ~isempty(gdat_data.gdat_params.zshift) - zshift = gdat_data.gdat_params.zshift; - end - gdat_data.gdat_params.zshift = zshift; - for itime=1:length(time) - time_eff = time(itime); - % use read_results updated to effectively obtain an eqdsk with sign correct with COCOS=2 - [fnames_readresults]=read_results_for_chease(shot,time_eff,liuqe_version,3,[],[],[],zshift,0,1); - eqdskval=read_eqdsk(fnames_readresults{4},7,0,[],[],1); % LIUQE is 17 but read_results divided psi by 2pi thus 7 - for i=1:length(fnames_readresults) - unix(['rm ' fnames_readresults{i}]); - end - % transform to cocos=2 since read_results originally assumed it was cocos=2 - cocos_in = 2; - [eqdsk_cocos_in, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdskval,[7 cocos_in]); - fnamefull = fullfile(['/tmp/' getenv('USER')],['EQDSK_' num2str(shot) 't' num2str(time_eff,'%.4f')]); - % We still write COCOS=2 case, since closer to standard (in /tmp) - write_eqdsk(fnamefull,eqdsk_cocos_in,cocos_in,[],[],[],1); - % Now gdat_tcv should return the convention from LIUQE which is COCOS=17, except if specified in option - % create standard filename name from shot, time_eff (cocos will be added by write_eqdsk) - cocos_out = 17; - if isfield(gdat_data.gdat_params,'cocos') && ~isempty(gdat_data.gdat_params.cocos) - cocos_out = gdat_data.gdat_params.cocos; - end - [eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdsk_cocos_in,[cocos_in cocos_out]); - % for several times, use array of structure for eqdsks, - % cannot use it for psi(R,Z) in .data and .x since R, Z might be different at different times, - % so project psi(R,Z) on Rmesh, Zmesh of 1st time - if length(time) > 1 - gdat_data.eqdsk{itime} = write_eqdsk(fnamefull,eqdsk_cocosout,cocos_out); - if itime==1 - gdat_data.data(:,:,itime) = gdat_data.eqdsk{itime}.psi; - gdat_data.dim{1} = gdat_data.eqdsk{itime}.rmesh; - gdat_data.dim{2} = gdat_data.eqdsk{itime}.zmesh; - else - aa=interpos2Dcartesian(gdat_data.eqdsk{itime}.rmesh,gdat_data.eqdsk{itime}.zmesh, ... - gdat_data.eqdsk{itime}.psi,repmat(gdat_data.dim{1}',1,129),repmat(gdat_data.dim{2},129,1),-1,-1); - gdat_data.data(:,:,itime) = aa; - end - else - gdat_data.eqdsk = write_eqdsk(fnamefull,eqdsk_cocosout,cocos_out); - gdat_data.data = gdat_data.eqdsk.psi; - gdat_data.dim{1} = gdat_data.eqdsk.rmesh; - gdat_data.dim{2} = gdat_data.eqdsk.zmesh; - end - end - gdat_data.dim{3} = gdat_data.t; - gdat_data.x = gdat_data.dim(1:2); - gdat_data.data_fullpath=['psi(R,Z) and eqdsk from read_eqdsk from LIUQE' num2str(liuqe_version) ';zshift=' num2str(zshift)]; - gdat_data.units = 'T m^2'; - gdat_data.dimunits = {'m','m','s'}; - gdat_data.request_description = ['data=psi, x=(R,Z), eqdsk contains eqdsk structure with which ' ... - 'plot_eqdsk, write_eqdsk, read_eqdsk can be used']; - - case {'mhd'} - % load n=1, 2 and 3 Bdot from magnetic measurements - n1=tdi('abs(mhdmode("LFS",1,1))'); - n2=tdi('abs(mhdmode("LFS",2,1))'); - n3=tdi('abs(mhdmode("LFS",3,1))'); - if ~isempty(n1.data) - gdat_data.data(:,1) = reshape(n1.data,length(n1.data),1); - if length(n2.data)==length(n1.data); gdat_data.data(:,2) = reshape(n2.data,length(n2.data),1); end - if length(n3.data)==length(n1.data); gdat_data.data(:,3) = reshape(n3.data,length(n3.data),1); end - gdat_data.dim{1} = n1.dim{1}; - gdat_data.t = gdat_data.dim{1}; - gdat_data.dim{2} = [1; 2; 3]; - gdat_data.dimunits{1} = n1.dimunits{1}; - gdat_data.dimunits{2} = 'n number'; - gdat_data.units = 'T/s'; - gdat_data.data_fullpath='abs(mhdmode("LFS",n,1))'; - gdat_data.request_description = 'delta_Bdot from magnetic probes to get n=1, 2 and 3'; - end - - case {'ne','te'} - % ne or Te from Thomson data on raw z mesh vs (z,t) - edge_str_ = ''; - edge_str_dot = ''; - if isfield(gdat_data.gdat_params,'edge') && ~isempty(gdat_data.gdat_params.edge) && ... - gdat_data.gdat_params.edge>0 - edge_str_ = '_edge'; - edge_str_dot = '.edge'; - end - nodenameeff=['\results::thomson' edge_str_dot ':' data_request_eff]; - tracetdi=tdi(nodenameeff); - tracestd=tdi(['\results::thomson' edge_str_dot ':' data_request_eff ':error_bar']); - gdat_data.data=tracetdi.data'; % Thomson data as (t,z) - gdat_data.error_bar=tracestd.data'; - gdat_data.data_fullpath=[nodenameeff]; - % add correct dimensions - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - if strcmp(data_request_eff(1:2),'ne') - tracefirrat_data = get_fir_thom_rat_data(shot,['thomson' edge_str_],time); - gdat_data.data_abs = gdat_data.data * diag(tracefirrat_data); - gdat_data.error_bar_abs = gdat_data.error_bar * diag(tracefirrat_data); - gdat_data.firrat=tracefirrat_data; - gdat_data.data_fullpath=[gdat_data.data_fullpath ' ; _abs includes *firrat']; - end - z=mdsdata('\diagz::thomson_set_up:vertical_pos'); - gdat_data.dim=[{z};{time}]; - gdat_data.dimunits=[{'Z [m]'} ; {'time [s]'}]; - gdat_data.x=z; - gdat_data.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus use fieldnames - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.units=tracetdi.units; - end - - case {'ne_rho', 'te_rho', 'nete_rho'} - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - warning(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' data_request_eff]) - return - end - zshift = 0.; - if isfield(gdat_data.gdat_params,'zshift') && ~isempty(gdat_data.gdat_params.zshift) - zshift = gdat_data.gdat_params.zshift; - else - gdat_data.gdat_params.zshift = zshift; - end - edge_str_ = ''; - edge_str_dot = ''; - if isfield(gdat_data.gdat_params,'edge') && ~isempty(gdat_data.gdat_params.edge) && ... - gdat_data.gdat_params.edge>0 - edge_str_ = '_edge'; - edge_str_dot = '.edge'; - end - % if nete_rho, do first ne, then Te later (so fir stuff already done) - if strcmp(data_request_eff,'ne_rho') || strcmp(data_request_eff,'nete_rho') - nodenameeff=['\results::thomson' edge_str_dot ':ne']; - tracetdi=tdi(nodenameeff); - nodenameeff=['\results::thomson' edge_str_dot ':ne; error_bar ; fir_thom_rat; (ne,std)*fir_thom_rat']; - tracestd=tdi(['\results::thomson' edge_str_dot ':ne:error_bar']); - tracefirrat_data = get_fir_thom_rat_data(shot,['thomson' edge_str_],time); - else - nodenameeff=['\results::thomson' edge_str_dot ':te']; - tracetdi=tdi(nodenameeff); - nodenameeff=['\results::thomson' edge_str_dot ':te; error_bar']; - tracestd=tdi(['\results::thomson' edge_str_dot ':te:error_bar']); - end - gdat_data.data=tracetdi.data'; % Thomson data as (t,z) - gdat_data.error_bar=tracestd.data'; - gdat_data.data_fullpath=nodenameeff; - if strcmp(data_request_eff,'ne_rho') || strcmp(data_request_eff,'nete_rho') - gdat_data.firrat=tracefirrat_data; - gdat_data.data_abs=gdat_data.data*diag(tracefirrat_data); - gdat_data.error_bar_abs=gdat_data.error_bar*diag(tracefirrat_data); - gdat_data.data_fullpath=[gdat_data.data_fullpath ' ; _abs includes *firrat']; - end - % add correct dimensions - % construct rho mesh - psi_max=tdi(['\results::thomson' edge_str_dot ':psi_max' substr_liuqe]); - psiscatvol=tdi(['\results::thomson' edge_str_dot ':psiscatvol' substr_liuqe]); - if abs(zshift)>1e-5 - % calculate new psiscatvol - psitdi=tdi(['\results::psi' substr_liuqe]); - rmesh=psitdi.dim{1}; - zmesh=psitdi.dim{2}; - zthom=mdsdata('dim_of(\thomson:te,1)'); - zeffshift=zshift; - % set zeffshift time array same as psitdi - switch length(zeffshift) - case 1 - zeffshift=zeffshift * ones(size(psitdi.dim{3})); - case length(psitdi.dim{3}) - % ok - case length(psiscatvol.dim{1}) - zeffshift=interp1(psiscatvol.dim{1},zeffshift,psitdi.dim{3}); - otherwise - disp(' bad time dimension for zshift') - disp(['it should be 1 or ' num2str(length(psiscatvol.dim{1})) ' or ' num2str(length(psitdi.dim{3}))]) - end - for it=1:length(psiscatvol.dim{1}) - itpsitdi=iround(psitdi.dim{3},psiscatvol.dim{1}(it)); - psirz=psitdi.data(:,:,itpsitdi); - psiscatvol0=griddata(rmesh,zmesh,psirz',0.9*ones(size(zthom)),zthom-zeffshift(itpsitdi)); - psiscatvol.data(it,:)=psiscatvol0; - end - end - if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) && ~isempty(psi_max.data) && ~ischar(psi_max.data) - for ir=1:length(psiscatvol.dim{2}) - rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; - end - else - rho=NaN; - end - gdat_data.dim=[{rho};{time}]; - gdat_data.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - gdat_data.x=rho; - gdat_data.t=time; - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.units=tracetdi.units; - end - %%%%%%%%%%% add fitted profiles if 'fit'>=1 - if isfield(gdat_data.gdat_params,'fit') && ~isempty(gdat_data.gdat_params.fit) && ... - gdat_data.gdat_params.fit>0 - % default is from proffit:avg_time - def_proffit = '\results::proffit.avg_time'; - if isfield(gdat_data.gdat_params,'fit_type') && ~isempty(gdat_data.gdat_params.fit_type) - if strcmp(gdat_data.gdat_params.fit_type,'local') - def_proffit = '\results::proffit.local_time'; - else - gdat_data.gdat_params.fit_type = 'avg'; - end - else - gdat_data.gdat_params.fit_type = 'avg'; - end - if strcmp(data_request_eff(1:2),'ne') - nodenameeff = [def_proffit ':neft_abs']; % do first ne if nete asked for - elseif strcmp(data_request_eff(1:2),'te') - nodenameeff = [def_proffit ':teft']; - else - disp(['should not be here: data_request_eff, data_request_eff(1:2)= ',data_request_eff, data_request_eff(1:2)]); - end - if isfield(gdat_data.gdat_params,'trialindx') && ~isempty(gdat_data.gdat_params.trialindx) && ... - gdat_data.gdat_params.trialindx>=0 - nodenameeff=[nodenameeff ':trial']; - trialindx = gdat_data.gdat_params.trialindx; - else - gdat_data.gdat_params.trialindx = []; - trialindx = []; - end - tracetdi=tdi(nodenameeff); - if isempty(trialindx) - gdat_data.fit.data = tracetdi.data; - else - if ~isempty(tracetdi.data) && size(tracetdi.data,3)>=trialindx+1 - gdat_data.fit.data = tracetdi.data(:,:,trialindx+1); - else - gdat_data.fit.data = []; - gdat_data.fit.data_fullpath = [nodenameeff ' with trialindx=' num2str(trialindx) ' is empty']; - return - end - end - gdat_data.fit.x=tracetdi.dim{1}; - gdat_data.fit.t=tracetdi.dim{2}; - if mapping_for_tcv.timedim~=2 | mapping_for_tcv.gdat_timedim~=2 - disp(['unexpected timedim in fit: data_request_eff= ' data_request_eff ... - ', mapping_for_tcv.timedim= ' mapping_for_tcv.timedim ... - ', mapping_for_tcv.gdat_timedim= ' mapping_for_tcv.gdat_timedim]); - end - gdat_data.dim=tracetdi.dim(1:2); - gdat_data.dimunits=tracetdi.dimunits(1:2); - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.fit.units=tracetdi.units; - end - gdat_data.fit.data_fullpath = nodenameeff; - % do te as well if nete asked for - if strcmp(data_request_eff(1:4),'nete') - gdat_data.fit.ne.data = gdat_data.fit.data; - gdat_data.fit.ne.units = gdat_data.fit.units; - nodenameeff = [def_proffit ':teft']; - if ~isempty(trialindx); nodenameeff=[nodenameeff ':trial']; end - tracetdi=tdi(nodenameeff); - if isempty(trialindx) - gdat_data.fit.te.data = tracetdi.data; - else - if ~isempty(tracetdi.data) && size(tracetdi.data,3)>=trialindx+1 - gdat_data.fit.te.data = tracetdi.data(:,:,trialindx+1); - else - return - end - end - if any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.fit.te.units=tracetdi.units; - end - % construct pe=1.6022e-19*ne*te - gdat_data.fit.data = 1.6022e-19.*gdat_data.fit.ne.data .* gdat_data.fit.te.data; - gdat_data.fit.units = 'N/m^2; 1.6022e-19 ne Te'; - gdat_data.fit.data_fullpath = [gdat_data.fit.data_fullpath ' ; ' nodenameeff ' and pe in data']; - end - else - gdat_data.gdat_params.fit = 0; - end - %%%%%%%%%%% - % if nete_rho, copy data as .ne, get .te and put pe=e ne Te in data: - if strcmp(data_request_eff(1:4),'nete') - gdat_data.ne.data = gdat_data.data_abs; - gdat_data.ne.error_bar = gdat_data.error_bar_abs; - gdat_data.ne.firrat=gdat_data.firrat; - gdat_data.ne.units = 'm^{-3}'; - gdat_data = rmfield(gdat_data,{'firrat','data_abs','error_bar_abs'}); - % - nodenameeff=['\results::thomson' edge_str_dot ':te']; - tracetdi=tdi(nodenameeff); - nodenameeff=['\results::thomson' edge_str_dot ':te; error_bar']; - tracestd=tdi(['\results::thomson' edge_str_dot ':te:error_bar']); - gdat_data.te.data=tracetdi.data'; - gdat_data.te.error_bar=tracestd.data'; - gdat_data.te.units = tracetdi.units; - gdat_data.data_fullpath=['pe=1.6e-19*ne*Te in data, .ne, .te from \results::thomson' ... - edge_str_dot ':ne and te and projected on rhopol\_norm']; - gdat_data.units='N/m^2; 1.6022e-19 ne Te'; - gdat_data.data = 1.6022e-19 .* gdat_data.ne.data .* gdat_data.te.data; - gdat_data.error_bar = 1.6022e-19 .* (gdat_data.ne.data .* gdat_data.te.error_bar ... - + gdat_data.te.data .* gdat_data.ne.error_bar); - end - - case {'powers'} - % note: same time array for all main, ec, ohm, nbi, ... - % At this stage fill just ech, later add nbi - nodenameeff='\results::toray.input:p_gyro'; - tracetdi=tdi(nodenameeff); - gdat_data.ec.data = tracetdi.data*1e3; % at this stage p_gyro is in kW' - gdat_data.ec.units = 'W'; - gdat_data.ec.dim=tracetdi.dim; - gdat_data.ec.dimunits=tracetdi.dimunits; - gdat_data.ec.t=tracetdi.dim{1}; - gdat_data.ec.x=tracetdi.dim{2}; - gdat_data.ec.data_fullpath=[nodenameeff]; - gdat_data.ec.label='P_{EC}'; - % set ec time as reference - gdat_data.t = gdat_data.ec.t; - gdat_data.dim{1} = gdat_data.t; - gdat_data.dimunits{1} = 's'; - gdat_data.units = 'W'; - - % get ohmic power simply from vloop*Ip (minus sign for TCV) - ip=gdat([],'ip'); - vloop=gdat([],'vloop'); - tension = -1e5; - vloop_smooth=interpos(vloop.t,vloop.data,gdat_data.t,tension); - ip_t = interp1(ip.t,ip.data,gdat_data.t); - gdat_data.ohm.data = -vloop_smooth.*ip_t; - gdat_data.ohm.units = 'W'; - gdat_data.ohm.dim=gdat_data.dim; - gdat_data.ohm.dimunits=gdat_data.dimunits; - gdat_data.ohm.t=gdat_data.t; - gdat_data.ohm.x=[]; - gdat_data.ohm.data_fullpath=['-vloop(tens=' num2str(tension,'%.0e') ')*ip, from gdat']; - gdat_data.ohm.label='P_{OHM}'; - - % total power from each and total - gdat_data.data(:,1) = gdat_data.ohm.data; - gdat_data.data(:,2) = gdat_data.ec.data(:,10); - gdat_data.data(:,3) = gdat_data.ec.data(:,10) + gdat_data.ohm.data; - gdat_data.dim{2} = [1:3]; - gdat_data.dimunits{2} = 'Pohm;Pec;Ptot'; - gdat_data.data_fullpath=['tot power from EC and ohm']; - gdat_data.label = 'P_{ohm};P_{EC};P_{tot}'; - - case {'q_rho'} - % q profile on psi from liuqe - nodenameeff=['\results::q_psi' substr_liuqe]; - if liuqe_version==-1 - nodenameeff=[begstr 'q_psi' substr_liuqe]; - end - tracetdi=tdi(nodenameeff); - gdat_data.data = tracetdi.data; - gdat_data.dim = tracetdi.dim; - gdat_data.t = gdat_data.dim{2}; - gdat_data.data_fullpath=[nodenameeff ' on rhopol']; - rhopol_eff = ones(size(tracetdi.dim{1})); - rhopol_eff(:) = sqrt(linspace(0,1,length(tracetdi.dim{1}))); - gdat_data.dim{1} = rhopol_eff; - gdat_data.x = gdat_data.dim{1}; - gdat_data.dimunits{1} = ''; - gdat_data.dimunits{2} = 's'; - gdat_data.units = ''; - gdat_data.request_description = 'q(rhopol\_norm)'; - - case {'psi_edge'} - % psi at edge, 0 by construction in Liuqe, thus not given - nodenameeff=['\results::psi_axis' substr_liuqe]; - if liuqe_version==-1 - nodenameeff=[begstr 'q_psi' substr_liuqe]; - end - tracetdi=tdi(nodenameeff); - gdat_data.data = tracetdi.data.*0; - gdat_data.dim = tracetdi.dim; - gdat_data.t = gdat_data.dim{1}; - gdat_data.data_fullpath=[' zero ']; - gdat_data.dimunits = tracetdi.dimunits; - gdat_data.units = tracetdi.units; - gdat_data.request_description = '0 since LIUQE construct psi to be zero at LCFS'; - - case {'rhotor_edge','rhotor'} - % Phi(LCFS) = int(Bphi dSphi), can use Eq.(11) of "Tokamak coordinate conventions: COCOS" paper: - % O. Sauter, S.Yu. Medvedev, Comput. Phys. Commun. 184 (2013) 293–302 - % since cocos=17 for LIUQE we get: - % q = -dPhi/dpsi => Phi = - int(q*dpsi) which should always have the sign of B0 - params_eff = gdat_data.gdat_params; - params_eff.data_request='q_rho'; - q_rho=gdat_tcv([],params_eff); - params_eff.data_request='psi_axis'; % psi_edge=0 with LIUQE - psi_axis=gdat_tcv([],params_eff); - params_eff.data_request='b0'; % psi_edge=0 with LIUQE - b0=gdat_tcv([],params_eff); - b0tpsi = interp1(b0.t,b0.data,psi_axis.t); %q_rho on same time base as psi_axis - if isempty(psi_axis.data) || isempty(psi_axis.dim) || isempty(q_rho.data) || isempty(q_rho.dim) - warning(['problems loading data for ' nodenameeff ' for data_request= ' data_request_eff]) - return - end - rhoequal = linspace(0,1,length(q_rho.dim{1})); - if strcmp(data_request,'rhotor_edge') - gdat_data.data = psi_axis.data; % to have the dimensions correct - gdat_data.dim = psi_axis.dim; - gdat_data.t = gdat_data.dim{1}; - gdat_data.data_fullpath='phi from q_rho, psi_axis and integral(-q dpsi)'; - gdat_data.units = 'T m^2'; - gdat_data.dimunits{1} = 's'; - elseif strcmp(data_request,'rhotor') - gdat_data.data = q_rho.data; % to have the dimensions correct - gdat_data.dim{1} = ones(size(q_rho.dim{1})); - gdat_data.dim{1}(:) = rhoequal; - gdat_data.dim{2} = q_rho.dim{2}; - gdat_data.t = gdat_data.dim{2}; - gdat_data.data_fullpath='sqrt(phitor/phitor_edge), rhotor_edge=sqrt(phitor/B0/pi)'; - gdat_data.units = ''; - gdat_data.dimunits{1} = 'rhopol\_norm'; - gdat_data.dimunits{2} = 's'; - end - for it=1:length(psi_axis.data) - ij=find(~isnan(q_rho.data(:,it))); - if ~isempty(ij) - [qfit,~,~,phi]=interpos(q_rho.x(ij).^2,q_rho.data(ij,it),rhoequal.^2); - dataeff = sqrt(phi .* psi_axis.data(it) ./ b0tpsi(it) ./ pi) ; % Delta_psi = -psi_axis - else - dataeff = NaN; - end - if strcmp(data_request,'rhotor_edge') - gdat_data.data(it) = dataeff(end); - elseif strcmp(data_request,'rhotor') - gdat_data.data(:,it) = dataeff./dataeff(end); - gdat_data.rhotor_edge(it) = dataeff(end); - end - gdat_data.b0 = b0tpsi(it); - end - - case {'rhovol','volume_rho','volume'} - % volume_rho = vol(rho); volume = vol(LCFS) = vol(rho=1); - % rhovol = sqrt(vol(rho)/vol(rho=1)); - nodenameeff='\results::psitbx:vol'; - if liuqe_version==-1 - nodenameeff=[begstr 'vol' substr_liuqe]; - end - tracetdi=tdi(nodenameeff); - if isempty(tracetdi.data) || isempty(tracetdi.dim) - return - end - gdat_data.units = tracetdi.units; - if strcmp(data_request,'volume') - gdat_data.data = tracetdi.data(end,:); - gdat_data.dim{1} = tracetdi.dim{2}; - gdat_data.data_fullpath=['\results::psitbx:vol(end,:)']; - gdat_data.dimunits{1} = tracetdi.dimunits{2}; - gdat_data.request_description = 'volume(LCFS)=volume(rhopol=1)'; - else - gdat_data.data = tracetdi.data; - gdat_data.dim = tracetdi.dim; - gdat_data.dimunits = tracetdi.dimunits; - if strcmp(data_request,'volume_rho') - gdat_data.data_fullpath=['\results::psitbx:vol']; - gdat_data.request_description = 'volume(rho)'; - elseif strcmp(data_request,'rhovol') - gdat_data.volume_edge = gdat_data.data(end,:); - gdat_data.data = sqrt(gdat_data.data./repmat(reshape(gdat_data.volume_edge,1,size(gdat_data.data,2)),size(gdat_data.data,1),1)); - gdat_data.data_fullpath='sqrt(\results::psitbx:vol/vol_edge)'; - gdat_data.request_description = 'sqrt(volume(rho)/volume(edge))'; - else - disp(['should not be here in vol cases with data_request = ' data_request_eff]); - return - end - end - gdat_data.t = gdat_data.dim{mapping_for_tcv.gdat_timedim}; - - case {'sxr'} - % sxr from Xtomo by default or dmpx if 'camera','dmpx' is provided - - case {'profnerho','profterho'} - % for backward compatibility but corresponds to ne_rho with param.fit_type='auto' (TCV special) - % - nodenameeff=['\results::THOMSON.PROFILES.AUTO:' data_request_eff(5:6)]; - nodenameeff_vers = [nodenameeff ':version_num']; - avers = tdi(nodenameeff_vers); - if avers.data==0 - % may be because nodes not yet filled in, so call once a node - ab=tdi(nodenameeff); - avers = tdi(nodenameeff_vers); - end - if avers.data>0 - tracetdi=tdi(nodenameeff); - if avers.data < 2.99 - % for earlier version the bug made it to have logically (rho,t) - gdat_data.data=tracetdi.data; - if ~isempty(tracetdi.dim) && ~ischar(tracetdi.data) - gdat_data.x=tracetdi.dim{1}; - gdat_data.t=tracetdi.dim{2}; - error_status=0; - else - error_status=2; - gdat_data.x=[]; - gdat_data.t=[]; - end - else - gdat_data.data=tracetdi.data'; % error in dimensions for autofits - if ~isempty(tracetdi.dim) && ~ischar(tracetdi.data) - if nverbose>=3; disp('assumes dim{2} for x in THOMSON.PROFILES.AUTO'); end - gdat_data.x=tracetdi.dim{2}; - gdat_data.t=tracetdi.dim{1}; - error_status=0; - else - gdat_data.x=[]; - gdat_data.t=[]; - error_status=2; - end - end - else - tracetdi=avers; - gdat_data.x=[]; - gdat_data.t=[]; - end - gdat_data.dim=[{gdat_data.x};{gdat_data.t}]; - gdat_data.dimunits=[{'sqrt(psi\_norm)'} ; {'time [s]'}]; - if ~isempty(gdat_data.t) && any(strcmp(fieldnames(tracetdi),'units')) - gdat_data.units=tracetdi.units; - end - gdat_data.request_description = 'quick autofits within thomson nodes, using version'; - gdat_data.fullpath = ['Thomson autfits from ' nodenameeff]; - - otherwise - warning(['switchcase= ' data_request_eff ' not known in gdat_tcv']) - error_status=901; - return - end - -else - warning(['TCV method=' mapping_for_tcv.method ' not known yet, contact Olivier.Sauter@epfl.ch']) - error_status=602; - return -end - -if ishot==shot; mdsclose; end - -gdat_data.mapping_for.tcv = mapping_for_tcv; -error_status=0; - -return - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function [firthomratio] = get_fir_thom_rat_data(shot,maintracename,timebase); -% -% since depends on shot number for using auto fit and thomson or thomson edge, use tracename and function here -% -% maintracename = 'thomson' or 'thomson_edge -% -% return fir_to_thomson ratio on time=timebase -% -% normally should use "main" thomson one built from auto fit if possible -% take edge one if need be -% -% default: maintracename = "thomson" -% -maintracename_eff = 'thomson'; -if exist('maintracename') && ~isempty(maintracename) - maintracename_eff = maintracename; -end - -firthomratio = NaN; -if ~exist('timebase') || isempty(timebase) - disp('need a timebase in get_fir_thom_rat_data') - return -end -firthomratio = NaN*ones(size(timebase)); - -if strcmp(maintracename_eff,'thomson') - if shot>=23801 - tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!! - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty, use thomson:fir_thom_rat') - tracefirrat=tdi('\results::thomson:fir_thom_rat'); - end - else - tracefirrat=tdi('\results::thomson:fir_thom_rat'); - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson:fir_thom_rat: empty') - end - end -elseif strcmp(maintracename_eff,'thomson_edge') - if shot>=23801 - tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!! - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty, use thomson:fir_thom_rat') - tracefirrat=tdi('\results::thomson:fir_thom_rat'); - end - else - tracefirrat=tdi('\results::thomson_edge:fir_thom_rat'); - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson_edge:fir_thom_rat: empty') - end - end -else - disp('bad input in get_fir_thom_rat_data') - return -end - -if ~isempty(tracefirrat.data) || ischar(tracefirrat.data) - firthomratio = interp1(tracefirrat.dim{1},tracefirrat.data,timebase); -end - diff --git a/crpptbx_new/TCV/get_xtomo_data.m b/crpptbx_new/TCV/get_xtomo_data.m deleted file mode 100755 index 0c0c69a4..00000000 --- a/crpptbx_new/TCV/get_xtomo_data.m +++ /dev/null @@ -1,496 +0,0 @@ -function [sig,t]=get_xtomo_data(shot,t1,t2,dt,fans,angfact,tag); - -% - -%[sig,t]=get_xtomo_data_m5(shot,t1,t2,dt,fans,angfact,tag); -% -% INPUT: -% shot: TCV shot -% t1: start time -% t2: stop time -% dt: timestep -% fans: camera switch, e.g. [0 0 0 0 0 0 1 0 1 0]; -% angfact: relative etendue, size: [20 x 10] -% tag 'full' or 'brief', indicates if it is -% a slow or a fast Pentland acquisition -% -% OUTPUTS: -% sig: xtomo signals, size: [sum(fans) x length(t)] -% t: times -% -% ATTENTION: length(time) may be shorter than foreseen !! -% -% This routine works on Matlab5. -% Original routine for Matlab4 by Anton Mathias. -% -% Last update: 25-08-1999 -% -%-------------MAC:[FURNO.MATLAB5.XTOMO]---------------------------------- - - -%---- get data and offsets --------------------------------------------------- - - % set a flag if flattenign of noise - % for channels with low signal - - - iflat=0; - minsiglevel=0.01; - satlevel=9.9; - - - st1=sprintf('%6.4f',t1); - st2=sprintf('%6.4f',t2); - sdt=num2str(dt); - -% sdt=sprintf('%6.4f',dt); % modified from old version - - - if shot >= 13836 & shot <= 13848 - tstart=-0.02;tstop=-0.01; % this one is to be used only for - else % shot=13836 to shot=13848 - tstart=-0.04;tstop=-0.01; - end - - ststart=num2str(tstart); - ststop=num2str(tstop); - -if nargin <=6 - - shot=mdsopen(shot); - t=mdsdata(['dim_of(\base::xtomo:array_001[',st1,':',st2,':',sdt,',*])']); - S1=[]; - S2=[]; - S3=[]; - S4=[]; - S5=[]; - S6=[]; - S7=[]; - S8=[]; - S9=[]; - S10=[]; - - if isempty(t) - disp('get_xtomo_data: sorry, nothing to be found for this shot ...') - return - else - disp('*-------------------------------------------*') - disp('| get_xtomo_data: getting data from MDS |') - disp('*-------------------------------------------*') - end - - if shot>6768 - - if fans(1) - S=mdsdata(['\base::xtomo:array_001[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_001[',ststart,':',ststop,',0:19]']); - S1=S-repmat(mean(offset),length(t),1)'; - end - - if fans(2) - S=mdsdata(['\base::xtomo:array_002[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_002[',ststart,':',ststop,',0:19]']); - S2=S-repmat(mean(offset),length(t),1)'; - end - - if fans(3) - S=mdsdata(['\base::xtomo:array_003[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_003[',ststart,':',ststop,',0:19]']); - S3=S-repmat(mean(offset),length(t),1)'; - end - - if fans(4) - S=mdsdata(['\base::xtomo:array_004[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_004[',ststart,':',ststop,',0:19]']); - S4=S-repmat(mean(offset),length(t),1)'; - end - - if fans(5) - S=mdsdata(['\base::xtomo:array_005[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_005[',ststart,':',ststop,',0:19]']); - S5=S-repmat(mean(offset),length(t),1)'; - end - - if fans(6) - S=mdsdata(['\base::xtomo:array_006[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_006[',ststart,':',ststop,',0:19]']); - S6=S-repmat(mean(offset),length(t),1)'; - end - - if fans(7) - S=mdsdata(['\base::xtomo:array_007[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_007[',ststart,':',ststop,',0:19]']); - S7=S-repmat(mean(offset),length(t),1)'; - end - - if fans(8) - S=mdsdata(['\base::xtomo:array_008[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_008[',ststart,':',ststop,',0:19]']); - S8=S-repmat(mean(offset),length(t),1)'; - end - - if fans(9) - S=mdsdata(['\base::xtomo:array_009[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_009[',ststart,':',ststop,',0:19]']); - S9=S-repmat(mean(offset),length(t),1)'; - end - - if fans(10) - S=mdsdata(['\base::xtomo:array_010[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_010[',ststart,':',ststop,',0:19]']); - S10=S-repmat(mean(offset),length(t),1)'; - end - - - sig=-[S1;S2;S3;S4;S5;S6;S7;S8;S9;S10]; - [satrow,satcol]=find(abs(sig)>satlevel); - - if ~isempty(satcol) - i_tlimit=min(satcol(:)); - if i_tlimit>1 - sig=sig(:,1:i_tlimit-1); - t=t(1:i_tlimit-1); - disp(['get_xtomo_data WARNING: some channels saturated',...... - ', t2 changed to ',sprintf('%6.4f',max(t))]); - else - sig=[]; - t=[]; - disp('get_xtomo_data WARNING: saturations, no data returned'); - return - end - end - - - angfact=angfact(:,find(fans)); - angfact=angfact(:); - gains=get_xtomo_gains(shot); - % earlier than shot xxx: - perm=[1:180,[180+[2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19]]]; - gains=gains(perm); - iact=find(fans); - nact=length(iact); - idetec=[]; - for k=1:nact - idetec=[idetec,(iact(k)-1)*20+1:iact(k)*20]; - end - gains=gains(idetec); - gains=gains(:); - fac=ones(size(gains))./gains; - - - sig=-sig.*(repmat(fac,1,length(t))); - - if iflat - for ii=1:length(t) - imini=find( sig(:,ii) < minsiglevel*max(sig(:,ii))); - sig(imini,ii)=zeros(size(imini)); - end - end - - t=t'; - sig=sig.*(repmat(angfact,1,length(t))); - - - else - - if fans(9) - S=mdsdata(['\base::xtomo:array_001[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_001[',ststart,':',ststop,',0:19]']); - V=S-repmat(mean(offset),length(t),1)'; - end - if fans(7) - S=mdsdata(['\base::xtomo:array_002[',st1,':',st2,':',sdt,',0:19]'])'; - offset=mdsdata(['\base::xtomo:array_002[',ststart,':',ststop,',0:19]']); - H=S-repmat(mean(offset),length(t),1)'; - end - - %---- read gains of the current shot --------------------------------------- - - gains=get_xtomo_gains(shot); - g1=gains(1:20)'; - g2=gains(21:40)'; - - %------ solid angle factors ----------------------- - - aom1=angfact(:,9); - aom2=angfact(:,7); - - - %----- calculate correcting factors --------------------------------------- - - fac1=(aom1./g1); - fac2=(aom2./g2); - - %--- result: offset-, calibration- and angular-factor corrected data ------- - - V=-V.*(repmat(fac1,1,length(t))); % vertical camera: - H=-H.*(repmat(fac2,1,length(t))); % horizontal camera: - - - sig=[H;V]; - - t=t'; - - end - -else - - if (~strcmp(tag,'brief') & ~strcmp(tag,'full')) - disp('Only full or brief accepted as tag') - return - end - - - trace_tree=['\atlas::t_rex3_' tag ':']; - trace=[trace_tree 'signal_inp:p']; - %shot=mdsopen('eltca1::tcv_shot',shot); - shot=mdsopen(shot); - tref=mdsdata(['_tref=dim_of(' trace,'001)']); %trace :p001 - dtref=mdsdata('_dtref = _tref[1]-_tref[0]'); - - - S1=[]; - S2=[]; - S3=[]; - S4=[]; - S5=[]; - S6=[]; - S7=[]; - S8=[]; - S9=[]; - S10=[]; - - t_1=mdsdata('_t = dim_of(\atlas::t_rex3_full:signal_inp:p001)'); - dt1=mdsdata('_dt = _t[1]-_t[0]'); - npts=floor(mdsdata(['_npts=(',ststop,'-(',ststart,'))/_dt'])); - - - -if isempty(t_1) - disp('get_xtomo_data: sorry, nothing to be found for this shot ...') - return - else - disp('*--------------------------------------------*') - disp('| getting Pentland acquisition: getting *') - if strcmp(tag,'brief') - disp('| BRIEF data from MDS *'); - else - disp('| FULL data from MDS *'); - end - disp('*--------------------------------------------*'); - end - - - - if ((dt - dtref) < 1e-7 | floor(dt/dtref) ==0) - step='1'; - else - step =num2str(dt/dtref); - end - - - ind1=find( abs(tref-t1) == min(abs(tref-t1))); - npts1=floor(mdsdata(['_npts1=(',st2,'-(',st1,'))/_dtref'])); - sind1=num2str(ind1); - sind2=num2str(npts1+ind1); - - t=mdsdata(['data(_tref)[',sind1,':',sind2,':', step, ']']); - - - - - if fans(1) - channel=['001';'002';'003';'004';'005';'006';'007';'008';'009';'010';... - '011';'012';'013';'014';'015';'016';'017';'018';'019';'020']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':' , step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S1(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - - - - if fans(2) - channel=['021';'022';'023';'024';'025';'026';'027';'028';'029';'030';... - '031';'032';'033';'034';'035';'036';'037';'038';'039';'040']; - for i=1:20 - -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step, ']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S2(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(3) - - channel=['041';'042';'043';'044';'045';'046';'047';'048';'049';'050';... - '051';'052';'053';'054';'055';'056';'057';'058';'059';'060']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step, ']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S3(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - - if fans(4) - channel=['061';'062';'063';'064';'065';'066';'067';'068';'069';'070';... - '071';'072';'073';'074';'075';'076';'077';'078';'079';'080']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step, ']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S4(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(5) - channel=['081';'082';'083';'084';'085';'086';'087';'088';'089';'090';... - '091';'092';'093';'094';'095';'096';'097';'098';'099';'100']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':',step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S5(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - - if fans(6) - channel=['101';'102';'103';'104';'105';'106';'107';'108';'109';'110';... - '111';'112';'113';'114';'115';'116';'117';'118';'119';'120']; - for i=1:20 -% S(i,:)=mdsdata([trace,channel(i,:),'[',st1,':',st2,':',sdt,':',step,']'])' - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step, ']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S6(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(7) - channel=['121';'122';'123';'124';'125';'126';'127';'128';'129';'130';... - '131';'132';'133';'134';'135';'136';'137';'138';'139';'140']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':',step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S7(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(8) - channel=['141';'142';'143';'144';'145';'146';'147';'148';'149';'150';... - '151';'152';'153';'154';'155';'156';'157';'158';'159';'160']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S8(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(9) - channel=['161';'162';'163';'164';'165';'166';'167';'168';'169';'170';... - '171';'172';'173';'174';'175';'176';'177';'178';'179';'180']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S9(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - if fans(10) -% channel=['181';'182';'183';'184';'185';'186';'187';'188';'189';'190';... -% '191';'192';'193';'194';'195';'196';'197';'198';'199';'200']; - -% this permutation takes into account some not well defined (not yet) -% hardware corrections. Are the gains to be permutated ? - - - channel=['182';'181';'184';'183';'186';'185';'188';'187';'190';'189';... - '192';'191';'194';'193';'196';'195';'198';'197';'200';'199']; - for i=1:20 -% S(i,:)=mdsdata([trace, channel(i,:),'[',st1,':',st2,':',sdt,']'])'; - - - S(i,:)=mdsdata(['data(',trace,channel(i,:),')[',sind1,':',sind2,':', step,']'])'; - offset=mdsdata(['data(\atlas::t_rex3_full:signal_inp:p',channel(i,:),')[0:',num2str(npts),']' ]); - S10(i,:)=S(i,:)-repmat(mean(offset),length(t),1)'; - end - end - - sig=[S1;S2;S3;S4;S5;S6;S7;S8;S9;S10]; - - - [satrow,satcol]=find(abs(sig)>satlevel); - - if ~isempty(satcol) - i_tlimit=min(satcol(:)); - if i_tlimit>1 - sig=sig(:,1:i_tlimit-1); - t=t(1:i_tlimit-1); - disp(['get_xtomo_data WARNING: some channels saturated',...... - ', t2 changed to ',sprintf('%6.4f',max(t))]); - else - sig=[]; - t=[]; - disp('get_xtomo_data WARNING: saturations, no data returned'); - return - end - end - - - angfact=angfact(:,find(fans)); - angfact=angfact(:); - gains=get_xtomo_gains(shot); - % earlier than shot xxx: - perm=[1:180,[180+[2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19]]]; - gains=gains(perm); - iact=find(fans); - nact=length(iact); - idetec=[]; - for k=1:nact - idetec=[idetec,(iact(k)-1)*20+1:iact(k)*20]; - end - gains=gains(idetec); - gains=gains(:); - fac=ones(size(gains))./gains; - - - sig=sig.*(repmat(fac,1,length(t))); - - if iflat - for ii=1:length(t) - imini=find( sig(:,ii) < minsiglevel*max(sig(:,ii))); - sig(imini,ii)=zeros(size(imini)); - end - end - - t=t'; - sig=sig.*(repmat(angfact,1,length(t))); - - -end - -mdsclose - - -return - - - - - - diff --git a/crpptbx_new/TCV/loadTCVdata.m b/crpptbx_new/TCV/loadTCVdata.m deleted file mode 100644 index cc7ef6ba..00000000 --- a/crpptbx_new/TCV/loadTCVdata.m +++ /dev/null @@ -1,1423 +0,0 @@ - function [trace,error_status,varargout]=loadTCVdata(shot,data_type,varargin) -% -% Added option to load shot=-1 or >=100000 -% Added option shot=-9 to list keywords -% -% list of data_type currently available (when [_2,_3] is added, means can add _i to get Liuqe i): -% if -1 is added, can also get it from FBTE with shot=-1, >=100000 or liuqe_version='_-1' (to get model file) -% -% 'Ip'[_2,_3] = current -% 'B0'[_2,_3] = current -% 'zmag'[_2,_3] = vertical position of the center of the plasma (magnetic axis) -% 'rmag'[_2,_3] = radial position of the center of the plasma -% 'rcont'[_2,_3] = R of plama boundary vs time -% 'zcont'[_2,_3] = Z of plama boundary vs time -% 'vol'[_2,_3] = volume of flux surfaces -% 'rhovol'[_2,_3] = sqrt(V(:,t)/V(edge,t)), normalised rho variable based on volume of flux surfaces -% 'qrho'[_2,_3] = q profile on rho mesh -% 'q95'[_2,_3] = q95 vs time -% 'kappa', 'elon'[_2,_3] = edge elongation vs time -% 'delta', 'triang'[_2,_3] = edge averaged triangularity vs time -% 'deltatop', 'triangtop'[_2,_3] = edge upper (top) triangularity vs time -% 'deltabot', 'triangbot'[_2,_3] = edge lower (bottom) triangularity vs time -% 'j_tor'[_2,_3] = J_TOR vs (R,Z,time) -% 'neint' = line-integrated electron density [m/m^3] -% 'nel' = line-averaged electron density [1/m^3] -% 'ne'= ne raw profile on (z,t). ADD error bars in .std -% 'te'= Te raw profile on (z,t). ADD error bars in .std -% 'nerho'[_2,_3]= ne profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% 'terho'[_2,_3]= Te profile on (rho=sqrt(psi),time) mesh.Note rho is a 2D array as depends on time. ADD error bars in .std -% 'nerhozshift'[_2,_3]= same as nerho but allows for zshift [m] in equil given by varargin{1} -% 'terhozshift'[_2,_3]= same as terho but allows for zshift [m] in equil given by varargin{1} -% 'profnerho' = ne smoothed or fitted , vs (rho,t) (from Thomson auto fit) -% 'profterho' = te smoothed or fitted , vs (rho,t) (from Thomson auto fit) -% 'neft' = ne fitted from data on rho mesh (from proffit.local_time:neft_abs) -% 'neft:4' = ne fitted from data on rho mesh (from proffit.local_time:neft_abs from trial:trial_indx=4) -% 'teft' = te fitted from data on rho mesh (from proffit.local_time:teft) -% 'neftav' = ne fitted from averaged over time data on rho mesh (from proffit.avg_time:neft_abs) -% 'teftav' = te fitted from averaged over time data on rho mesh (from proffit.avg_time:teft) -% 'vtor'= Toroidal rotation of C raw profile on (rho,t). ADD error bars in .std, as well as time and rho error bars -% 'vtorfit'= Toroidal rotation of C fitted profile on (rho,t) -% 'vpol'= Poloidal rotation of C raw profile on (rho,t). ADD error bars in .std, as well as time and rho error bars -% 'vpolfit'= Poloidal rotation of C fitted profile on (rho,t) -% 'Ti' (or Tc), 'Tifit', 'ni' (or nC), 'nifit', 'zeffcxrs', 'zeffcxrsfit': similar to 'vtor' from CXRS -% 'ece' = electron cyclotron emission -% 'sxr' = soft x-ray emission -% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{4}!) -% 'MPX' = soft x-ray from wire chambers -% 'IOH' = current in ohmic transformer coils IOH_1 -% 'vloop' = loop voltage -% 'pgyro' = ECH power for each gyro(1:9) and total (10) -% -% 'xx_2 or xx_3' for Liuqe2 or 3: same as above for xx related to equilibrium -% 'xx_-1 or xx_-1' for FBTE values (model or shot=-1 or shot>=100000): same as above for xx related to equilibrium -% -% INPUT: -% shot: shot number -% data_type: type of the required data -% -% Definition of varargin depends on data_type: -% -% data_type=sxr or ece: -% varargin{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2 -% varargin{2}: channel status 1= unread yet, 0= read -% (for traces with many channel, enables to load additional channels, -% like SXR, ECE, etc.) -% varargin{3}: zmag for varargout{1} computation -% (can have more inputs for AUG, but not used here) -% data_type=nerhozshift or terhozshift: -% varargin{1}: zshift [m] constant or (t) : positive, moves equil up (that is thomson effective z down) -% time dependent: needs same time base as psitbx:psi -% -% OUTPUT: -% -% trace.data: data -% trace.t: time of reference -% trace.x: space of reference -% trace.dim: cell array of grids, trace.dim{1}, {2}, ... -% trace.dimunits: units of dimensions -% trace.units: units of data -% -% Additional Output arguments depending on data_type -% -% data_type=sxR, ece: -% varargout{1}: major radius: intersection/projection of the view lines with z=zmag -% data_type=MPX: -% varargout{1}: te be determined -% -% -% function needed: mds functions-xtomo_geometry-get_xtomo_data (Furno's routines) -% VsxrTCVradius -% Example: -% [ip,error_status]=loadTCVdata(shot,'Ip',1); -% [sxr,error_status,R]=loadTCVdata(shot,'sxR',1); -% - -varargout{1}=cell(1,1); -error_status=1; - -% To allow multiple ways of writing a specific keyword, use data_type_eff within this routine -if exist('data_type') && ~isempty(data_type) - data_type_eff=data_type; -else - data_type_eff=' '; -end -i_23=0; -% LIUQE tree -begstr = '\results::'; -endstr = ''; -liuqe_version = 1; -if length(data_type_eff)>2 - if strcmp(data_type_eff(end-1:end),'_2') | strcmp(data_type_eff(end-1:end),'_3') - i_23=2; - endstr=data_type_eff(end-1:end); - liuqe_version = str2num(data_type_eff(end:end)); - elseif strcmp(upper(data_type_eff(end-2:end)),'_-1') - i_23=3; - begstr = 'tcv_eq( "'; - endstr = '", "FBTE" )'; - liuqe_version = -1; - end -end -if shot==-1 || shot>=100000 - % requires FBTE - liuqe_version = -1; - begstr = 'tcv_eq( "'; - endstr = '", "FBTE" )'; -end - -% use keyword without eventual _2 or _3 extension to check for multiple possibilities -% Also remove ":4" for trial_indx specification -jj=strfind(data_type_eff,':'); -trialindx=[]; -if ~isempty(jj) - ii=strmatch(data_type_eff(1:jj-1),[{'teft'},{'neft'},{'teftav'},{'neftav'}]); - if ~isempty(ii) - trialindx=str2num(data_type_eff(jj+1:end)); - data_type_eff_noext=[data_type_eff(1:jj-1) ':trial']; - else - data_type_eff_noext=data_type_eff(1:end-i_23); - end -else - data_type_eff_noext=data_type_eff(1:end-i_23); -end - -if ~isempty(strmatch(data_type_eff_noext,[{'ip'} {'i_p'} {'xip'}],'exact')) - data_type_eff_noext='Ip'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'b0'} {'B_0'} {'Bgeom'} {'BGEOM'}],'exact')) - data_type_eff_noext='B0'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact')) - data_type_eff_noext='te'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Te_edge'} {'TE_edge'}],'exact')) - data_type_eff_noext='te_edge'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Ne_edge'} {'NE_edge'}],'exact')) - data_type_eff_noext='ne'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact')) - data_type_eff_noext='rcont'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Zcont'}],'exact')) - data_type_eff_noext='zcont'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Terho'}],'exact')) - data_type_eff_noext='terho'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Terhozshift'}],'exact')) - data_type_eff_noext='terhozshift'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'SXR'}],'exact')) - data_type_eff_noext='sxr'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) - data_type_eff_noext='ece'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact')) - data_type_eff_noext='vol'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'RHOVOL'}],'exact')) - data_type_eff_noext='rhovol'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'q_95'} {'Q95'}],'exact')) - data_type_eff_noext='q95'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'elongation'} {'elon'}],'exact')) - data_type_eff_noext='kappa'; -end -if ~isempty(strmatch(lower(data_type_eff_noext),[{'j_tor'} {'jtor'} {'\results::j_tor'}],'exact')) - data_type_eff_noext='jtor'; - data_type_eff = ['jtor' endstr]; -end -if ~isempty(strmatch(data_type_eff_noext,[{'triangularity'} {'triang'}],'exact')) - data_type_eff_noext='delta'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'deltaup'} {'deltau'} {'triangtop'} {'triangu'} {'triangup'}],'exact')) - data_type_eff_noext='deltatop'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'deltalow'} {'deltal'} {'triangbot'} {'triangl'} {'trianglow'}],'exact')) - data_type_eff_noext='deltabot'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Rmag'}],'exact')) - data_type_eff_noext='rmag'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Zmag'}],'exact')) - data_type_eff_noext='zmag'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'MPX'}],'exact')) - data_type_eff_noext='MPX'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'ioh'} {'Ioh'} {'iot'} {'IOT'}],'exact')) - data_type_eff_noext='IOH'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Vloop'} {'Vsurf'} {'vsurf'}],'exact')) - data_type_eff_noext='vloop'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'vtor'} {'v_tor'} {'vi'} {'vc'} {'v_i'} {'v_c'} {'VTOR'} {'V_TOR'} {'VI'} {'VC'} {'V_I'} {'V_C'}],'exact')) - data_type_eff_noext='vi_tor'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'vtorfit'} {'vtorft'} {'v_torfit'} {'vifit'} {'vcfit'} {'v_ifit'} {'v_cfit'} {'VTORfit'} {'V_TORfit'} {'VIfit'} {'VCfit'} {'V_Ifit'} {'V_Cfit'}],'exact')) - data_type_eff_noext='vi_torfit'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'vpol'} {'v_pol'} {'VPOL'} {'V_POL'}],'exact')) - data_type_eff_noext='vi_pol'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'vpolfit'} {'vpolft'} {'v_polfit'} {'VPOLfit'} {'V_POLfit'}],'exact')) - data_type_eff_noext='vi_polfit'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Ti'} {'ti'} {'TC'} {'tc'} {'T_C'} {'t_c'}],'exact')) - data_type_eff_noext='Ti'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Tifit'} {'tifit'} {'TCfit'} {'tcfit'} {'T_Cfit'} {'t_cfit'}],'exact')) - data_type_eff_noext='Tifit'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Ni'} {'ni'} {'NC'} {'nc'} {'N_C'} {'n_c'}],'exact')) - data_type_eff_noext='ni'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Nifit'} {'nifit'} {'NCfit'} {'ncfit'} {'N_Cfit'} {'n_cfit'}],'exact')) - data_type_eff_noext='nifit'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Zeffcxrs'} {'zeffcxrs'} {'Z_effcxrs'} {'z_effcxrs'} {'Zeff_cxrs'} {'zeff_cxrs'} {'Z_eff_cxrs'} {'z_eff_cxrs'}],'exact')) - data_type_eff_noext='zeffcxrs'; -end -if ~isempty(strmatch(data_type_eff_noext,[{'Zeffcxrsfit'} {'zeffcxrsfit'} {'Z_effcxrsfit'} {'z_effcxrsfit'} {'Zeff_cxrsfit'} {'zeff_cxrsfit'} {'Z_eff_cxrsfit'} {'z_eff_cxrsfit'}],'exact')) - data_type_eff_noext='zeffcxrsfit'; -end - -% some defaults - -% nodes which have _2 and _3 equivalence, related to simpletdi case -liuqe23=[{'\results::area'} {'\results::beta_pol'} {'\results::beta_tor'} ... - {'\results::delta_95'} {'\results::delta_95_bot'} {'\results::delta_95_top'} ... - {'\results::delta_edge'} {'\results::delta_ed_bot'} {'\results::delta_ed_top'} ... - {'\results::diamag'} {'\results::i_p'} {'\results::j_tor'} ... - {'\results::kappa_95'} {'\results::kappa_edge'} {'\results::kappa_zero'} ... - {'\results::lambda'} {'\results::l_i'} {'\results::psi_axis'} {'\results::psi_values'} ... - {'\results::q_95'} {'\results::q_edge'} {'\results::q_zero'} {'\results::rms_error'} ... - {'\results::z_axis'} {'\results::r_axis'} {'\results::q_psi'} ... - {'\results::total_energy'} {'\results::tor_flux'} {'\results::volume'} ... - {'\results::r_contour'} {'\results::z_contour'} ... - {'\results::thomson:psiscatvol'} {'\results::thomson:psi_max'}]; - -% nodes which have FBTE equivalence, related to simpletdi case -liuqeFBTE=[{'\results::i_p'} {'\results::z_axis'} {'\results::r_axis'} {'\results::q_psi'} ... - {'\results::beta_tor'} {'\results::beta_pol'} {'\results::q_95'} {'\results::l_i'} {'\results::delta_95'} ... - {'\results::kappa_95'} {'\results::r_contour'} {'\results::z_contour'} {'\results::psi_axis'}]; - -% keywords which do not have FBTE equivalence and are returned empty -noFBTE=[{'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... - {'neft'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'neint'} {'nel'} ... - {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'Ti'} {'Tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}]; - -% all keywords and corresponding case to run below -TCVkeywrdall=[{'Ip'} {'B0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ... - {'delta'} {'deltatop'} {'deltabot'} {'neint'} {'nel'} ... - {'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... - {'neft'} {'teft'} {'neftav'} {'teftav'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} ... - {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'} {'jtor'} {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'Ti'} {'Tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}]; - -TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact'); -TCVsig.iB0=strmatch('B0',TCVkeywrdall,'exact'); -TCVsig.izmag=strmatch('zmag',TCVkeywrdall,'exact'); -TCVsig.irmag=strmatch('rmag',TCVkeywrdall,'exact'); -TCVsig.ircont=strmatch('rcont',TCVkeywrdall,'exact'); -TCVsig.izcont=strmatch('zcont',TCVkeywrdall,'exact'); -TCVsig.ivol=strmatch('vol',TCVkeywrdall,'exact'); -TCVsig.irhovol=strmatch('rhovol',TCVkeywrdall,'exact'); -TCVsig.iqrho=strmatch('qrho',TCVkeywrdall,'exact'); -TCVsig.iq95=strmatch('q95',TCVkeywrdall,'exact'); -TCVsig.ikappa=strmatch('kappa',TCVkeywrdall,'exact'); -TCVsig.idelta=strmatch('delta',TCVkeywrdall,'exact'); -TCVsig.ideltatop=strmatch('deltatop',TCVkeywrdall,'exact'); -TCVsig.ideltabot=strmatch('deltabot',TCVkeywrdall,'exact'); -TCVsig.ineint=strmatch('neint',TCVkeywrdall,'exact'); -TCVsig.inel=strmatch('nel',TCVkeywrdall,'exact'); -TCVsig.ine=strmatch('ne',TCVkeywrdall,'exact'); -TCVsig.ite=strmatch('te',TCVkeywrdall,'exact'); -TCVsig.ine_edge=strmatch('ne_edge',TCVkeywrdall,'exact'); -TCVsig.ite_edge=strmatch('te_edge',TCVkeywrdall,'exact'); -TCVsig.inerho=strmatch('nerho',TCVkeywrdall,'exact'); -TCVsig.iterho=strmatch('terho',TCVkeywrdall,'exact'); -TCVsig.inerho_edge=strmatch('nerho_edge',TCVkeywrdall,'exact'); -TCVsig.iterho_edge=strmatch('terho_edge',TCVkeywrdall,'exact'); -TCVsig.inerhozshift=strmatch('nerhozshift',TCVkeywrdall,'exact'); -TCVsig.iterhozshift=strmatch('terhozshift',TCVkeywrdall,'exact'); -TCVsig.iprofnerho=strmatch('profnerho',TCVkeywrdall,'exact'); -TCVsig.iprofterho=strmatch('profterho',TCVkeywrdall,'exact'); -TCVsig.ineft=strmatch('neft',TCVkeywrdall,'exact'); -TCVsig.ineft_trial=strmatch('neft:trial',TCVkeywrdall); -TCVsig.iteft=strmatch('teft',TCVkeywrdall,'exact'); -TCVsig.iteft_trial=strmatch('teft:trial',TCVkeywrdall); -TCVsig.ineftav=strmatch('neftav',TCVkeywrdall,'exact'); -TCVsig.ineftav_trial=strmatch('neftav:trial',TCVkeywrdall); -TCVsig.iteftav=strmatch('teftav',TCVkeywrdall,'exact'); -TCVsig.iteftav_trial=strmatch('teftav:trial',TCVkeywrdall); -TCVsig.isxr=strmatch('sxr',TCVkeywrdall,'exact'); -TCVsig.isxR=strmatch('sxR',TCVkeywrdall,'exact'); -TCVsig.iece=strmatch('ece',TCVkeywrdall,'exact'); -TCVsig.iMPX=strmatch('MPX',TCVkeywrdall,'exact'); -TCVsig.iIOH=strmatch('IOH',TCVkeywrdall,'exact'); -TCVsig.ivloop=strmatch('vloop',TCVkeywrdall,'exact'); -TCVsig.ipgyro=strmatch('pgyro',TCVkeywrdall,'exact'); -TCVsig.ijtor=strmatch('jtor',TCVkeywrdall,'exact'); -TCVsig.ivi_tor=strmatch('vi_tor',TCVkeywrdall,'exact'); -TCVsig.ivi_torfit=strmatch('vi_torfit',TCVkeywrdall,'exact'); -TCVsig.ivi_pol=strmatch('vi_pol',TCVkeywrdall,'exact'); -TCVsig.ivi_polfit=strmatch('vi_polfit',TCVkeywrdall,'exact'); -TCVsig.iTi=strmatch('Ti',TCVkeywrdall,'exact'); -TCVsig.iTifit=strmatch('Tifit',TCVkeywrdall,'exact'); -TCVsig.ini=strmatch('ni',TCVkeywrdall,'exact'); -TCVsig.inifit=strmatch('nifit',TCVkeywrdall,'exact'); -TCVsig.izeffcxrs=strmatch('zeffcxrs',TCVkeywrdall,'exact'); -TCVsig.izeffcxrsfit=strmatch('zeffcxrsfit',TCVkeywrdall,'exact'); - -% For each keyword, specify which case to use. As most common is 'simpletdi', fill in with this and change -% only indices needed. Usually use name of case same as keyword name -TCVkeywrdcase=cell(size(TCVkeywrdall)); -TCVkeywrdcase(:)={'simpletdi'}; -TCVkeywrdcase(TCVsig.iB0)=TCVkeywrdall(TCVsig.iB0); % through iphi -TCVkeywrdcase(TCVsig.iqrho)=TCVkeywrdall(TCVsig.iqrho); % special as liuqe q_psi on psi -TCVkeywrdcase(TCVsig.ivol)=TCVkeywrdall(TCVsig.ivol); % special as nodes _2 or _3 not existing with psitbx -TCVkeywrdcase(TCVsig.irhovol)=TCVkeywrdall(TCVsig.irhovol); % idem vol -TCVkeywrdcase(TCVsig.ine)=TCVkeywrdall(TCVsig.ine); % special as dimensions from other nodes -TCVkeywrdcase(TCVsig.ite)=TCVkeywrdall(TCVsig.ite); % idem -TCVkeywrdcase(TCVsig.ine_edge)=TCVkeywrdall(TCVsig.ine_edge); % special as dimensions from other nodes -TCVkeywrdcase(TCVsig.ite_edge)=TCVkeywrdall(TCVsig.ite_edge); % idem -TCVkeywrdcase(TCVsig.inerho)=TCVkeywrdall(TCVsig.inerho); % idem -TCVkeywrdcase(TCVsig.inerho_edge)=TCVkeywrdall(TCVsig.inerho_edge); % idem -TCVkeywrdcase(TCVsig.iteft_trial)=TCVkeywrdall(TCVsig.iteft_trial); % special to extract trial_indx if needed -TCVkeywrdcase(TCVsig.ineft_trial)=TCVkeywrdall(TCVsig.ineft_trial); % special to extract trial_indx if needed -TCVkeywrdcase(TCVsig.iteftav_trial)=TCVkeywrdall(TCVsig.iteftav_trial); % special to extract trial_indx if needed -TCVkeywrdcase(TCVsig.ineftav_trial)=TCVkeywrdall(TCVsig.ineftav_trial); % special to extract trial_indx if needed -TCVkeywrdcase(TCVsig.iterho)=TCVkeywrdall(TCVsig.iterho); % idem -TCVkeywrdcase(TCVsig.iterho_edge)=TCVkeywrdall(TCVsig.iterho_edge); % idem -TCVkeywrdcase(TCVsig.inerhozshift)=TCVkeywrdall(TCVsig.inerhozshift); % idem -TCVkeywrdcase(TCVsig.iterhozshift)=TCVkeywrdall(TCVsig.iterhozshift); % idem -TCVkeywrdcase(TCVsig.iprofnerho)=TCVkeywrdall(TCVsig.iprofnerho); -TCVkeywrdcase(TCVsig.iprofterho)=TCVkeywrdall(TCVsig.iprofterho); -TCVkeywrdcase(TCVsig.isxr)=TCVkeywrdall(TCVsig.isxr); -TCVkeywrdcase(TCVsig.isxR)=TCVkeywrdall(TCVsig.isxR); -TCVkeywrdcase(TCVsig.iece)=TCVkeywrdall(TCVsig.iece); -TCVkeywrdcase(TCVsig.iMPX)=TCVkeywrdall(TCVsig.iMPX); -TCVkeywrdcase(TCVsig.iIOH)=TCVkeywrdall(TCVsig.iIOH); -TCVkeywrdcase(TCVsig.ivloop)=TCVkeywrdall(TCVsig.ivloop); -TCVkeywrdcase(TCVsig.ipgyro)=TCVkeywrdall(TCVsig.ipgyro); -TCVkeywrdcase(TCVsig.ijtor)=TCVkeywrdall(TCVsig.ijtor); -TCVkeywrdcase(TCVsig.ivi_tor)=TCVkeywrdall(TCVsig.ivi_tor); -TCVkeywrdcase(TCVsig.ivi_torfit)=TCVkeywrdall(TCVsig.ivi_torfit); -TCVkeywrdcase(TCVsig.ivi_pol)=TCVkeywrdall(TCVsig.ivi_pol); -TCVkeywrdcase(TCVsig.ivi_polfit)=TCVkeywrdall(TCVsig.ivi_polfit); -TCVkeywrdcase(TCVsig.iTi)=TCVkeywrdall(TCVsig.iTi); -TCVkeywrdcase(TCVsig.iTifit)=TCVkeywrdall(TCVsig.iTifit); -TCVkeywrdcase(TCVsig.ini)=TCVkeywrdall(TCVsig.ini); -TCVkeywrdcase(TCVsig.inifit)=TCVkeywrdall(TCVsig.inifit); -TCVkeywrdcase(TCVsig.izeffcxrs)=TCVkeywrdall(TCVsig.izeffcxrs); -TCVkeywrdcase(TCVsig.izeffcxrsfit)=TCVkeywrdall(TCVsig.izeffcxrsfit); - -% Information about which dimension has time, always return 2D data as (x,t) array -% as most are 1D arrays with time as first index, fill in with ones and change only those needed -TCVsigtimeindx=ones(size(TCVkeywrdall)); - -% For the 'simpletdi' cases, we need the full node in case gdat was called with full location directly -% for the other cases, leave this location empty -TCVsiglocation=cell(size(TCVkeywrdall)); -TCVsiglocation(:)={''}; -TCVsiglocation(TCVsig.iip)={'\results::i_p'}; -TCVsiglocation(TCVsig.izmag)={'\results::z_axis'}; -TCVsiglocation(TCVsig.irmag)={'\results::r_axis'}; -TCVsiglocation(TCVsig.ircont)={'\results::r_contour'}; TCVsigtimeindx(TCVsig.ircont)=2; -TCVsiglocation(TCVsig.izcont)={'\results::z_contour'}; TCVsigtimeindx(TCVsig.izcont)=2; -TCVsiglocation(TCVsig.iq95)={'\results::q_95'}; -TCVsiglocation(TCVsig.ikappa)={'\results::kappa_edge'}; -TCVsiglocation(TCVsig.idelta)={'\results::delta_edge'}; -TCVsiglocation(TCVsig.ideltatop)={'\results::delta_ed_top'}; -TCVsiglocation(TCVsig.ideltabot)={'\results::delta_ed_bot'}; -TCVsiglocation(TCVsig.ineint)={'\results::fir:lin_int_dens'}; -TCVsiglocation(TCVsig.inel)={'\results::fir:n_average'}; -%TCVsiglocation(TCVsig.iprofnerho)={'\results::THOMSON.PROFILES.AUTO:ne'}; -%TCVsiglocation(TCVsig.iprofterho)={'\results::THOMSON.PROFILES.AUTO:te'}; -TCVsiglocation(TCVsig.ineft)={'\results::proffit.local_time:neft_abs'}; TCVsigtimeindx(TCVsig.ineft)=2; -TCVsiglocation(TCVsig.iteft)={'\results::proffit.local_time:teft'}; TCVsigtimeindx(TCVsig.iteft)=2; -TCVsiglocation(TCVsig.ineftav)={'\results::proffit.avg_time:neft_abs'}; TCVsigtimeindx(TCVsig.ineftav)=2; -TCVsiglocation(TCVsig.iteftav)={'\results::proffit.avg_time:teft'}; TCVsigtimeindx(TCVsig.iteftav)=2; -TCVsiglocation(TCVsig.ineft_trial)=TCVsiglocation(TCVsig.ineft); TCVsigtimeindx(TCVsig.ineft_trial)=2; -TCVsiglocation(TCVsig.iteft_trial)=TCVsiglocation(TCVsig.iteft); TCVsigtimeindx(TCVsig.iteft_trial)=2; -TCVsiglocation(TCVsig.ineftav_trial)=TCVsiglocation(TCVsig.ineftav); TCVsigtimeindx(TCVsig.ineftav_trial)=2; -TCVsiglocation(TCVsig.iteftav_trial)=TCVsiglocation(TCVsig.iteftav); TCVsigtimeindx(TCVsig.iteftav_trial)=2; - -if shot==-9 - clear trace - for i=1:length(TCVkeywrdall) - fieldname_eff = lower(TCVkeywrdall{i}); - keyword_eff = TCVkeywrdall{i}; - ij=findstr(fieldname_eff,':'); - if ~isempty(ij); - fieldname_eff(ij)='_'; - keyword_eff(ij:end+1)=[':i' keyword_eff(ij+1:end)] ; - end - trace.(fieldname_eff) = keyword_eff; - end - % add example for Ip trace full call - trace.ipfullcall = TCVsiglocation{TCVsig.iip}; - % trace.data=[]; - return -end - -% initialize order of substructures and allows just a "return" if data empty -trace.data=[]; -trace.x=[]; -trace.t=[]; -trace.dim=[]; -trace.dimunits=[]; -trace.units=[]; -iprintwarn=0; -% find index of signal called upon -if strcmp(data_type_eff(1:1),'\') - % in case full node name was given - index=strmatch(data_type_eff(1:end-i_23),TCVsiglocation,'exact'); - if iprintwarn & isempty(index) - disp('********************') - disp('trace not yet registered.') - disp('If standard data, ask olivier.sauter@epfl.ch to create a keyqord entry for this data') -% eval(['!mail -s ''' data_type_eff ' ' num2str(shot) ' ' getenv('USER') ' TCV'' olivier.sauter@epfl.ch < /dev/null']) - disp('********************') - elseif isempty(index) - % temporarily add entry in arrays, so can work below - index=length(TCVkeywrdall)+1; - TCVkeywrdall(end+1)={'new'}; - TCVkeywrdcase(end+1)={'simpletdi'}; - TCVsiglocation(end+1)={data_type_eff(1:end-i_23)}; - TCVsigtimeindx(end+1)=0; - elseif ~strcmp(TCVkeywrdcase{index},'simpletdi') - msgbox(['Problem in loadTCVdata with data_type_eff = ' data_type_eff ... - '. Full paths of nodes should only be for case simpletdi'],'in loadTCVdata','error') - error('in loadTCVdata') - end -else - index=strmatch(data_type_eff_noext,TCVkeywrdall,'exact'); - if isempty(index) - disp(' ') - disp('********************') - disp(['no such keyword: ' data_type_eff(1:end-i_23)]) - disp(' ') - disp('Available keywords:') - TCVkeywrdall(:) - disp('********************') - return - end - if liuqe_version==-1 && ~isempty(strmatch(TCVkeywrdall{index},noFBTE,'exact')) - disp(['node ' TCVkeywrdall{index} ' not defined within FBTE']) - return - end -end -if iprintwarn - disp(['loading' ' ' data_type_eff_noext ' from TCV shot #' num2str(shot)]); - disp(['case ' TCVkeywrdcase{index}]) -end -if i_23==2 & isempty(strmatch(TCVsiglocation(index),liuqe23,'exact')) & strcmp(TCVkeywrdcase{index},'simpletdi') - disp('********') - disp('Warning asks for liuqe 2 or 3 of a signal, but not in liuqe23 list in loadTCVdata') -% eval(['!mail -s ''' data_type_eff ' ' num2str(shot) ' ' getenv('USER') ' TCV: not in liuqe23 list'' olivier.sauter@epfl.ch < /dev/null']) - disp('********') -end - -status=ones(1,100); -zmag=cell(0,0); -nargineff=nargin; -if iprintwarn - disp('TCVsiglocation{index} in loadTCVdata') - TCVsiglocation{index} -end - -switch TCVkeywrdcase{index} - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'simpletdi' - - % load TCV other data - if liuqe_version==-1 - mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS. - else - mdsopen(shot); - % test if node exists - error_status=1; - ij=findstr(TCVsiglocation{index},'['); - if isempty(ij); ij=length(TCVsiglocation{index})+1; end - if eval(['~mdsdata(''node_exists("\' TCVsiglocation{index}(1:ij-1) '")'')']) - disp(['node ' TCVsiglocation{index}(1:ij-1) ' does not exist for shot = ' num2str(shot)]) - return -% $$$ elseif eval(['mdsdata(''getnci("\' nodenameeff ':foo","length")'')==0']) -% $$$ disp(['no data for node ' nodenameeff ' for shot = ' num2str(shot)]) -% $$$ return - end - end - if strcmp(TCVsiglocation{index}(1:9),'\psitbx::') - begstr = 'tcv_psitbx("'; - nodenameeff=[begstr TCVsiglocation{index}(10:end) endstr]; - elseif length(TCVsiglocation{index})>16 && strcmp(TCVsiglocation{index}(1:16),'\results::psitbx') - begstr = 'tcv_psitbx("'; - nodenameeff=[begstr TCVsiglocation{index}(18:end) endstr]; - elseif strcmp(TCVsiglocation{index}(1:10),'\results::') - nodenameeff=[begstr TCVsiglocation{index}(11:end) endstr]; - else - nodenameeff=TCVsiglocation{index}; - disp(['should not have gone through here, mention this example to O. Sauter']); - end - tracetdi=tdi(nodenameeff); - mdsclose; - if isempty(tracetdi.data) || (~iscell(tracetdi.data) && isnan(tracetdi.data)) - disp(['node ' nodenameeff ' is empty for shot = ' num2str(shot)]) - return - end - trace.data=tracetdi.data; - - if length(tracetdi.dim)==0 - % scalar - trace.x=[]; - trace.t=[]; - elseif TCVsigtimeindx(index)>0 | length(tracetdi.dim)==1 - trace.t=tracetdi.dim{max(1,TCVsigtimeindx(index))}; - ix=3-TCVsigtimeindx(index); % works only for 2D arrays - else - % if dim=41 assumes is x (usual for TCV) - if length(tracetdi.dim{1})==41 - ix=1; - trace.t=tracetdi.dim{2}; - elseif length(tracetdi.dim{2})==41 - ix=2; - trace.t=tracetdi.dim{1}; - elseif length(tracetdi.dim)==2 - % if one has 2D or more and the other 1D, assume rho is 2D or more and time is 1D - if min(size(tracetdi.dim{1}))==1 && (min(size(tracetdi.dim{2}))>1 || length(size(tracetdi.dim{2}))>2) - ix=2; - trace.t=tracetdi.dim{1}; - disp(['assumes time array is 1D array, so x from dim{' num2str(ix) '}']) - elseif min(size(tracetdi.dim{2}))==1 && (min(size(tracetdi.dim{1}))>1 || length(size(tracetdi.dim{1}))>2) - ix=1; - trace.t=tracetdi.dim{2}; - disp(['assumes time array is 1D array, so x from dim{' num2str(ix) '}']) - elseif tracetdi.dim{1}(end)<1.1 && tracetdi.dim{2}(end)>1.1 - ix=1; - trace.t=tracetdi.dim{2}; - disp(['assumes x array is 1D array with max <1.1']) - elseif tracetdi.dim{1}(end)>1.1 && tracetdi.dim{2}(end)<1.1 - ix=2; - trace.t=tracetdi.dim{1}; - disp(['assumes x array is 1D array with max <1.1']) - elseif length(size(tracetdi.dim{1}))==2 && min(size(tracetdi.dim{1}))==1 && length(size(tracetdi.dim{2}))==2 && min(size(tracetdi.dim{2}))==1 - % if both are 1D arrays, assumes time array with values having most number of digits - ab1=num2str(tracetdi.dim{1}-fix(tracetdi.dim{1})); - ab2=num2str(tracetdi.dim{2}-fix(tracetdi.dim{2})); - if size(ab1,2)<size(ab2,2); - ix=1; - trace.t=tracetdi.dim{2}; - else - ix=2; - trace.t=tracetdi.dim{1}; - end - disp(['assumes time array has more digits, so x from dim{' num2str(ix) '}']) - end - end - end - if length(tracetdi.dim)==2 - trace.x=tracetdi.dim{ix}; - % make sure data is of (x,t) - if ix==2 - % transpose data - trace.data=trace.data'; - end - elseif length(tracetdi.dim)>2 - msgbox(['data more than 2D (data_type_eff=' data_type_eff ... - '), check how to save it, contact andrea.scarabosio@epfl.ch or olivier.sauter@epfl.ch'],... - 'in simpletdi','warn') - warning('in simpletdi of loadTCVdata') - else - if max(1,TCVsigtimeindx(index))~=1 - disp('Problems in loadTCVdata, max(1,TCVsigtimeindx(index)) should be 1') - end - end - if length(tracetdi.dim)==1 - trace.dim=[{trace.t}]; - trace.dimunits=tracetdi.dimunits(1); - elseif length(tracetdi.dim)==2 - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[tracetdi.dimunits(ix) ; tracetdi.dimunits((2-ix)+1)]; - else - trace.dim=tracetdi.dim; - trace.dimunits=tracetdi.dimunits; - end - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - - trace.name=[num2str(shot) ';' nodenameeff]; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'ne','te'} - % ne or Te from Thomson data on raw z mesh vs (z,t) - mdsopen(shot); - if strcmp(TCVkeywrdcase{index},'ne') - nodenameeff='\results::thomson:ne'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson:ne:error_bar'); - else - nodenameeff='\results::thomson:te'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson:te:error_bar'); - end - trace.data=tracetdi.data'; % Thomson data as (t,z) - trace.std=tracestd.data'; - trace.name=[num2str(shot) ';' nodenameeff]; - % add correct dimensions - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - z=mdsdata('\diagz::thomson_set_up:vertical_pos'); - trace.dim=[{z};{time}]; - trace.dimunits=[{'Z [m]'} ; {'time [s]'}]; - trace.x=z; - trace.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - mdsclose('mdsip'); - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'ne_edge','te_edge'} - % ne or Te from Thomson.edge data on raw z mesh vs (z,t) - mdsopen(shot); - if strcmp(TCVkeywrdcase{index},'ne_edge') - nodenameeff='\results::thomson.edge:ne'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson.edge:ne:error_bar'); - % trace_abs=tdi('\results::thomson.edge:fir_thom_rat'); - else - nodenameeff='\results::thomson.edge:te'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson.edge:te:error_bar'); - end - trace.data=tracetdi.data'; % Thomson.Edge data as (t,z) - trace.std=tracestd.data'; - trace.name=[num2str(shot) ';' nodenameeff]; - % add correct dimensions - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - z=mdsdata('\diagz::thomson_set_up.edge:vertical_pos'); - trace.dim=[{z};{time}]; - trace.dimunits=[{'Z [m]'} ; {'time [s]'}]; - trace.x=z; - trace.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - mdsclose('mdsip'); - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'nerho','terho'} - % ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t) - mdsopen(shot); - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if strcmp(TCVkeywrdcase{index},'nerho') - nodenameeff='\results::thomson:ne'; - tracetdi=tdi(nodenameeff); - if isempty(tracetdi.data) - ishot=mdsopen(shot) - tracetdi=tdi(nodenameeff) - end - nodenameeff='\results::thomson:ne; error_bar ; fir_thom_rat; (ne,std)*fir_thom_rat'; - tracestd=tdi('\results::thomson:ne:error_bar'); - if shot>=23801 - tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!! - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty') - end - else - tracefirrat=tdi('\results::thomson:fir_thom_rat'); - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty') - tracefirrat.dim{1}=[]; - else - tracefirrat.dim{1}=time; - end - end - if ~isempty(tracefirrat.data) || ischar(tracefirrat.data) - tracefirrat_data=NaN*ones(size(tracetdi.dim{1})); - itim=iround(time,tracefirrat.dim{1}); - tracefirrat_data(itim)=tracefirrat.data; - else - tracefirrat_data=NaN; - end - else - nodenameeff='\results::thomson:te'; - tracetdi=tdi(nodenameeff); - nodenameeff='\results::thomson:te; error_bar'; - tracestd=tdi('\results::thomson:te:error_bar'); - end - trace.data=tracetdi.data'; % Thomson data as (t,z) - trace.std=tracestd.data'; - if strcmp(TCVkeywrdcase{index},'nerho') - trace.firrat=tracefirrat_data; - trace.data_abs=trace.data*diag(tracefirrat_data); - trace.std_abs=trace.std*diag(tracefirrat_data); - end - trace.name=[num2str(shot) ';' nodenameeff]; - % add correct dimensions - % construct rho mesh - psi_max=tdi(['\results::thomson:psi_max' endstr]); - psiscatvol=tdi(['\results::thomson:psiscatvol' endstr]); - if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) && ~isempty(psi_max.data) && ~ischar(psi_max.data) - for ir=1:length(psiscatvol.dim{2}) - rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; - end - else - rho=NaN; - end - trace.dim=[{rho};{time}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - trace.x=rho; - trace.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'nerho_edge','terho_edge'} - % ne or Te from Thomson.Edge data on rho=sqrt(psi_normalised) mesh: (rho,t) - mdsopen(shot); - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if strcmp(TCVkeywrdcase{index},'nerho_edge') - nodenameeff='\results::thomson.edge:ne'; - tracetdi=tdi(nodenameeff); - if isempty(tracetdi.data) || ischar(tracetdi.data) - ishot=mdsopen(shot) - tracetdi=tdi(nodenameeff) - end - nodenameeff='\results::thomson.edge:ne; error_bar ; fir_thom_rat; (ne,std)*fir_thom_rat'; - tracestd=tdi('\results::thomson.edge:ne:error_bar'); - if shot>=23801 - tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!! - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty') - end - else - tracefirrat=tdi('\results::thomson.edge:fir_thom_rat'); - tracefirrat.dim{1}=time; - end - if ~isempty(tracetdi.dim) - tracefirrat_data=NaN*ones(size(tracetdi.dim{1})); - else - tracefirrat_data=[]; - end - if ~isempty(tracefirrat.data) && ~ischar(tracefirrat.data) - itim=iround(time,tracefirrat.dim{1}); - tracefirrat_data(itim)=tracefirrat.data; - end - else - nodenameeff='\results::thomson.edge:te'; - tracetdi=tdi(nodenameeff); - nodenameeff='\results::thomson.edge:te; error_bar'; - tracestd=tdi('\results::thomson.edge:te:error_bar'); - end - if ~ischar(tracetdi.data); trace.data=tracetdi.data'; end % Thomson.Edge data as (t,z) - trace.std=tracestd.data'; - if strcmp(TCVkeywrdcase{index},'nerho') - trace.firrat=tracefirrat_data; - trace.data_abs=trace.data*diag(tracefirrat_data); - trace.std_abs=trace.std*diag(tracefirrat_data); - end - trace.name=[num2str(shot) ';' nodenameeff]; - % add correct dimensions - % construct rho mesh - psi_max=tdi(['\results::thomson.edge:psi_max' endstr]); - psiscatvol=tdi(['\results::thomson.edge:psiscatvol' endstr]); - if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) - for ir=1:length(psiscatvol.dim{2}) - rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; - end - trace.dim=[{rho};{time}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - trace.x=rho; - trace.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - else - trace.dim={}; - trace.dimunits={}; - trace.x=[]; - trace.t=[]; - trace.units={}; - end - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'nerhozshift','terhozshift'} - % ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t) - % allow for z shift of equil - if nargin>=3 & ~isempty(varargin{1}) - zshift=varargin{1}; - else - zshift=0.; - end - mdsopen(shot); - try - time=mdsdata('\results::thomson:times'); - catch - warning('Problems with \results::thomson:times') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if isempty(time) || ischar(time) - thomsontimes=time - warning('!!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times is empty? Check') - disp(['!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ' TCVkeywrdcase{index}]) - return - end - if strcmp(TCVkeywrdcase{index},'nerhozshift') - nodenameeff='\results::thomson:ne'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson:ne:error_bar'); - if shot>=23801 - tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!! - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty') - end - else - tracefirrat=tdi('\results::thomson:fir_thom_rat'); - if isempty(tracefirrat.data) || ischar(tracefirrat.data) - disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty') - tracefirrat.dim{1}=[]; - else - tracefirrat.dim{1}=time; - end - end - if ~isempty(tracefirrat.data) || ischar(tracefirrat.data) - tracefirrat_data=NaN*ones(size(tracetdi.dim{1})); - itim=iround(time,tracefirrat.dim{1}); - tracefirrat_data(itim)=tracefirrat.data; - else - tracefirrat_data=NaN; - end - else - nodenameeff='\results::thomson:te'; - tracetdi=tdi(nodenameeff); - tracestd=tdi('\results::thomson:te:error_bar'); - end - trace.data=tracetdi.data'; % Thomson data as (t,z) - trace.std=tracestd.data'; - if strcmp(TCVkeywrdcase{index},'nerhozshift') - trace.firrat=tracefirrat_data; - trace.data_abs=trace.data*diag(tracefirrat_data); - trace.std_abs=trace.std*diag(tracefirrat_data); - end - trace.name=[num2str(shot) ';' nodenameeff]; - % add correct dimensions - % construct rho mesh - if strcmp(endstr,'_-1') - error(['in ' TCVkeywrdcase{index} ' endstr should not be ' endstr]); - end - psi_max=tdi(['\results::thomson:psi_max' endstr]); - psiscatvol=tdi(['\results::thomson:psiscatvol' endstr]); - if abs(zshift)>1e-5 - % calculate new psiscatvol - psitdi=tdi('\results::psi'); - rmesh=psitdi.dim{1}; - zmesh=psitdi.dim{2}; - zthom=mdsdata('dim_of(\thomson:te,1)'); - zeffshift=zshift; - % set zeffshift time array same as psitdi - switch length(zeffshift) - case 1 - zeffshift=zeffshift * ones(size(psitdi.dim{3})); - case length(psitdi.dim{3}) - % ok - case length(psiscatvol.dim{1}) - zeffshift=interp1(psiscatvol.dim{1},zeffshift,psitdi.dim{3}); - otherwise - disp(' bad time dimension for zshift') - disp(['it should be 1 or ' num2str(length(psiscatvol.dim{1})) ' or ' num2str(length(psitdi.dim{3}))]) - end - for it=1:length(psiscatvol.dim{1}) - itpsitdi=iround(psitdi.dim{3},psiscatvol.dim{1}(it)); - psirz=psitdi.data(:,:,itpsitdi); - psiscatvol0=griddata(rmesh,zmesh,psirz',0.9*ones(size(zthom)),zthom-zeffshift(itpsitdi)); - psiscatvol.data(it,:)=psiscatvol0; - end - end - if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) && ~isempty(psi_max.data) && ~ischar(psi_max.data) - for ir=1:length(psiscatvol.dim{2}) - rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; - end - else - rho=NaN; - end - trace.dim=[{rho};{time}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - trace.x=rho; - trace.t=time; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'profnerho','profterho'} - % vol from psitbx - mdsopen(shot); - error_status=1; - if strcmp(TCVkeywrdcase{index},'profnerho') - nodenameeff=['\results::THOMSON.PROFILES.AUTO:ne']; - avers=tdi('\results::THOMSON.PROFILES.AUTO:ne:version_num'); - end - if strcmp(TCVkeywrdcase{index},'profterho') - nodenameeff=['\results::THOMSON.PROFILES.AUTO:te']; - avers=tdi('\results::THOMSON.PROFILES.AUTO:te:version_num'); - end - if avers.data==0 - % may be because nodes not yet filled in, so call once a node - ab=tdi(nodenameeff); - avers=tdi([nodenameeff ':version_num']); - end - if avers.data>0 - tracetdi=tdi(nodenameeff); - if avers.data < 2.99 - % for earlier version the bug made it to have logically (rho,t) - if ~isempty(tracetdi.dim) && ~ischar(tracetdi.data) - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{2}; - error_status=0; - else - error_status=2; - trace.x=[]; - trace.t=[]; - end - else - trace.data=tracetdi.data'; % error in dimensions for autofits - if ~isempty(tracetdi.dim) && ~ischar(tracetdi.data) - disp('assumes dim{2} for x in THOMSON.PROFILES.AUTO') - trace.x=tracetdi.dim{2}; - trace.t=tracetdi.dim{1}; - error_status=0; - else - trace.x=[]; - trace.t=[]; - error_status=2; - end - end - else - tracetdi=avers; - trace.x=[]; - trace.t=[]; - end - trace.dim=[{trace.x};{trace.t}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) '; Thomson autfits from ' nodenameeff ]; - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'B0'} - % B0 at R0=0.88 - if liuqe_version==-1 - % mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS. - mdsopen(shot) - nodenameeff = 'tcv_eq("BZERO","FBTE")'; - tracetdi=tdi(nodenameeff); - trace.data = tracetdi.data; - trace.t = tracetdi.dim{1}; - - else - mdsopen(shot); - nodenameeff=['\magnetics::iphi']; - tracetdi=tdi(nodenameeff); - R0EXP=0.88; - trace.data=192.E-07 * 0.996 *tracetdi.data/R0EXP; - trace.t=tracetdi.dim{1}; - end - trace.x=[]; -%keyboard - trace.dim=[{trace.t}]; - trace.dimunits=[{'time [s]'}]; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff]; - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'qrho'} - % q profile on psi from liuqe - if liuqe_version==-1 - mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS. - else - mdsopen(shot); - end - nodenameeff=[begstr 'q_psi' endstr]; - tracetdi=tdi(nodenameeff); - trace.data=tracetdi.data; - trace.x=sqrt(tracetdi.dim{1}/(length(tracetdi.dim{1})-1)); - trace.t=tracetdi.dim{2}; - trace.dim=[{trace.x};{trace.t}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff]; - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'vol'} - % vol from psitbx - if liuqe_version==-1 - begstr = 'tcv_psitbx("'; - mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS. - nodenameeff=[begstr 'vol' endstr]; - tracetdi=tdi(nodenameeff); - else - mdsopen(shot); - nodenameeff=['\results::psitbx:vol']; - tracetdi=tdi(nodenameeff); - if i_23==2 - ['LIUQE' endstr(2:2)] - psi=psitbxtcv(shot,'+0',['LIUQE' endstr(2:2)]); - fsd=psitbxp2p(psi,'FS'); - fsg=psitbxfsg(fsd); - tracetdi.data = fsg.vol.x; - tracetdi.dim{1}=fsg.vol.grid.x{:}'; - tracetdi.dim{2}=fsg.vol.grid.t'; - end - end - trace.data=tracetdi.data; - if isempty(tracetdi.data) || ischar(tracetdi.data) - trace.x=tracetdi.dim; - trace.t=tracetdi.dim; - trace.dim=tracetdi.dim; - else - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{2}; - trace.dim=[{trace.x};{trace.t}]; - end - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff '_' num2str(liuqe_version)]; - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'rhovol'} - % vol from psitbx - if liuqe_version==-1 - begstr = 'tcv_psitbx("'; - mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS. - nodenameeff=[begstr 'vol' endstr]; - tracetdi=tdi(nodenameeff); - else - mdsopen(shot); - nodenameeff=['\results::psitbx:vol']; - tracetdi=tdi(nodenameeff); - if i_23==2 - ['LIUQE' endstr(2:2)] - psi=psitbxtcv(shot,'+0',['LIUQE' endstr(2:2)]); - fsd=psitbxp2p(psi,'FS'); - fsg=psitbxfsg(fsd); - tracetdi.data = fsg.vol.x; - tracetdi.dim{1}=fsg.vol.grid.x{:}'; - tracetdi.dim{2}=fsg.vol.grid.t'; - end - end - trace.data=tracetdi.data; - for i=1:size(tracetdi.data,2) - trace.data(:,i)=sqrt(tracetdi.data(:,i)./tracetdi.data(end,i)); - end - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{2}; - trace.dim=[{trace.x};{trace.t}]; - trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) '; sqrt(V/Va) from ' nodenameeff '_' num2str(liuqe_version)]; - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'sxr','sxR'} - % load TCV soft x-ray data - if nargin>=3 & ~isempty(varargin{1}) - i1=varargin{1}(1); - i2=varargin{1}(2); - else - i1=1; - i2=20; - end - if nargin>=4 & ~isempty(varargin{2}) - status=varargin{2}; - else - status=ones(i2-i1+1,1); - end - - % camera selection: 1-10. each camera has 20 channels - icamera=[0 1 0 0 0 0 0 0 0 0]; %index of the camera to use - if ~isempty(find(status(1:20*icamera*ones(10,1)) == 1)) - [fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(1,icamera); - % calculating intersection of the view lines with magnetic axis - if strcmp(data_type_eff,'sxR') - if nargin>=5 & ~isempty(varargin{3}) - zmag=varargin{3}; - else - zmag=loadTCVdata(shot,['zmag' '_' num2str(liuqe_version)]); - end - t_1=zmag.t(1); - t_2=zmag.t(end); - [xtomo_signal,t]=get_xtomo_data(shot,t_1,t_2,13e-6*16,icamera,angfact); - data=interp1(zmag.t,zmag.data,t'); - radius.data=VsxrTCVradius(data,xchord,ychord)'; - radius.t=t'; - varargout{1}={radius}; - trace.R=radius.data; - else - t_1=0.001; - t_2=3; - [xtomo_signal,t]=get_xtomo_data(shot,t_1,t_2,13e-6*16, ... - icamera,angfact); - end - end - trace.data=xtomo_signal; - trace.x=[1:size(trace.data,1)]'; - trace.t=t'; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'channel #'} ; {'time [s]'}]; - trace.name=[num2str(shot) ';' 'get_xtomo_data']; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'ece' - % load TCV ECE data - % Status=1 => Not Read Yet - mdsopen(shot); - if ~isempty(find(status == 1)) - if eval(['~mdsdata(''node_exists("\\RESULTS::ECE:rho")'')']) - disp(['node \RESULTS::ECE:rho does not exist for shot = ' num2str(shot)]) - return - end - if eval(['mdsdata(''getnci("\\RESULTS::ECE:rho","length")'')==0']) - disp(['no data for \RESULTS::ECE:rho for shot = ' num2str(shot)]) - return - end - [TE_ECE,TE_ECE_ERR,RHO,R,T,TE_THOM,TE_THOM_ERR,Fcentral,CAL]=ece_te ... - (shot,[0.1 0.29],10,10); - end - a=min(find(R(:,1)>=0)); - b=max(find(R(:,1)>=0)); - trace.data=TE_ECE(a:b,:)'; - trace.t=T(a:b); - trace.x=[1:size(trace.data,1)]'; - trace.dim=[{trace.x} ; {trace.t}]; - trace.dimunits=[{'channel #'} ; {'time [s]'}]; - trace.R=R(a:b,:)'; - trace.name=[num2str(shot) ';' '\results::ece...']; - radius.data=trace.R; - radius.t=trace.t; - varargout{1}={radius}; - error_status=0; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - mdsclose; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'MPX' - % load TCV MPX data - % Status=1 => Not Read Yet - if isempty(zmag) - zmag=loadTCVdata(shot,'zmag'); - end - t_1=zmag.t(1); - t_2=zmag.t(end); - if ~isempty(find(status == 1)) - mdsopen(shot); - keyboard - signal=get_mds_mio('MPX',[t_1 t_2]); - mdsclose; - trace.data=signal.data; - for i=1:size(signal.dim{2},2) - trace.t(:,i)=signal.dim{1}; - end - end - trace.dim{1}={trace.t}; - trace.dimunits={'time [s]'}; - trace.name=[num2str(shot) ';' 'get_mds_mio(MPX)']; - [xchord,ychord]=mpx_geometry; - varargout{1}={VsxrTCVradius(zmag.data,xchord,ychord)}; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'IOH' - % Ohmic transformer current - mdsopen(shot); - nodenameeff=[{'\magnetics::ipol[*,$1]'} {'OH_001'}]; - tracetdi=tdi(nodenameeff{:}); - trace.data=tracetdi.data; - trace.x=[]; - trace.t=tracetdi.dim{1}; - trace.dim=tracetdi.dim; - trace.dimunits={'time [s]'}; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff{1} ',' nodenameeff{2}]; - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'vloop' - % Loop voltage - mdsopen(shot); - nodenameeff=[{'\magnetics::vloop[*,$1]'} {'001'}]; - tracetdi=tdi(nodenameeff{:}); - trace.data=tracetdi.data; - trace.x=[]; - trace.t=tracetdi.dim{1}; - trace.dim=tracetdi.dim; - trace.dimunits={'time [s]'}; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff{1} ',' nodenameeff{2}]; - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'pgyro' - % ECH power for each gyro(1:9) and total (10) - mdsopen(shot); - nodenameeff=[{'\results::toray.input:p_gyro'}]; - tracetdi=tdi(nodenameeff{:}); - trace.data=tracetdi.data; - trace.x=[]; - trace.t=tracetdi.dim{1}; - trace.dim=tracetdi.dim; - trace.dimunits=tracetdi.dimunits; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff]; - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case 'jtor' - % \results::j_tor , 3-D so need to specify time dim index - mdsopen(shot); - nodenameeff=[{'\results::j_tor'} endstr]; - tracetdi=tdi(nodenameeff{:}); - trace.data=tracetdi.data; - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{3}; - trace.dim=tracetdi.dim; - trace.dimunits=tracetdi.dimunits; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff]; - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'neft:trial','teft:trial','neftav:trial','teftav:trial'} - % trial indx - mdsopen(shot); - eval(['nodenameeff={''' TCVsiglocation{index} ':trial''};']); - tracetdi=tdi(nodenameeff{:}); - if isempty(trialindx) - error('trialindx should not be empty, check call or ask O. Sauter'); - end - trace.data=tracetdi.data(:,:,trialindx+1); - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{2}; - trace.dim=tracetdi.dim(1:2); - trace.dimunits=tracetdi.dimunits(1:2); - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ' ; ' nodenameeff{:} ' ; trialindx=' num2str(trialindx) ]; - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - case {'vi_tor', 'vi_torfit', 'vi_pol', 'vi_polfit', 'Ti', 'Tifit', 'ni', 'nifit', 'zeffcxrs', 'zeffcxrsfit'} - proffit = ''; - kwd_eff = TCVkeywrdcase{index}; - ii=strfind(kwd_eff,'fit'); - if ~isempty(ii); - proffit = ':proffit'; - kwd_eff = kwd_eff(1:ii-1); - end - if strcmp(kwd_eff,'zeffcxrs'); kwd_eff = 'zeff'; end - mdsopen(shot); - eval(['nodenameeff=''\results::cxrs' proffit ':' kwd_eff endstr ''';']); - tracetdi=tdi(nodenameeff); - trace.data=tracetdi.data; - if length(tracetdi.dim)>1; - trace.x=tracetdi.dim{1}; - trace.t=tracetdi.dim{2}; - else - trace.x=[]; - trace.t=[]; - end - trace.dim=tracetdi.dim; - trace.dimunits=tracetdi.dimunits; - % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work - if any(strcmp(fieldnames(tracetdi),'units')) - trace.units=tracetdi.units; - end - trace.name=[num2str(shot) ';' nodenameeff]; - % add error bars - eval(['nodenameeff=''\results::cxrs' proffit ':' kwd_eff ':err' endstr ''';']); - nodenameeff=[{'\results::cxrs:vi_tor:err'} endstr]; - tracetdi=tdi(nodenameeff{:}); - trace.std = tracetdi.data; - if length(tracetdi.dim)>2; - trace.std_rho = tracetdi.dim{1}; - trace.std_t = tracetdi.dim{2}; - else - trace.std_rho = []; - trace.std_t = []; - end - mdsclose; - error_status=0; - - %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - otherwise - % eval(['!mailto_Andrea ''from loadTCVdata, data_type_eff= ' data_type_eff '''']) - disp(['this data_type_eff' ' ' data_type_eff ' ' 'not yet programmed in loadTCVdata, ask Andrea.Scarabosio@epfl.ch']); - -end diff --git a/crpptbx_new/TCV/private/angular_fact_1.mat b/crpptbx_new/TCV/private/angular_fact_1.mat deleted file mode 100755 index 9643be7b4b3edd0f3734bc7b666c5eaa6373c0b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3664 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 W&GavTnoW<a=oZc2y@IF^iux}K<?Ofs diff --git a/crpptbx_new/TCV/private/bad_channels.mat b/crpptbx_new/TCV/private/bad_channels.mat deleted file mode 100755 index 9933a3a72f2d4265b5e3a3fcb23ed94bc7a3b57a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28504 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 diff --git a/crpptbx_new/TCV/private/common_ece.m b/crpptbx_new/TCV/private/common_ece.m deleted file mode 100755 index 62bee6da..00000000 --- a/crpptbx_new/TCV/private/common_ece.m +++ /dev/null @@ -1,75 +0,0 @@ -function [t,i1,i2,i12,t1no,t2no,i1no,i2no]=common_ece(t1,t2,tol,mode,bounds) -% [t,i1,i2,i12,t1no,t2no,i1no,i2no]=common(t1,t2,[tol,mode,bounds]) -% extract elements that are common to t1 and t2 within tolerance tol -% t: elements of t1 which are within tol of an element of t2 -% i1: index to elements of t1 which are within tol of an element of t2 -% i2: index to elements of t2 which are within tol of (and closest to if 'n') an element of t1 -% i12:index in t2 for elements from t1 corresponding to (first) match in t2 -% t1(2)no: elements of t1(2) which are not matched in t2(1) -% i1(2)no: index to elements in t1(2) which are not matched in t2(1) -% mode: 'a' all or 'n' nearest matches -% bounds: [bmin,bmax] limits search interval for t1 - -if(nargin<3 || ~exist('tol','var')) - tol=eps; -end -if(nargin<4 || ~exist('bounds','var')) - bounds=[min([min(t1),min(t2)])-tol; - max([max(t2),max(t1)])+tol]; -end -if(nargin<5 || ~exist('mode','var')) - mode='n'; -end - -i1=zeros(size(t1)); -i2=zeros(size(t2)); -t=[]; -i12=zeros(size(t1)); - -t1no=[]; -t2no=[]; - -match=0; - -for j=1:length(t1) - if(t1(j)>=bounds(1) && t1(j)<=bounds(2)) - tt1=t1(j)*ones(size(t2)); - ii2=find(abs(t2-tt1)<=tol); - if(strcmp(mode,'n') && ~isempty(ii2)) - if (length(ii2)>1) - [~,ii2]=min(abs(t2-tt1)); - end - match=match+1; - i2(ii2)=ii2; - i1(j)=ii2; - i12(j)=ii2; - end - if(strcmp(mode,'a') && ~isempty(ii2)) - match=match+1; - i1(j)=j; - i12=ii2(1); - i2(ii2)=ii2; - end - end -end - -%disp(['matches found: ',int2str(match)]) -%keyboard - -i1no=find(i1==0); -i2no=find(i2==0); -i1=find(i1~=0); -i2=find(i2~=0); -if(~isempty(i1)) - t=t1(i1); -end -if(~isempty(i1no)) - t1no=t1(i1no); -end -if(~isempty(i2no)) - t2no=t2(i2no); -end - -%keyboard - -end diff --git a/crpptbx_new/TCV/private/ece_bad_channels.m b/crpptbx_new/TCV/private/ece_bad_channels.m deleted file mode 100755 index d7db3144..00000000 --- a/crpptbx_new/TCV/private/ece_bad_channels.m +++ /dev/null @@ -1,19 +0,0 @@ -function [N]=ece_bad_channels(shot) -% function [N]=ece_bad_channels(shot) -% -% Fonction donnant la liste des cannaux ne fonctionnant pas -% La numerotation est celle de la notice de l'ECE => comme dans MDS - -load bad_channels; -if isempty(find(A(:,1)==shot))==1 - if shot <=18628 - N=[1 23]; - elseif shot > 18628 & shot<20000 - N=[1 15 21 23]; - elseif shot>20000 - N=[15 21 23]; - end -else - N=A(find(A(:,1)==shot),2:20); - N=N(find(N>0)); -end diff --git a/crpptbx_new/TCV/private/ece_calib.m b/crpptbx_new/TCV/private/ece_calib.m deleted file mode 100755 index 171fe18b..00000000 --- a/crpptbx_new/TCV/private/ece_calib.m +++ /dev/null @@ -1,155 +0,0 @@ -function [CALIBRATION,Fcentral]=ece_calib(shot,Tc) - -% function [CALIBRATION,Fcentral]=ece_calib(shot,Tc) -% [CALIBRATION,Fcentral]=ece_calib(shot,[0.1 0.29]) -% -% Calculate the CALIBRATION matrix of ECE signals on Thomson temperature -% on times bounded by Tc=[a b] for the specified shot#. -% Fcentral is the central Frequency of the ECE channels -% -% Blanchard 09.06.2001 - -%----------------------------------------------------------------------- -% Recherche de la configuration de l'ECE -%----------------------------------------------------------------------- -[W]=writeece; - -warning off -mdsopen('tcv_shot',shot) -L=mdsdata('GETNCI("\\results::ece:calibration","length")'); -LL=mdsdata('GETNCI("\\results::psi_axis:foo","length")'); -mdsclose -if LL==0 - disp('----------------------------------') - disp('\results::psi_axis not calculated') - disp('----------------------------------') - return -end - -if L==0 | L==28 |W==1 - disp(' La trace \results::ece:calibration est vide '); - mdsopen('tcv_shot',shot) - Cntrl1= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D0"]'); - Cntrl2= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D1"]'); - Sw1= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D2"]'); - Sw2= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D3"]'); - mdsclose - i=[1,2]; - if strcmp(Cntrl1(i),'ON') - L=2; - else - if strcmp(Cntrl2(i),'ON') - L=1; - else - L=0; - end - end - - if strcmp(Sw1(i),'ON') - if strcmp(Sw2(i),'ON') - K=2; - else - K=3; - end - else - if strcmp(Sw2(i),'ON') - K=4; - else - K=1; - end - end - clear Cntrl1 Cntrl2 Sw1 Sw2 - - %----------------------------------------------------------------------- - % Appel des principales donnees - %----------------------------------------------------------------------- - [RHOece,Rece,Zece,Tece, Fcentralrho]=ece_rho(shot,Tc);Tece=Tece'; - [TEthom,NEthom,TEerr,NEerr,Tthom,RHOthom]=thom_rho(shot,5); %(Tthom,Nbre de pts selon rho) - [A,B]=size(TEthom); - KK=0; - if exist('TEthom')==0|length(TEthom) ==0 - KK=1; - disp('Le profil Thomson proffit n''existe pas. On essaye le profil direct') %(Tthom,Nbre de pts selon rho) - [TEthom,NEthom,TEerr,NEerr,Tthom,RHOthom]=thom_rho(shot,3); - [A,B]=size(TEthom); - if mean(TEthom)==-1| isstr(TEthom)==1 - return - end - end - if A==0|B==0|B==10 - disp('--------------------------') - disp('No Thomson acquisition') - disp('--------------------------') - TEthom - return - end - [t,i1,i2]=common(Tece,Tthom(:,1),0.005); - [ECE,TECE,Fcentral]=ece_raw_signals(shot,Tc,1);Fcentral=Fcentral'; - [t2,i3,i4]=common(Fcentralrho,Fcentral); - Rece=Rece(i3,i1);Zece=Zece(i3,i1);RHOece=RHOece(i3,i1); - TEthom=TEthom(i2,:);TEerr=TEerr(i2,:);RHOthom=RHOthom(i2,:); - T1=Tece(i1); - clear NEthom Tthom Tece Zece Fcentralrho - disp(['Pour la calibration, nous allons considerer ', num2str(length(t)),' profils Thomson ']) - disp(['Tcal = ',num2str(t')]) - %----------------------------------------------------------------------- - % Mise a jour des signaux sur les memes bases temporelles - % et RHO - %----------------------------------------------------------------------- - [T1,Fcentral]=meshgrid(T1,Fcentral);[T2,Fcentral2]=meshgrid(TECE,Fcentral(:,1)); - RHOcalib=interp2(T1,Fcentral,RHOece,T2',Fcentral2'); - TEthom=griddata(RHOthom,repmat(T1(1,:)',1,B),TEthom,RHOcalib,T2'); - TEerr=griddata(RHOthom,repmat(T1(1,:)',1,B),TEerr,RHOcalib,T2'); - %----------------------------------------------------------------------- - % Calibration sur mesure Thomson - %----------------------------------------------------------------------- - if isempty(find(isnan(TEthom)))==0 - NN=find(isnan(mean(TEthom))==1); - for j=1:length(NN) - nj=find(isnan(TEthom(:,NN(j)))==1); - nNN=find(isnan(TEthom(:,NN(j)))==0); - disp(['On a remplace ',num2str(length(nj)),' NaN dans la colonne ',num2str(NN(j))]); - if min(nNN)<min(nj) - TEthom(nj,NN(j))=TEthom(min(nj)-1,NN(j)); - else - disp(['probleme avec NaN : toute la colonne ',num2str(NN(j)),' vaut 0']); - TEthom(nj,NN(j))=0; - end - end - end - - CAL(1,:)=Fcentral(:,1)'; - c=TEthom./ECE; - if max(size(find(c==0)))>1 - disp('On corrige les points valant 0') - jj=min(find(mean(TEthom)>0)); - mm=min(find(c(:,3)>0)); - MM= max(find(c(:,3)>0)); - CAL(2,:)=mean(TEthom([mm:MM],:)./ECE([mm:MM],:)); - CAL(3,:)=std(TEthom([mm:MM],:)./ECE([mm:MM],:));CAL(4,:)=mean(TEerr([mm:MM],:)./ECE([mm:MM],:)); - CALIBRATION=CAL;CALIBRATION(5,[1:length(T1(1,:))])=T1(1,:); - else - CAL(2,:)=mean(TEthom./ECE); - CAL(3,:)=std(TEthom./ECE);CAL(4,:)=mean(TEerr./ECE); - CALIBRATION=CAL;CALIBRATION(5,[1:length(T1(1,:))])=T1(1,:); - end - if W==2 - - else - mdsopen(shot) - mdsput('\results::ece:calibration',CALIBRATION,'f'); - mdsput('\results::ece:f_central',Fcentral(:,1),'f'); - mdsclose - disp('On a enregistre la matrice de calibration et Fcentral dans MDS') - clear RHOcalib TEthom T2 ECE Fcentral2 TECE - end - -else - disp('On va chercher la matrice \results::ece:CALIBRATION dans MDS!') - mdsopen('tcv_shot',shot) - CALIBRATION=mdsdata('\results::ece:calibration'); - Fcentral=mdsdata('\results::ece:f_central'); - mdsclose -end - -warning on diff --git a/crpptbx_new/TCV/private/ece_conf.m b/crpptbx_new/TCV/private/ece_conf.m deleted file mode 100755 index 9c71c4c9..00000000 --- a/crpptbx_new/TCV/private/ece_conf.m +++ /dev/null @@ -1,85 +0,0 @@ -function [K,L]=ece_conf(shot,mode) - -% function [K,L]=ece_conf(shot,mode) -% [K,L]=ece_conf(shot,0); -% if mode=0 => display some informations -% -% Give the configuration of the ECE radiometer for the specified shot. -% K=1 => high edge resolution (A) -% K=2 => high center resolution (B) -% K=3 => low resolution Lo1->IF2; Lo2->IF1 (C) -% K=4 => low resolution Lo1->IF1; Lo2->IF2 (D) -% -% L=0 => calibration -% L=1 => Z=0 -% L=2 => Z=0.21 cm - -mdsopen('tcv_shot',shot) -Cntrl1= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D0"]'); -Cntrl2= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D1"]'); -Sw1= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D2"]'); -Sw2= mdsdata('\vsystem::tcv_publicdb_b["ECE:PIO_D3"]'); -Att= mdsdata('\vsystem::tcv_publicdb_i["ECE:PIO_GAIN_2_IN"]'); -mdsclose - -if mode==0 -i=[1,2]; - -if strcmp(Cntrl1(i),'ON') -L=2; -disp('ligne de visee Z = 21.3 cm') -else -if strcmp(Cntrl2(i),'ON') -L=1; -disp('ligne de visee Z=0') -else -L=0; -disp('Calibration') -end -end - -if strcmp(Sw1(i),'ON') - if strcmp(Sw2(i),'ON') - K=2; - disp('Configuration B') - else - K=3; - disp('Configuration C') - end -else - if strcmp(Sw2(i),'ON') - K=4; - disp('Configuration D') - else - K=1; - disp('Configuration A') - end -end -disp(['Attenuation level = ',num2str(Att),' ']) -else -i=[1,2]; -if strcmp(Cntrl1(i),'ON') -L=2; -else -if strcmp(Cntrl2(i),'ON') -L=1; -else -L=0; -end -end - -if strcmp(Sw1(i),'ON') - if strcmp(Sw2(i),'ON') - K=2; - else - K=3; - end -else - if strcmp(Sw2(i),'ON') - K=4; - else - K=1; - end -end - -end diff --git a/crpptbx_new/TCV/private/ece_d.m b/crpptbx_new/TCV/private/ece_d.m deleted file mode 100755 index 17752b9d..00000000 --- a/crpptbx_new/TCV/private/ece_d.m +++ /dev/null @@ -1,51 +0,0 @@ -% Fonction matlab donnant la relation entre la frequence centrale des -% cannaux du radiometre avec le no du cannal -D=[ 78.8500 12.0000 - 79.6000 13.0000 - 80.3500 11.0000 - 81.1000 14.0000 - 81.8500 10.0000 - 82.6000 15.0000 - 83.3500 9.0000 - 84.1000 16.0000 - 84.8500 8.0000 - 85.6000 17.0000 - 86.3500 7.0000 - 87.1000 18.0000 - 87.8500 6.0000 - 88.6000 19.0000 - 89.3500 5.0000 - 90.1000 20.0000 - 90.8500 4.0000 - 91.6000 21.0000 - 92.3500 3.0000 - 93.1000 22.0000 - 93.8500 2.0000 - 94.6000 23.0000 - 95.3500 1.0000 - 96.1000 24.0000 - 96.8500 12.0000 - 97.6000 13.0000 - 98.3500 11.0000 - 99.1000 14.0000 - 99.8500 10.0000 - 100.6000 15.0000 - 101.3500 9.0000 - 102.1000 16.0000 - 102.8500 8.0000 - 103.6000 17.0000 - 104.3500 7.0000 - 105.1000 18.0000 - 105.8500 6.0000 - 106.6000 19.0000 - 107.3500 5.0000 - 108.1000 20.0000 - 108.8500 4.0000 - 109.6000 21.0000 - 110.3500 3.0000 - 111.1000 22.0000 - 111.8500 2.0000 - 112.6000 23.0000 - 113.3500 1.0000 - 114.1000 24.0000 ]; - diff --git a/crpptbx_new/TCV/private/ece_mode.m b/crpptbx_new/TCV/private/ece_mode.m deleted file mode 100755 index fd8a20f2..00000000 --- a/crpptbx_new/TCV/private/ece_mode.m +++ /dev/null @@ -1,99 +0,0 @@ -function [Fcentral, Rcentral,No]=ece_mode(K,B) - -% function [Fcentral, Rcentral,No]=ece_mode(K,B) -% -% Programme calculant les frequences centrales, et la disposition -% spatiale relative a ces frequences pour chaques cannaux dans les quatres -% configurations possibles du radiometre ECE -% -% K=1 => haute resol bord (8a) -% K=2 => haute resol centre (8b) -% K=3 => basse resolution Lo1->IF2; Lo2->IF1 (8c) -% K=4 => basse resolution Lo1->IF1; Lo2->IF2 (8d) -% B=champs magnetique -% -% Fcentral = frequence centrale de chaque cannaux -% Rcentral = position selon R de l'emission a la frequence Fcentral -% No = correspondance Fcentral -> cannaux de l'ECE -% -% Voir ece_conf.m - -%[Lo1,Lo2,cann1,cann2,cann,del,No1,No2]=ece_lo; -Lo1=76.475; -Lo2=94.475; -cann1=[2.375:1.5:18.875]'; -No1=fliplr([1:12])'; -cann2=[3.125:1.5:19.625]'; -No2=([13:24]'); -cann=[2.375:0.75:19.625]'; -del=0.75; -% introduce const constants from /mac/blanchard/matlab5/ece/public/const.m - -% CONST.M -% -% Constante physique -% -% q, e, k, me, mp, h, hbar, c, epsilon0, mu0, G, Na -% -% Unites SI -% Blanchard 07.97 -q=1.6022e-19; % [C] -e=1.6022e-19; % [C] -k=1.3807e-23; % [J/K] -me=9.1094e-31; % [kg] -mp=1.6726e-27; % [kg] -h=6.6261e-34; % [Js] -hbar=h/2/pi; % [Js] -c=2.9979e8; % [m/s] -epsilon0=8.8542e-12; % [F/m] -mu0=4e-7*pi; % [H/m] -G=6.6726e-11; % [m^3/kg/s^2] -Na=6.0221e23; % [1/mol] -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% -% Programme donnant les parametres importants de TCV -% R0=Grand rayon -% eptuile = distance paroi-bord tuile cote chambre -% a=distance centre-bord tuile -R0=0.88; -eptuile=0.024; -a=0.56/2-eptuile; - -if K == 1 - F=cann; - Fcentral=cann+Lo2; - Rcentral=2*e*R0/me*(1./Fcentral)*B/1e9/2/pi; - %Wce_central=2*e*R0*(1./Rcentral)*B/me; - No=[cann2+Lo2,No2]; - No(13:24,:)=[cann1+Lo2,No1]; - [No]=sortrows(No,1); -elseif K == 2 - F=cann; - Fcentral=cann+Lo1; - Rcentral=2*e*R0/me*(1./Fcentral)*B/1e9/2/pi; - %Wce_central=2*e*R0.*(1./Rcentral)*B/me; - No=[cann2+Lo1,No2]; - No(13:24,:)=[cann1+Lo1,No1]; - [No]=sortrows(No,1); -elseif K == 3 - F=cann1; - F(length(cann1)+1:length(cann1)+length(cann2))=cann2; - Fcentral=cann2+Lo1; - Fcentral(length(cann1)+1:length(cann1)+length(cann2))=cann1+Lo2; - Rcentral=2*e*R0/me*(1./Fcentral)*B/1e9/2/pi; - %Wce_central=2*e*R0.*(1./Rcentral)*B/me; - No=[cann1+Lo2,No1]; - No(13:24,:)=[cann2+Lo1,No2]; - [No]=sortrows(No,1); -elseif K == 4 - F=cann1; - F(length(cann1)+1:length(cann1)+length(cann2))=cann2; - Fcentral=cann1+Lo1; - Fcentral(length(cann1)+1:length(cann1)+length(cann2))=cann2+Lo2; - Rcentral=2*e*R0/me*(1./Fcentral)*B/1e9/2/pi; - %Wce_central=2*e*R0.*(1./Rcentral)*B/me; - No=[cann1+Lo1,No1]; - No(13:24,:)=[cann2+Lo2,No2]; - [No]=sortrows(No,1); -end diff --git a/crpptbx_new/TCV/private/ece_raw_signals.m b/crpptbx_new/TCV/private/ece_raw_signals.m deleted file mode 100755 index 663ee522..00000000 --- a/crpptbx_new/TCV/private/ece_raw_signals.m +++ /dev/null @@ -1,408 +0,0 @@ -function [ECE,Tece,Fcentral]=ece_raw_signals(shot,T,SS); - -% function [ECE,Tece,Fcentral]=ece_raw_signals(shot,T,SS); -% -% Programme donnant les signaux ECE [V] non corriges par les -% calibrations, pour le vecteur temporel T ou pour un sous -% echantillonage SS -% -% shot = no de tir a analyser -% T = soit -% -vecteur temporel croissant -% -si T=10 => tout les temps seront cherches -% -si T=[a b];=> a et b sont les bornes temporelles -% SS > 1 => sous echantillonage de facteur SS si T=10 ou T=[a b] -% Les 24 lignes de ECE correspondent aux frequences d'emissions -% classees par ordre croissant de frequence d'emission. -% -% Blanchard 10.02.2000 - -%------------------------------------------------------------------------------ -% INFORMATION -% -% Pour toutes les matrices, on aura la convention suivante: -% Les signaux temporels des 24 cannaux seront les 24 lignes, -%------------------------------------------------------------------------------ -if shot>=20055 - - [K,L]=ece_conf(shot,1); - ece_d; - [Fcentral, Rcentral,No]=ece_mode(K,1.5); - [t,i1,i2]=common_ece(No(:,1),D(:,1)); - D=D(i2,:);[D]=sortrows(D,1); - E=D(:,2);E(:,2)=[1:24]';[E]=sortrows(E,1); - - %------------------------------------------------------------------------------ - % Appel des valeurs dans MDS - % La matrice ECE a 24 lignes correspondant aux 24 cannaux - % - % La matrice est classee par ordre croissant des frequences cesntrales - % des divers cannaux - %------------------------------------------------------------------------------ - if length(T)==2 - mdsopen('tcv_shot',shot) - Tece=mdsdata('dim_of(\atlas::dt100_northwest_001:channel_012)'); - - X=[1:SS:length(Tece)]'; - Tece=Tece(X);clear X - - del=Tece(2)-Tece(1); - NN=Tece(1:max(find(Tece<0))); - N=find(Tece>=T(1) & Tece<=T(2)); - Tece=Tece(N); - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_northwest_001:channel_012[$]',Tece); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_northwest_001:channel_011[$]',Tece); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_northwest_001:channel_010[$]',Tece); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_northwest_001:channel_009[$]',Tece); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_northwest_001:channel_008[$]',Tece); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_northwest_001:channel_007[$]',Tece); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_northwest_001:channel_006[$]',Tece); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_northwest_001:channel_005[$]',Tece); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_northwest_001:channel_004[$]',Tece); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_northwest_001:channel_003[$]',Tece); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_northwest_001:channel_002[$]',Tece); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_northwest_001:channel_001[$]',Tece); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_northwest_001:channel_017[$]',Tece); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_northwest_001:channel_018[$]',Tece); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_northwest_001:channel_019[$]',Tece); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_northwest_001:channel_020[$]',Tece); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_northwest_001:channel_021[$]',Tece); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_northwest_001:channel_022[$]',Tece); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_northwest_001:channel_023[$]',Tece); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_northwest_001:channel_024[$]',Tece); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_northwest_001:channel_025[$]',Tece); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_northwest_001:channel_026[$]',Tece); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_northwest_001:channel_027[$]',Tece); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_northwest_001:channel_028[$]',Tece); - M=zeros(length(NN),24); - M(:,E(1,2))=mdsdata('\atlas::dt100_northwest_001:channel_012[$]',NN); - M(:,E(2,2))=mdsdata('\atlas::dt100_northwest_001:channel_011[$]',NN); - M(:,E(3,2))=mdsdata('\atlas::dt100_northwest_001:channel_010[$]',NN); - M(:,E(4,2))=mdsdata('\atlas::dt100_northwest_001:channel_009[$]',NN); - M(:,E(5,2))=mdsdata('\atlas::dt100_northwest_001:channel_008[$]',NN); - M(:,E(6,2))=mdsdata('\atlas::dt100_northwest_001:channel_007[$]',NN); - M(:,E(7,2))=mdsdata('\atlas::dt100_northwest_001:channel_006[$]',NN); - M(:,E(8,2))=mdsdata('\atlas::dt100_northwest_001:channel_005[$]',NN); - M(:,E(9,2))=mdsdata('\atlas::dt100_northwest_001:channel_004[$]',NN); - M(:,E(10,2))=mdsdata('\atlas::dt100_northwest_001:channel_003[$]',NN); - M(:,E(11,2))=mdsdata('\atlas::dt100_northwest_001:channel_002[$]',NN); - M(:,E(12,2))=mdsdata('\atlas::dt100_northwest_001:channel_001[$]',NN); - M(:,E(13,2))=mdsdata('\atlas::dt100_northwest_001:channel_017[$]',NN); - M(:,E(14,2))=mdsdata('\atlas::dt100_northwest_001:channel_018[$]',NN); - M(:,E(15,2))=mdsdata('\atlas::dt100_northwest_001:channel_019[$]',NN); - M(:,E(16,2))=mdsdata('\atlas::dt100_northwest_001:channel_020[$]',NN); - M(:,E(17,2))=mdsdata('\atlas::dt100_northwest_001:channel_021[$]',NN); - M(:,E(18,2))=mdsdata('\atlas::dt100_northwest_001:channel_022[$]',NN); - M(:,E(19,2))=mdsdata('\atlas::dt100_northwest_001:channel_023[$]',NN); - M(:,E(20,2))=mdsdata('\atlas::dt100_northwest_001:channel_024[$]',NN); - M(:,E(21,2))=mdsdata('\atlas::dt100_northwest_001:channel_025[$]',NN); - M(:,E(22,2))=mdsdata('\atlas::dt100_northwest_001:channel_026[$]',NN); - M(:,E(23,2))=mdsdata('\atlas::dt100_northwest_001:channel_027[$]',NN); - M(:,E(24,2))=mdsdata('\atlas::dt100_northwest_001:channel_028[$]',NN); - mdsclose - N=min(find(Tece>0-del&Tece<0+del)); - M=mean(M); - ECE=ECE-repmat(M,length(Tece),1); - - elseif T==10 - mdsopen('tcv_shot',shot) - Tece=mdsdata('dim_of(\atlas::dt100_northwest_001:channel_012)'); - - X=[1:SS:length(Tece)]'; - Tece=Tece(X);clear X - - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_northwest_001:channel_012[$]',Tece); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_northwest_001:channel_011[$]',Tece); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_northwest_001:channel_010[$]',Tece); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_northwest_001:channel_009[$]',Tece); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_northwest_001:channel_008[$]',Tece); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_northwest_001:channel_007[$]',Tece); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_northwest_001:channel_006[$]',Tece); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_northwest_001:channel_005[$]',Tece); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_northwest_001:channel_004[$]',Tece); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_northwest_001:channel_003[$]',Tece); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_northwest_001:channel_002[$]',Tece); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_northwest_001:channel_001[$]',Tece); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_northwest_001:channel_017[$]',Tece); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_northwest_001:channel_018[$]',Tece); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_northwest_001:channel_019[$]',Tece); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_northwest_001:channel_020[$]',Tece); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_northwest_001:channel_021[$]',Tece); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_northwest_001:channel_022[$]',Tece); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_northwest_001:channel_023[$]',Tece); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_northwest_001:channel_024[$]',Tece); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_northwest_001:channel_025[$]',Tece); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_northwest_001:channel_026[$]',Tece); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_northwest_001:channel_027[$]',Tece); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_northwest_001:channel_028[$]',Tece); - mdsclose - del=Tece(2)-Tece(1); - N=min(find(Tece>0-del&Tece<0+del)); - M=mean(ECE([1:N],:)); - ECE=ECE-repmat(M,length(Tece),1); - - elseif T~=10 | length(T)>2 - mdsopen('tcv_shot',shot) - Tece=mdsdata('dim_of(\atlas::dt100_northwest_001:channel_012)'); - - NN=Tece(1:max(find(Tece<0))); - Tece=mdsdata('dim_of(\atlas::dt100_northwest_001:channel_012[$])',T); - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_northwest_001:channel_012[$]',T); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_northwest_001:channel_011[$]',T); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_northwest_001:channel_010[$]',T); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_northwest_001:channel_009[$]',T); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_northwest_001:channel_008[$]',T); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_northwest_001:channel_007[$]',T); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_northwest_001:channel_006[$]',T); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_northwest_001:channel_005[$]',T); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_northwest_001:channel_004[$]',T); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_northwest_001:channel_003[$]',T); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_northwest_001:channel_002[$]',T); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_northwest_001:channel_001[$]',T); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_northwest_001:channel_017[$]',T); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_northwest_001:channel_018[$]',T); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_northwest_001:channel_019[$]',T); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_northwest_001:channel_020[$]',T); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_northwest_001:channel_021[$]',T); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_northwest_001:channel_022[$]',T); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_northwest_001:channel_023[$]',T); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_northwest_001:channel_024[$]',T); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_northwest_001:channel_025[$]',T); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_northwest_001:channel_026[$]',T); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_northwest_001:channel_027[$]',T); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_northwest_001:channel_028[$]',T); - M=zeros(length(NN),24); - M(:,E(1,2))=mdsdata('\atlas::dt100_northwest_001:channel_012[$]',NN); - M(:,E(2,2))=mdsdata('\atlas::dt100_northwest_001:channel_011[$]',NN); - M(:,E(3,2))=mdsdata('\atlas::dt100_northwest_001:channel_010[$]',NN); - M(:,E(4,2))=mdsdata('\atlas::dt100_northwest_001:channel_009[$]',NN); - M(:,E(5,2))=mdsdata('\atlas::dt100_northwest_001:channel_008[$]',NN); - M(:,E(6,2))=mdsdata('\atlas::dt100_northwest_001:channel_007[$]',NN); - M(:,E(7,2))=mdsdata('\atlas::dt100_northwest_001:channel_006[$]',NN); - M(:,E(8,2))=mdsdata('\atlas::dt100_northwest_001:channel_005[$]',NN); - M(:,E(9,2))=mdsdata('\atlas::dt100_northwest_001:channel_004[$]',NN); - M(:,E(10,2))=mdsdata('\atlas::dt100_northwest_001:channel_003[$]',NN); - M(:,E(11,2))=mdsdata('\atlas::dt100_northwest_001:channel_002[$]',NN); - M(:,E(12,2))=mdsdata('\atlas::dt100_northwest_001:channel_001[$]',NN); - M(:,E(13,2))=mdsdata('\atlas::dt100_northwest_001:channel_017[$]',NN); - M(:,E(14,2))=mdsdata('\atlas::dt100_northwest_001:channel_018[$]',NN); - M(:,E(15,2))=mdsdata('\atlas::dt100_northwest_001:channel_019[$]',NN); - M(:,E(16,2))=mdsdata('\atlas::dt100_northwest_001:channel_020[$]',NN); - M(:,E(17,2))=mdsdata('\atlas::dt100_northwest_001:channel_021[$]',NN); - M(:,E(18,2))=mdsdata('\atlas::dt100_northwest_001:channel_022[$]',NN); - M(:,E(19,2))=mdsdata('\atlas::dt100_northwest_001:channel_023[$]',NN); - M(:,E(20,2))=mdsdata('\atlas::dt100_northwest_001:channel_024[$]',NN); - M(:,E(21,2))=mdsdata('\atlas::dt100_northwest_001:channel_025[$]',NN); - M(:,E(22,2))=mdsdata('\atlas::dt100_northwest_001:channel_026[$]',NN); - M(:,E(23,2))=mdsdata('\atlas::dt100_northwest_001:channel_027[$]',NN); - M(:,E(24,2))=mdsdata('\atlas::dt100_northwest_001:channel_028[$]',NN); - mdsclose - M=mean(M); - ECE=ECE-repmat(M,length(Tece),1); - % SS=0; - end - %------------------------------------------------------------------------------ - % Correction des mauvais cannaux : met les cannaux non-existant a NaN - %------------------------------------------------------------------------------ - [N]=ece_bad_channels(shot); - disp(['Pour le shot # ',num2str(shot),' les cannaux ECE qui ne vont pas sont: ',num2str(N)]) - %N=input('Introduire les cannaux qui ne vont pas') - [t,i1,i2,i3,i4,i5,i6]=common_ece(E(N,2),[1:24]); - ECE=ECE(:,i5);Fcentral=Fcentral(i5); - -else - - [K,L]=ece_conf(shot,1); - ece_d; - [Fcentral, Rcentral,No]=ece_mode(K,1.5); - [t,i1,i2]=common_ece(No(:,1),D(:,1)); - D=D(i2,:);[D]=sortrows(D,1); - E=D(:,2);E(:,2)=[1:24]';[E]=sortrows(E,1); - - %------------------------------------------------------------------------------ - % Appel des valeurs dans MDS - % La matrice ECE a 24 lignes correspondant aux 24 cannaux - % - % La matrice est classee par ordre croissant des frequences cesntrales - % des divers cannaux - %------------------------------------------------------------------------------ - if length(T)==2 - mdsopen('tcv_shot',shot) - Tece=mdsdata('\atlas::dt100_003:fast:time'); - - X=[1:SS:length(Tece)]'; - Tece=Tece(X);clear X - - del=Tece(2)-Tece(1); - NN=Tece(1:max(find(Tece<0))); - N=find(Tece>=T(1) & Tece<=T(2)); - Tece=Tece(N); - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_003:fast:channel_012[$]',Tece); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_003:fast:channel_011[$]',Tece); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_003:fast:channel_010[$]',Tece); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_003:fast:channel_009[$]',Tece); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_003:fast:channel_008[$]',Tece); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_003:fast:channel_007[$]',Tece); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_003:fast:channel_006[$]',Tece); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_003:fast:channel_005[$]',Tece); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_003:fast:channel_004[$]',Tece); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_003:fast:channel_003[$]',Tece); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_003:fast:channel_002[$]',Tece); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_003:fast:channel_001[$]',Tece); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_003:fast:channel_017[$]',Tece); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_003:fast:channel_018[$]',Tece); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_003:fast:channel_019[$]',Tece); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_003:fast:channel_020[$]',Tece); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_003:fast:channel_021[$]',Tece); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_003:fast:channel_022[$]',Tece); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_003:fast:channel_023[$]',Tece); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_003:fast:channel_024[$]',Tece); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_003:fast:channel_025[$]',Tece); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_003:fast:channel_026[$]',Tece); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_003:fast:channel_027[$]',Tece); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_003:fast:channel_028[$]',Tece); - M=zeros(length(NN),24); - M(:,E(1,2))=mdsdata('\atlas::dt100_003:fast:channel_012[$]',NN); - M(:,E(2,2))=mdsdata('\atlas::dt100_003:fast:channel_011[$]',NN); - M(:,E(3,2))=mdsdata('\atlas::dt100_003:fast:channel_010[$]',NN); - M(:,E(4,2))=mdsdata('\atlas::dt100_003:fast:channel_009[$]',NN); - M(:,E(5,2))=mdsdata('\atlas::dt100_003:fast:channel_008[$]',NN); - M(:,E(6,2))=mdsdata('\atlas::dt100_003:fast:channel_007[$]',NN); - M(:,E(7,2))=mdsdata('\atlas::dt100_003:fast:channel_006[$]',NN); - M(:,E(8,2))=mdsdata('\atlas::dt100_003:fast:channel_005[$]',NN); - M(:,E(9,2))=mdsdata('\atlas::dt100_003:fast:channel_004[$]',NN); - M(:,E(10,2))=mdsdata('\atlas::dt100_003:fast:channel_003[$]',NN); - M(:,E(11,2))=mdsdata('\atlas::dt100_003:fast:channel_002[$]',NN); - M(:,E(12,2))=mdsdata('\atlas::dt100_003:fast:channel_001[$]',NN); - M(:,E(13,2))=mdsdata('\atlas::dt100_003:fast:channel_017[$]',NN); - M(:,E(14,2))=mdsdata('\atlas::dt100_003:fast:channel_018[$]',NN); - M(:,E(15,2))=mdsdata('\atlas::dt100_003:fast:channel_019[$]',NN); - M(:,E(16,2))=mdsdata('\atlas::dt100_003:fast:channel_020[$]',NN); - M(:,E(17,2))=mdsdata('\atlas::dt100_003:fast:channel_021[$]',NN); - M(:,E(18,2))=mdsdata('\atlas::dt100_003:fast:channel_022[$]',NN); - M(:,E(19,2))=mdsdata('\atlas::dt100_003:fast:channel_023[$]',NN); - M(:,E(20,2))=mdsdata('\atlas::dt100_003:fast:channel_024[$]',NN); - M(:,E(21,2))=mdsdata('\atlas::dt100_003:fast:channel_025[$]',NN); - M(:,E(22,2))=mdsdata('\atlas::dt100_003:fast:channel_026[$]',NN); - M(:,E(23,2))=mdsdata('\atlas::dt100_003:fast:channel_027[$]',NN); - M(:,E(24,2))=mdsdata('\atlas::dt100_003:fast:channel_028[$]',NN); - mdsclose - N=min(find(Tece>0-del&Tece<0+del)); - M=mean(M); - ECE=ECE-repmat(M,length(Tece),1); - - elseif T==10 - mdsopen('tcv_shot',shot) - Tece=mdsdata('\atlas::dt100_003:fast:time'); - - X=[1:SS:length(Tece)]'; - Tece=Tece(X);clear X - - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_003:fast:channel_012[$]',Tece); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_003:fast:channel_011[$]',Tece); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_003:fast:channel_010[$]',Tece); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_003:fast:channel_009[$]',Tece); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_003:fast:channel_008[$]',Tece); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_003:fast:channel_007[$]',Tece); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_003:fast:channel_006[$]',Tece); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_003:fast:channel_005[$]',Tece); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_003:fast:channel_004[$]',Tece); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_003:fast:channel_003[$]',Tece); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_003:fast:channel_002[$]',Tece); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_003:fast:channel_001[$]',Tece); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_003:fast:channel_017[$]',Tece); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_003:fast:channel_018[$]',Tece); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_003:fast:channel_019[$]',Tece); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_003:fast:channel_020[$]',Tece); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_003:fast:channel_021[$]',Tece); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_003:fast:channel_022[$]',Tece); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_003:fast:channel_023[$]',Tece); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_003:fast:channel_024[$]',Tece); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_003:fast:channel_025[$]',Tece); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_003:fast:channel_026[$]',Tece); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_003:fast:channel_027[$]',Tece); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_003:fast:channel_028[$]',Tece); - mdsclose - del=Tece(2)-Tece(1); - N=min(find(Tece>0-del&Tece<0+del)); - M=mean(ECE([1:N],:)); - ECE=ECE-repmat(M,length(Tece),1); - - elseif T~=10 | length(T)>2 - mdsopen('tcv_shot',shot) - Tece=mdsdata('\atlas::dt100_003:fast:time'); - NN=Tece(1:max(find(Tece<0))); - Tece=mdsdata('dim_of(\atlas::dt100_003:fast:channel_012[$])',T); - ECE=zeros(length(Tece),24); - ECE(:,E(1,2))=mdsdata('\atlas::dt100_003:fast:channel_012[$]',T); - ECE(:,E(2,2))=mdsdata('\atlas::dt100_003:fast:channel_011[$]',T); - ECE(:,E(3,2))=mdsdata('\atlas::dt100_003:fast:channel_010[$]',T); - ECE(:,E(4,2))=mdsdata('\atlas::dt100_003:fast:channel_009[$]',T); - ECE(:,E(5,2))=mdsdata('\atlas::dt100_003:fast:channel_008[$]',T); - ECE(:,E(6,2))=mdsdata('\atlas::dt100_003:fast:channel_007[$]',T); - ECE(:,E(7,2))=mdsdata('\atlas::dt100_003:fast:channel_006[$]',T); - ECE(:,E(8,2))=mdsdata('\atlas::dt100_003:fast:channel_005[$]',T); - ECE(:,E(9,2))=mdsdata('\atlas::dt100_003:fast:channel_004[$]',T); - ECE(:,E(10,2))=mdsdata('\atlas::dt100_003:fast:channel_003[$]',T); - ECE(:,E(11,2))=mdsdata('\atlas::dt100_003:fast:channel_002[$]',T); - ECE(:,E(12,2))=mdsdata('\atlas::dt100_003:fast:channel_001[$]',T); - ECE(:,E(13,2))=mdsdata('\atlas::dt100_003:fast:channel_017[$]',T); - ECE(:,E(14,2))=mdsdata('\atlas::dt100_003:fast:channel_018[$]',T); - ECE(:,E(15,2))=mdsdata('\atlas::dt100_003:fast:channel_019[$]',T); - ECE(:,E(16,2))=mdsdata('\atlas::dt100_003:fast:channel_020[$]',T); - ECE(:,E(17,2))=mdsdata('\atlas::dt100_003:fast:channel_021[$]',T); - ECE(:,E(18,2))=mdsdata('\atlas::dt100_003:fast:channel_022[$]',T); - ECE(:,E(19,2))=mdsdata('\atlas::dt100_003:fast:channel_023[$]',T); - ECE(:,E(20,2))=mdsdata('\atlas::dt100_003:fast:channel_024[$]',T); - ECE(:,E(21,2))=mdsdata('\atlas::dt100_003:fast:channel_025[$]',T); - ECE(:,E(22,2))=mdsdata('\atlas::dt100_003:fast:channel_026[$]',T); - ECE(:,E(23,2))=mdsdata('\atlas::dt100_003:fast:channel_027[$]',T); - ECE(:,E(24,2))=mdsdata('\atlas::dt100_003:fast:channel_028[$]',T); - M=zeros(length(NN),24); - M(:,E(1,2))=mdsdata('\atlas::dt100_003:fast:channel_012[$]',NN); - M(:,E(2,2))=mdsdata('\atlas::dt100_003:fast:channel_011[$]',NN); - M(:,E(3,2))=mdsdata('\atlas::dt100_003:fast:channel_010[$]',NN); - M(:,E(4,2))=mdsdata('\atlas::dt100_003:fast:channel_009[$]',NN); - M(:,E(5,2))=mdsdata('\atlas::dt100_003:fast:channel_008[$]',NN); - M(:,E(6,2))=mdsdata('\atlas::dt100_003:fast:channel_007[$]',NN); - M(:,E(7,2))=mdsdata('\atlas::dt100_003:fast:channel_006[$]',NN); - M(:,E(8,2))=mdsdata('\atlas::dt100_003:fast:channel_005[$]',NN); - M(:,E(9,2))=mdsdata('\atlas::dt100_003:fast:channel_004[$]',NN); - M(:,E(10,2))=mdsdata('\atlas::dt100_003:fast:channel_003[$]',NN); - M(:,E(11,2))=mdsdata('\atlas::dt100_003:fast:channel_002[$]',NN); - M(:,E(12,2))=mdsdata('\atlas::dt100_003:fast:channel_001[$]',NN); - M(:,E(13,2))=mdsdata('\atlas::dt100_003:fast:channel_017[$]',NN); - M(:,E(14,2))=mdsdata('\atlas::dt100_003:fast:channel_018[$]',NN); - M(:,E(15,2))=mdsdata('\atlas::dt100_003:fast:channel_019[$]',NN); - M(:,E(16,2))=mdsdata('\atlas::dt100_003:fast:channel_020[$]',NN); - M(:,E(17,2))=mdsdata('\atlas::dt100_003:fast:channel_021[$]',NN); - M(:,E(18,2))=mdsdata('\atlas::dt100_003:fast:channel_022[$]',NN); - M(:,E(19,2))=mdsdata('\atlas::dt100_003:fast:channel_023[$]',NN); - M(:,E(20,2))=mdsdata('\atlas::dt100_003:fast:channel_024[$]',NN); - M(:,E(21,2))=mdsdata('\atlas::dt100_003:fast:channel_025[$]',NN); - M(:,E(22,2))=mdsdata('\atlas::dt100_003:fast:channel_026[$]',NN); - M(:,E(23,2))=mdsdata('\atlas::dt100_003:fast:channel_027[$]',NN); - M(:,E(24,2))=mdsdata('\atlas::dt100_003:fast:channel_028[$]',NN); - mdsclose - M=mean(M); - ECE=ECE-repmat(M,length(Tece),1); - % SS=0; - end - %------------------------------------------------------------------------------ - % Correction des mauvais cannaux : met les cannaux non-existant a NaN - %------------------------------------------------------------------------------ - [N]=ece_bad_channels(shot); - disp(['Pour le shot # ',num2str(shot),' les cannaux ECE qui ne vont pas sont: ',num2str(N)]) - %N=input('Introduire les cannaux qui ne vont pas') - [t,i1,i2,i3,i4,i5,i6]=common_ece(E(N,2),[1:24]); - ECE=ECE(:,i5);Fcentral=Fcentral(i5); - - - -end - diff --git a/crpptbx_new/TCV/private/ece_rho.m b/crpptbx_new/TCV/private/ece_rho.m deleted file mode 100755 index 4ada961f..00000000 --- a/crpptbx_new/TCV/private/ece_rho.m +++ /dev/null @@ -1,129 +0,0 @@ -function [RHO,R,Z,tpsi,Fcentral]=ece_rho(shot,t) - -% [RHO,R,Z,tbtot,Fcentral]=ece_rho(shot,t) -% -% Fonction calculant les rayons normalise rho pour l'ECE -% pour tous les temps tpsi de psitbx appartenant a t=[a b] -% Si t=10 => tous les temps seront recherche. -% Pour le calcul de Btot, on utilise une routine de O.Sauter -% intitulee BandBres_allt.m -% -% rho = rayon normalise pour la ligne de visee de l'ECE -% R = Grand rayon du tore correspondant a RHO -% - -mdsopen('tcv_shot',shot) -L=mdsdata('GETNCI("\\results::ece:rho","length")'); -LL=mdsdata('GETNCI("\\results::psi_axis:foo","length")'); -mdsclose -if LL==0 - disp('----------------------------------') - disp('\results::psi_axis not calculated') - disp('----------------------------------') - return -end - -[W]=writeece; -if L==0 | L==28 |W==1 - disp(' La trace \results::ece:rho est vide '); - - [K,L]=ece_conf(shot,1); - if L==1 - Z=0; - elseif L==2 - Z=0.21; - end - [Fcentral,Rcentral,No]=ece_mode(K,1.45); - tt=[0:0.05:3]; - psi=psitbxtcv(shot,tt,'01'); - tpsi=psi.psitbxfun.t; - if length(t)==2 - if min(tpsi)>t(2) - disp('-------------------------------') - disp('No Psitbx for these times') - disp('-------------------------------') - return - end - end - - if length(tpsi)==0 - disp('psitbxtcv(shot,tt,''01'') est vide'); - return - end - - [Rbtot,Zbtot,BTOT,ttt]=bandbres_allt(shot,tpsi,Fcentral*1e9,2,[]); - - %----------------------------------------------------------------- - % definition de la ligne de visee en r,z,phi de longueur 50 - j=50; - r=linspace(min(Rcentral)*0.9,max(Rcentral)*1.1,j); - rzphiline={r,Z,NaN}; - GridEceCyl=psitbxgrid('Cylindrical','Grid',rzphiline);%clear R Z rzphiline K L No - %----------------------------------------------------------------- - % definition de la grille de psi en rho,theta,phi - %psi=psitbxtcv(shot,tbtot,'01'); - %tpsi=psi.psitbxfun.t; - %GridFluxPsi=psitbxgrid('Flux','Grid','Default',psi); - GridBtotCyl=psitbxgrid('Cylindrical','Grid',{Rbtot,Zbtot,NaN}); - %----------------------------------------------------------------- - % definition de la ligne de visee en rho,theta,phi - GridEcePsi=psitbxg2g(GridEceCyl,'Flux',psi); - %----------------------------------------------------------------- - % Calcul de Btot sur la grille GridFluxPsi - %BTOT=reshape(BTOT,41,129,length(tbtot)); - FTOT=2*1.6022e-19*BTOT/9.1094e-31/2/pi/1e9;clear BTOT Rbtot Zbtot - FtotFun=psitbxfun(FTOT,GridBtotCyl,tpsi);clear FTOT - %----------------------------------------------------------------- - % Calcul de Ftot sur la grille GridEcePsi - FtotLineEcePsi=psitbxf2f(FtotFun,GridEceCyl); - FtotLineEce=FtotLineEcePsi.x; - FtotLineEce(find(isnan(FtotLineEce)))=0; - T=repmat(tpsi,1,j)';r=repmat(r,length(tpsi),1)'; - rho=GridEcePsi.x{1}; - %error('err') - for i=1:length(tpsi) - jj=find(FtotLineEce(:,i)~=0); - R(:,i)=interp1(FtotLineEce(jj,i),r(jj,i),Fcentral); - RHO(:,i)=interp1(r(jj,i),rho(jj,1,i),R(:,i)); - end - Z=Z*ones(size(R)); - if W==2 - - else - mdsopen('results',shot) - mdsput('\results::ece:rho',RHO,'f'); - mdsput('\results::ece:r',R,'f'); - mdsput('\results::ece:z',Z,'f'); - mdsput('\results::ece:times',tpsi,'f'); - mdsclose - disp('On a remplis les matrices \results::ece:rho,r,z,times') - disp(['Size(RHO) = ',num2str(size(RHO))]) - end - -else - disp('On vas chercher les traces \results::ece:rho,z,r,times dans MDS') - mdsopen('results',shot) - RHO=mdsdata('\results::ece:rho'); - R=mdsdata('\results::ece:r'); - Z=mdsdata('\results::ece:z'); - tbtot=mdsdata('\results::ece:times'); - mdsclose - [K,L]=ece_conf(shot,1); - [Fcentral, Rcentral,No]=ece_mode(K,1.5); - Z=mean(mean(Z))*ones(size(R)); - tpsi=tbtot; -end - -if t~=10 - NT=find(tpsi>t(1)-0.005 & tpsi <t(2)+0.005); - if isempty(NT) - NT=max(find(tpsi<t(2))); - disp('Nous n''avons aucun points de T_psi compris dans le vecteur t') - disp('Nous avons pris le temps le plus proche') - elseif NT(1)==1 & length(NT)~=length(tpsi) - NT=[1:max(NT)]; - elseif length(NT)~=length(tpsi) - NT=[min(NT):max(NT)]; - end - RHO=RHO(:,NT);R=R(:,NT);tpsi=tpsi(NT);Z=Z(:,NT); -end diff --git a/crpptbx_new/TCV/private/get_xtomo_gains.m b/crpptbx_new/TCV/private/get_xtomo_gains.m deleted file mode 100755 index c9c2a230..00000000 --- a/crpptbx_new/TCV/private/get_xtomo_gains.m +++ /dev/null @@ -1,87 +0,0 @@ -function gains = get_xtomo_gains(shot); - -% [gains] = get_xtomo_gains(shot); -% -% emerged from MJD's XTOMOSEQ/XTOMO_LOAD_GAINS -% purpose: load gains of a certain shot nr. from the database -% usage: 'gains' is a row vector containing the gains of -% [array_001(det.1..020), array_002, det. 001...020 etc] -% -% -% This routine works on Matlab5. -% Original routine for Matlab4 by Anton Mathias. -% -% Last update: 25-08-1999 -% -%-------------MAC:[FURNO.MATLAB5.XTOMO]---------------------------------- - - - -if nargin~=1 - shot=0; -end - - -MAX_DET = 20; - -if isempty(mdsopen('vsystem',shot)); - mdsclose - info = sprintf('Shot #%.0f not found',shot); - return -end - -if shot<=6768 - % narray =2 for the prototype system only - narray=2; -else - narray=10; -end - - -temp = isempty(mdsdata('_v=\diag2db_i')); -if temp - info = sprintf('Vista database not available for shot #%.0f',shot); - mdsclose; - return -end - -mdsdata(['_p="_"//translate(text(build_range(1,' int2str(MAX_DET) '),3),"0"," ");']); - -G=[]; -info=[]; -for sig=1:narray - G=[G, mdsdata(['_s="XTOMO_AMP:' sprintf('%03.0f',sig) '"//_p;_v[_s]'])']; -end - -if isempty(info) - info = sprintf('Gains loaded from shot #%.0f',shot); -else - info(1) = ''; -end - -disp(info) - -% G contains log10 of the real gains, so... - -gains=(10*ones(size(G))).^G; - -% This is the modification after the TCV HSUT down in 1998 -% due to the incorrect insatllation of the camera #2 -if shot>13884 - permute=20:-1:1; - dummy=gains(21:40); - gains(21:40)=dummy(permute); -end - - -mdsclose -return - -permute=[2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19]; -dummy=gains(181:200); -gains(181:200)=dummy(permute); - - - - - diff --git a/crpptbx_new/TCV/private/tcv_vesc1.mat b/crpptbx_new/TCV/private/tcv_vesc1.mat deleted file mode 100644 index 85f9d33a1e61bdb183f766825358e927713cb698..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3488 zcmeH|Yfw~m7{(VyNE@PQOfF8v4yl!_$|98PczJ<RR(4@8z;fA@MOkKOgdMIz1CHsW zjErE27xV*Vh{1wjQi99nWe^Zb3y1m;BU*e&1f&g%3Zzc#`|_ct4-PZ>#WQo}-E(Ho z`9II^dCvTmL6M4}U~#}&U$HVMa!qo|Zj(f;+MSq{Y|coPiRHn{1dUcA4#_YjW|@-2 z<}{f>S5$H|L1g`--IjGJijrbiLTmSL!Q%)Wbofl#4_nSCPoMP?*lbxtOLfL{4;V z5~ibYI{b4l<Gq}eG~tJEED;`2fx&+9#HPOXnoFjo7ve{90)7fU4e=}g44KuJLfp>1 znq@hMA-2NNC^@<xVm|-ll_c{r(0x&x?(*3Qh`yZA+4!3qL^UmSGX$Q5$foWTrveYq zHs@LE@DymStZ|KA<O%94cZ{>!%0Xp4cB!gpIYjI;#IG2+3gPm4R220=IQf4%=Ro|I z2XSI<%#pb=XXeg1a4wt^=f*j5uADRH&OP8>Jn4SY`dj`QIbJhWG6C)rz7S}cgja13 zivybE;4`+%IpKIINGFpv6u0z1z|SYf$1ik2;CSyRijO*B)4iD(ODO_8a6jY}oB+YU zH2lzL-2rdgwr@=GH^A13;gd`2^bmSK-`2S*9=4CWDKaYJKrvc>-rFM<!tco)`ag^T zmHzh4U9O#=b_lV;rEpN6%RO7|G5{KR-QgFK<3Kb1V``|w6llSo<ASG;q^)xF7HHB^ z501HyfjYBw@KlfmR9We3;RBy}U96LJvk&&gKG`>OU@pvwxiLrP%AAQi=g>}hAl*m$ zAJTJ3??HMm(mF`%BI!WVg`^WnH<Aw|Ur0WY@<8H%#07~HYVF*R_%C=;u1Gl}<&M+? zq+ZPHVx6p;eXuX~$-bEbb74-*jX5$`=1kl<2hK$(-=pkD&cc3V&d!>vEbT`|dw&g& zd+urPj&!*OdRu4FB8w69uX}IyNI3xUJNEU+TFM}<?6%7Ad=<og=~7s^_Zx`$wqo62 z$q?vngq3L*w?K6F)XdD5_aUmiGBL9$LD-K}U8B;Cplx`#dS{I%XsWA=zxSR3_1UON z^_c-sopIFlzIYKLq{&d#ya|-GzRUAw`#=eH|4--ta3D_1jX5$`=FHqV2hN3a;@mh# z&XsfK+_?wb3j_7!vG?;|--9SS(DG95E%2!S?vU}K4OWyEuBs_+1j+T4j`w?d!SBGG zp__#_;LVTMDIT1Q1zB5x)vaR~HV=OF#)hFZ2+BVaR#%V@Aw~ZC+lo5io$|rvuTMV% z+dkcYw?L8)^2@8eie()T*3}<fA$JDlK<<$ST^K|R?(s0GkAbT1-PYmhR$*W0)m`6e z2F=T_{dzZI323?xmh_ifL2Evr=$NMiE!uNj@T@d?O@}@Un(2zMa@z&ah~Dx{?|2SW zzYiCT1dc+)u-DZN)6sdItebtXFZRj4nFDiSPRxxtGFRrz+$jg-N%xWdhx8oMdyw9X zv<}j`NIH;oA?ZZYjpPH#7g8QbzL7W}aY5pQT01u+{tKV>T#<4{%3at8=X!wD3#6XR f>tx;RgMG12_RSoa3v*&_%#pb=XXeh|1<k(!wK-6w diff --git a/crpptbx_new/TCV/private/thom_rho.m b/crpptbx_new/TCV/private/thom_rho.m deleted file mode 100755 index e866b767..00000000 --- a/crpptbx_new/TCV/private/thom_rho.m +++ /dev/null @@ -1,255 +0,0 @@ -function [TEthom,NEthom,TEbar,NEbar,Tthom,RHOthom]=thom_rho(shot,mode) - -% [TEthom,NEthom,TEbar,NEbar,Tthom,RHOthom]=thom_rho(shot,mode); -% -% Fonction calculant le profil de Te et ne provenant de Thomson -% en fonction de rho(psi) -% mode = 1 => profil fitte \results::th_prof_te -% 2 => profil brut 2 demi-profil -% 3 => profil brut 1 demi-profil superieur -% 4 => profil brut 1 demi-profil inferieur -% 5 => profil proffit local_time -% 6 => profil proffit avg_time -% 7 => profil brut corrige selon z -% 8 => profil TS_FITDATA -% 9 => profil TS_RAWDATA - -% - -if mode ==1 - mdsopen('tcv_shot',shot) - L=mdsdata('GETNCI("\\results::th_prof_te","length")'); - LL=mdsdata('GETNCI("\\results::thomson:te","length")'); - if L==0 - mdsclose - disp('No Thomson \results::th_prof_te node acquisition') - if LL~=0 - disp('but Thomson results::thomson:te node exist!') - end - return - end - TEthom=mdsdata('\results::th_prof_te'); - NEthom=mdsdata('\results::th_prof_ne'); - Tt=mdsdata('dim_of(\results::th_prof_te)'); - Tn=mdsdata('dim_of(\results::th_prof_ne)'); - TEbar=mdsdata('\results::th_prof_te:std_error'); - NEbar=mdsdata('\results::th_prof_ne:std_error'); - mdsclose - if length(Tt)~=length(Tn) - [t,i1,i2]=common(Tt,Tn); - Tthom=t;TEthom=TEthom(i1,:);NEthom=NEthom(i1,:); - TEbar=TEbar(i1,:);NEbar=NEbar(i1,:); - else - Tthom=Tn; - end - RHOthom=linspace(0,1,41); - RHOthom=repmat(RHOthom,length(Tthom),1); - -elseif mode >=2 & mode <=4 - - mdsopen('tcv_shot',shot) - L=mdsdata('GETNCI("\\results::thomson:te","length")'); - if L==0 - mdsclose - disp('No Thomson acquisition') - return - end - TEthom=mdsdata('\results::thomson:te'); - if isstr(TEthom)==1 - disp('---------------------------------------') - disp('No data with Thomson') - disp('---------------------------------------') - return - end - TEbar=mdsdata('\results::thomson:te:error_bar'); - NEthom=mdsdata('\results::thomson:ne'); - NEbar=mdsdata('\results::thomson:ne:error_bar'); - Tthom=mdsdata('\results::thomson:times'); - Zthom=mdsdata('\diagz::thomson_set_up:vertical_pos')'; - Rthom=mdsdata('\diagz::thomson_set_up:radial_pos')'; - Psithom=mdsdata('\results::thomson:psiscatvol'); - Psithommax=mdsdata('\results::thomson:psi_max'); - mdsclose - Ste=size(TEthom);Spsi=size(Psithom); - if Ste(2)~=Spsi(2) - disp('ATTENTION: on doit corriger des longueurs car') - disp('TEthom ~= Psithom') - ms=min([Ste(2) Spsi(2)]); - TEbar=TEbar(:,1:ms);NEbar=NEbar(:,1:ms); - TEthom=TEthom(:,1:ms);NEthom=NEthom(:,1:ms); - Rthom=Rthom(1:ms); - Psithom=Psithom(:,1:ms); - end - - LTE=length(find(TEthom==-1));LNE=length(find(NEthom==-1)); - if LTE>0 | LNE >0 - disp(['ATTENTION ',num2str(LTE),' points de mdsdata(''\results::thomson:te'') valent -1']) - disp(['ATTENTION ',num2str(LNE),' points de mdsdata(''\results::thomson:ne'') valent -1']) - end - J=0; - if isempty(NEthom) - disp('----------------------') - disp('No Thomson acquisition') - disp('----------------------') - J=1; - end - if isstr(Psithommax) - disp('----------------------') - disp(Psithommax) - disp('----------------------') - J=1; - end - if J==1 - return - end - - RHOTHOM=sqrt(1-Psithom./repmat(Psithommax,1,length(Zthom))); - RHOTHOM(isnan(RHOTHOM))=0; - - if mode ==2 - [RHO,I] = sort(RHOTHOM'); - NN=size(RHO); - TEthom=TEthom';TEbar=TEbar'; - NEthom=NEthom';NEbar=NEbar'; - for j = 1:NN(2) - TE(:,j) = TEthom(I(:,j),j); NE(:,j) = NEthom(I(:,j),j); - TE_bar(:,j) = TEbar(I(:,j),j); NE_bar(:,j) = NEbar(I(:,j),j); - end - TEthom=TE';TEbar=TE_bar'; - NEthom=NE';NEbar=NE_bar'; - RHOthom=RHO'; - elseif mode==3 - nn=round(mean(mod(find(diff(sign(diff(RHOTHOM')))>0),length(Rthom)-2)))+1; - RHOthom=RHOTHOM(:,[1:nn]);NEthom=NEthom(:,[1:nn]);TEthom=TEthom(:,[1:nn]); - NEbar=NEbar(:,[1:nn]);TEbar=TEbar(:,[1:nn]); - Zthom=Zthom([1:nn]); - elseif mode==4 - nn=round(mean(mod(find(diff(sign(diff(RHOTHOM')))>0),length(Rthom)-2)))+1; - L=length(RHOTHOM(1,:)); - RHOthom=RHOTHOM(:,[nn:L]);NEthom=NEthom(:,[nn:L]);TEthom=TEthom(:,[nn:L]); - NEbar=NEbar(:,[nn:L]);TEbar=TEbar(:,[nn:L]); - Zthom=Zthom([nn:L]); - end - -elseif mode==5 - mdsopen('tcv_shot',shot) - L=mdsdata('GETNCI("\\results::proffit.local_time:teft","length")'); - LL=mdsdata('GETNCI("\\results::thomson:te","length")'); - - if L==0 - mdsclose - disp('No Thomson \results::proffit.local_time:teft node acquisition') - if LL~=0 - disp('but Thomson results::thomson:te node exist!') - end - return - end - TEthom=mdsdata('\results::proffit.local_time:teft')'; - NEthom=mdsdata('\results::proffit.local_time:neft')'; - Tthom=mdsdata('dim_of(\results::proffit.local_time:teft,1)'); - RHOthom=mdsdata('dim_of(\results::proffit.local_time:teft,0)')'; - TEbar=mdsdata('\results::proffit.local_time:teft_std')'; - NEbar=mdsdata('\results::proffit.local_time:neft_std')'; - mdsclose - RHOthom=repmat(RHOthom,length(Tthom),1); -elseif mode==6 - mdsopen('tcv_shot',shot) - L=mdsdata('GETNCI("\\results::proffit.avg_time:teft","length")'); - LL=mdsdata('GETNCI("\\results::thomson:te","length")'); - if L==0 - mdsclose - disp('No Thomson \results::th_prof_te node acquisition') - if LL~=0 - disp('but Thomson results::thomson:te node exist!') - end - return - end - TEthom=mdsdata('\results::proffit.avg_time:teft')'; - NEthom=mdsdata('\results::proffit.avg_time:neft')'; - Tthom=mdsdata('dim_of(\results::proffit.avg_time:teft,1)'); - RHOthom=mdsdata('dim_of(\results::proffit.avg_time:teft,0)')'; - TEbar=mdsdata('\results::proffit.avg_time:teft_std')'; - NEbar=mdsdata('\results::proffit.avg_time:neft_std')'; - mdsclose - RHOthom=repmat(RHOthom,length(Tthom),1); -elseif mode==7 - del=0.03; - J=0; - mdsopen('tcv_shot',shot) - L=mdsdata('GETNCI("\\results::psi_axis:foo","length")'); - if L==0 - disp('----------------------------------') - disp('\results::psi_axis not calculated') - disp('----------------------------------') - mdsclose - return - end - TEthom=mdsdata('\results::thomson:te'); - TEbar=mdsdata('\results::thomson:te:error_bar'); - NEthom=mdsdata('\results::thomson:ne'); - NEbar=mdsdata('\results::thomson:ne:error_bar'); - Tthom=mdsdata('\results::thomson:times'); - Zthom=mdsdata('\diagz::thomson_set_up:vertical_pos')'+del; - Rthom=mdsdata('\diagz::thomson_set_up:radial_pos')'; - PSIMAG = mdsdata('\results::psi_axis'); - Tpsimag=mdsdata('dim_of(\results::psi_axis)'); - mdsclose - PSI=psitbxtcv(shot); - if exist('PSI') - X=PSI.psitbxfun.x; - T=PSI.psitbxfun.t; - RG=PSI.psitbxfun.grid.x{1}'; - ZG=PSI.psitbxfun.grid.x{2}'; - else - disp('No psitbxtcv ') - return - end - [t,i1,i2]=common(T,Tthom,0.005); - T=T(i1);X=X(:,:,i1); - TEbar=TEbar(i2,:);NEbar=NEbar(i2,:);NEthom=NEthom(i2,:);TEthom=TEthom(i2,:); - [t,i1,i2]=common(Tthom(i2),Tpsimag,0.005); - PSIMAG=PSIMAG(i2); - %------------------------------------------------------------- - % Psi...= profil de psi pour tous les temps T - %------------------------------------------------------------- - PSIMAG1=repmat(PSIMAG,1,length(ZG)); - Psi=X(min(find(RG>=mean(Rthom))),:,:); - Psi=reshape(Psi,length(ZG),length(T)); - rho=sqrt(1-(Psi)./PSIMAG1'); - [RHOthom]=griddata(repmat(ZG,1,length(T)),repmat(T,length(ZG),1),rho,... - repmat(Zthom',1,length(T)),repmat(T,length(Zthom),1)); - RHOthom=RHOthom';Tthom=T'; -elseif mode==8 - mdsopen('tcv_shot',shot) - ncode='TS_FITDATA("ne","psi",1,1)'; - tcode='TS_FITDATA("te","psi",1,1)'; - NEthom=mdsdata(ncode); - TEthom=mdsdata(tcode); - Tthom=mdsdata(['dim_of(' tcode ',0)']); - RHOthom=mdsdata(['dim_of(' tcode ',1)']); - mdsclose - elseif mode==9 - mdsopen('tcv_shot',shot) - ncode='TS_RAWDATA("ne","psi",1,1)'; - tcode='TS_RAWDATA("te","psi",1,1)'; - NEthom=mdsdata(ncode); - TEthom=mdsdata(tcode); - Tthom=mdsdata(['dim_of(' tcode ',0)']); - RHOthom=mdsdata(['dim_of(' tcode ',1)']); - mdsclose -end - -[A,B]=size(TEthom); - -if mean(TEthom)==-1 - disp('---------------------------------------------') - disp('Toutes les valeurs de Thomson valent -1') - disp('---------------------------------------------') -elseif A==0|B==0 - disp('---------------------------------------------') - disp('No Thomson acquisition') - disp('---------------------------------------------') -end - - - diff --git a/crpptbx_new/TCV/private/writeece.m b/crpptbx_new/TCV/private/writeece.m deleted file mode 100755 index e8f3efea..00000000 --- a/crpptbx_new/TCV/private/writeece.m +++ /dev/null @@ -1,8 +0,0 @@ -function [W]=writeece - -%Si W=2 Si MDS est rempli, on va chercher dans MDS sinon -% on calcule tout ce qui faut sans ecrire dans MDS -%Si W=1 on force a tout recalculer et on ecrit dans MDS -%Si W=0 Si MDS est rempli, on va chercher dans MDS sinon -% on calcule tout ce qui faut et on ecrit dans MDS -W=0; diff --git a/crpptbx_new/TCV/tcv_requests_mapping.m b/crpptbx_new/TCV/tcv_requests_mapping.m deleted file mode 100644 index 94fe43f8..00000000 --- a/crpptbx_new/TCV/tcv_requests_mapping.m +++ /dev/null @@ -1,275 +0,0 @@ -function mapping = tcv_requests_mapping(data_request) -% -% Information pre-defined for gdat_tcv, you can add cases here to match official cases in gdat_tcv, allowing backward compatibility -% - -% Defaults -mapping = struct(... - 'label', '', ... - 'method', '', ... - 'expression','', ... - 'timedim', -1, ... % dim which is the time is the database, to copy in .t, the other dims are in .x (-1 means last dimension) - 'gdat_timedim',[], ... % if need to reshape data and dim orders to have timedim as gdat_timedim (shifting time to gdat_timedim) - 'min', -inf, ... - 'max', inf); -% Note that gdat_timedim is set to timedim at end of this function if empty -% gdat_timedim should have effective index of the time dimension in gdat - -if ~exist('data_request') || isempty(data_request) - return -end - -% default label: data_request keyword itself -mapping.label = data_request; - -% for TCV, following choices are set so far: -% method = 'tdi' and then expression is the string within tdi (usual case when there is a direct link to an existing signal) -% with tdi, if expression cell array, call tdi(cell{1},cell{2},...) -% method = 'tdiliuqe': same as tdi but adds "_2" or "_3" if 'liuqe',2 or 3 is asked for in options -% method = 'expression', then expression is executed and it should provide the structure gdat_tmp, which fields are copied to gdat_data -% method = 'switchcase', then there will be a specific case within gdat_tcv (usual case when not directly a signal) -% -% label is used for plotting -switch lower(data_request) - case 'a_minor' - mapping.timedim = 1; - mapping.label = 'a(LCFS)'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'b0' - mapping.timedim = 1; - mapping.label = 'B_0'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'beta' - mapping.timedim = 1; - mapping.label = '\beta'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::beta_tor'; - case 'betan' - mapping.timedim = 1; - mapping.label = '\beta_N'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'betap' - mapping.timedim = 1; - mapping.label = '\beta_p'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::beta_pol'; - case 'cxrs' - mapping.timedim = 2; - mapping.label = 'cxrs'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'delta' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::delta_edge'; - % mapping.method = 'expression'; - % mapping.expression = ['tdi(''\results::q_psi'');']; % for tests - case 'delta_bottom' - mapping.timedim = 1; - mapping.label = 'delta\_bottom'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::delta_ed_bot'; - case 'delta_top' - mapping.timedim = 1; - mapping.label = 'delta\_top'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::delta_ed_top'; - case 'ece' - mapping.timedim = 2; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'eqdsk' - mapping.timedim = 0; - mapping.method = 'switchcase'; % could use function make_eqdsk directly? - mapping.expression = ''; - case 'halpha' - mapping.timedim = 1; - mapping.label = 'Halpha'; - mapping.method = 'tdi'; - mapping.expression = '\base::pd:pd_011'; - case 'ioh' - mapping.timedim = 1; - mapping.label = 'I ohmic transformer'; - mapping.method = 'tdi'; - mapping.expression = [{'\magnetics::ipol[*,$1]'} {'OH_001'}]; - case 'ip' - mapping.timedim = 1; - mapping.label = 'Plasma current'; - mapping.method = 'tdi'; - mapping.expression = '\magnetics::iplasma:trapeze'; - case 'kappa' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::kappa_edge'; - case 'mhd' - mapping.timedim = 1; - mapping.label = 'n=1,2, etc'; - mapping.method = 'switchcase'; - mapping.expression = ''; - case 'ne' - mapping.timedim = 2; - mapping.method = 'switchcase'; - case 'neint' - mapping.timedim = 1; - mapping.label = 'line integrated el. density'; - mapping.method = 'tdi'; - mapping.expression = '\results::fir:lin_int_dens'; - case 'nel' - mapping.timedim = 1; - mapping.label = 'line-averaged el. density'; - mapping.method = 'tdi'; - mapping.expression = '\results::fir:n_average'; - case 'ne_rho' - mapping.timedim = 2; - mapping.label = 'ne'; - mapping.method = 'switchcase'; - case 'neft' - mapping.timedim = 2; - mapping.label = 'ne'; - mapping.method = 'expression'; - mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''ne_rho''; ' ... - 'params_eff.fit=1;params_eff.fit_type=''avg'';gdat_tmp=gdat_tcv([],params_eff);']; - case 'nete_rho' - mapping.timedim = 2; - mapping.label = 'ne and Te'; - mapping.method = 'switchcase'; - case 'ni' - mapping.timedim = 2; - mapping.method = 'switchcase'; % especially since might have option fit, etc - case 'powers' - mapping.timedim = 1; - mapping.label = 'various powers'; - mapping.method = 'switchcase'; - case 'psi_axis' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::psi_axis'; - case 'psi_edge' - mapping.timedim = 1; - mapping.method = 'switchcase'; % is set to zero, so not in tree nodes - mapping.label = 'psi\_edge'; - case 'q0' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::q_zero'; - case 'q95' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::q_95'; - case 'qedge' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::q_edge'; - case 'q_rho' - mapping.timedim = 2; - mapping.label = 'q'; - mapping.method = 'switchcase'; - case 'r_contour' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::r_contour'; - case 'rgeom' - mapping.timedim = 1; - mapping.label = 'Rgeom'; - mapping.method = 'switchcase'; - case 'rhotor_edge' - mapping.timedim = 1; - mapping.label = 'rhotor\_edge=sqrt(Phi/pi/B0)'; - mapping.method = 'switchcase'; % from conf if exist otherwise computes it - case 'rhotor' - mapping.timedim = 2; - mapping.label = 'rhotor\_norm'; - mapping.method = 'switchcase'; % from conf if exist otherwise computes it - case 'rhovol' - mapping.timedim = 2; - mapping.label = 'rhovol\_norm'; - mapping.method = 'switchcase'; % from conf if exist otherwise computes it - case 'rmag' - mapping.timedim = 1; - mapping.label = 'R\_magaxis'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::r_axis'; - case 'sxr' - mapping.timedim = 2; - mapping.method = 'switchcase'; - case 'te' - mapping.timedim = 2; - mapping.label = 'Te'; - mapping.method = 'switchcase'; - case 'te_rho' - mapping.timedim = 2; - mapping.label = 'Te'; - mapping.method = 'switchcase'; - case 'teft' - mapping.timedim = 2; - mapping.label = 'ne'; - mapping.method = 'expression'; - mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''te_rho''; ' ... - 'params_eff.fit=1;params_eff.fit_type=''avg'';gdat_tmp=gdat_tcv([],params_eff);']; - case 'ti' - mapping.timedim = 2; - mapping.label = 'Ti'; - mapping.method = 'switchcase'; - case 'transp' - mapping.label = 'transp output'; - mapping.method = 'switchcase'; - case 'vloop' - mapping.timedim = 1; - mapping.label = 'Vloop'; - mapping.method = 'tdi'; - mapping.expression = [{'\magnetics::vloop[*,$1]'} {'001'}]; - case 'volume' - mapping.timedim = 1; - mapping.label = 'Volume\_LCFS'; - mapping.method = 'switchcase'; - case 'volume_rho' - mapping.timedim = 2; - mapping.label = 'Volume(\rho)'; - mapping.method = 'switchcase'; - % mapping.expression = '\results::psitbx:vol'; (if exists for liuqe2 and 3 as well) - case 'z_contour' - mapping.timedim = 1; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::z_contour'; - case 'zeff' - mapping.timedim = 1; - mapping.label = 'zeff from Ip-Ibs'; - mapping.method = 'tdi'; - mapping.expression = '\results::ibs:z_eff'; - case 'zgeom' - mapping.timedim = 1; - mapping.label = 'Zgeom'; - mapping.method = 'switchcase'; - case 'zmag' - mapping.timedim = 1; - mapping.label = 'Zmagaxis'; - mapping.method = 'tdiliuqe'; - mapping.expression = '\results::z_axis'; - % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % extra TCV cases (not necessarily in official data_request name list) - % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % - case {'profnerho','profterho'} - mapping.timedim = 1; - mapping.label = data_request; - mapping.method = 'switchcase'; - mapping.expression = ''; - -% $$$ case '' -% $$$ mapping.timedim = 1; -% $$$ mapping.label = data_request; -% $$$ mapping.method = 'tdi'; -% $$$ mapping.expression = ''; - otherwise - mapping.label = data_request; - mapping.method = 'tdi'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...) - mapping.expression = data_request; - -end - -if isempty(mapping.gdat_timedim) - mapping.gdat_timedim = mapping.timedim; -end diff --git a/crpptbx_new/TCV/xtomo_geometry.m b/crpptbx_new/TCV/xtomo_geometry.m deleted file mode 100644 index a809b9e6..00000000 --- a/crpptbx_new/TCV/xtomo_geometry.m +++ /dev/null @@ -1,402 +0,0 @@ -function [fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(i_detec,fans) - -% ----[anton.public] -% -% function -% -% [fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(i_detec,fans); -% -% inputs: -% -% i_detec: =2: Xtomo prototype cameras (shot# < 6768) -% =1: Xtomo 9-cameras (shot# > 682x) -% -% outputs: -% -% fans: camera switch, 1=on,0=off (1x10) -% vangle: angle between detect. surface normal and pos. x-axis (1x10) -% xchord: two x-coordinates (2xnl) and -% ychord: two y-coord. for each line (2xnl), they specify start + end points -% aomega: etendue in mm^2 x steradians -% angfact: angular factors, inverse of relative etendue (throughput) (20x10) -% -% uses: -% AOMEGA=etendue_n2(b1x,b1y,b1z,b2x,b2y,b2z,z01,z02,X0,cw); -% angular_fact_*.mat , '*'=i_detec -% -% -%---------------- M.Anton 14/3/95 ------------------------------------------- - -disp('*----------------------------*') -disp('| this is xtomo_geometry |') -disp('*----------------------------*') - -global xap yap xdet ydet -global ae da -% ======== tokamak parameters ================================================ - -load tcv_vesc1 - - - - -xcont=rzvin(:,1); -ycont=rzvin(:,2); -xmin=min(xcont); -ymin=min(ycont); -xmax=max(xcont); -ymax=max(ycont); -xedge=100; -yedge=60; - - - - -% ========= detector parameters ============================================= - -if i_detec==2 - - cw=1; % detector numbers cw=1:clockwise cw=0:ccw - - if nargin<2 - fans=[0 0 0 0 0 0 1 0 1 0]; % camera switch - end - - vangle=[90 90 90 0 0 0 0 -90 -90 -90]; - % angle of detector surface normal - xpos=[0 0 0 0 0 0 118.05 0 87.84 0]; - % x position of the diaphragmas in [cm] - ypos=[0 0 0 0 0 0 -46 0 -80.45 0]; - % y position of the diaphragmas in [cm] - ae=[0 0 0 0 0 0 -2.5 0 -0.1 0]/10; - %excentricity array/diaphragm in [cm] - da=[0 0 0 0 0 0 10.1 0 -11.7 0]/10; - % diaphragma-array distance in [cm] - da2=da; - - d1=0.950; % detector width in mm - d2=4.050; % detector length in mm - b1=1.000; % aperture width in mm - b2=4.000*ones(1,10); % aperture length in mm - b3x=0; % aperture thickness in mm - b3y=0; - -elseif i_detec==1 - - cw=1; % detector numbers cw=1:clockwise cw=0:ccw - - if nargin<2 - fans=[1 1 1 1 1 1 1 1 0 1]; % camera switch - end - - vangle=[90 90 90 0 0 0 0 -90 -90 -90]; - % angle of detector surface normal - xpos=[71.5 87.7 103.9 123.1 123.1 123.1 123.1 104.04 87.84 71.64]; - % x position of the diaphragmas in [cm] - ypos=[80.35 80.35 80.35 48.1 1.95 -2.45 -48.6 -80.35 -80.35 -80.35]; - % y position of the diaphragmas in [cm] - ae=[-8 0 8 5 9 -9 -5 8 0 -8]/10; %excentricity array/diaphragm [cm] - - - ae= ae + [-0.0915 0 0.1361 0.2123 0.0923 -0.0994 ... - 0.0872 -0.1520 0 0.9410 ]/10; - ae(1)=ae(1)+0.1/10; - ae(3)=8/10+0.14/10; - ae(4)=4.9/10; - ae(5)=9/10+0.2/10; - ae(6)=ae(6)-0.2/10; - ae(7)=-4.9/10; - ae(10)=-7.1/10; - - da= [12.4 9.9 12.4 9.9 13.4 13.4 9.9 -12.4 -9.9 -12.4]/10; - % diaphragma-array distance in [cm] (poloidal) - da2=[37 34.4 37 55.9 59.4 59.4 55.9 37 34.4 37]/10; - % dist to diaphragm in toroidal direction [cm]; - deltada=[ -0.0311 0 -0.0458 -0.1179 -0.0615 -0.1105 ... - -0.0510 -0.0515 0 -0.3223]/10; - deltada(4)=0; - deltada(6)=0; - - - da=da+ deltada; - - da2=da2+deltada; - - - d1=0.90; % detector width in mm - d2=4.0; % detector length in mm - b1=0.800; % aperture width in mm (pol.) - b2=[8 8 8 15 15 15 15 8 8 8]; - % aperture length in mm (tor.) - b3x=0.020; % aperture thickness in mm (poloidal) - b3y=0; % aperture thickness in mm (toroidal) -end - - - -%======== calculation of the chords of view =================================== - -nact=sum(fans); -iact=find(fans); -ndet=20; -ncam=10; - - - -% ---- apertures: ------------------ - -xap=ones(ndet,1)*xpos(iact); -xap=xap(:)'; -yap=ones(ndet,1)*ypos(iact); -yap=yap(:)'; - -% ---- detectors: ------------------ - -vorz(find(vangle==90))=(-1)^(cw+1)*ones(size(find(vangle==90))); -vorz(find(vangle==0))=(-1)^cw*ones(size(find(vangle==0))); -vorz(find(vangle==-90))=(-1)^cw*ones(size(find(vangle==-90))); - - -dete=(-9.025:0.950:9.025)'/10*vorz(iact)+ones(ndet,1)*ae(iact); - -dum_ae=dete(:)'; - -dum_vangle=ones(ndet,1)*vangle(iact); -dum_vangle=dum_vangle(:)'; - - - -ivert=find(dum_vangle==90 | dum_vangle==-90); -ihori=find(dum_vangle==0); - -dum_da=ones(ndet,1)*da(iact); -dum_da=dum_da(:)'; - -dxd=zeros(1,ndet*nact); -dyd=zeros(1,ndet*nact); - -dxd(ivert)=dum_ae(ivert); -dxd(ihori)=dum_da(ihori); - -dyd(ivert)=dum_da(ivert); -dyd(ihori)=dum_ae(ihori); - -xdet=xap+dxd; -ydet=yap+dyd; - - -%plot_vessel(rzvin,rzvout) -%hold on -% plot(xap,yap,'.g',xdet,ydet,'.m') - - -% ---- calculate the equations of lines of sight - -m=(ydet-yap)./(xdet-xap); -b=ydet-m.*xdet; - -nl=length(xdet); -xchord=zeros(2,nl); -ychord=zeros(2,nl); - - -xchord(1,:)=xdet;ychord(1,:)=ydet; - -iup=find(dum_vangle==90); -isi=find(dum_vangle==0); -ido=find(dum_vangle==-90); - -if ~isempty(iup) -ychord(2,iup)=ymin*ones(size(iup)); -xchord(2,iup)=(ychord(2,iup)-b(iup))./m(iup); -end -if ~isempty(ido) -ychord(2,ido)=ymax*ones(size(ido)); -xchord(2,ido)=(ychord(2,ido)-b(ido))./m(ido); -end -if ~isempty(isi) -xchord(2,isi)=xmin*ones(size(isi)); -ychord(2,isi)=m(isi).*xchord(2,isi)+b(isi); -end - -ileft=find(xchord(2,:)<xmin); - -if ~isempty(ileft) -xchord(2,ileft)=xmin*ones(size(ileft)); -ychord(2,ileft)=m(ileft).*xchord(2,ileft)+b(ileft); -end -irig=find(xchord(2,:)>xmax); -if ~isempty(irig) -xchord(2,irig)=xmax*ones(size(irig)); -ychord(2,irig)=m(irig).*xchord(2,irig)+b(irig); -end - - - -%======== prepare output ====================================================== - -vangle=vangle(iact); - -%======== calculation of angular correction factors, if necessary ============= - -if i_detec==2 & exist('angular_fact_2.mat')==2 - - disp('loading angular_fact_2') - load angular_fact_2 - - -elseif i_detec==1 & exist('angular_fact_1.mat')==2 - - disp('loading angular_fact_1') - load angular_fact_1 - -else - - aomega=zeros(ndet,ncam); - angfact=ones(ndet,ncam); - - - for l=1:sum(fans) - -% Z0X=abs(da(iact(l))*10) -% Z0Y=abs(da2(iact(l))*10) -% X0=ae(iact(l))*10 % back to mm, sorry about that... -% X0=X0*vorz(iact(l)) -% B2=b2(iact(l)) -% AOMEGA=etendue_n(b1,B2,b3x,b3y,Z0X,Z0Y,X0,cw); - - b1x=0.8; - b1y=6; - b1z=0.02; - b2x=10000000; - b2y=b2(iact(l)); - b2z=0; - z01=abs(da(iact(l))*10); - z02=abs(da2(iact(l))*10); - X0=ae(iact(l))*10*vorz(iact(l)); -keyboard - AOMEGA=etendue_n2(b1x,b1y,b1z,b2x,b2y,b2z,z01,z02,X0,cw); - - aomega(:,iact(l))=AOMEGA(:,1); - - - end - - - indm=min(find(aomega==max(aomega(:)))); - aomegan=aomega/aomega(indm); - nonz=find(aomega); - angfact(nonz)=ones(size(nonz))./aomegan(nonz); - - angfact=round(1000*angfact)/1000; - - - unitstring='units aomega: mm^2 * sterad'; - - if i_detec==1 - save angular_fact_1 angfact aomega unitstring - elseif i_detec==2 - save angular_fact_2 angfact aomega unitstring - end - -end -return - -th=atan(diff(ychord)./diff(xchord)); -thp=th; -neg=find(thp<0); -thp(neg)=180+thp(neg); -thdet=ones(1,20*sum(fans)); -for k=1:sum(fans) - thdet((k-1)*20+1:k*20)=vangle(k)*ones(1,20); -end -angles=thdet-thp; -mist=find(angles<0 & abs(angles)>90); -angles(mist)=angles(mist)+180; -th_inc=angles*pi/180; - - -% ---- correct for the edges of tcv ( some chords may be too long ) - - - - - - down=find(xcont>xedge & ycont<-yedge); - up=find(xcont>xedge & ycont>yedge); - cd=polyfit(xcont(down),ycont(down),1); - cu=polyfit(xcont(up),ycont(up),1); - - - iu1=find(xchord(1,:)>xedge & ychord(1,:)>0 & dum_vangle==-90 ); - if ~isempty(iu1) - xchord(1,iu1)=-(b(iu1)-cu(2))./(m(iu1)-cu(1)+eps); - ychord(1,iu1)=m(iu1).*xchord(1,iu1)+b(iu1); - end - - iu2=find(xchord(2,:)>xedge & ychord(2,:)>0 & ychord(1,:) & .... - dum_vangle==-90); - if ~isempty(iu2) - xchord(2,iu2)=-(b(iu2)-cu(2))./(m(iu2)-cu(1)+eps); - ychord(2,iu2)=m(iu2).*xchord(2,iu2)+b(iu2); - end - - id1=find(xchord(1,:)>xedge & ychord(1,:)<0 & dum_vangle==90); - if ~isempty(id1) - xchord(1,id1)=-(b(id1)-cd(2))./(m(id1)-cd(1)+eps); - ychord(1,id1)=m(id1).*xchord(1,id1)+b(id1); - end - - id2=find(xchord(2,:)>xedge & ychord(2,:)<0 & dum_vangle==90); - if ~isempty(id2) - xchord(2,id2)=-(b(id2)-cd(2))./(m(id2)-cd(1)+eps); - ychord(2,id2)=m(id2).*xchord(2,id2)+b(id2); - end - - ilow=find(ychord(1,:)<ymin); - ihig=find(ychord(1,:)>ymax); - ilef=find(xchord(1,:)<xmin); - irig=find(xchord(1,:)>xmax); - if ~isempty(ilow) - ychord(1,ilow)=ymin*ones(size(ilow)); - xchord(1,ilow)=ymin./m(ilow)-b(ilow)./m(ilow); - end - if ~isempty(ihig) - ychord(1,ihig)=ymax*ones(size(ihig)); - xchord(1,ihig)=ymax./m(ihig)-b(ihig)./m(ihig); - end - if ~isempty(ilef) - xchord(1,ilef)=xmin*ones(size(ilef)); - ychord(1,ilef)=m(ilef)*xmin+b(ilef); - end - if ~isempty(irig) - xchord(1,irig)=xmax*ones(size(irig)); - ychord(1,irig)=m(irig)*xmax+b(irig); - end - - - ilow=find(ychord(2,:)<ymin); - ihig=find(ychord(2,:)>ymax); - ilef=find(xchord(2,:)<xmin); - irig=find(xchord(2,:)>xmax); - if ~isempty(ilow) - ychord(2,ilow)=ymin*ones(size(ilow)); - xchord(2,ilow)=ymin./m(ilow)-b(ilow)./m(ilow); - end - if ~isempty(ihig) - ychord(2,ihig)=ymax*ones(size(ihig)); - xchord(2,ihig)=ymax./m(ihig)-b(ihig)./m(ihig); - end - if ~isempty(ilef) - xchord(2,ilef)=xmin*ones(size(ilef)); - ychord(2,ilef)=m(ilef)*xmin+b(ilef); - end - if ~isempty(irig) - xchord(2,irig)=xmax*ones(size(irig)); - ychord(2,irig)=m(irig)*xmax+b(irig); - end - - - - - diff --git a/crpptbx_new/examples.m b/crpptbx_new/examples.m deleted file mode 100644 index e501d265..00000000 --- a/crpptbx_new/examples.m +++ /dev/null @@ -1,54 +0,0 @@ ->>[a0,b0]=gdat -a0 = - - t: [] - data: [] - dim: [] - dimunits: [] - error_bar: [] - shot: [] - machine: [] - gdat_keyword: {'kwd1' 'kwd2'} - gdat_params: [1x1 struct] - data_fullpath: [] - gdat_call: 'gdat;' - - -b0 = - - data_request: '' - machine: 'tcv' - doplot: 0 - - ->>[a1, b1]=gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc') -a1 = - - t: [] - data: [] - dim: [] - dimunits: [] - error_bar: [] - shot: 48836 - machine: [] - gdat_keyword: [] - gdat_params: [1x1 struct] - data_fullpath: [] - gdat_call: 'gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc');' - -b1 = - - data_request: 'ip' - machine: 'tcv' - doplot: 1 - opt1: 123 - opt2: 'abc' - ->> b1.newopt=[1 2 34]; ->> [a2 b2]=gdat(48836,b1); - -the "calling string can be used to rerun the call: - ->> eval(['[a3 b3]=' a2.gdat_call]); - -a3 is the same as a2 diff --git a/crpptbx_new/gdat.m b/crpptbx_new/gdat.m deleted file mode 100644 index 5b4804f9..00000000 --- a/crpptbx_new/gdat.m +++ /dev/null @@ -1,181 +0,0 @@ -function [gdat_data,gdat_params,error_status,varargout] = gdat(shot,data_request,varargin) -% -% function [gdat_data,gdat_params,error_status,varargout] = gdat(shot,data_request,varargin) -% -% Aim: get data from a given machine using full path or keywords. -% Keywords should be the same for different machines, otherwise add "_machinname" to the keyword if specific -% Keywords are and should be case independent (transformed in lower case in the function and outputs) -% -% If no inputs are provided, return the list of available keywords in gdat_data and default parameters gdat_params -% -% Inputs: -% -% no inputs: return default parameters in a structure form in gdat_params -% shot: shot number -% data_request: keyword (like 'ip') or trace name or structure containing all parameters but shot number -% varargin{i},varargin{i+1},i=1:nargin-2: additional optional parameters given in pairs: param_name, param_value -% The optional parameters list might depend on the data_request -% examples of optional parameters: -% 'plot',1 (plot is set by default to 0) -% 'machine','TCV' (the default machine is the local machine) -% -% -% Outputs: -% -% gdat_data: structure containing the data, the time trace if known and other useful information -% gdat_data.t : time trace -% gdat_data.data: requested data values -% gdat_data.dim : values of the various coordinates related to the dimensions of .data(:,:,...) -% note that one of the dim is the time, replicated in .t for clarity -% gdat_data.dimunits : units of the various dimensions, 'dimensionless' if dimensionless -% gdat_data.error_bar : if provided -% gdat_data.gdat_call : list of parameters provided in the gdat call (so can be reproduced) -% gdat_data.shot: shot number -% gdat_data.machine: machine providing the data -% gdat_data.gdat_request: keyword for gdat if relevant -% gdat_data.data_fullpath: full path to the data node if known and relevant, or expression, or relevant function called if relevant -% gdat_data.gdat_params: copy gdat_params for completeness -% gdat_data.xxx: any other relevant information -% -% -% Examples: -% (should add working examples for various machines (provides working shot numbers for each machine...)) -% -% [a1,a2]=gdat; -% a2.data_request = 'Ip'; -% a3=gdat(48836,a2); % gives input parameters as a structure, allows to call the same for many shots -% a4=gdat('opt1',123,'opt2',[1 2 3],'shot',48832,'data_request','Ip','opt3','aAdB'); % all in pairs -% a5=gdat(48836,'ip'); % standard call -% a6=gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc'); % standard call with a few options (all lowercase in output) - - -% -% Comments for local developer: -% This gdat is just a "header routine" calling the gdat for the specific machine gdat_`machine`.m which can be called -% directly, thus which should be able to treat the same type of input arguments -% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Prepare some variables, etc - -% for backward compatibility (with most recent simple call ala: gdat(shot,'data_request',doplot,machine) ) -% if nargin<=4 and >2 and 1st and 3rd are numeric, assume this is an old call and transform it to: -% gdat(shot,'data_request','doplot',doplot','machine',machine) -% and a warning -if nargin>2 - varargin_eff = varargin; - if nargin>=3 && nargin<=4 && isnumeric(shot) && isnumeric(varargin{1}) - % assume old call: gdat(shot,'data_request',doplot[,machine]) - varargin_eff{1} = 'doplot'; - varargin_eff{end+1} = varargin{1}; - if nargin==4 - varargin_eff{end+1} = 'machine'; - varargin_eff{end+1} = varargin{2}; - end - end -end - -% construct default parameters structure -gdat_params.data_request = ''; -fusion_machine_defaultname=getenv('FUSION_MACHINE_DEFAULTNAME'); -default_machine = ''; -if ~isempty(fusion_machine_defaultname) - default_machine = lower(fusion_machine_defaultname); -else - hostname=getenv('HOSTNAME'); - if ~isempty(regexpi(hostname,'epfl')) - default_machine = 'tcv'; - elseif ~isempty(regexpi(hostname,'rzg.mpg')) - default_machine = 'aug'; - end -end -machine_eff = default_machine; - -% do not treat inputs here but in subsequent gdat_machine.m function, however, need to extract machine name if provided: -if nargin>=2 % need at least 2 inputs to have 'machine','aug' as arguments (to ask specific list of requests) - % in case start directly with pairs of options - if ischar(shot) && ischar(data_request) - machine_eff = data_request; - elseif isstruct(shot) && isfield(shot,'machine') - machine_eff = shot.machine; - elseif isstruct(data_request) && isfield(data_request,'machine') - machine_eff = data_request.machine; - elseif nargin>=3 - imachine=[]; - for i=1:length(varargin_eff) - if ischar(varargin_eff{i}) - ii = strmatch(varargin_eff{i},'machine','exact'); - if ~isempty(ii); imachine = i; end - end - end - if ~isempty(imachine) && length(varargin_eff)>=imachine+1 && ~isempty(varargin_eff{imachine+1}) - machine_eff = varargin_eff{imachine+1}; - end - end -end - -% add paths to each machine which are in subdirectory of gdat and working -% add only given machine directory using machine_eff... -gdat_path = mfilename('fullpath'); -eval(['addpath ' gdat_path(1:end-4) upper(machine_eff)]); - -% copy gdat present call: -if nargin==0 - subcall=['gdat;']; -elseif nargin>=1 - if isnumeric(shot) - subcall=['gdat(' num2str(shot) ]; - elseif ischar(shot) - subcall=['gdat(' shot ]; - else - warning('type of 1st argument unexpected, should be numeric or char') - gdat_data.gdat_call = []; - return - end - if nargin>=2 - if isempty(data_request) - subcall = [subcall ',[]']; - else - substring = subcall_all2str(data_request); - subcall = [subcall substring]; - end - if nargin>=3 - substring = subcall_all2str(varargin_eff{:}); - subcall = [subcall substring]; - end - end - % ... to continue - subcall = [subcall ');']; -end - -% Note: would need to check nargout to make call consistent, but to avoid this, each gdat_xxx should return at least an empty varargout: varargout{1}=cell(1); -try - if nargin==0 - eval(['[gdat_data,gdat_params,error_status,varargout] = gdat_' lower(machine_eff) ';']); - elseif nargin==1 - eval(['[gdat_data,gdat_params,error_status,varargout] = gdat_' lower(machine_eff) '(shot);']); - elseif nargin==2 - eval(['[gdat_data,gdat_params,error_status,varargout] = gdat_' lower(machine_eff) '(shot,data_request);']); - else - eval(['[gdat_data,gdat_params,error_status,varargout] = gdat_' lower(machine_eff) '(shot,data_request,varargin_eff{:});']); - end -catch - warning(['problems calling gdat_' lower(machine_eff)]); - return -end - -% copy subcall here so is last subnode -gdat_data.gdat_call = [subcall ' % nargout = ' num2str(nargout)]; - -if ~isfield(gdat_data.gdat_params,'doplot') - gdat_data.gdat_params.doplot = 0; -end - -if gdat_data.gdat_params.doplot - % plot gdat_data versus 1st dim by default, if nb_dims<=2, otherwise do not plot - if length(varargout)==0 || isempty(varargout{1}) - varargout{1} = gdat_plot(gdat_data); % return handle to figure - else - varargout{end+1} = gdat_plot(gdat_data); % return handle to figure - end -end diff --git a/crpptbx_new/gdat_data_request_names.xlsx b/crpptbx_new/gdat_data_request_names.xlsx deleted file mode 100644 index 966dc80b3f5fc6c3c97ef18d07e468cf2f17784b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11917 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 F{{bjJ?wSAq diff --git a/crpptbx_new/gdat_data_request_names_rho.xlsx b/crpptbx_new/gdat_data_request_names_rho.xlsx deleted file mode 100644 index 74f47e6263dadbe5c0879ab7e22d0c00441094c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12190 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 Of2hG~Y)t>_?0*2rA8rc( diff --git a/crpptbx_new/gdat_plot.m b/crpptbx_new/gdat_plot.m deleted file mode 100644 index 04a3c9b4..00000000 --- a/crpptbx_new/gdat_plot.m +++ /dev/null @@ -1,41 +0,0 @@ -function [fighandle]=gdat_plot(gdat_data,varargin); -% -% choices from doplot in gdat_data.gdat_params.doplot: -% doplot = 0: no plot -% = 1: new figure created -% = -1: add to current figure (with hold all) -% > 1: create new figure with this number, adding clf -% <-1: add to figure number abs(doplot) (with hold all) -% -if ~isfield(gdat_data.gdat_params,'doplot') || gdat_data.gdat_params.doplot ==0 - return -end - -fighandle = get(0,'CurrentFigure'); - -if prod(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(gdat_data.t) - if gdat_data.gdat_params.doplot == 1 - fighandle = figure; - elseif gdat_data.gdat_params.doplot > 1 - fighandle = figure(gdat_data.gdat_params.doplot); - clf; - elseif gdat_data.gdat_params.doplot == -1 - hold all - elseif gdat_data.gdat_params.doplot < -1 - fighandle = figure(abs(gdat_data.gdat_params.doplot)); - hold all - end - if any(find(size(gdat_data.data)==length(gdat_data.t))) - plot(gdat_data.t,gdat_data.data); - title([gdat_data.gdat_params.machine ' #' num2str(gdat_data.shot)]); - if isfield(gdat_data,'mapping_for') - xlabel(['time [' gdat_data.dimunits{gdat_data.mapping_for.(gdat_data.gdat_params.machine).gdat_timedim} ']']); - else - xlabel(['time']); - end - ylabel([gdat_data.label '[' gdat_data.units ']']); - zoom on; - end -else - disp('cannot plot gdat_data, has empty data or t field') -end diff --git a/crpptbx_new/get_data_request_names.m b/crpptbx_new/get_data_request_names.m deleted file mode 100644 index 7ff6504e..00000000 --- a/crpptbx_new/get_data_request_names.m +++ /dev/null @@ -1,45 +0,0 @@ -function [data_request_names] = get_data_request_names; -% -% get list of presently available data_request names grouped and with description -% -% at this stage using first 3 columns of file gdat_data_request_names.xlsx -% - -expected_machines = [{'aug'}, {'jet'}, {'tcv'}]; % substrutures created for these at this stage (all means all of these) -for j=1:length(expected_machines) - data_request_names.(expected_machines{j}) = []; -end - -filename='gdat_data_request_names_rho.xlsx'; - -[numeric_struct,text_struct,raw_struct]=xlsread(filename); - -% use text structure -[n1,n2]=size(text_struct); -if prod(n1,n2)==0 || n2<3 - disp(['problems with file ' filename]) - return -end - -% assume 1st column has data_request names with the headline "data_request" -ij=find(strcmp('data_request',strtrim(lower(text_struct{1,1})))==1); -if isempty(ij) || ij+1>=n1 - disp(['problems with file ' filename '; ''data_request'' not found in 1st column or no extra lines']) - return -end - -ij_1strow = ij+1; -for iline=ij+1:n1 - if isempty(text_struct{iline,1}); keyboard; end - % extra machine - validity = text_struct{iline,3}; - if ~isempty(regexpi(validity,'all')) - data_request_names.all.(strtrim(lower(text_struct{iline,1}))).description = strtrim(text_struct{iline,2}); - else - for j=1:length(expected_machines) - if ~isempty(regexpi(validity,expected_machines{j})) - data_request_names.(lower(expected_machines{j})).(strtrim(lower(text_struct{iline,1}))).description = strtrim(text_struct{iline,2}); - end - end - end -end diff --git a/crpptbx_new/subcall_all2str.m b/crpptbx_new/subcall_all2str.m deleted file mode 100644 index a87eff3a..00000000 --- a/crpptbx_new/subcall_all2str.m +++ /dev/null @@ -1,59 +0,0 @@ -function subcall_string = subcall_all2str(varargin) -% -% subcall_string = subcall_all2str(varargin) -% -% create a string from varargin allowing following types: -% -% char: varargin is just copied -% numeric: if scalar use num2str, if 1 or 2-D array add relevant '[' and ']', else mark a string multi-D -% structure: explode structure as field,value -% - -% to be taken from above and include this call in above - -if nargin==0 - subcall_string = ''; - return -end - -subcall = ''; -for i_in=1:length(varargin) - var_to_treat = varargin{i_in}; - if isstruct(var_to_treat) - % explode structure into 'childname',childvalues - param_names = fieldnames(var_to_treat); - for i=1:length(param_names) - subcall = [subcall ',''' param_names{i} '''']; - if ischar(var_to_treat.(param_names{i})) - subcall = [subcall ',''' var_to_treat.(param_names{i}) '''']; - elseif isnumeric(var_to_treat.(param_names{i})) - aa_values = var_to_treat.(param_names{i}); - if prod(size(aa_values))~= length(aa_values) - % multi-D input, do not treat it yet - subcall = [subcall ',''multi-D input''']; - elseif length(aa_values) > 1 - % array - subcall = [subcall ',[' num2str(reshape(aa_values,1,length(aa_values))) ']']; - else - subcall = [subcall ',' num2str(aa_values) '']; - end - else - % to treat extra cases - end - end - elseif isnumeric(var_to_treat) - if prod(size(var_to_treat))~= length(var_to_treat) - % multi-D input, do not treat it yet - subcall = [subcall ',''multi-D input''']; - elseif length(var_to_treat) > 1 - % array - subcall = [subcall ',[' num2str(var_to_treat) ']']; - else - subcall = [subcall ',' num2str(var_to_treat) '']; - end - elseif ischar(var_to_treat) - subcall = [subcall ',''' var_to_treat '''']; - end -end - -subcall_string = subcall; diff --git a/crpptbx_new/test_all_requestnames.m b/crpptbx_new/test_all_requestnames.m deleted file mode 100644 index ff449dbb..00000000 --- a/crpptbx_new/test_all_requestnames.m +++ /dev/null @@ -1,12 +0,0 @@ - -machine='TCV'; -shot=48836; -aa=gdat('machine',machine); -all_request_names = aa.gdat_request -%break -istart=1; -for irequest=istart:length(all_request_names) - request=all_request_names{irequest} - ab{irequest} = gdat(shot,request,'machine',machine,'doplot',1); - pause -end -- GitLab