Title="Tokamak Plasma from 1114Intro"
FileID=VAchar
x11=false



#exit

/golem/tools/MATLAB/R2014b/bin/matlab -nosplash -nodesktop -nodisplay  -r "addpath('../AasimCode/');matlscr"
BASE='set xlabel "Probe Voltage [V]";set ylabel "Probe Current [A]";plot "'$FileID'raw.dat" t "primary data"';
if $x11; then echo "$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;$BASE"|gnuplot > "$FileID"raw.jpg
BASE='set xlabel "Probe Voltage [V]";set ylabel "Probe Current [A]";plot "'$FileID'fit.dat" t "Azooz fit","'$FileID'raw.dat" t "primary data"';
if $x11; then echo "$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;$BASE"|gnuplot > "$FileID"fit.jpg
BASE='set xlabel "Probe Voltage [V]";set ylabel "Probe Current [A]";set y2label "First Derivative (Ampere/Volt)";plot "'$FileID'fit.dat" t "fit","'$FileID'd1f.dat" t "dI/dV" axes x1y2';
if $x11; then echo "$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;$BASE"|gnuplot > "$FileID"d1f.jpg
BASE='set xlabel "Probe Voltage [V]";set ylabel "Probe Current [A]";set y2label "Second Derivative (Ampere/Volt^2)";plot "'$FileID'fit.dat" t "fit","'$FileID'd2f.dat" t "d2I/d2V" axes x1y2';
if $x11; then echo "$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;$BASE"|gnuplot > "$FileID"d2f.jpg
BASE='set label "`cat Te|awk "{ printf \"Te=%3.2f eV\", \$0 }"`" at `cat Te|awk "{ printf \"%3.2f\", \$0*8/10 }"`,graph 0 rotate left;set arrow from `cat Te`, graph 0 to `cat Te`, graph 1 nohead;set xlabel "Electron Enery [eV]";set ylabel "EEDF (M^-3 eV^-1)";plot "'$FileID'eedf.dat" t "Experimental EEDF","'$FileID'maxwell.dat" t "maxwell fit","'$FileID'dry.dat" t "Druyvestein fit"';
if $x11; then echo "$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;$BASE"|gnuplot > "$FileID"eedf.jpg
if $x11; then echo "set xrange [0:20];$BASE"|gnuplot --persist;fi
echo "set terminal jpeg;set xrange [0:20];$BASE"|gnuplot > "$FileID"eedf_.jpg

echo "<html><body><center>
<h1>VA char for **"$Title"**</h1>
<a href='"$FileID"raw.dat'>Data</a> => <a href="http://golem.fjfi.cvut.cz/wikiraw/Experiments/EdgePlasmaPhysics/ParticleFlux/SingleLangmProbe/VAcharBasedShotToShotMeas/100616b_HandMadeDVvHe/AasimCode/">code</a> => `cat Results`
<table><col width="30%"><col width="30%"><col width="30%">
<tr>
<td><a href=""$FileID"raw.jpg"><img src=""$FileID"raw.jpg" width="100%"></img></a></td>
<td><a href=""$FileID"fit.jpg"><img src=""$FileID"fit.jpg" width="100%"></img></a></td>
<td><a href=""$FileID"d1f.jpg"><img src=""$FileID"d1f.jpg" width="100%"></img></a></td>
</tr>
<tr>
<td><a href=""$FileID"d2f.jpg"><img src=""$FileID"d2f.jpg" width="100%"></img></a></td>
<td><a href=""$FileID"eedf.jpg"><img src=""$FileID"eedf.jpg" width="100%"></img></a></td>
<td><a href=""$FileID"eedf_.jpg"><img src=""$FileID"eedf_.jpg" width="100%"></img></a></td>
</tr>
</table>
</center>
<hr></hr>
<h2>Acknowledgement:</h2>
Aasim Azooz: <a href="http://www.mathworks.com/matlabcentral/fileexchange/19312-langmuir-probe-data-analysis-code">Langmuir probe data analysis code @ MathWorks</a> (<a href="http://golem.fjfi.cvut.cz/wikiraw/Experiments/EdgePlasmaPhysics/ParticleFlux/SingleLangmProbe/VAcharBasedShotToShotMeas/100616b_HandMadeDVvHe/AasimCode/TheNewupdatedLangmuirprobedataanalysisprogram.pdf">Short description</a>)<br></br> <a href="http://scitation.aip.org/content/aip/journal/rsi/79/10/10.1063/1.2976755">A. A. Azooz: Four free parameter empirical parametrization of glow discharge Langmuir probe data. Rev. Sci. Instrum. 79, 103501 (2008); http://dx.doi.org/10.1063/1.2976755</a><br></br>
Adapted a bit to: <a href="http://golem.fjfi.cvut.cz/wikiraw/Experiments/EdgePlasmaPhysics/ParticleFlux/SingleLangmProbe/VAcharBasedShotToShotMeas/100616b_HandMadeDVvHe/AasimCode/">Code used</a>
</body></html>" >  index.html


echo "<tr>
<td><a href="`basename $PWD`/index.html">"$Title"</a></td>
<td><a href="`basename $PWD`/"$FileID"raw.jpg"><img src="`basename $PWD`/"$FileID"raw.jpg" width="100%"></img></a></td>
<td><a href="`basename $PWD`/"$FileID"fit.jpg"><img src="`basename $PWD`/"$FileID"fit.jpg" width="100%"></img></a></td>
<td><a href="`basename $PWD`/"$FileID"d1f.jpg"><img src="`basename $PWD`/"$FileID"d1f.jpg" width="100%"></img></a></td>
<td><a href="`basename $PWD`/"$FileID"d2f.jpg"><img src="`basename $PWD`/"$FileID"d2f.jpg" width="100%"></img></a></td>
<td><a href="`basename $PWD`/"$FileID"eedf.jpg"><img src="`basename $PWD`/"$FileID"eedf.jpg" width="100%"></img></a></td>
<td><a href="`basename $PWD`/"$FileID"eedf_.jpg"><img src="`basename $PWD`/"$FileID"eedf_.jpg" width="100%"></img></a></td>
</tr>
" >  indexrow.html
