From 1db0aee6c6486749b23660fb932c621fe0a9b0ed Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Fri, 21 Aug 2015 13:42:14 +0000 Subject: [PATCH] add a tutorial and copy tutorial.html to crpp web, created page: http://crpp,epfl,ch/~sauter/gdat linked to this tutorial git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4880 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx_new/demos/html/tutorial.html | 213 +++++++++++++++++++++++++++ crpptbx_new/demos/tutorial.m | 26 ++++ 2 files changed, 239 insertions(+) create mode 100644 crpptbx_new/demos/html/tutorial.html create mode 100644 crpptbx_new/demos/tutorial.m diff --git a/crpptbx_new/demos/html/tutorial.html b/crpptbx_new/demos/html/tutorial.html new file mode 100644 index 00000000..51a1cd9a --- /dev/null +++ b/crpptbx_new/demos/html/tutorial.html @@ -0,0 +1,213 @@ + +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <!-- +This HTML was auto-generated from MATLAB code. +To make changes, update the MATLAB code and republish this document. + --><title>tutorial</title><meta name="generator" content="MATLAB 8.3"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2015-08-21"><meta name="DC.source" content="tutorial.m"><style type="text/css"> +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0} + +html { min-height:100%; margin-bottom:1px; } +html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; } +html body td { vertical-align:top; text-align:left; } + +h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; } +h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; } +h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; } + +a { color:#005fce; text-decoration:none; } +a:hover { color:#005fce; text-decoration:underline; } +a:visited { color:#004aa0; text-decoration:none; } + +p { padding:0px; margin:0px 0px 20px; } +img { padding:0px; margin:0px 0px 20px; border:none; } +p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; } + +ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; } +ul li { padding:0px; margin:0px 0px 7px 0px; } +ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; } +ul li ol li { list-style:decimal; } +ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; } +ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; } +ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; } +ol li ol li { list-style-type:lower-alpha; } +ol li ul { padding-top:7px; } +ol li ul li { list-style:square; } + +.content { font-size:1.2em; line-height:140%; padding: 20px; } + +pre, code { font-size:12px; } +tt { font-size: 1.2em; } +pre { margin:0px 0px 20px; } +pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; } +pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; } +pre.error { color:red; } + +@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } } + +span.keyword { color:#0000FF } +span.comment { color:#228B22 } +span.string { color:#A020F0 } +span.untermstring { color:#B20000 } +span.syscmd { color:#B28C00 } + +.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; } +.footer p { margin:0px; } +.footer a { color:#878787; } +.footer a:hover { color:#878787; text-decoration:underline; } +.footer a:visited { color:#878787; } + +table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; } +table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; } + + + + + + </style></head><body><div class="content"><h2>Contents</h2><div><ul><li><a href="#1">gdat tutorial: some basic calls and functionalities</a></li><li><a href="#2">getting the list of available predefined data_request names</a></li><li><a href="#3">list of data_request names for a specific machine</a></li></ul></div><h2>gdat tutorial: some basic calls and functionalities<a name="1"></a></h2><p>gdat calls in fact the main function MACHINE/gdat_machine.m within the gdat folder gdat can be call with one of the available "data_request" keyword or with a full trace_name</p><p>The basic call is: data_out_struct = gdat(shot,data_request,'option1',option1_val,...);</p><p>But sub-cases are also valid and explained below</p><p>At this stage, you need to do the following to test it:</p><pre class="codeinput">addpath <span class="string">~sauter/matlab/gdat_develop/crpptbx_new</span> +</pre><h2>getting the list of available predefined data_request names<a name="2"></a></h2><pre class="codeinput">gdat_data = gdat; +<span class="comment">%</span> +<span class="comment">% This is the simplest call and returns 3 useful information:</span> +gdat_data.gdat_request <span class="comment">% contains the list of available data_request names</span> +gdat_data.gdat_params <span class="comment">% contains the list of basic parameters, including :</span> +gdat_data.gdat_params.machine <span class="comment">% the (default) machine name</span> +<span class="comment">%</span> +<span class="comment">% in addition</span> +gdat_data.gdat_call <span class="comment">% always contains the string so that the same gdat call can be performed (using eval(), see below)</span> +</pre><pre class="codeoutput"> +ans = + + 'b0' + 'betan' + 'betap' + 'cxrs' + 'delta' + 'delta_bot' + 'delta_top' + 'ece' + 'eqdsk' + 'halpha' + 'ioh' + 'ip' + 'kappa' + 'mhd' + 'ne' + 'neint' + 'nel' + 'nerho' + 'neterho' + 'ni' + 'powers' + 'q0' + 'q95' + 'qedge' + 'qrho' + 'rgeom' + 'rhovol' + 'rmag' + 'sxr' + 'te' + 'terho' + 'ti' + 'transp' + 'vloop' + 'vol' + 'zeff' + 'zgeom' + 'zmag' + + +ans = + + data_request: '' + machine: 'tcv' + doplot: 0 + + +ans = + +tcv + + +ans = + +gdat; % nargout = 1 + +</pre><h2>list of data_request names for a specific machine<a name="3"></a></h2><pre class="codeinput">gdat_data = gdat(<span class="string">'machine'</span>,<span class="string">'aug'</span>); +gdat_data.gdat_request +</pre><pre class="codeoutput"> +ans = + + 'b0' + 'betan' + 'betap' + 'cxrs' + 'delta' + 'delta_bot' + 'delta_top' + 'ece' + 'eqdsk' + 'halpha' + 'ioh' + 'ip' + 'kappa' + 'mhd' + 'ne' + 'neint' + 'nel' + 'nerho' + 'neterho' + 'ni' + 'powers' + 'q0' + 'q95' + 'qedge' + 'qrho' + 'rgeom' + 'rhovol' + 'rmag' + 'sxr' + 'te' + 'terho' + 'ti' + 'transp' + 'vloop' + 'vol' + 'zeff' + 'zgeom' + 'zmag' + 'equil' + +</pre><p class="footer"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB® R2014a</a><br></p></div><!-- +##### SOURCE BEGIN ##### +%% gdat tutorial: some basic calls and functionalities +% gdat calls in fact the main function MACHINE/gdat_machine.m within the gdat folder +% gdat can be call with one of the available "data_request" keyword or with a full trace_name +% +% The basic call is: +% data_out_struct = gdat(shot,data_request,'option1',option1_val,...); +% +% But sub-cases are also valid and explained below +% +% At this stage, you need to do the following to test it: +addpath ~sauter/matlab/gdat_develop/crpptbx_new +%% getting the list of available predefined data_request names +% +gdat_data = gdat; +% +% This is the simplest call and returns 3 useful information: +gdat_data.gdat_request % contains the list of available data_request names +gdat_data.gdat_params % contains the list of basic parameters, including : +gdat_data.gdat_params.machine % the (default) machine name +% +% in addition +gdat_data.gdat_call % always contains the string so that the same gdat call can be performed (using eval(), see below) +%% list of data_request names for a specific machine +gdat_data = gdat('machine','aug'); +gdat_data.gdat_request +%% + +##### SOURCE END ##### +--></body></html> \ No newline at end of file diff --git a/crpptbx_new/demos/tutorial.m b/crpptbx_new/demos/tutorial.m new file mode 100644 index 00000000..242c2f21 --- /dev/null +++ b/crpptbx_new/demos/tutorial.m @@ -0,0 +1,26 @@ +%% gdat tutorial: some basic calls and functionalities +% gdat calls in fact the main function MACHINE/gdat_machine.m within the gdat folder +% gdat can be call with one of the available "data_request" keyword or with a full trace_name +% +% The basic call is: +% data_out_struct = gdat(shot,data_request,'option1',option1_val,...); +% +% But sub-cases are also valid and explained below +% +% At this stage, you need to do the following to test it: +addpath ~sauter/matlab/gdat_develop/crpptbx_new +%% getting the list of available predefined data_request names +% +gdat_data = gdat; +% +% This is the simplest call and returns 3 useful information: +gdat_data.gdat_request % contains the list of available data_request names +gdat_data.gdat_params % contains the list of basic parameters, including : +gdat_data.gdat_params.machine % the (default) machine name +% +% in addition +gdat_data.gdat_call % always contains the string so that the same gdat call can be performed (using eval(), see below) +%% list of data_request names for a specific machine +gdat_data = gdat('machine','aug'); +gdat_data.gdat_request +%% -- GitLab