Source code :: About.php

[Return]
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
##!/usr/bin/python2
## -*- coding: utf-8 -*-


<%page args="shot,  page, default_path"/>

<% 
from pygolem_lite import Shot
from pygolem_lite.config import  TororoidalMagneticFieldTrigger, TororoidalMagneticFieldCapacitor, CurrentDriveElectricFieldCapacitor, StabilizationCapacitor, BreakDownElectricFieldCapacitor
from pygolem_lite.web import emph, cat, get_page_paths
import datetime, cStringIO

page_path, base_path, page  = get_page_paths(shot, page, default_path)

%>



<h4> Main authors of this web: </h4>
Michal Odstrcil <br/>
Tomas Odstrcil <br/>
Ondrej Grover  <br/>


<h4> Warranty </h4>
 <cite>
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT-
ED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
</cite>

<h3> Basic rules: </h3>
<ul>
<li>Do not copy large files do your directory, use  <a href="/data/${base_path}" >pygolem_lite</a> or symbolic links </li>
<li> Do not place static files such as manuals to include directories, place it to one shared location </li>
<li> Preferably use binary saved data, not ASCII (text) files => it is much faster and saves disk space </li>
<li> Plot images in png, svg, svgz formats,  !! do not use jpg !!! </li>
<li> Try to limit your CPU/memory/disk space usage </li>
<li> Do never place computationaly demanding tasks to your mako template code </li>
</ul>


<h2> FAQ: </h2>

<h4> <a name="pygolem_lite">Pygolem web interface </a> </h4>
<b>See ${emph('Python/Matlab/IDL interface in our <a href="/wiki/SW/DataProcessing">wiki</a>')}</b>. 
If you need to download data from many shots, the simplest way is to use pygolem web interface: <a href="http://golem.fjfi.cvut.cz/utils/data/${Shot}/loop_voltage">http://golem.fjfi.cvut.cz/utils/data/${Shot}/loop_voltage </a>. Names of the diagnostics are shown in <a href="Data.php#all_data">Data</a> page and you can either use the links provided by the Data page or if you prefer another data formats use following syntax
<pre>
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/<your diagn name>_<options>.<format>' | h}
</pre>
supported formats are

<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">

<tr class="field">
<th class="field-name">None </th><td class="field-body"> Ordinary TAB separated ASCII format</td>
</tr>
<tr class="field">
<th class="field-name">.txt </th><td class="field-body"> Ordinary TAB separated ASCII format</td>
</tr>
<tr class="field">
<th class="field-name">.gz</th><td class="field-body">Zip compressed ordinary TAB separated ASCII format</td>
</tr>
<tr class="field">
<th class="field-name">.csv</th><td class="field-body">Comma / semicolon separated ASCII values</td>
</tr>
<tr class="field">
<th class="field-name">.npy</th><td class="field-body"> Standard python binary data</td>
</tr>
<tr class="field">
<th class="field-name">.npz</th><td class="field-body"> Compressed python binary data (see <b><a href="/wiki/SW/DataProcessing#python---golem_data.py">python interface</b>)</a></td>
</tr>
<tr class="field">
<th class="field-name">.mat</th><td class="field-body">Matlab binary data (see <b><a href="/wiki/SW/DataProcessing#matlab---golem_data.m">matlab interface</b>)</a></td>
</tr>
<tr class="field">
<th class="field-name">.xls</th><td class="field-body">Excel 97 format</td>
</tr>
<tr class="field">
<th class="field-name">image</th><td class="field-body">Supported formats: png, svg, svgz</td>
</tr>
<tr class="field">
<th class="field-name">.pro</th><td class="field-body">IDL - not supported, use .mat files (<a href="https://github.com/gordonfarquharson/idl-load-mat/blob/master/load_mat.pro">load_mat.pro</a>), (see <b><a href="/wiki/SW/DataProcessing#idl">IDL interface</a> </b> )</td>
</tr>
</tbody>
</table>

for the ASCII formats you can select if you prefer dots/commas decimal separators

<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field">
<th class="field-name">_dp</th><td class="field-body"> Dots point separators, selected as default !! </td>
</tr>
<tr class="field">
<th class="field-name">_cp</th><td class="field-body">Comma points separator</td>
</tr>
</tbody>
</table>

Examples:
<pre>
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage'} - returns simple ASCII data
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage.npz'} - returns compressed loop voltage data
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage_cp.csv'} - comma separated csv - ${emph("czech excel")}
${'http://golem.fjfi.cvut.cz/utils/data/'+str(shot)+'/loop_voltage.xls'} - ${emph("Excel/OO Calc/Gnumeric")}
</pre>
<br>
<b>${emph('See more details in our <a href="http://golem.fjfi.cvut.cz/wiki/SW/pygolem">wiki</a>')}</b>


<h4> Add new page </h4>
<ul>
<li> get an account for buon.fjfi.cvut.cz </li>
<li>add new folder to includes/analysis or includes/diagnostics in form [data][Name][.ON] (see /golem/database/velin/includes/)</li>
<li> put some html/php/template file inside, ( supported types: html, htm, php, template ), name of file corresponds to title, file can start with numbers (i.e 01_Title.htm) if you need to  select the items order in menu </li>
<li> add scripts  that should prepare all data /  graphs for the web to your folder  </li>
<li> add makefile  that have functions "acquisition", "analysis",  "plots", ("postanalysis"), acquisition should do only basic data processing, and all plotting should be in "plots" !!! to improve speed (parallelization) </li>
<li> Your template and log files will be linked in top right corner of your page
</ul>


<h4> Load data in your page </h4>
use code i.e for loop voltage
<pre>
from pygolem_lite import Shot
tvec, data  = Shot()['loop_voltage']
</pre>
and you will download data for shot number  where is currently placed your script otherwise use
<pre>
from pygolem_lite import Shot
tvec, data  = Shot(${shot})['loop_voltage']
</pre>
if you want to download data from DAS "nistandard":
<pre>
tvec, data  = Shot(${shot})['nistandard']
</pre>
if you need only one channel you can use either number or <a href="/${base_path}das_configuration.cfg"> channel id </a>
<pre>
tvec, data  = Shot(${shot})['nistandard', 0]
tvec, data  = Shot(${shot})['nistandard', 'uloop']
</pre>
  
full list of accesible signal is in <a href="/${base_path}Data.php" >  ${base_path}/Data.php </a> <br>
Is is also possible to use wget and pygolem web interface.
<br>






<h4> Generate an icon for your analysis/diagnostics on the Home page </h4>
You should generate an image with width = 150px and height ~ 100px in your folder and name it icon.png

You can either use simple bash command and convert your plot to the small size
<pre>
convert -resize 150x120\! your_plot.png icon.png
</pre>
or if you use Python
<pre>
import os
os.system('convert -resize 150x120\! your_plot.png icon.png')
</pre>
and finally if you used pygolem plot interface you can create a small plot
<pre>
paralel_multiplot(data, "" , 'icon', (4,3), 40)
</pre>





##<h2> TODO: </h2>
##<% params = cat(page_path + '/TODO.txt', return_array = True) %>
##% for line in params:
##  <li>${line}</li>
## % endfor 

<h4> Comments </h4>
<ul>
<li>How to access such data? Try e.g. <a href="http://en.wikipedia.org/wiki/Wget">Wget</a> or <a href="http://sourceforge.net/p/pygolem/home/Home/"> ${emph('pygolem')} </a>  or <a href="About.php#pygolem_lite"> pygolem web interface</a> </li>
<li>Any comments, suggestions? Do you miss something? <a href="mailto:svoboda@fjfi.cvut.cz">Send an e-mail</a></li>
</ul>

Navigation